Friday, 20 November 2026

Vibe Rounds - Rethinking the Architecture of Clinical Knowledge

 

Rethinking the Architecture of Clinical Knowledge

From How Medicine Knows to How Medicine Learns, Thinks, Acts, and Improves

Medicine has become extraordinarily sophisticated at generating knowledge. We have clinical trials, systematic reviews, guidelines, diagnostic technologies, electronic health records, artificial intelligence, and increasingly powerful analytical tools.

Yet an important question remains:

Have we become equally sophisticated at organizing, teaching, evaluating, and operationalizing clinical knowledge?

The problem may not be a shortage of medical information. It may be that the different systems responsible for creating, interpreting, teaching, applying, and improving medical knowledge remain insufficiently connected.

Clinical education operates in one ecosystem. Evidence-based medicine operates in another. Clinical practice follows its own workflows. Health information technology frequently treats clinical knowledge as structured data to be stored and retrieved. Quality improvement measures outcomes, often without a sufficiently rich connection to the reasoning and knowledge that produced them.

What if these were not separate problems?

What if they were different dimensions of one larger architectural problem?

1. The epistemological question: How does medicine know?

Before designing better clinical systems, we must understand the nature of medical knowledge.

Medicine does not operate with absolute certainty. It operates with probabilities, imperfect observations, evolving evidence, contextual judgments, and decisions made under constraints.

A diagnosis is not simply a label. It is a provisional interpretation of available evidence.

A guideline is not an unquestionable instruction. It is an attempt to translate accumulated evidence into recommendations for particular clinical contexts.

A laboratory result is not knowledge by itself. Its meaning depends on the patient, clinical question, measurement characteristics, prior probability, and surrounding evidence.

This distinction matters enormously for health technology.

A system that stores medical facts without representing their context, provenance, certainty, and applicability may preserve information while losing much of its clinical meaning.

The philosophical question therefore becomes an engineering question:

How can clinical knowledge be represented without pretending that uncertainty, context, and interpretation do not exist?

This is where philosophy of science, clinical epidemiology, and health informatics must begin speaking to one another.

2. Evidence-based medicine: From information to justified decisions

Evidence-based medicine transformed modern clinical thinking by emphasizing the integration of best available research evidence, clinical expertise, and patient values.

But evidence-based medicine should not be reduced to displaying guidelines or linking research papers.

Its deeper contribution is a disciplined approach to clinical justification.

What is the clinical question? What evidence addresses it? How trustworthy is that evidence? How applicable is it to this patient? What uncertainties remain? What are the potential benefits and harms? What matters to the patient?

These questions form a reasoning process.

A mature clinical knowledge architecture should preserve that process rather than merely deliver its final recommendation.

It should distinguish:

  • Evidence from interpretation.

  • Association from causation.

  • Recommendation from mandatory action.

  • Population-level estimates from individual patient circumstances.

  • Established knowledge from emerging hypotheses.

  • Clinical certainty from computational confidence.

This is particularly important as artificial intelligence enters clinical workflows. A fluent answer is not necessarily a justified answer. A plausible recommendation is not necessarily an evidence-supported recommendation.

The next generation of clinical intelligence must become more accountable to the reasoning behind its outputs.

3. Medical pedagogy: Teaching clinicians how to think

Medical education has traditionally invested heavily in the acquisition of knowledge. But clinical competence requires much more than remembering facts.

Clinicians must recognize patterns, generate and revise hypotheses, interpret evidence, manage uncertainty, identify missing information, and understand when their initial reasoning may be wrong.

This makes clinical reasoning an educational challenge as much as a medical one.

The work of Geoffrey Norman, Kevin Eva, and Donald Schön offers important perspectives on clinical cognition, expertise, reflection, and professional learning.

Their intellectual contributions point toward a deeper educational possibility: systems should not merely provide answers to learners. They should help learners develop the ability to construct, examine, and improve their own reasoning.

Consider the difference.

A conventional educational system might explain why a diagnosis is correct.

A reasoning-oriented system might ask:

  • What findings support this diagnosis?

  • What alternative diagnosis could explain the same findings?

  • Which observation would most strongly discriminate between them?

  • What evidence would change your current judgment?

  • What important information is missing?

  • How would the decision change if the patient's context were different?

The objective is not simply knowledge transmission.

It is the development of better clinical thinkers.

This is one of the central motivations behind the VibeRounds approach: exploring how AI can facilitate questioning, reasoning, reflection, and intellectual engagement rather than merely generating answers.

4. Health IT: The missing architecture between knowledge and practice

Electronic medical records have dramatically improved the ability to store, retrieve, and exchange clinical information.

Standards such as HL7 FHIR have helped establish a common language for representing healthcare information. Terminologies such as SNOMED CT and LOINC support more consistent clinical meaning.

But interoperability of data does not automatically produce interoperability of clinical intelligence.

A FHIR-compatible system may exchange observations, conditions, medications, and encounters without understanding the clinical trajectory they collectively represent.

A clinical template may collect all the required fields without adapting to the patient's actual problem.

A decision-support alert may detect a condition without understanding the wider care context.

A population analytics system may identify a cohort without connecting its findings to the clinical reasoning and interventions that could improve outcomes.

This reveals a crucial distinction:

A healthcare information system is not necessarily a clinical knowledge system.

The opportunity is to move beyond static forms, isolated alerts, disconnected analytics, and fragmented workflows toward architectures that connect:

  1. Clinical concepts and their relationships.

  2. Patient-specific context and longitudinal data.

  3. Evidence and clinical reasoning.

  4. Dynamic clinical documentation.

  5. Decision support and care pathways.

  6. Monitoring and outcome evaluation.

  7. Feedback into the knowledge system itself.

The architecture must preserve the distinction between clinical knowledge, computational rules, AI-generated suggestions, and authorized clinical decisions.

It must also make provenance, versioning, permissions, and auditability foundational rather than optional.

5. The people whose thinking can help us get there

This intellectual undertaking cannot be developed from medicine alone.

It requires engagement with people who have transformed different parts of the problem.

Enrico Coiera offers a foundation in medical informatics, information flow, and clinical decision support.

Trisha Greenhalgh provides an essential perspective on digital health, complexity, implementation, and the realities of healthcare systems.

David Sackett and Gordon Guyatt represent the intellectual foundations of evidence-based medicine.

Geoffrey Norman and Kevin Eva offer important insights into clinical reasoning, expertise, and health professions education.

Donald Berwick demonstrates how systems thinking can translate into measurable improvements in healthcare.

Beyond medicine, John Dewey helps us think about learning through inquiry and experience. Donald Schön explores reflective professional practice. Nancy Cartwright challenges simplistic assumptions about evidence and causality. James Reason helps us understand human error and system safety. W. Edwards Deming offers a framework for understanding variation and continuous improvement.

These are not merely names to admire. They represent different intellectual tools for approaching one interconnected problem.

6. From isolated applications to a clinical knowledge flywheel

The long-term opportunity is to connect the entire lifecycle of clinical knowledge.

Imagine a system in which:

  • Medical knowledge defines clinical concepts, relationships, and evidence.

  • Patient context determines which knowledge is relevant.

  • Clinical reasoning interprets the available information.

  • Dynamic workflows collect the information needed for a particular clinical problem.

  • Decision support presents relevant, explainable suggestions.

  • Clinicians make and document decisions.

  • Longitudinal monitoring observes what happens afterward.

  • Population analytics identifies patterns, gaps, and opportunities.

  • Research and quality improvement evaluate whether the underlying knowledge and processes should change.

