C-CDA on FHIR
2.0.0-ballot - STU 2 Ballot United States of America flag

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

C-CDA to FHIR Participations

CDA defines participants in a number of elements, but the structure is often similar. These represent people (usually providers), organizations, and in some cases devices, locations, or some combination of all of the above.

The FHIR equivalent of these fields are most commonly Practitioner, Organization, and PractitionerRole resources. Occasionally RelatedPerson, Device, or Location may be appropriate targets of CDA participants as well.

Comparison of CDA Participant elements

The following table shows the common and unique fields of each CDA participation type. Since all (except Participant) are just specific flavors of participation, they can all be mapped to FHIR fairly similarly. For Participant mapping, the @typeCode and @classCode attributes are key in determining the type of FHIR resource to create.

Author
(Non-Device)
Data Enterer Informant Performer /
Performer (Service Event)
Participant
(ClinicalDocument)
Participant
(Everywhere Else)
@typeCode=AUT @typeCode=ENT @typeCode=INF @typeCode=PRF @typeCode @typeCode
functionCode     sdtc:functionCode
(no sdtc: in ServiceEvent)
functionCode sdtc:functionCode
time time   time time time
      modeCode (not in serviceEvent)   awarenessCode
assignedAuthor assignedEntity assignedEntity
or
relatedEntity
assignedEntity associatedEntity participantRole
/@classCode=ASSIGNED /@classCode=ASSIGNED /@classCode
(assignedEntity = ASSIGNED)
/@classCode=ASSIGNED /@classCode /@classCode
/id /id /id (not in related) /id /id /id
/code /code /code /code /code /code
/addr /addr /addr /addr /addr /addr
/telecom /telecom /telecom /telecom /telecom /telecom
    /effectiveTime (only in related)      
  /sdtc:patient/id /sdtc:patient/id (not in related) /sdtc:patient/id    
/assignedPerson /assignedPerson /assignedPerson
or
/relatedPerson
/assignedPerson /associatedPerson /playingEntity
//@classCode=PSN //@classCode=PSN //@classCode=PSN //@classCode=PSN //@classCode=PSN //@classCode
//name //name //name //name //name //name
//sdtc:desc //sdtc:desc //sdtc:desc //sdtc:desc //sdtc:desc //desc
//asPatientRelationship/code //asPatientRelationship/code //asPatientRelationship/code //asPatientRelationship/code //asPatientRelationship/code  
          //code
          //quantity
          //sdtc:birthTime
/representedOrganization /representedOrganization /representedOrganization
(not in related)
/representedOrganization /scopingOrganization /scopingEntity
/@classCode=ORG /@classCode=ORG /@classCode=ORG /@classCode=ORG /@classCode=ORG //@classCode
//id //id //id //id //id //id
//name //name //name //name //name //desc
//telecom //telecom //telecom //telecom //telecom  
//addr //addr //addr //addr //addr  
//standardIndustryClassCode //standardIndustryClassCode //standardIndustryClassCode //standardIndustryClassCode //standardIndustryClassCode //code
//asOrganizationPartOf (recursive) //asOrganizationPartOf (recursive) //asOrganizationPartOf (recursive) //asOrganizationPartOf (recursive) //asOrganizationPartOf  

Mapping to different FHIR resource types

The general process for creating FHIR resources from CDA Participations is as follows:

  • If the device element is populated (Author and Participation), create a Device resource
  • If the relatedPerson element is present (Informant only), the <asPatientRelationship> element is present, or Participant/@typeCode indicates a non-clinical Person, create a RelatedPerson resource. Note that RelatedPerson has no Organization component, so if CDA conveys an organization, an additional Person resource may need to be created with a level4 link to RelatedPerson.
  • If the @typeCode (Participant only) indicates a physical location, create a Location resource.
  • If there is no person element present and only an organization element is present, create an Organization resource.
  • If there is both a person element and either an organization or a person/code element (see below for more details), create a PractitionerRole and Practitioner resource. If there is an organization, also create an Organization resource.

In some cases a specific FHIR resource type may not be allowed (for example, a .recorder that can reference Practitioner or PractitionerRole but not Device). Implementers should be aware of requirements and make adjustments accordingly.

