Skip to main content

Oncology Record Ingestion Status

To: Sumeet
From: Technical Assessment
Re: Distance from ingesting synthetic oncology record into FHIR and displaying in Lyfe
Date: December 2024

Executive Answer

We are 2-4 weeks away from a basic demo of ingesting one synthetic oncology record into FHIR and displaying it in Lyfe, but 3-4 months away from a production-ready system that could handle real oncology data reliably.

Current Capabilities

✅ What Works Today

  1. Document Upload & Processing

    User uploads PDF → AI extracts data → Stores in database
    • Can accept oncology reports (PDF/image)
    • AI extracts basic patient information
    • Stores extracted data in Supabase
  2. FHIR Structure Understanding

    • System knows FHIR Patient, Condition, Observation resources
    • Can create basic FHIR bundles
    • Proper resource references
  3. UI Display

    • Patient demographics display
    • Conditions list
    • Medications view
    • Timeline visualization

❌ What's Missing for Oncology

  1. Oncology-Specific FHIR Profiles

    • No mCODE (minimal Common Oncology Data Elements) implementation
    • Missing cancer-specific resources (TNM staging, biomarkers)
    • No genomic data handling
  2. Oncology Data Extraction

    • AI not trained on oncology reports
    • Can't extract: staging, grade, histology, biomarkers
    • No ICD-O-3 coding support
  3. Clinical Display Requirements

    • No tumor board view
    • Missing treatment timeline
    • No chemotherapy regimen display
    • No imaging integration

Path to Demo (2-4 weeks)

Week 1: Oncology FHIR Mapping

// Define oncology-specific extraction
interface OncologyExtraction {
diagnosis: {
primarySite: string; // e.g., "Lung"
histology: string; // e.g., "Adenocarcinoma"
stage: {
clinical: string; // e.g., "cT2N1M0"
pathologic?: string; // e.g., "pT2N1M0"
};
grade?: string; // e.g., "G2"
};
biomarkers?: {
name: string; // e.g., "EGFR"
result: string; // e.g., "Positive"
value?: string; // e.g., "L858R mutation"
}[];
treatments: {
type: string; // "Chemotherapy", "Radiation", etc.
regimen?: string; // e.g., "FOLFOX"
startDate: string;
endDate?: string;
}[];
}

Week 2: Enhance AI Extraction

// Update AI prompt for oncology
const oncologyPrompt = `
Extract oncology-specific information:
1. Cancer type and primary site
2. TNM staging (clinical and pathologic)
3. Histologic type and grade
4. Biomarkers (EGFR, ALK, PD-L1, etc.)
5. Treatment history (chemo regimens, radiation, surgery)
6. Performance status (ECOG/Karnofsky)
7. Key dates (diagnosis, treatments, progression)
`;

Week 3: Create Oncology Display

// New oncology patient view components
<OncologyDashboard patient={patient}>
<CancerSummary />
<TreatmentTimeline />
<BiomarkerPanel />
<StagingDisplay />
<ImagingResults />
</OncologyDashboard>

Week 4: Demo Preparation

  • Create synthetic oncology record
  • Test ingestion pipeline
  • Verify FHIR compliance
  • Polish UI display
  • Record demo video

Path to Production (3-4 months)

Month 1: mCODE Implementation

  • Implement full mCODE 3.0 specification
  • Add all oncology-specific FHIR profiles
  • Validate against mCODE validators
  • Test with real-world data samples

Month 2: AI Training & Validation

  • Fine-tune AI on oncology reports
  • Add specialized extractors for:
    • Pathology reports
    • Radiology reports
    • Molecular/genetic reports
    • Treatment summaries
  • Clinical validation with oncologists

Month 3: Clinical Features

  • Tumor board preparation tools
  • Treatment planning support
  • Clinical trial matching (basic)
  • Outcomes tracking
  • Quality measure reporting

Month 4: Integration & Testing

  • EHR integration for oncology
  • Lab system connections
  • Imaging system integration
  • End-to-end testing
  • Security audit

Specific Gaps for Demo

Technical Requirements

// Current: Generic extraction
const data = await extractPatientData(document);

// Needed: Oncology-specific
const oncologyData = await extractOncologyData(document, {
documentType: 'pathology-report',
extractors: ['tnm-staging', 'biomarkers', 'histology'],
terminology: 'snomed-ct'
});

FHIR Mapping Gaps

// Current: Basic Condition
{
resourceType: "Condition",
code: { text: "Cancer" }
}

// Needed: mCODE-compliant
{
resourceType: "Condition",
meta: {
profile: ["http://hl7.org/fhir/us/mcode/StructureDefinition/mcode-primary-cancer-condition"]
},
category: [{
coding: [{
system: "http://snomed.info/sct",
code: "64572001"
}]
}],
code: {
coding: [{
system: "http://snomed.info/sct",
code: "254637007", // NSCLC
display: "Non-small cell lung cancer"
}]
},
bodySite: [{
coding: [{
system: "http://snomed.info/sct",
code: "39607008",
display: "Lung"
}]
}],
stage: [{
summary: {
coding: [{
system: "http://cancerstaging.org",
code: "3A",
display: "Stage IIIA"
}]
},
type: {
coding: [{
system: "http://loinc.org",
code: "21908-9",
display: "Stage group.clinical"
}]
}
}]
}

Risk Assessment

Demo Risks (Low-Medium)

  • AI might miss complex staging information
  • Manual cleanup required after extraction
  • Limited to common cancer types
  • Basic display only

Production Risks (High)

  • No clinical validation
  • Missing critical safety checks
  • No integration with oncology systems
  • Compliance gaps (HIPAA, clinical standards)

Recommendation

For Demo (2-4 weeks)

  1. Use simplified synthetic oncology record
  2. Focus on lung or breast cancer (well-documented)
  3. Manual verification of extracted data
  4. Basic FHIR structure only
  5. Simple UI display

For Real Usage (3-4 months)

  1. Partner with oncology institution
  2. Implement full mCODE specification
  3. Clinical validation process
  4. Integration with oncology EMRs
  5. Compliance certification

Bottom Line

For Sumeet's Question: We can demonstrate basic ingestion of a synthetic oncology record within 2-4 weeks, but this would be a proof-of-concept only. A production-ready system that could safely handle real oncology data requires 3-4 months of dedicated development with clinical input.

Key Decision: Is the goal to show technical feasibility (2-4 weeks) or build a clinically viable system (3-4 months)?