工作组: Vocabulary ![]() | 成熟度: N | Normative (from v4.0.0) | Security Category: Anonymous | Compartments: Not linked to any defined compartments |
ValueSet资源从一个或多个编码系统中提取一组编码作为一个值域集的实例,用于特定场景中。 值域集将编码系统的定义和使用(详见在资源中使用编码)关联起来。
FHIR的术语规范是基于出自
HL7 v3核心原则
的两个关键概念:
CodeSystem
- 声明编码系统的存在,并对编码系统或它的补充及其关键属性进行描述。可选择性的定义它的部分或全部内容。也称为本体论、术语或字典。
ValueSet
- 指定从一个或多个编码系统中提取的一组编码,用于特定场景。 值域集将 编码系统的定义 和 它们在编码元素中的使用 关联起来。
值域集包含两个关键元素:
.compose(组成):
定义值域集包含会哪些编码(“内涵”)。.expansion(展开):
在指定的一系列条件下,实际包含在值域集中的编码列表(“外延”)。可参见值域集展开
ValueSet 资源中可以包含.compose或.expansion元素,也可以两个同时包含或者一个都不含(如果仅当做元数据使用时)。
ValueSet支持"$expand" 操作,可在特定场景下请求服务器根据给出的组合规则生成ValueSet展开内容;
"$validate-code" 操作 可用于在特定场景下请求服务器检查给定编码或概念是否包含在值域集中。
很多资源都会使用到值域集:
有关完整的用途列表,请参阅下文。
ValueSet资源的特性源自(其他规范对)值域集的定义:
规范的功能要求和HL7规范对值域集元数据的定义要求来设计的。值域集资源可以转换为CTS2值域集或编码系统实例。
要求。VSD要求的元素一部分定义在ValueSet基础资源里,另一部分定义为值域集的展开。ValueSet资源中的.compose元素是VSD“内容的逻辑定义”。
使用值域集时,正确理解编码系统和值域集之的区别很重要。在实践中常常会在这里出现重大的临床安全风险。 实施者应对在资源中使用编码章节的内容很熟悉。
值域集有3个可作为标识的元素:
ValueSet.id: 此值域集在保存它的系统中的逻辑ID,即当它在服务器之间迁移时此ID会发生更改(此ID与其前置的服务器地址一起,称为此资源的“原文标识”)。
ValueSet.url: 此值域集的规范URL,它永远都不会变更且在每个副本中都是相同的。由于遗留原因,此元素被命名为url 而不是uri,
并强烈建议尽可能提供可解析的url作为标识符。
理想情况下,它应该是此值域集的主版本的URL地址,尽管并不是都能做到。
ValueSet.identifier: 系统/值组成的一对标识符,用于标识其他场景的值域集(例如
HL7 v3
规范中的OID)
此外,值域集的展开元素下也可有一个ValueSet.expansion.identifier元素,用于标识此展开的唯一性。有关资源标识的更多信息,请参阅资源标识。
这意味着每个值域集都有两个不同的URL可以用来引用它——规范的URL(url 元素)和本地位置(包括id 元素,可以用来获取值域集资源实例)。
因为在本地复制(缓存)值域集是常见的做法,所以对值域集的大多数引用都使用规范的URL。
例如,值域集作为FHIR的一部分发布,它都有一个位置(“原文的”)URI,这是可以在发布它的FHIR规范中被访问的URL。 不过,请注意,尽管正在准备新版本的FHIR规范,但在当前发布的FHIR规范中,在其规范URL处将找不到草稿中发布的值域集。
(译者注:已发布的标准和草稿中的规范URL是相同的,但其逻辑id不同,其内容和格式可能相同但却不是同一个值域集实例。)
另外,设计、配置FHIR、
CDA
模板
或HL7 v3消息(在CD数据类型的值域集和valueSetVersion属性中)可能会用到标识符identifier元素和版本version元素来引用此值域集。
在这些不同场景可能会对这些元素的取值范围进行额外的限制。在FHIR场景中使用值域集通常关注其规范URL,不需要标识符。
值域集可以通过的内涵或外延来描述它。“内涵”和“外延”这两个术语来自于数学逻辑和集合论的领域。
通常内涵值域集是由算法定义的。也就是说, 编码组被定义成一种规则(例如, 在其描述中涵盖糖尿病一词的所有编码)。 内涵编码组的主要优点是可以动态更新。动态更新可帮助卫生组织在有新药 (及其相关编码)可用时或疾病编码和其他临床概念发生变化时保持最新状态。 用于包含β受体阻滞剂类别中的所有药物的内涵值域集可以在新的β受体阻滞剂进入市场后立即自动接收该编码。
另一方面, 外延值域集是枚举的编码列表, 其中每个编码都单独列出。 这使值域集的作者和用户可以更好地控制值域集中的编码, 但为了让值域集保持最新,这种方式的维护量会更大。
此资源由以下资源引用: DataRequirement, ElementDefinition, CodeSystem, ConceptMap, ObservationDefinition, OperationDefinition, Questionnaire, ResearchElementDefinition and itself
结构
| 名称 | 标志 | 基数 | 类型 |
描述 & 约束
|
|---|---|---|---|---|
![]() | IN | DomainResource | A set of codes drawn from one or more code systems + Warning: Name should be usable as an identifier for the module by machine processing applications such as code generation Elements defined in Ancestors: id, meta, implicitRules, language, text, contained, extension, modifierExtension | |
![]() ![]() | Σ | 0..1 | uri | Canonical identifier for this value set, represented as a URI (globally unique) |
![]() ![]() | Σ | 0..* | Identifier | Additional identifier for the value set (business identifier) |
![]() ![]() | Σ | 0..1 | string | Business version of the value set |
![]() ![]() | ΣI | 0..1 | string | Name for this value set (computer friendly) |
![]() ![]() | Σ | 0..1 | string | Name for this value set (human friendly) |
![]() ![]() | ?!Σ | 1..1 | code | draft | active | retired | unknown PublicationStatus (Required) |
![]() ![]() | Σ | 0..1 | boolean | For testing purposes, not real usage |
![]() ![]() | Σ | 0..1 | dateTime | Date last changed |
![]() ![]() | Σ | 0..1 | string | Name of the publisher (organization or individual) |
![]() ![]() | Σ | 0..* | ContactDetail | Contact details for the publisher |
![]() ![]() | 0..1 | markdown | Natural language description of the value set | |
![]() ![]() | ΣTU | 0..* | UsageContext | The context that the content is intended to support |
![]() ![]() | Σ | 0..* | CodeableConcept | Intended jurisdiction for value set (if applicable) Jurisdiction (Extensible) |
![]() ![]() | Σ | 0..1 | boolean | Indicates whether or not any change to the content logical definition may occur |
![]() ![]() | 0..1 | markdown | Why this value set is defined | |
![]() ![]() | 0..1 | markdown | Use and/or publishing restrictions | |
![]() ![]() | 0..1 | BackboneElement | Content logical definition of the value set (CLD) | |
![]() ![]() ![]() | Σ | 0..1 | date | Fixed date for references with no specified version (transitive) |
![]() ![]() ![]() | Σ | 0..1 | boolean | Whether inactive codes are in the value set |
![]() ![]() ![]() | ΣI | 1..* | BackboneElement | Include one or more codes from a code system or other value set(s) + Rule: A value set include/exclude SHALL have a value set or a system + Rule: A value set with concepts or filters SHALL include a system + Rule: Cannot have both concept and filter |
![]() ![]() ![]() ![]() | ΣI | 0..1 | uri | The system the codes come from |
![]() ![]() ![]() ![]() | Σ | 0..1 | string | Specific version of the code system referred to |
![]() ![]() ![]() ![]() | I | 0..* | BackboneElement | A concept defined in the system |
![]() ![]() ![]() ![]() ![]() | 1..1 | code | Code or expression from system | |
![]() ![]() ![]() ![]() ![]() | 0..1 | string | Text to display for this code for this value set in this valueset | |
![]() ![]() ![]() ![]() ![]() | 0..* | BackboneElement | Additional representations for this concept | |
![]() ![]() ![]() ![]() ![]() ![]() | 0..1 | code | Human language of the designation Common Languages (Preferred but limited to AllLanguages) | |
![]() ![]() ![]() ![]() ![]() ![]() | 0..1 | Coding | Types of uses of designations Designation Use (Extensible) | |
![]() ![]() ![]() ![]() ![]() ![]() | 1..1 | string | The text value for this designation | |
![]() ![]() ![]() ![]() | ΣI | 0..* | BackboneElement | Select codes/concepts by their properties (including relationships) |
![]() ![]() ![]() ![]() ![]() | Σ | 1..1 | code | A property/filter defined by the code system |
![]() ![]() ![]() ![]() ![]() | Σ | 1..1 | code | = | is-a | descendent-of | is-not-a | regex | in | not-in | generalizes | exists FilterOperator (Required) |
![]() ![]() ![]() ![]() ![]() | Σ | 1..1 | string | Code from the system, or regex criteria, or boolean value for exists |
![]() ![]() ![]() ![]() | ΣI | 0..* | canonical(ValueSet) | 选择此值域集中包含的内容 |
![]() ![]() ![]() | I | 0..* | see include | Explicitly exclude codes from a code system or other value sets |
![]() ![]() | 0..1 | BackboneElement | Used when the value set is "expanded" | |
![]() ![]() ![]() | 0..1 | uri | Identifies the value set expansion (business identifier) | |
![]() ![]() ![]() | 1..1 | dateTime | Time ValueSet expansion happened | |
![]() ![]() ![]() | 0..1 | integer | Total number of codes in the expansion | |
![]() ![]() ![]() | 0..1 | integer | Offset at which this resource starts | |
![]() ![]() ![]() | 0..* | BackboneElement | Parameter that controlled the expansion process | |
![]() ![]() ![]() ![]() | 1..1 | string | Name as assigned by the client or server | |
![]() ![]() ![]() ![]() | 0..1 | Value of the named parameter | ||
![]() ![]() ![]() ![]() ![]() | string | |||
![]() ![]() ![]() ![]() ![]() | boolean | |||
![]() ![]() ![]() ![]() ![]() | integer | |||
![]() ![]() ![]() ![]() ![]() | decimal | |||
![]() ![]() ![]() ![]() ![]() | uri | |||
![]() ![]() ![]() ![]() ![]() | code | |||
![]() ![]() ![]() ![]() ![]() | dateTime | |||
![]() ![]() ![]() | I | 0..* | BackboneElement | Codes in the value set + Rule: SHALL have a code or a display + Rule: Must have a code if not abstract + Rule: Must have a system if a code is present |
![]() ![]() ![]() ![]() | 0..1 | uri | System value for the code | |
![]() ![]() ![]() ![]() | 0..1 | boolean | If user cannot select this entry | |
![]() ![]() ![]() ![]() | 0..1 | boolean | If concept is inactive in the code system | |
![]() ![]() ![]() ![]() | 0..1 | string | Version in which this code/display is defined | |
![]() ![]() ![]() ![]() | I | 0..1 | code | Code - if blank, this is not a selectable code |
![]() ![]() ![]() ![]() | I | 0..1 | string | User display for the concept |
![]() ![]() ![]() ![]() | 0..* | see designation | Additional representations for this item | |
![]() ![]() ![]() ![]() | 0..* | see contains | Codes contained under this entry | |
Documentation for this format | ||||
UML Diagram (Legend)
XML Template
<ValueSet xmlns="http://hl7.org/fhir"><!-- from Resource: id, meta, implicitRules, and language --> <!-- from DomainResource: text, contained, extension, and modifierExtension --> <url value="[uri]"/><!-- 0..1 Canonical identifier for this value set, represented as a URI (globally unique) --> <identifier><!-- 0..* Identifier Additional identifier for the value set (business identifier) --></identifier> <version value="[string]"/><!-- 0..1 Business version of the value set --> <name value="[string]"/><!--
0..1 Name for this value set (computer friendly) --> <title value="[string]"/><!-- 0..1 Name for this value set (human friendly) --> <status value="[code]"/><!-- 1..1 draft | active | retired | unknown --> <experimental value="[boolean]"/><!-- 0..1 For testing purposes, not real usage --> <date value="[dateTime]"/><!-- 0..1 Date last changed --> <publisher value="[string]"/><!-- 0..1 Name of the publisher (organization or individual) --> <contact><!-- 0..* ContactDetail Contact details for the publisher --></contact> <description value="[markdown]"/><!-- 0..1 Natural language description of the value set --> <useContext><!-- 0..* UsageContext The context that the content is intended to support --></useContext> <jurisdiction><!-- 0..* CodeableConcept Intended jurisdiction for value set (if applicable) --></jurisdiction> <immutable value="[boolean]"/><!-- 0..1 Indicates whether or not any change to the content logical definition may occur --> <purpose value="[markdown]"/><!-- 0..1 Why this value set is defined --> <copyright value="[markdown]"/><!-- 0..1 Use and/or publishing restrictions --> <compose> <!-- 0..1 Content logical definition of the value set (CLD) --> <lockedDate value="[date]"/><!-- 0..1 Fixed date for references with no specified version (transitive) --> <inactive value="[boolean]"/><!-- 0..1 Whether inactive codes are in the value set --> <include> <!-- 1..* Include one or more codes from a code system or other value set(s) --> <system value="[uri]"/><!--
0..1 The system the codes come from --> <version value="[string]"/><!-- 0..1 Specific version of the code system referred to --> <concept> <!--
0..* A concept defined in the system --> <code value="[code]"/><!-- 1..1 Code or expression from system --> <display value="[string]"/><!-- 0..1 Text to display for this code for this value set in this valueset --> <designation> <!-- 0..* Additional representations for this concept --> <language value="[code]"/><!-- 0..1 Human language of the designation --> <use><!-- 0..1 Coding Types of uses of designations --></use> <value value="[string]"/><!-- 1..1 The text value for this designation --> </designation> </concept> <filter> <!--
0..* Select codes/concepts by their properties (including relationships) --> <property value="[code]"/><!-- 1..1 A property/filter defined by the code system --> <op value="[code]"/><!-- 1..1 = | is-a | descendent-of | is-not-a | regex | in | not-in | generalizes | exists --> <value value="[string]"/><!-- 1..1 Code from the system, or regex criteria, or boolean value for exists --> </filter> <valueSet><!--
0..* canonical(ValueSet) 选择此值域集中包含的内容 --></valueSet> </include> <exclude><!--
0..* Content as for ValueSet.compose.include Explicitly exclude codes from a code system or other value sets --></exclude> </compose> <expansion> <!-- 0..1 Used when the value set is "expanded" --> <identifier value="[uri]"/><!-- 0..1 Identifies the value set expansion (business identifier) --> <timestamp value="[dateTime]"/><!-- 1..1 Time ValueSet expansion happened --> <total value="[integer]"/><!-- 0..1 Total number of codes in the expansion --> <offset value="[integer]"/><!-- 0..1 Offset at which this resource starts --> <parameter> <!-- 0..* Parameter that controlled the expansion process --> <name value="[string]"/><!-- 1..1 Name as assigned by the client or server --> <value[x]><!-- 0..1 string|boolean|integer|decimal|uri|code|dateTime Value of the named parameter --></value[x]> </parameter> <contains> <!-- 0..* Codes in the value set --> <system value="[uri]"/><!-- 0..1 System value for the code --> <abstract value="[boolean]"/><!-- 0..1 If user cannot select this entry --> <inactive value="[boolean]"/><!-- 0..1 If concept is inactive in the code system --> <version value="[string]"/><!-- 0..1 Version in which this code/display is defined --> <code value="[code]"/><!--
0..1 Code - if blank, this is not a selectable code --> <display value="[string]"/><!--
0..1 User display for the concept --> <designation><!-- 0..* Content as for ValueSet.compose.include.concept.designation Additional representations for this item --></designation> <contains><!-- 0..* Content as for ValueSet.expansion.contains Codes contained under this entry --></contains> </contains> </expansion> </ValueSet>
JSON Template
{
"resourceType" : "ValueSet",
// from Resource: id, meta, implicitRules, and language
// from DomainResource: text, contained, extension, and modifierExtension
"url" : "<uri>", // Canonical identifier for this value set, represented as a URI (globally unique)
"identifier" : [{ Identifier }], // Additional identifier for the value set (business identifier)
"version" : "<string>", // Business version of the value set
"name" : "<string>", // C? Name for this value set (computer friendly)
"title" : "<string>", // Name for this value set (human friendly)
"status" : "<code>", // R! draft | active | retired | unknown
"experimental" : <boolean>, // For testing purposes, not real usage
"date" : "<dateTime>", // Date last changed
"publisher" : "<string>", // Name of the publisher (organization or individual)
"contact" : [{ ContactDetail }], // Contact details for the publisher
"description" : "<markdown>", // Natural language description of the value set
"useContext" : [{ UsageContext }], // The context that the content is intended to support
"jurisdiction" : [{ CodeableConcept }], // Intended jurisdiction for value set (if applicable)
"immutable" : <boolean>, // Indicates whether or not any change to the content logical definition may occur
"purpose" : "<markdown>", // Why this value set is defined
"copyright" : "<markdown>", // Use and/or publishing restrictions
"compose" : { // Content logical definition of the value set (CLD)
"lockedDate" : "<date>", // Fixed date for references with no specified version (transitive)
"inactive" : <boolean>, // Whether inactive codes are in the value set
"include" : [{ // R! Include one or more codes from a code system or other value set(s)
"system" : "<uri>", // C? The system the codes come from
"version" : "<string>", // Specific version of the code system referred to
"concept" : [{ // C? A concept defined in the system
"code" : "<code>", // R! Code or expression from system
"display" : "<string>", // Text to display for this code for this value set in this valueset
"designation" : [{ // Additional representations for this concept
"language" : "<code>", // Human language of the designation
"use" : { Coding }, // Types of uses of designations
"value" : "<string>" // R! The text value for this designation
}]
}],
"filter" : [{ // C? Select codes/concepts by their properties (including relationships)
"property" : "<code>", // R! A property/filter defined by the code system
"op" : "<code>", // R! = | is-a | descendent-of | is-not-a | regex | in | not-in | generalizes | exists
"value" : "<string>" // R! Code from the system, or regex criteria, or boolean value for exists
}],
"valueSet" : [{ canonical(ValueSet) }] // C? 选择此值域集中包含的内容
}],
"exclude" : [{ Content as for ValueSet.compose.include }] // C? Explicitly exclude codes from a code system or other value sets
},
"expansion" : { // Used when the value set is "expanded"
"identifier" : "<uri>", // Identifies the value set expansion (business identifier)
"timestamp" : "<dateTime>", // R! Time ValueSet expansion happened
"total" : <integer>, // Total number of codes in the expansion
"offset" : <integer>, // Offset at which this resource starts
"parameter" : [{ // Parameter that controlled the expansion process
"name" : "<string>", // R! Name as assigned by the client or server
// value[x]: Value of the named parameter. One of these 7:
"valueString" : "<string>"
"valueBoolean" : <boolean>
"valueInteger" : <integer>
"valueDecimal" : <decimal>
"valueUri" : "<uri>"
"valueCode" : "<code>"
"valueDateTime" : "<dateTime>"
}],
"contains" : [{ // Codes in the value set
"system" : "<uri>", // System value for the code
"abstract" : <boolean>, // If user cannot select this entry
"inactive" : <boolean>, // If concept is inactive in the code system
"version" : "<string>", // Version in which this code/display is defined
"code" : "<code>", // C? Code - if blank, this is not a selectable code
"display" : "<string>", // C? User display for the concept
"designation" : [{ Content as for ValueSet.compose.include.concept.designation }], // Additional representations for this item
"contains" : [{ Content as for ValueSet.expansion.contains }] // Codes contained under this entry
}]
}
}
Turtle Template
@prefix fhir: <http://hl7.org/fhir/> .[ a fhir:ValueSet; fhir:nodeRole fhir:treeRoot; # if this is the parser root # from Resource: .id, .meta, .implicitRules, and .language # from DomainResource: .text, .contained, .extension, and .modifierExtension fhir:ValueSet.url [ uri ]; # 0..1 Canonical identifier for this value set, represented as a URI (globally unique) fhir:ValueSet.identifier [ Identifier ], ... ; # 0..* Additional identifier for the value set (business identifier) fhir:ValueSet.version [ string ]; # 0..1 Business version of the value set fhir:ValueSet.name [ string ]; # 0..1 Name for this value set (computer friendly) fhir:ValueSet.title [ string ]; # 0..1 Name for this value set (human friendly) fhir:ValueSet.status [ code ]; # 1..1 draft | active | retired | unknown fhir:ValueSet.experimental [ boolean ]; # 0..1 For testing purposes, not real usage fhir:ValueSet.date [ dateTime ]; # 0..1 Date last changed fhir:ValueSet.publisher [ string ]; # 0..1 Name of the publisher (organization or individual) fhir:ValueSet.contact [ ContactDetail ], ... ; # 0..* Contact details for the publisher fhir:ValueSet.description [ markdown ]; # 0..1 Natural language description of the value set fhir:ValueSet.useContext [ UsageContext ], ... ; # 0..* The context that the content is intended to support fhir:ValueSet.jurisdiction [ CodeableConcept ], ... ; # 0..* Intended jurisdiction for value set (if applicable) fhir:ValueSet.immutable [ boolean ]; # 0..1 Indicates whether or not any change to the content logical definition may occur fhir:ValueSet.purpose [ markdown ]; # 0..1 Why this value set is defined fhir:ValueSet.copyright [ markdown ]; # 0..1 Use and/or publishing restrictions fhir:ValueSet.compose [ # 0..1 Content logical definition of the value set (CLD) fhir:ValueSet.compose.lockedDate [ date ]; # 0..1 Fixed date for references with no specified version (transitive) fhir:ValueSet.compose.inactive [ boolean ]; # 0..1 Whether inactive codes are in the value set fhir:ValueSet.compose.include [ # 1..* Include one or more codes from a code system or other value set(s) fhir:ValueSet.compose.include.system [ uri ]; # 0..1 The system the codes come from fhir:ValueSet.compose.include.version [ string ]; # 0..1 Specific version of the code system referred to fhir:ValueSet.compose.include.concept [ # 0..* A concept defined in the system fhir:ValueSet.compose.include.concept.code [ code ]; # 1..1 Code or expression from system fhir:ValueSet.compose.include.concept.display [ string ]; # 0..1 Text to display for this code for this value set in this valueset fhir:ValueSet.compose.include.concept.designation [ # 0..* Additional representations for this concept fhir:ValueSet.compose.include.concept.designation.language [ code ]; # 0..1 Human language of the designation fhir:ValueSet.compose.include.concept.designation.use [ Coding ]; # 0..1 Types of uses of designations fhir:ValueSet.compose.include.concept.designation.value [ string ]; # 1..1 The text value for this designation ], ...; ], ...; fhir:ValueSet.compose.include.filter [ # 0..* Select codes/concepts by their properties (including relationships) fhir:ValueSet.compose.include.filter.property [ code ]; # 1..1 A property/filter defined by the code system fhir:ValueSet.compose.include.filter.op [ code ]; # 1..1 = | is-a | descendent-of | is-not-a | regex | in | not-in | generalizes | exists fhir:ValueSet.compose.include.filter.value [ string ]; # 1..1 Code from the system, or regex criteria, or boolean value for exists ], ...; fhir:ValueSet.compose.include.valueSet [ canonical(ValueSet) ], ... ; # 0..* 选择此值域集中包含的内容 ], ...; fhir:ValueSet.compose.exclude [ See ValueSet.compose.include ], ... ; # 0..* Explicitly exclude codes from a code system or other value sets ]; fhir:ValueSet.expansion [ # 0..1 Used when the value set is "expanded" fhir:ValueSet.expansion.identifier [ uri ]; # 0..1 Identifies the value set expansion (business identifier) fhir:ValueSet.expansion.timestamp [ dateTime ]; # 1..1 Time ValueSet expansion happened fhir:ValueSet.expansion.total [ integer ]; # 0..1 Total number of codes in the expansion fhir:ValueSet.expansion.offset [ integer ]; # 0..1 Offset at which this resource starts fhir:ValueSet.expansion.parameter [ # 0..* Parameter that controlled the expansion process fhir:ValueSet.expansion.parameter.name [ string ]; # 1..1 Name as assigned by the client or server # ValueSet.expansion.parameter.value[x] : 0..1 Value of the named parameter. One of these 7 fhir:ValueSet.expansion.parameter.valueString [ string ] fhir:ValueSet.expansion.parameter.valueBoolean [ boolean ] fhir:ValueSet.expansion.parameter.valueInteger [ integer ] fhir:ValueSet.expansion.parameter.valueDecimal [ decimal ] fhir:ValueSet.expansion.parameter.valueUri [ uri ] fhir:ValueSet.expansion.parameter.valueCode [ code ] fhir:ValueSet.expansion.parameter.valueDateTime [ dateTime ] ], ...; fhir:ValueSet.expansion.contains [ # 0..* Codes in the value set fhir:ValueSet.expansion.contains.system [ uri ]; # 0..1 System value for the code fhir:ValueSet.expansion.contains.abstract [ boolean ]; # 0..1 If user cannot select this entry fhir:ValueSet.expansion.contains.inactive [ boolean ]; # 0..1 If concept is inactive in the code system fhir:ValueSet.expansion.contains.version [ string ]; # 0..1 Version in which this code/display is defined fhir:ValueSet.expansion.contains.code [ code ]; # 0..1 Code - if blank, this is not a selectable code fhir:ValueSet.expansion.contains.display [ string ]; # 0..1 User display for the concept fhir:ValueSet.expansion.contains.designation [ See ValueSet.compose.include.concept.designation ], ... ; # 0..* Additional representations for this item fhir:ValueSet.expansion.contains.contains [ See ValueSet.expansion.contains ], ... ; # 0..* Codes contained under this entry ], ...; ]; ]
Changes since R3
| ValueSet | |
| ValueSet.status |
|
| ValueSet.experimental |
|
| ValueSet.compose.include.concept.designation.language |
|
| ValueSet.compose.include.filter |
|
| ValueSet.compose.include.filter.op |
|
| ValueSet.compose.include.filter.value |
|
| ValueSet.compose.include.valueSet |
|
| ValueSet.expansion.identifier |
|
| ValueSet.expansion.parameter.value[x] |
|
| ValueSet.expansion.contains.abstract |
|
| ValueSet.expansion.contains.inactive |
|
| ValueSet.extensible |
|
See the Full Difference for further information
This analysis is available as XML or JSON.
See R3 <--> R4 Conversion Maps (status = 8 tests that all execute ok. All tests pass round-trip testing and 8 r3 resources are invalid (0 errors).)
Structure
| Name | Flags | Card. | Type | Description & Constraints![]() |
|---|---|---|---|---|
![]() | IN | DomainResource | A set of codes drawn from one or more code systems + Warning: Name should be usable as an identifier for the module by machine processing applications such as code generation Elements defined in Ancestors: id, meta, implicitRules, language, text, contained, extension, modifierExtension | |
![]() ![]() | Σ | 0..1 | uri | Canonical identifier for this value set, represented as a URI (globally unique) |
![]() ![]() | Σ | 0..* | Identifier | Additional identifier for the value set (business identifier) |
![]() ![]() | Σ | 0..1 | string | Business version of the value set |
![]() ![]() | ΣI | 0..1 | string | Name for this value set (computer friendly) |
![]() ![]() | Σ | 0..1 | string | Name for this value set (human friendly) |
![]() ![]() | ?!Σ | 1..1 | code | draft | active | retired | unknown PublicationStatus (Required) |
![]() ![]() | Σ | 0..1 | boolean | For testing purposes, not real usage |
![]() ![]() | Σ | 0..1 | dateTime | Date last changed |
![]() ![]() | Σ | 0..1 | string | Name of the publisher (organization or individual) |
![]() ![]() | Σ | 0..* | ContactDetail | Contact details for the publisher |
![]() ![]() | 0..1 | markdown | Natural language description of the value set | |
![]() ![]() | ΣTU | 0..* | UsageContext | The context that the content is intended to support |
![]() ![]() | Σ | 0..* | CodeableConcept | Intended jurisdiction for value set (if applicable) Jurisdiction (Extensible) |
![]() ![]() | Σ | 0..1 | boolean | Indicates whether or not any change to the content logical definition may occur |
![]() ![]() | 0..1 | markdown | Why this value set is defined | |
![]() ![]() | 0..1 | markdown | Use and/or publishing restrictions | |
![]() ![]() | 0..1 | BackboneElement | Content logical definition of the value set (CLD) | |
![]() ![]() ![]() | Σ | 0..1 | date | Fixed date for references with no specified version (transitive) |
![]() ![]() ![]() | Σ | 0..1 | boolean | Whether inactive codes are in the value set |
![]() ![]() ![]() | ΣI | 1..* | BackboneElement | Include one or more codes from a code system or other value set(s) + Rule: A value set include/exclude SHALL have a value set or a system + Rule: A value set with concepts or filters SHALL include a system + Rule: Cannot have both concept and filter |
![]() ![]() ![]() ![]() | ΣI | 0..1 | uri | The system the codes come from |
![]() ![]() ![]() ![]() | Σ | 0..1 | string | Specific version of the code system referred to |
![]() ![]() ![]() ![]() | I | 0..* | BackboneElement | A concept defined in the system |
![]() ![]() ![]() ![]() ![]() | 1..1 | code | Code or expression from system | |
![]() ![]() ![]() ![]() ![]() | 0..1 | string | Text to display for this code for this value set in this valueset | |
![]() ![]() ![]() ![]() ![]() | 0..* | BackboneElement | Additional representations for this concept | |
![]() ![]() ![]() ![]() ![]() ![]() | 0..1 | code | Human language of the designation Common Languages (Preferred but limited to AllLanguages) | |
![]() ![]() ![]() ![]() ![]() ![]() | 0..1 | Coding | Types of uses of designations Designation Use (Extensible) | |
![]() ![]() ![]() ![]() ![]() ![]() | 1..1 | string | The text value for this designation | |
![]() ![]() ![]() ![]() | ΣI | 0..* | BackboneElement | Select codes/concepts by their properties (including relationships) |
![]() ![]() ![]() ![]() ![]() | Σ | 1..1 | code | A property/filter defined by the code system |
![]() ![]() ![]() ![]() ![]() | Σ | 1..1 | code | = | is-a | descendent-of | is-not-a | regex | in | not-in | generalizes | exists FilterOperator (Required) |
![]() ![]() ![]() ![]() ![]() | Σ | 1..1 | string | Code from the system, or regex criteria, or boolean value for exists |
![]() ![]() ![]() ![]() | ΣI | 0..* | canonical(ValueSet) | 选择此值域集中包含的内容 |
![]() ![]() ![]() | I | 0..* | see include | Explicitly exclude codes from a code system or other value sets |
![]() ![]() | 0..1 | BackboneElement | Used when the value set is "expanded" | |
![]() ![]() ![]() | 0..1 | uri | Identifies the value set expansion (business identifier) | |
![]() ![]() ![]() | 1..1 | dateTime | Time ValueSet expansion happened | |
![]() ![]() ![]() | 0..1 | integer | Total number of codes in the expansion | |
![]() ![]() ![]() | 0..1 | integer | Offset at which this resource starts | |
![]() ![]() ![]() | 0..* | BackboneElement | Parameter that controlled the expansion process | |
![]() ![]() ![]() ![]() | 1..1 | string | Name as assigned by the client or server | |
![]() ![]() ![]() ![]() | 0..1 | Value of the named parameter | ||
![]() ![]() ![]() ![]() ![]() | string | |||
![]() ![]() ![]() ![]() ![]() | boolean | |||
![]() ![]() ![]() ![]() ![]() | integer | |||
![]() ![]() ![]() ![]() ![]() | decimal | |||
![]() ![]() ![]() ![]() ![]() | uri | |||
![]() ![]() ![]() ![]() ![]() | code | |||
![]() ![]() ![]() ![]() ![]() | dateTime | |||
![]() ![]() ![]() | I | 0..* | BackboneElement | Codes in the value set + Rule: SHALL have a code or a display + Rule: Must have a code if not abstract + Rule: Must have a system if a code is present |
![]() ![]() ![]() ![]() | 0..1 | uri | System value for the code | |
![]() ![]() ![]() ![]() | 0..1 | boolean | If user cannot select this entry | |
![]() ![]() ![]() ![]() | 0..1 | boolean | If concept is inactive in the code system | |
![]() ![]() ![]() ![]() | 0..1 | string | Version in which this code/display is defined | |
![]() ![]() ![]() ![]() | I | 0..1 | code | Code - if blank, this is not a selectable code |
![]() ![]() ![]() ![]() | I | 0..1 | string | User display for the concept |
![]() ![]() ![]() ![]() | 0..* | see designation | Additional representations for this item | |
![]() ![]() ![]() ![]() | 0..* | see contains | Codes contained under this entry | |
Documentation for this format | ||||
XML Template
<ValueSet xmlns="http://hl7.org/fhir"><!-- from Resource: id, meta, implicitRules, and language --> <!-- from DomainResource: text, contained, extension, and modifierExtension --> <url value="[uri]"/><!-- 0..1 Canonical identifier for this value set, represented as a URI (globally unique) --> <identifier><!-- 0..* Identifier Additional identifier for the value set (business identifier) --></identifier> <version value="[string]"/><!-- 0..1 Business version of the value set --> <name value="[string]"/><!--
0..1 Name for this value set (computer friendly) --> <title value="[string]"/><!-- 0..1 Name for this value set (human friendly) --> <status value="[code]"/><!-- 1..1 draft | active | retired | unknown --> <experimental value="[boolean]"/><!-- 0..1 For testing purposes, not real usage --> <date value="[dateTime]"/><!-- 0..1 Date last changed --> <publisher value="[string]"/><!-- 0..1 Name of the publisher (organization or individual) --> <contact><!-- 0..* ContactDetail Contact details for the publisher --></contact> <description value="[markdown]"/><!-- 0..1 Natural language description of the value set --> <useContext><!-- 0..* UsageContext The context that the content is intended to support --></useContext> <jurisdiction><!-- 0..* CodeableConcept Intended jurisdiction for value set (if applicable) --></jurisdiction> <immutable value="[boolean]"/><!-- 0..1 Indicates whether or not any change to the content logical definition may occur --> <purpose value="[markdown]"/><!-- 0..1 Why this value set is defined --> <copyright value="[markdown]"/><!-- 0..1 Use and/or publishing restrictions --> <compose> <!-- 0..1 Content logical definition of the value set (CLD) --> <lockedDate value="[date]"/><!-- 0..1 Fixed date for references with no specified version (transitive) --> <inactive value="[boolean]"/><!-- 0..1 Whether inactive codes are in the value set --> <include> <!-- 1..* Include one or more codes from a code system or other value set(s) --> <system value="[uri]"/><!--
0..1 The system the codes come from --> <version value="[string]"/><!-- 0..1 Specific version of the code system referred to --> <concept> <!--
0..* A concept defined in the system --> <code value="[code]"/><!-- 1..1 Code or expression from system --> <display value="[string]"/><!-- 0..1 Text to display for this code for this value set in this valueset --> <designation> <!-- 0..* Additional representations for this concept --> <language value="[code]"/><!-- 0..1 Human language of the designation --> <use><!-- 0..1 Coding Types of uses of designations --></use> <value value="[string]"/><!-- 1..1 The text value for this designation --> </designation> </concept> <filter> <!--
0..* Select codes/concepts by their properties (including relationships) --> <property value="[code]"/><!-- 1..1 A property/filter defined by the code system --> <op value="[code]"/><!-- 1..1 = | is-a | descendent-of | is-not-a | regex | in | not-in | generalizes | exists --> <value value="[string]"/><!-- 1..1 Code from the system, or regex criteria, or boolean value for exists --> </filter> <valueSet><!--
0..* canonical(ValueSet) 选择此值域集中包含的内容 --></valueSet> </include> <exclude><!--
0..* Content as for ValueSet.compose.include Explicitly exclude codes from a code system or other value sets --></exclude> </compose> <expansion> <!-- 0..1 Used when the value set is "expanded" --> <identifier value="[uri]"/><!-- 0..1 Identifies the value set expansion (business identifier) --> <timestamp value="[dateTime]"/><!-- 1..1 Time ValueSet expansion happened --> <total value="[integer]"/><!-- 0..1 Total number of codes in the expansion --> <offset value="[integer]"/><!-- 0..1 Offset at which this resource starts --> <parameter> <!-- 0..* Parameter that controlled the expansion process --> <name value="[string]"/><!-- 1..1 Name as assigned by the client or server --> <value[x]><!-- 0..1 string|boolean|integer|decimal|uri|code|dateTime Value of the named parameter --></value[x]> </parameter> <contains> <!-- 0..* Codes in the value set --> <system value="[uri]"/><!-- 0..1 System value for the code --> <abstract value="[boolean]"/><!-- 0..1 If user cannot select this entry --> <inactive value="[boolean]"/><!-- 0..1 If concept is inactive in the code system --> <version value="[string]"/><!-- 0..1 Version in which this code/display is defined --> <code value="[code]"/><!--
0..1 Code - if blank, this is not a selectable code --> <display value="[string]"/><!--
0..1 User display for the concept --> <designation><!-- 0..* Content as for ValueSet.compose.include.concept.designation Additional representations for this item --></designation> <contains><!-- 0..* Content as for ValueSet.expansion.contains Codes contained under this entry --></contains> </contains> </expansion> </ValueSet>
JSON Template
{
"resourceType" : "ValueSet",
// from Resource: id, meta, implicitRules, and language
// from DomainResource: text, contained, extension, and modifierExtension
"url" : "<uri>", // Canonical identifier for this value set, represented as a URI (globally unique)
"identifier" : [{ Identifier }], // Additional identifier for the value set (business identifier)
"version" : "<string>", // Business version of the value set
"name" : "<string>", // C? Name for this value set (computer friendly)
"title" : "<string>", // Name for this value set (human friendly)
"status" : "<code>", // R! draft | active | retired | unknown
"experimental" : <boolean>, // For testing purposes, not real usage
"date" : "<dateTime>", // Date last changed
"publisher" : "<string>", // Name of the publisher (organization or individual)
"contact" : [{ ContactDetail }], // Contact details for the publisher
"description" : "<markdown>", // Natural language description of the value set
"useContext" : [{ UsageContext }], // The context that the content is intended to support
"jurisdiction" : [{ CodeableConcept }], // Intended jurisdiction for value set (if applicable)
"immutable" : <boolean>, // Indicates whether or not any change to the content logical definition may occur
"purpose" : "<markdown>", // Why this value set is defined
"copyright" : "<markdown>", // Use and/or publishing restrictions
"compose" : { // Content logical definition of the value set (CLD)
"lockedDate" : "<date>", // Fixed date for references with no specified version (transitive)
"inactive" : <boolean>, // Whether inactive codes are in the value set
"include" : [{ // R! Include one or more codes from a code system or other value set(s)
"system" : "<uri>", // C? The system the codes come from
"version" : "<string>", // Specific version of the code system referred to
"concept" : [{ // C? A concept defined in the system
"code" : "<code>", // R! Code or expression from system
"display" : "<string>", // Text to display for this code for this value set in this valueset
"designation" : [{ // Additional representations for this concept
"language" : "<code>", // Human language of the designation
"use" : { Coding }, // Types of uses of designations
"value" : "<string>" // R! The text value for this designation
}]
}],
"filter" : [{ // C? Select codes/concepts by their properties (including relationships)
"property" : "<code>", // R! A property/filter defined by the code system
"op" : "<code>", // R! = | is-a | descendent-of | is-not-a | regex | in | not-in | generalizes | exists
"value" : "<string>" // R! Code from the system, or regex criteria, or boolean value for exists
}],
"valueSet" : [{ canonical(ValueSet) }] // C? 选择此值域集中包含的内容
}],
"exclude" : [{ Content as for ValueSet.compose.include }] // C? Explicitly exclude codes from a code system or other value sets
},
"expansion" : { // Used when the value set is "expanded"
"identifier" : "<uri>", // Identifies the value set expansion (business identifier)
"timestamp" : "<dateTime>", // R! Time ValueSet expansion happened
"total" : <integer>, // Total number of codes in the expansion
"offset" : <integer>, // Offset at which this resource starts
"parameter" : [{ // Parameter that controlled the expansion process
"name" : "<string>", // R! Name as assigned by the client or server
// value[x]: Value of the named parameter. One of these 7:
"valueString" : "<string>"
"valueBoolean" : <boolean>
"valueInteger" : <integer>
"valueDecimal" : <decimal>
"valueUri" : "<uri>"
"valueCode" : "<code>"
"valueDateTime" : "<dateTime>"
}],
"contains" : [{ // Codes in the value set
"system" : "<uri>", // System value for the code
"abstract" : <boolean>, // If user cannot select this entry
"inactive" : <boolean>, // If concept is inactive in the code system
"version" : "<string>", // Version in which this code/display is defined
"code" : "<code>", // C? Code - if blank, this is not a selectable code
"display" : "<string>", // C? User display for the concept
"designation" : [{ Content as for ValueSet.compose.include.concept.designation }], // Additional representations for this item
"contains" : [{ Content as for ValueSet.expansion.contains }] // Codes contained under this entry
}]
}
}
Turtle Template
@prefix fhir: <http://hl7.org/fhir/> .[ a fhir:ValueSet; fhir:nodeRole fhir:treeRoot; # if this is the parser root # from Resource: .id, .meta, .implicitRules, and .language # from DomainResource: .text, .contained, .extension, and .modifierExtension fhir:ValueSet.url [ uri ]; # 0..1 Canonical identifier for this value set, represented as a URI (globally unique) fhir:ValueSet.identifier [ Identifier ], ... ; # 0..* Additional identifier for the value set (business identifier) fhir:ValueSet.version [ string ]; # 0..1 Business version of the value set fhir:ValueSet.name [ string ]; # 0..1 Name for this value set (computer friendly) fhir:ValueSet.title [ string ]; # 0..1 Name for this value set (human friendly) fhir:ValueSet.status [ code ]; # 1..1 draft | active | retired | unknown fhir:ValueSet.experimental [ boolean ]; # 0..1 For testing purposes, not real usage fhir:ValueSet.date [ dateTime ]; # 0..1 Date last changed fhir:ValueSet.publisher [ string ]; # 0..1 Name of the publisher (organization or individual) fhir:ValueSet.contact [ ContactDetail ], ... ; # 0..* Contact details for the publisher fhir:ValueSet.description [ markdown ]; # 0..1 Natural language description of the value set fhir:ValueSet.useContext [ UsageContext ], ... ; # 0..* The context that the content is intended to support fhir:ValueSet.jurisdiction [ CodeableConcept ], ... ; # 0..* Intended jurisdiction for value set (if applicable) fhir:ValueSet.immutable [ boolean ]; # 0..1 Indicates whether or not any change to the content logical definition may occur fhir:ValueSet.purpose [ markdown ]; # 0..1 Why this value set is defined fhir:ValueSet.copyright [ markdown ]; # 0..1 Use and/or publishing restrictions fhir:ValueSet.compose [ # 0..1 Content logical definition of the value set (CLD) fhir:ValueSet.compose.lockedDate [ date ]; # 0..1 Fixed date for references with no specified version (transitive) fhir:ValueSet.compose.inactive [ boolean ]; # 0..1 Whether inactive codes are in the value set fhir:ValueSet.compose.include [ # 1..* Include one or more codes from a code system or other value set(s) fhir:ValueSet.compose.include.system [ uri ]; # 0..1 The system the codes come from fhir:ValueSet.compose.include.version [ string ]; # 0..1 Specific version of the code system referred to fhir:ValueSet.compose.include.concept [ # 0..* A concept defined in the system fhir:ValueSet.compose.include.concept.code [ code ]; # 1..1 Code or expression from system fhir:ValueSet.compose.include.concept.display [ string ]; # 0..1 Text to display for this code for this value set in this valueset fhir:ValueSet.compose.include.concept.designation [ # 0..* Additional representations for this concept fhir:ValueSet.compose.include.concept.designation.language [ code ]; # 0..1 Human language of the designation fhir:ValueSet.compose.include.concept.designation.use [ Coding ]; # 0..1 Types of uses of designations fhir:ValueSet.compose.include.concept.designation.value [ string ]; # 1..1 The text value for this designation ], ...; ], ...; fhir:ValueSet.compose.include.filter [ # 0..* Select codes/concepts by their properties (including relationships) fhir:ValueSet.compose.include.filter.property [ code ]; # 1..1 A property/filter defined by the code system fhir:ValueSet.compose.include.filter.op [ code ]; # 1..1 = | is-a | descendent-of | is-not-a | regex | in | not-in | generalizes | exists fhir:ValueSet.compose.include.filter.value [ string ]; # 1..1 Code from the system, or regex criteria, or boolean value for exists ], ...; fhir:ValueSet.compose.include.valueSet [ canonical(ValueSet) ], ... ; # 0..* 选择此值域集中包含的内容 ], ...; fhir:ValueSet.compose.exclude [ See ValueSet.compose.include ], ... ; # 0..* Explicitly exclude codes from a code system or other value sets ]; fhir:ValueSet.expansion [ # 0..1 Used when the value set is "expanded" fhir:ValueSet.expansion.identifier [ uri ]; # 0..1 Identifies the value set expansion (business identifier) fhir:ValueSet.expansion.timestamp [ dateTime ]; # 1..1 Time ValueSet expansion happened fhir:ValueSet.expansion.total [ integer ]; # 0..1 Total number of codes in the expansion fhir:ValueSet.expansion.offset [ integer ]; # 0..1 Offset at which this resource starts fhir:ValueSet.expansion.parameter [ # 0..* Parameter that controlled the expansion process fhir:ValueSet.expansion.parameter.name [ string ]; # 1..1 Name as assigned by the client or server # ValueSet.expansion.parameter.value[x] : 0..1 Value of the named parameter. One of these 7 fhir:ValueSet.expansion.parameter.valueString [ string ] fhir:ValueSet.expansion.parameter.valueBoolean [ boolean ] fhir:ValueSet.expansion.parameter.valueInteger [ integer ] fhir:ValueSet.expansion.parameter.valueDecimal [ decimal ] fhir:ValueSet.expansion.parameter.valueUri [ uri ] fhir:ValueSet.expansion.parameter.valueCode [ code ] fhir:ValueSet.expansion.parameter.valueDateTime [ dateTime ] ], ...; fhir:ValueSet.expansion.contains [ # 0..* Codes in the value set fhir:ValueSet.expansion.contains.system [ uri ]; # 0..1 System value for the code fhir:ValueSet.expansion.contains.abstract [ boolean ]; # 0..1 If user cannot select this entry fhir:ValueSet.expansion.contains.inactive [ boolean ]; # 0..1 If concept is inactive in the code system fhir:ValueSet.expansion.contains.version [ string ]; # 0..1 Version in which this code/display is defined fhir:ValueSet.expansion.contains.code [ code ]; # 0..1 Code - if blank, this is not a selectable code fhir:ValueSet.expansion.contains.display [ string ]; # 0..1 User display for the concept fhir:ValueSet.expansion.contains.designation [ See ValueSet.compose.include.concept.designation ], ... ; # 0..* Additional representations for this item fhir:ValueSet.expansion.contains.contains [ See ValueSet.expansion.contains ], ... ; # 0..* Codes contained under this entry ], ...; ]; ]
Changes since Release 3
| ValueSet | |
| ValueSet.status |
|
| ValueSet.experimental |
|
| ValueSet.compose.include.concept.designation.language |
|
| ValueSet.compose.include.filter |
|
| ValueSet.compose.include.filter.op |
|
| ValueSet.compose.include.filter.value |
|
| ValueSet.compose.include.valueSet |
|
| ValueSet.expansion.identifier |
|
| ValueSet.expansion.parameter.value[x] |
|
| ValueSet.expansion.contains.abstract |
|
| ValueSet.expansion.contains.inactive |
|
| ValueSet.extensible |
|
See the Full Difference for further information
This analysis is available as XML or JSON.
See R3 <--> R4 Conversion Maps (status = 8 tests that all execute ok. All tests pass round-trip testing and 8 r3 resources are invalid (0 errors).)
See the Profiles & Extensions and the alternate definitions: Master Definition XML + JSON, XML Schema/Schematron + JSON Schema, ShEx (for Turtle) + see the extensions & the dependency analysis
| Path | Definition | Type | Reference |
|---|---|---|---|
| ValueSet.status | The lifecycle status of an artifact. | Required | PublicationStatus |
| ValueSet.jurisdiction | Countries and regions within which this artifact is targeted for use. | Extensible | Jurisdiction ValueSet |
| ValueSet.compose.include.concept.designation.language | A human language. | Preferred, but limited to AllLanguages | CommonLanguages |
| ValueSet.compose.include.concept.designation.use | Details of how a designation would be used. | Extensible | DesignationUse |
| ValueSet.compose.include.filter.op | The kind of operation to perform as a part of a property based filter. | Required | FilterOperator |
| id | Level | Location | Description | Expression |
| vsd-0 | Warning | (base) | Name should be usable as an identifier for the module by machine processing applications such as code generation | name.matches('[A-Z]([A-Za-z0-9_]){0,254}') |
| vsd-1 | Rule | ValueSet.compose.include | A value set include/exclude SHALL have a value set or a system | valueSet.exists() or system.exists() |
| vsd-2 | Rule | ValueSet.compose.include | A value set with concepts or filters SHALL include a system | (concept.exists() or filter.exists()) implies system.exists() |
| vsd-3 | Rule | ValueSet.compose.include | Cannot have both concept and filter | concept.empty() or filter.empty() |
| vsd-6 | Rule | ValueSet.expansion.contains | SHALL have a code or a display | code.exists() or display.exists() |
| vsd-9 | Rule | ValueSet.expansion.contains | Must have a code if not abstract | code.exists() or abstract = true |
| vsd-10 | Rule | ValueSet.expansion.contains | Must have a system if a code is present | code.empty() or system.exists() |
值域集可以是包含编码的简单列表,也可以是利用编码系统特性表示的某种通用选择标准。选择标准规则如下:
include元素,则意味着累加所有编码,即,值域集将选取所有include的并集。
include中定义的所有标准都需要同时满足,例如,选取多个筛选器结果的交集
include中,可以同时指定一个编码系统(可指定选择条件)和多个值域集。
System和ValueSet
,则选取编码系统中符合concept和filter标准的所有编码与所有值域集的所有编码的并集。
ValueSet,则将所有指定的值域集中的所有编码都选取到此值域集中。
System,则选取规则如下:
concept或filter:包括系统中的所有编码
concept::仅选取列举出来的具体编码
filter: 选取所有符合筛选条件的编码*”,这表示该值域集包含编码系统所有版本编码的并集。至于如何处理指定的所需版本、生成哪些展开结果、如何处理不同版本之间编码意义发生改变的情况都是由服务器决定的。
重要提示: 是否支持此能力需要参照服务器发布的实施指南中的符合性声明 .
include规则外,还可以使用exclude来排除编码。exclude与include的使用规则相同,但意义相反,即满足exclude条件的编码不会选取到值域集里
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 (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:
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 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). The correct display for a code can be determined by a $lookup operation. Any alternative display specified in the value set would go in CodeableConcept.text, perhaps appended to the UI label for the matching data element.
As an example, the LOINC code 55423-8
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 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, 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.
In addition to the display, a concept can have one or more designation elements.
The display is equivalent to a special designation with an implied designation.use of "primary code"
and a language equal to the Resource Language. The designations can provide
additional displays for other languages, as well as designations for other purposes.
When using concepts, applications use the display unless the language or usage in context provides a reason
to use one of the designations.
Value sets may select codes from multiple code systems - either by including codes from different systems, or importing other value sets that include them. A typical use for crossing code systems is when including a set of codes, and adding a few additional codes to cover cases not catered to by the included codes (e.g. Data missing or workflow error codes).
Best Practice Note: Mixing definitional systems offers the potential for confusing, overlapping, and inconsistent definitions. Creating value sets that cross code systems should be done with care to avoid creating definitional confusion.
Value sets should only include well differentiated concepts, but many value sets and code systems do not have well differentiated concepts because of various real world constraints.
Each Code System defines which filters can be
used in ValueSet.compose.include.filter. All code systems have
base filters and any additional
filters defined in (CodeSystem.filter).
This specification also defines filters for various published code systems:
A value set can be "expanded", where the definition of the value set is used to create a simple collection of codes suitable for use for data entry or validation. There is a defined operation $expand to ask a server to perform this expansion. Expansions are most useful when a value set includes all the codes in a code system, or a set of codes by filter.
A resource that represents a value set expansion includes the same
identification details as the definition of the value set, and MAY
include the definition of the value set (.compose). In
addition, it has an .expansion element which contains
the list of codes that constitute the value set expansion. Each
contained code can include nested contained codes - see below
for further discussion.
When a request for an expansion is received (e.g., for the $expand operation), the following process should be followed:
.compose), return an errorvalueSet, find the referenced value set by ValueSet.url, expand that (e.g., using the $expand operation: GET [base]/ValueSet/$expand$url=[compose.include.valueSet]), and add it to the result set. This means that expansion across imports is a recursive process.The final "result set" is then represented in expansion. Note that the expansion structure is inherently ordered; this specification does not fix the meaning of use of the order. The conceptual approach described should not be understood to prohibit any implementation approach in these regards. In addition, note that the method described above is a conceptual approach; individual servers may choose to follow alternative approaches that are more efficient, as long as the outcome is the same.
The impact of Code System supplements on value set expansion - and therefore value set validation - is subject to ongoing experimentation and implementation testing, and further clarification and additional rules might be proposed in future versions of this specification.
The expansion MAY be hierarchical - that is, it may have contains element that contain their own sub-elements, to any
level of depth. This specification does not fix the meaning of the hierarchy: there is
no implication about the logical relationship between the nested contain elements, and the
structure cannot be used for logical inferencing. The structure
exists to provide navigational assistance for helping human users to
locate codes in the expansion. There is an example of use of a hierarchical expansion.
Note that the
CodeSystem resource and ValueSet.compose offer no direct support for defining hierarchies and groups;
applications may want to take advantage of the expand-rules and
expand-group extensions as an implementation feature.
An expansion may include entries in the expansion that only serve an arbitrary grouping purpose, to make it easier
for a human to use the list. These entries have no system or code, and must be marked as abstract.
Value set definitions may lead to more than one instruction to include a given concept in the value set across the includes and imports. No matter how many times the definitions include a concept, it is only present in the value set once, and will only appear once in a flat expansion of the value set. Note, however, that a concept may appear more than once in a nested hierarchy when the expansion is prepared for UI use (irrespective of how many times it is included in the definitions). Note that uniqueness is based on system/version/code; it is possible to include the same concept from different versions of a code system in the same expansion, though this is generally confusing for users and should be avoided.
The codes in the expansion should be treated as case sensitive - implementers should use the correct case. Implementers can consult the definition of the underlying code systems to determine whether the code system that defines the code is case sensitive or not.
It is important that expansions be identified properly. Any value set definition may produce an infinite number of expansions, depending on the operation parameters. Any expansions produced must be clearly identified so that there is no confusion. The following rules apply:
ValueSet.expansion.identifier
The expansion contains a set of parameters in ValueSet.expansion.parameter that record what controlled the expansion process.
These parameters may be used by users of expanded value sets to check whether the expansion
is suitable for a particular purpose, or to pick the correct expansion. The server decides which
parameters to include here, but at a minimum, the list SHOULD include all of the parameters that
affect the $expand operation. If the expansion will be persisted all of these parameters SHALL
be included. If the codeSystem on the server has a specified
version then this version SHALL be provided as a parameter in the expansion (note that not all
code systems have a version).
The following parameters are predefined by the $expand operation, and are suitable for use in the expansion parameters:
filter | A text filter that is applied to restrict the codes that are returned (this is useful in a UI context). The interpretation of this is delegated to the server in order to allow to determine the most optimal search approach for the context. The server can document the way this parameter works in TerminologyCapabilities..expansion.textFilter. Typical usage of this parameter includes functionality like:
Text Search engines such as Lucene or Solr, long with their considerable functionality, might also be used. The optional text search might also be code system specific, and servers might have different implementations for different code systems |
date | The date for which the expansion should be generated. if a date is provided, it means that the server should use the value set / code system definitions as they were on the given date, or return an error if this is not possible. Normally, the date is the current conditions (which is the default value) but under some circumstances, systems need to generate an expansion as it would have been in the past. A typical example of this would be where code selection is constrained to the set of codes that were available when the patient was treated, not when the record is being edited. Note that which date is appropriate is a matter for implementation policy. |
offset | Paging support - where to start if a subset is desired (default = 0). Offset is number of records (not number of pages) |
count | Paging support - how many codes should be provided in a partial page view. Paging only applies to flat expansions - servers ignore paging if the expansion is not flat. If count = 0, the client is asking how large the expansion is. Servers SHOULD honor this request for hierarchical expansions as well, and simply return the overall count |
includeDesignations | Controls whether concept designations are to be included or excluded in value set expansions |
designation | A token that specifies a system+code that is either a use or a language. Designations that match by language or use are included in the expansion. If no designation is specified, it is at the server discretion which designations to return |
includeDefinition | Controls whether the value set definition is included or excluded in value set expansions |
activeOnly | Controls whether inactive concepts are included or excluded in value set expansions. Note that if the value set explicitly specifies that inactive codes are included, this parameter can still remove them from a specific expansion, but this parameter cannot include them if the value set excludes them |
excludeNested | Controls whether or not the value set expansion nests codes or not (i.e. ValueSet.expansion.contains.contains) |
excludeNotForUI | Controls whether or not the value set expansion is assembled for a user interface use or not. Value sets intended for User Interface might include 'abstract' codes or have nested contains with items with no code or abstract = true, with the sole purpose of helping a user navigate through the list efficiently, where as a value set not generated for UI use might be flat, and only contain the selectable codes in the value set. The exact implications of 'for UI' depend on the code system, and what properties it exposes for a terminology server to use. In the FHIR Specification itself, the value set expansions are generated with excludeNotForUI = false, and the expansions used when generated schema / code etc, or performing validation, are all excludeNotForUI = true. |
excludePostCoordinated | Controls whether or not the value set expansion includes post coordinated codes |
displayLanguage | Specifies the language to be used for description in the expansions i.e. the language to be used for ValueSet.expansion.contains.display |
exclude-system | Code system, or a particular version of a code system to be excluded from the value set expansion. The format is the same as a canonical URL: [system]|[version] - e.g. http://loinc.org|2.56 |
system-version | Specifies a version to use for a system, if the value set does not specify which one to use. The format is the same as a canonical URL: [system]|[version] - e.g. http://loinc.org|2.56 |
check-system-version | Edge Case: Specifies a version to use for a system. If a value set specifies a different version, an error is returned instead of the expansion. The format is the same as a canonical URL: [system]|[version] - e.g. http://loinc.org|2.56 |
force-system-version | Edge Case: Specifies a version to use for a system. This parameter overrides any specified version in the value set (and any it depends on). The format is the same as a canonical URL: [system]|[version] - e.g. http://loinc.org|2.56. Note that this has obvious safety issues, in that it may result in a value set expansion giving a different list of codes that is both wrong and unsafe, and implementers should only use this capability reluctantly. It primarily exists to deal with situations where specifications have fallen into decay as time passes. If the value is override, the version used SHALL explicitly be represented in the expansion parameters |
The count and offset parameters are important. If the expansion is a page out of the whole expansion, the offset and count parameters SHALL be populated. Clients can reliably use the count/offset parameters to determine whether the whole expansion is returned.
Other parameters that servers may be required to use:
[canonical]#CodeSystem.content | [content] : The content value for the code system for the canonical URL. Applications generating expansions SHALL use this parameter if the CodeSystem.content value is "fragment" or " |
[canonical1]#supplement | [canonical2] : Indicates that the specified supplement (canonical2) contributed to the content of the expansion for the code system canonical1 (by influencing selection, or providing designations). Applications generating expansions SHALL use this parameter to record that a supplement was used during the expansion process |
Beyond this, servers MAY define their own parameters, though Terminology server authors are requested to bring additional parameters to HL7 (via 'Propose a change' link below) in the interests of interoperability.
Servers can also create and store Provenance statements about the expansion, or AuditEvent records of the expansion process if further transparency is required. These resources can contain considerable detail about the various inputs to the process, and any significant decisions by the expansion engine. Further details around this (and profiles on the relevant resources) may be provided in future versions of this specification or related implementation guides.
Request for Feedback: The existing set of parameters are intended to cover the vast majority of use cases, but there are some cases where the parameters do not provide enough control to a client, particularly with regard to combinations of parameters, and the interplay between code system versions and other parameters. Implementers may need to define their own value sets to meet these requirements.
Ongoing feedback is welcome at [link to be provided]
Whether to store expanded value sets, or simply to store their definitions and expand on the fly is a matter for system deployment. Some servers, including public value sets servers, only store expansions. However, any system that stores an expansion must be concerned with how to determine whether the expansion is still current, and this requires deep knowledge of how the expansion was created. A system with a dedicated terminology server that returns expansions on demand avoids this problem, but leaves open the question of how to audit the specific expansion that was used for a particular case. One solution to this is to use a dedicated terminology server, and have the clients ask for expansions on demand based on the value set definitions, and for the server to store (and reuse as appropriate) the returned expansion (when it reuses the expansion, ValueSet.expansion.identifier will be the same). If expansions are shared, users need to be aware of how expansion identifiers (which may be server specific) work.
The search parameters defined on ValueSet include the code parameter. This is intended
to allow a consumer to find all the value sets that include a particular code. However, fully
evaluating this search parameter is extremely onerous for a server. Further, whether a code is
in a value set depends on the context in which expansions are performed (see the $expand operation).
For this reason, the degree to which the search parameter is supported can be declared in the Terminology Capability
statement.
Use cases for the different combinations:
.compose only:
Provides the value set definition (CLD). This is the expected format from the value set publisher.
.expansion only:
Provides the value set expansion, which might or might not be persisted (see 4.8.7 Value Set Expansion above).
The "expansion only" format may be returned in the $expand operation output (at the terminology server's discretion).
.compose and .expansion:
The terminology server often may include the definition as well as the expansion in the $expand operation output.
The resource instance including the expansion might or might not be persisted.
.compose nor .expansion:
This is a valid format for ValueSet resource instances. A primary use case is the return from a summary search (i.e. _summary=true).
This may be especially useful to reduce the performance overhead when returning a summary of extensionally defined value sets
(which may include a large number of concepts in the value set definition).
Search parameters for this resource. The common parameters also apply. See Searching for more information about searching in REST, messaging, and services.
| Name | Type | Description | Expression | In Common |
| code TU | token | This special parameter searches for codes in the value set. See additional notes on the ValueSet resource | ValueSet.expansion.contains.code | ValueSet.compose.include.concept.code | |
| context TU | token | A use context assigned to the value set | (ValueSet.useContext.value as CodeableConcept) | |
| context-quantity TU | quantity | A quantity- or range-valued use context assigned to the value set | (ValueSet.useContext.value as Quantity) | (ValueSet.useContext.value as Range) | |
| context-type TU | token | A type of use context assigned to the value set | ValueSet.useContext.code | |
| context-type-quantity TU | composite | A use context type and quantity- or range-based value assigned to the value set | On ValueSet.useContext: context-type: code context-quantity: value.as(Quantity) | value.as(Range) | |
| context-type-value TU | composite | A use context type and value assigned to the value set | On ValueSet.useContext: context-type: code context: value.as(CodeableConcept) | |
| date TU | date | The value set publication date | ValueSet.date | |
| description TU | string | The description of the value set | ValueSet.description | |
| expansion TU | uri | Identifies the value set expansion (business identifier) | ValueSet.expansion.identifier | |
| identifier TU | token | External identifier for the value set | ValueSet.identifier | |
| jurisdiction TU | token | Intended jurisdiction for the value set | ValueSet.jurisdiction | |
| name TU | string | Computationally friendly name of the value set | ValueSet.name | |
| publisher TU | string | Name of the publisher of the value set | ValueSet.publisher | |
| reference TU | uri | A code system included or excluded in the value set or an imported value set | ValueSet.compose.include.system | |
| status TU | token | The current status of the value set | ValueSet.status | |
| title TU | string | The human-friendly name of the value set | ValueSet.title | |
| url TU | uri | The uri that identifies the value set | ValueSet.url | |
| version TU | token | The business version of the value set | ValueSet.version |