| """Mock data for PoC UI demonstration. |
| |
| Provides realistic sample PatientProfile, TrialCandidates, and EligibilityLedgers |
| so the UI is fully demonstrable without real MedGemma/Gemini/MCP calls. |
| |
| NOTE: NCT IDs use a MOCK-NCT prefix to clearly indicate synthetic data. |
| Real trial names are used for demo realism, but the IDs are not real |
| ClinicalTrials.gov identifiers. |
| """ |
|
|
| from __future__ import annotations |
|
|
| from trialpath.models import ( |
| Biomarker, |
| CriterionAssessment, |
| CriterionDecision, |
| Demographics, |
| Diagnosis, |
| EligibilityLedger, |
| EvidencePointer, |
| GapItem, |
| OverallAssessment, |
| PatientProfile, |
| PerformanceStatus, |
| SourceDocument, |
| Treatment, |
| TrialCandidate, |
| TrialEvidencePointer, |
| UnknownField, |
| ) |
|
|
| |
| |
| |
| _CLINIC_LETTER = SourceDocument( |
| doc_id="clinic_letter_2026-01.pdf", |
| type="clinic_letter", |
| meta={"author": "Dr. Mueller", "date": "2026-01-15"}, |
| ) |
| _PATHOLOGY_REPORT = SourceDocument( |
| doc_id="pathology_2025-11.pdf", |
| type="pathology", |
| meta={"lab": "Charite Berlin", "date": "2025-11-20"}, |
| ) |
| _LAB_RESULTS = SourceDocument( |
| doc_id="labs_2026-01.pdf", |
| type="lab", |
| meta={"date": "2026-01-28"}, |
| ) |
|
|
| |
| |
| |
| MOCK_PATIENT_PROFILE = PatientProfile( |
| patient_id="MOCK-P001", |
| source_docs=[_CLINIC_LETTER, _PATHOLOGY_REPORT, _LAB_RESULTS], |
| demographics=Demographics(age=62, sex="Female"), |
| diagnosis=Diagnosis( |
| primary_condition="Non-Small Cell Lung Cancer", |
| histology="adenocarcinoma", |
| stage="IIIB", |
| ), |
| performance_status=PerformanceStatus( |
| scale="ECOG", |
| value=1, |
| evidence=[EvidencePointer(doc_id="clinic_letter_2026-01.pdf", page=1)], |
| ), |
| biomarkers=[ |
| Biomarker( |
| name="EGFR", |
| result="Exon 19 deletion", |
| evidence=[ |
| EvidencePointer(doc_id="pathology_2025-11.pdf", page=2, span_id="egfr_exon19") |
| ], |
| ), |
| Biomarker( |
| name="ALK", |
| result="Negative", |
| evidence=[EvidencePointer(doc_id="pathology_2025-11.pdf", page=2, span_id="alk_neg")], |
| ), |
| Biomarker( |
| name="PD-L1", |
| result="45%", |
| evidence=[EvidencePointer(doc_id="pathology_2025-11.pdf", page=3, span_id="pdl1_45")], |
| ), |
| ], |
| treatments=[ |
| Treatment(drug_name="Carboplatin", line=1), |
| Treatment(drug_name="Pemetrexed", line=1), |
| ], |
| unknowns=[ |
| UnknownField(field="KRAS", reason="Not in records", importance="high"), |
| UnknownField(field="Brain MRI", reason="Not available", importance="medium"), |
| ], |
| ) |
|
|
| |
| |
| |
| MOCK_TRIAL_CANDIDATES = [ |
| TrialCandidate( |
| nct_id="MOCK-NCT-KEYNOTE999", |
| title="KEYNOTE-999: Pembrolizumab + Chemo for NSCLC", |
| conditions=["NSCLC"], |
| phase="Phase 3", |
| status="Recruiting", |
| fingerprint_text="Pembrolizumab combination therapy advanced NSCLC", |
| ), |
| TrialCandidate( |
| nct_id="MOCK-NCT-FLAURA2", |
| title="FLAURA-2: Osimertinib + Chemo in EGFR-mutated NSCLC", |
| conditions=["NSCLC", "EGFR mutation"], |
| phase="Phase 3", |
| status="Recruiting", |
| fingerprint_text="Osimertinib first-line EGFR mutated advanced NSCLC", |
| ), |
| TrialCandidate( |
| nct_id="MOCK-NCT-CM817", |
| title="CheckMate-817: Nivolumab + Ipilimumab in Advanced NSCLC", |
| conditions=["NSCLC"], |
| phase="Phase 3", |
| status="Recruiting", |
| fingerprint_text="Nivolumab ipilimumab combination immunotherapy NSCLC", |
| ), |
| ] |
|
|
| |
| |
| |
|
|
| |
| _KEYNOTE_CRITERIA = [ |
| CriterionAssessment( |
| criterion_id="inc_1", |
| type="inclusion", |
| text="Confirmed NSCLC diagnosis", |
| decision=CriterionDecision.MET, |
| patient_evidence=[ |
| EvidencePointer(doc_id="pathology_2025-11.pdf", page=1, span_id="dx_nsclc"), |
| ], |
| trial_evidence=[ |
| TrialEvidencePointer(field="eligibility_text.inclusion", offset_start=0, offset_end=42), |
| ], |
| ), |
| CriterionAssessment( |
| criterion_id="inc_2", |
| type="inclusion", |
| text="ECOG performance status 0-1", |
| decision=CriterionDecision.MET, |
| patient_evidence=[ |
| EvidencePointer(doc_id="clinic_letter_2026-01.pdf", page=1, span_id="ecog_1"), |
| ], |
| trial_evidence=[ |
| TrialEvidencePointer( |
| field="eligibility_text.inclusion", offset_start=43, offset_end=89 |
| ), |
| ], |
| ), |
| CriterionAssessment( |
| criterion_id="inc_3", |
| type="inclusion", |
| text="PD-L1 TPS >= 50%", |
| decision=CriterionDecision.NOT_MET, |
| patient_evidence=[ |
| EvidencePointer(doc_id="pathology_2025-11.pdf", page=3, span_id="pdl1_45"), |
| ], |
| trial_evidence=[ |
| TrialEvidencePointer( |
| field="eligibility_text.inclusion", offset_start=90, offset_end=130 |
| ), |
| ], |
| ), |
| CriterionAssessment( |
| criterion_id="exc_1", |
| type="exclusion", |
| text="No active brain metastases", |
| decision=CriterionDecision.UNKNOWN, |
| ), |
| ] |
|
|
| |
| _FLAURA_CRITERIA = [ |
| CriterionAssessment( |
| criterion_id="inc_1", |
| type="inclusion", |
| text="Confirmed NSCLC with EGFR mutation", |
| decision=CriterionDecision.MET, |
| patient_evidence=[ |
| EvidencePointer(doc_id="pathology_2025-11.pdf", page=2, span_id="egfr_exon19"), |
| ], |
| trial_evidence=[ |
| TrialEvidencePointer(field="eligibility_text.inclusion", offset_start=0, offset_end=54), |
| ], |
| ), |
| CriterionAssessment( |
| criterion_id="inc_2", |
| type="inclusion", |
| text="ECOG 0-1", |
| decision=CriterionDecision.MET, |
| patient_evidence=[ |
| EvidencePointer(doc_id="clinic_letter_2026-01.pdf", page=1, span_id="ecog_1"), |
| ], |
| trial_evidence=[ |
| TrialEvidencePointer( |
| field="eligibility_text.inclusion", offset_start=55, offset_end=78 |
| ), |
| ], |
| ), |
| CriterionAssessment( |
| criterion_id="inc_3", |
| type="inclusion", |
| text="Locally advanced or metastatic", |
| decision=CriterionDecision.MET, |
| patient_evidence=[ |
| EvidencePointer(doc_id="clinic_letter_2026-01.pdf", page=1, span_id="stage_iiib"), |
| ], |
| trial_evidence=[ |
| TrialEvidencePointer( |
| field="eligibility_text.inclusion", offset_start=79, offset_end=125 |
| ), |
| ], |
| ), |
| ] |
|
|
| |
| _CM817_CRITERIA = [ |
| CriterionAssessment( |
| criterion_id="inc_1", |
| type="inclusion", |
| text="Stage IV NSCLC", |
| decision=CriterionDecision.NOT_MET, |
| patient_evidence=[ |
| EvidencePointer(doc_id="clinic_letter_2026-01.pdf", page=1, span_id="stage_iiib"), |
| ], |
| trial_evidence=[ |
| TrialEvidencePointer(field="eligibility_text.inclusion", offset_start=0, offset_end=35), |
| ], |
| ), |
| CriterionAssessment( |
| criterion_id="inc_2", |
| type="inclusion", |
| text="No prior immunotherapy", |
| decision=CriterionDecision.UNKNOWN, |
| ), |
| ] |
|
|
| MOCK_ELIGIBILITY_LEDGERS = [ |
| EligibilityLedger( |
| patient_id="MOCK-P001", |
| nct_id="MOCK-NCT-KEYNOTE999", |
| overall_assessment=OverallAssessment.UNCERTAIN, |
| criteria=_KEYNOTE_CRITERIA, |
| gaps=[ |
| GapItem( |
| description="Brain MRI results needed", |
| recommended_action="Upload brain MRI report", |
| clinical_importance="high", |
| ), |
| ], |
| ), |
| EligibilityLedger( |
| patient_id="MOCK-P001", |
| nct_id="MOCK-NCT-FLAURA2", |
| overall_assessment=OverallAssessment.LIKELY_ELIGIBLE, |
| criteria=_FLAURA_CRITERIA, |
| gaps=[], |
| ), |
| EligibilityLedger( |
| patient_id="MOCK-P001", |
| nct_id="MOCK-NCT-CM817", |
| overall_assessment=OverallAssessment.LIKELY_INELIGIBLE, |
| criteria=_CM817_CRITERIA, |
| gaps=[ |
| GapItem( |
| description="KRAS mutation status unknown", |
| recommended_action="Request KRAS test from oncologist", |
| clinical_importance="medium", |
| ), |
| ], |
| ), |
| ] |
|
|