ConceptMap
Introduction
Scope and Usage
A concept map defines a mapping from a set of concepts defined in a code system (commonly referred to as the "system") to one or more concepts defined in other code systems. In the mapping context, a system can be a typical code system based on a recognized standard or local terminology (in any of its forms), or in some cases it may be an "implicit" code system that is not based on a recognized terminology but still represents a set of "concepts" that can be usefully mapped. Mappings are one way - from the source to the target system. In many cases, the reverse mappings are valid, but this cannot be assumed to be the case.
Mappings between code system concepts are only intended to be defined in the context of a particular business usage. The business use case is normally defined by the specification of the source and target value sets. The mappings may be useful in other contexts, but this must be determined based on the context of use and meaning; it cannot be taken for granted automatically. An example where the usage context is important for choosing the correct mapping is mapping from a clinical terminology (e.g. SNOMED CT) to a classification (e.g. ICD-10) for either data analysis or billing. Mappings in the data analysis context would be targeted for an appropriate classification (often at a higher level), whereas in the billing context there may be specific requirements to be met (e.g. leaf level codes only) that could result in multiple mappings for a single source concept and then require additional information beyond the source concept itself in order to select the correct final mapping.
Note that all code systems (explicit or implicit) represented in FHIR have URI identifiers for value sets (also either explicit or implicit) that include the entire code system, and these "all codes" value sets can be used for mappings that are valid in all use contexts that are appropriate for the code system.
Each mapping from a source concept to a target concept includes a relationship element describing the semantic correspondence between the two (or, in some cases, that there is no valid mapping). If none of the relationships in ConceptMapRelationship is precise enough, then a ConceptMap.group.element.target.propertydata element can be used with
- a child
codevalue corresponding to thehttp://hl7.org/fhir/conceptmap-properties#relationshipRefinementconcept (from the ConceptMap Properties code system) and - a child
valueCodeorvalueCodingvalue to indicate the precise relationship.
In this case, well-known relationships, such as those from the Simple Knowledge Organization System (SKOS), should be used where possible.
There can be an element for each concept or field in the sourceScope value set or group.source code system that needs to be mapped. Each source concept may have multiple targets:
- because there are multiple possible mappings (e.g., ambiguous)
- to specify a correct map, and specify other mappings as invalid
- when there are multiple mappings depending on the values of other elements (dependsOn)
The mapping applies to all members of the expansion of the group.element.valueSet which are also within the scope of sourceScope if specified.
The meaning associated with the use of group.element.valueSet is the same as having individual group.element.code mappings for each concept in the expansion of the group.element.valueSet.
The mapping applies to all members of the expansion of the group.element.target.valueSet which are also within the scope of targetScope if specified.
The meaning associated with the use of group.element.target.valueSet is the same as having individual group.element.target.code mappings for each concept in the expansion of the group.element.target.valueSet.
The expansion of the group.unmapped.valueSet value set provides the set of fixed codes to use when the mode = 'fixed'. All unmapped source codes are then mapped to each of these fixed codes.
There SHOULD be at least one target for each element, but some incomplete concept maps might not have a target for each concept.
A key concept for the ConceptMap resource is the $translate operation. This operation is a formal definition of an API by which a terminology server can allow clients to ask for a translation to be done based on the content in the ConceptMap resource. As such it also provides useful perspective on the operational use of ConceptMap resources in any context.
Boundaries and Relationships
While ConceptMap resources are not referred to directly from any other resource, they may be included and used in ImplementationGuide resources, and provide background knowledge that is useful in many contexts, including operations defined in this specification.
In addition to ConceptMap, there is also the StructureMap resource. The ConceptMap resource defines relationships between concepts in their own right, along with grading of their equivalencies, while the StructureMap defines an executable transform for instances that conform to a known structure.
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
Background and Context
Further discussion of the issues involved in mapping between concept definition systems can be found in the HL7 v3 Core Principles document and the functionality described in the OMG CTS 2 specification.
[%impl-note%] This resource has undergone an extensive redesign between Release 4 and Release 5. Key changes:
- A number of metadata fields have been added (same as CodeSystem and ValueSet)
sourceandtargetwere renamed tosourceScopeandtargetScopefor clarityConceptMap.group.element.target.equivalencehas been renamed toConceptMap.group.element.target.relationshipfor clarity, and the set of relationship codes has simplified, and the codeumatchedhas been moved to thenoMapelementConceptMap.group.element.target.propertyhas been added to support providing additional details about the relationship between source and target. Like with CodeSystem and ValueSet, properties are defined usingConceptMap.propertyConceptMap.group.element.target.dependsOn.propertywas renamed toConceptMap.group.element.target.dependsOn.attributeto clarify that these are not properties of the mapping, but additional attributes of the source or target content. The data type was changed fromurltocodewhich referencesConceptMap.additionalAttributeto allow for a more concise representation, along with documentationConceptMap.group.element.valueSetwas added to facilitate mapping all concepts from a source value setConceptMap.group.element.target.valueSethas been added to facilitate mapping to each concept in a target value setrelationshipandvalueSethave been added to theunmappedelement and some other clarifications have been made
[%end-note%]
Notes
Notes
- The value of the
system,versionandcodeelements are the same as used by the Coding data type - When a mapping relationship is characterized as "source-is-broader-than-target", some explanation of the scope difference SHALL be provided in the comments
- The concept map is a statement of mapping in a single direction. The existence of a matching mapping in the reverse direction cannot be assumed to exist automatically, but only through human review.
- For simplicity, it is better if is only one
elementfor each source concept. if there is more than one, then just as oneelementcan have multiple targets, multiple occurrences ofelementwith the sameelement.codesimply aggregate theirtargetelements as if there was only oneelement
Grouping Mappings
The concept mappings in element are arranged into groups that share common source/target systems. These groups have no semantic significance; they exist to make the representation more concise. Concept maps may contain more than one group with the same source and target - this would be a less concise representation but may be useful in order to maintain a fixed order for the concepts that are mapped.
Concepts that are labeled as 'unmatched' are considered to be unmatched in the target value set, irrespective of whether they are contained in a group with a stated target system or not. Groups that contain no target system may only contained 'unmatched' concepts. There is no difference in the meaning of an unmatched target whether or not there is a stated target system.
target.dependsOn and target.product
In the simple case, a mapping is made from one code to another. E.g. from "home address" in one code system to "address - home" in another. But in other cases, the mapping is not a simple one to one mapping. A typical example might be mapping between EHR diagnosis codes whose interpretation depends on the field they occur in in the source data: diagnosis, history, or family history. Furthermore, the target EHR might distinguish diagnosis codes depending on the subject: patient or family. In this case, it is not possible to map just from one code to another. Instead, the mapping might contain entries like this:
| Source Concept Details | Relationship | Target Concept Details |
|---|---|---|
| Code from http://example.com/ehr/codes | field (dependsOn) | |
| diab | Diabetes | diagnosis |
| diab | Diabetes | history |
| diab | Diabetes | family |
When attempting to translate the source to the target, an application SHOULD also provide a value for the element(s) identified in dependsOn.property so that the correct mapping can be performed.
All dependsOn and product values are included in the output of $translate.
Interpretation and use of these values is based on the definition of the associated property.
The use of valueCode implies the CodeSystem is known from the property definition.
To see real examples of mappings with dependencies, check Specimen Type Mapping and Message ADT A04 to Bundle Mapping.
Handling Unmapped Codes
If there is no explicit mapping for a code - that is, the engine processing the ConceptMap finds a group with a matching source system, but not matching element for the code it is translating, processing proceeds to the unmapped element that specifies what should happen.
The unmapped element can specify one of the following different actions to take if there is no mapping for a concept:
| provided | Use the code source as provided in the $translate request. This is especially useful for translations between versions of the same code system, where only a few codes have changed |
|---|---|
| fixed | Use the code (and display) explicitly provided in the group.unmapped. This is useful when there's a fall back general code - especially for classifications |
| other-map | Use the map identified by the canonical URL in otherMap. This is useful when a published concept map needs to be varied for a few specific cases on an institutional basis - the institution can create a simple concept that expresses their special cases, and then refer to the general purpose mappings |
Note that this element is not used when there is an element with a matching code value, and a relationship value of not-related-to.
Implicit Concept Maps
Implicit concept maps are defined in a specification which references the underlying code system structures or other release data, and includes a prescribed URI pattern to identify the concept map. For example, there are some implicit concept map URI patterns defined for SNOMED CT.
Implicit concept maps allow the URI to serve as the basis for the ConceptMap $translate operation without the need to create a ConceptMap resource instance.
Some advantages of using implicit concept maps are that they may be used:
- To enable the use of concept maps defined in a code system distribution (e.g., SNOMED CT)
- To provide a convenient way, in the definition of a ConceptMap to reference another concept map provided in a code system distribution
If there is an explicit concept map resource with the same URI as a known implicit concept map, it SHALL conform the pattern described in the definition of the implicit concept map. It is up to the discretion of the server how to handle explicit instances when it is also able to process requests for the implicit concept map.
[%impl-note%] If the relevant server(s) support implicit concept maps, implementers are discouraged from creating their own explicit concept maps with the same URI, as their existence may create confusion. [%end-note%]
Implicit concept map URIs can be used anywhere a concept map URI can be used. Support for implicit concept map URI patterns varies across terminology servers. Code system publishers may define implicit concept map URI patterns. FHIR terminology servers might or might not support any or all of these URI patterns. Caution should be exercised when using concept map URI patterns that have not been defined by HL7 or the code system publisher.
The following link describes the currently defined FHIR implicit concept map URL patterns for SNOMED CT:
StructureDefinition
Elements (Simplified)
- ConceptMap [0..*]: - A map from one set of concepts to one or more other concepts
- ConceptMap.url [0..1]: uri Canonical identifier for this concept map, represented as a URI (globally unique)
- ConceptMap.identifier [0..*]: Identifier Additional identifier for the concept map
- ConceptMap.version [0..1]: string Business version of the concept map
- ConceptMap.versionAlgorithm[x] [0..1]: string, Coding extensible:version-algorithm How to compare versions
- ConceptMap.name [0..1]: string Name for this concept map (computer friendly)
- ConceptMap.title [0..1]: string Name for this concept map (human friendly)
- ConceptMap.status [1..1]: code required:publication-status draft | active | retired | unknown
- ConceptMap.experimental [0..1]: boolean For testing only - never for real usage
- ConceptMap.date [0..1]: dateTime Date last changed
- ConceptMap.publisher [0..1]: string Name of the publisher/steward (organization or individual)
- ConceptMap.contact [0..*]: ContactDetail Contact details for the publisher
- ConceptMap.description [0..1]: markdown Natural language description of the concept map
- ConceptMap.useContext [0..*]: UsageContext The context that the content is intended to support
- ConceptMap.jurisdiction [0..*]: CodeableConcept extensible:jurisdiction Jurisdiction of the authority that maintains the concept map (if applicable)
- ConceptMap.purpose [0..1]: markdown Why this concept map is defined
- ConceptMap.copyright [0..1]: markdown Notice about intellectual property ownership, can include restrictions on use
- ConceptMap.copyrightLabel [0..1]: string Copyright holder and year(s)
- ConceptMap.approvalDate [0..1]: date When the ConceptMap was approved by publisher
- ConceptMap.lastReviewDate [0..1]: date When the ConceptMap was last reviewed by the publisher
- ConceptMap.effectivePeriod [0..1]: Period When the ConceptMap is expected to be used
- ConceptMap.topic [0..*]: CodeableConcept example:definition-topic E.g. Education, Treatment, Assessment, etc
- ConceptMap.author [0..*]: ContactDetail Who authored the ConceptMap
- ConceptMap.editor [0..*]: ContactDetail Who edited the ConceptMap
- ConceptMap.reviewer [0..*]: ContactDetail Who reviewed the ConceptMap
- ConceptMap.endorser [0..*]: ContactDetail Who endorsed the ConceptMap
- ConceptMap.relatedArtifact [0..*]: RelatedArtifact Additional documentation, citations, etc
- ConceptMap.property [0..*]: BackboneElement Additional properties of the mapping
- ConceptMap.property.code [1..1]: code Identifies the property on the mappings, and when referred to in the $translate operation
- ConceptMap.property.uri [0..1]: uri Formal identifier for the property
- ConceptMap.property.description [0..1]: string Why the property is defined, and/or what it conveys
- ConceptMap.property.type [1..1]: code required:conceptmap-property-type Coding | string | integer | boolean | dateTime | decimal | code
- ConceptMap.property.system [0..1]: canonical The CodeSystem from which code values come
- ConceptMap.additionalAttribute [0..*]: BackboneElement Definition of an additional attribute to act as a data source or target
- ConceptMap.additionalAttribute.code [1..1]: code Identifies this additional attribute through this resource
- ConceptMap.additionalAttribute.uri [0..1]: uri Formal identifier for the data element referred to in this attribute
- ConceptMap.additionalAttribute.description [0..1]: string Why the additional attribute is defined, and/or what the data element it refers to is
- ConceptMap.additionalAttribute.type [1..1]: code required:conceptmap-attribute-type code | Coding | string | boolean | Quantity
- ConceptMap.sourceScope[x] [0..1]: uri, canonical The source value set that contains the concepts that are being mapped
- ConceptMap.targetScope[x] [0..1]: uri, canonical The target value set which provides context for the mappings
- ConceptMap.group [0..*]: BackboneElement Same source and target systems
- ConceptMap.group.source [0..1]: canonical Source system where concepts to be mapped are defined
- ConceptMap.group.target [0..1]: canonical Target system that the concepts are to be mapped to
- ConceptMap.group.element [1..*]: BackboneElement Mappings for a concept from the source set
- ConceptMap.group.element.code [0..1]: code Identifies element being mapped
- ConceptMap.group.element.display [0..1]: string Display for the code
- ConceptMap.group.element.valueSet [0..1]: canonical Identifies the set of concepts being mapped
- ConceptMap.group.element.noMap [0..1]: boolean No mapping to a target concept for this source concept
- ConceptMap.group.element.comment [0..1]: string Comments related to the mapping of the source element
- ConceptMap.group.element.target [0..*]: BackboneElement Concept in target system for element
- ConceptMap.group.element.target.code [0..1]: code Code that identifies the target element
- ConceptMap.group.element.target.display [0..1]: string Display for the code
- ConceptMap.group.element.target.valueSet [0..1]: canonical Identifies the set of target concepts
- ConceptMap.group.element.target.relationship [1..1]: code required:concept-map-relationship related-to | equivalent | source-is-narrower-than-target | source-is-broader-than-target | not-related-to
- ConceptMap.group.element.target.comment [0..1]: string Comments related to the mapping to the target element
- ConceptMap.group.element.target.property [0..*]: BackboneElement Property value for the source -> target mapping
- ConceptMap.group.element.target.property.code [1..1]: code Reference to ConceptMap.property.code
- ConceptMap.group.element.target.property.value[x] [1..1]: Coding, string, integer, boolean, dateTime, decimal, code Value of the property for this concept
- ConceptMap.group.element.target.dependsOn [0..*]: BackboneElement Other properties required for this mapping
- ConceptMap.group.element.target.dependsOn.attribute [1..1]: code A reference to a mapping attribute defined in ConceptMap.additionalAttribute
- ConceptMap.group.element.target.dependsOn.value[x] [0..1]: code, Coding, string, boolean, Quantity Value of the referenced data element
- ConceptMap.group.element.target.dependsOn.valueSet [0..1]: canonical The mapping depends on a data element with a value from this value set
- ConceptMap.group.element.target.product [0..*]: - Other data elements that this mapping also produces
- ConceptMap.group.unmapped [0..1]: BackboneElement What to do when there is no mapping target for the source concept and ConceptMap.group.element.noMap is not true
- ConceptMap.group.unmapped.mode [1..1]: code required:conceptmap-unmapped-mode use-source-code | fixed | other-map
- ConceptMap.group.unmapped.code [0..1]: code Fixed code when mode = fixed
- ConceptMap.group.unmapped.display [0..1]: string Display for the code
- ConceptMap.group.unmapped.comment [0..1]: string Comments related to the choice of how to handle unmapped elements
- ConceptMap.group.unmapped.valueSet [0..1]: canonical Fixed code set when mode = fixed
- ConceptMap.group.unmapped.relationship [0..1]: code required:concept-map-relationship related-to | equivalent | source-is-narrower-than-target | source-is-broader-than-target | not-related-to
- ConceptMap.group.unmapped.otherMap [0..1]: canonical canonical reference to an additional ConceptMap to use for mapping if the source concept is unmapped
Mappings
- ConceptMap Mappings — 17 mapping entries
Implementation Guide
implementationguide-ConceptMap-core.xml
<?xml version="1.0" encoding="UTF-8"?>
<ImplementationGuide xmlns="http://hl7.org/fhir">
<id value="ConceptMap-core"/>
<version value="0.01"/>
<name value="ConceptMapCore"/>
<title value="ConceptMap Core"/>
<status value="draft"/>
<date value="1970-01-01T10:00:00+10:00"/>
<publisher value="HL7"/>
<description value="Defines common extensions used with or related to the ConceptMap resource"/>
<definition>
</definition>
</ImplementationGuide>
Operations
- translate — Concept Translation — Translate a code from one value set to another, based on the specified ConceptMap resource.
Resource Packs
list-ConceptMap-packs.xml
<?xml version="1.0" encoding="UTF-8"?>
<List xmlns="http://hl7.org/fhir">
<id value="ConceptMap-packs"/>
<status value="current"/>
<mode value="working"/>
<entry>
<item>
<reference value="ImplementationGuide/ConceptMap-core"/>
</item>
</entry>
</List>
Search Parameters
- context — token — A use context assigned to the concept map —
(ConceptMap.useContext.value.ofType(CodeableConcept)) - context-quantity — quantity — A quantity- or range-valued use context assigned to the concept map —
(ConceptMap.useContext.value.ofType(Quantity)) | (ConceptMap.useContext.value.ofType(Range)) - context-type — token — A type of use context assigned to the concept map —
ConceptMap.useContext.code - context-type-quantity — composite — A use context type and quantity- or range-based value assigned to the concept map —
ConceptMap.useContext - context-type-value — composite — A use context type and value assigned to the concept map —
ConceptMap.useContext - date — date — The concept map publication date —
ConceptMap.date - mapping-property — uri — Other properties required for this mapping —
ConceptMap.property.uri - description — string — The description of the concept map —
ConceptMap.description - identifier — token — External identifier for the concept map —
ConceptMap.identifier - jurisdiction — token — Jurisdiction of the authority that maintains the the concept map —
ConceptMap.jurisdiction - name — string — Computationally friendly name of the concept map —
ConceptMap.name - other-map — reference — canonical reference to an additional ConceptMap to use for mapping if the source concept is unmapped —
ConceptMap.group.unmapped.otherMap - publisher — string — Name of the publisher of the concept map —
ConceptMap.publisher - source-scope — reference — The source value set that contains the concepts that are being mapped —
(ConceptMap.sourceScope as canonical) - source-scope-uri — uri — The URI for the source value set that contains the concepts being mapped —
(ConceptMap.sourceScope as uri) - source-code — token — Identifies elements being mapped —
ConceptMap.group.element.code - source-group-system — reference — Source system where concepts to be mapped are defined —
ConceptMap.group.source - status — token — The current status of the concept map —
ConceptMap.status - target-scope — reference — The target value set which provides context for the mappings —
(ConceptMap.targetScope as canonical) - target-scope-uri — uri — The URI for the target value set that contains the concepts being mapped. —
(ConceptMap.targetScope as uri) - target-code — token — Code that identifies the target element —
ConceptMap.group.element.target.code - target-group-system — reference — Target system that the concepts are to be mapped to —
ConceptMap.group.target - title — string — The human-friendly name of the concept map —
ConceptMap.title - url — uri — The URI that identifies the concept map —
ConceptMap.url - version — token — The business version of the concept map —
ConceptMap.version - effective — date — The time during which the ConceptMap is intended to be in use —
ConceptMap.effectivePeriod - derived-from — reference — A resource that the ConceptMap is derived from —
ConceptMap.relatedArtifact.where(type='derived-from').resource - predecessor — reference — The predecessor of the ConceptMap —
ConceptMap.relatedArtifact.where(type='predecessor').resource - topic — token — Topics associated with the ConceptMap —
ConceptMap.topic - experimental — token — Whether the ConceptMap is experimental —
ConceptMap.experimental
Examples
- 101 — conceptmap-example — General ConceptMap Example
- 102 — conceptmap-example-specimen-type — Specimen Type v2 -> SNOMED CT Mapping
- 103 — conceptmap-103 — SNOMED CT / ICD-10 mapping example
- conceptmap-example — conceptmap-example
- conceptmap-example-2 — conceptmap-example-2
- conceptmap-example-metadata — conceptmap-example-metadata
- conceptmap-example-metadata-2 — conceptmap-example-metadata-2
- conceptmap-example-priority — conceptmap-example-priority
- conceptmap-example-specimen-type — conceptmap-example-specimen-type
- conceptmap-examples-header — conceptmap-examples-header
- example-metadata — conceptmap-example-metadata — Example Concept Map Metadata
- example-metadata-2 — conceptmap-example-metadata-2 — Example Concept Map Metadata v2
- example-priority — conceptmap-example-priority — Example Concept Map with priorities
- example2 — conceptmap-example-2 — Additional ConceptMap Example
- message-adt-a04-to-bundle — conceptmap-message-adt-a04-to-bundle — Example Concept Map Message ADT A04 to Bundle
Mapping Exceptions
conceptmap-fivews-mapping-exceptions.xml
Unmapped Elements
- FiveWs.what — Unknown
- FiveWs.author — Unknown
- FiveWs.actor — Unknown
- FiveWs.cause — Unknown
- FiveWs.where — Unknown
- FiveWs.context — Unknown
- FiveWs.init — Unknown
- FiveWs.source — Unknown
- FiveWs.who — Unknown
- FiveWs.grade — Unknown
- FiveWs.planned — Unknown
- FiveWs.done — Unknown
- FiveWs.subject — Unknown