FHIR Encounter Resource (R5)
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 R5.
- FHIR Encounter Resource (R5) — 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 | in-progress | on-hold | discharged | completed | cancelled | discontinued | entered-in-error | unknown |
| Encounter.class | CodeableConcept | 0..* | Classification of patient encounter context - e.g. Inpatient, outpatient |
| Encounter.priority | CodeableConcept | 0..1 | Indicates the urgency of the encounter |
| Encounter.type | CodeableConcept | 0..* | Specific type of encounter (e.g. e-mail consultation, surgical day-care, ...) |
| Encounter.serviceType | CodeableReference | 0..* | Specific type of service |
| Encounter.subject | Reference | 0..1 | The patient or group related to this encounter |
| Encounter.subjectStatus | CodeableConcept | 0..1 | The current status of the subject in relation to the Encounter |
| Encounter.episodeOfCare | Reference | 0..* | Episode(s) of care that this encounter should be recorded against |
| Encounter.basedOn | Reference | 0..* | The request that initiated this encounter |
| Encounter.careTeam | Reference | 0..* | The group(s) that are allocated to participate in this encounter |
| Encounter.partOf | Reference | 0..1 | Another Encounter this encounter is part of |
| Encounter.serviceProvider | Reference | 0..1 | The organization (facility) responsible for 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.actor | Reference | 0..1 | The individual, device, or service participating in the encounter |
| Encounter.appointment | Reference | 0..* | The appointment that scheduled this encounter |
| Encounter.virtualService | VirtualServiceDetail | 0..* | Connection details of a virtual service (e.g. conference call) |
| Encounter.actualPeriod | Period | 0..1 | The actual start and end time of the encounter |
| Encounter.plannedStartDate | dateTime | 0..1 | The planned start date/time (or admission date) of the encounter |
| Encounter.plannedEndDate | dateTime | 0..1 | The planned end date/time (or discharge date) of the encounter |
| Encounter.length | Duration | 0..1 | Actual quantity of time the encounter lasted (less time absent) |
| Encounter.reason | BackboneElement | 0..* | The list of medical reasons that are expected to be addressed during the episode of care |
| Encounter.reason.id | String | 0..1 | Unique id for inter-element referencing |
| Encounter.reason.extension | Extension | 0..* | Additional content defined by implementations |
| Encounter.reason.modifierExtension | Extension | 0..* | Extensions that cannot be ignored even if unrecognized |
| Encounter.reason.use | CodeableConcept | 0..* | What the reason value should be used for/as |
| Encounter.reason.value | CodeableReference | 0..* | Reason the encounter takes place (core or 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 | CodeableReference | 0..* | The diagnosis relevant to the encounter |
| Encounter.diagnosis.use | CodeableConcept | 0..* | Role that this diagnosis has within the encounter (e.g. admission, billing, discharge …) |
| Encounter.account | Reference | 0..* | The set of accounts that may be used for billing for this Encounter |
| Encounter.dietPreference | CodeableConcept | 0..* | Diet preferences reported by the patient |
| Encounter.specialArrangement | CodeableConcept | 0..* | Wheelchair, translator, stretcher, etc |
| Encounter.specialCourtesy | CodeableConcept | 0..* | Special courtesies (VIP, board member) |
| Encounter.admission | BackboneElement | 0..1 | Details about the admission to a healthcare service |
| Encounter.admission.id | String | 0..1 | Unique id for inter-element referencing |
| Encounter.admission.extension | Extension | 0..* | Additional content defined by implementations |
| Encounter.admission.modifierExtension | Extension | 0..* | Extensions that cannot be ignored even if unrecognized |
| Encounter.admission.preAdmissionIdentifier | Identifier | 0..1 | Pre-admission identifier |
| Encounter.admission.origin | Reference | 0..1 | The location/organization from which the patient came before admission |
| Encounter.admission.admitSource | CodeableConcept | 0..1 | From where patient was admitted (physician referral, transfer) |
| Encounter.admission.reAdmission | CodeableConcept | 0..1 | Indicates that the patient is being re-admitted |
| Encounter.admission.destination | Reference | 0..1 | Location/organization to which the patient is discharged |
| Encounter.admission.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 |
| Encounter.location.form | CodeableConcept | 0..1 | The physical type of the location (usually the level in the location hierarchy - bed, room, ward, virtual etc.) |
| Encounter.location.period | Period | 0..1 | Time period during which the patient was present at the location |
Example JSON (R5)
{
"resourceType": "Encounter",
"id": "example",
"status": "completed",
"class": [
{
"coding": [
{
"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"
},
"actualPeriod": {
"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.