1#[doc = "The list of people responsible for providing the service."]
3#[derive(Debug, Clone, PartialEq)]
4pub struct EncounterParticipant {
5 #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
6 pub r#id: Option<std::string::String>,
7 #[doc = "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."]
8 pub r#extension: Vec<super::super::types::Extension>,
9 #[doc = "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."]
10 pub r#modifier_extension: Vec<super::super::types::Extension>,
11 #[doc = "Role of participant in encounter."]
12 pub r#type: Vec<super::super::types::CodeableConcept>,
13 #[doc = "The period of time that the specified participant participated in the encounter. These can overlap or be sub-sets of the overall encounter's period."]
14 pub r#period: Option<Box<super::super::types::Period>>,
15 #[doc = "Person involved in the encounter, the patient/group is also included here to indicate that the patient was actually participating in the encounter. Not including the patient here covers use cases such as a case meeting between practitioners about a patient - non contact times."]
16 pub r#actor: Option<Box<super::super::types::Reference>>,
17}
18#[allow(clippy::derivable_impls)]
19impl Default for EncounterParticipant {
20 fn default() -> Self {
21 Self {
22 r#id: Default::default(),
23 r#extension: Default::default(),
24 r#modifier_extension: Default::default(),
25 r#type: Default::default(),
26 r#period: Default::default(),
27 r#actor: Default::default(),
28 }
29 }
30}
31#[doc = "The list of medical reasons that are expected to be addressed during the episode of care."]
32#[derive(Debug, Clone, PartialEq)]
33pub struct EncounterReason {
34 #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
35 pub r#id: Option<std::string::String>,
36 #[doc = "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."]
37 pub r#extension: Vec<super::super::types::Extension>,
38 #[doc = "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."]
39 pub r#modifier_extension: Vec<super::super::types::Extension>,
40 #[doc = "What the reason value should be used as e.g. Chief Complaint, Health Concern, Health Maintenance (including screening)."]
41 pub r#use: Vec<super::super::types::CodeableConcept>,
42 #[doc = "Reason the encounter takes place, expressed as a code or a reference to another resource. For admissions, this can be used for a coded admission diagnosis."]
43 pub r#value: Vec<super::super::types::CodeableReference>,
44}
45#[allow(clippy::derivable_impls)]
46impl Default for EncounterReason {
47 fn default() -> Self {
48 Self {
49 r#id: Default::default(),
50 r#extension: Default::default(),
51 r#modifier_extension: Default::default(),
52 r#use: Default::default(),
53 r#value: Default::default(),
54 }
55 }
56}
57#[doc = "The list of diagnosis relevant to this encounter."]
58#[derive(Debug, Clone, PartialEq)]
59pub struct EncounterDiagnosis {
60 #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
61 pub r#id: Option<std::string::String>,
62 #[doc = "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."]
63 pub r#extension: Vec<super::super::types::Extension>,
64 #[doc = "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."]
65 pub r#modifier_extension: Vec<super::super::types::Extension>,
66 #[doc = "The coded diagnosis or a reference to a Condition (with other resources referenced in the evidence.detail), the use property will indicate the purpose of this specific diagnosis."]
67 pub r#condition: Vec<super::super::types::CodeableReference>,
68 #[doc = "Role that this diagnosis has within the encounter (e.g. admission, billing, discharge …)."]
69 pub r#use: Vec<super::super::types::CodeableConcept>,
70}
71#[allow(clippy::derivable_impls)]
72impl Default for EncounterDiagnosis {
73 fn default() -> Self {
74 Self {
75 r#id: Default::default(),
76 r#extension: Default::default(),
77 r#modifier_extension: Default::default(),
78 r#condition: Default::default(),
79 r#use: Default::default(),
80 }
81 }
82}
83#[doc = "Details about the stay during which a healthcare service is provided.\r\rThis does not describe the event of admitting the patient, but rather any information that is relevant from the time of admittance until the time of discharge."]
84#[derive(Debug, Clone, PartialEq)]
85pub struct EncounterAdmission {
86 #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
87 pub r#id: Option<std::string::String>,
88 #[doc = "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."]
89 pub r#extension: Vec<super::super::types::Extension>,
90 #[doc = "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."]
91 pub r#modifier_extension: Vec<super::super::types::Extension>,
92 #[doc = "Pre-admission identifier."]
93 pub r#pre_admission_identifier: Option<Box<super::super::types::Identifier>>,
94 #[doc = "The location/organization from which the patient came before admission."]
95 pub r#origin: Option<Box<super::super::types::Reference>>,
96 #[doc = "From where patient was admitted (physician referral, transfer)."]
97 pub r#admit_source: Option<Box<super::super::types::CodeableConcept>>,
98 #[doc = "Indicates that this encounter is directly related to a prior admission, often because the conditions addressed in the prior admission were not fully addressed."]
99 pub r#re_admission: Option<Box<super::super::types::CodeableConcept>>,
100 #[doc = "Location/organization to which the patient is discharged."]
101 pub r#destination: Option<Box<super::super::types::Reference>>,
102 #[doc = "Category or kind of location after discharge."]
103 pub r#discharge_disposition: Option<Box<super::super::types::CodeableConcept>>,
104}
105#[allow(clippy::derivable_impls)]
106impl Default for EncounterAdmission {
107 fn default() -> Self {
108 Self {
109 r#id: Default::default(),
110 r#extension: Default::default(),
111 r#modifier_extension: Default::default(),
112 r#pre_admission_identifier: Default::default(),
113 r#origin: Default::default(),
114 r#admit_source: Default::default(),
115 r#re_admission: Default::default(),
116 r#destination: Default::default(),
117 r#discharge_disposition: Default::default(),
118 }
119 }
120}
121#[doc = "List of locations where the patient has been during this encounter."]
122#[derive(Debug, Clone, PartialEq)]
123pub struct EncounterLocation {
124 #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
125 pub r#id: Option<std::string::String>,
126 #[doc = "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."]
127 pub r#extension: Vec<super::super::types::Extension>,
128 #[doc = "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."]
129 pub r#modifier_extension: Vec<super::super::types::Extension>,
130 #[doc = "The location where the encounter takes place."]
131 pub r#location: Box<super::super::types::Reference>,
132 #[doc = "The status of the participants' presence at the specified location during the period specified. If the participant is no longer at the location, then the period will have an end date/time."]
133 pub r#status: Option<super::super::types::Code>,
134 #[doc = "This will be used to specify the required levels (bed/ward/room/etc.) desired to be recorded to simplify either messaging or query."]
135 pub r#form: Option<Box<super::super::types::CodeableConcept>>,
136 #[doc = "Time period during which the patient was present at the location."]
137 pub r#period: Option<Box<super::super::types::Period>>,
138}
139#[allow(clippy::derivable_impls)]
140impl Default for EncounterLocation {
141 fn default() -> Self {
142 Self {
143 r#id: Default::default(),
144 r#extension: Default::default(),
145 r#modifier_extension: Default::default(),
146 r#location: Box::new(super::super::types::Reference {
147 id: Some("$invalid".to_string()),
148 ..Default::default()
149 }),
150 r#status: Default::default(),
151 r#form: Default::default(),
152 r#period: Default::default(),
153 }
154 }
155}
156#[doc = "An interaction between healthcare provider(s), and/or patient(s) for the purpose of providing healthcare service(s) or assessing the health status of patient(s)."]
157#[derive(Debug, Clone, PartialEq)]
158pub struct Encounter {
159 #[doc = "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes."]
160 pub r#id: Option<super::super::types::Id>,
161 #[doc = "The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource."]
162 pub r#meta: Option<Box<super::super::types::Meta>>,
163 #[doc = "A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc."]
164 pub r#implicit_rules: Option<super::super::types::Uri>,
165 #[doc = "The base language in which the resource is written."]
166 pub r#language: Option<super::super::types::Code>,
167 #[doc = "A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it \"clinically safe\" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety."]
168 pub r#text: Option<Box<super::super::types::Narrative>>,
169 #[doc = "These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning."]
170 pub r#contained: Vec<super::super::Resource>,
171 #[doc = "May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."]
172 pub r#extension: Vec<super::super::types::Extension>,
173 #[doc = "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."]
174 pub r#modifier_extension: Vec<super::super::types::Extension>,
175 #[doc = "Identifier(s) by which this encounter is known."]
176 pub r#identifier: Vec<super::super::types::Identifier>,
177 #[doc = "The current state of the encounter (not the state of the patient within the encounter - that is subjectState)."]
178 pub r#status: super::super::types::Code,
179 #[doc = "Concepts representing classification of patient encounter such as ambulatory (outpatient), inpatient, emergency, home health or others due to local variations."]
180 pub r#class: Vec<super::super::types::CodeableConcept>,
181 #[doc = "Indicates the urgency of the encounter."]
182 pub r#priority: Option<Box<super::super::types::CodeableConcept>>,
183 #[doc = "Specific type of encounter (e.g. e-mail consultation, surgical day-care, skilled nursing, rehabilitation)."]
184 pub r#type: Vec<super::super::types::CodeableConcept>,
185 #[doc = "Broad categorization of the service that is to be provided (e.g. cardiology)."]
186 pub r#service_type: Vec<super::super::types::CodeableReference>,
187 #[doc = "The patient or group related to this encounter. In some use-cases the patient MAY not be present, such as a case meeting about a patient between several practitioners or a careteam."]
188 pub r#subject: Option<Box<super::super::types::Reference>>,
189 #[doc = "The subjectStatus value can be used to track the patient's status within the encounter. It details whether the patient has arrived or departed, has been triaged or is currently in a waiting status."]
190 pub r#subject_status: Option<Box<super::super::types::CodeableConcept>>,
191 #[doc = "Where a specific encounter should be classified as a part of a specific episode(s) of care this field should be used. This association can facilitate grouping of related encounters together for a specific purpose, such as government reporting, issue tracking, association via a common problem. The association is recorded on the encounter as these are typically created after the episode of care and grouped on entry rather than editing the episode of care to append another encounter to it (the episode of care could span years)."]
192 pub r#episode_of_care: Vec<super::super::types::Reference>,
193 #[doc = "The request this encounter satisfies (e.g. incoming referral or procedure request)."]
194 pub r#based_on: Vec<super::super::types::Reference>,
195 #[doc = "The group(s) of individuals, organizations that are allocated to participate in this encounter. The participants backbone will record the actuals of when these individuals participated during the encounter."]
196 pub r#care_team: Vec<super::super::types::Reference>,
197 #[doc = "Another Encounter of which this encounter is a part of (administratively or in time)."]
198 pub r#part_of: Option<Box<super::super::types::Reference>>,
199 #[doc = "The organization that is primarily responsible for this Encounter's services. This MAY be the same as the organization on the Patient record, however it could be different, such as if the actor performing the services was from an external organization (which may be billed seperately) for an external consultation. Refer to the colonoscopy example on the Encounter examples tab."]
200 pub r#service_provider: Option<Box<super::super::types::Reference>>,
201 #[doc = "The list of people responsible for providing the service."]
202 pub r#participant: Vec<EncounterParticipant>,
203 #[doc = "The appointment that scheduled this encounter."]
204 pub r#appointment: Vec<super::super::types::Reference>,
205 #[doc = "Connection details of a virtual service (e.g. conference call)."]
206 pub r#virtual_service: Vec<super::super::types::VirtualServiceDetail>,
207 #[doc = "The actual start and end time of the encounter."]
208 pub r#actual_period: Option<Box<super::super::types::Period>>,
209 #[doc = "The planned start date/time (or admission date) of the encounter."]
210 pub r#planned_start_date: Option<super::super::types::DateTime>,
211 #[doc = "The planned end date/time (or discharge date) of the encounter."]
212 pub r#planned_end_date: Option<super::super::types::DateTime>,
213 #[doc = "Actual quantity of time the encounter lasted. This excludes the time during leaves of absence.\r\rWhen missing it is the time in between the start and end values."]
214 pub r#length: Option<Box<super::super::types::Duration>>,
215 #[doc = "The list of medical reasons that are expected to be addressed during the episode of care."]
216 pub r#reason: Vec<EncounterReason>,
217 #[doc = "The list of diagnosis relevant to this encounter."]
218 pub r#diagnosis: Vec<EncounterDiagnosis>,
219 #[doc = "The set of accounts that may be used for billing for this Encounter."]
220 pub r#account: Vec<super::super::types::Reference>,
221 #[doc = "Diet preferences reported by the patient."]
222 pub r#diet_preference: Vec<super::super::types::CodeableConcept>,
223 #[doc = "Any special requests that have been made for this encounter, such as the provision of specific equipment or other things."]
224 pub r#special_arrangement: Vec<super::super::types::CodeableConcept>,
225 #[doc = "Special courtesies that may be provided to the patient during the encounter (VIP, board member, professional courtesy)."]
226 pub r#special_courtesy: Vec<super::super::types::CodeableConcept>,
227 #[doc = "Details about the stay during which a healthcare service is provided.\r\rThis does not describe the event of admitting the patient, but rather any information that is relevant from the time of admittance until the time of discharge."]
228 pub r#admission: Option<EncounterAdmission>,
229 #[doc = "List of locations where the patient has been during this encounter."]
230 pub r#location: Vec<EncounterLocation>,
231}
232#[allow(clippy::derivable_impls)]
233impl Default for Encounter {
234 fn default() -> Self {
235 Self {
236 r#id: Default::default(),
237 r#meta: Default::default(),
238 r#implicit_rules: Default::default(),
239 r#language: Default::default(),
240 r#text: Default::default(),
241 r#contained: Default::default(),
242 r#extension: Default::default(),
243 r#modifier_extension: Default::default(),
244 r#identifier: Default::default(),
245 r#status: super::super::types::Code {
246 id: Some("$invalid".to_string()),
247 ..Default::default()
248 },
249 r#class: Default::default(),
250 r#priority: Default::default(),
251 r#type: Default::default(),
252 r#service_type: Default::default(),
253 r#subject: Default::default(),
254 r#subject_status: Default::default(),
255 r#episode_of_care: Default::default(),
256 r#based_on: Default::default(),
257 r#care_team: Default::default(),
258 r#part_of: Default::default(),
259 r#service_provider: Default::default(),
260 r#participant: Default::default(),
261 r#appointment: Default::default(),
262 r#virtual_service: Default::default(),
263 r#actual_period: Default::default(),
264 r#planned_start_date: Default::default(),
265 r#planned_end_date: Default::default(),
266 r#length: Default::default(),
267 r#reason: Default::default(),
268 r#diagnosis: Default::default(),
269 r#account: Default::default(),
270 r#diet_preference: Default::default(),
271 r#special_arrangement: Default::default(),
272 r#special_courtesy: Default::default(),
273 r#admission: Default::default(),
274 r#location: Default::default(),
275 }
276 }
277}