1#[doc = "The value of the input parameter as a basic type."]
3#[derive(Default, Debug, Clone, PartialEq)]
4pub enum TaskInputValue {
5 Base64Binary(super::super::types::Base64Binary),
6 Boolean(super::super::types::Boolean),
7 Canonical(super::super::types::Canonical),
8 Code(super::super::types::Code),
9 Date(super::super::types::Date),
10 DateTime(super::super::types::DateTime),
11 Decimal(super::super::types::Decimal),
12 Id(super::super::types::Id),
13 Instant(super::super::types::Instant),
14 Integer(super::super::types::Integer),
15 Markdown(super::super::types::Markdown),
16 Oid(super::super::types::Oid),
17 PositiveInt(super::super::types::PositiveInt),
18 String(super::super::types::String),
19 Time(super::super::types::Time),
20 UnsignedInt(super::super::types::UnsignedInt),
21 Uri(super::super::types::Uri),
22 Url(super::super::types::Url),
23 Uuid(super::super::types::Uuid),
24 Address(Box<super::super::types::Address>),
25 Age(Box<super::super::types::Age>),
26 Annotation(Box<super::super::types::Annotation>),
27 Attachment(Box<super::super::types::Attachment>),
28 CodeableConcept(Box<super::super::types::CodeableConcept>),
29 Coding(Box<super::super::types::Coding>),
30 ContactPoint(Box<super::super::types::ContactPoint>),
31 Count(Box<super::super::types::Count>),
32 Distance(Box<super::super::types::Distance>),
33 Duration(Box<super::super::types::Duration>),
34 HumanName(Box<super::super::types::HumanName>),
35 Identifier(Box<super::super::types::Identifier>),
36 Money(Box<super::super::types::Money>),
37 Period(Box<super::super::types::Period>),
38 Quantity(Box<super::super::types::Quantity>),
39 Range(Box<super::super::types::Range>),
40 Ratio(Box<super::super::types::Ratio>),
41 Reference(Box<super::super::types::Reference>),
42 SampledData(Box<super::super::types::SampledData>),
43 Signature(Box<super::super::types::Signature>),
44 Timing(Box<super::super::types::Timing>),
45 ContactDetail(Box<super::super::types::ContactDetail>),
46 Contributor(Box<super::super::types::Contributor>),
47 DataRequirement(Box<super::super::types::DataRequirement>),
48 Expression(Box<super::super::types::Expression>),
49 ParameterDefinition(Box<super::super::types::ParameterDefinition>),
50 RelatedArtifact(Box<super::super::types::RelatedArtifact>),
51 TriggerDefinition(Box<super::super::types::TriggerDefinition>),
52 UsageContext(Box<super::super::types::UsageContext>),
53 Dosage(Box<super::super::types::Dosage>),
54 Meta(Box<super::super::types::Meta>),
55 #[default]
56 Invalid,
57}
58#[doc = "The value of the Output parameter as a basic type."]
59#[derive(Default, Debug, Clone, PartialEq)]
60pub enum TaskOutputValue {
61 Base64Binary(super::super::types::Base64Binary),
62 Boolean(super::super::types::Boolean),
63 Canonical(super::super::types::Canonical),
64 Code(super::super::types::Code),
65 Date(super::super::types::Date),
66 DateTime(super::super::types::DateTime),
67 Decimal(super::super::types::Decimal),
68 Id(super::super::types::Id),
69 Instant(super::super::types::Instant),
70 Integer(super::super::types::Integer),
71 Markdown(super::super::types::Markdown),
72 Oid(super::super::types::Oid),
73 PositiveInt(super::super::types::PositiveInt),
74 String(super::super::types::String),
75 Time(super::super::types::Time),
76 UnsignedInt(super::super::types::UnsignedInt),
77 Uri(super::super::types::Uri),
78 Url(super::super::types::Url),
79 Uuid(super::super::types::Uuid),
80 Address(Box<super::super::types::Address>),
81 Age(Box<super::super::types::Age>),
82 Annotation(Box<super::super::types::Annotation>),
83 Attachment(Box<super::super::types::Attachment>),
84 CodeableConcept(Box<super::super::types::CodeableConcept>),
85 Coding(Box<super::super::types::Coding>),
86 ContactPoint(Box<super::super::types::ContactPoint>),
87 Count(Box<super::super::types::Count>),
88 Distance(Box<super::super::types::Distance>),
89 Duration(Box<super::super::types::Duration>),
90 HumanName(Box<super::super::types::HumanName>),
91 Identifier(Box<super::super::types::Identifier>),
92 Money(Box<super::super::types::Money>),
93 Period(Box<super::super::types::Period>),
94 Quantity(Box<super::super::types::Quantity>),
95 Range(Box<super::super::types::Range>),
96 Ratio(Box<super::super::types::Ratio>),
97 Reference(Box<super::super::types::Reference>),
98 SampledData(Box<super::super::types::SampledData>),
99 Signature(Box<super::super::types::Signature>),
100 Timing(Box<super::super::types::Timing>),
101 ContactDetail(Box<super::super::types::ContactDetail>),
102 Contributor(Box<super::super::types::Contributor>),
103 DataRequirement(Box<super::super::types::DataRequirement>),
104 Expression(Box<super::super::types::Expression>),
105 ParameterDefinition(Box<super::super::types::ParameterDefinition>),
106 RelatedArtifact(Box<super::super::types::RelatedArtifact>),
107 TriggerDefinition(Box<super::super::types::TriggerDefinition>),
108 UsageContext(Box<super::super::types::UsageContext>),
109 Dosage(Box<super::super::types::Dosage>),
110 Meta(Box<super::super::types::Meta>),
111 #[default]
112 Invalid,
113}
114#[doc = "If the Task.focus is a request resource and the task is seeking fulfillment (i.e. is asking for the request to be actioned), this element identifies any limitations on what parts of the referenced request should be actioned."]
115#[derive(Debug, Clone, PartialEq)]
116pub struct TaskRestriction {
117 #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
118 pub r#id: Option<std::string::String>,
119 #[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 manageable, 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."]
120 pub r#extension: Vec<super::super::types::Extension>,
121 #[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 manageable, 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)."]
122 pub r#modifier_extension: Vec<super::super::types::Extension>,
123 #[doc = "Indicates the number of times the requested action should occur."]
124 pub r#repetitions: Option<super::super::types::PositiveInt>,
125 #[doc = "Over what time-period is fulfillment sought."]
126 pub r#period: Option<Box<super::super::types::Period>>,
127 #[doc = "For requests that are targeted to more than on potential recipient/target, for whom is fulfillment sought?"]
128 pub r#recipient: Vec<super::super::types::Reference>,
129}
130#[allow(clippy::derivable_impls)]
131impl Default for TaskRestriction {
132 fn default() -> Self {
133 Self {
134 r#id: Default::default(),
135 r#extension: Default::default(),
136 r#modifier_extension: Default::default(),
137 r#repetitions: Default::default(),
138 r#period: Default::default(),
139 r#recipient: Default::default(),
140 }
141 }
142}
143#[doc = "Additional information that may be needed in the execution of the task."]
144#[derive(Debug, Clone, PartialEq)]
145pub struct TaskInput {
146 #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
147 pub r#id: Option<std::string::String>,
148 #[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 manageable, 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."]
149 pub r#extension: Vec<super::super::types::Extension>,
150 #[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 manageable, 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)."]
151 pub r#modifier_extension: Vec<super::super::types::Extension>,
152 #[doc = "A code or description indicating how the input is intended to be used as part of the task execution."]
153 pub r#type: Box<super::super::types::CodeableConcept>,
154 #[doc = "The value of the input parameter as a basic type."]
155 pub r#value: TaskInputValue,
156}
157#[allow(clippy::derivable_impls)]
158impl Default for TaskInput {
159 fn default() -> Self {
160 Self {
161 r#id: Default::default(),
162 r#extension: Default::default(),
163 r#modifier_extension: Default::default(),
164 r#type: Box::new(super::super::types::CodeableConcept {
165 id: Some("$invalid".to_string()),
166 ..Default::default()
167 }),
168 r#value: Default::default(),
169 }
170 }
171}
172#[doc = "Outputs produced by the Task."]
173#[derive(Debug, Clone, PartialEq)]
174pub struct TaskOutput {
175 #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
176 pub r#id: Option<std::string::String>,
177 #[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 manageable, 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."]
178 pub r#extension: Vec<super::super::types::Extension>,
179 #[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 manageable, 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)."]
180 pub r#modifier_extension: Vec<super::super::types::Extension>,
181 #[doc = "The name of the Output parameter."]
182 pub r#type: Box<super::super::types::CodeableConcept>,
183 #[doc = "The value of the Output parameter as a basic type."]
184 pub r#value: TaskOutputValue,
185}
186#[allow(clippy::derivable_impls)]
187impl Default for TaskOutput {
188 fn default() -> Self {
189 Self {
190 r#id: Default::default(),
191 r#extension: Default::default(),
192 r#modifier_extension: Default::default(),
193 r#type: Box::new(super::super::types::CodeableConcept {
194 id: Some("$invalid".to_string()),
195 ..Default::default()
196 }),
197 r#value: Default::default(),
198 }
199 }
200}
201#[doc = "A task to be performed."]
202#[derive(Debug, Clone, PartialEq)]
203pub struct Task {
204 #[doc = "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes."]
205 pub r#id: Option<super::super::types::Id>,
206 #[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."]
207 pub r#meta: Option<Box<super::super::types::Meta>>,
208 #[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."]
209 pub r#implicit_rules: Option<super::super::types::Uri>,
210 #[doc = "The base language in which the resource is written."]
211 pub r#language: Option<super::super::types::Code>,
212 #[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."]
213 pub r#text: Option<Box<super::super::types::Narrative>>,
214 #[doc = "These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, and nor can they have their own independent transaction scope."]
215 pub r#contained: Vec<super::super::Resource>,
216 #[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 manageable, 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."]
217 pub r#extension: Vec<super::super::types::Extension>,
218 #[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 manageable, 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)."]
219 pub r#modifier_extension: Vec<super::super::types::Extension>,
220 #[doc = "The business identifier for this task."]
221 pub r#identifier: Vec<super::super::types::Identifier>,
222 #[doc = "The URL pointing to a *FHIR*-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this Task."]
223 pub r#instantiates_canonical: Option<super::super::types::Canonical>,
224 #[doc = "The URL pointing to an *externally* maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this Task."]
225 pub r#instantiates_uri: Option<super::super::types::Uri>,
226 #[doc = "BasedOn refers to a higher-level authorization that triggered the creation of the task. It references a \"request\" resource such as a ServiceRequest, MedicationRequest, ServiceRequest, CarePlan, etc. which is distinct from the \"request\" resource the task is seeking to fulfill. This latter resource is referenced by FocusOn. For example, based on a ServiceRequest (= BasedOn), a task is created to fulfill a procedureRequest ( = FocusOn ) to collect a specimen from a patient."]
227 pub r#based_on: Vec<super::super::types::Reference>,
228 #[doc = "An identifier that links together multiple tasks and other requests that were created in the same context."]
229 pub r#group_identifier: Option<Box<super::super::types::Identifier>>,
230 #[doc = "Task that this particular task is part of."]
231 pub r#part_of: Vec<super::super::types::Reference>,
232 #[doc = "The current status of the task."]
233 pub r#status: super::super::types::Code,
234 #[doc = "An explanation as to why this task is held, failed, was refused, etc."]
235 pub r#status_reason: Option<Box<super::super::types::CodeableConcept>>,
236 #[doc = "Contains business-specific nuances of the business state."]
237 pub r#business_status: Option<Box<super::super::types::CodeableConcept>>,
238 #[doc = "Indicates the \"level\" of actionability associated with the Task, i.e. i+R`9`s this a proposed task, a planned task, an actionable task, etc."]
239 pub r#intent: super::super::types::Code,
240 #[doc = "Indicates how quickly the Task should be addressed with respect to other requests."]
241 pub r#priority: Option<super::super::types::Code>,
242 #[doc = "A name or code (or both) briefly describing what the task involves."]
243 pub r#code: Option<Box<super::super::types::CodeableConcept>>,
244 #[doc = "A free-text description of what is to be performed."]
245 pub r#description: Option<super::super::types::String>,
246 #[doc = "The request being actioned or the resource being manipulated by this task."]
247 pub r#focus: Option<Box<super::super::types::Reference>>,
248 #[doc = "The entity who benefits from the performance of the service specified in the task (e.g., the patient)."]
249 pub r#for: Option<Box<super::super::types::Reference>>,
250 #[doc = "The healthcare event (e.g. a patient and healthcare provider interaction) during which this task was created."]
251 pub r#encounter: Option<Box<super::super::types::Reference>>,
252 #[doc = "Identifies the time action was first taken against the task (start) and/or the time final action was taken against the task prior to marking it as completed (end)."]
253 pub r#execution_period: Option<Box<super::super::types::Period>>,
254 #[doc = "The date and time this task was created."]
255 pub r#authored_on: Option<super::super::types::DateTime>,
256 #[doc = "The date and time of last modification to this task."]
257 pub r#last_modified: Option<super::super::types::DateTime>,
258 #[doc = "The creator of the task."]
259 pub r#requester: Option<Box<super::super::types::Reference>>,
260 #[doc = "The kind of participant that should perform the task."]
261 pub r#performer_type: Vec<super::super::types::CodeableConcept>,
262 #[doc = "Individual organization or Device currently responsible for task execution."]
263 pub r#owner: Option<Box<super::super::types::Reference>>,
264 #[doc = "Principal physical location where the this task is performed."]
265 pub r#location: Option<Box<super::super::types::Reference>>,
266 #[doc = "A description or code indicating why this task needs to be performed."]
267 pub r#reason_code: Option<Box<super::super::types::CodeableConcept>>,
268 #[doc = "A resource reference indicating why this task needs to be performed."]
269 pub r#reason_reference: Option<Box<super::super::types::Reference>>,
270 #[doc = "Insurance plans, coverage extensions, pre-authorizations and/or pre-determinations that may be relevant to the Task."]
271 pub r#insurance: Vec<super::super::types::Reference>,
272 #[doc = "Free-text information captured about the task as it progresses."]
273 pub r#note: Vec<super::super::types::Annotation>,
274 #[doc = "Links to Provenance records for past versions of this Task that identify key state transitions or updates that are likely to be relevant to a user looking at the current version of the task."]
275 pub r#relevant_history: Vec<super::super::types::Reference>,
276 #[doc = "If the Task.focus is a request resource and the task is seeking fulfillment (i.e. is asking for the request to be actioned), this element identifies any limitations on what parts of the referenced request should be actioned."]
277 pub r#restriction: Option<TaskRestriction>,
278 #[doc = "Additional information that may be needed in the execution of the task."]
279 pub r#input: Vec<TaskInput>,
280 #[doc = "Outputs produced by the Task."]
281 pub r#output: Vec<TaskOutput>,
282}
283#[allow(clippy::derivable_impls)]
284impl Default for Task {
285 fn default() -> Self {
286 Self {
287 r#id: Default::default(),
288 r#meta: Default::default(),
289 r#implicit_rules: Default::default(),
290 r#language: Default::default(),
291 r#text: Default::default(),
292 r#contained: Default::default(),
293 r#extension: Default::default(),
294 r#modifier_extension: Default::default(),
295 r#identifier: Default::default(),
296 r#instantiates_canonical: Default::default(),
297 r#instantiates_uri: Default::default(),
298 r#based_on: Default::default(),
299 r#group_identifier: Default::default(),
300 r#part_of: Default::default(),
301 r#status: super::super::types::Code {
302 id: Some("$invalid".to_string()),
303 ..Default::default()
304 },
305 r#status_reason: Default::default(),
306 r#business_status: Default::default(),
307 r#intent: super::super::types::Code {
308 id: Some("$invalid".to_string()),
309 ..Default::default()
310 },
311 r#priority: Default::default(),
312 r#code: Default::default(),
313 r#description: Default::default(),
314 r#focus: Default::default(),
315 r#for: Default::default(),
316 r#encounter: Default::default(),
317 r#execution_period: Default::default(),
318 r#authored_on: Default::default(),
319 r#last_modified: Default::default(),
320 r#requester: Default::default(),
321 r#performer_type: Default::default(),
322 r#owner: Default::default(),
323 r#location: Default::default(),
324 r#reason_code: Default::default(),
325 r#reason_reference: Default::default(),
326 r#insurance: Default::default(),
327 r#note: Default::default(),
328 r#relevant_history: Default::default(),
329 r#restriction: Default::default(),
330 r#input: Default::default(),
331 r#output: Default::default(),
332 }
333 }
334}