Release 4 5

This page is part of the FHIR Specification (v4.0.1: R4 (v5.0.0: R5 - Mixed Normative and STU ) ). This is the current published version in it's permanent home (it will always be available at this URL). 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

4.8 Resource CodeSystem - Content

Vocabulary Terminology Infrastructure icon Work Group Maturity Level : N   Normative (from v4.0.0) Security Category : Anonymous Compartments : Not linked to any No defined compartments
This page has been approved as part of an ANSI standard. See the Conformance Package for further details.

The CodeSystem resource is used to declare the existence of and describe a code system or code system supplement and its key properties, and optionally define a part or all of its content.

The FHIR terminology specification is based on two key concepts, the concepts of code system and value set originally defined in HL7 v3 Core Principles icon :

code system - declares the existence of and describes a code system or code system supplement and its key properties, and optionally defines a part or all of its content. Also known as Ontology, Terminology, or Enumeration value set - specifies a set of codes drawn from one or more code systems, intended for use in a particular context. Value sets link between CodeSystem definitions and their use in coded elements

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 CodeSystem resource is used to declare the existence of a code system, and its key properties:

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

In addition, the CodeSystem 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. Code System resources may also be used to define supplements, which extend an existing code system with additional designations and properties.

The CodeSystem resource is not intended to support the process of maintaining code systems. 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 maintenance systems and distribution formats, and CodeSystem is generally not an efficient way to distribute their content, though it is used as one way of declaring the filters and properties associated with those code systems.

  • Code systems are used in ValueSet resources
  • The system element in the Coding data type (i.e. Coding.system) refers to a CodeSystem resources resource instance by their its canonical URL (i.e. CodeSystem.url)
  • The CodeSystem resource design is based, in part, on the code system functionality described in the HL7 CTS 2 icon specification. A CTS2 server can be used to maintain code systems which are then published using the CodeSystem resource
  • The CodeSystem resource documents the inherent structure and capabilities of code system, whereas the TerminologyCapabilities resource documents what a server hosting the code system is capable of

The CodeSystem resource declares the existence of a code system and its key properties including its preferred identifier. The NamingSystem resource identifies the existence of a code or identifier system, and its possible and preferred identifiers. The key difference between the resources is who creates and manages them - CodeSystem resources are managed by the owner or publisher of the code system, who can properly define the code system features and content. NamingSystem resources, on the other hand, are frequently defined by 3rd parties that encounter the code system in use, and need to describe the use, but do not have the authority to define the features and content. Additionally, there may be multiple authoritative NamingSystem resources for a code system, but ideally there would be only one authoritative CodeSystem resource (identified by its canonical URL) that is provided by the code system publisher, with multiple copies distributed on additional FHIR servers or elsewhere and used where needed.

Both Code System supplements and Concept Maps may be used to define relationships between concepts in different systems. ConceptMaps are assertions of the relationships between different concepts that are associated with particular contexts of use, while CodeSystem supplements are used to define inherent properties and semantics of the concepts in the code system

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 .

A code system has three identifiers. The first two can be used to reference the code system in the FHIR context:

  • CodeSystem.id : The logical id on the system that holds the CodeSystem resource instance - this typically is expected to change as the resource moves from server to server. The location URI is constructed by appending the logical id to the server base address where the instance is found and the resource type. This URI should be a resolvable URL by which the resource instance may be retrieved, usually from a FHIR server, and it may be a relative reference typically to the server base URL.
  • CodeSystem.url : The canonical URL that never changes for this code system - it is the same in every copy. The element is named url rather than uri for legacy reasons and to strongly encourage providing a resolvable URL as the identifier whenever possible. This canonical URL is used to refer to all instances of this particular code system across all servers and systems. Ideally, this URI should be a URL which resolves to the location of the master version of the code system, though this is not always possible.

For example, the code systems published as for CodeSystems that are part of the FHIR specification all have a location ("literal") URI which specification, CodeSystem.url is the URL url where they the CodeSystem may be accessed in the FHIR specification itself. specification. However, while a new version of the FHIR specification is being prepared, new code systems that are published in the drafts CI build versions will not be found in the current released FHIR specification version.

Because it is common practice to copy (cache) code systems locally, most references to code systems can use either the canonical URL or the location ("literal") URL. The third code system identifier is used typically for external references to the code system outside of FHIR:

  • 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 icon specification)

For further information regarding resource identification, see Resource Identity .

This means that each code system has 2 different URIs that can be used to reference it - its canonical URL (the url element), and its local location from which it may be retrieved (which includes the id element). Because it is common practice to copy (cache) code systems locally, most Most references to code systems use the canonical URL. URL because it is stable and does not change from one FHIR server instance to another.

Alternatively, the identifier and version elements may be used to reference this code system in a design, a profile, a CDA icon template or HL7 v3 icon message (in the CD data type codeSystem and codeSystemVersion properties). These different contexts may make additional restrictions on the possible values of these elements. The identifier is generally not needed when using code systems in a FHIR context, where the canonical URL is always the focus.

This resource is referenced by

Structure

Name Flags Card. Type Description & Constraints doco
. . CodeSystem I N DomainResource Declares the existence of and describes a code system or code system supplement
+ Warning: Name should be usable as an identifier for the module by machine processing applications such as code generation
+ Rule: Within a code system definition, all the codes SHALL be unique
+ Warning: If there is an explicit hierarchy, a hierarchyMeaning should be provided
+ Warning: If there is an implicit hierarchy, a hierarchyMeaning should be provided
+ Rule: If the code system content = supplement, it must nominate what it's a supplement for

Elements defined in Ancestors: id , meta , implicitRules , language , text , contained , extension , modifierExtension
Interfaces Implemented: MetadataResource
. . . url Σ C 0..1 uri Canonical identifier for this code system, represented as a URI (globally unique) (Coding.system)
+ Warning: URL should not contain | or # - these characters make processing canonical references problematic
. . . identifier Σ 0..* Identifier Additional identifier for the code system (business identifier)

. . . version Σ 0..1 string Business version of the code system (Coding.version)
. . name . versionAlgorithm[x] Σ I TU 0..1 How to compare versions
Binding: Version Algorithm ( Extensible )
.... versionAlgorithmString string
. . . . versionAlgorithmCoding Coding
... name Σ C 0..1 string Name for this code system (computer friendly)
. . . title Σ T 0..1 string Name for this code system (human friendly)
. . . status ?! Σ 1..1 code draft | active | retired | unknown
Binding: PublicationStatus ( Required )
. . . experimental Σ 0..1 boolean For testing purposes, not real usage
. . . date Σ 0..1 dateTime Date last changed
. . . publisher Σ T 0..1 string Name of the publisher publisher/steward (organization or individual)
. . . contact Σ 0..* ContactDetail Contact details for the publisher

. . . description T 0..1 markdown Natural language description of the code system
. . . useContext Σ TU 0..* UsageContext The context that the content is intended to support

. . . jurisdiction Σ XD 0..* CodeableConcept Intended jurisdiction for code system (if applicable)
Binding: Jurisdiction ValueSet ( Extensible )

. . . purpose T 0..1 markdown Why this code system is defined
. . . copyright T 0..1 markdown Use and/or publishing restrictions
. . . copyrightLabel T TU 0..1 string Copyright holder and year(s)
. . . caseSensitive approvalDate TU 0..1 date When the CodeSystem was approved by publisher
... lastReviewDate TU 0..1 date When the CodeSystem was last reviewed by the publisher
... effectivePeriod Σ TU 0..1 Period When the CodeSystem is expected to be used
... topic XD 0..* CodeableConcept E.g. Education, Treatment, Assessment, etc
Binding: Definition Topic ( Example )

... author TU 0..* ContactDetail Who authored the CodeSystem

... editor TU 0..* ContactDetail Who edited the CodeSystem

... reviewer TU 0..* ContactDetail Who reviewed the CodeSystem

... endorser TU 0..* ContactDetail Who endorsed the CodeSystem

... relatedArtifact TU 0..* RelatedArtifact Additional documentation, citations, etc

... caseSensitive Σ 0..1 boolean If code comparison is case sensitive
. . . valueSet Σ 0..1 canonical ( ValueSet ) Canonical reference to the value set with entire code system
. . . hierarchyMeaning Σ C 0..1 code grouped-by | is-a | part-of | classified-with
CodeSystemHierarchyMeaning Binding: Code System Hierarchy Meaning ( Required )
. . . compositional Σ 0..1 boolean If code system defines a compositional grammar
. . . versionNeeded Σ 0..1 boolean If definitions are not stable
. . . content Σ C 1..1 code not-present | example | fragment | complete | supplement
CodeSystemContentMode Binding: Code System Content Mode ( Required )
. . . supplements Σ C TU 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 Σ 0..* BackboneElement Filter that can be used in a value set

. . . . code Σ 1..1 code Code that identifies the filter
. . . . description Σ 0..1 string How or why the filter is used
. . . . operator Σ 1..* code = | is-a | descendent-of | is-not-a | regex | in | not-in | generalizes | child-of | descendent-leaf | exists
FilterOperator Binding: Filter Operator ( Required )

. . . . value Σ 1..1 string What to use for the value
. . . property Σ 0..* BackboneElement Additional information supplied about each concept

. . . . 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
PropertyType Binding: Property Type ( Required )
. . . concept C 0..* BackboneElement Concepts in the code system

. . . . code C 1..1 code Code that identifies concept
. . . . display 0..1 string Text to display to the user
. . . . definition 0..1 string Formal definition
. . . . designation C 0..* BackboneElement Additional representations for the concept
+ Rule: Must have a value for concept.designation.use if concept.designation.additionalUse is present

