Clinical Knowledge Engine

Institutional memory for clinicians — offline, cited, and governed.

An offline, RAG-first engine that captures the wisdom your hospital has earned, keeps it when staff leave, and teaches new clinicians from real, de-identified experience — including the mistakes — under the platform's existing clinical-safety and data-protection governance.

Models

Open-weight, edge-deployed.

Generation and embeddings run on the sealed appliance. No PHI leaves the hospital.

Edge generation model

Open-weight instruction-tuned LLM (~5 GB, 4-bit quantised) running offline on the edge appliance. Default synthesis model for cited, advisory answers.

Open-weight · quantised · offline
Multilingual embedding model

High-dimensional multilingual embeddings powering the capture pipeline and teaching search. CPU-friendly, runs on the appliance.

Dense + sparse · multilingual
Medical-domain model

Optional medical-domain model for additional clinical reasoning at the edge, deployed where licensing permits.

Medical-tuned · edge

Modules

Three modules, one corpus.

Accumulation feeds curation; curation gates retrieval. Build order follows the risk ladder.

Module 1

Institutional knowledge accumulation

A scheduled capture worker reads finalised FHIR notes, encounters, outcomes and significant events, de-identifies them with Microsoft Presidio, and distils each into a structured Care Episode — presentation, assessment, plan, outcome, lesson, provenance. Embedded with the multilingual embedding model and stored as drafts in pgvector on the HA Postgres, tenant-tagged and RLS-isolated.

  • Sources: finalised notes, order sets, NEWS2/MEOWS trajectories, adverse outcomes, DCB0129 hazard incidents, significant-event log
  • De-identification: Presidio (offline) strips direct identifiers, shifts dates, bands ages, flags small-cell combinations
  • Stored as draft — not retrievable until a steward approves
  • Erasure-aware: source_patient column lets NDPR/DSAR erasure cascade into vector rows

Module 2

Institutional knowledge — retrieval & teaching

A de-identified case library plus the local protocols and lessons-learned, surfaced through a console teaching module for onboarding and through a SMART app at the point of care. The edge generation model synthesises cited, advisory answers; cautionary cases are shown as warnings to avoid, never as patterns to imitate.

  • ‘How do we manage X here?’ — semantic search over approved Care Episodes and local order sets
  • Point-of-care RAG (capability C) splits retrieval by label: exemplary cases inform the plan, cautionary cases inform the pitfalls
  • Every claim is cited; no source → no claim. Confidence and source dates always shown
  • Advisory-only, human-in-the-loop — never writes orders, prescriptions, or notes

Module 3

Knowledge curation (the steward queue)

A new ADS role — knowledge_steward — reviews draft episodes, confirms or edits the outcome label (exemplary · acceptable · cautionary · do-not-repeat) and the lesson learned, then approves for the corpus. Periodic re-review retires outdated entries. This human-in-the-loop curation is what separates institutional wisdom from automated malpractice.

  • Curation queue UI: draft → labelled → lesson written → approved (or retired)
  • Steward sign-off is part of the DCB0160 clinical-safety case
  • Cautionary cases are tagged as warnings at retrieval time and prompt-separated at synthesis
  • Steward-only action enforced by OPA: knowledge.curate

Pipeline

From a finalised note to a cited, advisory answer.

  1. Step 1
    FHIR system of record

    Notes, orders, outcomes, significant events

  2. Step 2
    Presidio de-identification

    Offline PHI stripping + small-cell flagging

  3. Step 3
    Care Episode distillation

    Presentation · assessment · plan · outcome · lesson

  4. Step 4
    Steward curation

    Label + lesson + approve / retire

  5. Step 5
    Embed & store

    Multilingual embeddings → pgvector (HNSW, RLS-tenant)

  6. Step 6
    RAG synthesis

    Edge generation model · cited · advisory · audited

Capabilities

Three surfaces, in increasing risk order.

CapabilityWhoRiskWhat it does
A. Case library & ‘how do we do X here’New & junior staff, onboardingLowDe-identified episodes, local order sets, documented pitfalls.
B. Lessons-from-mistakes (M&M memory)All clinical staffLow–MediumStructured significant events and near-misses with what happened and what we learned.
C. Point-of-care decision supportTreating clinician, in patient contextHigh (CDS)Advisory, cited guidance for the current patient — reviewed by the clinician, never autonomous.

Safety & governance

Why this is safe to put in front of a clinician.

Mistakes are warnings, never patterns

Outcome-linked labels separate exemplary from cautionary cases at retrieval and at synthesis — the M&M model, not imitation.

RAG, not fine-tuning

Knowledge lives in a curated corpus, not in model weights — instantly updatable, fully erasable, always cited.

Governed under DCB0129/0160

New CDS hazards in the hazard log; CSO sign-off gates capability C; ADS/OPA enforces every action; audit hash-chain records every query.

Fully offline at the edge

Generation and embedding models run on the sealed appliance. An optional larger regional model can be added with graceful local fallback. Specific model selections are shared with clients under NDA.

The rule that makes mistakes safe to learn from

A cautionary episode is never retrieved as a recommendation. At synthesis time the engine separates the two and instructs the model accordingly:“Here is how similar cases were successfully managed [exemplary, cited]. Here are documented pitfalls and adverse events to avoid, and the lessons learned [cautionary, cited as warnings].”