Skip to content

Encounters Section

Template ID: 2.16.840.1.113883.10.20.22.2.22.1 Version: R2.1 (2015-08-01) Badge: Core Section

Overview

The Encounters Section documents a patient's healthcare visits and encounters, including office visits, hospital admissions, emergency department visits, and other interactions with healthcare providers. This section provides context for when and where healthcare services were delivered.

Clinical Purpose and Context

The Encounters Section records: - Office and outpatient visits - Emergency department encounters - Hospital admissions and discharges - Consultations and specialty visits - Telehealth encounters - Observation stays - Encounter dates and duration - Location and performing provider - Discharge disposition (for inpatient encounters)

This information is essential for: - Understanding the care delivery timeline - Coordinating care across providers and settings - Supporting utilization review and care management - Quality measurement and reporting - Healthcare analytics and population health - Meeting documentation requirements

When to Include

The Encounters Section is commonly included in: - Continuity of Care Documents (CCD) - Discharge Summaries - Transfer Summaries - Consultation Notes - Care coordination documents

The section is optional in most document types but provides valuable context for understanding the patient's care journey.

Template Details

Official OID

  • Root: 2.16.840.1.113883.10.20.22.2.22.1
  • Extension: 2015-08-01 (V3 for R2.1) / 2014-06-09 (V2 for R2.0)

Conformance Level

  • Conformance: MAY or SHOULD (depending on document type)
  • Section Code: 46240-8 (LOINC - "Encounters")

Cardinality

  • Section: 0..1 (Optional in most document types)
  • Entries: 1..* (If section is present, at least one Encounter Activity entry is required)
  • Encounter Activity (V3): 2.16.840.1.113883.10.20.22.4.49:2015-08-01
  • Encounter Diagnosis (V3): 2.16.840.1.113883.10.20.22.4.80:2015-08-01
  • Service Delivery Location: 2.16.840.1.113883.10.20.22.4.32

Protocol Requirements

The EncounterProtocol defines the data contract for encounter entries. Each encounter must provide:

Required Properties

Property Type Description
encounter_type str Encounter type/description
code str Encounter type code
code_system str Code system: 'CPT-4', 'SNOMED CT', 'ActCode'

Optional Properties

Property Type Description
date Optional[date \| datetime] Date/time when encounter occurred
end_date Optional[date \| datetime] End date/time of encounter
location Optional[str] Location where encounter took place
performer_name Optional[str] Name of healthcare provider
discharge_disposition Optional[str] Patient discharge disposition

Data Types and Constraints

  • encounter_type: Human-readable encounter description (e.g., "Office Visit", "Emergency Room")
  • code: Code from EncounterTypeCode value set (2.16.840.1.113883.3.88.12.80.32)
  • code_system: Name of code system used
  • date: Start date/time of encounter (required for most encounters)
  • end_date: End date/time (creates time interval if provided with date)
  • location: Facility or location name
  • performer_name: Provider who performed the encounter
  • discharge_disposition: Where patient went after encounter (for inpatient)

Code Example

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

from datetime import date, datetime
from ccdakit.builders.sections.encounters import EncountersSection
from ccdakit.core.base import CDAVersion

# Define an encounter using a simple class that implements EncounterProtocol
class Encounter:
    def __init__(self, encounter_type, code, code_system, date=None,
                 end_date=None, location=None, performer_name=None,
                 discharge_disposition=None):
        self._encounter_type = encounter_type
        self._code = code
        self._code_system = code_system
        self._date = date
        self._end_date = end_date
        self._location = location
        self._performer_name = performer_name
        self._discharge_disposition = discharge_disposition

    @property
    def encounter_type(self):
        return self._encounter_type

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

    @property
    def code_system(self):
        return self._code_system

    @property
    def date(self):
        return self._date

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

    @property
    def location(self):
        return self._location

    @property
    def performer_name(self):
        return self._performer_name

    @property
    def discharge_disposition(self):
        return self._discharge_disposition

# Create encounter instances
encounters = [
    # Office visit
    Encounter(
        encounter_type="Office Visit",
        code="99213",
        code_system="CPT-4",
        date=date(2023, 10, 15),
        location="Main Street Family Practice",
        performer_name="Dr. Sarah Johnson"
    ),

    # Emergency department visit
    Encounter(
        encounter_type="Emergency Department Visit",
        code="99284",
        code_system="CPT-4",
        date=datetime(2023, 9, 5, 14, 30),
        end_date=datetime(2023, 9, 5, 18, 45),
        location="Community Hospital Emergency Department",
        performer_name="Dr. Michael Chen"
    ),

    # Hospital admission
    Encounter(
        encounter_type="Inpatient Encounter",
        code="IMP",
        code_system="ActCode",
        date=datetime(2023, 7, 10, 8, 0),
        end_date=datetime(2023, 7, 13, 11, 30),
        location="Community Hospital",
        performer_name="Dr. Emily Rodriguez",
        discharge_disposition="Home"
    ),

    # Consultation
    Encounter(
        encounter_type="Consultation",
        code="99243",
        code_system="CPT-4",
        date=date(2023, 6, 20),
        location="Cardiology Associates",
        performer_name="Dr. James Williams"
    ),

    # Telehealth visit
    Encounter(
        encounter_type="Virtual Encounter",
        code="99442",
        code_system="CPT-4",
        date=datetime(2023, 8, 12, 10, 0),
        performer_name="Dr. Sarah Johnson"
    )
]