. . . . . language 0..1 code Human language of the designation
Binding: All Languages ( Required )
Additional Bindings Purpose
Common Languages ( Preferred Starter Set but limited to AllLanguages

. . . . . use C 0..1 Coding Details how this designation would be used
Binding: Designation Use ( Extensible )
. . . . . use additionalUse C TU 0..1 0..* Coding Details Additional ways how this designation would be used
Binding: Designation Use ( Extensible )

. . . . . value 1..1 string The text value for this designation
. . . . property 0..* BackboneElement Property value for the concept

. . . . . code C 1..1 code Reference to CodeSystem.property.code
. . . . . value[x] 1..1 Value of the property for this concept
. . . . . . valueCode code
. . . . . . valueCoding Coding
. . . . . . valueString string
. . . . . . valueInteger integer
. . . . . . valueBoolean boolean
. . . . . . valueDateTime dateTime
. . . . . . valueDecimal decimal
. . . . concept C 0..* see concept Child Concepts (is-a/contains/categorizes)


doco Documentation for this format icon

See the Extensions for this resource

UML Diagram ( Legend )

CodeSystem ( DomainResource ) + MetadataResource An absolute URI that is used to identify this code system when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this code system is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the code system is stored on different servers. This is used in [Coding](datatypes.html#Coding).system url : uri [0..1] A 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 instance identifier : Identifier [0..*] The identifier that is used to identify this version of the code system when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the code system author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. This is used in [Coding](datatypes.html#Coding).version version : string [0..1] Indicates the mechanism used to compare versions to determine which CodeSystem is more current versionAlgorithm[x] : DataType [0..1] « string | Coding ; null (Strength=Extensible) VersionAlgorithm + » A natural language name identifying the code system. This name should be usable as an identifier for the module by machine processing applications such as code generation name : string [0..1] « This element has or is affected by some invariants C » A short, descriptive, user-friendly title for the code system title : string [0..1] The date (and optionally time) when the status of this code system resource was created or revised system. Enables tracking the life-cycle of the content (this element modifies the meaning of other elements) status : code [1..1] « The lifecycle status of an artifact. null (Strength=Required) PublicationStatus ! » A Boolean value to indicate that this code system is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage experimental : boolean [0..1] The date (and optionally time) when the code system was published. last significantly changed. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the code system changes date : dateTime [0..1] The name of the organization or individual that published responsible for the release and ongoing maintenance of the code system publisher : string [0..1] Contact details to assist a user in finding and communicating with the publisher contact : ContactDetail [0..*] A free text natural language description of the code system from a consumer's perspective description : markdown [0..1] The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate code system instances useContext : UsageContext [0..*] A legal or geographic region in which the code system is intended to be used jurisdiction : CodeableConcept [0..*] « Countries and regions within which this artifact is targeted for use. null (Strength=Extensible) Jurisdiction ValueSet JurisdictionValueSet + » Explanation of why this code system is needed and why it has been designed as it has purpose : markdown [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 system copyright : markdown [0..1] A short string (<50 characters), suitable for inclusion in a page footer that identifies the copyright holder, effective period, and optionally whether rights are resctricted. (e.g. 'All rights reserved', 'Some rights reserved') copyrightLabel : string [0..1] The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage approvalDate : date [0..1] The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date lastReviewDate : date [0..1] The period during which the CodeSystem content was or is planned to be in active use effectivePeriod : Period [0..1] Descriptions related to the content of the CodeSystem. Topics provide a high-level categorization as well as keywords for the CodeSystem that can be useful for filtering and searching topic : CodeableConcept [0..*] « null (Strength=Example) DefinitionTopic ?? » An individiual or organization primarily involved in the creation and maintenance of the CodeSystem author : ContactDetail [0..*] An individual or organization primarily responsible for internal coherence of the CodeSystem editor : ContactDetail [0..*] An individual or organization asserted by the publisher to be primarily responsible for review of some aspect of the CodeSystem reviewer : ContactDetail [0..*] An individual or organization asserted by the publisher to be responsible for officially endorsing the CodeSystem for use in some setting endorser : ContactDetail [0..*] Related artifacts such as additional documentation, justification, dependencies, bibliographic references, and predecessor and successor artifacts relatedArtifact : RelatedArtifact [0..*] If code comparison is case sensitive when codes within this system are compared to each other caseSensitive : boolean [0..1] Canonical reference to the value set that contains all codes in the entire code system independent of code status valueSet : canonical [0..1] « ValueSet » The meaning of the hierarchy of concepts as represented in this resource hierarchyMeaning : code [0..1] « The meaning of the hierarchy of concepts in a code system. null (Strength=Required) CodeSystemHierarchyMeaning ! » « This element has or is affected by some invariants C » The code system defines a compositional (post-coordination) grammar compositional : boolean [0..1] This flag is used to signify that the code system does not commit to concept permanence across versions. If true, a version must be specified when referencing this code system versionNeeded : boolean [0..1] The extent of the content of the code system (the concepts and codes it defines) are represented in this resource instance content : code [1..1] « The extent of the content of the code system (the concepts and codes it defines) are represented in a code system resource. null (Strength=Required) CodeSystemContentMode ! » « This element has or is affected by some invariants C » The canonical URL of the code system that this code system supplement is adding designations and properties to supplements : canonical [0..1] « CodeSystem » « This element has or is affected by some invariants C » The total number of concepts defined by the code system. Where the code system has a compositional grammar, the basis of this count is defined by the system steward count : unsignedInt [0..1] Filter The code that identifies this filter when it is used as a filter in [[[ValueSet]]].compose.include.filter [ValueSet](valueset.html#).compose.include.filter code : code [1..1] A description of how or why the filter is used description : string [0..1] A list of operators that can be used with the filter operator : code [1..*] « The kind of operation to perform as a part of a property based filter. null (Strength=Required) FilterOperator ! » A description of what the value for the filter should be value : string [1..1] Property A 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 filters code : code [1..1] Reference to the formal meaning of the property. One possible source of meaning is the [Concept Properties](codesystem-concept-properties.html) code system uri : uri [0..1] A description of the property- why it is defined, and how its value might be used description : string [0..1] The type of the property value. Properties of type "code" contain a code defined by the code system (e.g. a reference to another defined concept) type : code [1..1] « The type of a property value. null (Strength=Required) PropertyType ! » ConceptDefinition A code - a text symbol - that uniquely identifies the concept within the code system code : code [1..1] « This element has or is affected by some invariants C » A human readable string that is the recommended default way to present this concept to a user display : 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 concept definition : string [0..1] Designation The language this designation is defined for language : code [0..1] « A human language. (Strength=Preferred) null (Strength=Required) CommonLanguages ? AllLanguages ! » A code that details how this designation would be used use : Coding [0..1] « Details of null (Strength=Extensible) DesignationUse + » « This element has or is affected by some invariants C » Additional codes that detail how a this designation would be used. used, if there is more than one use additionalUse : Coding [0..*] « null (Strength=Extensible) DesignationUse + » « This element has or is affected by some invariants C » The text value for this designation value : string [1..1] ConceptProperty A code that is a reference to CodeSystem.property.code code : code [1..1] « This element has or is affected by some invariants C » The value of this property value[x] : Type DataType [1..1] « code | Coding | string | integer | boolean | dateTime | decimal » A filter that can be used in a value set compose statement when selecting concepts using a filter filter [0..*] A property defines an additional slot through which additional information can be provided about a concept property [0..*] Additional representations for the concept - other languages, aliases, specialized purposes, used for particular purposes, etc designation [0..*] A property value for this concept property [0..*] Defines children of a concept to produce a hierarchy of concepts. The nature of the relationships is variable (is-a/contains/categorizes) - see hierarchyMeaning concept [0..*] Concepts that are in the code system. The concept definitions are inherently hierarchical, but the definitions must be consulted to determine what the meanings of the hierarchical relationships are concept [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 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) --></identifier>
 <version value="[string]"/><!-- 0..1 Business version of the code system (Coding.version) -->
 <

 <versionAlgorithm[x]><!-- 0..1 string|Coding How to compare versions --></versionAlgorithm[x]>
 <name value="[string]"/><!-- I 0..1 Name for this code system (computer friendly) -->

 <title value="[string]"/><!-- 0..1 Name for this code system (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/steward (organization or individual) -->

 <contact><!-- 0..* ContactDetail Contact details for the publisher --></contact>
 <description value="[markdown]"/><!-- 0..1 Natural language description of the code system -->
 <useContext><!-- 0..* UsageContext The context that the content is intended to support --></useContext>
 <jurisdiction><!-- 0..* CodeableConcept Intended jurisdiction for code system (if applicable) --></jurisdiction>
 <purpose value="[markdown]"/><!-- 0..1 Why this code system is defined -->
 <copyright value="[markdown]"/><!-- 0..1 Use and/or publishing restrictions -->
 <copyrightLabel value="[string]"/><!-- 0..1 Copyright holder and year(s) -->
 <approvalDate value="[date]"/><!-- 0..1 When the CodeSystem was approved by publisher -->
 <lastReviewDate value="[date]"/><!-- 0..1 When the CodeSystem was last reviewed by the publisher -->
 <effectivePeriod><!-- 0..1 Period When the CodeSystem is expected to be used --></effectivePeriod>
 <topic><!-- 0..* CodeableConcept E.g. Education, Treatment, Assessment, etc --></topic>
 <author><!-- 0..* ContactDetail Who authored the CodeSystem --></author>
 <editor><!-- 0..* ContactDetail Who edited the CodeSystem --></editor>
 <reviewer><!-- 0..* ContactDetail Who reviewed the CodeSystem --></reviewer>
 <endorser><!-- 0..* ContactDetail Who endorsed the CodeSystem --></endorser>
 <relatedArtifact><!-- 0..* RelatedArtifact Additional documentation, citations, etc --></relatedArtifact>

 <caseSensitive value="[boolean]"/><!-- 0..1 If code comparison is case sensitive -->
 <</valueSet>
 <

 <valueSet><!-- 0..1 canonical(ValueSet) Canonical reference to the value set with entire code system --></valueSet>
 <hierarchyMeaning value="[code]"/><!-- I 0..1 grouped-by | is-a | part-of | classified-with -->

 <compositional value="[boolean]"/><!-- 0..1 If code system defines a compositional grammar -->
 <versionNeeded value="[boolean]"/><!-- 0..1 If definitions are not stable -->
 <
 <</supplements>

 <content value="[code]"/><!-- I 1..1 not-present | example | fragment | complete | supplement -->
 <supplements><!-- I 0..1 canonical(CodeSystem) Canonical URL of Code System this adds designations and properties to --></supplements>

 <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..* = | is-a | descendent-of | is-not-a | regex | in | not-in | generalizes | child-of | descendent-leaf | exists -->

  <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 on the concepts, and when referred to in operations -->
  <uri value="[uri]"/><!-- 0..1 Formal identifier for the property -->
  <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 | decimal -->
 </property>
 <
  <

 <concept>  <!-- I 0..* Concepts in the code system -->
  <code value="[code]"/><!-- I 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 -->
   <
   <</use>

   <language value="[code]"/><!-- 0..1 Human language of the designation -->
   <use><!-- I 0..1 Coding Details how this designation would be used --></use>
   <additionalUse><!-- I 0..* Coding Additional ways how this designation would be used --></additionalUse>

   <value value="[string]"/><!-- 1..1 The text value for this designation -->
  </designation>
  <property>  <!-- 0..* Property value for the concept -->
   <

   <code value="[code]"/><!-- I 1..1 Reference to CodeSystem.property.code -->

   <value[x]><!-- 1..1 code|Coding|string|integer|boolean|dateTime|decimal Value of the property for this concept --></value[x]>
  </property>
  <</concept>

  <concept><!-- I 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>", // Canonical identifier for this code system, represented as a URI (globally unique) (Coding.system)

  "identifier" : [{ Identifier }], // Additional identifier for the code system (business identifier)
  "version" : "<string>", // Business version of the code system (Coding.version)
  "

  // versionAlgorithm[x]: How to compare versions. One of these 2:
  "versionAlgorithmString" : "<string>",
  "versionAlgorithmCoding" : { Coding },
  "name" : "<string>", // I Name for this code system (computer friendly)

  "title" : "<string>", // Name for this code system (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/steward (organization or individual)

  "contact" : [{ ContactDetail }], // Contact details for the publisher
  "description" : "<markdown>", // Natural language description of the code system
  "useContext" : [{ UsageContext }], // The context that the content is intended to support
  "jurisdiction" : [{ CodeableConcept }], // Intended jurisdiction for code system (if applicable)
  "purpose" : "<markdown>", // Why this code system is defined
  "copyright" : "<markdown>", // Use and/or publishing restrictions
  "copyrightLabel" : "<string>", // Copyright holder and year(s)
  "approvalDate" : "<date>", // When the CodeSystem was approved by publisher
  "lastReviewDate" : "<date>", // When the CodeSystem was last reviewed by the publisher
  "effectivePeriod" : { Period }, // When the CodeSystem is expected to be used
  "topic" : [{ CodeableConcept }], // E.g. Education, Treatment, Assessment, etc
  "author" : [{ ContactDetail }], // Who authored the CodeSystem
  "editor" : [{ ContactDetail }], // Who edited the CodeSystem
  "reviewer" : [{ ContactDetail }], // Who reviewed the CodeSystem
  "endorser" : [{ ContactDetail }], // Who endorsed the CodeSystem
  "relatedArtifact" : [{ RelatedArtifact }], // Additional documentation, citations, etc

  "caseSensitive" : <boolean>, // If code comparison is case sensitive
  "
  "

  "valueSet" : "<canonical(ValueSet)>", // Canonical reference to the value set with entire code system
  "hierarchyMeaning" : "<code>", // I grouped-by | is-a | part-of | classified-with

  "compositional" : <boolean>, // If code system defines a compositional grammar
  "versionNeeded" : <boolean>, // If definitions are not stable
  "
  "

  "content" : "<code>", // I R!  not-present | example | fragment | complete | supplement
  "supplements" : "<canonical(CodeSystem)>", // I Canonical URL of Code System this adds designations and properties to

  "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!  = | is-a | descendent-of | is-not-a | regex | in | not-in | generalizes | child-of | descendent-leaf | exists

    "value" : "<string>" // R!  What to use for the value
  }],
  "property" : [{ // Additional information supplied about each concept
    "code" : "<code>", // R!  Identifies the property on the concepts, and when referred to in operations
    "uri" : "<uri>", // Formal identifier for the property
    "description" : "<string>", // Why the property is defined, and/or what it conveys
    "type" : "<code>" // R!  code | Coding | string | integer | boolean | dateTime | decimal
  }],
  "
    "

  "concept" : [{ // I Concepts in the code system
    "code" : "<code>", // I 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 }, // I Details how this designation would be used
      "additionalUse" : [{ Coding }], // I Additional ways how this designation would be used

      "value" : "<string>" // R!  The text value for this designation
    }],
    "property" : [{ // Property value for the concept
      "

      "code" : "<code>", // I R!  Reference to CodeSystem.property.code

      // value[x]: Value of the property for this concept. One of these 7:
      ">"
      " }
      ">"
      ">
      ">
      ">"

      "valueCode" : "<code>",
      "valueCoding" : { Coding },
      "valueString" : "<string>",
      "valueInteger" : <integer>,
      "valueBoolean" : <boolean>,
      "valueDateTime" : "<dateTime>",

      "valueDecimal" : <decimal>
    }],
    "

    "concept" : [{ Content as for CodeSystem.concept }] // I Child Concepts (is-a/contains/categorizes)

  }]
}

