FHIR R5 Encounter resource.
An interaction between a patient and healthcare provider(s) for the purpose of providing healthcare service(s) or assessing the health status of a patient.
https://www.hl7.org/fhir/R5/encounter.html
R5 Notes
classis now a list ofCodeableConcept(was a singleCodingin R4).hospitalizationhas been renamed toadmission.statusHistoryremoved; use thehistorybackbone element instead.location.formreplaceslocation.physicalType.
Status codes: planned | in-progress | on-hold | discharged | completed |
cancelled | discontinued | entered-in-error | unknownExample
alias FhirEx.Resources.Encounter
alias FhirEx.Types.{Reference, CodeableConcept, Coding, Period, Identifier}
encounter = %Encounter{
id: "enc-001",
status: "in-progress",
class: [
%CodeableConcept{
coding: [%Coding{
system: "http://terminology.hl7.org/CodeSystem/v3-ActCode",
code: "IMP",
display: "inpatient encounter"
}]
}
],
subject: %Reference{reference: "Patient/patient-001"},
actual_period: %Period{start: "2024-01-15T08:00:00Z"}
}
Summary
Functions
Builds the struct from a string-keyed map (e.g., from decoded FHIR JSON).
Builds a new struct from a map or keyword list of field values.
Returns the FHIR resource type name string.
Converts the struct to a string-keyed map for use with FhirEx.JSON.
Types
@type admission() :: %{ pre_admission_identifier: FhirEx.Types.Identifier.t() | nil, origin: FhirEx.Types.Reference.t() | nil, admit_source: FhirEx.Types.CodeableConcept.t() | nil, re_admission: FhirEx.Types.CodeableConcept.t() | nil, destination: FhirEx.Types.Reference.t() | nil, discharge_disposition: FhirEx.Types.CodeableConcept.t() | nil }
@type diagnosis() :: %{ condition: [FhirEx.Types.Reference.t()] | nil, use: [FhirEx.Types.CodeableConcept.t()] | nil }
@type location() :: %{ location: FhirEx.Types.Reference.t(), status: String.t() | nil, form: FhirEx.Types.CodeableConcept.t() | nil, period: FhirEx.Types.Period.t() | nil }
@type participant() :: %{ type: [FhirEx.Types.CodeableConcept.t()] | nil, period: FhirEx.Types.Period.t() | nil, actor: FhirEx.Types.Reference.t() | nil }
@type reason() :: %{ use: [FhirEx.Types.CodeableConcept.t()] | nil, value: [map()] | nil }
@type t() :: %FhirEx.Resources.Encounter{ account: [FhirEx.Types.Reference.t()] | nil, actual_period: FhirEx.Types.Period.t() | nil, admission: admission() | nil, appointment: [FhirEx.Types.Reference.t()] | nil, care_team: [FhirEx.Types.Reference.t()] | nil, class: [FhirEx.Types.CodeableConcept.t()] | nil, diagnosis: [diagnosis()] | nil, diet_preference: [FhirEx.Types.CodeableConcept.t()] | nil, episode_of_care: [FhirEx.Types.Reference.t()] | nil, extension: [FhirEx.Types.Extension.t()] | nil, id: String.t() | nil, identifier: [FhirEx.Types.Identifier.t()] | nil, length: map() | nil, location: [location()] | nil, meta: FhirEx.Types.Meta.t() | nil, part_of: FhirEx.Types.Reference.t() | nil, participant: [participant()] | nil, planned_end_date: String.t() | nil, planned_start_date: String.t() | nil, priority: FhirEx.Types.CodeableConcept.t() | nil, reason: [reason()] | nil, service_provider: FhirEx.Types.Reference.t() | nil, service_type: [map()] | nil, special_arrangement: [FhirEx.Types.CodeableConcept.t()] | nil, special_courtesy: [FhirEx.Types.CodeableConcept.t()] | nil, status: String.t(), subject: FhirEx.Types.Reference.t() | nil, subject_status: FhirEx.Types.CodeableConcept.t() | nil, text: FhirEx.Types.Narrative.t() | nil, type: [FhirEx.Types.CodeableConcept.t()] | nil, virtual_service: [map()] | nil }
Functions
Builds the struct from a string-keyed map (e.g., from decoded FHIR JSON).
Builds a new struct from a map or keyword list of field values.
@spec resource_type() :: String.t()
Returns the FHIR resource type name string.
Converts the struct to a string-keyed map for use with FhirEx.JSON.