# Build the Encounters Section
section_builder = EncountersSection(
    encounters=encounters,
    title="Encounters",
    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.19 - Encounters Section (entries required)

Best Practices

Common Patterns

  1. Use Appropriate Code Systems
  2. CPT-4: Professional services and office visits (US)
  3. SNOMED CT: Clinical encounter types
  4. ActCode: HL7 encounter type codes (IMP, AMB, EMER, etc.)
  5. Choose based on use case and regional requirements

  6. Document Key Encounters

  7. Recent encounters relevant to current care
  8. Hospitalizations and emergency visits
  9. Specialist consultations
  10. Major procedures or interventions
  11. Consider clinical relevance when selecting encounters

  12. Include Temporal Information

  13. Document start date/time for all encounters
  14. Add end date/time for inpatient stays and ED visits
  15. Precision matters for acute care encounters
  16. Date-only acceptable for routine outpatient visits

  17. Specify Location

  18. Facility name for hospital encounters
  19. Practice name for office visits
  20. Department for specialty visits
  21. Helps with care coordination and follow-up

  22. Document Performing Provider

  23. Primary provider for the encounter
  24. Important for continuity of care
  25. Supports care team communication
  26. May be required for billing

Validation Tips

  1. Section Code Validation
  2. Ensure section code is 46240-8 (LOINC "Encounters")
  3. This is automatically set by the builder

  4. Template ID Validation

  5. Verify template ID includes correct extension
  6. R2.1 V3: extension="2015-08-01"
  7. R2.0 V2: extension="2014-06-09"

  8. Encounter Type Code Validation

  9. Verify codes are from appropriate value sets
  10. EncounterTypeCode value set OID: 2.16.840.1.113883.3.88.12.80.32
  11. Common CPT codes for E&M services: 99201-99499

  12. Code System OID Mapping

  13. CPT-4: 2.16.840.1.113883.6.12
  14. SNOMED CT: 2.16.840.1.113883.6.96
  15. ActCode: 2.16.840.1.113883.5.4

  16. effectiveTime Structure

  17. Point in time: single value element
  18. Time interval: low and high elements
  19. Use interval for inpatient encounters
  20. Point in time acceptable for outpatient

Gotchas to Avoid

  1. Missing Encounter Dates
  2. While optional in protocol, dates are highly recommended
  3. Encounters without dates have limited value
  4. Use nullFlavor only when truly unknown
  5. Date provides critical temporal context

  6. Incorrect Code System Selection

  7. CPT codes for professional services (outpatient)
  8. ActCode for encounter class (AMB, IMP, EMER)
  9. Don't mix code systems inappropriately
  10. Verify code belongs to stated system

  11. Date vs. DateTime Precision

  12. Use datetime for acute care (ED, inpatient)
  13. Date acceptable for routine office visits
  14. Consider clinical context
  15. Time precision supports care timeline

  16. Discharge Disposition Confusion

  17. Only for inpatient encounters
  18. Not applicable to outpatient visits
  19. Use standard codes from DischargeDisposition value set
  20. Examples: "Home", "Skilled Nursing Facility", "Acute Care Hospital"

  21. Encounter vs. Procedure Confusion

  22. Encounter = visit/interaction with healthcare system
  23. Procedure = specific intervention performed
  24. Surgery is a procedure; hospitalization is an encounter
  25. Both can be documented but in different sections

  26. Location Detail

  27. Be specific: "Community Hospital" not just "Hospital"
  28. Include department if relevant: "Emergency Department"
  29. Supports care coordination
  30. May be required for interoperability

  31. Performer vs. Attending

  32. Document primary performer of encounter
  33. For inpatient, usually attending physician
  34. For office visit, the seeing provider
  35. Multiple performers can be documented if needed

  36. Telehealth Documentation

  37. Use appropriate CPT codes for virtual visits
  38. May not have physical location
  39. Still document modality (phone, video)
  40. Increasing importance post-pandemic

  41. Encounter Class Codes

  42. ActCode encounter class: AMB (ambulatory), IMP (inpatient), EMER (emergency)
  43. Different from specific encounter type
  44. Can be used in addition to CPT codes
  45. Provides high-level categorization

  46. Historical Encounters

    • Focus on clinically relevant encounters
    • Don't overwhelm with distant history
    • Consider last 12-24 months
    • Include significant hospitalizations regardless of age
  47. Observation Status

    • "Observation" is a specific encounter type
    • Not inpatient, not outpatient
    • Use appropriate code (OBSENC from ActCode)
    • Has specific billing and regulatory implications
  48. Service Delivery Location

    • Can use Service Delivery Location template for detail
    • Includes facility type, address
    • Optional but enhances interoperability
    • Important for care coordination
  49. Encounter Diagnosis

    • Can link encounter to diagnosis
    • Use Encounter Diagnosis template
    • Different from problem list
    • Represents diagnosis for this specific encounter
  50. End Date Interpretation

    • For inpatient: discharge date/time
    • For outpatient: typically same as start (point in time)
    • For ED: time patient left department
    • Use interval when duration is clinically relevant
  51. Multiple Encounters Same Day

    • Can have multiple encounters on same date
    • Different providers or locations
    • Different encounter types
    • Each should be documented separately
  52. Narrative-Entry Consistency

    • Ensure narrative table matches structured entries
    • Builder handles this automatically
    • Include key details: type, date, location, provider in narrative
    • Critical for human readability and validation