Turtle Template

@prefix fhir: <http://hl7.org/fhir/> .doco


[ a fhir:CodeSystem;
  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:
  fhir:
  fhir:
  fhir:
  fhir:
  fhir:
  fhir:
  fhir:
  fhir:
  fhir:
  fhir:
  fhir:
  fhir:
  fhir:
  fhir:
  fhir:
  fhir:
  fhir:
  fhir:
  fhir:
  fhir:
  fhir:
  fhir:
  fhir:
    fhir:
    fhir:
    fhir:
    fhir:
  ], ...;
  fhir:
    fhir:
    fhir:
    fhir:
    fhir:
  ], ...;
  fhir:
    fhir:
    fhir:
    fhir:
    fhir:
      fhir:
      fhir:
      fhir:
    ], ...;
    fhir:
      fhir:
      # . One of these 7
        fhir: ]
        fhir: ]
        fhir: ]
        fhir: ]
        fhir: ]
        fhir: ]
        fhir: ]
    ], ...;
    fhir:
  ], ...;

  fhir:url [ uri ] ; # 0..1 Canonical identifier for this code system, represented as a URI (globally unique) (Coding.system)
  fhir:identifier  ( [ Identifier ] ... ) ; # 0..* Additional identifier for the code system (business identifier)
  fhir:version [ string ] ; # 0..1 Business version of the code system (Coding.version)
  # versionAlgorithm[x] : 0..1 How to compare versions. One of these 2
    fhir:versionAlgorithm [  a fhir:string ; string ]
    fhir:versionAlgorithm [  a fhir:Coding ; Coding ]
  fhir:name [ string ] ; # 0..1 I Name for this code system (computer friendly)
  fhir:title [ string ] ; # 0..1 Name for this code system (human friendly)
  fhir:status [ code ] ; # 1..1 draft | active | retired | unknown
  fhir:experimental [ boolean ] ; # 0..1 For testing purposes, not real usage
  fhir:date [ dateTime ] ; # 0..1 Date last changed
  fhir:publisher [ string ] ; # 0..1 Name of the publisher/steward (organization or individual)
  fhir:contact  ( [ ContactDetail ] ... ) ; # 0..* Contact details for the publisher
  fhir:description [ markdown ] ; # 0..1 Natural language description of the code system
  fhir:useContext  ( [ UsageContext ] ... ) ; # 0..* The context that the content is intended to support
  fhir:jurisdiction  ( [ CodeableConcept ] ... ) ; # 0..* Intended jurisdiction for code system (if applicable)
  fhir:purpose [ markdown ] ; # 0..1 Why this code system is defined
  fhir:copyright [ markdown ] ; # 0..1 Use and/or publishing restrictions
  fhir:copyrightLabel [ string ] ; # 0..1 Copyright holder and year(s)
  fhir:approvalDate [ date ] ; # 0..1 When the CodeSystem was approved by publisher
  fhir:lastReviewDate [ date ] ; # 0..1 When the CodeSystem was last reviewed by the publisher
  fhir:effectivePeriod [ Period ] ; # 0..1 When the CodeSystem is expected to be used
  fhir:topic  ( [ CodeableConcept ] ... ) ; # 0..* E.g. Education, Treatment, Assessment, etc
  fhir:author  ( [ ContactDetail ] ... ) ; # 0..* Who authored the CodeSystem
  fhir:editor  ( [ ContactDetail ] ... ) ; # 0..* Who edited the CodeSystem
  fhir:reviewer  ( [ ContactDetail ] ... ) ; # 0..* Who reviewed the CodeSystem
  fhir:endorser  ( [ ContactDetail ] ... ) ; # 0..* Who endorsed the CodeSystem
  fhir:relatedArtifact  ( [ RelatedArtifact ] ... ) ; # 0..* Additional documentation, citations, etc
  fhir:caseSensitive [ boolean ] ; # 0..1 If code comparison is case sensitive
  fhir:valueSet [ canonical(ValueSet) ] ; # 0..1 Canonical reference to the value set with entire code system
  fhir:hierarchyMeaning [ code ] ; # 0..1 I grouped-by | is-a | part-of | classified-with
  fhir:compositional [ boolean ] ; # 0..1 If code system defines a compositional grammar
  fhir:versionNeeded [ boolean ] ; # 0..1 If definitions are not stable
  fhir:content [ code ] ; # 1..1 I not-present | example | fragment | complete | supplement
  fhir:supplements [ canonical(CodeSystem) ] ; # 0..1 I Canonical URL of Code System this adds designations and properties to
  fhir:count [ unsignedInt ] ; # 0..1 Total concepts in the code system
  fhir:filter ( [ # 0..* Filter that can be used in a value set
    fhir:code [ code ] ; # 1..1 Code that identifies the filter
    fhir:description [ string ] ; # 0..1 How or why the filter is used
    fhir:operator  ( [ code ] ... ) ; # 1..* = | is-a | descendent-of | is-not-a | regex | in | not-in | generalizes | child-of | descendent-leaf | exists
    fhir:value [ string ] ; # 1..1 What to use for the value
  ] ... ) ;
  fhir:property ( [ # 0..* Additional information supplied about each concept
    fhir:code [ code ] ; # 1..1 Identifies the property on the concepts, and when referred to in operations
    fhir:uri [ uri ] ; # 0..1 Formal identifier for the property
    fhir:description [ string ] ; # 0..1 Why the property is defined, and/or what it conveys
    fhir:type [ code ] ; # 1..1 code | Coding | string | integer | boolean | dateTime | decimal
  ] ... ) ;
  fhir:concept ( [ # 0..* I Concepts in the code system
    fhir:code [ code ] ; # 1..1 I Code that identifies concept
    fhir:display [ string ] ; # 0..1 Text to display to the user
    fhir:definition [ string ] ; # 0..1 Formal definition
    fhir:designation ( [ # 0..* Additional representations for the concept
      fhir:language [ code ] ; # 0..1 Human language of the designation
      fhir:use [ Coding ] ; # 0..1 I Details how this designation would be used
      fhir:additionalUse  ( [ Coding ] ... ) ; # 0..* I Additional ways how this designation would be used
      fhir:value [ string ] ; # 1..1 The text value for this designation
    ] ... ) ;
    fhir:property ( [ # 0..* Property value for the concept
      fhir:code [ code ] ; # 1..1 I Reference to CodeSystem.property.code
      # value[x] : 1..1 Value of the property for this concept. One of these 7
        fhir:value [  a fhir:code ; code ]
        fhir:value [  a fhir:Coding ; Coding ]
        fhir:value [  a fhir:string ; string ]
        fhir:value [  a fhir:integer ; integer ]
        fhir:value [  a fhir:boolean ; boolean ]
        fhir:value [  a fhir:dateTime ; dateTime ]
        fhir:value [  a fhir:decimal ; decimal ]
    ] ... ) ;
    fhir:concept  ( [ See CodeSystem.concept ] ... ) ; # 0..* I Child Concepts (is-a/contains/categorizes)
  ] ... ) ;

]

Changes since R3 from both R4 and R4B

CodeSystem
CodeSystem.versionAlgorithm[x]
  • Added Element
CodeSystem.identifier CodeSystem.copyrightLabel
  • Max Cardinality changed from 1 to * Added Element
CodeSystem.status CodeSystem.approvalDate
  • Change value set from http://hl7.org/fhir/ValueSet/publication-status to http://hl7.org/fhir/ValueSet/publication-status|4.0.1 Added Element
CodeSystem.experimental CodeSystem.lastReviewDate
  • No longer marked as Modifier Added Element
