Skip to content

Medications Section

Template ID: 2.16.840.1.113883.10.20.22.2.1.1 Version: R2.1 (2014-06-09) Badge: Core Section

Overview

The Medications Section contains a patient's current and historical medications, including prescriptions, over-the-counter medications, and medication administration records. This section is critical for medication reconciliation, drug interaction checking, and continuity of care.

Clinical Purpose and Context

The Medications Section documents: - All current medications a patient is taking - Historical medications that have been discontinued - Medication details including dosage, route, frequency, and status - Start and end dates for medication therapy - Patient instructions for medication administration

This information is essential for: - Preventing adverse drug interactions - Ensuring medication continuity during care transitions - Supporting clinical decision-making - Meeting Meaningful Use requirements

When to Include

The Medications Section is a required section in most C-CDA document types, including: - Continuity of Care Documents (CCD) - Discharge Summaries - Transfer Summaries - Consultation Notes - History and Physical Notes

Even if a patient is not taking any medications, the section should be included with narrative text stating "No known medications."

Template Details

Official OID

  • Root: 2.16.840.1.113883.10.20.22.2.1.1
  • Extension: 2014-06-09 (R2.1)

Conformance Level

  • Conformance: SHALL (Required in entries-required variant)
  • Section Code: 10160-0 (LOINC - "History of Medication use Narrative")

Cardinality

  • Section: 1..1 (Required in most C-CDA document types)
  • Entries: 1..* (At least one Medication Activity entry is required for entries-required variant)
  • Medication Activity (V2): 2.16.840.1.113883.10.20.22.4.16:2014-06-09
  • Medication Information (V2): 2.16.840.1.113883.10.20.22.4.23:2014-06-09

Protocol Requirements

The MedicationProtocol defines the data contract for medication entries. Each medication must provide:

Required Properties

Property Type Description
name str Human-readable medication name
code str RxNorm code for the medication
dosage str Dosage amount (e.g., "10 mg", "1 tablet")
route str Route of administration (e.g., "oral", "IV")
frequency str Frequency of administration
start_date date Date medication was started
status str Status: 'active', 'completed', 'discontinued'

Optional Properties

Property Type Description
end_date Optional[date] Date medication was stopped (None if ongoing)
instructions Optional[str] Patient instructions

Data Types and Constraints

  • name: Free-text medication name (e.g., "Lisinopril 10mg oral tablet")
  • code: Must be a valid RxNorm code
  • dosage: Can include quantity and unit (e.g., "10 mg", "2 tablets")
  • route: Common values include "oral", "IV", "topical", "subcutaneous", "intramuscular"
  • frequency: Human-readable frequency (e.g., "twice daily", "every 6 hours", "as needed")
  • status: Determines the activity statusCode and effective time high element
  • start_date: Formatted as YYYYMMDD in CDA XML
  • end_date: Only applicable for completed or discontinued medications

Code Example

Here's a complete working example using ccdakit to create a Medications Section:

from datetime import date
from ccdakit.builders.sections.medications import MedicationsSection
from ccdakit.core.base import CDAVersion

# Define a medication using a simple class that implements MedicationProtocol
class Medication:
    def __init__(self, name, code, dosage, route, frequency, start_date,
                 status, end_date=None, instructions=None):
        self._name = name
        self._code = code
        self._dosage = dosage
        self._route = route
        self._frequency = frequency
        self._start_date = start_date
        self._status = status
        self._end_date = end_date
        self._instructions = instructions

    @property
    def name(self):
        return self._name

    @property
    def code(self):
        return self._code

    @property
    def dosage(self):
        return self._dosage

    @property
    def route(self):
        return self._route

    @property
    def frequency(self):
        return self._frequency

    @property
    def start_date(self):
        return self._start_date

    @property
    def end_date(self):
        return self._end_date

    @property
    def status(self):
        return self._status

    @property
    def instructions(self):
        return self._instructions

