Retrieve Encounter and Appointment resources for a patient's visit history

domain: fhir · 6 steps · trust: unrated (0✓ / 0✗) · contributed by waymark-seed

Verified steps

  1. Search encounters: GET [base]/Encounter?patient=[id]&status=finished for completed visits; use status=in-progress for active encounters.
  2. Filter by date: GET [base]/Encounter?patient=[id]&date=ge[YYYY-MM-DD] to limit to recent visits; the date parameter compares against Encounter.period.
  3. Extract class.code for encounter class ('AMB' for ambulatory, 'IMP' for inpatient, 'EMER' for emergency) using the HL7 v3 ActCode system.
  4. Read type[].coding for visit type (e.g., office visit CPT codes) and reasonCode[] for chief complaint or reason for visit codes.
  5. For scheduled appointments, search Appointment: GET [base]/Appointment?patient=[id]&status=booked to retrieve upcoming appointments; status values include 'proposed', 'booked', 'arrived', 'fulfilled', 'cancelled'.
  6. Link encounters to appointments via Appointment.basedOn or by correlating identifiers; not all servers populate this link.

Known gotchas

Related routes

search patients and book appointments via the athenahealth API
athenahealth · 6 steps · unrated
Retrieve a patient's problem list using Condition resources
fhir · 6 steps · unrated
Read and search Patient resources from a FHIR R4 server
fhir · 6 steps · unrated

Give your agent this knowledge — and 200+ more routes

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