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 the FHIR to CDA mapping, please refer to Medications FHIR → CDA. For guidance on how to read the table below, see Reading the C-CDA ↔ FHIR Mapping Pages
Medications to MedicationRequestMedications shown below represent the moodCode="INT" in CDA. For mapping histories of medication use from CDA, no consensus was established. We welcome feedback on this topic. For more information, please see chat.fhir.org and related stream
Medication Status
C-CDA may list a medication state (statusCode
) as “completed” (i.e. the prescription writing has been completed) but containing dates in the future. This may more align with a FHIR status of “active” than “completed” which indicates all actions implied by the prescription have been completed. C-CDA also provides ambiguous guidance with respect to mood: completed and planned cases are well-defined, but active or ongoing cases are not addressed. We provide maps for both status and mood elements, but care is necessary to ensure C-CDA authors' intentions are understood.
Medication Timing and Frequency
C-CDA represents both timing (start date / end date) and frequency (when and how often to take) using <effectiveTime>
elements. The first (represented in XPath as /effectiveTime[1]
) represents the timing. If it contains <low>
and/or <high>
timestamps, this represents the .timing.repeat.boundsPeriod
information of MedicationRequest.dosageInstruction
. If, instead, the first effectiveTime only contains a single @value
attribute, it represents a .timing.event
dateTime value.
The second <effectiveTime>
represents the frequency and contains the attribute @operator="A"
to indicate it is an intersection with the first effectiveTime. It must also have an @xsi:type
attribute which identifies the type of frequency as PIVL_TS
(Periodic Interval) or EIVL_TS
(Episodic Interval). PIVL_TS
is the most common and represents a frequency corresponding to .timing.repeat.frequency
/ .timing.repeat.period
/ .timing.repeat.periodUnit
. These relationship of three fields is described in FHIR: "Event occurs frequency times per period". For example: "Every 8 hours" would become 1 / 8 / h (one time every eight hours), while "TID" would become 3 / 1 / d (three times every one day).
EIVL_TS
represents an event-based frequency, such as "1 hour after meal". The CDA <event code="xx">
corresponds to FHIR's .timing.when
and the optional <offset>
corresponds to .timing.offset
.
The C-CDA Example Search site maintains a document of Common Medication Frequencies which can be cross-referenced with a similar table in FHIR's Timing Data Type to properly map CDA frequencies to FHIR timing values.
C-CDA¹ Medication Activity substanceAdministration |
FHIR MedicationRequest |
Transform Steps |
---|---|---|
/@negationInd="true" | set .doNotPerform=true | |
@moodCode | .intent | CDA coding ↔ FHIR CodeableConcept Mood to intent See note above on Medication Status |
/id | .identifier | CDA id ↔ FHIR identifier |
/statusCode | .status | See note above on Medication Status Pay attention to the definitions of active and completed in the FHIR medicationrequest-status code system. CDA statusCode → FHIR status |
/effectiveTime[1]/@value | .dosageInstruction.timing.event | Constraint: Use this when effectiveTime@value is populated CDA ↔ FHIR Time/Dates |
/effectiveTime[1]/low | .dosageInstruction.timing.repeat.boundsPeriod.start | Constraint: Use this when effectiveTime/@value is not populated CDA ↔ FHIR Time/Dates |
/effectiveTime[1]/high | .dosageInstruction.timing.repeat.boundsPeriod.end | Constraint: Use this when effectiveTime/@value is not populated CDA ↔ FHIR Time/Dates |
Periodic Frequency /effectiveTime[operator="A" and xsi:type="PIVL_TS"] …/@institutionSpecified …/period/@value …/period/@unit |
.dosageInstruction.timing.repeat.frequency .dosageInstruction.timing.repeat.period .dosageInstruction.timing.repeat.periodUnit |
Compare: C-CDA Common Medication Frequencies and FHIR Timing Data Type to determine whether frequency or period should be used.If CDA period contains low and high (e.g. a range like 4-6 hours or 3-4 times a day), map low the same as @value (e.g. to repeat.period or repeat.frequency ) and map high to repeat.periodMax or repeat.frequencyMax depending on whether it is a frequency or period. |
Event-Based Timing /effectiveTime[operator="A" and xsi:type="EIVL_TS"] …/event/@code …/offset |
.dosageInstruction.timing.repeat.when .dosageInstruction.timing.repeat.offset |
@code vocabulary matches .when CDA offset must be converted to minutes for FHIR |
/routeCode | .dosageInstruction.route | CDA coding ↔ FHIR CodeableConcept |
/approachSiteCode | .dosageInstruction.site | CDA coding ↔ FHIR CodeableConcept |
/doseQuantity | .dosageInstruction.doseAndRate.doseQuantity | CDA ↔ FHIR Quantity |
/rateQuantity | .dosageInstruction.doseAndRate.rateQuantity | CDA ↔ FHIR Quantity |
/maxDoseQuantity/numerator | .dosageInstruction.maxDosePerPeriod.numerator | CDA ↔ FHIR Quantity |
/maxDoseQuantity/denominator | .dosageInstruction.maxDosePerPeriod.denominator | CDA ↔ FHIR Quantity |
/administrationUnitCode | Medication.form | See below |
/consumable/manufacturedProduct/manufacturedMaterial/code | .medicationCodeableConcept OR .medicationReference |
CDA coding ↔ FHIR CodeableConcept Only one of these fields may be populated. When generating a Medication resource (see below), use the medicationReference field. |
/consumable/manufacturedProduct/manufacturerOrganization | Medication.manufacturer | See below |
/author | .requester & Provenance |
CDA ↔ FHIR Provenance |
/author/time | .authoredOn | Earliest, if more than one. CDA ↔ FHIR Time/Dates |
Drug Vehicle /participant[@typeCode="CSM"]/playingEntity/code |
Medication.ingredient | See below |
Indication /entryRelationship[@typeCode="RSON"]/observation/value |
.reasonCode | CDA coding ↔ FHIR CodeableConcept |
Free text sig /entryRelationship/substanceAdministration[code/@code="76662-6"]/text |
.dosageInstruction.text | |
Instruction Activity /entryRelationship[@typeCode="SUBJ" and @inversionInd="true"]/act |
.dosageInstruction.patientInstruction .dosageInstruction.additionalInstruction |
act/text or act/code/originalText can map to patientInstructions. If coded, can map to additionalInstruction. |
Supply Order /entryRelationship[@typeCode="REFR"]/substanceAdministration[@moodCode="INT"] |
Note: moodCode=INT means supply, moodCode=EVN means dispense, which is not documented here. | |
../effectiveTime/high | .dispenseRequest.validityPeriod.end | CDA ↔ FHIR Time/Dateslow would similarly map to start , but only high is called out in C-CDA. |
../repeatNumber | .dispenseRequest.numberOfRepeatsAllowed | Caution: in CDA, repeatNumber indicates total number of dispenses allowed. In FHIR, this field is exclusive of the original dispense. So the numberOfRepeatsAllowed will be one less than repeatNumber . |
../quantity | .dispenseRequest.quantity | CDA ↔ FHIR Quantity |
Comment Activity /entryRelationship/act[code/@code="48767-8"]/text |
Annotation .note |
See Comment → Annotation |
/precondition | .asNeededBoolean = true | The presence of a precondition element indicates asNeededBoolean should be true. More complex maps may be possible with .asNeededCodeableConcept. |
1. XPath abbrievated for C-CDA Medication Activity as:
ClinicalDocument/component/structuredBody/component/section[code/@code="10160-0"]/entry/substanceAdministration
MedicationRequest (and other resources) may represent the medication as a simple CodeableConcept. But when additional information about the medication needs to be conveyed, a Medication resource should be created instead and referenced by the MedicationRequest resource. Implementers may also opt to always create Medication resources.
C-CDA¹ Medication Activity substanceAdministration |
FHIR Medication |
Transform Steps |
---|---|---|
/administrationUnitCode | .form | CDA coding ↔ FHIR CodeableConcept |
/consumable/manufacturedProduct/manufacturedMaterial/code | .code | CDA coding ↔ FHIR CodeableConcept |
/consumable/manufacturedProduct/manufacturerOrganization | Organization .manufacturer |
|
Drug Vehicle /participant[@typeCode="CSM"]/playingEntity/code |
.ingredient.itemCodeableConcept | Set .isActive = false CDA coding ↔ FHIR CodeableConcept |
CDA Medication Example | FHIR MedicationRequest and Medication Resources |
---|---|
<substanceAdministration classCode="SBADM" moodCode="INT">
<templateId root="2.16.840.1.113883.10.20.22.4.16" extension="2014-06-09"/>
<templateId root="2.16.840.1.113883.10.20.22.4.16"/>
<id root="cdbd33f0-6cde-11db-9fe1-0800200c9a66"/>
<statusCode code="active"/>
<effectiveTime xsi:type="IVL_TS">
<low value="20120806"/>
<high nullFlavor="UNK"/>
</effectiveTime>
<effectiveTime xsi:type="PIVL_TS" operator="A">
<period xsi:type="IVL_PQ">
<low value="4" unit="h"/>
<high value="6" unit="h"/>
</period>
</effectiveTime>
<repeatNumber value="1"/>
<routeCode
code="C38288"
codeSystem="2.16.840.1.113883.3.26.1.1"
codeSystemName="NCI Thesaurus"
displayName="Oral Route of Administration"/>
<doseQuantity value="1"/>
<maxDoseQuantity >
<numerator value="6" unit="{spray}" />
<denominator value="1" unit="{day}" />
</maxDoseQuantity>
<administrationUnitCode
code="C48501"
codeSystem="2.16.840.1.113883.3.26.1.1"
codeSystemName="National Cancer Institute (NCI) Thesaurus"
displayName="Inhalation dosing unit"/>
<consumable>
<manufacturedProduct classCode="MANU">
<templateId root="2.16.840.1.113883.10.20.22.4.23" extension="2014-06-09"/>
<templateId root="2.16.840.1.113883.10.20.22.4.23"/>
<manufacturedMaterial>
<code
code="1190220"
codeSystem="2.16.840.1.113883.6.88"
codeSystemName="RxNorm"
displayName="ACTUAT albuterol 0.1 MG/ACTUAT ... Spray"/>
</manufacturedMaterial>
<manufacturerOrganization>
<name>Good Vaccines Inc</name>
</manufacturerOrganization>
</manufacturedProduct>
</consumable>
<author>
<!-- Time the author noted that patient is on medication -->
<templateId root="2.16.840.1.113883.10.20.22.4.119"/>
<time value="201309111603-0700"/>
<assignedAuthor>
<!-- Author maps to Provenance
not included in this example -->
</assignedAuthor>
</author>
<participant typeCode="CSM">
<participantRole classCode="MANU">
<templateId root="2.16.840.1.113883.10.20.22.4.24"/>
<code code="412307009"
displayName="Drug vehicle"
codeSystem="2.16.840.1.113883.6.96"/>
<playingEntity classCode="MMAT">
<code code="387390002"
displayName="sodium chloride"
codeSystem="2.16.840.1.113883.6.96"
codeSystemName="SNOMED"/>
<name>sodium chloride</name>
</playingEntity>
</participantRole>
</participant>
<entryRelationship typeCode="COMP">
<!-- Medication Free Text SIG -->
<substanceAdministration classCode="SBADM" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.147"/>
<code code="76662-6" codeSystem="2.16.840.1.113883.6.1"/>
<text>
<!-- Resolves to: 2 puffs every 4-6 hours as needed -->
<reference value="#MedicationSig_PRN_222222"/>
</text>
<consumable>
<manufacturedProduct>
<manufacturedLabeledDrug nullFlavor="NA"/>
</manufacturedProduct>
</consumable>
</substanceAdministration>
</entryRelationship>
<entryRelationship typeCode="RSON">
<observation classCode="OBS" moodCode="EVN">
<!-- Indication (V2) -->
<templateId root="2.16.840.1.113883.10.20.22.4.19" extension="2014-06-09"/>
<templateId root="2.16.840.1.113883.10.20.22.4.19"/>
<id extension="44" root="1.3.6.1.4.1.22812.3.99930.3.4.1.3"/>
<code
codeSystem="2.16.840.1.113883.6.96"
codeSystemName="SNOMED CT"
code="404684003"
displayName="Clinical finding"/>
<statusCode code="completed"/>
<effectiveTime>
<low nullFlavor="NI"/>
</effectiveTime>
<value xsi:type="CD"
code="56018004"
codeSystem="2.16.840.1.113883.6.96"
displayName="wheezing" />
</observation>
</entryRelationship>
<entryRelationship typeCode="SUBJ" inversionInd="true">
<act classCode="ACT" moodCode="INT">
<!-- Instruction (V2) -->
<templateId root="2.16.840.1.113883.10.20.22.4.20" extension="2014-06-09"/>
<templateId root="2.16.840.1.113883.10.20.22.4.20"/>
<code code="1153465004"
displayName="Education about overdosing"
codeSystem="2.16.840.1.113883.6.96"
codeSystemName="SNOMED CT"/>
<text>Do not overtake</text>
<statusCode code="completed"/>
</act>
</entryRelationship>
<entryRelationship typeCode="REFR">
<supply classCode="SPLY" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.18" extension="2014-06-09" />
<templateId root="2.16.840.1.113883.10.20.22.4.18"/>
<id root="1.2.3.4.56789.1" extension="cb734647-fc99-424c-a864-7e3cda82e704" />
<statusCode code="completed" />
<effectiveTime>
<high value="20121106" />
</effectiveTime>
<!-- Note in FHIR this is one less, so: 1 -->
<repeatNumber value="2" />
<quantity value="3" />
<product>
<manufacturedProduct classCode="MANU">
<templateId root="2.16.840.1.113883.10.20.22.4.23" extension="2014-06-09"/>
<templateId root="2.16.840.1.113883.10.20.22.4.23"/>
<id root="2a620155-9d11-439e-92b3-5d9815ff4ee8"/>
<manufacturedMaterial>
<code
code="1190220"
codeSystem="2.16.840.1.113883.6.88"
codeSystemName="RxNorm"
displayName="ACTUAT albuterol 0.1 MG/ACTUAT ... Spray"/>
</manufacturedMaterial>
</manufacturedProduct>
</product>
</supply>
</entryRelationship>
<precondition typeCode="PRCN">
<criterion>
<templateId root="2.16.840.1.113883.10.20.22.4.25" extension="2014-06-09" />
<templateId root="2.16.840.1.113883.10.20.22.4.25"/>
<code code="ASSERTION" codeSystem="2.16.840.1.113883.5.4" />
<value xsi:type="CD"
code="56018004"
codeSystem="2.16.840.1.113883.6.96"
displayName="Wheezing" />
</criterion>
</precondition>
</substanceAdministration>
|
Note: The following shows a MedicationRequest resource with a Medication 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": "MedicationRequest",
"id": "7fc60296-0667-4a44-86e5-4c432403532e",
"identifier": [
{
"system": "urn:ietf:rfc:3986",
"value": "urn:uuid:cdbd33f0-6cde-11db-9fe1-0800200c9a66"
}
],
"status": "active",
"intent": "plan",
"medicationReference": {
"reference": "#containedMed"
},
/* Only one of these can be sent.
If not including a Medication resource
the code can just be sent in codeableConcept
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.nlm.nih.gov/research/umls/rxnorm",
"code": "1190220",
"display": "ACTUAT albuterol 0.1 MG/ACTUAT ... Spray"
}
]
}, */
"subject": {
"reference": "Patient/18025725"
},
"authoredOn": "2013-09-11T16:03:00-07:00",
"reasonCode": [
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "56018004",
"display": "wheezing"
}
]
}
],
"dosageInstruction": [
{
"text": "2 puffs every 4-6 hours as needed",
"patientInstruction": "Do not overtake",
"additionalInstruction": [
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "1153465004",
"display": "Education about overdosing"
}
]
}
],
"timing": {
"period": 4,
"periodMax": 6,
"periodUnit": "h"
},
"asNeededCodeableConcept": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "56018004",
"display": "wheezing"
}
]
},
"route": {
"coding": [
{
"system": "http://ncithesaurus-stage.nci.nih.gov",
"code": "C38288",
"display": "Oral Route of Administration"
}
]
},
"doseAndRate": [
{
"doseQuantity": {
"value": 1
}
}
],
"maxDosePerPeriod": {
"numerator": {
"value": 6,
"unit": "{spray}",
"code": "{spray}",
"system": "http://unitsofmeasure.org"
},
"denominator": {
"value": 1,
"unit": "{day}",
"code": "{day}",
"system": "http://unitsofmeasure.org"
}
}
}
],
"dispenseRequest": {
"numberOfRepeatsAllowed": 1,
"validityPeriod": {
"end": "2012-11-06"
},
"quantity": {
"value": 3
}
},
"contained": [{
"resourceType": "Medication",
"id": "containedMed",
"code": {
"coding": [{
"system": "http://www.nlm.nih.gov/research/umls/rxnorm",
"code": "1190220",
"display": "ACTUAT albuterol 0.1 MG/ACTUAT ... Spray"
}]
},
"form": {
"coding": [
{
"system": "http://ncicb.nci.nih.gov/xml/owl/EVS/Thesaurus.owl",
"code": "C48501",
"display": "Inhalation dosing unit"
}
]
},
"manufacturer": {
// If more details exist, would map to Organization resource
"display": "Good Vaccines Inc"
},
"ingredient": [{
"itemCodeableConcept": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387390002",
"display": "sodium chloride"
}
]
}
}]
}]
}
|
The consensus mapping example developed through multiple vendors are available below: