STU 3 Candidate

This page is part of the FHIR Specification (v1.4.0: STU 3 Ballot 3). The current version which supercedes this version is 5.0.0. For a full list of available versions, see the Directory of published versions . Page versions: R5 R4B R4 R3

6.28 Resource CodeSystem - Content

Vocabulary Work GroupMaturity Level: 0Compartments: Not linked to any defined compartments

A code system resource specifies a set of codes drawn from one or more code systems.

6.28.1 Scope and Usage

The FHIR terminology specification is based two key concepts, originally defined in HL7 v3 Core Principles :

  • code system - defines a set of codes with meanings (also known as enumeration, terminology, classification, and/or ontology)
  • value set - selects a set of codes from those defined by one or more code systems

Code systems define which codes (symbols and/or expressions) exist, and how they are understood. Value Sets select a set of codes from one or more code systems to specify which codes can be used in a particular context.

The Code system resource is used to declare the existence of a code system, and it's key properties:

  • Identifying URL and version
  • Description, Copyright, publication date, and other metadata
  • Some key properties of the code system itself - whether it's case sensitive, version safe, and whether it defines a compositional grammar
  • What filters can be used in value sets that use the code system in a ValueSet.compose element
  • What properties the concepts defined by the code system

In addition, the code system resource may list some or all of the concepts in the code system, along with their basic properties (code, display, definition), designations, and additional properties.

The Code system resource is not intended to support the process of maintaining a code system. Instead, the focus is on publishing the properties and optionally the content of a code system for use throughout the FHIR eco-system, such as to support value set expansion and validation. Note that the important existing (large) code systems (SNOMED CT, LOINC, RxNorm, ICD family, etc) all have their own distribution formats, and there is no intent that the code system resource be used for distributing these kind of terminologies. Instead, it is intended to be used for distributing the smaller ad-hoc code systems that are ubiqutiously encountered through out the healthcare process.

6.28.2 Boundaries and Relationships

  • Code systems are used in ValueSet resources
  • The Coding data type refers to code system resources by their canonical URL
  • The CodeSystem resource design is based on the functionality described in the OMG CTS 2 specification, along with metadata in the HL7 Code System Definition specification. Code system resources can be converted to CTS2 code system and code system resources.
  • The code system resource is aligned with the Code System Definition (VSD) project. Not all of the elements defined by the VSD are part of the base resource - some are defined as part of the CodeSystem Extensions. In the CodeSystem resource, the lockedDate, compose and codeSystem elements make up the VSD Content Logical definition.

6.28.3 Background and Context

When using code systems and 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.

Each code system has 2 different URLs that can be used to reference it - its logical identifier, and its location.

The location of the code system is a URL by which it may be retrieved, usually from a FHIR server, and may be a relative reference to a code system on the same server. The logical identifier is in the code system itself, in CodeSystem.url. This is the logical identity (sometimes called the canonical URL) that refers to this code system across all systems. Ideally, the URL should also be the location of the master version of the code system, though this is not always possible.

For example, the code systems published as part of FHIR all have a logical URL which is also a location by which they may be accessed in the FHIR specification itself. However, while a new version of the FHIR Specification is being prepared, code systems that are published in the drafts will not be found in the current FHIR specification.

Because it is common practice to copy (cache) code systems locally, most references to code systems can be either a logical or a literal URL.

6.28.3.1 CodeSystem Identification

A code system has 3 identifiers:

  • CodeSystem.id: the local identifier on the system that holds it - this changes as it moves from server to server (this id, with the server address prepended, is called the 'literal identity' of the resource)
  • CodeSystem.url: the master identifier that never changes for this code system - it is the same in every copy (this is called the 'logical identity' of the resource)
  • CodeSystem.identifier: A system/value pair that is used to identify the code system in other contexts (such as an OID in an HL7 v3 specification)

For further information, see Resource Identity.

6.28.4 Resource Content

Structure