Mapping functionCode & time

In most cases the <functionCode> and <time> properties correspond to fields in the resource that is referencing the practitioner. For example, Encounter.participant.individual points to Practitioner, while CDA's <functionCode> would map to Encounter.participant.type. Likewise, <time> often maps to fields like recorded or assertedDate.

Mapping id

Though the <id> element in CDA is recorded at the role level, it is used to represent the id of the person, not their role. For example, clinicians' NPI's are recorded here. For this reason, the <id> should always be mapped to Practitioner.identifier or RelatedPerson.identifier, not to PractitionerRole.identifier

Note that this is different than the <id> underneath <representedOrganization> or <scopingOrganization> which maps to the identifier in an Organization resource.

Mapping code

The <code> element in CDA is ambiguous and mapping to FHIR often depends on context and/or the coding system used. Common mappings to FHIR locations include:

  • PractitionerRole.code - role the participant is playing
  • PractitionerRole.specialty - specific specialty of the provider
  • RelatedPerson.relationship - when talking about a non-provider (though <asPatientRelationship>/<code> is a more appropriate location, it is a recently-added extension and not commonly populated)
  • Practitioner.qualification.code - uncommon; this is more commonly found in name/suffix

Additionally, if there is a <representedOrganization> or <scopingOrganization> with only a <standardIndustryClassCode> populated, this could also indicate specialty.

Practitioner vs ParticipantRole

When there is information about a person AND an organization, the PractitionerRole resource should be created to represent the role that person plays at that organization.

Additionally, if <code> corresponds to role code or specialty, the PractitionerRole resource is the only way to convey this information.

CDA to FHIR Organization

Note when the only field populated is <standardIndustryClassCode>, the Organization resource can be omitted and simply populate the PractitionerRole.specialty.

CDA Organization CDA Participant/scopingEntity
(Only when @classCode = ORG or a similar class)
FHIR Organization Transform Steps
/id /id .identifier CDA id ↔ FHIR identifier
/name /desc .name This is just a string in FHIR
/telecom /telecom .telecom CDA id ↔ FHIR telecom
/addr /addr .address CDA id ↔ FHIR address
/standardIndustryClassCode /code .type CDA coding ↔ FHIR CodeableConcept
/asOrganizationPartOf /asOrganizationPartOf .partOf Recursive Organization reference

Example - CDA to FHIR Organization

Note - the CDA tag could be any number of organization tags like <representedOrganization>, <scopingOrganization>, etc.

CDA OrganizationFHIR Organization
<Organization> <id extension="3" root="1.3.6.1.4.1.22812.3.2009316.3" /> <name>Primary Care Partners Test</name> <telecom use="WP" value="tel:+1-(676)857-6769" /> <addr use="WP"> <streetAddressLine>123 main street</streetAddressLine> <city>Chicago</city> <state>IL</state> <postalCode>60629</postalCode> </addr> </Organization>
{ "resourceType": "Organization", "identifier": [{ "value": "3", "system": "urn:oid:1.3.6.1.4.1.22812.3.2009316.3" }], "name": "Primary Care Partners Test", "address": [{ "use": "work", "line": [ "123 main street" ], "city": "Chicago", "state": "IL", "postalCode": "60629" }], "telecom": [{ "value": "+1-(676)857-6769", "use": "work", "system": "phone" }], "active": true }

CDA to FHIR Practitioner

AssignedAuthor
AssignedEntity
AssociatedEntity
ParticipantRole
Practitioner Transform Steps
/id .identifier CDA id ↔ FHIR identifier
/code   See See Mapping code
In most cases, the presence of a <code> requires a PractitionerRole resource.
/addr .address CDA id ↔ FHIR address
In FHIR this is a non-role-specific, such as a home address.
If this represents a role address, this should go into PractitionerRole.address.
/telecom .telecom CDA id ↔ FHIR telecom
Person
PlayingEntity
  Person is the CDA data type for <assignedPerson> and <associatedPerson>.
//name .name CDA name ↔ FHIR name
//name/suffix .qualification.code If the suffix contains a qualifier like PhD, CNP, etc.
//desc .qualification.code
or
.text
Only map to qualifier if desc contains a qualifier.