# Create medication instances
medications = [
    Medication(
        name="Lisinopril 10mg oral tablet",
        code="314076",
        dosage="10 mg",
        route="oral",
        frequency="once daily",
        start_date=date(2020, 3, 15),
        status="active",
        instructions="Take in the morning with water"
    ),
    Medication(
        name="Metformin 500mg oral tablet",
        code="860975",
        dosage="500 mg",
        route="oral",
        frequency="twice daily",
        start_date=date(2020, 3, 15),
        status="active",
        instructions="Take with meals"
    ),
    Medication(
        name="Amoxicillin 500mg oral capsule",
        code="308192",
        dosage="500 mg",
        route="oral",
        frequency="three times daily",
        start_date=date(2023, 10, 1),
        status="completed",
        end_date=date(2023, 10, 10),
        instructions="Complete the full course"
    )
]

# Build the Medications Section
section_builder = MedicationsSection(
    medications=medications,
    title="Medications",
    version=CDAVersion.R2_1
)

# Generate XML element
section_element = section_builder.build()

# Convert to XML string (for demonstration)
from lxml import etree
xml_string = etree.tostring(section_element, pretty_print=True, encoding='unicode')
print(xml_string)

Official Reference

For complete specification details, refer to the official HL7 C-CDA R2.1 documentation: - HL7 C-CDA R2.1 Implementation Guide - Section: 5.34 - Medications Section (entries required)

Best Practices

Common Patterns

  1. Use RxNorm Codes
  2. RxNorm is the required vocabulary for medication codes
  3. Use specific product codes when available (e.g., brand + strength + form)
  4. Use the RxNorm API or RxNav tool to find correct codes

  5. Document All Medication Details

  6. Include complete dosage information (amount and unit)
  7. Specify route of administration using standard terminology
  8. Provide clear frequency instructions

  9. Track Medication Status Accurately

  10. Use 'active' for current medications
  11. Use 'completed' for medications that were finished as planned
  12. Use 'discontinued' for medications that were stopped early

  13. Include Patient Instructions

  14. Add administration instructions when clinically relevant
  15. Include timing relative to meals, activities, or other medications
  16. Note any special handling or storage requirements

Validation Tips

  1. Section Code Validation
  2. Ensure section code is 10160-0 (LOINC "History of Medication use Narrative")
  3. This is automatically set by the builder

  4. Template ID Validation

  5. Verify the template ID includes both root and extension attributes
  6. R2.1 uses extension="2014-06-09"

  7. RxNorm Code Validation

  8. Verify RxNorm codes are current and valid
  9. Check that codes represent clinical drugs, not ingredients alone
  10. Use the RxNorm API for validation

  11. Date Consistency

  12. Ensure end_date is after start_date
  13. Don't provide end_date for active medications
  14. Provide end_date for completed or discontinued medications

Gotchas to Avoid

  1. Missing Required Elements
  2. Always include at least one medication entry in entries-required variant
  3. Include all required medication activity elements (dose, route, frequency)

  4. Incorrect Code System

  5. Must use RxNorm codes, not NDC or other medication vocabularies
  6. RxNorm OID is 2.16.840.1.113883.6.88

  7. Date Format Issues

  8. Use Python date objects, not strings
  9. The builder handles formatting to CDA TS format (YYYYMMDD)

  10. Route Codes

  11. Route should use FDA Route of Administration codes
  12. Common routes: C38288 (oral), C38276 (intravenous), C38304 (topical)
  13. The builder accepts display names and maps them appropriately

  14. Frequency Representation

  15. C-CDA supports structured frequency (effectiveTime with PIVL_TS)
  16. For simplicity, the builder uses human-readable text
  17. Consider structured timing for interoperability with e-prescribing systems

  18. Medication Status vs. Activity Status

  19. The Medication Activity statusCode reflects the activity, not the medication
  20. Active medications can have a completed activity (administered as ordered)
  21. Track whether the medication is current vs. whether the order was fulfilled

  22. Empty Medication Lists

  23. An empty medication list may fail validation in entries-required contexts
  24. Consider using the entries-optional variant if no medications exist
  25. Or include "No Known Medications" as a documented observation

  26. Narrative-Entry Mismatch

  27. Ensure narrative table content matches structured entries
  28. The builder handles this automatically but be aware when customizing

  29. Dosage Precision

  30. Include both numeric value and unit in dosage
  31. Use standard UCUM units for measurements
  32. Be consistent with precision (e.g., "10 mg" not "10mg")

  33. Historical Medications

    • Include recent historical medications for context
    • Consider relevance when including very old discontinued medications
    • Focus on medications relevant to current care