medOS ultra

The Hospital Data Advantage

Turning the outcome corpus + document intelligence into the moat under the decision twin, with governance and backtest-before-trust.

9 min read diagramsUpdated 2026-06-04docs/architecture/twin-data-advantage.md

Status: Product + architecture (2026-06-05). The strategic case + design for turning two data assets the hospital already owns — 10M+ patient outcome histories and the hospital’s own documents — into the moat under the HORUS Decision Twin.

Read with: hospital-decision-twin.md (the twin), ai-training-corpus.md (the de-identified medallion corpus + llm_corpora/embeddings), operational-facts-erp-hrm-activation.md (the connector/activation pattern), data-activation-twin-go-live-master.md (the activation→twin path).


0. The thesis (one paragraph)

AI made every vendor fast, so speed is no longer a differentiator — the advantage is deciding the right thing, grounded in your data. Two assets the hospital already owns make our Decision Twin defensible and hard to copy: (1) an Outcome Corpus of 10M+ full patient histories that calibrates the twin’s simulation on real outcomes instead of textbook parametric assumptions; and (2) Document Intelligence — the hospital’s own spreadsheets, policies, and conference/rounding/committee notes, activated into a private, de-identified corpus + RAG that grounds every recommendation and answer in the hospital’s actual context. Structured connectors (ERP/HIS/lab — see operational-facts) tell the twin what happened; these two assets tell it what’s likely to happen and why decisions were made. Same governance throughout: de-identified, in-region, recommender-mode, human sign-off.


1. Two data advantages, one twin

   STRUCTURED                    OUTCOME CORPUS                 DOCUMENT INTELLIGENCE
   connectors (live)             10M+ histories                xlsx / docx / pdf / pptx
   ERP·HIS·lab·claims            (clinical truth)              conference·rounding·minutes·SOPs·registries
        │                              │                              │
   "what happened"            "what's likely to happen"        "why it was decided + the context"
        │                              │                              │
        └──────────► de-identified statistical artifacts + RAG corpus ◄──────────┘
                                       │
                          twin_metric_* registry + readers boundary + RAG retriever
                                       │
                            HORUS Decision Twin  +  Clinical Assistant (Ask HORUS)
                                       │
                              recommend → 4-role human sign-off → act
  • Pillar 1 — Outcome Corpus (§2): the 10M histories calibrate the simulation.
  • Pillar 2 — Document Intelligence (§3): the documents ground the reasoning (RAG) and fill the structured gaps (spreadsheet extraction).
  • Neither pillar ever feeds raw PHI to the twin — both derive de-identified artifacts the twin consumes through the existing readers boundary (§4).

2. Pillar 1 — Outcome Corpus (10M histories calibrate the twin)

Today the twin runs on a handful of fitted scalars + parametric assumptions (demand = Poisson arrivals, capacity = lognormal LOS, the rest projections off hardcoded ratios like workforce.nurseRatio: 0.5). 10M outcome-labeled histories replace assumptions with empirical, conditional, patient-level reality.

# Use Feeds Unlock
1 Empirical conditional distributions — LOS / arrivals sampled from history conditioned on (service line, DRG, age, comorbidity index, payer, season) capacity/demand agents (replaces lognormal/Poisson) The DES draws from what actually happens, per cohort
2 Patient-mix microsimulation — a realistic synthetic admitted population sampled from the 10M; each synthetic patient carries acuity, risk, pathway, cost every agent at once Real case-mix flows through the hospital; agents stop being flat ratios
3 Risk models as agent behaviors — readmission / complication / deterioration / LOS / cost models quality + reimbursement Outcomes predicted from real risk, conditioned on the initiative
4 Demand & epidemiology forecasting — prevalence/incidence + chronic-disease progression in the catchment demand Strategic reasoning (“a diabetes program → this future demand”)
5 Care-pathway mining (process mining) — the actual pathways, variants, durations, bottlenecks from event logs the flow graph Grounds simulated flow in reality; surfaces the real bottleneck
6 Counterfactual effect estimation — comparable past cohorts / natural experiments (matching, diff-in-diff) the Monte-Carlo P10/P50/P90 Evidence-grounded bands, not sim noise
7 Backtesting / validation — replay a held-out period; does the twin reproduce actual LOS/occupancy/readmit? trust itself A twin that reproduces history earns the human sign-off

Highest leverage: #1 (cheap, low-governance, huge realism gain) and #7 (converts “interesting sim” → “decision-makers trust it”). Integration: derive de-identified distribution tables + model coefficients into the twin_metric_* registry (extend it to return distributions, not just scalars); the DES samples them. Derivation pipeline = the ai-training-corpus medallion (Bronze operational → Silver de-identified trajectories → Gold feature/training sets).


3. Pillar 2 — Document Intelligence (activate the hospital’s documents)

The question: does the system ingest xlsx / docx / pdf / all hospital docs? Today: partial substrate — filestore (IPFS) + upload widgets + xlsx export/import panels + the ai-training-corpus medallion (llm_corpora → embeddings) + HORUS “Ask HORUS” document-RAG. Missing: a unified Document Activation pipeline. This pillar is that pipeline — and it’s a genuinely distinct (“unique”) path, because the structured EHR captures events, while these documents capture decisions, context, and tacit knowledge that never enter a coded field.

3.1 The unique paths (sources)

Source Format What it carries the EHR doesn’t
M&M / tumor board / grand rounds docx/pptx/pdf/notes Why a case went wrong; the agreed process change
Ward rounding notes notes/voice/docx The plan, the barriers to discharge, the rationale
Committee minutes (P&T, infection control, quality, M&M) docx/pdf Formulary changes, targets set, policy decisions
Policies / SOPs / clinical guidelines docx/pdf The rules the hospital actually runs by
Registries / rosters / cost sheets xlsx/csv Semi-structured facts not in the EHR (quality metrics, rates, staffing)
Board / ops reports pptx/pdf/xlsx Targets, strategy, the questions leadership is asking
Incident / RCA reports docx/pdf Root causes the twin should model