This creates a continuous cycle:

Understand → Compose → Recommend → Execute → Monitor → Learn → Improve.

The important idea is that the system should not stop when a recommendation is generated or a clinical encounter is completed.

The consequences of clinical decisions should inform subsequent learning, evaluation, and improvement.

However, this feedback must be governed carefully. Observed associations do not automatically establish causality. Clinical outcomes require appropriate risk adjustment, study design, and validation. AI-generated modifications to clinical knowledge should never become authoritative merely because an algorithm proposed them.

A genuine clinical knowledge flywheel requires scientific discipline, clinical governance, and human accountability.

7. The management and implementation problem

An intellectually elegant architecture can still fail in healthcare.

Healthcare organizations are complex environments. They involve competing priorities, resource limitations, professional boundaries, regulatory requirements, established habits, and the practical realities of clinical work.

This is why management experience matters.

A system must be technically sound, clinically useful, operationally feasible, financially sustainable, and acceptable to the people expected to use it.

Implementation is not a final stage after innovation. It is part of the design problem from the beginning.

The question is not simply whether something can be built.

It is whether it can be safely adopted, consistently operated, evaluated, maintained, and improved.

8. A research and engineering agenda

The emerging field of clinical intelligence needs more than another collection of AI applications.

It needs rigorous work across several interconnected questions:

Epistemology: How should clinical knowledge represent uncertainty, provenance, disagreement, and changing evidence?

Clinical reasoning: How can computational systems support hypothesis generation, diagnostic revision, and decision-making without replacing professional judgment?

Medical pedagogy: How can technology develop reasoning ability rather than dependence on generated answers?

Evidence-based medicine: How can recommendations remain connected to the strength, applicability, and limitations of their supporting evidence?

Health informatics: How can clinical concepts, longitudinal patient data, workflows, and decision support operate within coherent and interoperable architectures?

Evaluation: How should we measure improvements in reasoning, learning, clinical processes, patient outcomes, safety, and efficiency?

Governance: How can clinical rules, AI-generated content, and evolving knowledge be versioned, reviewed, validated, and held accountable?

These questions deserve sustained collaboration among clinicians, educators, philosophers of science, epidemiologists, informaticians, software engineers, researchers, and healthcare leaders.

Conclusion: Rebuilding the connection between knowing and doing

Medicine's next major transformation may not come from producing more medical information or generating more fluent AI responses.

It may come from improving the architecture connecting knowledge to reasoning, reasoning to action, action to outcomes, and outcomes to learning.

The ambition is to build systems that understand more of the clinical context, represent knowledge more responsibly, teach reasoning more effectively, support decisions more intelligently, and improve through scientifically governed feedback.

This is not a claim that technology can solve every problem in medicine. Nor is it an argument that clinical judgment should be automated.

It is an invitation to rethink the relationship between human expertise, scientific evidence, education, computation, and healthcare systems.

The ultimate objective is not to make medicine more computerized. It is to make the relationship between what medicine knows, how clinicians think, what healthcare systems do, and what patients experience more coherent, transparent, and continuously improvable.

That is the larger intellectual and engineering challenge.

And it is a challenge worth dedicating a career to.


Suggested intellectual starting points: Enrico Coiera's Guide to Health Informatics; David Sackett and colleagues' work on Evidence-Based Medicine; Geoffrey Norman's research on clinical reasoning; Trisha Greenhalgh's work on digital health and complexity; Donald Berwick's work on healthcare improvement; John Dewey's philosophy of inquiry; and Donald Schön's The Reflective Practitioner.

VibeRounds is one ongoing exploration of these questions, particularly at the intersection of clinical reasoning, medical education, clinical knowledge architecture, and health information technology. Its ideas and implementations should be evaluated through independent research, clinical validation, and real-world evidence.

Beyond Static ERPs: Context-Assembled Business Processes, Borrowed from Clinical Informatics

 

Beyond Static ERPs: Context-Assembled Business Processes, Borrowed from Clinical Informatics

Traditional ERP systems are built like filing cabinets. They ship with fixed procurement forms, fixed inventory screens and fixed approval chains, designed for bookkeeping and audit rather than for the decision someone is making right now. A purchase order for routine office stationery goes through the same screens as an urgent order for a single-source component from a vendor whose risk score just dropped.

When conditions change, static workflows fail. A new regional tax rule, a port disruption or a failed supplier audit all need different questions asked at different moments. If the ERP doesn't prompt for them, structure them and map them to a standard code, the critical context ends up in email threads and spreadsheet side-notes, outside the system of record.

I ran into this problem first in healthcare. In my recent posts on the Context-Aware EMR Enhancer in VibeRounds, I explored a simple idea: the clinical situation should dictate the data structure. This post argues that the same pattern applies to ERP.

The Pattern: Context as an Active Schema Modifier

