building-patient-timelines
Assemble a chronological patient timeline from OpenMed-extracted clinical events, normalizing dates and resolving relative time expressions on-device. Use when the user wants to build a patient timeline, order events from clinical notes, reconstruct a longitudinal history, plot a course of illness, or turn analyze_text/deidentify output into a sorted sequence of dated encounters, diagnoses, medications, and procedures. Covers temporal normalization (absolute and relative), event modeling toward FHIR Encounter/Condition.onsetDateTime, anchoring to a document/admission date, and handling undated
npx skills add maziyarpanahi/openmed --skill building-patient-timelines --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Building patient timelines A patient timeline is a chronologically ordered list of clinical events — diagnoses, medications, procedures, encounters — each carrying a normalized date. OpenMed gives you the **events** (via `analyze_text`) and the **clinical temporality** of each mention (current vs. historical, see `resolving-clinical-context`); this skill turns those into a sorted timeline. Everything runs **on-device** — de-identify first if the source notes contain PHI, and keep raw identifiers out of logs. ## When to use this skill After you have extracted entities from one or more notes and want them ordered in time: a longitudinal history, a "course of illness" view, a feed for a summary card, or a pre-step before FHIR export. If you only need to *extract* entities, use `extracting-clinical-entities`. If you need negation/temporality on a single mention, use `resolving-clinical-context`. ## Quick start ```python import datetime as dt import openmed note = ( "Discharge summary, 2024-03-12. Patient admitted 2024-03-08 with chest pain. " "History of type 2 diabetes diagnosed in 2019. Started on metformin two days " "after admission. Cardiac catheterization performed yesterday."
- When to use this skill
- Quick start
- Workflow
- Worked example: events → sorted timeline
- Hand-off to / from OpenMed
- Edge cases & gotchas
- Standards & references
What does the building-patient-timelines skill do?
Assemble a chronological patient timeline from OpenMed-extracted clinical events, normalizing dates and resolving relative time expressions on-device. Use when the user wants to build a patient timeline, order events from clinical notes, reconstruct a longitudinal history, plot a course of illness, or turn analyze_text/deidentify output into a sorted sequence of dated encounters, diagnoses, medications, and procedures. Covers temporal normalization (absolute and relative), event modeling toward FHIR Encounter/Condition.onsetDateTime, anchoring to a document/admission date, and handling undated
How do I install it?
Run `npx skills add maziyarpanahi/openmed --skill building-patient-timelines --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From maziyarpanahi/openmed, a repository with 4,851 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.