On this page:

23.3CDA Module Mappings

 

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');

23.3.1Valid Document Types

 
  • "ContinuityOfCareDocument"
  • "TransferSummary"

To set your document to any of the following types in your cda template, use composition.setType(documentType).

Example: composition.setType('ContinuityOfCareDocument')

23.3.2Valid Resources for the header

 
  • recordTarget: Patient
  • author: Device
  • custodian: Organization
  • documentationOf: Encounter

There is currently no support for the following optional header tags:

  • dataEnterer
  • informant
  • informationRecipient
  • legalAuthenticator
  • authenticator
  • participant
  • inFulfillmentOf
  • authorization
  • componentOf

23.3.3Valid Section Types and Sources

 

To add a section to your cda template, use composition.addSection(sectionType).

Example: var medicationSection = composition.addSection("medication");

23.3.4Allergy 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

23.3.5Dialysis Prescription Section

 

Note: This is a custom section that is not in the DSTU2.1 spec.

Acceptable Fhir resources:

  • CarePlan
    • A Planned Dialysis act will be created for each CarePlan in the section.
  • ProcedureRequest
    • A Planned Dialysis act will be created for each ProcedureRequest in the section.

23.3.6Encounters Section

 

Acceptable Fhir resources:

  • Encounter
    • An Encounter Activity entry will be created for each Encounter in the section.

23.3.7Functional Status Section

 

Acceptable Fhir resources:

  • Observation
    • If an Observation contains one or more components, a Functional Status Organizer entry will be created, and one Functional Status Observation entry will be nested inside the Functional Status Organizer for each component found.
    • Otherwise, a single Functional Status Observation entry will be created for the Observation.
  • Condition
    • A Sensory Status entry will be created for each Condition in the section.

23.3.8Goals Section

 

Acceptable Fhir resources:

  • Goal
    • A Goal Observation entry will be created for each Goal in the section.

23.3.9Immunizations 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.

23.3.10Medical Equipment Section

 

Acceptable Fhir resources:

  • DeviceUseStatement
    • A Non-Medicinal Supply Activity entry will be created for each DeviceUseStatement in the section.
  • Procedure
    • A Procedure Activity Procedure entry will be created for each Procedure in the section.
  • List
    • A Medical Equipment Organizer entry will be created for each List in the section.
      • A Non-Medicinal Supply Activity entry will be nested inside the Medical Equipment Organizer for each DeviceUseStatement in the List.
      • A Procedure Activity Procedure entry will be nested inside the Medical Equipment Organizer for each Procedure in the List.

23.3.11Medications Section

 

Acceptable Fhir resources:

  • MedicationRequest
    • A Substance Administration entry will be created for each MedicationRequest.
  • MedicationActivity
    • A Substance Administration entry will be created for each MedicationActivity.

23.3.12Problem 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.

23.3.13Procedures Section

 

Acceptable Fhir resources:

  • Procedure
    • An entry will be created for each Procedure in the section.
      • The type of entry will be determined by the value of the category field in the Procedure.
      • If the category code field contains SNOMED code 387713003, a Procedure Activity Procedure entry will be created.
      • If the category code field contains SNOMED code 103693007, a Procedure Activity Observation entry will be created.
      • Otherwise, a Procedure Activity Act entry will be created.

23.3.14Reason for Referral Section

 

Acceptable Fhir resources:

  • ReferralRequest
    • A Patient Referral Act will be created for each ReferralRequest in the section.

23.3.15Results 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.

23.3.16Social History Section

 

Acceptable Fhir resources:

  • Observation
    • 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 76689-9 is present, a Sex Assigned At Birth entry will be created.

For either of these two entries, you can guarantee that an entry will be present even if no Fhir resource is provided by adding the entry to the populateMissing param array. in the /apply CDA Exchange Endpoint.

The full list of acceptable values for that array are:

  • "SMOKING_STATUS"
  • "SEX_ASSIGNED_AT_BIRTH"

23.3.17Vital Signs Section

 

Acceptable Fhir resources:

  • Observation
    • A Vital Signs Organizer will be created for each Observation in the section.
    • A Vital Sign Observation will be nested in the Vital Signs Organizer for each value present in Observation.value and every Observation.component.value
    • If several Observations are grouped together in a subsection of the Vital Signs section, a single Vital Signs Organizer will be created containing all the Vital Sign Observations in the subsection.
    let vitalSection = composition.addSection("vitalsign");
    
    // Each of these Observations will generate a distinct Vital Signs Organizer
    let topLevelList = Fhir
        .search()
        .forResource('Observation')
        .where('subject', subject)
        .where('category', 'vital-signs')
        .where([some suitable filter])
        .asList();
    vitalSection.populate(topLevelList);

    // All of these Observations will be clustered in a single 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);