Inferensys

Glossary

ValueSet

A FHIR resource defining a curated set of codes drawn from one or more code systems, intended for use in a specific clinical context, such as a drop-down list in a questionnaire.
Developer building agentic RAG system, retrieval pipeline diagram on laptop, technical workspace with notes.
TERMINOLOGY BINDING

What is ValueSet?

A ValueSet is a FHIR resource that defines a curated, intentionally constrained set of codes drawn from one or more code systems, intended for use in a specific clinical context such as a drop-down list in a questionnaire or a validation rule in a data element.

A ValueSet is a terminology resource that specifies a group of codes for a particular purpose, defining which concepts are allowed, recommended, or excluded in a given clinical context. It acts as a binding mechanism between a data element—such as a field in a FHIR profile—and the actual coded values that can populate it. A ValueSet can be defined intensionally via logical rules (e.g., "all codes descending from a SNOMED CT parent") or extensionally by explicitly enumerating each permitted code.

ValueSets are critical for interoperability because they constrain the infinite space of possible medical codes into clinically meaningful subsets. For example, a ValueSet for "Blood Pressure Measurement Method" might include only a handful of LOINC codes, preventing a clinician from accidentally selecting an irrelevant concept. The FHIR TerminologyService API uses ValueSets for operations like $validate-code and $expand, enabling real-time validation of coded data against these defined constraints.

CLINICAL TERMINOLOGY BINDING

Key Features of ValueSet

A ValueSet is a FHIR resource that defines a curated, context-specific set of codes drawn from one or more code systems, enabling precise data validation and consistent clinical data entry.

01

Terminology Binding Mechanism

The primary function of a ValueSet is to act as a binding between a data element in a questionnaire or profile and a specific set of allowed codes. This ensures that when a clinician selects a diagnosis or a lab test, the code is drawn from a controlled, authoritative list. The binding strength can be required (must use codes from the set), extensible (must use codes from the set if applicable, but can add local codes), or example (a suggestion only). This mechanism is the cornerstone of semantic interoperability in FHIR.

02

Compositional Logic

ValueSets are not simple flat lists; they are built using powerful compositional rules. A ValueSet can be defined by:

  • Include/Exclude Filters: Explicitly including or excluding specific codes or entire hierarchies from a code system like SNOMED CT.
  • Intensional Definition: Using logical rules, such as 'all codes that are descendants of the concept Cardiovascular Disease'.
  • Extensional Definition: Explicitly listing every single code in the set. This allows for the creation of both simple, static lists and complex, dynamically-resolved sets of clinical concepts.
03

Code System Agnosticism

A single ValueSet can aggregate codes from multiple, disparate code systems to form a single, unified list for a clinical context. For example, a ValueSet for 'Smoking Status' might include codes from SNOMED CT for clinical findings, LOINC for the assessment question, and HL7 v3 administrative codes. This agnosticism allows implementers to create a single binding point that harmonizes different terminological standards without forcing a single code system on all use cases.

04

FHIR Terminology Service Integration

ValueSets are designed to be consumed and processed by a FHIR TerminologyService. A client application can send a ValueSet's canonical URL to a terminology server and request operations like $expand (to get the full, resolved list of codes at that moment) or $validate-code (to check if a specific code is a member of the set). This server-side processing is critical for handling intensional ValueSets that may resolve to thousands of codes, offloading the computational logic from the client application.

05

Versioning and Governance

ValueSets are versioned resources with a canonical URL, allowing for strict governance over their lifecycle. When a medical guideline changes, a new version of the ValueSet can be published, and systems can be updated to bind to the new version. This prevents the 'drift' that occurs when code lists are managed in spreadsheets. The ValueSet.expansion element can even contain a timestamped, point-in-time snapshot of the resolved codes, ensuring auditability and reproducibility of the code set used for a specific clinical decision or research query.

06

Authoring with FHIR Shorthand (FSH)

While ValueSets can be authored in raw JSON or XML, the FHIR Shorthand (FSH) language provides a far more concise and human-readable syntax. A complex intensional ValueSet can be defined in a few lines of FSH, which is then compiled into the full FHIR resource. This dramatically reduces the barrier to creating and maintaining high-quality terminology artifacts, enabling clinical informaticists to define precise code sets without needing deep expertise in the underlying JSON structure.

VALUESET CLARIFIED

Frequently Asked Questions

A ValueSet is a fundamental FHIR terminology resource that defines a curated, context-specific set of codes drawn from one or more code systems. It answers the question, 'Which codes are allowed here?' for a given clinical context, such as a drop-down list in a questionnaire or a coded element in a diagnostic report.

A ValueSet is a FHIR resource that defines a curated set of codes drawn from one or more CodeSystem resources, intended for use in a specific clinical context. It acts as a binding mechanism, specifying exactly which codes are permissible for a particular data element in a questionnaire, profile, or decision support rule. A ValueSet can be defined intensionally—by specifying a set of rules or filters that dynamically select codes from a terminology (e.g., 'all descendants of the SNOMED CT concept Diabetes mellitus')—or extensionally—by explicitly listing each allowed code. This dual approach allows ValueSets to remain current as terminologies evolve or to be locked to a specific version for regulatory submissions. The ValueSet resource itself contains metadata, a compose element that defines the inclusion and exclusion criteria, and an optional expansion element that contains the actual list of resolved codes at a given point in time.

Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.