@erosolaraijs/cure 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/dist/bin/cure.d.ts +2 -5
  2. package/dist/bin/cure.d.ts.map +1 -1
  3. package/dist/bin/cure.js +285 -124
  4. package/dist/bin/cure.js.map +1 -1
  5. package/dist/clinician/decisionSupport.d.ts +325 -0
  6. package/dist/clinician/decisionSupport.d.ts.map +1 -0
  7. package/dist/clinician/decisionSupport.js +604 -0
  8. package/dist/clinician/decisionSupport.js.map +1 -0
  9. package/dist/clinician/index.d.ts +5 -0
  10. package/dist/clinician/index.d.ts.map +1 -0
  11. package/dist/clinician/index.js +5 -0
  12. package/dist/clinician/index.js.map +1 -0
  13. package/dist/compliance/index.d.ts +5 -0
  14. package/dist/compliance/index.d.ts.map +1 -0
  15. package/dist/compliance/index.js +5 -0
  16. package/dist/compliance/index.js.map +1 -0
  17. package/dist/integrations/clinicalTrials/index.d.ts +5 -0
  18. package/dist/integrations/clinicalTrials/index.d.ts.map +1 -0
  19. package/dist/integrations/clinicalTrials/index.js +5 -0
  20. package/dist/integrations/clinicalTrials/index.js.map +1 -0
  21. package/dist/integrations/ehr/index.d.ts +5 -0
  22. package/dist/integrations/ehr/index.d.ts.map +1 -0
  23. package/dist/integrations/ehr/index.js +5 -0
  24. package/dist/integrations/ehr/index.js.map +1 -0
  25. package/dist/integrations/genomics/index.d.ts +5 -0
  26. package/dist/integrations/genomics/index.d.ts.map +1 -0
  27. package/dist/integrations/genomics/index.js +5 -0
  28. package/dist/integrations/genomics/index.js.map +1 -0
  29. package/dist/integrations/index.d.ts +7 -0
  30. package/dist/integrations/index.d.ts.map +1 -0
  31. package/dist/integrations/index.js +10 -0
  32. package/dist/integrations/index.js.map +1 -0
  33. package/dist/ml/index.d.ts +5 -0
  34. package/dist/ml/index.d.ts.map +1 -0
  35. package/dist/ml/index.js +5 -0
  36. package/dist/ml/index.js.map +1 -0
  37. package/dist/ml/outcomePredictor.d.ts +297 -0
  38. package/dist/ml/outcomePredictor.d.ts.map +1 -0
  39. package/dist/ml/outcomePredictor.js +823 -0
  40. package/dist/ml/outcomePredictor.js.map +1 -0
  41. package/dist/patient/index.d.ts +5 -0
  42. package/dist/patient/index.d.ts.map +1 -0
  43. package/dist/patient/index.js +5 -0
  44. package/dist/patient/index.js.map +1 -0
  45. package/dist/patient/patientPortal.d.ts +337 -0
  46. package/dist/patient/patientPortal.d.ts.map +1 -0
  47. package/dist/patient/patientPortal.js +667 -0
  48. package/dist/patient/patientPortal.js.map +1 -0
  49. package/dist/safety/drugInteractions.d.ts +230 -0
  50. package/dist/safety/drugInteractions.d.ts.map +1 -0
  51. package/dist/safety/drugInteractions.js +697 -0
  52. package/dist/safety/drugInteractions.js.map +1 -0
  53. package/dist/safety/index.d.ts +5 -0
  54. package/dist/safety/index.d.ts.map +1 -0
  55. package/dist/safety/index.js +5 -0
  56. package/dist/safety/index.js.map +1 -0
  57. package/dist/validation/index.d.ts +5 -0
  58. package/dist/validation/index.d.ts.map +1 -0
  59. package/dist/validation/index.js +5 -0
  60. package/dist/validation/index.js.map +1 -0
  61. package/dist/validation/retrospectiveValidator.d.ts +246 -0
  62. package/dist/validation/retrospectiveValidator.d.ts.map +1 -0
  63. package/dist/validation/retrospectiveValidator.js +602 -0
  64. package/dist/validation/retrospectiveValidator.js.map +1 -0
  65. package/package.json +1 -1
  66. package/src/bin/cure.ts +331 -140
  67. package/src/clinician/decisionSupport.ts +949 -0
  68. package/src/patient/patientPortal.ts +1039 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/compliance/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EACL,sBAAsB,EACtB,WAAW,EACX,cAAc,EACd,iBAAiB,EACjB,oBAAoB,EACpB,kBAAkB,EAClB,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,KAAK,cAAc,EACnB,KAAK,WAAW,EACjB,MAAM,YAAY,CAAC"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * HIPAA Compliance Module Exports