CodeSystem.valueSet CodeSystem.effectivePeriod
  • Type changed from uri to canonical(ValueSet) Added Element
CodeSystem.hierarchyMeaning CodeSystem.topic
  • Change value set from http://hl7.org/fhir/ValueSet/codesystem-hierarchy-meaning to http://hl7.org/fhir/ValueSet/codesystem-hierarchy-meaning|4.0.1 Added Element
CodeSystem.content CodeSystem.author
  • Change value set from http://hl7.org/fhir/ValueSet/codesystem-content-mode to http://hl7.org/fhir/ValueSet/codesystem-content-mode|4.0.1 Added Element
CodeSystem.supplements CodeSystem.editor
  • Added Element
CodeSystem.filter.operator CodeSystem.reviewer
  • Change value set from http://hl7.org/fhir/ValueSet/filter-operator to http://hl7.org/fhir/ValueSet/filter-operator|4.0.1 Added Element
CodeSystem.endorser
  • Added Element
CodeSystem.relatedArtifact
  • Added Element
CodeSystem.property.type CodeSystem.filter.operator
  • Change value set from http://hl7.org/fhir/ValueSet/concept-property-type to http://hl7.org/fhir/ValueSet/concept-property-type|4.0.1 Add codes child-of , descendent-leaf
CodeSystem.concept.designation.language
CodeSystem.concept.property.value[x] CodeSystem.concept.designation.additionalUse
  • Add Type decimal Added Element

See the Full Difference for further information

This analysis is available for R4 as XML or JSON and for R4B as XML or JSON .

See R3 <--> R4 <--> R5 Conversion Maps (status = 4 tests that all execute ok. All tests pass round-trip testing and 3 r3 resources are invalid (0 errors). ) See Conversions Summary .)

Structure

Name Flags Card. Type Description & Constraints doco
. . CodeSystem I N DomainResource Declares the existence of and describes a code system or code system supplement
+ Warning: Name should be usable as an identifier for the module by machine processing applications such as code generation
+ Rule: Within a code system definition, all the codes SHALL be unique
+ Warning: If there is an explicit hierarchy, a hierarchyMeaning should be provided
+ Warning: If there is an implicit hierarchy, a hierarchyMeaning should be provided
+ Rule: If the code system content = supplement, it must nominate what it's a supplement for

Elements defined in Ancestors: id , meta , implicitRules , language , text , contained , extension , modifierExtension
Interfaces Implemented: MetadataResource
. . . url Σ C 0..1 uri Canonical identifier for this code system, represented as a URI (globally unique) (Coding.system)
+ Warning: URL should not contain | or # - these characters make processing canonical references problematic
. . . identifier Σ 0..* Identifier Additional identifier for the code system (business identifier)

. . . version Σ 0..1 string Business version of the code system (Coding.version)
. . name . versionAlgorithm[x] Σ I TU 0..1 How to compare versions
Binding: Version Algorithm ( Extensible )
.... versionAlgorithmString string
. . . . versionAlgorithmCoding Coding
... name Σ C 0..1 string Name for this code system (computer friendly)
. . . title Σ T 0..1 string Name for this code system (human friendly)
. . . status ?! Σ 1..1 code draft | active | retired | unknown
Binding: PublicationStatus ( Required )
. . . experimental Σ 0..1 boolean For testing purposes, not real usage
. . . date Σ 0..1 dateTime Date last changed
. . . publisher Σ T 0..1 string Name of the publisher publisher/steward (organization or individual)
. . . contact Σ 0..* ContactDetail Contact details for the publisher

. . . description T 0..1 markdown Natural language description of the code system
. . . useContext Σ TU 0..* UsageContext The context that the content is intended to support

. . . jurisdiction Σ XD 0..* CodeableConcept Intended jurisdiction for code system (if applicable)
Binding: Jurisdiction ValueSet ( Extensible )

. . . purpose T 0..1 markdown Why this code system is defined
. . . copyright T 0..1 markdown Use and/or publishing restrictions
. . . copyrightLabel T TU 0..1 string Copyright holder and year(s)
. . . caseSensitive approvalDate TU 0..1 date When the CodeSystem was approved by publisher
... lastReviewDate TU 0..1 date When the CodeSystem was last reviewed by the publisher
... effectivePeriod Σ TU 0..1 Period When the CodeSystem is expected to be used
... topic XD 0..* CodeableConcept E.g. Education, Treatment, Assessment, etc
Binding: Definition Topic ( Example )

... author TU 0..* ContactDetail Who authored the CodeSystem

... editor TU 0..* ContactDetail Who edited the CodeSystem

... reviewer TU 0..* ContactDetail Who reviewed the CodeSystem

... endorser TU 0..* ContactDetail Who endorsed the CodeSystem

... relatedArtifact TU 0..* RelatedArtifact Additional documentation, citations, etc

... caseSensitive Σ 0..1 boolean If code comparison is case sensitive
. . . valueSet Σ 0..1 canonical ( ValueSet ) Canonical reference to the value set with entire code system
. . . hierarchyMeaning Σ C 0..1 code grouped-by | is-a | part-of | classified-with
CodeSystemHierarchyMeaning Binding: Code System Hierarchy Meaning ( Required )
. . . compositional Σ 0..1 boolean If code system defines a compositional grammar
. . . versionNeeded Σ 0..1 boolean If definitions are not stable
. . . content Σ C 1..1 code not-present | example | fragment | complete | supplement
CodeSystemContentMode Binding: Code System Content Mode ( Required )
. . . supplements Σ C TU 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 Σ 0..* BackboneElement Filter that can be used in a value set

. . . . code Σ 1..1 code Code that identifies the filter
. . . . description Σ 0..1 string How or why the filter is used
. . . . operator Σ 1..* code = | is-a | descendent-of | is-not-a | regex | in | not-in | generalizes | child-of | descendent-leaf | exists
FilterOperator Binding: Filter Operator ( Required )

. . . . value Σ 1..1 string What to use for the value
. . . property Σ 0..* BackboneElement Additional information supplied about each concept

. . . . 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
PropertyType Binding: Property Type ( Required )
. . . concept C 0..* BackboneElement Concepts in the code system

. . . . code C 1..1 code Code that identifies concept
. . . . display 0..1 string Text to display to the user
. . . . definition 0..1 string Formal definition
. . . . designation C 0..* BackboneElement Additional representations for the concept
+ Rule: Must have a value for concept.designation.use if concept.designation.additionalUse is present

