Release 5

This page is part of the FHIR Specification (v5.0.0: R5 - STU). This is the current published version in it's permanent home (it will always be available at this URL). For a full list of available versions, see the Directory of published versions . Page versions: R5 R4B R4

Terminology Infrastructure icon Work Group Maturity Level: 1Trial Use Compartments: N/A

Translate a code from one value set to another, based on the specified ConceptMap resource. If no ConceptMap resource is specified, then other additional knowledge available to the server may be used.

One (and only one) of the in parameters (sourceCode, sourceCoding, sourceCodeableConcept, targetCode, targetCoding, or targetCodeableConcept) SHALL be provided, to identify the code that is to be translated.

The operation returns a set of parameters including a 'result' for whether there is an acceptable match, and a list of possible matches. Note that the list of matches may include notes of codes for which mapping is specifically excluded (i.e. 'not-related-to'), so implementers have to check the target.relationship for each match. If a source* parameter is provided, the $translate operation will return all matches whereby the provided source concept is the source of a mapping relationship (in a specified ConceptMap or otherwise known to the server). If a target* parameter is provided, the $translate operation will return all matches whereby the provided target concept is the target of a mapping relationship (in a specified ConceptMap or otherwise known to the server). Note: The source value set is an optional parameter because in some cases, the client cannot know what the source value set is. However, without a source value set, the server may be unable to safely identify an applicable concept map, and would return an error. For this reason, a source value set SHOULD always be provided. Note that servers may be able to identify an appropriate concept map without a source value set if there is a full mapping for the entire code system in the concept map, or by manual intervention.

The canonical URL for this operation definition is

 http://hl7.org/fhir/OperationDefinition/ConceptMap-translate

Formal Definition (as a OperationDefinition).

URL: [base]/ConceptMap/$translate

URL: [base]/ConceptMap/[id]/$translate

This is an idempotent operation

In Parameters:
NameScopeCardinalityTypeBindingProfileDocumentation
urltype0..1uri