3
+ */
4
+ export { HIPAAComplianceService, AuditLogger, ConsentManager, EncryptionService, AccessControlManager, DataMaskingService } from './hipaa.js';
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/compliance/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EACL,sBAAsB,EACtB,WAAW,EACX,cAAc,EACd,iBAAiB,EACjB,oBAAoB,EACpB,kBAAkB,EAOnB,MAAM,YAAY,CAAC"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Clinical Trials Integration Module Exports
3
+ */
4
+ export { ClinicalTrialsGovClient, PatientTrialMatcher, type ClinicalTrial, type TrialLocation, type TrialEligibility, type PatientTrialMatch, type TrialSearchCriteria, type ClinicalTrialsConfig } from './clinicalTrialsGov.js';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/integrations/clinicalTrials/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EACL,uBAAuB,EACvB,mBAAmB,EACnB,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EAC1B,MAAM,wBAAwB,CAAC"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Clinical Trials Integration Module Exports
3
+ */
4
+ export { ClinicalTrialsGovClient, PatientTrialMatcher } from './clinicalTrialsGov.js';
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/integrations/clinicalTrials/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EACL,uBAAuB,EACvB,mBAAmB,EAOpB,MAAM,wBAAwB,CAAC"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * EHR Integration Module Exports
3
+ */
4
+ export { FHIRClient, EpicAdapter, CernerAdapter, FHIRPatientSummary, CancerDiagnosis, CancerBiomarkers, TreatmentHistory, type FHIRConfig, type FHIRResource, type FHIRPatient, type FHIRObservation, type FHIRCondition, type FHIRMedicationRequest, type FHIRProcedure, type FHIRDiagnosticReport } from './fhir.js';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/integrations/ehr/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EACL,UAAU,EACV,WAAW,EACX,aAAa,EACb,kBAAkB,EAClB,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,KAAK,UAAU,EACf,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,qBAAqB,EAC1B,KAAK,aAAa,EAClB,KAAK,oBAAoB,EAC1B,MAAM,WAAW,CAAC"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * EHR Integration Module Exports
3
+ */
4
+ export { FHIRClient, EpicAdapter, CernerAdapter, FHIRPatientSummary } from './fhir.js';
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/integrations/ehr/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EACL,UAAU,EACV,WAAW,EACX,aAAa,EACb,kBAAkB,EAYnB,MAAM,WAAW,CAAC"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Genomic Platform Integration Module Exports
3
+ */
4
+ export { FoundationMedicineClient, GuardantHealthClient, TempusClient, UnifiedGenomicsService, type GenomicVariant, type CopyNumberAlteration, type GeneFusion, type GenomicReport, type TherapyMatch, type GenomicPlatformConfig } from './genomicPlatforms.js';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/integrations/genomics/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EACL,wBAAwB,EACxB,oBAAoB,EACpB,YAAY,EACZ,sBAAsB,EACtB,KAAK,cAAc,EACnB,KAAK,oBAAoB,EACzB,KAAK,UAAU,EACf,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,qBAAqB,EAC3B,MAAM,uBAAuB,CAAC"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Genomic Platform Integration Module Exports
3
+ */
4
+ export { FoundationMedicineClient, GuardantHealthClient, TempusClient, UnifiedGenomicsService } from './genomicPlatforms.js';
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/integrations/genomics/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EACL,wBAAwB,EACxB,oBAAoB,EACpB,YAAY,EACZ,sBAAsB,EAOvB,MAAM,uBAAuB,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Integrations Module - All External System Connections
3
+ */
4
+ export * from './ehr/index.js';
5
+ export * from './genomics/index.js';
6
+ export * from './clinicalTrials/index.js';
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/integrations/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,cAAc,gBAAgB,CAAC;AAG/B,cAAc,qBAAqB,CAAC;AAGpC,cAAc,2BAA2B,CAAC"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Integrations Module - All External System Connections
3
+ */
4
+ // EHR Integrations
5
+ export * from './ehr/index.js';
6
+ // Genomic Platform Integrations
7
+ export * from './genomics/index.js';
8
+ // Clinical Trials Integration
9
+ export * from './clinicalTrials/index.js';
10
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/integrations/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,mBAAmB;AACnB,cAAc,gBAAgB,CAAC;AAE/B,gCAAgC;AAChC,cAAc,qBAAqB,CAAC;AAEpC,8BAA8B;AAC9B,cAAc,2BAA2B,CAAC"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Machine Learning Module Exports
3
+ */
4
+ export { OutcomePredictionService, ResponsePredictor, SurvivalPredictor, ToxicityPredictor, ResistancePredictor, TherapyRanker, type PredictionInput, type ResponsePrediction, type SurvivalPrediction, type ToxicityPrediction, type ResistancePrediction, type TherapyRanking, type ModelMetadata, type MLConfig } from './outcomePredictor.js';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ml/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EACL,wBAAwB,EACxB,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,mBAAmB,EACnB,aAAa,EACb,KAAK,eAAe,EACpB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EACzB,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,QAAQ,EACd,MAAM,uBAAuB,CAAC"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Machine Learning Module Exports
3
+ */
4
+ export { OutcomePredictionService, ResponsePredictor, SurvivalPredictor, ToxicityPredictor, ResistancePredictor, TherapyRanker } from './outcomePredictor.js';
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/ml/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EACL,wBAAwB,EACxB,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,mBAAmB,EACnB,aAAa,EASd,MAAM,uBAAuB,CAAC"}
@@ -0,0 +1,297 @@
1
+ /**
2
+ * Machine Learning Outcome Prediction Infrastructure
3
+ *
4
+ * Provides ML-based prediction models for:
5
+ * - Treatment response prediction
6
+ * - Survival probability estimation
7
+ * - Toxicity risk assessment
8
+ * - Resistance prediction
9
+ * - Optimal therapy selection
10
+ *
11
+ * This module provides the infrastructure for training and deploying
12
+ * ML models. In production, models would be trained on real patient cohorts
13
+ * with proper validation and FDA clearance.
14
+ */
15
+ import { EventEmitter } from 'events';
16
+ export interface PatientFeatures {
17
+ age: number;
18
+ gender: 'male' | 'female';
19
+ ethnicity?: string;
20
+ bmi?: number;
21
+ cancerType: string;
22
+ histology?: string;
23
+ stage: 'I' | 'II' | 'III' | 'IV' | 'IA' | 'IB' | 'IIA' | 'IIB' | 'IIIA' | 'IIIB' | 'IIIC' | 'IVA' | 'IVB';
24
+ grade?: 1 | 2 | 3;
25
+ tumorSize?: number;
26
+ lymphNodeInvolvement?: number;
27
+ metastaticSites?: string[];
28
+ ecogStatus: 0 | 1 | 2 | 3 | 4;
29
+ genomicAlterations: {
30
+ gene: string;
31
+ alteration: string;
32
+ type: 'mutation' | 'amplification' | 'deletion' | 'fusion';
33
+ vaf?: number;
34
+ }[];
35
+ pdl1Score?: number;
36
+ pdl1ScoreType?: 'TPS' | 'CPS' | 'IC';
37
+ msiStatus?: 'MSI-H' | 'MSI-L' | 'MSS';
38
+ tmbValue?: number;
39
+ tmbStatus?: 'high' | 'low';
40
+ hrdScore?: number;
41
+ hrdStatus?: 'positive' | 'negative';
42
+ brcaStatus?: 'BRCA1' | 'BRCA2' | 'wild-type';
43
+ ldh?: number;
44
+ albumin?: number;
45
+ hemoglobin?: number;
46
+ neutrophils?: number;
47
+ lymphocytes?: number;
48
+ platelets?: number;
49
+ creatinine?: number;
50
+ bilirubin?: number;
51
+ alkalinePhosphatase?: number;
52
+ priorLines?: number;
53
+ priorTherapies?: string[];
54
+ priorResponse?: 'CR' | 'PR' | 'SD' | 'PD';
55
+ treatmentFreeInterval?: number;
56
+ comorbidityIndex?: number;
57
+ organFunction?: {
58
+ cardiac?: 'normal' | 'impaired';
59
+ hepatic?: 'normal' | 'impaired';
60
+ renal?: 'normal' | 'impaired';
61
+ pulmonary?: 'normal' | 'impaired';
62
+ };
63
+ }
64
+ export interface TreatmentFeatures {
65
+ regimen: string;
66
+ drugs: string[];
67
+ treatmentType: 'chemotherapy' | 'immunotherapy' | 'targeted' | 'combination' | 'radiation' | 'surgery' | 'car-t';
68
+ setting: 'neoadjuvant' | 'adjuvant' | 'first-line' | 'second-line' | 'third-line-plus' | 'maintenance';
69
+ dosing?: 'standard' | 'reduced' | 'dose-dense';
70
+ schedule?: string;
71
+ }
72
+ export interface ResponsePrediction {
73
+ predictedResponse: 'CR' | 'PR' | 'SD' | 'PD';
74
+ probabilities: {
75
+ completeResponse: number;
76
+ partialResponse: number;
77
+ stableDisease: number;
78
+ progressiveDisease: number;
79
+ };
80
+ confidence: number;
81
+ objectiveResponseRate: number;
82
+ diseaseControlRate: number;
83
+ timeToResponse?: {
84
+ median: number;
85
+ range: [number, number];
86
+ };
87
+ }
88
+ export interface SurvivalPrediction {
89
+ pfs: {
90
+ median: number;
91
+ sixMonth: number;
92
+ twelveMonth: number;
93
+ twentyFourMonth: number;
94
+ confidence: number;
95
+ hazardRatio?: number;
96
+ };
97
+ os: {
98
+ median: number;
99
+ twelveMonth: number;
100
+ twentyFourMonth: number;
101
+ fiveYear: number;
102
+ confidence: number;
103
+ hazardRatio?: number;
104
+ };
105
+ riskGroup: 'low' | 'intermediate-low' | 'intermediate-high' | 'high';
106
+ riskScore: number;
107
+ }
108
+ export interface ToxicityPrediction {
109
+ overallRisk: 'low' | 'moderate' | 'high';
110
+ grade3PlusRisk: number;
111
+ specificRisks: {
112
+ toxicity: string;
113
+ grade: 1 | 2 | 3 | 4 | 5;
114
+ probability: number;
115
+ timeToOnset?: {
116
+ median: number;
117
+ unit: 'days' | 'weeks' | 'cycles';
118
+ };
119
+ reversible: boolean;
120
+ management?: string;
121
+ }[];
122
+ iraeRisk?: {
123
+ any: number;
124
+ grade3Plus: number;
125
+ specificOrgans: {
126
+ organ: string;
127
+ risk: number;
128
+ }[];
129
+ };
130
+ doseModification?: {
131
+ recommended: boolean;
132
+ reduction: number;
133
+ reason: string;
134
+ };
135
+ }
136
+ export interface ResistancePrediction {
137
+ intrinsicResistanceRisk: number;
138
+ acquiredResistanceRisk: number;
139
+ predictedMechanisms: {
140
+ mechanism: string;
141
+ probability: number;
142
+ monitoringBiomarker?: string;
143
+ }[];
144
+ timeToResistance?: {
145
+ median: number;
146
+ range: [number, number];
147
+ };
148
+ nextLineOptions: {
149
+ therapy: string;
150
+ rationale: string;
151
+ expectedBenefit: number;
152
+ }[];
153
+ }
154
+ export interface TherapyRanking {
155
+ therapies: {
156
+ regimen: string;
157
+ drugs: string[];
158
+ rank: number;
159
+ predictions: {
160
+ responseRate: number;
161
+ pfsSurvival: number;
162
+ osSurvival: number;
163
+ toxicityRisk: number;
164
+ qualityOfLifeScore: number;
165
+ };
166
+ overallScore: number;
167
+ confidence: number;
168
+ matchingBiomarkers: string[];
169
+ fdaApproved: boolean;
170
+ nccnRecommended: boolean;
171
+ considerations: string[];
172
+ contraindications?: string[];
173
+ }[];
174
+ bestChoice: {
175
+ regimen: string;
176
+ rationale: string[];
177
+ };
178
+ }
179
+ export interface MLModel {
180
+ id: string;
181
+ name: string;
182
+ version: string;
183
+ type: 'classification' | 'regression' | 'survival' | 'ranking';
184
+ target: 'response' | 'pfs' | 'os' | 'toxicity' | 'resistance';
185
+ cancerTypes: string[];
186
+ performance: {
187
+ auc?: number;
188
+ accuracy?: number;
189
+ sensitivity?: number;
190
+ specificity?: number;
191
+ cIndex?: number;
192
+ calibration?: number;
193
+ brier?: number;
194
+ };
195
+ validation: {
196
+ method: 'cross-validation' | 'temporal' | 'external' | 'prospective';
197
+ cohortSize: number;
198
+ testSetSize: number;
199
+ validationDate: Date;
200
+ };
201
+ features: string[];
202
+ importantFeatures: {
203
+ feature: string;
204
+ importance: number;
205
+ }[];
206
+ status: 'development' | 'validation' | 'clinical-use' | 'deprecated';
207
+ regulatoryStatus?: 'not-submitted' | 'pending' | 'cleared' | '510k' | 'de-novo';
208
+ }
209
+ export interface ModelRegistry {
210
+ models: MLModel[];
211
+ getModel(id: string): MLModel | undefined;
212
+ getBestModel(target: MLModel['target'], cancerType: string): MLModel | undefined;
213
+ registerModel(model: MLModel): void;
214
+ }
215
+ export declare class OutcomePredictorService extends EventEmitter {
216
+ private modelRegistry;
217
+ private featureEncoders;
218
+ private predictionCache;
219
+ private cacheDuration;
220
+ constructor();
221
+ /**
222
+ * Predict treatment response
223
+ */
224
+ predictResponse(patient: PatientFeatures, treatment: TreatmentFeatures): Promise<ResponsePrediction>;
225
+ /**
226
+ * Predict survival outcomes
227
+ */
228
+ predictSurvival(patient: PatientFeatures, treatment: TreatmentFeatures): Promise<SurvivalPrediction>;
229
+ /**
230
+ * Predict toxicity risk
231
+ */
232
+ predictToxicity(patient: PatientFeatures, treatment: TreatmentFeatures): Promise<ToxicityPrediction>;
233
+ /**
234
+ * Predict resistance development
235
+ */
236
+ predictResistance(patient: PatientFeatures, treatment: TreatmentFeatures): Promise<ResistancePrediction>;
237
+ /**
238
+ * Rank treatment options
239
+ */
240
+ rankTherapies(patient: PatientFeatures, treatmentOptions: TreatmentFeatures[], preferences?: {
241
+ prioritizeEfficacy?: boolean;
242
+ prioritizeToxicity?: boolean;
243
+ prioritizeQoL?: boolean;
244
+ }): Promise<TherapyRanking>;
245
+ /**
246
+ * Get comprehensive prediction report
247
+ */
248
+ getComprehensivePrediction(patient: PatientFeatures, treatment: TreatmentFeatures): Promise<{
249
+ response: ResponsePrediction;
250
+ survival: SurvivalPrediction;
251
+ toxicity: ToxicityPrediction;
252
+ resistance: ResistancePrediction;
253
+ overallAssessment: {
254
+ recommendation: 'strongly-recommended' | 'recommended' | 'consider' | 'caution' | 'not-recommended';
255
+ rationale: string[];
256
+ caveats: string[];
257
+ alternativeOptions: string[];
258
+ };
259
+ }>;
260
+ private computeResponsePrediction;
261
+ private computeSurvivalPrediction;
262
+ private computeToxicityPrediction;
263
+ private computeResistancePrediction;
264
+ private initializeDefaultModels;
265
+ private initializeFeatureEncoders;
266
+ private encodeFeatures;
267
+ private getBestModel;
268
+ private hasBiomarkerMatch;
269
+ private hasImmunotherapyDrug;
270
+ private getDrugToxicityProfiles;
271
+ private getResistanceMechanisms;
272
+ private getNextLineOptions;
273
+ private estimateQoLScore;
274
+ private getMatchingBiomarkers;
275
+ private isBiomarkerRelevant;
276
+ private checkFDAApproval;
277
+ private checkNCCNRecommendation;
278
+ private getConsiderations;
279
+ private generateOverallAssessment;
280
+ private getCacheKey;
281
+ private getFromCache;
282
+ private setCache;
283
+ /**
284
+ * Register a new model
285
+ */
286
+ registerModel(model: MLModel): void;
287
+ /**
288
+ * Get model performance metrics
289
+ */
290
+ getModelMetrics(modelId: string): MLModel['performance'] | undefined;
291
+ /**
292
+ * List all available models
293
+ */
294
+ listModels(): MLModel[];
295
+ }
296
+ export default OutcomePredictorService;
297
+ //# sourceMappingURL=outcomePredictor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"outcomePredictor.d.ts","sourceRoot":"","sources":["../../src/ml/outcomePredictor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAOtC,MAAM,WAAW,eAAe;IAE9B,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,GAAG,QAAQ,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,GAAG,CAAC,EAAE,MAAM,CAAC;IAGb,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,GAAG,GAAG,IAAI,GAAG,KAAK,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,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