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.
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).
Filter by date range with date=ge[YYYY-MM-DD]&date=le[YYYY-MM-DD] to limit results to a clinical window.
Access valueQuantity.value and valueQuantity.unit for numeric results; check valueCodeableConcept for coded results; check component[] for panel observations like blood pressure.
Inspect Observation.status; typical values are 'final', 'preliminary', 'amended', 'cancelled'; exclude non-final statuses for clinical decision use.
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
Labs are often stored under LOINC codes but the exact code varies by panel vs. component; using a panel LOINC may not return individual result components unless the server disaggregates them.
Some EHRs also store results under local coding systems (e.g., CPT or proprietary codes) and may not return results when querying by LOINC alone if local codes are used instead.
Reference ranges in referenceRange[] are textual and not standardized; do not programmatically parse them without fallback handling for free-text values.
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