3.2 The pipeline (Document Activation)

ingest (multi-format)  →  classify + de-identify + chunk  →  corpus medallion  →  ┬─ RAG (embeddings)
parsers: xlsx·docx·       doc-type · PHI strip · sections     Bronze→Silver→Gold  │
pdf·pptx·csv·OCR·voice                                        (ai-training-corpus) └─ structured-fact extraction (for xlsx/registries)
  1. Ingest — multi-format parsers (xlsx → tables; docx/pdf/pptx → text + tables; images/scans → OCR; voice rounds → STT, reusing the ambient-scribe path). A new “Documents” source category in the Connector Store + an upload surface; each document → extracted text + tables + metadata (doc-type, department, date, author-role).
  2. Classify + de-identify + chunk — classify the doc-type; strip PHI (rounding notes name patients; M&M discusses cases) → the de-identified, chunked, typed representation. (Same FORBIDDEN_KEYS/medallion de-id stance as the corpus.)
  3. Corpus (medallion) — Bronze (raw + extracted) → Silver (de-identified, chunked, typed) → Gold (document_corpus embeddings + a structured-facts table for the spreadsheet-y ones). Reuses ai-training-corpus + gold-layer-refresh.
  4. RAG — embeddings + permission-scoped retrieval, per-doc-type retrievers.
  5. Structured-fact extraction — xlsx/registries are semi-structured: extract them as tables → schema-mapped facts using the same field-map pattern as the ERP/connector packs. A quality-metric spreadsheet becomes facts the quality agent reads.

3.3 How documents feed the twin (three ways)

  • (a) RAG grounds the reasoning — the Clinical Assistant (“Ask HORUS”) + the twin’s narrative/recommendations retrieve from the hospital’s own corpus, so a recommendation can cite “your March M&M flagged sepsis-bundle timing; this initiative addresses it.” Recommendations stop being generic.
  • (b) Spreadsheet facts → twin metrics — registries/cost sheets/rosters become twin_metric_* inputs (the same way operational-facts feed workforce/supply).
  • © Decision context → scenario design — committee minutes + board reports tell the twin which initiatives leadership is weighing and which targets are set, so the twin simulates the decisions that actually matter.

4. Governance (non-negotiable, same for both pillars)

  1. Raw PHI never reaches the twin — histories + documents stay in the secure, in-region clinical store; only de-identified, aggregate artifacts (distributions, model coefficients, de-identified chunks/embeddings, extracted facts) cross into calibration/RAG.
  2. Permission-scoped retrieval — RAG never surfaces a patient’s note to an unauthorized user; in-context clinical use is permission-scoped, the cross-tier/training corpus is de-identified.
  3. Recommender-mode + human gate unchanged — risk models inform agents; RAG grounds answers; a 4-role human sign-off still releases every decision. No autonomous writes.
  4. Consent + access log + ownershipml_export_consent (opt-in) + ml_access_log + a named clinical owner + a model card per model; in-region storage; right-to-erasure crosswalk (all from ai-training-corpus).
  5. Backtest before trust — no forecast is presented as decision support until the twin reproduces a held-out period.

5. Why it’s the moat (the sellable difference)

Every competitor ships a dashboard (what happened). A few ship a generic simulator (textbook assumptions). Nobody can replicate a twin calibrated on your 10M outcomes that also reads your documents — because that data is yours and ours to activate, and it compounds:

  • Calibrated, not assumed — backtested on real outcomes → leadership trusts the forecast.
  • Contextual, not generic — recommendations cite the hospital’s own conferences, policies, and targets.
  • Defensible — the advantage grows with every encounter and every document; a new entrant starts from zero.
  • Compliant by construction — de-identified, in-region, recommender-only, human-gated.

AI made everyone faster. The real advantage now is building the right thing — together, grounded in your data.


6. Rollout

Phase Ships Value
P0 Empirical LOS + arrival distributions per (service-line × cohort) from the 10M → twin_dist_* in the metric registry → DES samples them → backtest vs a held-out year The credibility chart (“reproduces last year’s census within X%”) that sells the sign-off
P1 Risk models (readmission/complication/cost) → quality/reimbursement agents Outcomes predicted from real risk
P2 Document Activation pipeline — multi-format ingest + de-id + medallion + RAG; “Documents” category in the Connector Store Ask HORUS + twin narratives grounded in the hospital’s own docs
P3 Spreadsheet structured-fact extraction → twin metrics Registries/cost-sheets calibrate agents
P4 Patient-mix microsimulation + care-pathway mining Real case-mix + real bottlenecks in the sim
P5 Counterfactual effect estimation for specific initiatives Evidence-grounded P10/P50/P90

7. Honest caveats

  • History ≠ future — case-mix drifts, shocks happen; calibration needs drift monitoring + the human gate.
  • Correlation ≠ causation — risk models predict; they don’t prove the initiative causes the effect (#6 needs genuine causal care).
  • Per-region transfer — a model/corpus trained on one country won’t transfer cleanly; per-region calibration (the market-pack pattern applies to models + corpora too).
  • Document quality + PHI density — notes are messy and PHI-dense; the Silver de-id + extraction layer is where the real work is.
  • Data quality across 10M — coding consistency + missingness gate model quality.

8. Product framing (the one-line pitch)

HORUS Decision Twin — the hospital decision twin that’s calibrated on 10 million real outcomes and reads your hospital’s own documents. Not a dashboard. Not a generic simulator. A decision partner that’s grounded in your data, backtested on your history, and gated by your people.

Ask Anything