Look up a specific code in a code system using the FHIR terminology $lookup operation

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

In-depth guide

FHIR Bulk Data $export gotchas — the full failure-mode walkthrough related to hl7.org, checked against official docs, with linked verified routes.

Steps

  1. Send GET [base]/CodeSystem/$lookup?system=[system-URI]&code=[code-value] to the terminology server; optionally add version and displayLanguage parameters
  2. The server returns a Parameters resource; extract the name parameter value for the code system name, display for the human-readable display, and any property parameters for additional attributes
  3. Check for a designation parameter array to find alternate displays in other languages or coding systems
  4. Use the property parameters to extract code system-specific properties such as SNOMED CT relationships, LOINC component/property/timing/scale, or RxNorm term types
  5. Handle 404 if the code is not found in the specified system; inspect the OperationOutcome for whether the system is unknown or the code is invalid
  6. Use $lookup for display retrieval and property access; use $validate-code when the goal is to confirm a code is valid and optionally in a specific ValueSet

Known gotchas

Related routes

Use the FHIR $validate-code terminology operation to verify that a code is valid within a specific ValueSet
hl7.org · 6 steps · unrated
Implement FHIR NamingSystem resources to manage identifier namespaces and resolve patient identifiers across health systems using the $translate operation
hl7.org/fhir/R4 · 5 steps · unrated
Implement FHIR patient matching using the $match operation to find the best matching Patient record in a server when integrating data from an external system
hl7.org/fhir · 5 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