--- type: "resource" title: "ValueSet" resource: "ValueSet" --- # ValueSet ## Introduction ## Scope and Usage The FHIR terminology specification is based on the concepts of code system and value set originally defined in [HL7 v3 Core Principles](http://www.hl7.org/documentcenter/public/standards/V3/core_principles/infrastructure/coreprinciples/v3modelcoreprinciples.html): Value sets have 2 aspects: - `[.compose](valueset-definitions#ValueSet.compose)`: A definition of which codes are intended to be in the value set ("intension") - `[.expansion](valueset-definitions#ValueSet.expansion)`: The list of codes that are actually in the value set under a given set of conditions ("extension") - see [Value Set Expansion](valueset#expansion) The `ValueSet` resource can carry either the `.compose` or the `.expansion`, both of them, or neither of them (if only the metadata is being represented). There is an ["$expand" operation](valueset-operation-expand) which can be used to ask a server to generate an expansion given the composition rules, in a particular context, and a ["$validate-code" operation](valueset-operation-validate-code) which can be used to ask a server to check whether a given code or concept is in the value set in a particular context. ## Boundaries and Relationships Value Sets are used by many resources: - Value sets use [CodeSystem](codesystem) resources by referring to them via their canonical reference. - Value sets are used in [StructureDefinition](structuredefinition), [OperationDefinition](operationdefinition#OperationDefinition), [Questionnaire](questionnaire), and other resources to specify the allowable contents for coded elements, or business rules for data processing - [ConceptMap resources](conceptmap) describe mappings between value sets - [DataRequirement](metadatatypes#DataRequirement) data types to specify data processing conditions For a full list of uses, see below. The Characteristics of the `ValueSet` resource are derived from Formal Value Set Definitions: - The ValueSet resource design is based on the functionality described in the [OMG CTS 2](http://www.omg.org/spec/CTS2/1.0/) specification, along with metadata in the HL7 Value Set Definition specification. Value set resources can be converted to CTS2 value set or code system instances. - The value set resource is aligned with the [Value Set Definition](https://confluence.hl7.org/display/VOC/Characteristics+of+a+Value+Set+Definition+%28VSD%29+Project) (VSD) project. Not all of the elements defined by the VSD are part of the base resource - some are defined as part of the [ValueSet Extensions](valueset-core). In the ValueSet resource, the `compose` element is the VSD "Content Logical definition". ## Background and Context When using value sets, proper differentiation between a code system and a value set is important. This is one very common area where significant clinical safety risks occur in practice. Implementers should be familiar with the content in [Using Codes in Resources](terminologies). ### ValueSet Identification A value set has 3 identifiers: - `ValueSet.id`: the [logical id](resource#id) on the system that holds the value set - this changes as it moves from server to server (this id, with the server address prepended, is called the 'literal identity' of the resource) - `ValueSet.url`: the canonical URL that never changes for this value set - it is the same in every copy. The element is named `url` rather than `uri` for legacy reasons and to strongly encourage providing a resolvable URL as the identifier whenever possible. Ideally, it should be a literal URL that is the location of the master version of the value set, though this is not always possible - `ValueSet.identifier`: A system/value pair that is used to identify the value set in other contexts (such as an OID in an [HL7 v3](https://www.hl7.org/implement/standards/product_brief.cfm?product_id=186) specification) In addition, any expansion for the value set also has `ValueSet.expansion.identifier` which uniquely identifies each expansion. For further information regarding resource identification, see [Resource Identity](resource#id). This means that each value set has 2 different URLs that can be used to reference it - its canonical URL (the `url` element), and its local location from which it may be retrieved (which includes the `id` element). Because it is common practice to copy (cache) value sets locally, most references to value sets use the canonical URL. > For example, the value sets published as part of FHIR all have a location ("literal") URI which is the URL where they may be accessed in the FHIR specification itself. Note, though, that while a new version of the FHIR Specification is being prepared, value sets that are published in the drafts will not be found in the current published FHIR specification at their canonical URL. Alternatively, the `identifier` and `version` elements may be used to reference this value set in a design, a profile, a [CDA](http://www.hl7.org/implement/standards/product_brief.cfm?product_id=7) template or [HL7 v3](https://www.hl7.org/implement/standards/product_brief.cfm?product_id=186) message (in the CD data type valueSet and valueSetVersion properties). These different contexts may make additional restrictions on the possible values of these elements. The `identifier` is generally not needed when using value sets in a FHIR context, where the canonical URL is always the focus. ### Intensional vs Extensional A value set may be described as intensional or extensional. The terms intensional and extensional come from the fields of mathematical logic and set theory. An intensionally defined value set may be algorithmically defined e.g. all codes with the word diabetes in the description. A key benefit of intensionally defined value sets is that their expansion can be dynamically updated without changing the value set definition. This helps healthcare organizations keep current for example, when new drugs (and their associated codes) become available or codes for diseases and other clinical concepts are added. Extensional value sets, meanwhile, are enumerated lists of codes where each code is listed individually. This gives the author and user of the value set more control over the which codes are in the value set, but there is a greater maintenance burden to ensure that the value set is kept up to date. ## Notes ## Composition Rules A value set can be a simple list of included codes, or it can be some kind of general selection criteria using the facilities provided by the [code system](codesystem). For these value sets: - Multiple `include` statements are cumulative - e.g. the value set contains the union of all the includes - Within an `include`, all the criterion apply -e.g. the value set contains the intersection of the criterion - Within an `include`, a single system with selection criteria may be listed, and/or one or more value sets may be listed - **`valueSet`(s) only**: Codes are 'selected' for inclusion if they are in all the referenced value sets - If a **`System` only** is specified, the following rules apply: - **no `concept` or `filter`**: All codes defined by the code system, independent of code status, are included - **`concept`**: Only the enumerated codes are selected - **`filter`**: Any codes meeting the filter criteria are selected - **`valueSet` and `System`**: Codes are 'selected' for inclusion if they are selected by the code system selection (after checking for `concept` and `filter`) and if they are in all the referenced value sets - If the system reference is not version specific and filters are present, then the contents of the value set are open and change over time as the underlying code systems are updated - The version reference may be the special value '`*`', which indicates that the value set includes codes from all versions of the code system. how to handle provision of the required versions and generation of expansions is at server discretion, including for poorly behaved code systems where a code changes in meaning). \[%impl-note%\] Use of this capability is subject to future clarification and conformance requirements based on implementation experience. \[%end-note%\] - Using the property filters is only possible where the code system in use defines the relevant properties. Note that in some cases the underlying code system defines the logical concepts but not the syntax for exercising them. In such cases, the literal definitions may be provided by a third party - In addition to include rules, codes may be excluded. Rules for interpretation of exclude statements match those for includes, but codes in the exclude statements are never in the value set - Value sets may include abstract codes - that is, codes designated by the underlying code system as not for use as a selectable concept in a particular context. These abstract codes are typically used as a grouping/searching mechanism, and can be included either by enumerating them, or by using a filter. - Any compose.exclude SHALL be processed such that excluded codes are not found in the expansion - Any compose.include SHALL NOT reference a CodeSystem supplement. - Any compose.exclude SHALL NOT reference a CodeSystem supplement. - Required CodeSystem supplements SHALL be declared using either the valueset-supplement extension, or the useSupplement $expand input parameter. ### Compose The rules for the content of the value set are found in the `ValueSet.compose` element, which are analogous to the Content Logical Definition (CLD) as defined by the [VSD Project](https://confluence.hl7.org/display/VOC/Characteristics+of+a+Value+Set+Definition+%28VSD%29+Project). The ValueSet compose is a set of instructions for what codes are in the ValueSet, and defined by the author consistent with the `ValueSet.description` The ValueSet composition can be defined in a number of ways: - By listing the codes that are in the ValueSet explicitly using `ValueSet.compose.include.concept` - By specifying the codes for inclusion using filter expressions in `ValueSet.compose.include.filter` - If the language in filter cannot be used, using the [Extension ValueSet.valueset-expression]([%extensions-location%]StructureDefinition-valueset-expression) to define some alternative expression, though this can only be evaluated by a system that understands the syntax used in the expression - For a few value sets, there is no formal expression, and the rules are expressed using the [Extension ValueSet.valueset-rules-text]([%extensions-location%]StructureDefinition-valueset-rules-text) that is not computable and is meant to be interpreted by a human. Such value sets are rare The first approach - listing codes explicitly - is called an 'extensional' definition; all the other ways are called 'intensional' definitions. ### Filters **Mapping from VSD to `ValueSet.compose`** | VSD Scenario | FHIR Implementation | | --- | --- | | When the `ValueSet.compose` is an expression (`ValueSet.expression`), declare the type of expression here | - `compose.include.filter.op` = "property" - `compose.include.filter.op` = regex - `compose.include.filter.value` = "property value" | | When the `ValueSet.compose` describes Concepts to include based on CodeSystem properties | `compose.include.filter.property` = "property name" Either the Value or Expression must be provided Value: - `compose.include.filter.op` = "=" - `compose.include.filter.value` =_the value_ Expression: - `compose.include.filter.op` = "regex" - `compose.include.filter.value` =_the Expression_ | | When the `ValueSet.compose` defines the types of relationships between concepts to include in the ValueSet Expansion | `compose.filter.property` = "RelationshipType" (note: filter property is a string in VSD, code in FHIR) - `compose.filter.property.op` = "=" - `compose.filter.property.value` = a code defined by the CodeSystem Example: to find all concepts in SNOMED CT with the SNOMED CT laterality qualifier relationship to the SNOMED CT concept "left": - `filter.property.name` = '272741003' - `filter.property.op` = '=' - `filter.property.value` = '7771000' | ### Using Filter Values The element `compose.include.filter.value` is a string. The actual format of the value depends on the value of `compose.include.filter.op` and/or the definitions of the underlying CodeSystem. The following rules apply (in order). - If the `op` is `regex`, the format is a regex expression - If the `op` is `exists`, the format is a [boolean](datatypes#boolean) (`true` or `false`) - If the `op` is `in` or `not-in`, the format is either a comma-separated list of [code](datatypes#code) values, or an absolute [uri](datatypes#uri), which is a canonical reference to a ValueSet. If the value is a code or list of codes, the interpretation of the codes is subject to the CodeSystem e.g. for SNOMED-CT reference sets. If the value is a valueSet uri, then commas and percents should be percent encoded - If the `property` is `concept`, the format is a [code](datatypes#code) - If the name in `property` refers to a [CodeSystem filter](codesystem#filters), the format is as defined in the filter table on the CodeSystem page, or as described in the applicable `CodeSystem.filter.value` - If the name in `property` refers to a [CodeSystem property](codesystem#defined-props), the format is as defined in the following table The format of `compose.include.filter.value` for Code System Properties depends on the property type: | string | Use the string directly | | --- | --- | | integer | Use the integer value directly | | boolean | Use `true` or `false` | | dateTime | Use ISO 8601 format, following the precision rules for the [dateTime](datatypes#dateTime) data type | | decimal | Use the decimal value directly | | code | Use the code directly | | Coding | Use the format `system`(|`version`)#`code`, which is effectively a [canonical](datatypes#canonical) reference to the CodeSystem, followed by # and then the code in the CodeSystem. There is no way to specify the display | For the ordered data types (integer, decimal and dateTime), the [search prefixes](search#prefix) can be used (eq, ne, gt, lt, ge, le, sa, eb, ap). Note that the Coding syntax is **not** the search syntax. #### Code Systems Note Each [Code System](codesystem) defines which filters can be used in `ValueSet.compose.include.filter`. All code systems have [base filters](codesystem#filter) and any additional filters defined in ([CodeSystem.filter)](codesystem-definitions#CodeSystem.filter). HL7 Terminology defines filters for various published code systems: - [LOINC](https://terminology.hl7.org/LOINC.html) - [SNOMED CT](https://terminology.hl7.org/SNOMEDCT.html) - [RxNorm](https://terminology.hl7.org/RxNorm.html) - [UCUM](https://terminology.hl7.org/UCUM.html) - [CPT](https://terminology.hl7.org/CPT.html) - [NDF-RT](https://terminology.hl7.org/NDFRT.html) ### Union and Intersection `ValueSet.compose` may reference other ValueSets. Intersection: - If the ValueSet definition contains references to multiple ValueSets within a single `ValueSet.compose.include` - The resulting expansion includes only those concepts that are in each expansion of the included ValueSets Union: - If the ValueSet definition contains references to ValueSets using multiple `ValueSet.compose.include` elements - The resulting expansion includes all concepts from the ValueSet expansions For expansion guidance, and how to manage _exclude_, see [Value Set Expansion](valueset#expansion) When a ValueSet definition includes other ValueSets, use the [ValueSet.valueset-compose-include-ValueSetTitle]([%extensions-location%]StructureDefinition-valueset-compose-include-valueSetTitle) extension to provide the human readable name of the included Value Set. ### Referencing CodeSystem Fragments The VSD Partition aligns with FHIR [CodeSystem Fragments](codesystem#fragments). Code System fragments are a unique and identifiable distinct segment of an overall Code System namespace. While most Code Systems are in essence one fragment and, therefore, do not have identifiable fragments, some Code Systems can be made up of a collection of distinct segments. SNOMED CT is an example of such a Code System. The SNOMED CT International Edition is the base fragment and can be used alone, but there are many distinct additional fragments that can be added to the international core to create what is known as a SNOMED CT Edition. The CodeSystem referenced in a `ValueSet.compose` may reference a CodeSystem fragment. ## ValueSet Alignment with VSD ### Author and Publisher Author, Steward and Publisher are roles associated with a Value Set Definition. ValueSet Author is the person or organization that creates and may modify the ValueSet. The Steward is the person or organization responsible for the content, maintenance and life cycle of the ValueSet. The Publisher is the person or organization that makes the ValueSet available. The publisher or a terminology server might provide the ValueSet expansions. In FHIR, `ValueSet.publisher` satisfies the requirements for both publisher and steward. ### Scope and Description Description and Purpose are standard elements that appear in many FHIR resources. Neither fully supports the intent of the VSD Scope element, however `ValueSet.description` does support Focus as defined in VSD. When a ValueSet definition includes other ValueSets, use `ValueSet.description` to provide information about the included value sets in context of the parent value set. Purpose may be used for the `ValueSet.author` to describe why the ValueSet was created. `ValueSet.description` may be used to provide the ValueSet Focus as described in VSD. Example: | Value Set Name | Description | | --- | --- | | Body Site Value Set | All SNOMED CT anatomic structures, locations, abnormal structures that can be considered to describe an anatomical site. | | Familial Hypercholesterolemia | This value set contains terms defining familial hypercholesterolemia, regardless of genetic origin. | ### Name and Title The VSD element _Name_ aligns with `ValueSet.title` which does not support preference or language. Use the [ValueSet.valueset-otherTitle extension]([%extensions-location%]StructureDefinition-valueset-otherTitle) when a language or preference is necessary. `ValueSet.title` or [ValueSet.valueset-otherTitle]([%extensions-location%]StructureDefinition-valueset-otherTitle) must be valued. ### Include Active Concepts Only VSD and FHIR support the constraining the $expand operation to return only active concepts as defined by the CodeSystem. The VSD element _ActiveOnly_ equal to TRUE is equivalent to `ValueSet.compose.inactive` equal to FALSE. ### Status The ValueSet resource defines a Value Set Definition _and_ a Value Set Expansion. VSD describes only the characteristics of the Value Set Definition. The VSD element _ActivityStatus_ aligns with `ValueSet.status`, which is the status of the entire ValueSet resource _with the exception of the_ `ValueSet.expansion`. This aligns with VSD using the word _definition_ to mean the Content Logical Definition _plus_ all the other non-expansion metadata. A Value Set Expansion is stateless. Note: `ValueSet.status` is bound with _required_ binding strength to the [PublicationStatus](valueset-publication-status) value set. The following table shows how the ActivityStatus values in VSD align with the values in the PublicationStatus Value Set Expansion. | VSD Activity Status Value | FHIR Publication Status Value | | --- | --- | | Preliminary | Draft | | Active | Active | | Inactive | Retired | | \* | Unknown | | Deleted | \* | \*There is no equivalent value in either VSD or the PublicationStatus Value Set. ## Display and Designations Concepts used in ValueSets can have a `display`, which is a short text that represents the meaning of the concept to human users in the context of the value set (which often has narrower meaning and therefore is amenable to shorter displays. If a display is not provided, the value set uses the [display from the code system](codesystem#designations) (which is the preferred approach, because overriding the display can lead to very unsafe outcomes). When a value set enumerates codes, it is sometimes useful to define an alternative display for the code that is to be used wherever the value set is expanded and used in a UI. This facility is provided to cover the following circumstances: - The system that defines the code or expression doesn't provide a display for this code (or any codes). - The system that defines the code or expression defines multiple choices for display. - The system provides a very long display name that is unnecessary or inappropriate in the context of this value set (e.g. a display name of "Glucose \[Mass/volume\] in Serum or Plasma --10 PM specimen" for LOINC code 48991-4, when the value set only includes Glucose mass/vol in serum/plasma codes). As the display names get longer, this becomes more important. Note that care must be taken in order to avoid "changing the meaning" of the concept by implying that it means something other than the explicit definition of the concept in the underlying code system (e.g., in the case above, using a display of "Glucose Concentration at 10pm"). For this reason, some contexts of use do not allow a display to be associated with a specific code in a value set. Any display name for a concept provided in the value set is for display to a human user. The display in the [Coding](datatypes#Coding) that results from a user selecting a concept from the expansion must be taken from the underlying code system definition, even if a value set is referenced explicitly in the Coding (e.g. by an [extension]([%extensions-location%]StructureDefinition-valueset-reference)). The correct display for a code can be determined by a [$lookup operation](codesystem-operation-lookup). Any alternative display specified in the value set would go in [CodeableConcept](datatypes#CodeableConcept).text, perhaps appended to the UI label for the matching data element. As an example, the [LOINC](http://loinc.org) code [`55423-8`](https://s.details.loinc.org/LOINC/55423-8.html?sections=Comprehensive) has a display value of "Number of steps in unspecified time Pedometer". A value set for a pick list in a patient generated data form might choose a simpler name: { "resourceType" : "ValueSet", "compose" : { "include" : \[{ "system" : "http://loinc.org", "concept" : \[{ "code" : "55423-8", "display" : "Step Count" }\] }\] } } The expansion generated by a terminology server will have this: { "resourceType" : "ValueSet", "expansion" : { "contains" : \[{ "system" : "http://loinc.org", "code" : "55423-8", "display" : "Step Count" }\] } } The expansion display is taken from the value set, and this is what is displayed in the pick list. Once the user picks the code, it will appear in the [Observation.code](observation-definitions#Observation.code) like this: { "resourceType" : "Observation", "code" : { "coding" : \[{ "system" : "http://loinc.org", "code" : "55423-8", "display" : "Number of steps in unspecified time Pedometer" }\], "text" : "Step Count" } } Note that the correct value for the display is not in the expansion above. The client can either omit the display, look it up using [$lookup](codesystem-operation-lookup), or the server might pre-populate it in the expansion: { "resourceType" : "ValueSet", "expansion" : { "contains" : \[{ "system" : "http://loinc.org", "code" : "55423-8", "display" : "Step Count", "designation" : \[{ "use" : { "system" : "http://snomed.info/sct", "code" : "900000000000003001" }, "value" : "Number of steps in unspecified time Pedometer" }\] }\] } } Irrespective of this, the display in the expansion always goes in [CodeableConcept.text](datatypes-definitions#CodeableConcept.text). ## StructureDefinition ### Elements (Simplified) - **[ValueSet](/valueset-definitions#ValueSet)** [0..*]: - A set of codes drawn from one or more code systems - **[ValueSet.url](/valueset-definitions#ValueSet.url)** [0..1]: [uri](/uri) Canonical identifier for this value set, represented as a URI (globally unique) - **[ValueSet.identifier](/valueset-definitions#ValueSet.identifier)** [0..*]: [Identifier](/Identifier) Additional identifier for the value set (business identifier) - **[ValueSet.version](/valueset-definitions#ValueSet.version)** [0..1]: [string](/string) Business version of the value set - **[ValueSet.versionAlgorithm[x]](/valueset-definitions#ValueSet.versionAlgorithm%5Bx%5D)** [0..1]: [string](/string), [Coding](/Coding) extensible:[version-algorithm](/valueset-version-algorithm) How to compare versions - **[ValueSet.name](/valueset-definitions#ValueSet.name)** [0..1]: [string](/string) Name for this value set (computer friendly) - **[ValueSet.title](/valueset-definitions#ValueSet.title)** [0..1]: [string](/string) Name for this value set (human friendly) - **[ValueSet.status](/valueset-definitions#ValueSet.status)** [1..1]: [code](/code) required:[publication-status](/valueset-publication-status) draft | active | retired | unknown - **[ValueSet.experimental](/valueset-definitions#ValueSet.experimental)** [0..1]: [boolean](/boolean) For testing only - never for real usage - **[ValueSet.date](/valueset-definitions#ValueSet.date)** [0..1]: [dateTime](/dateTime) Date last changed - **[ValueSet.publisher](/valueset-definitions#ValueSet.publisher)** [0..1]: [string](/string) Name of the publisher/steward (organization or individual) - **[ValueSet.contact](/valueset-definitions#ValueSet.contact)** [0..*]: [ContactDetail](/ContactDetail) Contact details for the publisher - **[ValueSet.description](/valueset-definitions#ValueSet.description)** [0..1]: [markdown](/markdown) Natural language description of the value set - **[ValueSet.useContext](/valueset-definitions#ValueSet.useContext)** [0..*]: [UsageContext](/UsageContext) The context that the content is intended to support - **[ValueSet.jurisdiction](/valueset-definitions#ValueSet.jurisdiction)** [0..*]: [CodeableConcept](/CodeableConcept) extensible:[jurisdiction](/valueset-jurisdiction) Jurisdiction of the authority that maintains the value set (if applicable) - **[ValueSet.immutable](/valueset-definitions#ValueSet.immutable)** [0..1]: [boolean](/boolean) Indicates whether or not any change to the content logical definition may occur - **[ValueSet.purpose](/valueset-definitions#ValueSet.purpose)** [0..1]: [markdown](/markdown) Why this value set is defined - **[ValueSet.copyright](/valueset-definitions#ValueSet.copyright)** [0..1]: [markdown](/markdown) Notice about intellectual property ownership, can include restrictions on use - **[ValueSet.copyrightLabel](/valueset-definitions#ValueSet.copyrightLabel)** [0..1]: [string](/string) Copyright holder and year(s) - **[ValueSet.approvalDate](/valueset-definitions#ValueSet.approvalDate)** [0..1]: [date](/date) When the ValueSet was approved by publisher - **[ValueSet.lastReviewDate](/valueset-definitions#ValueSet.lastReviewDate)** [0..1]: [date](/date) When the ValueSet was last reviewed by the publisher - **[ValueSet.effectivePeriod](/valueset-definitions#ValueSet.effectivePeriod)** [0..1]: [Period](/Period) When the ValueSet is expected to be used - **[ValueSet.topic](/valueset-definitions#ValueSet.topic)** [0..*]: [CodeableConcept](/CodeableConcept) example:[definition-topic](/valueset-definition-topic) E.g. Education, Treatment, Assessment, etc - **[ValueSet.author](/valueset-definitions#ValueSet.author)** [0..*]: [ContactDetail](/ContactDetail) Who authored the ValueSet - **[ValueSet.editor](/valueset-definitions#ValueSet.editor)** [0..*]: [ContactDetail](/ContactDetail) Who edited the ValueSet - **[ValueSet.reviewer](/valueset-definitions#ValueSet.reviewer)** [0..*]: [ContactDetail](/ContactDetail) Who reviewed the ValueSet - **[ValueSet.endorser](/valueset-definitions#ValueSet.endorser)** [0..*]: [ContactDetail](/ContactDetail) Who endorsed the ValueSet - **[ValueSet.relatedArtifact](/valueset-definitions#ValueSet.relatedArtifact)** [0..*]: [RelatedArtifact](/RelatedArtifact) Additional documentation, citations, etc - **[ValueSet.compose](/valueset-definitions#ValueSet.compose)** [0..1]: [BackboneElement](/BackboneElement) Content logical definition of the value set (CLD) - **[ValueSet.compose.lockedDate](/valueset-definitions#ValueSet.compose.lockedDate)** [0..1]: [date](/date) Fixed date for references with no specified version (transitive) - **[ValueSet.compose.inactive](/valueset-definitions#ValueSet.compose.inactive)** [0..1]: [boolean](/boolean) Whether inactive codes are in the value set - **[ValueSet.compose.include](/valueset-definitions#ValueSet.compose.include)** [1..*]: [BackboneElement](/BackboneElement) Include one or more codes from a code system or other value set(s) - **[ValueSet.compose.include.system](/valueset-definitions#ValueSet.compose.include.system)** [0..1]: [uri](/uri) The system the codes come from - **[ValueSet.compose.include.version](/valueset-definitions#ValueSet.compose.include.version)** [0..1]: [string](/string) Specific version of the code system referred to - **[ValueSet.compose.include.concept](/valueset-definitions#ValueSet.compose.include.concept)** [0..*]: [BackboneElement](/BackboneElement) A concept defined in the system - **[ValueSet.compose.include.concept.code](/valueset-definitions#ValueSet.compose.include.concept.code)** [1..1]: [code](/code) Code or expression from system - **[ValueSet.compose.include.concept.display](/valueset-definitions#ValueSet.compose.include.concept.display)** [0..1]: [string](/string) Text to display for this code for this value set in this valueset - **[ValueSet.compose.include.concept.designation](/valueset-definitions#ValueSet.compose.include.concept.designation)** [0..*]: [BackboneElement](/BackboneElement) Additional representations for this concept - **[ValueSet.compose.include.concept.designation.language](/valueset-definitions#ValueSet.compose.include.concept.designation.language)** [0..1]: [code](/code) required:[all-languages](/valueset-all-languages) Human language of the designation - **[ValueSet.compose.include.concept.designation.use](/valueset-definitions#ValueSet.compose.include.concept.designation.use)** [0..1]: [Coding](/Coding) extensible:[designation-use](/valueset-designation-use) Types of uses of designations - **[ValueSet.compose.include.concept.designation.additionalUse](/valueset-definitions#ValueSet.compose.include.concept.designation.additionalUse)** [0..*]: [Coding](/Coding) extensible:[designation-use](/valueset-designation-use) Additional ways how this designation would be used - **[ValueSet.compose.include.concept.designation.value](/valueset-definitions#ValueSet.compose.include.concept.designation.value)** [1..1]: [string](/string) The text value for this designation - **[ValueSet.compose.include.filter](/valueset-definitions#ValueSet.compose.include.filter)** [0..*]: [BackboneElement](/BackboneElement) Select codes/concepts by their properties (including relationships) - **[ValueSet.compose.include.filter.property](/valueset-definitions#ValueSet.compose.include.filter.property)** [1..1]: [code](/code) A property/filter defined by the code system - **[ValueSet.compose.include.filter.op](/valueset-definitions#ValueSet.compose.include.filter.op)** [1..1]: [code](/code) required:[filter-operator](/valueset-filter-operator) = | is-a | descendent-of | is-not-a | regex | in | not-in | generalizes | child-of | descendent-leaf | exists - **[ValueSet.compose.include.filter.value](/valueset-definitions#ValueSet.compose.include.filter.value)** [1..1]: [string](/string) Code from the system, or regex criteria, or boolean value for exists - **[ValueSet.compose.include.valueSet](/valueset-definitions#ValueSet.compose.include.valueSet)** [0..*]: [canonical](/canonical) Select the contents included in this value set - **[ValueSet.compose.include.copyright](/valueset-definitions#ValueSet.compose.include.copyright)** [0..1]: [markdown](/markdown) A copyright statement for the specific code system included in the value set - **[ValueSet.compose.exclude](/valueset-definitions#ValueSet.compose.exclude)** [0..*]: - Explicitly exclude codes from a code system or other value sets - **[ValueSet.compose.property](/valueset-definitions#ValueSet.compose.property)** [0..*]: [string](/string) Property to return if client doesn't override - **[ValueSet.expansion](/valueset-definitions#ValueSet.expansion)** [0..1]: [BackboneElement](/BackboneElement) Used when the value set is "expanded" - **[ValueSet.expansion.identifier](/valueset-definitions#ValueSet.expansion.identifier)** [0..1]: [uri](/uri) Identifies the value set expansion (business identifier) - **[ValueSet.expansion.next](/valueset-definitions#ValueSet.expansion.next)** [0..1]: [uri](/uri) Opaque urls for paging through expansion results - **[ValueSet.expansion.timestamp](/valueset-definitions#ValueSet.expansion.timestamp)** [1..1]: [dateTime](/dateTime) Time ValueSet expansion happened - **[ValueSet.expansion.total](/valueset-definitions#ValueSet.expansion.total)** [0..1]: [integer](/integer) Total number of codes in the expansion - **[ValueSet.expansion.offset](/valueset-definitions#ValueSet.expansion.offset)** [0..1]: [integer](/integer) Offset at which this resource starts - **[ValueSet.expansion.parameter](/valueset-definitions#ValueSet.expansion.parameter)** [0..*]: [BackboneElement](/BackboneElement) Parameter that controlled the expansion process - **[ValueSet.expansion.parameter.name](/valueset-definitions#ValueSet.expansion.parameter.name)** [1..1]: [string](/string) Name as assigned by the client or server - **[ValueSet.expansion.parameter.value[x]](/valueset-definitions#ValueSet.expansion.parameter.value%5Bx%5D)** [0..1]: [string](/string), [boolean](/boolean), [integer](/integer), [decimal](/decimal), [uri](/uri), [code](/code), [dateTime](/dateTime) Value of the named parameter - **[ValueSet.expansion.property](/valueset-definitions#ValueSet.expansion.property)** [0..*]: [BackboneElement](/BackboneElement) Additional information supplied about each concept - **[ValueSet.expansion.property.code](/valueset-definitions#ValueSet.expansion.property.code)** [1..1]: [code](/code) Identifies the property on the concepts, and when referred to in operations - **[ValueSet.expansion.property.uri](/valueset-definitions#ValueSet.expansion.property.uri)** [0..1]: [uri](/uri) Formal identifier for the property - **[ValueSet.expansion.contains](/valueset-definitions#ValueSet.expansion.contains)** [0..*]: [BackboneElement](/BackboneElement) Codes in the value set - **[ValueSet.expansion.contains.system](/valueset-definitions#ValueSet.expansion.contains.system)** [0..1]: [uri](/uri) System value for the code - **[ValueSet.expansion.contains.abstract](/valueset-definitions#ValueSet.expansion.contains.abstract)** [0..1]: [boolean](/boolean) If user cannot select this entry - **[ValueSet.expansion.contains.inactive](/valueset-definitions#ValueSet.expansion.contains.inactive)** [0..1]: [boolean](/boolean) If concept is inactive in the code system - **[ValueSet.expansion.contains.version](/valueset-definitions#ValueSet.expansion.contains.version)** [0..1]: [string](/string) Version in which this code/display is defined - **[ValueSet.expansion.contains.code](/valueset-definitions#ValueSet.expansion.contains.code)** [0..1]: [code](/code) Code - if blank, this is not a selectable code - **[ValueSet.expansion.contains.display](/valueset-definitions#ValueSet.expansion.contains.display)** [0..1]: [string](/string) User display for the concept - **[ValueSet.expansion.contains.designation](/valueset-definitions#ValueSet.expansion.contains.designation)** [0..*]: - Additional representations for this item - **[ValueSet.expansion.contains.property](/valueset-definitions#ValueSet.expansion.contains.property)** [0..*]: [BackboneElement](/BackboneElement) Property value for the concept - **[ValueSet.expansion.contains.property.code](/valueset-definitions#ValueSet.expansion.contains.property.code)** [1..1]: [code](/code) Reference to ValueSet.expansion.property.code - **[ValueSet.expansion.contains.property.value[x]](/valueset-definitions#ValueSet.expansion.contains.property.value%5Bx%5D)** [1..1]: [code](/code), [Coding](/Coding), [string](/string), [integer](/integer), [boolean](/boolean), [dateTime](/dateTime), [decimal](/decimal) Value of the property for this concept - **[ValueSet.expansion.contains.property.subProperty](/valueset-definitions#ValueSet.expansion.contains.property.subProperty)** [0..*]: [BackboneElement](/BackboneElement) SubProperty value for the concept - **[ValueSet.expansion.contains.property.subProperty.code](/valueset-definitions#ValueSet.expansion.contains.property.subProperty.code)** [1..1]: [code](/code) Reference to ValueSet.expansion.property.code - **[ValueSet.expansion.contains.property.subProperty.value[x]](/valueset-definitions#ValueSet.expansion.contains.property.subProperty.value%5Bx%5D)** [1..1]: [code](/code), [Coding](/Coding), [string](/string), [integer](/integer), [boolean](/boolean), [dateTime](/dateTime), [decimal](/decimal) Value of the subproperty for this concept - **[ValueSet.expansion.contains.contains](/valueset-definitions#ValueSet.expansion.contains.contains)** [0..*]: - Codes contained under this entry ## Mappings - [ValueSet Mappings](/valueset-mappings) — 33 mapping entries ## Implementation Guide ### implementationguide-ValueSet-core.xml ```xml <status value="draft"/> <date value="1970-01-01T10:00:00+10:00"/> <publisher value="HL7"/> <description value="Core profiles and extensions defined for the ValueSet resource"/> <definition> </definition> </ImplementationGuide> ``` ## Operations - [expand](/valueset-operation-expand) — Value Set Expansion — The definition of a value set is used to create a simple collection of codes suitable for use for data entry or validation. - [validate-code](/valueset-operation-validate-code) — Value Set based Validation — Validate that a coded value is in the set of codes allowed by a value set. [Full Operations](/valueset-operations) ## Resource Packs ### list-ValueSet-packs.xml ```xml <?xml version="1.0" encoding="UTF-8"?> <List xmlns="http://hl7.org/fhir"> <id value="ValueSet-packs"/> <status value="current"/> <mode value="working"/> <entry> <item> <reference value="ImplementationGuide/ValueSet-core"/> </item> </entry> </List> ``` ## Search Parameters - [code](/valueset-search#code) — **token** — This special parameter searches for codes in the value set. See additional notes on the ValueSet resource — `ValueSet.expansion.repeat(contains).code | ValueSet.compose.include.concept.code` - [context](/valueset-search#context) — **token** — A use context assigned to the value set — `(ValueSet.useContext.value.ofType(CodeableConcept))` - [context-quantity](/valueset-search#context-quantity) — **quantity** — A quantity- or range-valued use context assigned to the value set — `(ValueSet.useContext.value.ofType(Quantity)) | (ValueSet.useContext.value.ofType(Range))` - [context-type](/valueset-search#context-type) — **token** — A type of use context assigned to the value set — `ValueSet.useContext.code` - [context-type-quantity](/valueset-search#context-type-quantity) — **composite** — A use context type and quantity- or range-based value assigned to the value set — `ValueSet.useContext` - [context-type-value](/valueset-search#context-type-value) — **composite** — A use context type and value assigned to the value set — `ValueSet.useContext` - [date](/valueset-search#date) — **date** — The value set publication date — `ValueSet.date` - [description](/valueset-search#description) — **string** — The description of the value set — `ValueSet.description` - [expansion](/valueset-search#expansion) — **uri** — Identifies the value set expansion (business identifier) — `ValueSet.expansion.identifier` - [identifier](/valueset-search#identifier) — **token** — External identifier for the value set — `ValueSet.identifier` - [jurisdiction](/valueset-search#jurisdiction) — **token** — Jurisdiction of the authority that maintains the the value set — `ValueSet.jurisdiction` - [name](/valueset-search#name) — **string** — Computationally friendly name of the value set — `ValueSet.name` - [publisher](/valueset-search#publisher) — **string** — Name of the publisher of the value set — `ValueSet.publisher` - [reference](/valueset-search#reference) — **uri** — A code system included or excluded in the value set or an imported value set — `ValueSet.compose.include.system` - [status](/valueset-search#status) — **token** — The current status of the value set — `ValueSet.status` - [title](/valueset-search#title) — **string** — The human-friendly name of the value set — `ValueSet.title` - [url](/valueset-search#url) — **uri** — The uri that identifies the value set — `ValueSet.url` - [version](/valueset-search#version) — **token** — The business version of the value set — `ValueSet.version` - [effective](/valueset-search#effective) — **date** — The time during which the ValueSet is intended to be in use — `ValueSet.effectivePeriod` - [derived-from](/valueset-search#derived-from) — **reference** — A resource that the ValueSet is derived from — `ValueSet.relatedArtifact.where(type='derived-from').resource` - [predecessor](/valueset-search#predecessor) — **reference** — The predecessor of the ValueSet — `ValueSet.relatedArtifact.where(type='predecessor').resource` - [topic](/valueset-search#topic) — **token** — Topics associated with the ValueSet — `ValueSet.topic` - [experimental](/valueset-search#experimental) — **token** — Whether the ValueSet is experimental — `ValueSet.experimental` [Full Search Parameters](/valueset-search) ## Examples - [example](/valueset-example-example) — valueset-example — ValueSet Example using enumeration of codes (extensional) - [example-cpt-all](/valueset-example-example-cpt-all) — valueset-example-cpt-all — All CPT codes - [example-expansion](/valueset-example-example-expansion) — valueset-example-expansion — ValueSet Example using a prepared expansion - [example-filter](/valueset-example-example-filter) — valueset-example-filter — ValueSet Example using code filter (intensional) defined in a code system resource - [example-intensional](/valueset-example-example-intensional) — valueset-example-intensional — ValueSet Example using code filter (intensional) - [example-metadata](/valueset-example-example-metadata) — valueset-example-metadata — Example Value Set Metadata - [example-metadata-2](/valueset-example-example-metadata-2) — valueset-example-metadata-2 — Example Value Set Metadata v2 - [example-supplement](/valueset-example-example-supplement) — valueset-example-supplement — ValueSet Example using proeprty filter (intensional) defined in a supplement - [inactive](/valueset-example-inactive) — valueset-example-inactive — ValueSet including inactive concepts - [nhin-purposeofuse](/valueset-example-nhin-purposeofuse) — valueset-nhin-purposeofuse — NHIN Purpose of Use - [ucum-common](/valueset-example-ucum-common) — valueset-ucum-common — Common UCUM codes - [valueset-example](/valueset-example-valueset-example) — valueset-example - [valueset-example-cpt-all](/valueset-example-valueset-example-cpt-all) — valueset-example-cpt-all - [valueset-example-expansion](/valueset-example-valueset-example-expansion) — valueset-example-expansion - [valueset-example-filter](/valueset-example-valueset-example-filter) — valueset-example-filter - [valueset-example-inactive](/valueset-example-valueset-example-inactive) — valueset-example-inactive - [valueset-example-intensional](/valueset-example-valueset-example-intensional) — valueset-example-intensional - [valueset-example-metadata](/valueset-example-valueset-example-metadata) — valueset-example-metadata - [valueset-example-metadata-2](/valueset-example-valueset-example-metadata-2) — valueset-example-metadata-2 - [valueset-example-supplement](/valueset-example-valueset-example-supplement) — valueset-example-supplement - [valueset-example-yesnodontknow](/valueset-example-valueset-example-yesnodontknow) — valueset-example-yesnodontknow - [valueset-examples-header](/valueset-example-valueset-examples-header) — valueset-examples-header - [yesnodontknow](/valueset-example-yesnodontknow) — valueset-example-yesnodontknow — Yes/No/Don't know, for capturing a common answer set in questionnaires [Full Examples](/valueset-examples) ## Mapping Exceptions ### valueset-fivews-mapping-exceptions.xml ### Unmapped Elements - **FiveWs.what** — Unknown - **FiveWs.author** — Unknown - **FiveWs.actor** — Unknown - **FiveWs.cause** — Unknown - **FiveWs.where** — Unknown - **FiveWs.context** — Unknown - **FiveWs.source** — Unknown - **FiveWs.who** — Unknown - **FiveWs.grade** — Unknown - **FiveWs.planned** — Unknown - **FiveWs.done** — Unknown - **FiveWs.subject** — Unknown