FHIR🔥 API Extensions

ConceptMap R5 features (since V6.7)

In the R5 version of ConceptMap, ConceptMap.group.element.target.dependsOn and ConceptMap.group.element.target.product have been enhanced to support typed values. Specifically, any of the following types may be used for the value[x]:

  • code
  • Coding
  • string
  • integer
  • decimal
  • boolean
  • dateTime
  • uri
  • id

Because FHIR provides a standard set of URLs for referencing an Extension corresponding to elements in a future/past version (see here), this enables Ontoserver to pre-adopt this capability for its R4 implementation.

The following is an example of its use for a dateTime value:

{
  "resourceType": "ConceptMap",
  ...
  "group": [
    {
      "source": "https://dmd.nhs.uk",
      "sourceVersion": "202107.1.0",
      "target": "https://www.gs1.org/gtin",
      "element": [
        {
          "code": "23907311000001104",
          "target": [
            {
              "code": "5060182170231",
              "equivalence": "relatedto",
              "product": [
                {
                  "property": "start",
                  "value": "2015-03-13",
                  "extension": [
                    {
                      "url": "http://hl7.org/fhir/5.0/StructureDefinition/extension-ConceptMap.group.element.target.dependsOn.value",
                      "valueDateTime": "2015-03-13"
                    }
                  ]
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}

Note, the property value is provided twice: once in the product.value field, and again in the extension. This is because the product.value field is mandatory in R4.

Ontoserver requires that the product.value string is the same as that of value[x] in the extension for consistency with a pure R4 interpretation of the ConceptMap. In the case of a Coding typed value, the token syntax should be used. Hence "http://snomed.info/sct|12345678" would be the corresponding string representation of the valueCoding:

{
  "system": "http://snomed.info/sct",
  "code": "12345678",
  "display": "preferred term"
}

The following extract shows how the product would appear in the result of a FHIR R4 $translate request:

{
    "resourceType": "Parameters",
    "parameter": [{
        "name": "result",
        "valueBoolean": true
    }, {
        "name": "match",
        "part": [{
            "name": "equivalence",
            "valueCode": "relatedto"
        }, {
            "name": "concept",
            "valueCoding": {
                "system": "https://www.gs1.org/gtin",
                "code": "5060182170231"
            }
        }, {
            "name": "source",
            "valueString": "https://dmd.nhs.uk/conceptmap/gtin"
        }, {
            "name": "product",
            "part": [{
                "name": "element",
                "valueUri": "mapping_status"
            }, {
                "name": "concept",
                "valueCoding": {
                    "code": "active"
                }
            }]
        }, {
            "name": "product",
            "part": [{
                "name": "element",
                "valueUri": "start"
            }, {
                "name": "concept",
                "valueCoding": {
                    "code": "2015-03-13"
                }
            }, {
                "name": "property",
                "valueUri": "start"
            }, {
                "name": "value",
                "valueDateTime": "2015-03-13"
            }]
        }]
    }]
}

The property value is included twice, once using the product.element/product.concept structures from FHIR R4 $translate, and once using the product.property/product.value structures from FHIR R5. This does not necessitate the use of an Extension, as the Parameters resource is flexible enough to accommodate both structures in parallel.