Service base
The Provider directory is served from this same base, under the sameCapabilityStatement.
Operations
Each requires a valid API key (see Authentication). Each accepts GET with query parameters or POST with a FHIRParameters resource.
CodeSystem/$lookup— a code’s display and properties.CodeSystem/$validate-code— is this a real code in this code system?ValueSet/$expand— expand a value set to its member codes.ValueSet/$validate-code— is this code a member of this value set?metadata— theCapabilityStatement, or aTerminologyCapabilitieswith?mode=terminology.
Look up a code
property is repeatable and narrows what comes back. Leave it off and you get everything the
code system knows about the code.
Three ways to pass a code
The validate operations accept a code in three shapes. The first works everywhere; the other two are complex FHIR datatypes, which the operations framework only permits in a POST body — sent in a query string they return a400 explaining exactly that.
1. system + code — two separate parameters, GET or POST. The form used in every
example above.
2. coding — the two bundled as one object, POST only. In a real FHIR record a code
does not live as two loose fields; it lives as a Coding. This form lets you pass it
without taking it apart first:
CodeSystem/$validate-code the coding’s system stands in for url — the code
system is the thing being asked about.
3. codeableConcept — one concept, several labels, POST only. A CodeableConcept
is a single idea coded more than one way, and it validates as a member if any of its
codings is. This is the shape real clinical data actually has: exports routinely carry a
vendor-local coding alongside a standard one on the same element. The vendor label cannot
decide membership — no terminology server has ever heard of it — but the standard label
beside it can, and this form means you never have to guess which label to send:
message names each label’s own reason — an unrecognised
vendor system and a real code that simply is not in the set are different kinds of no.
And if the request could not actually be answered — the value set does not exist, a
shared parameter is invalid, a code system was unreachable — the whole request answers
with that error rather than a false. “We could not ask” is never reported as “no”, and
the concept form always agrees with what the plain system + code form would say.
Two details of how codings are read:
- Per-coding membership ignores each coding’s
display. A display mismatch fails validation even when the code is a member, and a vendor-worded label must not veto a right code. Display checking is available on the single-codingform, where the response tells you the code was valid and only the label differed. coding.versionis honoured on the CodeSystem operations and refused on ValueSet validation (which always uses the current code-system version) rather than being silently ignored.
Value sets and code systems are addressed by canonical URL only (the
url
parameter). Instance-level operation paths (/ValueSet/{id}/$validate-code) are not
offered: this service hosts published definitions whose canonical URLs are their
identity, so there are no server-assigned ids to address.Validating against a hosted value set
Some published value sets are defined as a rule rather than a list — “every code in this system with such-and-such property” — and resolve to tens of thousands of members. This service hosts a number of those definitions and answers membership for them directly, so you can ask about a code without expanding anything:GET /v1/fhir/r4/metadata?mode=terminology lists the value sets and code systems this service
answers for. A canonical it does not host and cannot resolve upstream is refused with an
OperationOutcome, never answered with a guess.
Several operations in one request
POST a FHIRBundle with type: batch to the service base. Entries are independent: one
unknown code does not fail the others, and each carries its own status.
Responses and errors
Success returns standard FHIR: aParameters for $lookup and $validate-code, a ValueSet
for $expand.
Every error is a FHIR OperationOutcome, with issue.code telling you what kind of problem
it is.
Two things worth knowing:
- A code that is not in a value set is a successful
200with"result": false, not an error. result: falsecan also mean the display you sent does not match. If you passdisplay, it is checked against the code’s real display, and a mismatch returnsfalsewith the expected display alongside it. The code is fine; only the label differs. Vendor labels differ from published displays routinely, so do not read that as an invalid code.
diagnostics.
Code systems
Legal
This material contains content from LOINC (http://loinc.org). LOINC is copyright © Regenstrief Institute, Inc. and the Logical Observation Identifiers Names and Codes (LOINC) Committee and is available at no cost under the license at http://loinc.org/license. LOINC® is a registered United States trademark of Regenstrief Institute, Inc. Some individual codes carry a further copyright held by whoever created the underlying instrument, most often a survey or assessment. Where one does, it comes back with the code as anEXTERNAL_COPYRIGHT_NOTICE property, and you must keep it with the code wherever you use it.
FHIR® is the registered trademark of Health Level Seven International and its use here does not
constitute endorsement by HL7.
Full terms are at platform.haau3.com/terms.
For your first call, start with the Quickstart.