. . . . . language 0..1 code Human language of the designation
Binding: All Languages ( Required )
Additional Bindings Purpose
Common Languages ( Preferred Starter Set but limited to AllLanguages

. . . . . use C 0..1 Coding Details how this designation would be used
Binding: Designation Use ( Extensible )
. . . . . use additionalUse C TU 0..1 0..* Coding Details Additional ways how this designation would be used
Binding: Designation Use ( Extensible )

. . . . . value 1..1 string The text value for this designation
. . . . property 0..* BackboneElement Property value for the concept

. . . . . code C 1..1 code Reference to CodeSystem.property.code
. . . . . value[x] 1..1 Value of the property for this concept
. . . . . . valueCode code
. . . . . . valueCoding Coding
. . . . . . valueString string
. . . . . . valueInteger integer
. . . . . . valueBoolean boolean
. . . . . . valueDateTime dateTime
. . . . . . valueDecimal decimal
. . . . concept C 0..* see concept Child Concepts (is-a/contains/categorizes)


doco Documentation for this format icon

See the Extensions for this resource

UML Diagram ( Legend )

CodeSystem ( DomainResource ) + MetadataResource An absolute URI that is used to identify this code system when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this code system is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the code system is stored on different servers. This is used in [Coding](datatypes.html#Coding).system url : uri [0..1] A 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 instance identifier : Identifier [0..*] The identifier that is used to identify this version of the code system when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the code system author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. This is used in [Coding](datatypes.html#Coding).version version : string [0..1] Indicates the mechanism used to compare versions to determine which CodeSystem is more current versionAlgorithm[x] : DataType [0..1] « string | Coding ; null (Strength=Extensible) VersionAlgorithm + » A natural language name identifying the code system. This name should be usable as an identifier for the module by machine processing applications such as code generation name : string [0..1] « This element has or is affected by some invariants C » A short, descriptive, user-friendly title for the code system title : string [0..1] The date (and optionally time) when the status of this code system resource was created or revised system. Enables tracking the life-cycle of the content (this element modifies the meaning of other elements) status : code [1..1] « The lifecycle status of an artifact. null (Strength=Required) PublicationStatus ! » A Boolean value to indicate that this code system is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage experimental : boolean [0..1] The date (and optionally time) when the code system was published. last significantly changed. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the code system changes date : dateTime [0..1] The name of the organization or individual that published responsible for the release and ongoing maintenance of the code system publisher : string [0..1] Contact details to assist a user in finding and communicating with the publisher contact : ContactDetail [0..*] A free text natural language description of the code system from a consumer's perspective description : markdown [0..1] The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate code system instances useContext : UsageContext [0..*] A legal or geographic region in which the code system is intended to be used jurisdiction : CodeableConcept [0..*] « Countries and regions within which this artifact is targeted for use. null (Strength=Extensible) Jurisdiction ValueSet JurisdictionValueSet + » Explanation of why this code system is needed and why it has been designed as it has purpose : markdown [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 system copyright : markdown [0..1] A short string (<50 characters), suitable for inclusion in a page footer that identifies the copyright holder, effective period, and optionally whether rights are resctricted. (e.g. 'All rights reserved', 'Some rights reserved') copyrightLabel : string [0..1] The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage approvalDate : date [0..1] The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date lastReviewDate : date [0..1] The period during which the CodeSystem content was or is planned to be in active use effectivePeriod : Period [0..1] Descriptions related to the content of the CodeSystem. Topics provide a high-level categorization as well as keywords for the CodeSystem that can be useful for filtering and searching topic : CodeableConcept [0..*] « null (Strength=Example) DefinitionTopic ?? » An individiual or organization primarily involved in the creation and maintenance of the CodeSystem author : ContactDetail [0..*] An individual or organization primarily responsible for internal coherence of the CodeSystem editor : ContactDetail [0..*] An individual or organization asserted by the publisher to be primarily responsible for review of some aspect of the CodeSystem reviewer : ContactDetail [0..*] An individual or organization asserted by the publisher to be responsible for officially endorsing the CodeSystem for use in some setting endorser : ContactDetail [0..*] Related artifacts such as additional documentation, justification, dependencies, bibliographic references, and predecessor and successor artifacts relatedArtifact : RelatedArtifact [0..*] If code comparison is case sensitive when codes within this system are compared to each other caseSensitive : boolean [0..1] Canonical reference to the value set that contains all codes in the entire code system independent of code status valueSet : canonical [0..1] « ValueSet » The meaning of the hierarchy of concepts as represented in this resource hierarchyMeaning : code [0..1] « The meaning of the hierarchy of concepts in a code system. null (Strength=Required) CodeSystemHierarchyMeaning ! » « This element has or is affected by some invariants C » The code system defines a compositional (post-coordination) grammar compositional : boolean [0..1] This flag is used to signify that the code system does not commit to concept permanence across versions. If true, a version must be specified when referencing this code system versionNeeded : boolean [0..1] The extent of the content of the code system (the concepts and codes it defines) are represented in this resource instance content : code [1..1] « The extent of the content of the code system (the concepts and codes it defines) are represented in a code system resource. null (Strength=Required) CodeSystemContentMode ! » « This element has or is affected by some invariants C » The canonical URL of the code system that this code system supplement is adding designations and properties to supplements : canonical [0..1] « CodeSystem » « This element has or is affected by some invariants C » The total number of concepts defined by the code system. Where the code system has a compositional grammar, the basis of this count is defined by the system steward count : unsignedInt [0..1] Filter The code that identifies this filter when it is used as a filter in [[[ValueSet]]].compose.include.filter [ValueSet](valueset.html#).compose.include.filter code : code [1..1] A description of how or why the filter is used description : string [0..1] A list of operators that can be used with the filter operator : code [1..*] « The kind of operation to perform as a part of a property based filter. null (Strength=Required) FilterOperator ! » A description of what the value for the filter should be value : string [1..1] Property A 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 filters code : code [1..1] Reference to the formal meaning of the property. One possible source of meaning is the [Concept Properties](codesystem-concept-properties.html) code system uri : uri [0..1] A description of the property- why it is defined, and how its value might be used description : string [0..1] The type of the property value. Properties of type "code" contain a code defined by the code system (e.g. a reference to another defined concept) type : code [1..1] « The type of a property value. null (Strength=Required) PropertyType ! » ConceptDefinition A code - a text symbol - that uniquely identifies the concept within the code system code : code [1..1] « This element has or is affected by some invariants C » A human readable string that is the recommended default way to present this concept to a user display : 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 concept definition : string [0..1] Designation The language this designation is defined for language : code [0..1] « A human language. (Strength=Preferred) null (Strength=Required) CommonLanguages ? AllLanguages ! » A code that details how this designation would be used use : Coding [0..1] « Details of null (Strength=Extensible) DesignationUse + » « This element has or is affected by some invariants C » Additional codes that detail how a this designation would be used. used, if there is more than one use additionalUse : Coding [0..*] « null (Strength=Extensible) DesignationUse + » « This element has or is affected by some invariants C » The text value for this designation value : string [1..1] ConceptProperty A code that is a reference to CodeSystem.property.code code : code [1..1] « This element has or is affected by some invariants C » The value of this property value[x] : Type DataType [1..1] « code | Coding | string | integer | boolean | dateTime | decimal » A filter that can be used in a value set compose statement when selecting concepts using a filter filter [0..*] A property defines an additional slot through which additional information can be provided about a concept property [0..*] Additional representations for the concept - other languages, aliases, specialized purposes, used for particular purposes, etc designation [0..*] A property value for this concept property [0..*] Defines children of a concept to produce a hierarchy of concepts. The nature of the relationships is variable (is-a/contains/categorizes) - see hierarchyMeaning concept [0..*] Concepts that are in the code system. The concept definitions are inherently hierarchical, but the definitions must be consulted to determine what the meanings of the hierarchical relationships are concept [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 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) --></identifier>
 <version value="[string]"/><!-- 0..1 Business version of the code system (Coding.version) -->
 <

 <versionAlgorithm[x]><!-- 0..1 string|Coding How to compare versions --></versionAlgorithm[x]>
 <name value="[string]"/><!-- I 0..1 Name for this code system (computer friendly) -->

 <title value="[string]"/><!-- 0..1 Name for this code system (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/steward (organization or individual) -->

 <contact><!-- 0..* ContactDetail Contact details for the publisher --></contact>
 <description value="[markdown]"/><!-- 0..1 Natural language description of the code system -->
 <useContext><!-- 0..* UsageContext The context that the content is intended to support --></useContext>
 <jurisdiction><!-- 0..* CodeableConcept Intended jurisdiction for code system (if applicable) --></jurisdiction>
 <purpose value="[markdown]"/><!-- 0..1 Why this code system is defined -->
 <copyright value="[markdown]"/><!-- 0..1 Use and/or publishing restrictions -->
 <copyrightLabel value="[string]"/><!-- 0..1 Copyright holder and year(s) -->
 <approvalDate value="[date]"/><!-- 0..1 When the CodeSystem was approved by publisher -->
 <lastReviewDate value="[date]"/><!-- 0..1 When the CodeSystem was last reviewed by the publisher -->
 <effectivePeriod><!-- 0..1 Period When the CodeSystem is expected to be used --></effectivePeriod>
 <topic><!-- 0..* CodeableConcept E.g. Education, Treatment, Assessment, etc --></topic>
 <author><!-- 0..* ContactDetail Who authored the CodeSystem --></author>
 <editor><!-- 0..* ContactDetail Who edited the CodeSystem --></editor>
 <reviewer><!-- 0..* ContactDetail Who reviewed the CodeSystem --></reviewer>
 <endorser><!-- 0..* ContactDetail Who endorsed the CodeSystem --></endorser>
 <relatedArtifact><!-- 0..* RelatedArtifact Additional documentation, citations, etc --></relatedArtifact>

 <caseSensitive value="[boolean]"/><!-- 0..1 If code comparison is case sensitive -->
 <</valueSet>
 <

 <valueSet><!-- 0..1 canonical(ValueSet) Canonical reference to the value set with entire code system --></valueSet>
 <hierarchyMeaning value="[code]"/><!-- I 0..1 grouped-by | is-a | part-of | classified-with -->

 <compositional value="[boolean]"/><!-- 0..1 If code system defines a compositional grammar -->
 <versionNeeded value="[boolean]"/><!-- 0..1 If definitions are not stable -->
 <
 <</supplements>

 <content value="[code]"/><!-- I 1..1 not-present | example | fragment | complete | supplement -->
 <supplements><!-- I 0..1 canonical(CodeSystem) Canonical URL of Code System this adds designations and properties to --></supplements>

 <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..* = | is-a | descendent-of | is-not-a | regex | in | not-in | generalizes | child-of | descendent-leaf | exists -->

  <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 on the concepts, and when referred to in operations -->
  <uri value="[uri]"/><!-- 0..1 Formal identifier for the property -->
  <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 | decimal -->
 </property>
 <
  <

 <concept>  <!-- I 0..* Concepts in the code system -->
  <code value="[code]"/><!-- I 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 -->
   <
   <</use>

   <language value="[code]"/><!-- 0..1 Human language of the designation -->
   <use><!-- I 0..1 Coding Details how this designation would be used --></use>
   <additionalUse><!-- I 0..* Coding Additional ways how this designation would be used --></additionalUse>

   <value value="[string]"/><!-- 1..1 The text value for this designation -->
  </designation>
  <property>  <!-- 0..* Property value for the concept -->
   <

   <code value="[code]"/><!-- I 1..1 Reference to CodeSystem.property.code -->

   <value[x]><!-- 1..1 code|Coding|string|integer|boolean|dateTime|decimal Value of the property for this concept --></value[x]>
  </property>
  <</concept>

  <concept><!-- I 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>", // Canonical identifier for this code system, represented as a URI (globally unique) (Coding.system)

  "identifier" : [{ Identifier }], // Additional identifier for the code system (business identifier)
  "version" : "<string>", // Business version of the code system (Coding.version)
  "

  // versionAlgorithm[x]: How to compare versions. One of these 2:
  "versionAlgorithmString" : "<string>",
  "versionAlgorithmCoding" : { Coding },
  "name" : "<string>", // I Name for this code system (computer friendly)

  "title" : "<string>", // Name for this code system (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/steward (organization or individual)

  "contact" : [{ ContactDetail }], // Contact details for the publisher
  "description" : "<markdown>", // Natural language description of the code system
  "useContext" : [{ UsageContext }], // The context that the content is intended to support
  "jurisdiction" : [{ CodeableConcept }], // Intended jurisdiction for code system (if applicable)
  "purpose" : "<markdown>", // Why this code system is defined
  "copyright" : "<markdown>", // Use and/or publishing restrictions
  "copyrightLabel" : "<string>", // Copyright holder and year(s)
  "approvalDate" : "<date>", // When the CodeSystem was approved by publisher
  "lastReviewDate" : "<date>", // When the CodeSystem was last reviewed by the publisher
  "effectivePeriod" : { Period }, // When the CodeSystem is expected to be used
  "topic" : [{ CodeableConcept }], // E.g. Education, Treatment, Assessment, etc
  "author" : [{ ContactDetail }], // Who authored the CodeSystem
  "editor" : [{ ContactDetail }], // Who edited the CodeSystem
  "reviewer" : [{ ContactDetail }], // Who reviewed the CodeSystem
  "endorser" : [{ ContactDetail }], // Who endorsed the CodeSystem
  "relatedArtifact" : [{ RelatedArtifact }], // Additional documentation, citations, etc

  "caseSensitive" : <boolean>, // If code comparison is case sensitive
  "
  "

  "valueSet" : "<canonical(ValueSet)>", // Canonical reference to the value set with entire code system
  "hierarchyMeaning" : "<code>", // I grouped-by | is-a | part-of | classified-with

  "compositional" : <boolean>, // If code system defines a compositional grammar
  "versionNeeded" : <boolean>, // If definitions are not stable
  "
  "

  "content" : "<code>", // I R!  not-present | example | fragment | complete | supplement
  "supplements" : "<canonical(CodeSystem)>", // I Canonical URL of Code System this adds designations and properties to

  "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!  = | is-a | descendent-of | is-not-a | regex | in | not-in | generalizes | child-of | descendent-leaf | exists

    "value" : "<string>" // R!  What to use for the value
  }],
  "property" : [{ // Additional information supplied about each concept
    "code" : "<code>", // R!  Identifies the property on the concepts, and when referred to in operations
    "uri" : "<uri>", // Formal identifier for the property
    "description" : "<string>", // Why the property is defined, and/or what it conveys
    "type" : "<code>" // R!  code | Coding | string | integer | boolean | dateTime | decimal
  }],
  "
    "

  "concept" : [{ // I Concepts in the code system
    "code" : "<code>", // I 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 }, // I Details how this designation would be used
      "additionalUse" : [{ Coding }], // I Additional ways how this designation would be used

      "value" : "<string>" // R!  The text value for this designation
    }],
    "property" : [{ // Property value for the concept
      "

      "code" : "<code>", // I R!  Reference to CodeSystem.property.code

      // value[x]: Value of the property for this concept. One of these 7:
      ">"
      " }
      ">"
      ">
      ">
      ">"

      "valueCode" : "<code>",
      "valueCoding" : { Coding },
      "valueString" : "<string>",
      "valueInteger" : <integer>,
      "valueBoolean" : <boolean>,
      "valueDateTime" : "<dateTime>",

      "valueDecimal" : <decimal>
    }],
    "

    "concept" : [{ Content as for CodeSystem.concept }] // I Child Concepts (is-a/contains/categorizes)

  }]
}

