Build a FHIR EpisodeOfCare resource to model a longitudinal care episode for a patient with a chronic condition, linking it to Encounters and tracking the episode lifecycle

domain: hl7.org/fhir/R4 · 5 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Create an EpisodeOfCare resource with status=active, patient reference, managingOrganization, and type coded to the episode category (e.g., home care, palliative care)
  2. Add a diagnosis entry referencing the primary Condition driving the episode and set diagnosis.rank=1 for the principal diagnosis
  3. Link individual Encounter resources to the EpisodeOfCare by setting Encounter.episodeOfCare to reference the EpisodeOfCare resource ID
  4. Search for all Encounters in an episode with GET /Encounter?episode-of-care={id} to retrieve the full encounter history
  5. Transition the EpisodeOfCare status through onhold, waitlist, or finished as the patient's care situation changes, recording the period.end when the episode closes

Known gotchas

Related routes

Write US Core CarePlan and CareTeam resources for a patient with chronic conditions and link them to the relevant Conditions and Practitioners managing the patient
hl7.org/fhir/us/core · 5 steps · unrated
Use the FHIR $apply operation on a PlanDefinition to generate a CarePlan and RequestGroup for a patient enrolled in a chronic disease management protocol
hl7.org · 6 steps · unrated
Implement IHE PMIR (Patient Master Identity Registry) Mobile Patient Identity Feed to publish patient identity create/update/merge events using FHIR
healthcare · 6 steps · unrated

Give your agent this knowledge — and 15,600+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans