This page is part of the Structured Data Capture FHIR IG (v2.7.0: STU 3 Ballot 2) based on FHIR R4. The current version which supercedes this version is 3.0.0. For a full list of available versions, see the Directory of published versions
The official URL for this profile is:
http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-codesystem
Code systems are referenced by ValueSets to define possible answer choices in a re-useable cross-questionnaire (and other data structure) manner. Codes might be drawn from standard international terminologies like LOINC or SNOMED CT or from regional code systems for drugs, billing codes, etc. The use of standardized codes is useful when data needs to be populated into the questionnaire or extracted from the questionnaire for other uses. It is also helpful when the set of possibilities is highly dynamic - for example drug codes where the set of available codes might change daily or weekly.
This profile sets expectations for use of the CodeSystem resource when used as a source for answers to questions in a Questionnaire. It identifies which core elements and extensions must be supported and highlights other elements that, while not required, may be relevant to the Questionnaire use-case.
Description of Profiles, Differentials, Snapshots and how the different presentations work.
This structure is derived from CodeSystem
This structure is derived from CodeSystem
Name | Flags | Card. | Type | Description & Constraints |
---|---|---|---|---|
CodeSystem | I | 0..* | Declares the existence of and describes a code system or code system supplement | |
id | Σ | 0..1 | id | Logical id of this artifact |
meta | Σ | 0..1 | Meta | Metadata about the resource |
implicitRules | ?!Σ | 0..1 | uri | A set of rules under which this content was created |
language | 0..1 | code | Language of the resource content Binding: CommonLanguages (preferred) Max Binding: AllLanguages | |
text | 0..1 | Narrative | Text summary of the resource, for human interpretation | |
contained | 0..* | Resource | Contained, inline Resources | |
extension | 0..* | Extension | Extension Slice: Unordered, Open by value:url | |
rendering-styleSensitive | SI | 0..1 | boolean | Are styles important for processing? URL: http://hl7.org/fhir/StructureDefinition/rendering-styleSensitive |
modifierExtension | ?! | 0..* | Extension | Extensions that cannot be ignored |
url | SΣ | 0..1 | uri | Canonical identifier for this code system, represented as a URI (globally unique) (Coding.system) |
identifier | Σ | 0..* | Identifier | Additional identifier for the code system (business identifier) |
version | Σ | 0..1 | string | Business version of the code system (Coding.version) |
name | SΣI | 1..1 | string | Name for this code system (computer friendly) |
title | Σ | 0..1 | string | Name for this code system (human friendly) |
status | ?!SΣ | 1..1 | code | draft | active | retired | unknown Binding: PublicationStatus (required) |
experimental | SΣ | 0..1 | boolean | For testing purposes, not real usage |
date | SΣ | 0..1 | dateTime | Date last changed |
publisher | Σ | 0..1 | string | Name of the publisher (organization or individual) |
contact | Σ | 0..* | ContactDetail | Contact details for the publisher |
description | S | 1..1 | markdown | Natural language description of the code system |
useContext | Σ | 0..* | UsageContext | The context that the content is intended to support |
jurisdiction | Σ | 0..* | CodeableConcept | Intended jurisdiction for code system (if applicable) Binding: Jurisdiction ValueSet (extensible) |
purpose | 0..1 | markdown | Why this code system is defined | |
copyright | 0..1 | markdown | Use and/or publishing restrictions | |
caseSensitive | SΣ | 1..1 | boolean | If code comparison is case sensitive |
valueSet | Σ | 0..1 | canonical(ValueSet) | Canonical reference to the value set with entire code system |
hierarchyMeaning | Σ | 0..1 | code | grouped-by | is-a | part-of | classified-with Binding: CodeSystemHierarchyMeaning (required) |
content | SΣ | 1..1 | code | not-present | example | fragment | complete | supplement Binding: CodeSystemContentMode (required) |
supplements | Σ | 0..1 | canonical(CodeSystem) | Canonical URL of Code System this adds designations and properties to |
count | Σ | 0..1 | unsignedInt | Total concepts in the code system |
filter | ΣI | 0..* | BackboneElement | Filter that can be used in a value set |
id | 0..1 | string | Unique id for inter-element referencing | |
extension | 0..* | Extension | Additional content defined by implementations | |
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized |
code | Σ | 1..1 | code | Code that identifies the filter |
description | Σ | 0..1 | string | How or why the filter is used |
operator | Σ | 1..* | code | Operators that can be used with filter Binding: FilterOperator (required) |
value | Σ | 1..1 | string | What to use for the value |
property | ΣI | 0..* | BackboneElement | Additional information supplied about each concept |
id | 0..1 | string | Unique id for inter-element referencing | |
extension | 0..* | Extension | Additional content defined by implementations | |
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized |
code | Σ | 1..1 | code | Identifies the property on the concepts, and when referred to in operations |
uri | Σ | 0..1 | uri | Formal identifier for the property |
description | Σ | 0..1 | string | Why the property is defined, and/or what it conveys |
type | Σ | 1..1 | code | code | Coding | string | integer | boolean | dateTime | decimal Binding: PropertyType (required) |
concept | SI | 0..* | BackboneElement | Concepts in the code system |
id | 0..1 | string | Unique id for inter-element referencing | |
extension | 0..* | Extension | Additional content defined by implementations | |
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized |
code | S | 1..1 | code | Code that identifies concept |
display | S | 0..1 | string | Text to display to the user |
id | 0..1 | string | xml:id (or equivalent in JSON) | |
extension | 0..* | Extension | Extension Slice: Unordered, Open by value:url | |
rendering-style | I | 0..1 | string | Html style value URL: http://hl7.org/fhir/StructureDefinition/rendering-style |
rendering-xhtml | I | 0..1 | string | String equivalent with html markup URL: http://hl7.org/fhir/StructureDefinition/rendering-xhtml |
value | 0..1 | Primitive value for string Max Length: 1048576 | ||
definition | S | 0..1 | string | Formal definition |
designation | I | 0..* | BackboneElement | Additional representations for the concept |
id | 0..1 | string | Unique id for inter-element referencing | |
extension | 0..* | Extension | Additional content defined by implementations | |
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized |
language | 0..1 | code | Human language of the designation Binding: CommonLanguages (preferred) Max Binding: AllLanguages | |
use | 0..1 | Coding | Details how this designation would be used Binding: DesignationUse (extensible) | |
value | 1..1 | string | The text value for this designation | |
id | 0..1 | string | xml:id (or equivalent in JSON) | |
extension | 0..* | Extension | Extension Slice: Unordered, Open by value:url | |
rendering-style | I | 0..1 | string | Html style value URL: http://hl7.org/fhir/StructureDefinition/rendering-style |
rendering-xhtml | I | 0..1 | string | String equivalent with html markup URL: http://hl7.org/fhir/StructureDefinition/rendering-xhtml |
value | 0..1 | Primitive value for string Max Length: 1048576 | ||
property | I | 0..* | BackboneElement | Property value for the concept |
id | 0..1 | string | Unique id for inter-element referencing | |
extension | 0..* | Extension | Additional content defined by implementations | |
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized |
code | 1..1 | code | Reference to CodeSystem.property.code | |
value[x] | 1..1 | code, Coding, string, integer, boolean, dateTime, decimal | Value of the property for this concept | |
concept | S | 0..* | Unknown reference to #CodeSystem.concept Child Concepts (is-a/contains/categorizes) | |
Documentation for this format |
This structure is derived from CodeSystem
Differential View
This structure is derived from CodeSystem
Snapshot View
Name | Flags | Card. | Type | Description & Constraints |
---|---|---|---|---|
CodeSystem | I | 0..* | Declares the existence of and describes a code system or code system supplement | |
id | Σ | 0..1 | id | Logical id of this artifact |
meta | Σ | 0..1 | Meta | Metadata about the resource |
implicitRules | ?!Σ | 0..1 | uri | A set of rules under which this content was created |
language | 0..1 | code | Language of the resource content Binding: CommonLanguages (preferred) Max Binding: AllLanguages | |
text | 0..1 | Narrative | Text summary of the resource, for human interpretation | |
contained | 0..* | Resource | Contained, inline Resources | |
extension | 0..* | Extension | Extension Slice: Unordered, Open by value:url | |
rendering-styleSensitive | SI | 0..1 | boolean | Are styles important for processing? URL: http://hl7.org/fhir/StructureDefinition/rendering-styleSensitive |
modifierExtension | ?! | 0..* | Extension | Extensions that cannot be ignored |
url | SΣ | 0..1 | uri | Canonical identifier for this code system, represented as a URI (globally unique) (Coding.system) |
identifier | Σ | 0..* | Identifier | Additional identifier for the code system (business identifier) |
version | Σ | 0..1 | string | Business version of the code system (Coding.version) |
name | SΣI | 1..1 | string | Name for this code system (computer friendly) |
title | Σ | 0..1 | string | Name for this code system (human friendly) |
status | ?!SΣ | 1..1 | code | draft | active | retired | unknown Binding: PublicationStatus (required) |
experimental | SΣ | 0..1 | boolean | For testing purposes, not real usage |
date | SΣ | 0..1 | dateTime | Date last changed |
publisher | Σ | 0..1 | string | Name of the publisher (organization or individual) |
contact | Σ | 0..* | ContactDetail | Contact details for the publisher |
description | S | 1..1 | markdown | Natural language description of the code system |
useContext | Σ | 0..* | UsageContext | The context that the content is intended to support |
jurisdiction | Σ | 0..* | CodeableConcept | Intended jurisdiction for code system (if applicable) Binding: Jurisdiction ValueSet (extensible) |
purpose | 0..1 | markdown | Why this code system is defined | |
copyright | 0..1 | markdown | Use and/or publishing restrictions | |
caseSensitive | SΣ | 1..1 | boolean | If code comparison is case sensitive |
valueSet | Σ | 0..1 | canonical(ValueSet) | Canonical reference to the value set with entire code system |
hierarchyMeaning | Σ | 0..1 | code | grouped-by | is-a | part-of | classified-with Binding: CodeSystemHierarchyMeaning (required) |
content | SΣ | 1..1 | code | not-present | example | fragment | complete | supplement Binding: CodeSystemContentMode (required) |
supplements | Σ | 0..1 | canonical(CodeSystem) | Canonical URL of Code System this adds designations and properties to |
count | Σ | 0..1 | unsignedInt | Total concepts in the code system |
filter | ΣI | 0..* | BackboneElement | Filter that can be used in a value set |
id | 0..1 | string | Unique id for inter-element referencing | |
extension | 0..* | Extension | Additional content defined by implementations | |
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized |
code | Σ | 1..1 | code | Code that identifies the filter |
description | Σ | 0..1 | string | How or why the filter is used |
operator | Σ | 1..* | code | Operators that can be used with filter Binding: FilterOperator (required) |
value | Σ | 1..1 | string | What to use for the value |
property | ΣI | 0..* | BackboneElement | Additional information supplied about each concept |
id | 0..1 | string | Unique id for inter-element referencing | |
extension | 0..* | Extension | Additional content defined by implementations | |
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized |
code | Σ | 1..1 | code | Identifies the property on the concepts, and when referred to in operations |
uri | Σ | 0..1 | uri | Formal identifier for the property |
description | Σ | 0..1 | string | Why the property is defined, and/or what it conveys |
type | Σ | 1..1 | code | code | Coding | string | integer | boolean | dateTime | decimal Binding: PropertyType (required) |
concept | SI | 0..* | BackboneElement | Concepts in the code system |
id | 0..1 | string | Unique id for inter-element referencing | |
extension | 0..* | Extension | Additional content defined by implementations | |
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized |
code | S | 1..1 | code | Code that identifies concept |
display | S | 0..1 | string | Text to display to the user |
id | 0..1 | string | xml:id (or equivalent in JSON) | |
extension | 0..* | Extension | Extension Slice: Unordered, Open by value:url | |
rendering-style | I | 0..1 | string | Html style value URL: http://hl7.org/fhir/StructureDefinition/rendering-style |
rendering-xhtml | I | 0..1 | string | String equivalent with html markup URL: http://hl7.org/fhir/StructureDefinition/rendering-xhtml |
value | 0..1 | Primitive value for string Max Length: 1048576 | ||
definition | S | 0..1 | string | Formal definition |
designation | I | 0..* | BackboneElement | Additional representations for the concept |
id | 0..1 | string | Unique id for inter-element referencing | |
extension | 0..* | Extension | Additional content defined by implementations | |
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized |
language | 0..1 | code | Human language of the designation Binding: CommonLanguages (preferred) Max Binding: AllLanguages | |
use | 0..1 | Coding | Details how this designation would be used Binding: DesignationUse (extensible) | |
value | 1..1 | string | The text value for this designation | |
id | 0..1 | string | xml:id (or equivalent in JSON) | |
extension | 0..* | Extension | Extension Slice: Unordered, Open by value:url | |
rendering-style | I | 0..1 | string | Html style value URL: http://hl7.org/fhir/StructureDefinition/rendering-style |
rendering-xhtml | I | 0..1 | string | String equivalent with html markup URL: http://hl7.org/fhir/StructureDefinition/rendering-xhtml |
value | 0..1 | Primitive value for string Max Length: 1048576 | ||
property | I | 0..* | BackboneElement | Property value for the concept |
id | 0..1 | string | Unique id for inter-element referencing | |
extension | 0..* | Extension | Additional content defined by implementations | |
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized |
code | 1..1 | code | Reference to CodeSystem.property.code | |
value[x] | 1..1 | code, Coding, string, integer, boolean, dateTime, decimal | Value of the property for this concept | |
concept | S | 0..* | Unknown reference to #CodeSystem.concept Child Concepts (is-a/contains/categorizes) | |
Documentation for this format |
Other representations of profile: Schematron
Path | Conformance | ValueSet |
CodeSystem.status | required | PublicationStatus |
CodeSystem.content | required | CodeSystemContentMode |
Id | Path | Details | Requirements |
dom-2 | CodeSystem | If the resource is contained in another resource, it SHALL NOT contain nested Resources : contained.contained.empty() | |
dom-4 | CodeSystem | If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated : contained.meta.versionId.empty() and contained.meta.lastUpdated.empty() | |
dom-3 | CodeSystem | If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource or SHALL refer to the containing resource : contained.where((('#'+id in (%resource.descendants().reference | %resource.descendants().as(canonical) | %resource.descendants().as(uri) | %resource.descendants().as(url))) or descendants().where(reference = '#').exists() or descendants().where(as(canonical) = '#').exists() or descendants().where(as(canonical) = '#').exists()).not()).trace('unmatched', id).empty() | |
dom-6 | CodeSystem | A resource should have narrative for robust management : text.div.exists() | |
dom-5 | CodeSystem | If a resource is contained in another resource, it SHALL NOT have a security label : contained.meta.security.empty() | |
csd-1 | CodeSystem | Within a code system definition, all the codes SHALL be unique : concept.code.combine($this.descendants().concept.code).isDistinct() | |
csd-0 | CodeSystem | 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}') | |
ele-1 | CodeSystem.extension | All FHIR elements must have a @value or children : hasValue() or (children().count() > id.count()) | |
ext-1 | CodeSystem.extension | Must have either extensions or value[x], not both : extension.exists() != value.exists() | |
ele-1 | CodeSystem.extension | All FHIR elements must have a @value or children : hasValue() or (children().count() > id.count()) | |
ext-1 | CodeSystem.extension | Must have either extensions or value[x], not both : extension.exists() != value.exists() | |
ele-1 | CodeSystem.filter | All FHIR elements must have a @value or children : hasValue() or (children().count() > id.count()) | |
ele-1 | CodeSystem.property | All FHIR elements must have a @value or children : hasValue() or (children().count() > id.count()) | |
ele-1 | CodeSystem.concept | All FHIR elements must have a @value or children : hasValue() or (children().count() > id.count()) | |
ele-1 | CodeSystem.concept.display.extension | All FHIR elements must have a @value or children : hasValue() or (children().count() > id.count()) | |
ext-1 | CodeSystem.concept.display.extension | Must have either extensions or value[x], not both : extension.exists() != value.exists() | |
ele-1 | CodeSystem.concept.display.extension | All FHIR elements must have a @value or children : hasValue() or (children().count() > id.count()) | |
ext-1 | CodeSystem.concept.display.extension | Must have either extensions or value[x], not both : extension.exists() != value.exists() | |
ele-1 | CodeSystem.concept.display.extension | All FHIR elements must have a @value or children : hasValue() or (children().count() > id.count()) | |
ext-1 | CodeSystem.concept.display.extension | Must have either extensions or value[x], not both : extension.exists() != value.exists() | |
ele-1 | CodeSystem.concept.designation | All FHIR elements must have a @value or children : hasValue() or (children().count() > id.count()) | |
ele-1 | CodeSystem.concept.designation.value.extension | All FHIR elements must have a @value or children : hasValue() or (children().count() > id.count()) | |
ext-1 | CodeSystem.concept.designation.value.extension | Must have either extensions or value[x], not both : extension.exists() != value.exists() | |
ele-1 | CodeSystem.concept.designation.value.extension | All FHIR elements must have a @value or children : hasValue() or (children().count() > id.count()) | |
ext-1 | CodeSystem.concept.designation.value.extension | Must have either extensions or value[x], not both : extension.exists() != value.exists() | |
ele-1 | CodeSystem.concept.designation.value.extension | All FHIR elements must have a @value or children : hasValue() or (children().count() > id.count()) | |
ext-1 | CodeSystem.concept.designation.value.extension | Must have either extensions or value[x], not both : extension.exists() != value.exists() | |
ele-1 | CodeSystem.concept.property | All FHIR elements must have a @value or children : hasValue() or (children().count() > id.count()) |