Turtle Template

@prefix fhir: <http://hl7.org/fhir/> .doco


[ a fhir:CodeSystem;
  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:
  fhir:
  fhir:
  fhir:
  fhir:
  fhir:
  fhir:
  fhir:
  fhir:
  fhir:
  fhir:
  fhir:
  fhir:
  fhir:
  fhir:
  fhir:
  fhir:
  fhir:
  fhir:
  fhir:
  fhir:
  fhir:
  fhir:
  fhir:
    fhir:
    fhir:
    fhir:
    fhir:
  ], ...;
  fhir:
    fhir:
    fhir:
    fhir:
    fhir:
  ], ...;
  fhir:
    fhir:
    fhir:
    fhir:
    fhir:
      fhir:
      fhir:
      fhir:
    ], ...;
    fhir:
      fhir:
      # . One of these 7
        fhir: ]
        fhir: ]
        fhir: ]
        fhir: ]
        fhir: ]
        fhir: ]
        fhir: ]
    ], ...;
    fhir:
  ], ...;

  fhir:url [ uri ] ; # 0..1 Canonical identifier for this code system, represented as a URI (globally unique) (Coding.system)
  fhir:identifier  ( [ Identifier ] ... ) ; # 0..* Additional identifier for the code system (business identifier)
  fhir:version [ string ] ; # 0..1 Business version of the code system (Coding.version)
  # versionAlgorithm[x] : 0..1 How to compare versions. One of these 2
    fhir:versionAlgorithm [  a fhir:string ; string ]
    fhir:versionAlgorithm [  a fhir:Coding ; Coding ]
  fhir:name [ string ] ; # 0..1 I Name for this code system (computer friendly)
  fhir:title [ string ] ; # 0..1 Name for this code system (human friendly)
  fhir:status [ code ] ; # 1..1 draft | active | retired | unknown
  fhir:experimental [ boolean ] ; # 0..1 For testing purposes, not real usage
  fhir:date [ dateTime ] ; # 0..1 Date last changed
  fhir:publisher [ string ] ; # 0..1 Name of the publisher/steward (organization or individual)
  fhir:contact  ( [ ContactDetail ] ... ) ; # 0..* Contact details for the publisher
  fhir:description [ markdown ] ; # 0..1 Natural language description of the code system
  fhir:useContext  ( [ UsageContext ] ... ) ; # 0..* The context that the content is intended to support
  fhir:jurisdiction  ( [ CodeableConcept ] ... ) ; # 0..* Intended jurisdiction for code system (if applicable)
  fhir:purpose [ markdown ] ; # 0..1 Why this code system is defined
  fhir:copyright [ markdown ] ; # 0..1 Use and/or publishing restrictions
  fhir:copyrightLabel [ string ] ; # 0..1 Copyright holder and year(s)
  fhir:approvalDate [ date ] ; # 0..1 When the CodeSystem was approved by publisher
  fhir:lastReviewDate [ date ] ; # 0..1 When the CodeSystem was last reviewed by the publisher
  fhir:effectivePeriod [ Period ] ; # 0..1 When the CodeSystem is expected to be used
  fhir:topic  ( [ CodeableConcept ] ... ) ; # 0..* E.g. Education, Treatment, Assessment, etc
  fhir:author  ( [ ContactDetail ] ... ) ; # 0..* Who authored the CodeSystem
  fhir:editor  ( [ ContactDetail ] ... ) ; # 0..* Who edited the CodeSystem
  fhir:reviewer  ( [ ContactDetail ] ... ) ; # 0..* Who reviewed the CodeSystem
  fhir:endorser  ( [ ContactDetail ] ... ) ; # 0..* Who endorsed the CodeSystem
  fhir:relatedArtifact  ( [ RelatedArtifact ] ... ) ; # 0..* Additional documentation, citations, etc
  fhir:caseSensitive [ boolean ] ; # 0..1 If code comparison is case sensitive
  fhir:valueSet [ canonical(ValueSet) ] ; # 0..1 Canonical reference to the value set with entire code system
  fhir:hierarchyMeaning [ code ] ; # 0..1 I grouped-by | is-a | part-of | classified-with
  fhir:compositional [ boolean ] ; # 0..1 If code system defines a compositional grammar
  fhir:versionNeeded [ boolean ] ; # 0..1 If definitions are not stable
  fhir:content [ code ] ; # 1..1 I not-present | example | fragment | complete | supplement
  fhir:supplements [ canonical(CodeSystem) ] ; # 0..1 I Canonical URL of Code System this adds designations and properties to
  fhir:count [ unsignedInt ] ; # 0..1 Total concepts in the code system
  fhir:filter ( [ # 0..* Filter that can be used in a value set
    fhir:code [ code ] ; # 1..1 Code that identifies the filter
    fhir:description [ string ] ; # 0..1 How or why the filter is used
    fhir:operator  ( [ code ] ... ) ; # 1..* = | is-a | descendent-of | is-not-a | regex | in | not-in | generalizes | child-of | descendent-leaf | exists
    fhir:value [ string ] ; # 1..1 What to use for the value
  ] ... ) ;
  fhir:property ( [ # 0..* Additional information supplied about each concept
    fhir:code [ code ] ; # 1..1 Identifies the property on the concepts, and when referred to in operations
    fhir:uri [ uri ] ; # 0..1 Formal identifier for the property
    fhir:description [ string ] ; # 0..1 Why the property is defined, and/or what it conveys
    fhir:type [ code ] ; # 1..1 code | Coding | string | integer | boolean | dateTime | decimal
  ] ... ) ;
  fhir:concept ( [ # 0..* I Concepts in the code system
    fhir:code [ code ] ; # 1..1 I Code that identifies concept
    fhir:display [ string ] ; # 0..1 Text to display to the user
    fhir:definition [ string ] ; # 0..1 Formal definition
    fhir:designation ( [ # 0..* Additional representations for the concept
      fhir:language [ code ] ; # 0..1 Human language of the designation
      fhir:use [ Coding ] ; # 0..1 I Details how this designation would be used
      fhir:additionalUse  ( [ Coding ] ... ) ; # 0..* I Additional ways how this designation would be used
      fhir:value [ string ] ; # 1..1 The text value for this designation
    ] ... ) ;
    fhir:property ( [ # 0..* Property value for the concept
      fhir:code [ code ] ; # 1..1 I Reference to CodeSystem.property.code
      # value[x] : 1..1 Value of the property for this concept. One of these 7
        fhir:value [  a fhir:code ; code ]
        fhir:value [  a fhir:Coding ; Coding ]
        fhir:value [  a fhir:string ; string ]
        fhir:value [  a fhir:integer ; integer ]
        fhir:value [  a fhir:boolean ; boolean ]
        fhir:value [  a fhir:dateTime ; dateTime ]
        fhir:value [  a fhir:decimal ; decimal ]
    ] ... ) ;
    fhir:concept  ( [ See CodeSystem.concept ] ... ) ; # 0..* I Child Concepts (is-a/contains/categorizes)
  ] ... ) ;

]

Changes since Release 3 from both R4 and R4B

CodeSystem
CodeSystem.versionAlgorithm[x]
  • Added Element
CodeSystem.identifier CodeSystem.copyrightLabel
  • Max Cardinality changed from 1 to * Added Element
CodeSystem.status CodeSystem.approvalDate
  • Change value set from http://hl7.org/fhir/ValueSet/publication-status to http://hl7.org/fhir/ValueSet/publication-status|4.0.1 Added Element
CodeSystem.experimental CodeSystem.lastReviewDate
  • No longer marked as Modifier Added Element
CodeSystem.valueSet CodeSystem.effectivePeriod
  • Type changed from uri to canonical(ValueSet) Added Element
CodeSystem.hierarchyMeaning CodeSystem.topic
  • Change value set from http://hl7.org/fhir/ValueSet/codesystem-hierarchy-meaning to http://hl7.org/fhir/ValueSet/codesystem-hierarchy-meaning|4.0.1 Added Element
CodeSystem.content CodeSystem.author
  • Change value set from http://hl7.org/fhir/ValueSet/codesystem-content-mode to http://hl7.org/fhir/ValueSet/codesystem-content-mode|4.0.1 Added Element
CodeSystem.supplements CodeSystem.editor
  • Added Element
CodeSystem.filter.operator CodeSystem.reviewer
  • Change value set from http://hl7.org/fhir/ValueSet/filter-operator to http://hl7.org/fhir/ValueSet/filter-operator|4.0.1 Added Element
CodeSystem.endorser
  • Added Element
CodeSystem.relatedArtifact
  • Added Element
CodeSystem.property.type CodeSystem.filter.operator
  • Change value set from http://hl7.org/fhir/ValueSet/concept-property-type to http://hl7.org/fhir/ValueSet/concept-property-type|4.0.1 Add codes child-of , descendent-leaf
CodeSystem.concept.designation.language
CodeSystem.concept.property.value[x] CodeSystem.concept.designation.additionalUse
  • Add Type decimal Added Element

See the Full Difference for further information

This analysis is available for R4 as XML or JSON and for R4B as XML or JSON .

See R3 <--> R4 <--> R5 Conversion Maps (status = 4 tests that all execute ok. All tests pass round-trip testing and 3 r3 resources are invalid (0 errors). ) See Conversions Summary .)

 

See the Profiles & Extensions and the alternate Additional definitions: Master Definition XML + JSON , XML Schema / Schematron + JSON Schema , ShEx (for Turtle ) + see , the extensions spreadsheet version & the dependency analysis

CodeSystem.jurisdiction Required CodeSystem.content Required CodeSystem.filter.operator CodeSystem.property.type The type CodeSystem.concept.designation.language
Path Definition ValueSet Type Reference Documentation
CodeSystem.versionAlgorithm[x] VersionAlgorithm Extensible

Indicates the mechanism used to compare versions to determine which is more current.

CodeSystem.status PublicationStatus Required

The lifecycle status of an artifact.

CodeSystem.jurisdiction JurisdictionValueSet Required Extensible PublicationStatus

This value set defines a base set of codes for country, country subdivision and region for indicating where a resource is intended to be used.

Note: The codes for countries and country subdivisions are taken from ISO 3166 icon while the codes for "supra-national" regions are from UN Standard country or area codes for statistical use (M49) icon.

CodeSystem.topic Countries and regions within which this artifact is targeted for use. DefinitionTopic Extensible Example Jurisdiction ValueSet

High-level categorization of the definition, used for searching, sorting, and filtering.

CodeSystem.hierarchyMeaning CodeSystemHierarchyMeaning Required

The meaning of the hierarchy of concepts in a code system.

CodeSystem.content CodeSystemHierarchyMeaning CodeSystemContentMode Required

The extent of the content of the code system (the concepts and codes it defines) are represented in a code system resource.

CodeSystem.filter.operator CodeSystemContentMode FilterOperator Required

