Clinia
Concepts

Condition Stories

Pre-computed longitudinal narratives that give AI agents full clinical context for a condition in a single read.

What it is

A condition story is a pre-computed Markdown narrative for a single clinical condition. It assembles all relevant information from the knowledge graph (onset, medications, labs, complications, monitoring status) into a single readable document. The relationships between conditions, medications, and labs are inferred by the clinical knowledge base.

Why condition stories?

A condition like Type 2 Diabetes Mellitus doesn't exist in isolation. Understanding it requires knowing:

  • When it was first diagnosed and across which sources
  • Which medications are currently treating it
  • Which labs monitor its control
  • Whether there are complications (CKD, neuropathy, retinopathy)
  • Whether those complications are being adequately monitored

This information is distributed across multiple nodes in the graph. A condition story assembles it once so an agent can get a complete and coherent portrait of the condition in a single place.

Example

# Type 2 Diabetes Mellitus

**Status:** Active since 2016-03
**Codes:** SNOMED 44054006 · ICD-10 E11.9
**Sources:** 3 sources (FHIR Bundle, Summary_20230907.xml, Labs_2023.xml)

## Current Treatment

| Medication    | Dose       | Since   |
| ------------- | ---------- | ------- |
| Metformin     | 1000mg BID | 2016-04 |
| Empagliflozin | 10mg QD    | 2020-08 |

## Monitoring Labs

| Lab             | Latest    | Date       | In Range |
| --------------- | --------- | ---------- | -------- |
| HbA1c           | 7.1%      | 2023-09-07 | ✓        |
| eGFR            | 52 mL/min | 2023-08-15 | ⚠ Low    |
| Fasting glucose | 118 mg/dL | 2023-09-07 | ✓        |

## Complications

- **Chronic Kidney Disease (Stage 3b)**: active since 2021
  - Complication of: Type 2 Diabetes Mellitus
  - Monitored by: eGFR, urine albumin/creatinine ratio
  - Last eGFR: 52 mL/min (below target of ≥60)

Token budget

Condition stories respect the token_budget parameter. The narrative engine prioritizes:

  1. Current status and onset
  2. Active medications
  3. Recent labs
  4. Complications and their monitoring status
  5. Historical details and source provenance

Lower budgets produce shorter summaries focused on the most clinically relevant information. A compact format gives a one-paragraph overview; narrative gives the full story with tables.

Accessing condition stories

Via MCP (see MCP Tools):

read_patient("/patient/{id}/conditions/active/{condition}/_story.md")
read_patient("/patient/{id}/conditions/active/{condition}/_story.md", format="compact")

Via REST (see REST API reference):

GET /patients/:patientId/read?path=/conditions/active/type_2_diabetes_mellitus/_story.md&format=narrative

See Read a Condition Story for a practical walkthrough.

On this page