In the EMR work, a diagnosis (or a patient's live trajectory of conditions, labs and medications) selects and assembles the exact documentation modules needed. Four design decisions make that work, and each one has an ERP counterpart.

  1. A canonical, standards-bound intermediate representation. In health IT this is FHIR R4 SDC Questionnaire, bound to SNOMED CT and LOINC. In ERP the equivalent is a versioned process-module schema (JSON Schema or OpenAPI-style) bound to industry taxonomies such as UNSPSC, HS codes and tax-jurisdiction codes.

  2. LLM synthesis behind deterministic guardrails. An LLM drafts the module, but a rule-based validator checks every code, formula and constraint before a human domain owner sees it. In healthcare that owner is an informatician. In ERP it is a compliance officer or finance controller.

  3. Runtime composition instead of monolithic forms. Small, focused modules are stitched together according to live state. In an EMR that state is comorbidities and labs. In an ERP it is vendor risk, stock position, contract terms and regional regulation.

  4. A closed feedback loop. Every accepted, dismissed or edited recommendation is logged and used to tighten the triggers on the modules.

What a Context-Assembled ERP Looks Like

Take one scenario: an urgent purchase of a regulated component from a new overseas vendor.

  • Module 1, Cross-Border Import Compliance: triggered by the HS code and country of origin. It captures licence numbers, duty classification and restricted-party screening results.
  • Module 2, New-Vendor Due Diligence: triggered by vendor age and the absence of any prior transaction history. It captures bank verification, beneficial ownership and sanctions checks.
  • Module 3, Expedite Justification: triggered by the urgency flag and a value above threshold. It captures the business reason and the approver.
  • Suppressed Module: Annual Vendor Questionnaire. It was completed 60 days ago, so asking again would only add friction.

A conventional ERP presents one long purchase order form with every optional field. The context-assembled version presents the three modules that matter, pre-populated from existing records, and hides the rest. Suppressing what is already known is as important as surfacing what is missing, because users stop trusting a system that asks twice.

Mapping the Layers: EMR to ERP

Layer Clinical (VibeRounds / FHIR) ERP equivalent
Canonical schema FHIR R4 SDC Questionnaire Versioned process-module schema
Code bindings SNOMED CT, LOINC UNSPSC, HS codes, tax and GL codes
Validation Terminology and logic checks Business-rule, tax and segregation-of-duties checks
Human sign-off Informatician Domain controller or compliance owner
Trigger engine Diagnosis, labs, medications Vendor risk, inventory, contract and regulatory events
Pre-population SDC $populate Master-data and transaction-history prefill
External portal Patient PHR check-ins Vendor and field-technician portals
Feedback loop CDS Hooks feedback Recommendation accept, dismiss and edit logs

The Vendor and Field Portal: The ERP's PHR

In the clinical design, patients get short, condition-specific check-ins that feed structured data back into the record. The ERP analogue is the supplier or field-technician portal.

Rather than a generic supplier dashboard, a vendor receives a short, adaptive checklist tied to the active purchase order. This could be a delivery-readiness confirmation, a certificate-of-conformance upload or a delay-reason capture. If everything is on track, it takes seconds. If a threshold is breached, conditional questions expand and an alert goes to the buyer. Responses are extracted into coded records, so the ERP's trajectory view of that vendor is current when the next order is placed.

Where This Can Fail

I don't want to oversell this. The pattern is a design hypothesis for ERP, and I have only started testing the clinical version. Three failure modes decide whether it works.

  • Schema and logic drift. If two composed modules ask conflicting questions or write to the same field, users lose trust quickly. Composition needs explicit conflict rules.
  • Governance bottlenecks. If reviewing an LLM-drafted module is harder than writing it by hand, the supply of approved modules dries up.
  • Recommendation overload. A recommender that surfaces too many modules becomes the clutter it was meant to remove. Surfacing one or two high-signal modules is the right target.

The test is empirical. Pick one narrow process, run real transactions through the full loop, and measure the results: validation catch rate, time per transaction, missed-compliance incidents and recommendation dismissal rate.

Built to Adapt, Not to Replace

This approach doesn't require replacing SAP, Odoo or ERPNext. The module registry and recommender can sit above them as a middleware layer, with adapters that expose the same module to different host systems and a richer composition layer where you control the runtime.

The clinical implementation lives in the VibeRounds repository, and the ERP pattern is a direction I plan to prototype next. If you work in ERP implementation, compliance or process design, I'd welcome your critique, especially on where this pattern would break.

Previous posts in this series:

Project repository: VibeRounds-Clinical-Analytics-App



From Composable Forms to a Clinical Flywheel: A Contextual Module Recommender and Patient Monitoring in VibeRounds

From Composable Forms to a Clinical Flywheel: A Contextual Module Recommender and Patient Monitoring in VibeRounds

In the previous post, we made the EMR composable. A case starts blank, and clinicians add element sets (disease contexts, care pathways, templates) as the patient's picture evolves.

That solves how structure is assembled. It leaves open who decides which structure is needed, and when.

Right now the clinician has to know what to add. In a busy clinic, nobody remembers which of fifty modules applies to a 62-year-old with diabetes, stage 3b CKD and a new foot ulcer. This post covers the next layer: a Contextual Module Recommender, and a patient-facing counterpart that extends the same modules to home monitoring.

The Problem: A Marketplace Nobody Has Time to Browse

Suppose element sets are published as standard FHIR R4 SDC Questionnaires, reviewed by an informatician and shared in a catalog. A catalog is still passive. A "form library" works only if the clinician searches it, and clinicians under time pressure don't.

The recommender turns the catalog into something that works at the point of care. It reads the live encounter state and surfaces the few modules that matter right now.

How the Recommender Works

  • Stage
  • Mechanism
  • Notes
  • 1. Index the modules
  • Each approved SDC Questionnaire carries structured useContext metadata: SNOMED CT condition codes, LOINC observation triggers, encounter class, age and sex bounds. A semantic embedding of its clinical intent is stored alongside.
  • Gives both exact code matching and semantic retrieval for subtle presentations.
  • 2. Trigger and prefetch
  • Standard CDS Hooks (patient-view, encounter-start, order-select, problem-list-item-create) pass the active Condition, Observation and MedicationRequest data to the recommender.
  • External EHRs receive a standard CDS Card with a one-click link to launch the form.
  • 3. Hybrid ranking
  • Step A, deterministic: match SNOMED CT hierarchies, value sets and lab thresholds (e.g. eGFR < 45 plus a new NSAID order). Step B, AI: rank the surviving candidates by urgency, suppress what is already documented, and explain why each matters now.
  • The LLM ranks and explains. It never decides eligibility alone.
  • 4. Runtime execution
  • The accepted module loads into the form renderer.
  • External EHRs render the SDC form as-is. VibeRounds composes several modules into one pre-populated workspace.

The split in step 3 follows the same rule as the rest of VibeRounds: deterministic logic decides what is allowed, and the LLM only helps with ordering and explanation.

Three Design Patterns That Keep It Trustworthy

1. Micro-modules, not monolithic forms

An 80-question specialty template is hard to reuse and hard to review. Small, focused modules (Acute Dyspnea Triage, Anticoagulation Bleeding Risk, Diabetic Foot Screen) can be combined. When a patient has overlapping problems, the recommender picks the two or three modules for that specific intersection. This is the same property we relied on in the trajectory post: element sets compose, templates don't.

2. Redundancy suppression

Before recommending anything, the recommender checks recent QuestionnaireResponse and Observation timestamps. If a PHQ-9 or smoking-status screen is already inside its valid window, it is suppressed. Clinicians trust a recommender that respects what is already charted, and ignore one that asks the same questions again.

3. A closed feedback loop

Every outcome (accepted, dismissed, modified) is logged using the CDS Hooks feedback pattern. The signals are practical:

  • A high dismissal rate on a module tells the informatician to tighten its useContext criteria.
  • Frequent free-text additions suggest a missing field, and the LLM pipeline can draft a new micro-module for human review.

The catalog then improves from real use instead of drifting.

A Worked Example

Patient: 62-year-old man, Type 2 diabetes, CKD stage 3b, presenting with a foot ulcer.

  • Result
  • Module
  • Why
  • Recommended
  • Diabetic-Foot-Ulcer-Assessment
  • Matches the foot ulcer in a diabetic patient
  • Recommended
  • Renal-Antibiotic-Dosing-Check
  • eGFR < 45 with a likely infection, so antibiotic dosing needs renal review
  • Suppressed
  • Annual-Retinopathy-Screen
  • Already documented two months ago

An external EHR gets two clean CDS Cards. VibeRounds merges both modules into one pre-populated workspace with the relevant trajectories visible. The clinician sees two high-signal suggestions, not fifteen.

(The module names above are illustrative. Real triggers and thresholds would be defined and verified by a clinician or informatician, not inferred by the model.)

Extending the Same Module to the Patient

A well-designed SDC Questionnaire separates clinical meaning (codes, scoring, extraction rules) from presentation (wording, layout, schedule). That means one marketplace module can have two projections, so no separate patient-form engine is needed.

  • Dimension
  • Clinician projection (EMR)
  • Patient projection (PHR portal)
  • Language
  • "Orthopnea, PND, peripheral edema grade"
  • "Did you need extra pillows to sleep last night? Are your ankles more swollen than usual?"
  • Trigger
  • Encounter-driven
  • Scheduled through a CarePlan / Task (daily weight, weekly PHQ-9, post-op day-3 wound check)
  • Delivery
  • Inside the EMR workspace
  • A simple web or mobile link, optionally a SMART Health Link so patients need no complicated login
  • Output
  • Clinician-authored Condition, Observation, Procedure
  • Patient-reported Observation (survey category), with red-flag alerts sent back to the clinician

What makes focused monitoring work

  • Condition-specific micro-checklists. On discharge or diagnosis (heart failure, gestational diabetes, a post-antibiotic course), the recommender assigns a short 4 to 5 item module matched to the patient's regimen, not a generic health tracker.
  • Adaptive questioning. With enableWhen, a patient who reports "feeling fine, weight stable" finishes in a couple of taps. If weight jumps more than 2 kg in 48 hours or breathlessness is ticked, follow-up safety questions expand and the clinician is alerted.
  • Trajectory ingestion. Every submission goes through the same SDC extraction pipeline into the same longitudinal store. By the follow-up visit, the clinician's encounter form can already show a 14-day symptom and vital trend.
  • Portable ownership. Patients can share a structured monitoring summary with an outside clinic through a SMART Health Link instead of a paper log.

(Alert thresholds such as the 2 kg example are examples only. Real thresholds must be set and approved clinically for each condition.)

The Ecosystem in One Picture

  • Marketplace: LLM-drafted, deterministically validated, informatician-approved SDC modules, each with a clinician and a patient projection.
  • Clinician side: context-triggered forms and comorbidity composition in VibeRounds, with the same modules reachable from external EHRs via CDS Hooks.
  • Patient side: adaptive home check-ins whose structured results feed the clinical reasoning loop.

The loop is: catalog → recommend → compose → patient check-in → structured extraction → better recommendation.

What Still Has to Be Proven

An architecture is a hypothesis until it is tested. The risks I would measure first:

  1. Terminology and logic drift. Do spliced modules ever ask conflicting questions or write to the same resource differently?
  2. Governance load. Is reviewing an LLM-drafted module faster than building one by hand? If not, the catalog will not grow.
  3. Alert fatigue. Does the recommender actually reduce clicks and missed risks, or does it just add a new kind of clutter?
  4. Round-trip fidelity. Does one module keep its meaning from catalog to clinician view to patient check-in to FHIR extraction, across more than one EHR?

The plan is to pick one narrow scenario (for example Type 2 diabetes with CKD), define two composable modules, wire a basic CDS Hooks trigger, and measure time saved, suppression accuracy and extraction fidelity on synthetic cases before touching anything real.

Why This Matters

The first post made the EMR respond to a diagnosis. The second made it follow the patient over time. This one asks the EMR to anticipate what the clinician and the patient will need next, while keeping humans, standards and deterministic checks in charge of what is safe.

Previous posts: Beyond Static EMRs · From Diagnosis to Trajectory & Pathways

Project repository: VibeRounds-Clinical-Analytics-App

Live demo: https://viberounds-clinical-analytics-app.onrender.com/ (contact me for access: avi33tbtt@gmail.com)

Disclaimer: this is a design direction and prototype using synthetic data. It is not for clinical use.



Monday, 16 November 2026

From Diagnosis to Trajectory & Pathways: Care Trajectory–Oriented Context-Aware EMR in VibeRounds


In the previous post, we introduced the Context-Aware EMR Enhancer Plugin: type a diagnosis, and the EMR reshapes itself, generating disease-specific fields mapped to FHIR R4, SNOMED CT and LOINC. For a snake-bite or DKA case, that works well.

But real patients rarely arrive as a single diagnosis.

A patient admitted with DKA may also have CKD and an infected foot ulcer. A disease-specific template fits one of those problems and ignores the other two. Worse, some of the most useful structure in a chart is not a disease at all. HbA1c monitoring, a sliding-scale insulin protocol, or a vitals chart attach to any patient, whatever the diagnosis.

This post covers the next step: the Care Trajectory–Oriented Context-Aware EMR.

The Core Concept: Start Blank, Compose as the Patient Evolves

The idea is a clean slate. A clinician opens a new case and sees one thing: a case narrative, a plain-text, FHIR-interoperable box. No forced template, no mandatory fields.

From there, the clinician adds elements or element sets as the care unfolds:

  • Vitals
  • A basic EMR template (history, examination, plan)
  • HbA1c monitoring with a sliding-scale insulin protocol
  • A disease context such as snake envenomation or DKA

Disease-specific templates break when a patient has three problems at once. Element sets compose; templates don't.

One Concept: The Element Set

To keep the design simple, everything becomes an element set, with a kind field that says what it is:


  • Kind
  • What it is
  • Example
  • disease
  • Context generated from a diagnosis (our existing LLM flow)
  • Snake envenomation, DKA
  • care
  • A care pathway that is not a diagnosis
  • HbA1c monitoring, sliding-scale insulin
  • template
  • A general-purpose structure
  • Basic EMR template
  • pathway
  • An ordered bundle of other element sets, applied in one click
  • DKA admission pathway
  • custom
  • Built by the clinician or institution
  • Unit-specific checklist



Our existing schema contract already fits this. We only add kind, id, version, and optional requires / suggests links. The earlier disease flow simply becomes: generate an element set from a diagnosis.

The case model

A case is now:

  • a narrative (the root), plus
  • a list of applied element sets, stored as case.applied = [{ setId, addedAt }], with entered data in case.values.

Because composition is additive, the FHIR bundle builder keeps working unchanged in spirit: it iterates over all applied sets instead of one.

Separating Disease Context from Care Context

This is the key design insight. A disease context answers "what is wrong?" A care context answers "how are we managing and watching this patient?"

HbA1c monitoring with sliding-scale insulin is a care pathway. It belongs to the patient's journey, not to a diagnosis, so it can be attached to a DKA patient, a post-operative patient, or a steroid-induced hyperglycaemia patient alike. This is what makes the phrase "context can be expanded" a real property of the system rather than a slogan.

Pathway Templates: Bundles of Element Sets

Adding element sets one by one gives flexibility, but for common situations clinicians want a head start. That is what pathway templates are for.

A pathway template is a named, ordered bundle of element sets that can be applied in one click. For example, a "DKA admission pathway" might bundle:

  • Vitals
  • Basic EMR template
  • DKA disease context
  • Glucose monitoring with sliding-scale insulin
  • HbA1c monitoring

Other pathways could cover a post-operative diabetic patient, an ICU admission, or a snake-bite protocol.

How pathways fit the model

  • A pathway is just another registry entry with kind: "pathway", containing a list of member setIds (plus optional requires / suggests links).
  • Applying a pathway adds each member to case.applied individually, so the case stays a flat, additive composition. Nothing about the FHIR builder or analytics changes.
  • The application can record which pathway a set came from (for example fromPathway), so the clinician can see the origin and so analytics can measure pathway usage.
  • A pathway is a starting point, not a lock-in. After applying it, the clinician can remove sets they don't need or add others, and the narrative box stays the root throughout.

Who defines pathways

Pathways reflect institutional practice, so they are clinician- or institution-defined data, versioned and editable, not generated by an LLM. A clinician can also build a pathway from a case they have already composed ("save this combination as a pathway"). Pathways then become the most-used chips in the sidebar, alongside individual sets, so a whole admission workup is one click away.

Pathway templates are also the clearest example of why the clean slate matters: the starting point is empty, but the shortcuts to a complete structure are always one click away.

Care Needs Time: Repeating Fields and Trajectories

A form captures a snapshot. Care is a trajectory.

HbA1c is measured repeatedly. Sliding-scale insulin is a series of glucose readings, each with a dose given against a band. So the schema gains one important feature: fields can be marked repeat: true, turning a single value into a mini-table of timestamp + value entries.

On top of that sits a trajectory view: repeated values plotted over time as lightweight inline SVG charts, with no heavy charting library. This is the change that turns the tool from a form builder into a care-trajectory tool.

Handling Protocols Safely: The Sliding Scale

Sliding-scale insulin is a protocol, and protocols affect patient safety. Our rules:

  • The scale (glucose band → units) is editable data defined by the clinician or institution, not something an LLM invents.
  • It is labelled "protocol-defined, clinician-verified."
  • Dosing logic stays user-entered. The LLM never suggests doses.
  • The "not for clinical use, synthetic data" banner stays prominent.

LLMs are useful for generating context (which fields matter for a condition). They should not be the source of dosing numbers.

One-Click Access: Usage-Ranked Suggestions

Clinicians repeat themselves. The sidebar therefore shows the most-used element sets as one-click chips, with a search box for the rest.

This is personalisation without machine learning: a simple counter in localStorage increments whenever a set is applied, and the top 5 to 8 appear as suggestions. A later extension can rank by diagnosis ("sets most used with this diagnosis"), which is where context-aware and most-used meet.

Narrative to FHIR

The narrative box starts simple: plain text saved into the FHIR bundle as a Composition text section (or DocumentReference). An optional LLM button, "suggest element sets from this narrative", reads the free text and proposes relevant sets, a natural step toward true context-awareness while keeping the clinician in control of what gets applied.

Future Scope, Built In as Data

A contexts registry sits at the top of the UI as a dropdown. Today it offers:

  • Disease
  • Care pathway

Alongside them are disabled placeholders for future contexts:

  • Specialty (e.g. cardiology, nephrology)
  • Setting (ICU, OPD, ward)
  • Population (paediatric, geriatric, obstetric)

Because contexts are registry data rather than hard-coded logic, adding a new axis later is cheap, and the expansion story is visible in the interface today.

Codes: Verify Before You Bind

Care elements such as HbA1c, glucose, blood pressure and heart rate have well-known LOINC codes. We keep the same rule as before: a code enters the verified table only after it has been looked up and confirmed, never copied from model output.

Why This Matters

Static EMRs force the patient into the form. Disease-specific EMRs improved on that, but still assume one problem at a time. A trajectory-oriented, composable EMR follows the patient instead: blank at the start, enriched as the clinical picture develops, and structured and interoperable throughout.

Project repository: VibeRounds-Clinical-Analytics-App

Live demo: https://viberounds-clinical-analytics-app.onrender.com/ (contact me for access: avi33tbtt@gmail.com)

Disclaimer: this is a prototype using synthetic data and is not for clinical use.

Sunday, 15 November 2026

Beyond Static EMRs: Introducing the Context-Aware EMR Enhancer Plugin in VibeRounds

Traditional Electronic Medical Records (EMRs) are built like filing cabinets. They offer static, rigid forms designed for billing and retrospective auditing rather than active clinical cognition. If a patient presents with Acute Snake Envenomation, a standard EMR presents the same generic vitals and chief complaint boxes as it would for a routine ankle sprain or a routine checkup.

In high-acuity, time-sensitive clinical environments, static forms fail. They miss critical context. For instance, in snake envenomation, the exact time gap between the bite and the administration of Anti-Snake Venom (ASV) is a primary prognostic determinant. If your EMR doesn't explicitly prompt for it, structure it, and map it, vital data gets buried in unstructured clinical notes.

To bridge this gap, we are introducing the Context-Aware EMR Enhancer Plugin into the open-source VibeRounds Clinical Analytics App.

The Core Concept: Diagnosis as an Active Schema Modifier

The philosophy behind the EMR Enhancer is simple: The diagnosis should dictate the data structure.

Instead of forcing clinicians to hunt through endless menus or rely on memory to capture disease-specific nuances, the enhancer turns the primary diagnosis into an active schema modifier.

  1. Contextual Generation: The clinician inputs a diagnosis (e.g., Hemotoxic Snake Envenomation) alongside any custom clinical instructions or institutional trial protocols.

  2. LLM Orchestration + Deterministic Guardrails: Leveraging the app's BYOK (Bring Your Own Key) architecture, the system queries an LLM to generate high-yield, disease-specific clinical fields tailored precisely to that presentation.

  3. Standards-Compliant Interoperability: Every generated field is automatically mapped to standard FHIR R4 resources (Observation, Condition, MedicationAdministration) and anchored to international healthcare ontologies (SNOMED CT and LOINC).

What the Enhancer Delivers

When you run a diagnosis through the plugin, the output goes far beyond a basic text box. It delivers three core pillars:

1. Context-Aware Clinical Fields

The plugin generates granular parameters that matter for that specific condition. Taking Snake Envenomation as an example, the dynamically rendered form immediately prompts for:

  • Time Elapsed: Precise duration between bite and ASV administration.

  • Coagulopathy Screening: Standardized inputs for the 20-Minute Whole Blood Clotting Test (20WBCT).

  • Therapeutic Tracking: Exact vial counts, administration routes, and immediate adverse reaction monitoring.

2. Native FHIR R4 Integration

Data capture shouldn't create data silos. Every user input is dynamically wrapped into valid FHIR R4 JSON bundles, ensuring your clinical workflow is instantly interoperable with external health data systems and VibeRounds' core analytical engine.

3. Rigorous Ontology Bindings

Ambiguity is the enemy of clinical data science. The plugin automatically assigns:

  • SNOMED CT codes for clinical findings, procedures, and conditions.

  • LOINC codes for lab values, timing intervals, and quantitative metrics.

Closing the Loop: Contextual Data Analytics

Collecting structured data is only half the battle. The new EMR Enhancer tab includes an integrated Analytics Dashboard designed to evaluate case cohorts in real time:

  • Protocol Adherence & Timing Metrics: Instantly compute cohort-wide medians (e.g., tracking whether ASV administration times are staying within the critical golden window).

  • Data Coverage & Completeness: Measure how thoroughly high-yield contextual fields are being populated across different clinical cases.

  • Ontological Binding Rates: Track the proportion of captured narrative data successfully mapped to standardized terminologies.

Open Source & Built for Adaptability

True to the VibeRounds ethos, this plugin is open-source, modular, and privacy-first. By combining deterministic analytics with flexible LLM prompt orchestration, clinicians and health IT developers can rapidly spin up disease-specific EMR schemas for any clinical domain—from toxicology and acute trauma to rare chronic conditions.

The code and architecture are live in the repository. We invite clinicians, informatics researchers, and developers to explore the codebase, test out the new EMR Enhancer tab, and contribute to building truly intelligent, patient-centered health systems.

Check out the project repository on GitHub: VibeRounds-Clinical-Analytics-App

Next post - From Diagnosis to Trajectory & Pathways: Care Trajectory–Oriented Context-Aware EMR in VibeRounds 

live demo project - https://viberounds-clinical-analytics-app.onrender.com/  ( contact me to get access  - avi33tbtt@gmail.com )


A pattern encyclopedia for clinical analytics: adding context, time and uncertainty on top of existing EHR data

 

A pattern encyclopedia for clinical analytics: adding context, time and uncertainty on top of existing EHR data

By [author name]. Written for clinical health informatics readers.

Most EHR data reaches analysts as flat labels: a diagnosis code, a drug code, a date. The clinical reasoning that produced those labels, such as how the diagnosis changed, which qualifiers applied and how sure anyone was, is mostly lost. This article explains the reasoning behind a design for the Vibe Rounds clinical analytics app: a clinical pattern encyclopedia that sits on top of data an institution already has, expresses clinical knowledge in plain English and in machine-readable form, runs it with deterministic code, and attaches explicit labels for uncertainty to every result.

Status. The analytics engine, terminology tools and review workflows described in section 7 exist in the app. The encyclopedia itself is a design plan that has not been built yet. Where this article describes planned work, it says so.

1. The problem: a diagnosis that does not stay still

A patient arrives and is given a diagnosis. Qualifiers are added. The diagnosis is refined, sometimes replaced. Other departments join, each with its own vocabulary: pathology describes morphology, radiology describes imaging findings, primary care describes syndromes. Complexity grows with every handover.

A single code at the end of the episode cannot hold this story. Yet the questions analysts and researchers ask later often depend on exactly the lost detail: which side, how severe, confirmed or only suspected, treated or not, and in what order.

2. What SNOMED CT gives you, and what it does not

SNOMED CT is a clinical terminology, not a patient database. It contributes three things that matter here.

  • A hierarchy built on description logic. Concepts are linked by is-a relationships, so a query for a parent concept can include every child. A record coded with a specific disorder is still found by a query for its broader category.
  • Post-coordination. When no single concept captures the clinical meaning, a concept can be combined with attribute-value pairs such as finding site or laterality. The Machine Readable Concept Model (MRCM) defines which attributes may attach to which concepts, which in principle prevents impossible combinations.
  • History of the terminology itself. Retired or replaced concepts carry historical associations, so old records stay interpretable across releases.

What SNOMED CT does not do is store a timeline. How a diagnosis moves from suspected to confirmed to resolved, who changed it and when, is the job of the record model. In FHIR, for example, the Condition resource has fields for clinical status, verification status, severity, body site, onset and abatement. SNOMED CT supplies the meaning of the values; the record structure supplies the time and the status.

3. Where context gets captured

Context can be added at three points, and they are not equal.

  • At the point of care. The clinician chooses qualifiers in the interface and the system builds the structured record. This is a deterministic assertion: the clinician said it.
  • At mapping time. A terminologist maps local codes to concepts or expressions when legacy systems are connected.
  • Retrospectively, in an analytics layer. Code, rules or models read what exists and reconstruct context afterward. This is inference, not assertion. If laterality was never recorded, no reconstruction can supply it.

Two storage choices follow. One is to store post-coordinated expressions as strings. The other is to decompose them into dedicated fields, such as body site, severity and verification status. Decomposed fields are far easier to index and query in a relational database without a live reasoner, which is why many pragmatic designs prefer them.

A subtler problem is where the terminology ends and the data model begins. Is “suspected acute appendicitis” one concept, or appendicitis plus a verification status plus an acuity? Two hospitals can make different choices, and both can be standards-compliant. The result is data that can be exchanged but whose clinical context is not interoperable. Documentation habits add another layer: if a screen makes qualifiers easy to record, one site looks sicker than another simply because it recorded more detail.

In practice, ontology-driven data entry, where the terminology itself decides which qualifiers the form asks for, is uncommon in routine clinical systems. Most deployments use templates and value sets that informaticists maintain by hand, which keeps screens predictable and fast. Specialized platforms built on FHIR questionnaires with a terminology server, and openEHR systems built on archetypes and templates, can enforce more structure, but they bring their own cost: dedicated repositories, a different query language and substantial modelling work before the first screen exists. They are powerful and heavy.

4. Two halves of one problem

The central insight of this design is that the problem splits into two parts that need different treatment.

Representation is translating clinical meaning into a machine-readable form. It is an engineering problem. With good terminology, careful profiling and validation, it is solvable.

Epistemics is about what kind of knowledge a record holds. A serum creatinine value is a measurement. “Acute-on-chronic kidney injury secondary to sepsis” is a clinician’s synthesis that may be revised tomorrow. A working diagnosis is not a confirmed one. Two skilled clinicians document at different levels of detail. No amount of better representation removes this. It has to be carried with the data and shown to the reader.

Many systems solve the first half and silently ignore the second. This design treats both as first-class.

5. The middle-module idea

Waiting for every EHR to redesign its screens is not a plan. The alternative is a module that sits downstream of the existing registry, reads the data already there and adds meaning afterward. It needs no change to clinical workflow and works on historical data, which makes it backward compatible until systems capture richer context at source.

The cost is honesty about what retrospective work can do. It is reconstruction, not assertion. So every reconstructed element needs provenance and a label that says how it was obtained. Section 10 describes those labels.

A custom study pipeline solves one question at a time. The step proposed here is to make the knowledge reusable: an encyclopedia of patterns, each stored, reviewed and runnable, in the way a terminology stores concepts.

6. Temporality: code instead of CQL, for now

Clinical Quality Language (CQL) is the standard for expressing clinical logic with time, such as “within 30 days after discharge”. Its strengths are real: portability between systems, the ability to run published quality measures, and interval operators designed for clinical time. Its costs depend on the setting. CQL is translated to an intermediate form and executed by an engine that usually evaluates one patient at a time, which adds toolchain and can be slow for population analytics.

Vibe Rounds takes a different route. FHIR data is imported into PostgreSQL tables, grouped in batches and populations, and temporal logic is written as set-based SQL with an explicit as-of date. The existing analytics already compute time windows, first and last events, time to event, 30-day readmission, medication fill intervals and persistence, and landmark study designs.

The decision for now is to stay with SQL and to keep the new pattern specification declarative and small, so it can later be exported to a standard format. What is given up is the ability to run third-party measures as written. If that becomes a requirement, an import path can be added.

7. What the app already does

The encyclopedia is designed to reuse existing parts, not replace them.

  • Data and scope. Imported FHIR resources live in per-batch PostgreSQL tables. Populations, batches and saved cohorts define the scope of every analysis.
  • Data-quality levels. The analytics catalog runs in five modes, from text matching only, through source codes, to codes with time and reviewed enrichment. A reader can see how much each result depends on code quality.
  • Dictionary and hierarchy. A dictionary can be built from the codes actually present in the imported data. A separate hierarchy of is-a links can be loaded from a bundled demo set, a CSV file or real SNOMED CT release files. A query builder uses it to include descendants or ancestors. The dictionary alone does not create hierarchy; the loaded links do. Today only the query builder and cohort criteria use hierarchy.
  • Reviewed enrichment. Free-text entries can be proposed codes by a model, then approved, edited or rejected by a person. The record keeps assertion (confirmed, suspected, negated), confidence, model, prompt version and reviewer.
  • Guardrailed AI. A study-planning feature lets a model propose analyses from aggregate counts only. The server rebuilds every proposal from a fixed list of templates and drops unknown codes. A read-only SQL guard protects free-form queries.
  • Exploration and trace. Care pathways, a patient explorer, a cohort knowledge graph and an audit log, including a class for requests sent to an external model.

Two limits matter for what follows. First, resolution dates, medication end dates and stop reasons are not extracted as fields, so they cannot define a pattern yet. Second, the app does not capture post-coordinated qualifiers at entry; it works with what the source data contains.

8. The pattern encyclopedia

An entry has four parts: a plain-English statement, a machine-readable specification, epistemic labels, and a review state. Entries are data, so adding knowledge does not require adding code.

The specification uses only things the app can already compute.

  • Value sets. Named sets of codes for conditions, medications, labs or procedures, either exact codes or a concept with its descendants, taken from the loaded hierarchy.
  • Events. For example, the first diagnosis from a value set, or the first fill of a drug on or after it.
  • Time relations. A short, fixed list: within a number of days, before, after, none in a window, no refill after the supply ends plus a grace period, return within a number of days, latest value in a window, and at least a number of occurrences. These mirror logic the analytics already run. Anything outside the list is rejected.
  • Needs. The fields a patient must have to be evaluated.

The executor is ordinary code. It turns a validated specification into parameterized SQL over the same scoped views the analytics use. No model text ever enters SQL. A patient who lacks the needed dates is reported as “cannot evaluate”, with the reason, and is never silently counted as “no match”. Small groups are hidden using the same minimum-cell rule the care-pathway feature uses.

Three ways to create a pattern

All three produce a draft that a reviewer must approve before it can run on a full population.

  • From one case. A clinician picks a patient. Code abstracts the case: identifiers, names, birth date and address are removed, dates become day offsets from the first event, age becomes a band, and free-text narrative is dropped. A draft specification is built from the ordered events. A model may be used only to word the plain-English statement, and only if an explicit setting allows it and the request is audited. A single abstracted case can still be identifying when the combination of events is rare, so this is a policy decision as much as a technical one.
  • From a few cases. Code finds the codes shared by most selected patients, including descendants when a hierarchy is loaded, together with their usual order and the range of days between events. Only these aggregates are used, and groups below the minimum-cell rule are not summarized.
  • From an external library. Patterns can be imported from a file in the app’s own format, which also allows export between deployments. Every imported pattern is validated and arrives as a draft. Converters from other formats, such as OHDSI cohort definitions or CQL, are future work.

9. Where AI fits

The model is a drafter and an explainer, not a source of numbers or diagnoses.

  • It writes the specification as structured data, never SQL. A validator rejects unknown relations, fields and out-of-range values.
  • Code choices come from candidate lists built from the app’s dictionary. The model may not invent codes.
  • Every draft records the model, prompt version, time and source.
  • A model can never raise certainty above “hypothesis”. Only a reviewer can.
  • Counts come only from the executor. The explanation step may not add figures, and it must state the uncertainty labels first.

This follows a pattern the app already uses for study planning: the model proposes, the server checks, and only checked output reaches the user.

10. Epistemic uncertainty

Uncertainty lives at three layers, and each gets a few fixed labels now. A free list of tags is reserved so a broader structure can be added later without changing the specification.

Knowledge layer (the pattern). How well established is the clinical statement?

  • Certainty: established (a guideline or consensus states it), supported (some studies or clear expert practice), hypothesis (plausible or seen in data, not confirmed), contested (sources disagree, and a note says how).
  • Basis: guideline, literature, expert, observed in data, model suggested.
  • Claim: descriptive (what usually happens), association (two things go together), causal (one is claimed to cause the other).

Data layer (each record). How firm is the fact in the source?

  • Assertion: confirmed, suspected, negated (already in the app).
  • Evidence: documented (a coded field in the source), derived (computed from dates and gaps, for example “stopped” meaning no refill), inferred (from text or a model).

Run layer (this result). Can this run be trusted as it stands? Code computes these from numbers alone.

  • Thin: fewer eligible patients than a low-number limit, or matches below the minimum-cell rule.
  • Gappy: a large share of eligible patients cannot be evaluated because data is missing.
  • Weak hierarchy: the pattern uses descendants but only demo links, or none, are loaded.

Several rules keep the labels honest. Model drafts and patterns mined from cases start at “hypothesis”. “Established” and “supported” require a source note. A causal claim requires at least “supported”, otherwise it is rejected and the result is treated as an association. Suspected and negated records are not counted as confirmed unless the pattern says so. Every change of certainty is written to the audit log with who, when, from, to and why.

Every result carries three chips: knowledge, data and run. For example: Knowledge: hypothesis, observed in data. Data: 70% documented, 30% derived. Run: thin, gappy. A reader sees at a glance how much weight the result can bear.

11. A worked example

Take the plain-English statement: viral fever patients were given antibiotics for five days, but the illness resolved in three days, so they stopped the medication.

The sentence mixes three kinds of meaning. The concepts (viral illness, antibacterial drug) belong to the terminology. The timing (given for five days, resolved in three) belongs to temporal logic. The causal clause (so they stopped) is an interpretation that no database field can confirm.

In the app today there is no resolution date and no medication end date as fields. The pattern is therefore written with definitions derived from what exists:

  • the illness is “resolved” when there is no further record of it within a window after the first diagnosis;
  • the antibiotic is “stopped” when there is no refill after the supply period plus a grace period;
  • the antibiotic starts within a few days of diagnosis.

The run reports how many patients match, how many could not be evaluated and why, and how much of the evidence was derived. The pattern is labeled as an association at the “hypothesis” level.

The reading of such a result needs care. A missing record does not prove recovery: the patient may have gone elsewhere, or the first diagnosis may have been wrong. That is why derived evidence and the claim type are shown next to the count, and why the explanation is limited to “is associated with”.

12. Limits and open questions

  • Derived is not documented. Absence of a record is not absence of an event. Derived definitions should be replaced by documented fields when the data allows.
  • Retrospective work cannot create context that was never recorded. The design reports gaps; it does not fill them with guesses.
  • Hierarchy quality depends on what is loaded. Real descendants need a real terminology release, and its licence terms must be checked for the deployment’s country.
  • Documentation bias remains. A pattern may look rare because one site rarely records the needed fields. A per-site completeness report is planned.
  • Privacy of single cases is reduced by abstraction but not eliminated.
  • Not decision support. Patterns are for exploration, research and review, not for guiding treatment.
  • Prior art exists. Cohort and phenotype definitions in the OHDSI community already store concept sets with descendants and temporal criteria in a structured format. What this design adds is the combination: a plain-English encyclopedia, a validated compile-and-review loop, and uncertainty labels that travel with every result.
  • It needs evaluation. Clinician agreement with drafted patterns, and the accuracy of derived definitions against documented ones, should be measured on real data.

13. Roadmap

The plan has six build phases, each small and tested on synthetic data:

  1. A pattern store and validator, including the uncertainty fields and their rules.
  2. An executor with three hand-written patterns, one checked against the existing readmission analytic, and computation of the run labels.
  3. Creation from one case.
  4. Creation from a few cases.
  5. Import and export of a library file.
  6. A review screen and a patterns tab showing the three chips on every result.

Future development covers: reading resolution, stop and status fields from the source, using the hierarchy throughout the analytics catalog, loading SNOMED attributes for constraint queries, hierarchies for drugs and labs, post-coordinated qualifiers as fields, pattern discovery from frequent sequences, converters for other pattern formats, other source formats such as openEHR, per-site documentation-bias reports, pattern sharing with versioning, and a broader uncertainty structure with graded evidence and listed supporting and conflicting sources.

14. Conclusion

The design rests on a simple separation. Terminologies such as SNOMED CT give machines a precise language. Record standards such as FHIR give that language a time and a status. A deterministic engine gives questions a reliable answer. And an explicit uncertainty layer keeps anyone, human or model, from mistaking an inference for a fact.

Building this as a middle module over existing data means the approach can start small, with a few patterns and a few dozen patients, and grow with the data and the institution. The most important feature is not any one pattern. It is that every result says what kind of knowledge it is, where it came from and how far it can be trusted.

Where feedback would help

  • Are four certainty labels and three claim types the right size to start with, or are they too coarse?
  • Which derived definitions, such as “resolved” or “stopped”, would your clinicians accept before documented fields exist?
  • What would you need to see before trusting a pattern drafted from a single abstracted case?

How SNOMED CT Keeps Meaning Intact When a Patient's Diagnosis Keeps Changing

 

How SNOMED CT Keeps Meaning Intact When a Patient's Diagnosis Keeps Changing

A patient arrives. A diagnosis is assigned. Qualifiers get added, then revised, and sometimes the diagnosis itself shifts. Care spreads across departments and complexity grows. How does a clinical terminology cope with that?


Note :- written with help of Ai.


The Short Answer

SNOMED CT is a clinical terminology, not an EHR database. It does not store a patient's timeline. What it provides is the meaning layer: a formal, machine-readable vocabulary that lets every system and department describe the same clinical reality in the same way, at every point in the journey.

The timeline itself is the job of the EHR or data standard (HL7 FHIR, openEHR) that uses SNOMED CT codes. The two work as a pair:

LayerResponsibility
SNOMED CTWhat does this term mean? How does it relate to other concepts?
EHR / FHIR / openEHRWhen was it recorded? By whom? Is it active, resolved, or ruled out?

1. Qualifiers That Accumulate: Pre- and Post-Coordination

A diagnosis rarely stays simple. Severity, laterality, clinical course and cause get added over time. SNOMED CT handles this in two ways.

Pre-coordination: a single concept already bundles the condition and its qualifier, such as Acute viral pharyngitis.

Post-coordination: when no pre-coordinated concept exists, you build an expression using SNOMED CT's compositional grammar, combining a base concept with attribute-value pairs:

64572001 |Disease| :
    363698007 |Finding site| = 39607008 |Lung structure|,
    116676008 |Associated morphology| = 23583003 |Inflammation|

This means the record can carry precisely the qualifiers a clinician has established so far, without SNOMED CT needing a new concept for every possible combination.


2. Diagnoses That Get Refined: Subsumption and Description Logic

As a patient moves through care, a vague presentation typically becomes specific:

Abdominal pain → Right lower quadrant pain → Acute appendicitis

SNOMED CT is built on description logic. Every concept is formally defined by its relationships, chiefly the Is-a hierarchy. Because of this, systems can run subsumption queries: Acute appendicitis is recognised as a kind of Appendicitis, which sits under broader disorder concepts.

The practical payoff is that nothing is lost when a specialist records a very specific diagnosis. A GP's summary view, a population-health query or a department-level report that asks for the broader parent category will still find the patient.


3. Bridging Departmental Silos

Pathology talks in morphology. Radiology talks in imaging findings. Primary care talks in syndromes. Left alone, each builds its own local vocabulary and the data fragments.

SNOMED CT cross-links anatomy, morphology, findings, procedures and disorders in one connected model. A finding recorded in pathology can therefore be logically linked to, and queried by, oncology or cardiology. The result is a shared semantic foundation rather than department-specific jargon.


4. Tracking the Timeline: Where FHIR Comes In

This is where SNOMED CT's meaning meets the EHR's memory. In FHIR R4, the Condition resource carries the SNOMED CT concept alongside the lifecycle information that terminology deliberately leaves out.

FHIR elementRole in longitudinal trackingSNOMED CT involvement
Condition.codeThe diagnosis itselfSNOMED CT concept or expression
Condition.bodySiteAnatomical locationSNOMED CT body structure
Condition.severitySeverity as it evolvesSNOMED CT qualifier values
Condition.stageDisease stageSNOMED CT or specialty scales
Condition.clinicalStatusactive, recurrence, relapse, inactive, remission, resolvedHL7 value set
Condition.verificationStatusunconfirmed, provisional, differential, confirmed, refuted, entered-in-errorHL7 value set
Condition.onset[x] / abatement[x]When it began and endedn/a
Condition.recordedDate, recorder, encounterWho recorded it, when and in which encountern/a
Provenance / AuditEventWho changed what, and which departmentn/a

A simple, realistic evolution might look like this:

  1. Day 1, Emergency: Condition with Abdominal pain, verificationStatus = provisional.
  2. Day 1, Surgery: a new Condition with Acute appendicitis, confirmed. The earlier pain record is marked resolved or linked as a symptom.
  3. Day 3, Pathology: an Observation or DiagnosticReport adds morphology findings, also coded in SNOMED CT.
  4. Later, Primary care: a query for the broader parent concept still returns this patient.

Each step is a new, timestamped, attributable record. SNOMED CT guarantees that the meaning of each code is the same in every department.

Querying with the hierarchy

FHIR terminology services expose SNOMED CT's logic directly:

  • ValueSet/$expand with an ECL (Expression Constraint Language) filter, e.g. << 74400008 |Appendicitis|, returns all descendants.
  • CodeSystem/$subsumes tests whether one concept is a subtype of another.
  • Post-coordinated expressions can be carried in Coding.code with the SNOMED CT system URI (http://snomed.info/sct), though support varies between systems, so check your terminology server.

5. When the Terminology Itself Changes

SNOMED International publishes releases regularly, and over the life of a long record, concepts can be retired, replaced or split. SNOMED CT handles this with Historical Association Reference Sets, machine-readable maps such as REPLACED BY, SAME AS, POSSIBLY EQUIVALENT TO and MAY BE A. These keep decade-old records connected to current concepts, so analytics and decision support do not break.

Note that some associations point to more than one candidate, so migrating old data is not always automatic and sometimes needs clinical review.


Is It a "Single Source of Truth"?

Close, with one precision: SNOMED CT is the single source of truth for meaning, not for the patient record. It helps to ensure that:

  • Semantic drift is prevented. Myocardial infarction means the same in the ED, in cardiology, in research and in billing.
  • FHIR bindings have teeth. Coded resources can be validated, queried and reasoned over, not just stored as free text.
  • Handovers stay coherent. The patient's narrative survives every transfer between departments.

The record's truth (what happened, when, and who said so) still lives in the EHR's data model, provenance and versioning.


Key Takeaways

  1. SNOMED CT supplies meaning; the EHR supplies time and workflow.
  2. Post-coordination absorbs shifting qualifiers without concept explosion.
  3. Subsumption means refining a diagnosis never hides the patient from broader queries.
  4. In FHIR, pair SNOMED CT codes with clinicalStatus, verificationStatus and Provenance to track the journey.
  5. Historical associations protect old records as the terminology evolves.

Note: SNOMED CT concept IDs and FHIR element behaviours above are illustrative. Verify against the current SNOMED International release and the FHIR R4 specification before implementing.