The kind of operation to perform as a part of a property based filter.

CodeSystem.property.type PropertyType Required FilterOperator

The type of a property value.

CodeSystem.concept.designation.language AllLanguages (a valid code from Tags for the Identification of a property value. Languages icon ) Required PropertyType

This value set includes all possible codes from BCP-47 (see http://tools.ietf.org/html/bcp47)

  A human language. Common Languages Preferred , but limited to AllLanguages starter CommonLanguages
CodeSystem.concept.designation.use DesignationUse Extensible

Details of how a designation would be used. used

CodeSystem.concept.designation.additionalUse DesignationUse Extensible DesignationUse

Details of how a designation would be used

id UniqueKey Level Location Description Expression
csd-0 img  cnl-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}') name.exists() implies name.matches('^[A-Z]([A-Za-z0-9_]){1,254}$')
csd-1 img  csd-1 Rule (base) Within a code system definition, all the codes SHALL be unique concept.code.combine($this.descendants().concept.code).isDistinct() concept.exists() implies concept.code.combine(%resource.concept.descendants().concept.code).isDistinct()
img  cnl-1 Warning CodeSystem.url URL should not contain | or # - these characters make processing canonical references problematic exists() implies matches('^[^|# ]+$')
img  csd-2 Warning (base) If there is an explicit hierarchy, a hierarchyMeaning should be provided concept.concept.exists() implies hierarchyMeaning.exists()
img  csd-3 Warning (base) If there is an implicit hierarchy, a hierarchyMeaning should be provided concept.where(property.code = 'parent' or property.code = 'child').exists() implies hierarchyMeaning.exists()
img  csd-4 Rule (base) If the code system content = supplement, it must nominate what it's a supplement for CodeSystem.content = 'supplement' implies CodeSystem.supplements.exists()
img  csd-5 Rule CodeSystem.concept.designation Must have a value for concept.designation.use if concept.designation.additionalUse is present additionalUse.exists() implies use.exists()

Most code systems evolve over time, due to corrections, clarifications, and changes to approach or underlying knowledge or reality. If these changes lead to the meanings of existing codes changing significantly, then the interpretation of the code system becomes version dependent. This significantly complicates implementation based on the code system, to the point where it is not clear that safety can be assured, so changing the meaning of an existing code SHOULD be avoided whenever possible. It is preferable to assign a new identifier to a code system when any concepts in it have a significant change in meaning (for example, the German diagnostic classification code system ICD10GM2009 has a different system to ICD10GM2008), but this also can have substantial impact on implementation, so is often not practical - for instance, SNOMED CT icon has a complex version release framework, which may lead to variations in meaning of concepts, but there is only one identifier for SNOMED CT.

For this reason, a code system MAY provide a version identifier which can be specified in CodeSystem.version . The version specific identifier SHOULD be provided whenever there are potentially significant changes in meaning across multiple releases of a code system. There is no particular format requirement for the version identifier, version, though HL7 recommends a date-based approach. approach, or sem-ver icon.

When the CodeSystem.versionNeeded is 'true', then the version identifier CodeSystem.version value SHALL be used in Coding instances that refer to the code system.

Where the terminology does not clearly define what string should be used to identify code system versions, the recommendation is to use as the version string the date (expressed in FHIR date format) on which the version of the code system that is being used was officially published.

The simple case for a code system is that the entire code system - all the concepts and their codes, designations and properties are distributed in a single CodeSystem resource. However, for a variety of reasons, code systems may be distributed by the code system authority in a set of fragments, and other authorities may issue additional designations and properties in supplements.

If the CodeSystem.content value is fragment , then the resource describes part of a code system.

Code Systems may be distributed in fragments for the following reasons:

  • Different IP distribution rules for different parts of the code system
  • Special purpose modules for specific purposes
  • Distribution of proposed content for evaluation

The following rules apply to code system fragments:

  • All fragments SHALL have the same CodeSystem.url
  • Fragments can only be published by the code system authority, or according to a process defined by the authority, if they have defined one
  • Fragments cannot contain any codes, concepts or properties that would not be found in a complete representation of the code system, if one exists exists. Implementers should note that a "complete representation" of the code system might not exist in a single authoritative publication (e.g., SNOMED International with all modules/extensions)
  • Publishing a code system in multiple fragments can create confusion for terminology servers and terminology service consumers. Code System authorities that publish fragments should be careful and communicate their intent clearly