NameFlagsCard.TypeDescription & Constraintsdoco
.. CodeSystem IDomainResourceA set of codes drawn from one or more code systems
Within a code system definition, all the codes SHALL be unique
... url Σ0..1uriGlobally unique logical identifier for code system (Coding.system)
... identifier Σ0..1IdentifierAdditional identifier for the code system (e.g. HL7 v2 / CDA)
... version Σ0..1stringLogical identifier for this version (Coding.version)
... name Σ0..1stringInformal name for this code system
... status ?! Σ1..1codedraft | active | retired
ConformanceResourceStatus (Required)
... experimental Σ0..1booleanIf for testing purposes, not real usage
... publisher Σ0..1stringName of the publisher (organization or individual)
... contact Σ0..*BackboneElementContact details of the publisher
.... name Σ0..1stringName of an individual to contact
.... telecom Σ0..*ContactPointContact details for individual or publisher
... date Σ0..1dateTimeDate for given status
... description Σ0..1stringHuman language description of the code system
... useContext Σ0..*CodeableConceptContent intends to support these contexts
Context of Use ValueSet (Extensible)
... requirements 0..1stringWhy needed
... copyright 0..1stringUse and/or publishing restrictions
... caseSensitive Σ0..1booleanIf code comparison is case sensitive
... valueSet Σ0..1uriCanonical URL for value set with entire code system
... compositional Σ0..1booleanIf code system defines a post-composition grammar
... versionNeeded Σ0..1booleanIf definitions are not stable
... content Σ1..1codenot-present | examplar | fragment | complete
CodeSystemContentMode (Required)
... count Σ0..1unsignedIntTotal concepts in the code system
... filter Σ0..*BackboneElementFilter that can be used in a value set
.... code Σ1..1codeCode that identifies the filter
.... description Σ0..1stringHow or why the filter is used
.... operator Σ1..*codeOperators that can be used with filter
FilterOperator (Required)
.... value Σ1..1stringWhat to use for the value
... property Σ0..*BackboneElementAdditional information supplied about each concept
.... code Σ1..1codeIdentifies the property, both internally and externally
.... description Σ0..1stringWhy the property is defined, and/or what it conveys
.... type Σ1..1codecode | Coding | string | integer | boolean | dateTime
PropertyType (Required)
... concept 0..*BackboneElementConcepts in the code system
.... code 1..1codeCode that identifies concept
.... display 0..1stringText to display to the user
.... definition 0..1stringFormal definition
.... designation 0..*BackboneElementAdditional representations for the concept
..... language 0..1codeHuman language of the designation
Language (Required)
..... use 0..1CodingDetails how this designation would be used
Designation Use (Extensible)
..... value 1..1stringThe text value for this designation
.... property 0..*BackboneElementProperty value for the concept
..... code 1..1codeReference to CodeSystem.property.code
..... value[x] 1..1Value of the property for this concept
...... valueCodecode
...... valueCodingCoding
...... valueStringstring
...... valueIntegerinteger
...... valueBooleanboolean
...... valueDateTimedateTime
.... concept 0..*see conceptChild Concepts (is-a/contains/categorizes)

doco Documentation for this format

UML Diagram

