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

ElementTypeCardinalityDescription
Encounter.identifierIdentifier0..*Identifier(s) by which this encounter is known
Encounter.statuscode1..1planned | arrived | triaged | in-progress | onleave | finished | cancelled +
Encounter.statusHistoryBackboneElement0..*List of past encounter statuses
Encounter.statusHistory.idString0..1Unique id for inter-element referencing
Encounter.statusHistory.extensionExtension0..*Additional content defined by implementations
Encounter.statusHistory.modifierExtensionExtension0..*Extensions that cannot be ignored even if unrecognized
Encounter.statusHistory.statuscode1..1planned | arrived | triaged | in-progress | onleave | finished | cancelled +
Encounter.statusHistory.periodPeriod1..1The time that the episode was in the specified status
Encounter.classCoding1..1Classification of patient encounter
Encounter.classHistoryBackboneElement0..*List of past encounter classes
Encounter.classHistory.idString0..1Unique id for inter-element referencing
Encounter.classHistory.extensionExtension0..*Additional content defined by implementations
Encounter.classHistory.modifierExtensionExtension0..*Extensions that cannot be ignored even if unrecognized
Encounter.classHistory.classCoding1..1inpatient | outpatient | ambulatory | emergency +
Encounter.classHistory.periodPeriod1..1The time that the episode was in the specified class
Encounter.typeCodeableConcept0..*Specific type of encounter
Encounter.serviceTypeCodeableConcept0..1Specific type of service
Encounter.priorityCodeableConcept0..1Indicates the urgency of the encounter
Encounter.subjectReference0..1The patient or group present at the encounter
Encounter.episodeOfCareReference0..*Episode(s) of care that this encounter should be recorded against
Encounter.basedOnReference0..*The ServiceRequest that initiated this encounter
Encounter.participantBackboneElement0..*List of participants involved in the encounter
Encounter.participant.idString0..1Unique id for inter-element referencing
Encounter.participant.extensionExtension0..*Additional content defined by implementations
Encounter.participant.modifierExtensionExtension0..*Extensions that cannot be ignored even if unrecognized
Encounter.participant.typeCodeableConcept0..*Role of participant in encounter
Encounter.participant.periodPeriod0..1Period of time during the encounter that the participant participated
Encounter.participant.individualReference0..1Persons involved in the encounter other than the patient
Encounter.appointmentReference0..*The appointment that scheduled this encounter
Encounter.periodPeriod0..1The start and end time of the encounter
Encounter.lengthDuration0..1Quantity of time the encounter lasted (less time absent)
Encounter.reasonCodeCodeableConcept0..*Coded reason the encounter takes place
Encounter.reasonReferenceReference0..*Reason the encounter takes place (reference)
Encounter.diagnosisBackboneElement0..*The list of diagnosis relevant to this encounter
Encounter.diagnosis.idString0..1Unique id for inter-element referencing
Encounter.diagnosis.extensionExtension0..*Additional content defined by implementations
Encounter.diagnosis.modifierExtensionExtension0..*Extensions that cannot be ignored even if unrecognized
Encounter.diagnosis.conditionReference1..1The diagnosis or procedure relevant to the encounter
Encounter.diagnosis.useCodeableConcept0..1Role that this diagnosis has within the encounter (e.g. admission, billing, discharge …)
Encounter.diagnosis.rankpositiveInt0..1Ranking of the diagnosis (for each role type)
Encounter.accountReference0..*The set of accounts that may be used for billing for this Encounter
Encounter.hospitalizationBackboneElement0..1Details about the admission to a healthcare service
Encounter.hospitalization.idString0..1Unique id for inter-element referencing
Encounter.hospitalization.extensionExtension0..*Additional content defined by implementations
Encounter.hospitalization.modifierExtensionExtension0..*Extensions that cannot be ignored even if unrecognized
Encounter.hospitalization.preAdmissionIdentifierIdentifier0..1Pre-admission identifier
Encounter.hospitalization.originReference0..1The location/organization from which the patient came before admission
Encounter.hospitalization.admitSourceCodeableConcept0..1From where patient was admitted (physician referral, transfer)
Encounter.hospitalization.reAdmissionCodeableConcept0..1The 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.dietPreferenceCodeableConcept0..*Diet preferences reported by the patient
Encounter.hospitalization.specialCourtesyCodeableConcept0..*Special courtesies (VIP, board member)
Encounter.hospitalization.specialArrangementCodeableConcept0..*Wheelchair, translator, stretcher, etc.
Encounter.hospitalization.destinationReference0..1Location/organization to which the patient is discharged
Encounter.hospitalization.dischargeDispositionCodeableConcept0..1Category or kind of location after discharge
Encounter.locationBackboneElement0..*List of locations where the patient has been
Encounter.location.idString0..1Unique id for inter-element referencing
Encounter.location.extensionExtension0..*Additional content defined by implementations
Encounter.location.modifierExtensionExtension0..*Extensions that cannot be ignored even if unrecognized
Encounter.location.locationReference1..1Location the encounter takes place
Encounter.location.statuscode0..1planned | 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 status
  • Encounter.subject.reference — Reference to the patient
  • Encounter.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.