If the CodeSystem.content value is supplement , then the resource describes a code system supplement. The following rules apply to code system supplements:

  • The CodeSystem.supplements element SHALL have a value, which is the URL of the code system being supplemented
  • The CodeSystem.url for a supplement SHALL never appear in a Coding.system
  • The CodeSystem.url for a supplement must be under the control of the authority creating or publishing the supplement (e.g. not in the same space as the code system being supplemented, unless the supplement is being issued by the same authority as the original code system
  • A codesystem supplement cannot define any new CodeSystem.concept.code. i.e.: all CodeSystem.concept.code in the supplement must be a code from the "supplemented" code system

If a supplement needs to define new concepts/codes to use as property values, it can be paired with a new (possibly contained) Code System and use the Coding type for the property values.

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.

Concepts have both a display and a definition . The display is a short text that represents the meaning of the concept to human users, while the definition is a more formal statement of the meaning of the concept, which is often longer. All concepts SHOULD have a display and a definition , though it is not mandatory because there are many cases where no such properties are provided, in spite of their utility and importance for clear and safe communication.

In addition to the display and definition, a concept can have one or more designation elements. The display is equivalent to a special designation with an implied designation.use meaning "primary code/designation" and a language equal to the Resource Language . The designations can provide additional displays for other language, as well as designations for other purposes. When using concepts, applications use the display and designation unless the language or usage in context provides a reason to use one of the designations.

Each code system can define one or more concept properties. Each concept defined by the code system may have one or more values for each concept property defined by the code system. Typical uses for properties include:

  • Tracking administrative status (inactive, deprecation date)
  • Providing additional statements about the meaning of the concept
  • Defining structured relationships with other concepts in the code system
  • Assigning scoring values to the concepts

Properties are identified by their master URI ( CodeSystem.property.uri ), and then, by their code ( CodeSystem.property.code ), which is used both internally within the code system resource ( CodeSystem.concept.property.code ) and also externally, in the following places:

  • ConceptMap : ConceptMap.element.target.dependsOn.property and ConceptMap.element.target.product.property
  • ValueSet : ValueSet.compose.include.filter.property can refer to any defined code system property
  • $lookup operation : In Parameters.parameter.name when returning information about a code
  • $translate operation : In Parameters.parameter.part.name for dependencies and products
  • $find-matches operation : In Parameters.parameter.name when providing codes, and in Parameters.parameter.name when asking for codes

Properties are defined using the following elements:

Name Details Description
code code Used to identify the property, in the places shown in the list immediately above this table
uri optional uri Reference to the formal meaning of the property. One possible source of meaning is the Concept Properties code system. This part of the definition is optional, but is recommended to provide an additional level of definitional consistency
description optional string A description of the property- why it is defined, and how its value might be used
type code | Coding | string | integer | boolean | dateTime The type of the property value. Properties of type "code" contain a code defined by the code system (e.g. a reference to another defined concept)

Note that properties provide a common view of concept relationships that is common across all code systems. Some code systems define properties with more sophistication, such as groups of properties, or subsumption relationships between properties (e.g. SNOMED CT). Servers providing support for these code systems will need to know full details about the underlying relationships in order to provide the correct information about concepts and their properties, but this information does not surface in the resources or operations defined by the FHIR specification.

Many Code Systems have a 'status' associated with the concept. This may categorize the concept as: Experimental - provided for trial, but may be removed in the future Active - in normal use Deprecated - planned to be removed from use Retired - still present for historical reasons, but no longer allowed to be used There is wide variation in the life cycles supported by the different code systems, the words they use to describe the various status values they use, and some code systems have additional status values. HL7 uses Active and Retired. In addition to these status codes, concepts may also be labeled as "Abstract' (not to be used in some circumstances), and have dates associated with their retirement or deprecation. All this information is represented as properties of the concepts. In order to assist with consistency between code systems, the following basic property URIs are defined: defined in the Concept Properties code system:

http://hl7.org/fhir/concept-properties#status : code A property that indicates the status of the concept. If the property is identified by this URL, then it SHALL use at least these status values (where appropriate):
  • active - the concept is for normal use
  • experimental - provided for trial, but may be removed in the future
  • deprecated - the concept is outdated and planned to be removed withdrawn from use
  • retired - still present for historical reasons, but no longer allowed to be used
The HL7 defined code systems (whether defined by the FHIR project, the V3 framework, or the V2 standard) all use this property to define their status. HL7 uses "active" (and considers this
http://hl7.org/fhir/concept-properties#inactive : boolean True if the concept is not considered active - e.g. not a valid concept any more. Property type is boolean, default status), and deprecated and retired (= inactive) value is false
http://hl7.org/fhir/concept-properties#retirementDate http://hl7.org/fhir/concept-properties#effectiveDate : date Date Concept The date at which the concept status was retired last changed
http://hl7.org/fhir/concept-properties#deprecationDate : date Date Concept was deprecated
http://hl7.org/fhir/concept-properties#retirementDate : date Date Concept was retired
http://hl7.org/fhir/concept-properties#notSelectable : boolean This concept is a grouping concept and not intended to be used in the normal use of the code system (though may be used for filters etc.). This is also known as 'Abstract'
http://hl7.org/fhir/concept-properties#parent : code An immediate parent of the concept in the hierarchy
http://hl7.org/fhir/concept-properties#child : code An immediate child of the concept in the hierarchy
http://hl7.org/fhir/concept-properties#notSelectable http://hl7.org/fhir/concept-properties#partOf : boolean code This The concept is a grouping identified in this property (by its code) contains this concept and not intended to as a component
http://hl7.org/fhir/concept-properties#synonym : code This property contains an alternative code that may be used in to identify this concept instead of the primary code
http://hl7.org/fhir/concept-properties#comment : code A string that provides additional detail pertinent to the normal use or understanding of the code system (though may be used for filters etc.). This is also known as 'Abstract' concept
http://hl7.org/fhir/concept-properties#itemWeight : decimal A numeric value that allows the comparison (less than, greater than) or other numerical manipulation of a concept (e.g. Adding up components of a score). Scores are usually a whole number, but occasionally decimals are encountered in scores

Code System representations SHOULD use these properties where possible.

The parent and child properties are used when performing concept lookup (using the $lookup operation), and when using properties to indicate parent/child relationships (see below).

Many Code Systems have a 'status' associated with the concept. This may categorize the concept as:

  • Experimental - provided for trial, but may be removed in the future
  • Active - in normal use
  • Deprecated - planned to be removed from use
  • Retired - still present for historical reasons, but no longer allowed to be used

There is wide variation in the life cycles supported by the different code systems and the words they use to describe the various status values they use, and some code systems have additional status values. HL7 uses Active, Deprecated and Retired. These ideas overlap with setting the concept to 'inactive'. In addition, concepts have dates associated with their retirement or deprecation and some code systems imply the status by providing dates.

In addition to these status codes, concepts may also be labeled 'notSelectable' (aka 'Abstract'), which means "not to be used in some circumstances", though the exact circumstances need to be clarified somewhere. This is sometimes also considered a status, though it's usually dependent on the context of use (e.g. set in a ValueSet).

Code systems may be presented hierarchically, hierarchically using either nested concept elements, where elements or properties. When exclusively using nested concept elements the hierarchy has a defined meaning specified in hierarchyMeaning . The code system hierarchy is a single tree, where and concepts have only one parent. Some code systems define When using properties, polyhierarchies are allowed (e.g. concepts that may have multiple parents. more than one parent).

If a code system has concepts like this hierarchy is represented using properties (typically, concepts that are subsumed by more than one other concept), the code system nested concepts SHOULD NOT be represented using used to represent any parts of the hierarchy structure in the Code System resource, and resource; the relationships between concepts should be defined using properties . If the hierarchy is used, implementers SHALL use a property to indicate additional parents that are not represented in the structural (nested concepts) hierarchy.

Operations based on the codeSystem resource SHALL have the same result whether or not the relationships are represented explicitly as properties or implicitly using the CodeSystem resource hierarchy.

The words 'subsume', 'subsumes', 'subsumed' and 'subsumption' are defined in relation to the type of hierarchy (i.e. the value of CodeSystem.hierarchyMeaning ) identified for the code system that is being represented by the CodeSystem resource. Concept A is considered to be subsumed by Concept B if it comes under Concept B in the hierarchy, or if a parent/child relationship is declared in the properties, and the hierarchyMeaning is "is-a").

Where a CodeSystem does not declare its hierarchy meaning directly, then the code system documentation must be consulted manually to determine how subsumption is determined. If there is no definition, none of the subsumption based features can be used with the code system.

Subsumption based logic arises explicitly or implicitly in the following places in the FHIR specification:

The following filters are defined for all code systems:

This draft section about
Property Name Operation Value Definition Notes
code regex [string] Matches any concept with the code matching the supplied string The regex flavor is determined by the server
[property] = [string] Includes all codes that have a property value equal to the specified string, where [property] is the code for any defined property . Where the type of the property is on of integer , dateTime or decimal , the FHIR search prefixes and semantics apply (see below)
[property] in [string,string...] Includes all codes that have a property value equal to one of the specified strings, where [property] is the code for any defined property The values cannot include ",", since it is being used as a delimiter
[property] regex [string] Includes all codes that have a property value matching the relationships between rich terminologies and structured content is still undergoing review. 4.8.15 Implicit Code Systems specified regex Some other parts of
[property] exists true or false When value is "true", includes all codes that have the FHIR infrastructure define set of concepts specified property. When value is "false", includes all codes that may also be treated lack the specified property
designation = [string] Matches any concept with a designation equal to the supplied string Designations considered include the concept.display, which counts as a designation
designation regex [string] Matches any concept with a designation matching the supplied string Designations considered include the concept.display, which counts as a designation

The following filters are defined for all code systems. This is most useful when mapping between systems using Concept Maps , but might also that support "is-a" relationships between concepts. (The filters can be useful for other code system related functionality (e.g. subsetting use Value Sets ). This table summarizes how to treat these items used regardless of whether the "is-a" relationships are conveyed as a terminology: concept properties or as concept nesting):

The use of these implicit
Property Name Operation Value Definition Notes
StructureDefinition concept The StructureDefinition.url (canonical URL) is is-a [string] concept code Includes all concept ids that have a transitive is-a relationship with the system . Each .snapshot.element.id in concept Id provided as the snapshot is a code in value, including the code system provided concept itself (include descendant codes and self).
Questionnaire concept The Questionnaire.url (canonical URL) is descendent-of [string] concept code Includes all concept ids that have a transitive is-a relationship with the system . Each .item.linkId in concept Id provided as the snapshot is a value, excluding the provided concept itself (i.e. include descendant codes only).
concept is-not-a [string] concept code in The specified property of the code system. Items does not have an is-a relationship with no linkId cannot be addressed the provided value.
Medication concept Medication resources are a bit different, since they don't generalizes [string] concept code Includes all concept ids that have a canonical URL, and there are not multiple items in a resource. So to refer to a medication resource, the system is [base]/Medication, where base is transitive is-a relationship from the server address. The Logical concept Id of provided as the resource is value, including the code provided concept itself (i.e. include ancestor codes and self).
concept child-of [string] concept code systems is not yet well tested, so this section remains informative. For medications, the Only concepts with a direct hierarchical relationship between to the index code system and no other concepts. This does not include the medication resource is complex. Many medication related index code systems (e.g. RxNorm, DM+D, AMT, etc.) represent more complex information than just code, display name and in the output.
concept descendent-leaf [string] concept code system. These often contain information about Includes concept ids that have a transitive is-a relationship with the content of concept Id provided as the medication A similar principle applies to observation definitions, value, but which overlap significantly do not have any concept ids with LOINC and other related code systems, which contain a set of observation definitions, that contain methods, units, etc. Other similar arrangements exist for Location transitive is-a relationships with themselves.
and many other kinds of resource.

In FHIR, these are handled by splitting the concept into two distinct parts - If the Terminology, ( Code System & ValueSet = resources) filter is used to manage with a property that is defined on the codes, display names CodeSystem, and relationships. A separate "detail" resource (e.g., Medication resource instances for RxNorm code details, ObservationDefinition instances for LOINC code details, or Location , etc.) is used to convey detailed information (dose form & strength, allowed data if the property has a type or permitted values, address & hours of operation, etc.). One "detail" resource instance is created for each code. integer , dateTime or decimal , then the FHIR search rules apply. This division accomplishes several things: means that the following prefixes may be used in the value of the filter:

  • It allows generic systems that support terminology management to perform standard terminology operations on eq : the code systems dealing with complex structures - has a value for the property on the code lookup, validation, subsumption testing, mapping and translation. it is equal to the provided value
  • It allows information to be exchanged about individual medications, data elements ne : the code has a value for the property on the code and locations. Codes can't be retrieved individually in FHIR - it is necessary not equal to retrieve the entire resource. By packaging provided value
  • gt : the detailed information in separate resources, independent retrieval code has a value for the property on the code and update it is possible. greater than the provided value
  • It supports use-cases for sharing medication, location, observation type and similar information in circumstances where lt : the code may be unknown, unavailable or occasionally non-existent (e.g., custom compounds, non-registered locations). Having has a distinct resource supports these capabilities, which would not be possible using CodeSystem / ValueSet . value for the property on the code and it is less than the provided value
  • Note that this division in FHIR does not imply that
  • ge : the code has a similar division value for the property on the code and it is required in greater or equal to the internal representation used by systems exposing provided value
  • le : the code has a FHIR interface. Similarly, some systems may choose to only expose or maintain one aspect of such information types (i.e. only value for the discrete resource instances property on the code and it is less or only equal to the provided value set). The linkage between
  • sa : the "detail" resource and code has a value for the Terminology resources property on the code and it is accomplished via starts after the provided value
  • eb : the code element (or equivalent) has a value for the property on the detail resource. As well, code and it is ends before the "name" or "title" on provided value
  • ap : the detail resource generally corresponds with code has a value for the display name property on the matching code. Most detail resources will also have an "identifier" element. This can be set to code and it is approximately the same to the provided value and namespace

The semantics of prefixes are as explained on the code, but if search page with regard to precision and range considerations, particularly on dates and decimals. Note that eq is not redundant - in it's absence, the only identifier semantics are for a resource has is its defining code, it may be better to omit direct string match, not a smart match as defined by the identifier entirely. . search semantics.

Some Examples:


{ "property": "retiredDate", "operator": "=", "value": "lt2021-01-01" }

Any code that was retired before 2021. Regarding precision:


{ "property": "retiredDate", "operator": "=", "value": "eq2022" }

would match a concept with a retiredDate of 2022-09-12. However:


{ "property": "retiredDate", "operator": "=", "value": "2022" }

would not match a concept with a retiredDate of 2022-09-12.

Search parameters for this resource. See also the full list of search parameters for this resource , and check the Extensions registry for search parameters on extensions related to 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 A code defined in the code system CodeSystem.concept.code
content-mode TU token not-present | example | fragment | complete | supplement CodeSystem.content
context TU token A use context assigned to the code system (CodeSystem.useContext.value as CodeableConcept) (CodeSystem.useContext.value.ofType(CodeableConcept)) 30 Resources
context-quantity TU quantity A quantity- or range-valued use context assigned to the code system (CodeSystem.useContext.value as Quantity) (CodeSystem.useContext.value.ofType(Quantity)) | (CodeSystem.useContext.value as Range) (CodeSystem.useContext.value.ofType(Range)) 30 Resources
context-type TU token A type of use context assigned to the code system CodeSystem.useContext.code 30 Resources
context-type-quantity TU composite A use context type and quantity- or range-based value assigned to the code system On CodeSystem.useContext:
  context-type: code
  context-quantity: value.as(Quantity) value.ofType(Quantity) | value.as(Range) value.ofType(Range)
30 Resources
context-type-value TU composite A use context type and value assigned to the code system On CodeSystem.useContext:
  context-type: code
  context: value.as(CodeableConcept) value.ofType(CodeableConcept)
30 Resources
date TU date The code system publication date CodeSystem.date 30 Resources
derived-from description TU reference A resource that the CodeSystem is derived from CodeSystem.relatedArtifact.where(type='derived-from').resource
(Any)
10 Resources
description string The description of the code system CodeSystem.description 28 Resources
effective identifier TU date The time during which the CodeSystem is intended to be in use CodeSystem.effectivePeriod 12 Resources
identifier token External identifier for the code system CodeSystem.identifier 34 Resources
jurisdiction TU token Intended jurisdiction for the code system CodeSystem.jurisdiction 26 Resources
language TU token A language in which a designation is provided CodeSystem.concept.designation.language
name TU string Computationally friendly name of the code system CodeSystem.name 26 Resources
predecessor publisher TU reference The predecessor of the CodeSystem CodeSystem.relatedArtifact.where(type='predecessor').resource
(Any)
10 Resources
publisher string Name of the publisher of the code system CodeSystem.publisher 30 Resources
status TU token The current status of the code system CodeSystem.status 35 Resources
supplements TU reference Find code system supplements for the referenced code system CodeSystem.supplements
( CodeSystem )
system TU uri The system for any codes defined by this code system (same as 'url') CodeSystem.url
title TU string The human-friendly name of the code system CodeSystem.title 27 Resources
topic url TU token Topics associated with the CodeSystem CodeSystem.topic 10 Resources
url uri The uri that identifies the code system CodeSystem.url 34 Resources
version TU token The business version of the code system CodeSystem.version 30 Resources