A canonical URL for a concept map. The server must know the concept map (e.g. it is defined explicitly in the server's concept maps, or it is defined implicitly by some code system known to the server.

conceptMaptype0..1ConceptMap

The concept map is provided directly as part of the request. Servers may choose not to accept concept maps in this fashion.

conceptMapVersiontype0..1string

The identifier that is used to identify a specific version of the concept map to be used for the translation. This is an arbitrary value managed by the concept map 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.

sourceCode0..1code

The code that is to be translated. If a code is provided, a system must be provided

system0..1uri

The system for the code that is to be translated

version0..1string

The version of the system, if one was provided in the source data

sourceScope0..1uri

Limits the scope of the $translate operation to source codes (ConceptMap.group.element.code) that are members of this value set.

sourceCoding0..1Coding

A coding to translate

sourceCodeableConcept0..1CodeableConcept

A full codeableConcept to validate. The server can translate any of the coding values (e.g. existing translations) as it chooses

targetCode0..1uri

The target code that is to be translated to. If a code is provided, a system must be provided

targetCoding0..1uri

A target coding to translate to

targetCodeableConcept0..1uri

A full codeableConcept to validate. The server can translate any of the coding values (e.g. existing translations) as it chooses

targetScope0..1uri

Limits the scope of the $translate operation to target codes (ConceptMap.group.element.target.code) that are members of this value set.

targetSystem0..1uri

identifies a target code system in which a mapping is sought. This parameter is an alternative to the targetScope parameter - only one is required. Searching for any translation to a target code system irrespective of the context (e.g. target valueset) may lead to unsafe results, and it is at the discretion of the server to decide when to support this operation

dependency0..*

Data from another attribute that may help produce the correct mapping

dependency.attribute0..1uri

The attribute for this dependency

dependency.value0..1code | Coding | string | boolean | Quantity

The data value for this dependency

Out Parameters:
NameScopeCardinalityTypeBindingProfileDocumentation
result1..1boolean

True if the concept could be translated successfully. The value can only be true if at least one returned match has a relationship other than 'not-related-to'.

message0..1string

Error details, for display to a human. If this is provided when result = true, the message carries hints and warnings (e.g. a note that the matches could be improved by providing additional detail)

match0..*

A concept in the target value set with a relationship. Note that there may be multiple matches of equal or differing relationships, and the matches may include the 'not-related-to' relationship value which means that there is no translation

match.relationship0..1code

A code indicating the relationship (e.g., equivalent) of the translation, using values from ConceptMapRelationship

match.concept0..1Coding

The translation outcome. Note that this would never have userSelected = true, since the process of translations implies that the user is not selecting the code (and only the client could know differently)

match.property0..*

A property of this mapping (may be used to supply for example, mapping priority, provenance, presentation hints, flag as experimental, and additional documentation)

match.property.uri1..1uri

The uri that identifies the property

match.property.value1..1Coding | string | integer | boolean | dateTime | decimal | code

The value of the property

match.product0..*

A data value to go in an attribute that is the product of this mapping

match.product.attribute1..1uri

The attribute for this product

match.product.value1..1code | Coding | string | boolean | Quantity

The value for this product

match.dependsOn0..*

An data value in an additional attribute that this mapping depends on

match.dependsOn.attribute1..1uri

The attribute for this product

match.dependsOn.value1..1code | Coding | string | integer | boolean | dateTime | decimal | uri | id

The value for this product

match.originMap0..1uri

The canonical reference to the concept map from which this mapping comes from

Request: Simple translate using specified ConceptMap

GET [base]/ConceptMap/$translate?url=http://hl7.org/fhir/ConceptMap/102
  &system=http://terminology.hl7.org/CodeSystem/v2-0487&code=ACNE

Request: General translate using any available map knowledge scoped by source and target ValueSets

GET [base]/ConceptMap/$translate?system=http://hl7.org/fhir/composition-status
  &code=preliminary&sourceScope=http://hl7.org/fhir/ValueSet/composition-status
  &targetScope=http://hl7.org/fhir/ValueSet/v3-ActStatus

Response: Successful translate with one match

HTTP/1.1 200 OK
[other headers]

{
    "resourceType": "Parameters",
    "parameter": [
        {
            "name": "result",
            "valueBoolean": true
        },
        {
            "name": "match",
            "part": [
                {
                    "name": "relationship",
                    "valueCode": "equivalent"
                },
                {
                    "name": "concept",
                    "valueCoding": {
                        "system": "http://snomed.info/sct",
                        "code": "309068002",
                        "display": "Skin lesion specimen"
                    }
                },
                {
                    "name": "originalMap",
                    "valueString": "http://hl7.org/fhir/ConceptMap/102"
                }
            ]
        }
    ]
}

Response: Successful translate with two matches, each indicating the source ConceptMap of the match

HTTP/1.1 200 OK
[other headers]

{
  "resourceType": "Parameters",
  "parameter": [
    {
      "name": "result",
      "valueBoolean": true
    },
    {
      "name": "match",
      "part": [
        {
          "name": "relationship",
          "valueCode": "equivalent"
        },
        {
          "name": "concept",
          "valueCoding": {
            "system": "http://hl7.org/fhir/v3/ActStatus",
            "code": "active",
            "display": "active"
          }
        },
        {
          "name": "originalMap",
          "valueString": "http://hl7.org/fhir/ConceptMap/cm-composition-status-v3"
        }
      ]
    },
    {
      "name": "match",
      "part": [
        {
          "name": "relationship",
          "valueCode": "equivalent"
        },
        {
          "name": "concept",
          "valueCoding": {
            "system": "http://hl7.org/fhir/resource-status",
            "code": "draft",
            "display": "draft"
          }
        },
        {
          "name": "source",
          "valueString": "http://hl7.org/fhir/ConceptMap/sc-composition-status"
        }
      ]
    }
  ]
}

 

For more information about operations, including how they are invoked, see Operations.