C-CDA on FHIR, published by HL7 International / Cross-Group Projects. This guide is not an authorized publication; it is the continuous build for version 2.0.0-ballot built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/HL7/ccda-on-fhir/ and changes regularly. See the Directory of published versions
This page provides a mapping from CDA to FHIR. For guidance on how to read the table below, see Reading the C-CDA ↔ FHIR Mapping Pages.
Results in C-CDA are collected into <organizer>
elements containing one or more result <observation>
element. This corresponds to one FHIR DiagnosticReport for the <organizer>
which multiple .result
references to FHIR Observation resources, one for each CDA <observation>
.
Observation values are generic - they can be of any CDA type in CDA, and almost any DataType in FHIR. In CDA, the type is represented by the xsi:type
attribute on the <value>
element. In FHIR, the type is represented by the .value[x]
element; the [x]
represents a choice among data types, so .valueQuantity
represents a quantity data type, .valueInteger
represents a numeric whole number, etc. Not every CDA type is a 1:1 match for a FHIR type, but significant differences have been included in the tables below.
C-CDA¹ Result Organizer |
FHIR Diagnostic Report (Lab) (Reports) |
Transform Steps |
---|---|---|
/id | .identifier | CDA id ↔ FHIR identifier |
/code | .code & .category |
Map to code using CDA coding ↔ FHIR CodeableConcept. Category (and target FHIR Profile) may be identified by looking up a LOINC code's CLASSTYPE (see process in next table). Alternatively, an extension for <sdtc:category> is being developed for CDA Organizer which, if present, will map directly to this field. |
/statusCode | .status | CDA Result Status → FHIR Report Status |
/effectiveTime | .effectiveDateTime or .effectivePeriod |
If low and high are identical, use effectiveDateTime. If organizer/effectiveTime is missing, use the earliest and latest observation/effectiveTime as the source of the mapping. CDA ↔ FHIR Time/Dates |
/specimen | .specimen | See below |
/author | Provenance | CDA ↔ FHIR Provenance |
Result Observation /component/observation |
.result | See following table |
Specimen Collection Procedure /component/procedure[code/@code=17636008] |
.specimen | See below |
C-CDA¹ Result Observation |
FHIR Lab Result Observation |
Transform Steps |
---|---|---|
/id | .identifier | CDA id ↔ FHIR identifier |
.category | If the code is LOINC, the category can be inferred from the LOINC code CLASSTYPE. Query a FHIR server via {endpoint}CodeSystem/$lookup?system=http://loinc.org&code={code}&&property=CLASSTYPE and set the category according to the CLASSTYPE property:1=Laboratory class (laboratory); 2=Clinical class (clinical-test); 3=Claims attachments (not mapped); 4=Surveys (survey) |
|
/code | .code | CDA coding ↔ FHIR CodeableConcept |
/statusCode | .status | CDA Result Status → FHIR Observation Status |
/effectiveTime | .effectiveDateTime or .effectivePeriod |
Prefer effectiveDateTime CDA ↔ FHIR Time/Dates |
/value[xsi:type=PQ] | .valueQuantity | CDA ↔ FHIR Quantity |
/value[xsi:type=IVL_PQ] | .valueQuantity or .valueRange |
Ranges of Physical Quantities |
/value[xsi:type=CD] (or CE, CV, CO, CS) |
.valueCodeableConcept | CDA coding ↔ FHIR CodeableConcept |
/value[xsi:type=INT] | .valueInteger | |
/value[xsi:type=REAL] | .valueQuantity | Leave unit fields empty |
/value[xsi:type=ST] | .valueString | |
/interpretationCode | .interpretation | CDA coding ↔ FHIR CodeableConcept |
/methodCode | .method | CDA coding ↔ FHIR CodeableConcept |
/targetSiteCode | .bodySite | CDA coding ↔ FHIR CodeableConcept |
/specimen | .specimen | See below |
/author | Provenance | CDA ↔ FHIR Provenance |
/referenceRange/observationRange/interpretationCode | Not Supported | FHIR expects reference ranges to be "normal" ranges. If C-CDA includes multiple reference ranges, only map the one with interpretationCode = "N" . |
/referenceRange/observationRange/value[xsi:type=IVL_PQ] | .referenceRange.low & .referenceRange.high |
|
/referenceRange/observationRange/value[xsi:type=ST] or /referenceRange/observationRange/text |
.referenceRange.text |
The CDA Specimen class may be present on either a Result Organizer or a Result Observation. If present on the organizer, the FHIR Specimen resource can be attached to the DiagnosticReport as well as each of the child Observation resources. If present only on a C-CDA Results Observation, it should only be attached at the FHIR Observation level.
C-CDA also defines a Specimen Collection Procedure which can be present in the Result Organizer. The information in this procedure can be combined with information from the Specimen class and attached to the FHIR DiagnosticReport and Observation resources.
CDA Specimen |
FHIR Specimen |
Transform Steps |
---|---|---|
/specimenRole/id | .identifier or .accessionIdentifier |
CDA id ↔ FHIR identifier |
/specimenRole/specimenPlayingEntity/code | .type | CDA coding ↔ FHIR CodeableConcept |
/specimenRole/specimenPlayingEntity/name | .type.text | If there is no <code> . If code already exists, name may also go in .note |
/specimenRole/specimenPlayingEntity/quantity | .collection.quantity | CDA ↔ FHIR Quantity |
/specimenRole/specimenPlayingEntity/desc | .note | |
C-CDA Specimen Collection Procedure /targetSiteCode |
.collection.bodySite | CDA coding ↔ FHIR CodeableConcept |
C-CDA Specimen Condtion Observation /value |
.condition | CDA coding ↔ FHIR CodeableConcept |
CDA Result Example | FHIR DiagnosticReport and Observation Resources |
---|---|
<organizer classCode="BATTERY" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.1" extension="2015-08-01"/>
<templateId root="2.16.840.1.113883.10.20.22.4.1"/>
<id root="1.3.6.1.4.1.22812.20.1.1.4.5" extension="R123"/>
<code
code="24357-6"
codeSystem="2.16.840.1.113883.6.1">
<originalText>
<!-- Resolves to: Urinanalysis macro (dipstick) panel -->
<reference value="#_panel1Name"/>
</originalText>
</code>
<statusCode code="completed"/>
<effectiveTime xsi:type="IVL_TS">
<low value="20150622"/>
<high value="20150622"/>
</effectiveTime>
<!-- Becomes a FHIR reference: Practitioner/62f17e2ae0231200076884d0 -->
<performer typeCode="PRF">
<assignedEntity>
<id root="2.16.840.1.113883.19.5"/>
<representedOrganization>
<name>Value Labs</name>
</representedOrganization>
</assignedEntity>
</performer>
<!-- components removed to simplify example -->
<component>
<observation classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.2"
extension="2015-08-01"/>
<templateId root="2.16.840.1.113883.10.20.22.4.2"/>
<id root="1.3.6.1.4.1.22812.20.1.1.4.5" extension="OBS13"/>
<code
code="5811-5"
codeSystem="2.16.840.1.113883.6.1"
displayName="Specific gravity of Urine by Test strip">
<originalText>
<!-- reference the text of the coded component -->
<reference value="#_ea838e08-d5eb-4ed4-a176-e5f9a831a780"/>
</originalText>
</code>
<text>
<!-- reference the entire text of the component -->
<reference value="#_13a52df8-79ed-4689-a9da-14c5905de830"/>
</text>
<statusCode code="completed"/>
<effectiveTime value="20150622"/>
<value xsi:type="PQ" value="1.015" unit="1"/>
<referenceRange>
<observationRange>
<text>
<!-- reference the text of the reference range -->
<reference value="#_08b7d0ee-aff1-4144-a3a5-c89d56d855ad"/>
</text>
<value xsi:type="IVL_PQ">
<low value="1.005" unit="1"/>
<!-- Note this will create a precision extension with
url: http://hl7.org/fhir/StructureDefinition/quantity-precision -->
<high value="1.030" unit="1"/>
</value>
</observationRange>
</referenceRange>
</observation>
</component>
<!-- components removed to simplify example -->
</organizer>
|
Note: The following shows a DiagnosticReport resource with an Observation resource embedded in its contained property. This was done for ease of creating a single, visual, highlighted example, but implementers may choose to create separate, external resources according to their own policy.
{
"resourceType": "DiagnosticReport",
"id": "62f17e2aa2392d0008fbb236",
"identifier": [{
"value": "R123",
"system": "urn:oid:1.3.6.1.4.1.22812.20.1.1.4.5"
}],
"status": "final",
"category": [{
"coding": [{
"system": "http://terminology.hl7.org/CodeSystem/v2-0074",
"code": "LAB",
"display": "Laboratory"
}]
}],
"code": {
"coding": [{
"system": "http://loinc.org",
"code": "24357-6"
}],
"text": "Urinanalysis macro (dipstick) panel"
},
"subject": {
"reference": "Patient/62f17e29b7532c0009e217b7"
},
"effectiveDateTime": "2015-06-22",
"issued": {
"extension": [{
"url": "http://hl7.org/fhir/extension-data-absent-reason",
"valueCode": "unknown"
}]
},
"performer": [{
"reference": "Practitioner/62f17e2ae0231200076884d0"
}],
"result": [{
"reference": "#exampleObs"
}],
"contained": [{
"resourceType": "Observation",
"id": "exampleObs",
"identifier": [{
"system": "urn:oid:1.3.6.1.4.1.22812.20.1.1.4.5",
"value": "OBS13"
}],
"status": "final",
"category": [{
"coding": [{
"system": "http://terminology.hl7.org/CodeSystem/observation-category",
"code": "laboratory",
"display": "Laboratory"
}]
}],
"code": {
"coding": [{
"system": "http://loinc.org",
"code": "5811-5",
"display": "Specific gravity of Urine by Test strip"
}],
"text": "Specific gravity of Urine by Test strip"
},
"subject": {
"reference": "Patient/62f17e29b7532c0009e217b7"
},
"effectiveDateTime": "2015-06-22",
"valueQuantity": {
"value": 1.015,
"unit": "1"
},
"referenceRange": [{
"low": {
"value": 1.005,
"unit": "1"
},
"high": {
"value": 1.03,
"unit": "1",
"_value": {
"extension": [{
"url": "http://hl7.org/fhir/StructureDefinition/quantity-precision",
"valueInteger": 3
}]
}
}
}]
}]
}
|