CodeSystem (DomainResource)An absolute URL that is used to identify this code system when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this code system is (or will be) published. This is used in [Coding]{datatypes.html#Coding}.systemurl : uri [0..1]Formal identifier that is used to identify this code system when it is represented in other formats, or referenced in a specification, model, design or an instanceidentifier : Identifier [0..1]Used to identify this version of the code system when it is referenced in a specification, model, design or instance (e.g. Coding.version). This is an arbitrary value managed by the profile author manually and the value should be a timestamp. This is used in [Coding]{datatypes.html#Coding}.versionversion : string [0..1]A free text natural language name describing the code systemname : string [0..1]The status of the code system (this element modifies the meaning of other elements)status : code [1..1] « The lifecycle status of a Value Set or Concept Map. (Strength=Required)ConformanceResourceStatus! »This CodeSystem was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usageexperimental : boolean [0..1]The name of the individual or organization that published the code systempublisher : string [0..1]The date that the code system status was last changed. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the implementation guide changes (e.g. the 'content logical definition')date : dateTime [0..1]A free text natural language description of the use of the code system - reason for definition, "the semantic space" to be included in the code system, conditions of use, etc. The description may include a list of expected usages for the code system and can also describe the approach taken to build the code systemdescription : string [0..1]The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of code system definitionsuseContext : CodeableConcept [0..*] « Indicates the countries, regions, disciplines and other aspects of use within which this artifact is targeted for use. (Strength=Extensible)Context of Use ValueSet+ »Explains why this code system is needed and why it has been constrained as it hasrequirements : string [0..1]A copyright statement relating to the code system and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the code systemcopyright : string [0..1]If code comparison is case sensitive when codes within this system are compared to each othercaseSensitive : boolean [0..1]Canonical URL of value set that contains the entire code systemvalueSet : uri [0..1]True If code system defines a post-composition grammarcompositional : boolean [0..1]This flag is used to signify that the code system has not (or does not) maintain the definitions, and a version must be specified when referencing this code systemversionNeeded : boolean [0..1]How much of the content of the code system - the concepts and codes it defines - are represented in this resourcecontent : code [1..1] « How much of the content of the code system - the concepts and codes it defines - are represented in a code system resource (Strength=Required)CodeSystemContentMode! »The total number of concepts defined by the code system. Where the code system has a compositional grammar, the count refers to the number of base (primitive) conceptscount : unsignedInt [0..1]ContactThe name of an individual to contact regarding the code systemname : string [0..1]Contact details for individual (if a name was provided) or the publishertelecom : ContactPoint [0..*]FilterThe code that identifies thise filter when it is used in the instancecode : code [1..1]A description of how or why the filter is useddescription : string [0..1]A list of operators that can be used with the filteroperator : code [1..*] « The kind of operation to perform as a part of a property based filter. (Strength=Required)FilterOperator! »A description of what the value for the filter should bevalue : string [1..1]PropertyA code that is used to identify the property. The code is used internally (in CodeSystem.concept.property.code) and also externally, such as in property filterscode : code [1..1]A description of the property- why it is defined, and how it's value might be useddescription : string [0..1]The type of the property valuetype : code [1..1] « The type of a property value (Strength=Required)PropertyType! »ConceptDefinitionA code - a text symbol - that uniquely identifies the concept within the code systemcode : code [1..1]A human readable string that is the recommended default way to present this concept to a userdisplay : string [0..1]The formal definition of the concept. The code system resource does not make formal definitions required, because of the prevalence of legacy systems. However, they are highly recommended, as without them there is no formal meaning associated with the conceptdefinition : string [0..1]DesignationThe language this designation is defined forlanguage : code [0..1] « A human language. (Strength=Required)Language! »A code that details how this designation would be useduse : Coding [0..1] « Details of how a designation would be used. (Strength=Extensible)Designation Use+ »The text value for this designationvalue : string [1..1]PropertyA code that is a reference to CodeSystem.property.codecode : code [1..1]The value of this propertyvalue[x] : Type [1..1] « code|Coding|string|integer|boolean|dateTime »Contacts to assist a user in finding and communicating with the publishercontact[0..*]A filter that can be used in a value set compose statement when selecting concepts using a filterfilter[0..*]A property defines an additional slot through which additional information can be provided about a conceptproperty[0..*]Additional representations for the concept - other languages, aliases, specialized purposes, used for particular purposes, etcdesignation[0..*]A property value for this conceptproperty[0..*]Defines children of a concept to produce a hierarchy of concepts. The nature of the relationships is variable (is-a/contains/categorizes) and can only be determined by examining the definitions of the conceptsconcept[0..*]Concepts that are in the code system. The concept definitions are inherently hierarchical, but the definitions must be consulted to determine what the meaning of the hierarchical relationships areconcept[0..*]

XML Template

<CodeSystem xmlns="http://hl7.org/fhir"> doco
 <!-- from Resource: id, meta, implicitRules, and language -->
 <!-- from DomainResource: text, contained, extension, and modifierExtension -->
 <url value="[uri]"/><!-- 0..1 Globally unique logical identifier for  code system (Coding.system) -->
 <identifier><!-- 0..1 Identifier Additional identifier for the code system (e.g. HL7 v2 / CDA) --></identifier>
 <version value="[string]"/><!-- 0..1 Logical identifier for this version (Coding.version) -->
 <name value="[string]"/><!-- 0..1 Informal name for this code system -->
 <status value="[code]"/><!-- 1..1 draft | active | retired -->
 <experimental value="[boolean]"/><!-- 0..1 If for testing purposes, not real usage -->
 <publisher value="[string]"/><!-- 0..1 Name of the publisher (organization or individual) -->
 <contact>  <!-- 0..* Contact details of the publisher -->
  <name value="[string]"/><!-- 0..1 Name of an individual to contact -->
  <telecom><!-- 0..* ContactPoint Contact details for individual or publisher --></telecom>
 </contact>
 <date value="[dateTime]"/><!-- 0..1 Date for given status -->
 <description value="[string]"/><!-- 0..1 Human language description of the code system -->
 <useContext><!-- 0..* CodeableConcept Content intends to support these contexts --></useContext>
 <requirements value="[string]"/><!-- 0..1 Why needed -->
 <copyright value="[string]"/><!-- 0..1 Use and/or publishing restrictions -->
 <caseSensitive value="[boolean]"/><!-- 0..1 If code comparison is case sensitive -->
 <valueSet value="[uri]"/><!-- 0..1 Canonical URL for value set with entire code system -->
 <compositional value="[boolean]"/><!-- 0..1 If code system defines a post-composition grammar -->
 <versionNeeded value="[boolean]"/><!-- 0..1 If definitions are not stable -->
 <content value="[code]"/><!-- 1..1 not-present | examplar | fragment | complete -->
 <count value="[unsignedInt]"/><!-- 0..1 Total concepts in the code system -->
 <filter>  <!-- 0..* Filter that can be used in a value set -->
  <code value="[code]"/><!-- 1..1 Code that identifies the filter -->
  <description value="[string]"/><!-- 0..1 How or why the filter is used -->
  <operator value="[code]"/><!-- 1..* Operators that can be used with filter -->
  <value value="[string]"/><!-- 1..1 What to use for the value -->
 </filter>
 <property>  <!-- 0..* Additional information supplied about each concept -->
  <code value="[code]"/><!-- 1..1 Identifies the property, both internally and externally -->
  <description value="[string]"/><!-- 0..1 Why the property is defined, and/or what it conveys -->
  <type value="[code]"/><!-- 1..1 code | Coding | string | integer | boolean | dateTime -->
 </property>
 <concept>  <!-- 0..* Concepts in the code system -->
  <code value="[code]"/><!-- 1..1 Code that identifies concept -->
  <display value="[string]"/><!-- 0..1 Text to display to the user -->
  <definition value="[string]"/><!-- 0..1 Formal definition -->
  <designation>  <!-- 0..* Additional representations for the concept -->
   <language value="[code]"/><!-- 0..1 Human language of the designation  -->
   <use><!-- 0..1 Coding Details how this designation would be used --></use>
   <value value="[string]"/><!-- 1..1 The text value for this designation -->
  </designation>
  <property>  <!-- 0..* Property value for the concept -->
   <code value="[code]"/><!-- 1..1 Reference to CodeSystem.property.code -->
   <value[x]><!-- 1..1 code|Coding|string|integer|boolean|dateTime Value of the property for this concept --></value[x]>
  </property>
  <concept><!-- 0..* Content as for CodeSystem.concept Child Concepts (is-a/contains/categorizes) --></concept>
 </concept>
</CodeSystem>

JSON Template

{doco
  "resourceType" : "CodeSystem",
  // from Resource: id, meta, implicitRules, and language
  // from DomainResource: text, contained, extension, and modifierExtension
  "url" : "<uri>", // Globally unique logical identifier for  code system (Coding.system)
  "identifier" : { Identifier }, // Additional identifier for the code system (e.g. HL7 v2 / CDA)
  "version" : "<string>", // Logical identifier for this version (Coding.version)
  "name" : "<string>", // Informal name for this code system
  "status" : "<code>", // R!  draft | active | retired
  "experimental" : <boolean>, // If for testing purposes, not real usage
  "publisher" : "<string>", // Name of the publisher (organization or individual)
  "contact" : [{ // Contact details of the publisher
    "name" : "<string>", // Name of an individual to contact
    "telecom" : [{ ContactPoint }] // Contact details for individual or publisher
  }],
  "date" : "<dateTime>", // Date for given status
  "description" : "<string>", // Human language description of the code system
  "useContext" : [{ CodeableConcept }], // Content intends to support these contexts
  "requirements" : "<string>", // Why needed
  "copyright" : "<string>", // Use and/or publishing restrictions
  "caseSensitive" : <boolean>, // If code comparison is case sensitive
  "valueSet" : "<uri>", // Canonical URL for value set with entire code system
  "compositional" : <boolean>, // If code system defines a post-composition grammar
  "versionNeeded" : <boolean>, // If definitions are not stable
  "content" : "<code>", // R!  not-present | examplar | fragment | complete
  "count" : "<unsignedInt>", // Total concepts in the code system
  "filter" : [{ // Filter that can be used in a value set
    "code" : "<code>", // R!  Code that identifies the filter
    "description" : "<string>", // How or why the filter is used
    "operator" : ["<code>"], // R!  Operators that can be used with filter
    "value" : "<string>" // R!  What to use for the value
  }],
  "property" : [{ // Additional information supplied about each concept
    "code" : "<code>", // R!  Identifies the property, both internally and externally
    "description" : "<string>", // Why the property is defined, and/or what it conveys
    "type" : "<code>" // R!  code | Coding | string | integer | boolean | dateTime
  }],
  "concept" : [{ // Concepts in the code system
    "code" : "<code>", // R!  Code that identifies concept
    "display" : "<string>", // Text to display to the user
    "definition" : "<string>", // Formal definition
    "designation" : [{ // Additional representations for the concept
      "language" : "<code>", // Human language of the designation 
      "use" : { Coding }, // Details how this designation would be used
      "value" : "<string>" // R!  The text value for this designation
    }],
    "property" : [{ // Property value for the concept
      "code" : "<code>", // R!  Reference to CodeSystem.property.code
      // value[x]: Value of the property for this concept. One of these 6:
      "valueCode" : "<code>"
      "valueCoding" : { Coding }
      "valueString" : "<string>"
      "valueInteger" : <integer>
      "valueBoolean" : <boolean>
      "valueDateTime" : "<dateTime>"
    }],
    "concept" : [{ Content as for CodeSystem.concept }] // Child Concepts (is-a/contains/categorizes)
  }]
}

Structure

NameFlagsCard.TypeDescription & Constraintsdoco
.. CodeSystem IDomainResourceA set of codes drawn from one or more code systems
Within a code system definition, all the codes SHALL be unique
... url Σ0..1uriGlobally unique logical identifier for code system (Coding.system)
... identifier Σ0..1IdentifierAdditional identifier for the code system (e.g. HL7 v2 / CDA)
... version Σ0..1stringLogical identifier for this version (Coding.version)
... name Σ0..1stringInformal name for this code system
... status ?! Σ1..1codedraft | active | retired
ConformanceResourceStatus (Required)
... experimental Σ0..1booleanIf for testing purposes, not real usage
... publisher Σ0..1stringName of the publisher (organization or individual)
... contact Σ0..*BackboneElementContact details of the publisher
.... name Σ0..1stringName of an individual to contact
.... telecom Σ0..*ContactPointContact details for individual or publisher
... date Σ0..1dateTimeDate for given status
... description Σ0..1stringHuman language description of the code system
... useContext Σ0..*CodeableConceptContent intends to support these contexts
Context of Use ValueSet (Extensible)
... requirements 0..1stringWhy needed
... copyright 0..1stringUse and/or publishing restrictions
... caseSensitive Σ0..1booleanIf code comparison is case sensitive
... valueSet Σ0..1uriCanonical URL for value set with entire code system
... compositional Σ0..1booleanIf code system defines a post-composition grammar
... versionNeeded Σ0..1booleanIf definitions are not stable
... content Σ1..1codenot-present | examplar | fragment | complete
CodeSystemContentMode (Required)
... count Σ0..1unsignedIntTotal concepts in the code system
... filter Σ0..*BackboneElementFilter that can be used in a value set
.... code Σ1..1codeCode that identifies the filter
.... description Σ0..1stringHow or why the filter is used
.... operator Σ1..*codeOperators that can be used with filter
FilterOperator (Required)
.... value Σ1..1stringWhat to use for the value
... property Σ0..*BackboneElementAdditional information supplied about each concept
.... code Σ1..1codeIdentifies the property, both internally and externally
.... description Σ0..1stringWhy the property is defined, and/or what it conveys
.... type Σ1..1codecode | Coding | string | integer | boolean | dateTime
PropertyType (Required)
... concept 0..*BackboneElementConcepts in the code system
.... code 1..1codeCode that identifies concept
.... display 0..1stringText to display to the user
.... definition 0..1stringFormal definition
.... designation 0..*BackboneElementAdditional representations for the concept
..... language 0..1codeHuman language of the designation
Language (Required)
..... use 0..1CodingDetails how this designation would be used
Designation Use (Extensible)
..... value 1..1stringThe text value for this designation
.... property 0..*BackboneElementProperty value for the concept
..... code 1..1codeReference to CodeSystem.property.code
..... value[x] 1..1Value of the property for this concept
...... valueCodecode
...... valueCodingCoding
...... valueStringstring
...... valueIntegerinteger
...... valueBooleanboolean
...... valueDateTimedateTime
.... concept 0..*see conceptChild Concepts (is-a/contains/categorizes)

doco Documentation for this format

UML Diagram

CodeSystem (DomainResource)An absolute URL that is used to identify this code system when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this code system is (or will be) published. This is used in [Coding]{datatypes.html#Coding}.systemurl : uri [0..1]Formal identifier that is used to identify this code system when it is represented in other formats, or referenced in a specification, model, design or an instanceidentifier : Identifier [0..1]Used to identify this version of the code system when it is referenced in a specification, model, design or instance (e.g. Coding.version). This is an arbitrary value managed by the profile author manually and the value should be a timestamp. This is used in [Coding]{datatypes.html#Coding}.versionversion : string [0..1]A free text natural language name describing the code systemname : string [0..1]The status of the code system (this element modifies the meaning of other elements)status : code [1..1] « The lifecycle status of a Value Set or Concept Map. (Strength=Required)ConformanceResourceStatus! »This CodeSystem was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usageexperimental : boolean [0..1]The name of the individual or organization that published the code systempublisher : string [0..1]The date that the code system status was last changed. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the implementation guide changes (e.g. the 'content logical definition')date : dateTime [0..1]A free text natural language description of the use of the code system - reason for definition, "the semantic space" to be included in the code system, conditions of use, etc. The description may include a list of expected usages for the code system and can also describe the approach taken to build the code systemdescription : string [0..1]The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of code system definitionsuseContext : CodeableConcept [0..*] « Indicates the countries, regions, disciplines and other aspects of use within which this artifact is targeted for use. (Strength=Extensible)Context of Use ValueSet+ »Explains why this code system is needed and why it has been constrained as it hasrequirements : string [0..1]A copyright statement relating to the code system and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the code systemcopyright : string [0..1]If code comparison is case sensitive when codes within this system are compared to each othercaseSensitive : boolean [0..1]Canonical URL of value set that contains the entire code systemvalueSet : uri [0..1]True If code system defines a post-composition grammarcompositional : boolean [0..1]This flag is used to signify that the code system has not (or does not) maintain the definitions, and a version must be specified when referencing this code systemversionNeeded : boolean [0..1]How much of the content of the code system - the concepts and codes it defines - are represented in this resourcecontent : code [1..1] « How much of the content of the code system - the concepts and codes it defines - are represented in a code system resource (Strength=Required)CodeSystemContentMode! »The total number of concepts defined by the code system. Where the code system has a compositional grammar, the count refers to the number of base (primitive) conceptscount : unsignedInt [0..1]ContactThe name of an individual to contact regarding the code systemname : string [0..1]Contact details for individual (if a name was provided) or the publishertelecom : ContactPoint [0..*]FilterThe code that identifies thise filter when it is used in the instancecode : code [1..1]A description of how or why the filter is useddescription : string [0..1]A list of operators that can be used with the filteroperator : code [1..*] « The kind of operation to perform as a part of a property based filter. (Strength=Required)FilterOperator! »A description of what the value for the filter should bevalue : string [1..1]PropertyA code that is used to identify the property. The code is used internally (in CodeSystem.concept.property.code) and also externally, such as in property filterscode : code [1..1]A description of the property- why it is defined, and how it's value might be useddescription : string [0..1]The type of the property valuetype : code [1..1] « The type of a property value (Strength=Required)PropertyType! »ConceptDefinitionA code - a text symbol - that uniquely identifies the concept within the code systemcode : code [1..1]A human readable string that is the recommended default way to present this concept to a userdisplay : string [0..1]The formal definition of the concept. The code system resource does not make formal definitions required, because of the prevalence of legacy systems. However, they are highly recommended, as without them there is no formal meaning associated with the conceptdefinition : string [0..1]DesignationThe language this designation is defined forlanguage : code [0..1] « A human language. (Strength=Required)Language! »A code that details how this designation would be useduse : Coding [0..1] « Details of how a designation would be used. (Strength=Extensible)Designation Use+ »The text value for this designationvalue : string [1..1]PropertyA code that is a reference to CodeSystem.property.codecode : code [1..1]The value of this propertyvalue[x] : Type [1..1] « code|Coding|string|integer|boolean|dateTime »Contacts to assist a user in finding and communicating with the publishercontact[0..*]A filter that can be used in a value set compose statement when selecting concepts using a filterfilter[0..*]A property defines an additional slot through which additional information can be provided about a conceptproperty[0..*]Additional representations for the concept - other languages, aliases, specialized purposes, used for particular purposes, etcdesignation[0..*]A property value for this conceptproperty[0..*]Defines children of a concept to produce a hierarchy of concepts. The nature of the relationships is variable (is-a/contains/categorizes) and can only be determined by examining the definitions of the conceptsconcept[0..*]Concepts that are in the code system. The concept definitions are inherently hierarchical, but the definitions must be consulted to determine what the meaning of the hierarchical relationships areconcept[0..*]

XML Template

<CodeSystem xmlns="http://hl7.org/fhir"> doco
 <!-- from Resource: id, meta, implicitRules, and language -->
 <!-- from DomainResource: text, contained, extension, and modifierExtension -->
 <url value="[uri]"/><!-- 0..1 Globally unique logical identifier for  code system (Coding.system) -->
 <identifier><!-- 0..1 Identifier Additional identifier for the code system (e.g. HL7 v2 / CDA) --></identifier>
 <version value="[string]"/><!-- 0..1 Logical identifier for this version (Coding.version) -->
 <name value="[string]"/><!-- 0..1 Informal name for this code system -->
 <status value="[code]"/><!-- 1..1 draft | active | retired -->
 <experimental value="[boolean]"/><!-- 0..1 If for testing purposes, not real usage -->
 <publisher value="[string]"/><!-- 0..1 Name of the publisher (organization or individual) -->
 <contact>  <!-- 0..* Contact details of the publisher -->
  <name value="[string]"/><!-- 0..1 Name of an individual to contact -->
  <telecom><!-- 0..* ContactPoint Contact details for individual or publisher --></telecom>
 </contact>
 <date value="[dateTime]"/><!-- 0..1 Date for given status -->
 <description value="[string]"/><!-- 0..1 Human language description of the code system -->
 <useContext><!-- 0..* CodeableConcept Content intends to support these contexts --></useContext>
 <requirements value="[string]"/><!-- 0..1 Why needed -->
 <copyright value="[string]"/><!-- 0..1 Use and/or publishing restrictions -->
 <caseSensitive value="[boolean]"/><!-- 0..1 If code comparison is case sensitive -->
 <valueSet value="[uri]"/><!-- 0..1 Canonical URL for value set with entire code system -->
 <compositional value="[boolean]"/><!-- 0..1 If code system defines a post-composition grammar -->
 <versionNeeded value="[boolean]"/><!-- 0..1 If definitions are not stable -->
 <content value="[code]"/><!-- 1..1 not-present | examplar | fragment | complete -->
 <count value="[unsignedInt]"/><!-- 0..1 Total concepts in the code system -->
 <filter>  <!-- 0..* Filter that can be used in a value set -->
  <code value="[code]"/><!-- 1..1 Code that identifies the filter -->
  <description value="[string]"/><!-- 0..1 How or why the filter is used -->
  <operator value="[code]"/><!-- 1..* Operators that can be used with filter -->
  <value value="[string]"/><!-- 1..1 What to use for the value -->
 </filter>
 <property>  <!-- 0..* Additional information supplied about each concept -->
  <code value="[code]"/><!-- 1..1 Identifies the property, both internally and externally -->
  <description value="[string]"/><!-- 0..1 Why the property is defined, and/or what it conveys -->
  <type value="[code]"/><!-- 1..1 code | Coding | string | integer | boolean | dateTime -->
 </property>
 <concept>  <!-- 0..* Concepts in the code system -->
  <code value="[code]"/><!-- 1..1 Code that identifies concept -->
  <display value="[string]"/><!-- 0..1 Text to display to the user -->
  <definition value="[string]"/><!-- 0..1 Formal definition -->
  <designation>  <!-- 0..* Additional representations for the concept -->
   <language value="[code]"/><!-- 0..1 Human language of the designation  -->
   <use><!-- 0..1 Coding Details how this designation would be used --></use>
   <value value="[string]"/><!-- 1..1 The text value for this designation -->
  </designation>
  <property>  <!-- 0..* Property value for the concept -->
   <code value="[code]"/><!-- 1..1 Reference to CodeSystem.property.code -->
   <value[x]><!-- 1..1 code|Coding|string|integer|boolean|dateTime Value of the property for this concept --></value[x]>
  </property>
  <concept><!-- 0..* Content as for CodeSystem.concept Child Concepts (is-a/contains/categorizes) --></concept>
 </concept>
</CodeSystem>

JSON Template

{doco
  "resourceType" : "CodeSystem",
  // from Resource: id, meta, implicitRules, and language
  // from DomainResource: text, contained, extension, and modifierExtension
  "url" : "<uri>", // Globally unique logical identifier for  code system (Coding.system)
  "identifier" : { Identifier }, // Additional identifier for the code system (e.g. HL7 v2 / CDA)
  "version" : "<string>", // Logical identifier for this version (Coding.version)
  "name" : "<string>", // Informal name for this code system
  "status" : "<code>", // R!  draft | active | retired
  "experimental" : <boolean>, // If for testing purposes, not real usage
  "publisher" : "<string>", // Name of the publisher (organization or individual)
  "contact" : [{ // Contact details of the publisher
    "name" : "<string>", // Name of an individual to contact
    "telecom" : [{ ContactPoint }] // Contact details for individual or publisher
  }],
  "date" : "<dateTime>", // Date for given status
  "description" : "<string>", // Human language description of the code system
  "useContext" : [{ CodeableConcept }], // Content intends to support these contexts
  "requirements" : "<string>", // Why needed
  "copyright" : "<string>", // Use and/or publishing restrictions
  "caseSensitive" : <boolean>, // If code comparison is case sensitive
  "valueSet" : "<uri>", // Canonical URL for value set with entire code system
  "compositional" : <boolean>, // If code system defines a post-composition grammar
  "versionNeeded" : <boolean>, // If definitions are not stable
  "content" : "<code>", // R!  not-present | examplar | fragment | complete
  "count" : "<unsignedInt>", // Total concepts in the code system
  "filter" : [{ // Filter that can be used in a value set
    "code" : "<code>", // R!  Code that identifies the filter
    "description" : "<string>", // How or why the filter is used
    "operator" : ["<code>"], // R!  Operators that can be used with filter
    "value" : "<string>" // R!  What to use for the value
  }],
  "property" : [{ // Additional information supplied about each concept
    "code" : "<code>", // R!  Identifies the property, both internally and externally
    "description" : "<string>", // Why the property is defined, and/or what it conveys
    "type" : "<code>" // R!  code | Coding | string | integer | boolean | dateTime
  }],
  "concept" : [{ // Concepts in the code system
    "code" : "<code>", // R!  Code that identifies concept
    "display" : "<string>", // Text to display to the user
    "definition" : "<string>", // Formal definition
    "designation" : [{ // Additional representations for the concept
      "language" : "<code>", // Human language of the designation 
      "use" : { Coding }, // Details how this designation would be used
      "value" : "<string>" // R!  The text value for this designation
    }],
    "property" : [{ // Property value for the concept
      "code" : "<code>", // R!  Reference to CodeSystem.property.code
      // value[x]: Value of the property for this concept. One of these 6:
      "valueCode" : "<code>"
      "valueCoding" : { Coding }
      "valueString" : "<string>"
      "valueInteger" : <integer>
      "valueBoolean" : <boolean>
      "valueDateTime" : "<dateTime>"
    }],
    "concept" : [{ Content as for CodeSystem.concept }] // Child Concepts (is-a/contains/categorizes)
  }]
}

 

Alternate definitions: Schema/Schematron, Resource Profile (XML, JSON), Questionnaire

6.28.4.1 Terminology Bindings

PathDefinitionTypeReference
CodeSystem.status The lifecycle status of a Value Set or Concept Map.RequiredConformanceResourceStatus
CodeSystem.useContext Indicates the countries, regions, disciplines and other aspects of use within which this artifact is targeted for use.ExtensibleContext of Use ValueSet
CodeSystem.content How much of the content of the code system - the concepts and codes it defines - are represented in a code system resourceRequiredCodeSystemContentMode
CodeSystem.filter.operator The kind of operation to perform as a part of a property based filter.RequiredFilterOperator
CodeSystem.property.type The type of a property valueRequiredPropertyType
CodeSystem.concept.designation.language A human language.RequiredIETF language tag
CodeSystem.concept.designation.use Details of how a designation would be used.ExtensibleDesignation Use

6.28.4.2 Constraints

  • csd-1: Within a code system definition, all the codes SHALL be unique (expression: descendents().code.distinct())

6.28.5 Identifier and Version

The identifier and version elements may be used to reference this code system in a value set, or a CDA template or HL7 v3 message (in the CD data type codeSystem and codeSystemVersion properties). These different contexts may make additional restrictions on the possible values of these elements. These elements are generally not needed when using code systems with FHIR implementations, as they can make use of the innate identifier and versioning mechanism associated with the resource.

6.28.6 Search Parameters

Search parameters for this resource. The common parameters also apply. See Searching for more information about searching in REST, messaging, and services.

NameTypeDescriptionPaths
codetokenA code defined in the code systemCodeSystem.concept.code
contexttokenA use context assigned to the code systemCodeSystem.useContext
datedateThe code system publication dateCodeSystem.date
descriptionstringText search in the description of the code systemCodeSystem.description
identifiertokenThe identifier for the code systemCodeSystem.identifier
languagetokenA language in which a designation is providedCodeSystem.concept.designation.language
namestringThe name of the code systemCodeSystem.name
publisherstringName of the publisher of the code systemCodeSystem.publisher
statustokenThe status of the code systemCodeSystem.status
systemuriThe system for any codes defined by this code system (same as 'url')CodeSystem.url
urluriThe logical URL for the code systemCodeSystem.url
versiontokenThe version identifier of the code systemCodeSystem.version