🧬 OracleMK1: The Clinical Simulation Sandbox
💡 Inspiration
In oncology, the difference between a life-saving therapy and a catastrophic mistake can hinge on a handful of genomic markers. A single wrong treatment decision can cost a patient not only months of physical suffering, but also tens of thousands of dollars in ineffective or toxic therapy. When a treatment cycle costs $15,000 or more, “probably correct” is not reassuring enough. Doctors carry the burden of making these decisions under extreme uncertainty balancing incomplete data, rapidly evolving research, patient history, genomic mutations, drug interactions, and time itself. Even the best clinicians are forced to navigate probabilities. Today’s AI can generate reports, summarize papers, and imitate expertise. But oncology is not a language problem. It is a biological one. OracleMK1 was built on a simple belief: physicians should not have to rely solely on intuition and statistical averages when lives and financial ruin are both on the line. Oracle wins where LLMs do not even come close.
Instead of producing probabilistic “vibes,” OracleMK1 transforms clinical and genomic data into evidence-grounded simulation — giving doctors a computational layer of validation before irreversible treatment decisions are made.
The goal is not to replace physicians.
The goal is to strengthen them with mathematically auditable clinical reasoning.
🛠️ How We Built It
We built OracleMK1 as a high-performance Model Context Protocol (MCP) server designed to bridge clinical reasoning with raw FHIR data.
- Deterministic Scoring Engine: A custom Python-based engine (
scoring.py) executes deterministic clinical logic instead of probabilistic text generation. - FHIR-Native Pipeline: Integrated with the SMART/SHARP-on-FHIR protocol stack to securely ingest US Core 6.1.0 FHIR R4 bundles grounded in real patient observations and lab data.
- Cost-Based Triage Gate: OracleMK1 autonomously decides whether to bypass, simulate, or escalate a prescription based on financial exposure and clinical risk.
- Explainable AI (XAI): Every “Success Probability” score includes factor attribution, genomic rationale, and peer-reviewed clinical evidence references.
📐 The Simulation Logic
Our core algorithm calculates the Success Probability (P_{success}) using a weighted multi-factor model:
$$ P_{success} = \sum_{i=1}^{n} (w_i \cdot s_i) $$
Where:
- (w_i) represents the clinical weight (e.g. 35% for Genomics, 25% for Pharmacokinetics).
- (s_i) represents the normalized score ((0.0 - 1.0)) derived from FHIR observations.
For example, the genomic score is calculated using the T790M mutation ratio:
$$ s_{gen} = \frac{\text{Ratio}{T790M}}{\text{Threshold}{opt}} $$
🧠 What We Learned
FHIR Is Unforgiving: Supporting US Core 6.1.0 taught us that healthcare systems require near-zero tolerance for schema inconsistency and validation errors.
Deterministic > Probabilistic: Clinical systems become significantly more trustworthy when constrained by mathematical reasoning instead of unconstrained language generation.
Healthcare Is Financial: Adding the “Waste Prevented” metric transformed OracleMK1 from a technical demo into a financially actionable clinical tool.
🚧 Challenges We Faced
- FHIR Context Negotiation: Getting the platform to recognize our
fhirContextextension required multiple schema and parameter-mapping iterations. - HL7 Compliance: Strict validation around URN UUIDs, transaction bundles, and mandatory observation categories caused repeated debugging cycles.
- Clinical-to-Math Translation: Converting qualitative clinical observations into normalized numerical weights without losing biological nuance was a major challenge.
🔮 Future Prospects
- Multi-Drug Expansion: Integrating OpenFDA and DrugBank APIs for broader contraindication and toxicity simulation.
- Pharmacogenomics (PGx): Expanding dosage simulations using CPIC-guided variants like CYP2D6 and TPMT.
- Real-Time Financial Modeling: Connecting PBM and pricing systems to simulate co-pay burden and pharmaceutical waste alongside efficacy.
🚀 The Result
OracleMK1 successfully simulated treatment outcomes for our test cohort, identifying a high-risk patient with a 29.6% success probability, preventing approximately $12,400 in pharmaceutical waste, and autonomously rerouting the oncologist toward a safer and more effective therapy pathway.
More importantly, the project demonstrated that deterministic simulation frameworks can augment clinical decision-making in ways purely generative AI systems cannot.
Log in or sign up for Devpost to join the conversation.