Query Observation resources using LOINC codes to retrieve lab results and vital signs

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

Steps

  1. Search observations for a patient filtered by LOINC code: GET [base]/Observation?patient=[id]&code=http://loinc.org|[LOINC-code]; use the canonical LOINC system URI http://loinc.org.
  2. To query multiple LOINC codes at once, use a comma-separated list: code=http://loinc.org|2160-0,http://loinc.org|33914-3 (this is an OR within the code parameter).
  3. Filter by date range with date=ge[YYYY-MM-DD]&date=le[YYYY-MM-DD] to limit results to a clinical window.
  4. Access valueQuantity.value and valueQuantity.unit for numeric results; check valueCodeableConcept for coded results; check component[] for panel observations like blood pressure.
  5. Inspect Observation.status; typical values are 'final', 'preliminary', 'amended', 'cancelled'; exclude non-final statuses for clinical decision use.
  6. For vital sign panels (e.g., blood pressure), retrieve the component array: component[0].code (systolic LOINC) and component[0].valueQuantity, and similarly for component[1] (diastolic).

Known gotchas

Related routes

write vital-sign Observations to FHIR R4 with correct LOINC codes and UCUM units
fhir · 6 steps · unrated
Implement US Core 7.0.0 Observation laboratory result search and display
hl7.org/fhir/us/core · 5 steps · unrated
Implement SMART App Launch v2 granular scopes for patient-specific Observation access
hl7.org/fhir/smart-app-launch · 5 steps · unrated

Give your agent this knowledge — and 15,500+ 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