Skip to main content
FHIR ValueSet/$validate-code membership check

Overview

Validates whether a code is a member of an implicit ValueSet. EHRbase uses this during composition validation to check if a submitted code falls within the allowed set for a template field. Supports the same ValueSet URL patterns as $expand.
FHIR clients typically call ValueSet search first as a preflight check to confirm the server supports the target ValueSet, then call $validate-code (or $expand) for the actual membership test. The two endpoints are independent - you can call $validate-code directly without the preflight if you already know the URL is supported.

Contract Parameters

string
default:"r4"
string
OMOP vocabulary release; defaults to the active release.
string
Header alternative to vocab_release; the header takes precedence.
FHIR wire version (r4, r4b, r5, or r6).
string
required
Implicit ValueSet URL.
string
System of the code; defaults to the ValueSet system.
string
required
Code to validate.
string
Expected display text.

Supported Patterns

All codes in a code system

Is SNOMED code 44054006 valid? (Yes, if it exists in the SNOMED vocabulary.)

Descendants of a concept (is-a filter)

Is “Type 2 diabetes mellitus” (44054006) a descendant of “Diabetes mellitus” (73211009)? (Yes.)

Parameters

Response (valid code)

Response Fields

string
Always Parameters.
array
FHIR result parameters.
string
result, display, or message.
boolean | null
Membership result.
string | null
Display or explanatory message.

Response (not a member)

Response (display mismatch)

Errors