/** * Genomic Testing Platform Integrations * * Connects to major genomic testing providers: * - Foundation Medicine (FoundationOne CDx, FoundationOne Liquid CDx) * - Guardant Health (Guardant360, GuardantOMNI) * - Tempus (xT, xF, xR panels) * - Caris Life Sciences (Caris Molecular Intelligence) * - NeoGenomics * * All data handling complies with HIPAA and CAP/CLIA requirements. */ import { EventEmitter } from 'events'; export interface GenomicTestOrder { orderId: string; patientId: string; testType: string; panelName: string; specimenType: 'tissue' | 'blood' | 'bone-marrow' | 'other'; specimenId?: string; orderDate: Date; clinicalIndication: string; icdCodes: string[]; orderingPhysician: { name: string; npi: string; facility: string; }; status: 'ordered' | 'specimen-received' | 'in-process' | 'completed' | 'failed' | 'cancelled'; } export interface GenomicTestResult { reportId: string; orderId: string; patientId: string; testType: string; panelName: string; specimenInfo: { type: 'tissue' | 'blood' | 'bone-marrow' | 'other'; site?: string; collectionDate: Date; tumorPurity?: number; cellularity?: number; }; reportDate: Date; variants: GenomicVariant[]; copyNumberAlterations: CopyNumberAlteration[]; fusions: GeneFusion[]; biomarkers: GenomicBiomarker[]; therapyMatches: TherapyMatch[]; clinicalTrialMatches: ClinicalTrialMatch[]; signatures?: { microsatelliteInstability?: MSIResult; tumorMutationalBurden?: TMBResult; homologousRecombinationDeficiency?: HRDResult; lossOfHeterozygosity?: LOHResult; }; qualityMetrics: { meanCoverage?: number; percentBases100x?: number; tumorFraction?: number; contamination?: number; mappingRate?: number; }; reportPdf?: string; rawData?: { vcfUrl?: string; bamUrl?: string; fastqUrl?: string; }; } export interface GenomicVariant { gene: string; hgvsC?: string; hgvsP?: string; transcript?: string; chromosome?: string; position?: number; refAllele?: string; altAllele?: string; variantType: 'SNV' | 'insertion' | 'deletion' | 'indel' | 'MNV' | 'complex'; variantAlleleFrequency: number; coverage?: number; zygosity?: 'heterozygous' | 'homozygous' | 'hemizygous'; clinicalSignificance: 'pathogenic' | 'likely-pathogenic' | 'vus' | 'likely-benign' | 'benign'; tier?: 'I' | 'II' | 'III' | 'IV'; oncogenicity?: 'oncogenic' | 'likely-oncogenic' | 'vus' | 'likely-neutral' | 'neutral'; functionalEffect?: 'loss-of-function' | 'gain-of-function' | 'switch-of-function' | 'unknown'; somaticStatus?: 'somatic' | 'germline' | 'unknown'; actionability?: { level: 'FDA-approved' | 'clinical-guideline' | 'clinical-evidence' | 'preclinical'; therapies: string[]; evidence: string[]; }; annotations?: { cosmic?: string; dbSNP?: string; clinVar?: string; gnomAD?: { frequency: number; popMax?: number; }; oncokb?: { level: string; description: string; }; }; } export interface CopyNumberAlteration { gene: string; chromosome?: string; startPosition?: number; endPosition?: number; type: 'amplification' | 'gain' | 'loss' | 'deep-deletion'; copyNumber?: number; logRatio?: number; clinicalSignificance: 'pathogenic' | 'likely-pathogenic' | 'vus' | 'likely-benign' | 'benign'; actionability?: { level: 'FDA-approved' | 'clinical-guideline' | 'clinical-evidence' | 'preclinical'; therapies: string[]; }; } export interface GeneFusion { gene5Prime: string; gene3Prime: string; fusionName: string; breakpoint5Prime?: string; breakpoint3Prime?: string; readsSupporting?: number; inFrame?: boolean; clinicalSignificance: 'pathogenic' | 'likely-pathogenic' | 'vus'; actionability?: { level: 'FDA-approved' | 'clinical-guideline' | 'clinical-evidence' | 'preclinical'; therapies: string[]; }; } export interface GenomicBiomarker { name: string; value: number | string; unit?: string; status: 'positive' | 'negative' | 'equivocal' | 'indeterminate'; threshold?: number; method?: string; clinicalImplication?: string; } export interface MSIResult { status: 'MSI-H' | 'MSI-L' | 'MSS' | 'indeterminate'; score?: number; markersAnalyzed?: number; markersUnstable?: number; method: 'NGS' | 'PCR' | 'IHC'; } export interface TMBResult { value: number; unit: 'mutations/Mb'; status: 'high' | 'intermediate' | 'low'; threshold: number; percentile?: number; } export interface HRDResult { status: 'positive' | 'negative' | 'indeterminate'; score?: number; components?: { loh?: number; tai?: number; lst?: number; }; brcaStatus?: 'BRCA1-mut' | 'BRCA2-mut' | 'BRCA-wt'; } export interface LOHResult { percentage: number; status: 'high' | 'intermediate' | 'low'; genomeFraction?: number; } export interface TherapyMatch { therapy: string; drugs: string[]; biomarkers: string[]; evidenceLevel: 'FDA-approved' | 'NCCN-guideline' | 'clinical-evidence' | 'case-report' | 'preclinical'; cancerType: string; approvalStatus?: string; clinicalTrials?: string[]; responseRate?: number; references: string[]; } export interface ClinicalTrialMatch { trialId: string; title: string; phase: 'I' | 'I/II' | 'II' | 'II/III' | 'III' | 'IV'; matchingBiomarkers: string[]; status: 'recruiting' | 'active-not-recruiting' | 'enrolling-by-invitation'; locations?: { name: string; city: string; state: string; country: string; }[]; sponsor?: string; drugs?: string[]; } export interface GenomicPlatformConfig { platform: 'foundation-medicine' | 'guardant' | 'tempus' | 'caris' | 'neogenomics' | 'generic'; apiBaseUrl: string; apiKey?: string; clientId?: string; clientSecret?: string; organizationId?: string; webhookUrl?: string; timeout?: number; } export declare abstract class GenomicPlatformClient extends EventEmitter { protected config: GenomicPlatformConfig; protected accessToken?: string; protected tokenExpiry?: Date; constructor(config: GenomicPlatformConfig); abstract authenticate(): Promise; abstract submitOrder(order: GenomicTestOrder): Promise<{ orderId: string; status: string; }>; abstract getOrderStatus(orderId: string): Promise; abstract getResults(orderId: string): Promise; abstract listPatientResults(patientId: string): Promise; protected httpRequest(url: string, options: { method: string; headers?: Record; body?: string; }): Promise; protected getAuthHeaders(): Promise>; } export declare class FoundationMedicineClient extends GenomicPlatformClient { constructor(config: Omit); authenticate(): Promise; submitOrder(order: GenomicTestOrder): Promise<{ orderId: string; status: string; }>; getOrderStatus(orderId: string): Promise; getResults(orderId: string): Promise; listPatientResults(patientId: string): Promise; /** * Get FoundationOne CDx specific data */ getFoundationOneCDxReport(orderId: string): Promise<{ variants: GenomicVariant[]; cnvs: CopyNumberAlteration[]; fusions: GeneFusion[]; msi: MSIResult; tmb: TMBResult; loh: LOHResult; therapies: TherapyMatch[]; }>; private mapToFMIOrder; private mapPanelToFMICode; private mapFromFMIOrder; private mapFMICodeToPanel; private mapFMIStatus; private mapFromFMIReport; private mapVariantType; private mapPathogenicity; private mapTier; } export declare class GuardantHealthClient extends GenomicPlatformClient { constructor(config: Omit); authenticate(): Promise; submitOrder(order: GenomicTestOrder): Promise<{ orderId: string; status: string; }>; getOrderStatus(orderId: string): Promise; getResults(orderId: string): Promise; listPatientResults(patientId: string): Promise; /** * Get Guardant360 specific metrics including ctDNA fraction */ getGuardant360Metrics(orderId: string): Promise<{ ctDNAFraction: number; maxMAF: number; somatic: GenomicVariant[]; clonalHematopoiesis: GenomicVariant[]; msi: MSIResult; }>; private mapPanelToGuardantTest; private mapFromGuardantOrder; private mapGuardantStatus; private mapFromGuardantReport; } export declare class TempusClient extends GenomicPlatformClient { constructor(config: Omit); authenticate(): Promise; submitOrder(order: GenomicTestOrder): Promise<{ orderId: string; status: string; }>; getOrderStatus(orderId: string): Promise; getResults(orderId: string): Promise; listPatientResults(patientId: string): Promise; /** * Get Tempus xT/xF specific analysis including RNA expression */ getTempusAnalysis(orderId: string): Promise<{ dnaFindings: GenomicVariant[]; rnaExpression?: { gene: string; zscore: number; percentile: number; }[]; immuneProfile?: { pdl1: { score: number; method: string; }; tils: number; immuneScore: number; }; hrd: HRDResult; }>; private mapPanelToTempusCode; private mapFromTempusOrder; private mapTempusCodeToPanel; private mapTempusStatus; private mapFromTempusReport; } export declare class UnifiedGenomicsService { private clients; /** * Register a genomic platform client */ registerClient(name: string, client: GenomicPlatformClient): void; /** * Get results from all platforms for a patient */ getAllPatientResults(patientId: string): Promise<{ platform: string; results: GenomicTestResult[]; }[]>; /** * Aggregate and deduplicate variants across all platforms */ getAggregatedVariants(patientId: string): Promise<{ variants: GenomicVariant[]; cnvs: CopyNumberAlteration[]; fusions: GeneFusion[]; biomarkers: { msi?: MSIResult; tmb?: TMBResult; hrd?: HRDResult; pdl1?: { score: number; scoreType: string; }; }; }>; /** * Match patient genomics to actionable therapies */ matchToTherapies(patientId: string, cancerType: string): Promise; private getFDAApprovedMatches; private getNCCNMatches; } export declare function createGenomicClient(config: GenomicPlatformConfig): GenomicPlatformClient; export default UnifiedGenomicsService; //# sourceMappingURL=genomicPlatforms.d.ts.map