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)
Related Templates¶
- 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¶
- Use Appropriate Code Systems
- CPT-4: Professional services and office visits (US)
- SNOMED CT: Clinical encounter types
- ActCode: HL7 encounter type codes (IMP, AMB, EMER, etc.)
-
Choose based on use case and regional requirements
-
Document Key Encounters
- Recent encounters relevant to current care
- Hospitalizations and emergency visits
- Specialist consultations
- Major procedures or interventions
-
Consider clinical relevance when selecting encounters
-
Include Temporal Information
- Document start date/time for all encounters
- Add end date/time for inpatient stays and ED visits
- Precision matters for acute care encounters
-
Date-only acceptable for routine outpatient visits
-
Specify Location
- Facility name for hospital encounters
- Practice name for office visits
- Department for specialty visits
-
Helps with care coordination and follow-up
-
Document Performing Provider
- Primary provider for the encounter
- Important for continuity of care
- Supports care team communication
- May be required for billing
Validation Tips¶
- Section Code Validation
- Ensure section code is 46240-8 (LOINC "Encounters")
-
This is automatically set by the builder
-
Template ID Validation
- Verify template ID includes correct extension
- R2.1 V3: extension="2015-08-01"
-
R2.0 V2: extension="2014-06-09"
-
Encounter Type Code Validation
- Verify codes are from appropriate value sets
- EncounterTypeCode value set OID: 2.16.840.1.113883.3.88.12.80.32
-
Common CPT codes for E&M services: 99201-99499
-
Code System OID Mapping
- CPT-4: 2.16.840.1.113883.6.12
- SNOMED CT: 2.16.840.1.113883.6.96
-
ActCode: 2.16.840.1.113883.5.4
-
effectiveTime Structure
- Point in time: single value element
- Time interval: low and high elements
- Use interval for inpatient encounters
- Point in time acceptable for outpatient
Gotchas to Avoid¶
- Missing Encounter Dates
- While optional in protocol, dates are highly recommended
- Encounters without dates have limited value
- Use nullFlavor only when truly unknown
-
Date provides critical temporal context
-
Incorrect Code System Selection
- CPT codes for professional services (outpatient)
- ActCode for encounter class (AMB, IMP, EMER)
- Don't mix code systems inappropriately
-
Verify code belongs to stated system
-
Date vs. DateTime Precision
- Use datetime for acute care (ED, inpatient)
- Date acceptable for routine office visits
- Consider clinical context
-
Time precision supports care timeline
-
Discharge Disposition Confusion
- Only for inpatient encounters
- Not applicable to outpatient visits
- Use standard codes from DischargeDisposition value set
-
Examples: "Home", "Skilled Nursing Facility", "Acute Care Hospital"
-
Encounter vs. Procedure Confusion
- Encounter = visit/interaction with healthcare system
- Procedure = specific intervention performed
- Surgery is a procedure; hospitalization is an encounter
-
Both can be documented but in different sections
-
Location Detail
- Be specific: "Community Hospital" not just "Hospital"
- Include department if relevant: "Emergency Department"
- Supports care coordination
-
May be required for interoperability
-
Performer vs. Attending
- Document primary performer of encounter
- For inpatient, usually attending physician
- For office visit, the seeing provider
-
Multiple performers can be documented if needed
-
Telehealth Documentation
- Use appropriate CPT codes for virtual visits
- May not have physical location
- Still document modality (phone, video)
-
Increasing importance post-pandemic
-
Encounter Class Codes
- ActCode encounter class: AMB (ambulatory), IMP (inpatient), EMER (emergency)
- Different from specific encounter type
- Can be used in addition to CPT codes
-
Provides high-level categorization
-
Historical Encounters
- Focus on clinically relevant encounters
- Don't overwhelm with distant history
- Consider last 12-24 months
- Include significant hospitalizations regardless of age
-
Observation Status
- "Observation" is a specific encounter type
- Not inpatient, not outpatient
- Use appropriate code (OBSENC from ActCode)
- Has specific billing and regulatory implications
-
Service Delivery Location
- Can use Service Delivery Location template for detail
- Includes facility type, address
- Optional but enhances interoperability
- Important for care coordination
-
Encounter Diagnosis
- Can link encounter to diagnosis
- Use Encounter Diagnosis template
- Different from problem list
- Represents diagnosis for this specific encounter
-
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
-
Multiple Encounters Same Day
- Can have multiple encounters on same date
- Different providers or locations
- Different encounter types
- Each should be documented separately
-
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