FHIR Encounter Resource (R4)
Encounter is an interaction between a patient and a provider: an office visit, an inpatient stay, a telehealth call. Element table, search parameters, example JSON and FHIRPath for FHIR R4.
- FHIR Encounter Resource (R4) — part of the free FHIR Toolbox library.
- Runs entirely in your browser: your FHIR data is never uploaded to a server.
Overview
Encounter is an interaction between a patient and a provider: an office visit, an inpatient stay, a telehealth call. It carries the class, status, participants, period and where the care happened. Many resources (Observation, Procedure, Condition) reference an Encounter to say when and in what context they were recorded. Its shape changed noticeably between R4 and R5.
Elements
| Element | Type | Cardinality | Description |
|---|---|---|---|
| Encounter.identifier | Identifier | 0..* | Identifier(s) by which this encounter is known |
| Encounter.status | code | 1..1 | planned | arrived | triaged | in-progress | onleave | finished | cancelled + |
| Encounter.statusHistory | BackboneElement | 0..* | List of past encounter statuses |
| Encounter.statusHistory.id | String | 0..1 | Unique id for inter-element referencing |
| Encounter.statusHistory.extension | Extension | 0..* | Additional content defined by implementations |
| Encounter.statusHistory.modifierExtension | Extension | 0..* | Extensions that cannot be ignored even if unrecognized |
| Encounter.statusHistory.status | code | 1..1 | planned | arrived | triaged | in-progress | onleave | finished | cancelled + |
| Encounter.statusHistory.period | Period | 1..1 | The time that the episode was in the specified status |
| Encounter.class | Coding | 1..1 | Classification of patient encounter |
| Encounter.classHistory | BackboneElement | 0..* | List of past encounter classes |
| Encounter.classHistory.id | String | 0..1 | Unique id for inter-element referencing |
| Encounter.classHistory.extension | Extension | 0..* | Additional content defined by implementations |
| Encounter.classHistory.modifierExtension | Extension | 0..* | Extensions that cannot be ignored even if unrecognized |
| Encounter.classHistory.class | Coding | 1..1 | inpatient | outpatient | ambulatory | emergency + |
| Encounter.classHistory.period | Period | 1..1 | The time that the episode was in the specified class |
| Encounter.type | CodeableConcept | 0..* | Specific type of encounter |
| Encounter.serviceType | CodeableConcept | 0..1 | Specific type of service |
| Encounter.priority | CodeableConcept | 0..1 | Indicates the urgency of the encounter |
| Encounter.subject | Reference | 0..1 | The patient or group present at the encounter |
| Encounter.episodeOfCare | Reference | 0..* | Episode(s) of care that this encounter should be recorded against |
| Encounter.basedOn | Reference | 0..* | The ServiceRequest that initiated this encounter |
| Encounter.participant | BackboneElement | 0..* | List of participants involved in the encounter |
| Encounter.participant.id | String | 0..1 | Unique id for inter-element referencing |
| Encounter.participant.extension | Extension | 0..* | Additional content defined by implementations |
| Encounter.participant.modifierExtension | Extension | 0..* | Extensions that cannot be ignored even if unrecognized |
| Encounter.participant.type | CodeableConcept | 0..* | Role of participant in encounter |
| Encounter.participant.period | Period | 0..1 | Period of time during the encounter that the participant participated |
| Encounter.participant.individual | Reference | 0..1 | Persons involved in the encounter other than the patient |
| Encounter.appointment | Reference | 0..* | The appointment that scheduled this encounter |
| Encounter.period | Period | 0..1 | The start and end time of the encounter |
| Encounter.length | Duration | 0..1 | Quantity of time the encounter lasted (less time absent) |
| Encounter.reasonCode | CodeableConcept | 0..* | Coded reason the encounter takes place |
| Encounter.reasonReference | Reference | 0..* | Reason the encounter takes place (reference) |
| Encounter.diagnosis | BackboneElement | 0..* | The list of diagnosis relevant to this encounter |
| Encounter.diagnosis.id | String | 0..1 | Unique id for inter-element referencing |
| Encounter.diagnosis.extension | Extension | 0..* | Additional content defined by implementations |
| Encounter.diagnosis.modifierExtension | Extension | 0..* | Extensions that cannot be ignored even if unrecognized |
| Encounter.diagnosis.condition | Reference | 1..1 | The diagnosis or procedure relevant to the encounter |
| Encounter.diagnosis.use | CodeableConcept | 0..1 | Role that this diagnosis has within the encounter (e.g. admission, billing, discharge …) |
| Encounter.diagnosis.rank | positiveInt | 0..1 | Ranking of the diagnosis (for each role type) |
| Encounter.account | Reference | 0..* | The set of accounts that may be used for billing for this Encounter |
| Encounter.hospitalization | BackboneElement | 0..1 | Details about the admission to a healthcare service |
| Encounter.hospitalization.id | String | 0..1 | Unique id for inter-element referencing |
| Encounter.hospitalization.extension | Extension | 0..* | Additional content defined by implementations |
| Encounter.hospitalization.modifierExtension | Extension | 0..* | Extensions that cannot be ignored even if unrecognized |
| Encounter.hospitalization.preAdmissionIdentifier | Identifier | 0..1 | Pre-admission identifier |
| Encounter.hospitalization.origin | Reference | 0..1 | The location/organization from which the patient came before admission |
| Encounter.hospitalization.admitSource | CodeableConcept | 0..1 | From where patient was admitted (physician referral, transfer) |
| Encounter.hospitalization.reAdmission | CodeableConcept | 0..1 | The type of hospital re-admission that has occurred (if any). If the value is absent, then this is not identified as a readmission |
| Encounter.hospitalization.dietPreference | CodeableConcept | 0..* | Diet preferences reported by the patient |
| Encounter.hospitalization.specialCourtesy | CodeableConcept | 0..* | Special courtesies (VIP, board member) |
| Encounter.hospitalization.specialArrangement | CodeableConcept | 0..* | Wheelchair, translator, stretcher, etc. |
| Encounter.hospitalization.destination | Reference | 0..1 | Location/organization to which the patient is discharged |
| Encounter.hospitalization.dischargeDisposition | CodeableConcept | 0..1 | Category or kind of location after discharge |
| Encounter.location | BackboneElement | 0..* | List of locations where the patient has been |
| Encounter.location.id | String | 0..1 | Unique id for inter-element referencing |
| Encounter.location.extension | Extension | 0..* | Additional content defined by implementations |
| Encounter.location.modifierExtension | Extension | 0..* | Extensions that cannot be ignored even if unrecognized |
| Encounter.location.location | Reference | 1..1 | Location the encounter takes place |
| Encounter.location.status | code | 0..1 | planned | active | reserved | completed |
Example JSON (R4)
{
"resourceType": "Encounter",
"id": "example",
"status": "finished",
"class": {
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "AMB",
"display": "ambulatory"
},
"type": [
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "185349003",
"display": "Encounter for check up"
}
]
}
],
"subject": {
"reference": "Patient/example"
},
"period": {
"start": "2024-05-01T09:00:00Z",
"end": "2024-05-01T09:45:00Z"
}
}
FHIRPath
Encounter.status— Encounter statusEncounter.subject.reference— Reference to the patientEncounter.type.coding.display— Human-readable visit type
Common validation errors
- Using R4 shapes against R5: class is a single Coding in R4 but an array of CodeableConcept in R5, and period became actualPeriod.
- Using an R4 status value against R5. R4 uses finished; R5 renamed it to completed (and added others).
- Sending class as a plain string such as "AMB". It needs the coded structure with system and code.
- Leaving subject out. Without it the encounter isn't attached to any patient.
FHIR Toolbox is a free, privacy-first collection of HL7 FHIR utilities by Omindra Labs. Every tool performs zero-server processing — your health data never leaves your device.