CDA Module Mappings for Export
A step-by-step CDA Export tutorial can be found here.
All code examples in this document assume that you are in your generateCdaExchangeComposition function and already have the following line in your code:
var composition = ResourceBuilder.build('Composition');
Valid Document Types
- "Continuity Of Care Document" - LOINC 34133-9
- "Discharge Summary" - LOINC 18842-5
- "History and Physical Note" - LOINC 34117-2
- "Progress Note" - LOINC 11506-3
For instance, to set your document to any of the above in your cda template, use
composition.setType(documentType).
The document type should be specified as a Coding:
composition.setType('http://LOINC.org|34133-9').
Valid Resources for the header
- recordTarget:
Patient
- author:
Device, Practitioner, Organization, PractitionerRole
- custodian:
Organization
- documentationOf:
Encounter
There is currently no support for the following optional header tags:
- dataEnterer
- informant
- informationRecipient
- legalAuthenticator
- authenticator
- participant
- inFulfillmentOf
- authorization
- componentOf
Valid Section Types and Sources
To add a section to your cda template, use composition.addSection(sectionType).
Example: var medicationSection = composition.addSection("medication");
Applicable To All Sections
The following resources are available to all sections listed.
Acceptable FHIR resources:
DocumentReference
- A Note Activity Act entry will be created for each DocumentReference in the section entry.
Admission Diagnosis Section
Acceptable FHIR resources:
Condition
- A Problem Observation entry will be created for each Condition in the section. These Problem Observations will be nested within a single Hospital Admission Diagnosis entry.
Admission Medication Section
Acceptable FHIR resources:
MedicationStatement
- An Admission Medication entry will be created for every MedicationStatement resource entry in the section.
Allergy and Intolerances Section
Acceptable FHIR resources:
AllergyIntolerance
- An Allergy Concern Act entry will be created for each Coding with system RxNorm found in AllergyIntolerance.code
Assessment and Plan Section
Acceptable FHIR resources:
ServiceRequest
- A Planned Act entry will be created for each ServiceRequest in the Assessment and Plan Composition Section.
Encounters Section
Acceptable FHIR resources:
Encounter
- An Encounter Activity entry will be created for each Encounter in the section.
Care Team Section
Acceptable FHIR resources:
CareTeam
- A CareTeam entry will be created for the CareTeam resource.
Practitioner
- A CareTeam performer act will be created for each practitioner in the CareTeam participant.
Discharge Medication Section
Acceptable FHIR resources:
MedicationStatement
- A Discharge Medication entry will be created for every MedicationStatement resource entry in the section.
Family History Section
Acceptable FHIR resources:
FamilyMemberHistory
- A Family History entry will be created for each FamilyMemberHistory in the section.
Functional Status Section
Acceptable FHIR resources:
Observation
- If an Observation has the LOINC code 54522-8, a Functional Status Observation entry will be created.
- If it has the LOINC code 89571-4, a Disability Status Observation entry will be created.
- If it has the category "survey", an Assessment Scale Observation entry will be created.
- Otherwise, Self-Care Activities (ADL and IADL) entry will be created.
- Any resources that are grouped together within a sub-section of the FHIR
Composition.section will be grouped together within a CDA Functional Status Organizer entry.
Goals Section
Acceptable FHIR resources:
Goal
- A Goal Observation entry will be created for each Goal in the section.
Immunizations Section
Acceptable FHIR resources:
Immunization
- An Immunization Activity entry with
moodCode="EVN" will be created for each Immunization in the section.
ImmunizationRecommendation
- An Immunization Activity entry with
moodCode="INT" will be created for each ImmunizationRecommendation in the section.
Medical Equipment Section
Acceptable FHIR resources:
Procedure
- A Procedure Activity Procedure entry will be created for each Procedure in the section.
Medications Section
Acceptable FHIR resources:
MedicationStatement
- A Substance Administration entry with
moodCode="EVN" will be created for each MedicationStatement.
MedicationRequest
- A Substance Administration entry with
moodCode="INT"will be created for each MedicationRequest.
Mental Status Section
Acceptable FHIR resources:
Observation
- For each nested Observation resource entry in the Composition's Mental Status Section sub-section(s) will be rendered as a separate Mental Status Observation. The section and sub-section model of the FHIR Composition will help render grouped Mental Status Observation entries under a separate Mental Status Organizer.
Past Medical History Section
Acceptable FHIR resources:
Condition
- A Problem Observation entry will be created for each Condition in the section. These Problem Observations will be nested directly under the section.
Payer Section
Acceptable FHIR resources:
Coverage
- For each nested Coverage resource entry in the Composition's Payers Section sub-section(s). Each sub-section will be rendered as a separate Coverage Activity. The section and sub-section model of the FHIR Composition will help render grouped Coverage Activity entries.
Plan of Treatment Section
Acceptable FHIR resources:
Encounter
- A Planned Encounter entry will be created for each Encounter in the Plan Of Treatment Composition Section.
MedicationRequest
- A Planned Medication Activity entry will be created for each MedicationRequest in the Plan Of Treatment Composition Section.
ServiceRequest
- A Planned Observation entry will be created for each ServiceRequest in the Plan Of Treatment Composition Section.
CarePlan
- An Instruction entry will be created for each CarePlan in the Plan of Treatment Composition Section. Only the first
activity of each CarePlan will be rendered in the CDA document. To include multiple Instruction entries in the section, each must be represented by a distinct CarePlan in the FHIR document bundle.
Problem Section
Acceptable FHIR resources:
Condition
- A Problem Concern Act will be created for each Condition resource.
- The nested Problem Concern Observation will contain the identifier from an Encounter or EpisodeOfCare in Condition.context. If no context is present, a random identifier will be assigned for the Problem Concern Observation.
Procedures Section
Acceptable FHIR resources:
Procedure
- A Procedure Activity Procedure entry will be created for each Procedure in the section.
Reason For Referral Section
Acceptable FHIR resources:
ServiceRequest
- A Patient Referral Act entry will be created for each ServiceRequest in the section.
Results Section
Acceptable FHIR resources:
DiagnosticReport
- A Results Organizer will be created for each Diagnostic Report.
- All Observations referenced in DiagnosticReport.result will be collected.
- For each Observation, a Result Observation will be nested in the Results Organizer for each value present in Observation.value and every Observation.component.value
Observation
- A Results Organizer will be created for each Observation that was not collected for a Diagnostic Report.
- A Result Observation will be nested in the Results Organizer for each value present in Observation.value and every Observation.component.value
Only values of type valueQuantity, valueCodeableConcept, and valueString will be read.
Social History Section
Acceptable FHIR resources:
Observation
- If an observation with LOINC code
11367-0 is present, a Tobacco Use entry will be created.
- If an observation with LOINC code
72166-2 is present, a Smoking Status Meaningful Use entry will be created.
- If an observation with LOINC code
75274-1 is present, a Characteristics of Residence entry will be created.
- If an observation with LOINC code
75281-6 is present, a Cultural and Religious Observation entry will be created.
- If an observation with LOINC code
82810-3 is present, a Pregnancy Observation entry will be created.
- If an observation with LOINC code
86645-9 is present, a Pregnancy Intention in Next Year entry will be created.
- If an observation with LOINC code
76690-7 is present, a Sexual Orientation Observation entry will be created.
- If any other code is present, a Social History Observation entry will be created.
General Status Section
- A Composition's General Status narrative-only section will be converted to a component entry with the narrative text from the section.
History of Present Illness Section
- A Composition's History of Present Illness narrative-only section will be converted to a component entry with the narrative text from the section.
Objective Section
- A Composition's Objective narrative-only section will be converted to a component entry with the narrative text from the section.
Review of Systems Section
- A Review of Systems narrative-only section will be converted to a component entry with the narrative text from the section.
Subjective Section
- A Composition's Subjective narrative-only section will be converted to a component entry with the narrative text from the section.
Course of Care Section
- A Composition's Course of Care narrative-only section will be converted to a component entry with the narrative text from the section.
Health Status Evaluations and Outcomes Section
- A Composition's Health Status Evaluations/Outcomes narrative-only section will be converted to a component entry with the narrative text from the section.
Interventions Section
- A Composition's Interventions narrative-only section will be converted to a component entry with the narrative text from the section.
Physical Exam Section
- A Composition's Physical Exam narrative-only section will be converted to a component entry with the narrative text from the section.
Vital Signs Section
Acceptable FHIR resources:
Observation
- The CDA Exchange v2 module expects Observations to be grouped together in nested sections of the Vital Signs section. A
Vital Signs Organizer will be created for each nested section, containing one Vital Sign Observation entry for each Observation in that nested section.
- If any Observations exist as direct entries of the top-level section, all of the corresponding Vital Sign Observations
will be grouped in a single Vital Signs Organizer. This is not a recommended pattern.
let vitalSection = composition.addSection("vitalsign");
// All of these Observations will be clustered in a single Vital Signs Organizer
let topLevelList = Fhir
.search()
.forResource('Observation')
.where('subject', subject)
.where('category', 'vital-signs')
.where([some suitable filter])
.asList();
vitalSection.addSection().populate(topLevelList);
// All of these Observations will be clustered in a second Vital Signs Organizer
let clusteredList = Fhir
.search()
.forResource('Observation')
.where('subject', subject)
.where('category', 'vital-signs')
.where([some other suitable filter])
.asList();
vitalSection.addSection().populate(clusteredList);
Note Section
Acceptable FHIR resources:
DocumentReference
- A note entry will be created for each DocumentReference in the section
Discharge Diagnosis Section
Acceptable FHIR resources:
Condition
- A Problem Observation entry will be created for each Condition in the section. These Problem Observations will be nested within a single Hospital Discharge Diagnosis entry.
Chief Complaint Section
- A Composition's Chief Complaint narrative-only section will be converted to a component entry with the narrative text from the section.
Reason for Visit Section
- A Composition's Reason for Visit narrative-only section will be converted to a component entry with the narrative text from the section.
Chief Complaint and Reason for Visit Section
- A Composition's Chief Complaint and Reason for Visit narrative-only section will be converted to a component entry with the narrative text from the section.
Hospital Consultations Section
- A Composition's Hospital Consultations narrative-only section will be converted to a component entry with the narrative text from the section.
Hospital Course Section
- A Composition's Hospital Course narrative-only section will be converted to a component entry with the narrative text from the section.
Hospital Discharge Instructions Section
- A Composition's Hospital Discharge Instructions narrative-only section will be converted to a component entry with the narrative text from the section.
Hospital Discharge Physical Section
- A Composition's Hospital Discharge Physical narrative-only section will be converted to a component entry with the narrative text from the section.
Hospital Discharge Studies Summary Section
- A Composition's Hospital Discharge Studies Summary narrative-only section will be converted to a component entry with the narrative text from the section.
Instructions Section
- A Composition's Instructions narrative-only section will be converted to a component entry with the narrative text from the section.
Nutrition Section
- A Composition's Nutrition narrative-only section will be converted to a component entry with the narrative text from the section.
Assessment Section
- A Composition's Assessment narrative-only section will be converted to a component entry with the narrative text from the section.
Advance Directives Section
Observation
- An Advance Directive Observation entry will be created for each Observation in the section. If Observations are grouped in a sub-section, the corresponding Advance Directive Observations will be grouped in an Advance Directive Organizer entry.
Medical (General) History Section
- A Composition's Medical (General) History narrative-only section will be converted to a component entry with the narrative text from the section.
Health Concerns Section
Acceptable FHIR resources:
Condition
- A Health Concern Act entry will be created for each Condition in the section. A Problem Observation entryRelationship will be created and nested in the Health Concern Act.
Observation
- A Health Status Observation will be created for each Observation in the section.