import { DefaultTooltip } from 'cbioportal-frontend-commons';
import _ from 'lodash';
import * as React from 'react';
import { observer } from 'mobx-react';
import {
IndicatorQueryResp,
IndicatorQueryTreatment,
} from 'oncokb-ts-api-client';
import featureTableStyle from '../featureTable/FeatureTable.module.scss';
import { generateOncokbLink, ONCOKB_URL } from '../pathogenicity/Oncokb';
interface ITherapeuticImplicationProps {
oncokb: IndicatorQueryResp | undefined;
isCanonicalTranscriptSelected: boolean;
}
export const SENSITIVE_LEVELS = [
'LEVEL_1',
'LEVEL_2',
'LEVEL_3',
'LEVEL_3A',
'LEVEL_3B',
'LEVEL_4',
];
export const RESISTANT_LEVELS = ['LEVEL_R1', 'LEVEL_R2'];
@observer
class TherapeuticImplication extends React.Component<
ITherapeuticImplicationProps
> {
public sensitiveDrugs(
oncokbData: IndicatorQueryResp | undefined,
oncokbUrl: string
) {
const treatmentsGroupByLevel = this.getTreatmentsGroupByLevel(
oncokbData
); // group treatments by level
if (
oncokbData &&
oncokbData.highestSensitiveLevel &&
treatmentsGroupByLevel
) {
const sensitiveTreatmentLevels = this.getSensitiveTreatmentLevels(
treatmentsGroupByLevel
); // get all sensitive levels in this mutation
const sensitiveDrugs = this.allDrugs(
treatmentsGroupByLevel,
sensitiveTreatmentLevels
);
return (
Sensitive to: {sensitiveDrugs}
Resistant to: {resistantDrugs}
information about the effects and treatment implications
of specific cancer gene alterations.
}
>
OncoKB
{!this.props.isCanonicalTranscriptSelected && (
*
)}