fhirbolt_model/generated/r4b/resources/
request_group.rs

1// Generated on 2023-05-17 by fhirbolt-codegen v0.10.0
2#[doc = "A duration or range of durations to apply to the relationship. For example, 30-60 minutes before."]
3#[derive(Default, Debug, Clone, PartialEq)]
4pub enum RequestGroupActionRelatedActionOffset {
5    Duration(Box<super::super::types::Duration>),
6    Range(Box<super::super::types::Range>),
7    #[default]
8    Invalid,
9}
10#[doc = "An optional value describing when the action should be performed."]
11#[derive(Default, Debug, Clone, PartialEq)]
12pub enum RequestGroupActionTiming {
13    DateTime(super::super::types::DateTime),
14    Age(Box<super::super::types::Age>),
15    Period(Box<super::super::types::Period>),
16    Duration(Box<super::super::types::Duration>),
17    Range(Box<super::super::types::Range>),
18    Timing(Box<super::super::types::Timing>),
19    #[default]
20    Invalid,
21}
22#[doc = "An expression that describes applicability criteria, or start/stop conditions for the action."]
23#[derive(Debug, Clone, PartialEq)]
24pub struct RequestGroupActionCondition {
25    #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
26    pub r#id: Option<std::string::String>,
27    #[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."]
28    pub r#extension: Vec<super::super::types::Extension>,
29    #[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)."]
30    pub r#modifier_extension: Vec<super::super::types::Extension>,
31    #[doc = "The kind of condition."]
32    pub r#kind: super::super::types::Code,
33    #[doc = "An expression that returns true or false, indicating whether or not the condition is satisfied."]
34    pub r#expression: Option<Box<super::super::types::Expression>>,
35}
36#[allow(clippy::derivable_impls)]
37impl Default for RequestGroupActionCondition {
38    fn default() -> Self {
39        Self {
40            r#id: Default::default(),
41            r#extension: Default::default(),
42            r#modifier_extension: Default::default(),
43            r#kind: super::super::types::Code {
44                id: Some("$invalid".to_string()),
45                ..Default::default()
46            },
47            r#expression: Default::default(),
48        }
49    }
50}
51#[doc = "A relationship to another action such as \"before\" or \"30-60 minutes after start of\"."]
52#[derive(Debug, Clone, PartialEq)]
53pub struct RequestGroupActionRelatedAction {
54    #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
55    pub r#id: Option<std::string::String>,
56    #[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."]
57    pub r#extension: Vec<super::super::types::Extension>,
58    #[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)."]
59    pub r#modifier_extension: Vec<super::super::types::Extension>,
60    #[doc = "The element id of the action this is related to."]
61    pub r#action_id: super::super::types::Id,
62    #[doc = "The relationship of this action to the related action."]
63    pub r#relationship: super::super::types::Code,
64    #[doc = "A duration or range of durations to apply to the relationship. For example, 30-60 minutes before."]
65    pub r#offset: Option<RequestGroupActionRelatedActionOffset>,
66}
67#[allow(clippy::derivable_impls)]
68impl Default for RequestGroupActionRelatedAction {
69    fn default() -> Self {
70        Self {
71            r#id: Default::default(),
72            r#extension: Default::default(),
73            r#modifier_extension: Default::default(),
74            r#action_id: super::super::types::Id {
75                id: Some("$invalid".to_string()),
76                ..Default::default()
77            },
78            r#relationship: super::super::types::Code {
79                id: Some("$invalid".to_string()),
80                ..Default::default()
81            },
82            r#offset: Default::default(),
83        }
84    }
85}
86#[doc = "The actions, if any, produced by the evaluation of the artifact."]
87#[derive(Debug, Clone, PartialEq)]
88pub struct RequestGroupAction {
89    #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
90    pub r#id: Option<std::string::String>,
91    #[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."]
92    pub r#extension: Vec<super::super::types::Extension>,
93    #[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)."]
94    pub r#modifier_extension: Vec<super::super::types::Extension>,
95    #[doc = "A user-visible prefix for the action."]
96    pub r#prefix: Option<super::super::types::String>,
97    #[doc = "The title of the action displayed to a user."]
98    pub r#title: Option<super::super::types::String>,
99    #[doc = "A short description of the action used to provide a summary to display to the user."]
100    pub r#description: Option<super::super::types::String>,
101    #[doc = "A text equivalent of the action to be performed. This provides a human-interpretable description of the action when the definition is consumed by a system that might not be capable of interpreting it dynamically."]
102    pub r#text_equivalent: Option<super::super::types::String>,
103    #[doc = "Indicates how quickly the action should be addressed with respect to other actions."]
104    pub r#priority: Option<super::super::types::Code>,
105    #[doc = "A code that provides meaning for the action or action group. For example, a section may have a LOINC code for a section of a documentation template."]
106    pub r#code: Vec<super::super::types::CodeableConcept>,
107    #[doc = "Didactic or other informational resources associated with the action that can be provided to the CDS recipient. Information resources can include inline text commentary and links to web resources."]
108    pub r#documentation: Vec<super::super::types::RelatedArtifact>,
109    #[doc = "An expression that describes applicability criteria, or start/stop conditions for the action."]
110    pub r#condition: Vec<RequestGroupActionCondition>,
111    #[doc = "A relationship to another action such as \"before\" or \"30-60 minutes after start of\"."]
112    pub r#related_action: Vec<RequestGroupActionRelatedAction>,
113    #[doc = "An optional value describing when the action should be performed."]
114    pub r#timing: Option<RequestGroupActionTiming>,
115    #[doc = "The participant that should perform or be responsible for this action."]
116    pub r#participant: Vec<super::super::types::Reference>,
117    #[doc = "The type of action to perform (create, update, remove)."]
118    pub r#type: Option<Box<super::super::types::CodeableConcept>>,
119    #[doc = "Defines the grouping behavior for the action and its children."]
120    pub r#grouping_behavior: Option<super::super::types::Code>,
121    #[doc = "Defines the selection behavior for the action and its children."]
122    pub r#selection_behavior: Option<super::super::types::Code>,
123    #[doc = "Defines expectations around whether an action is required."]
124    pub r#required_behavior: Option<super::super::types::Code>,
125    #[doc = "Defines whether the action should usually be preselected."]
126    pub r#precheck_behavior: Option<super::super::types::Code>,
127    #[doc = "Defines whether the action can be selected multiple times."]
128    pub r#cardinality_behavior: Option<super::super::types::Code>,
129    #[doc = "The resource that is the target of the action (e.g. CommunicationRequest)."]
130    pub r#resource: Option<Box<super::super::types::Reference>>,
131    #[doc = "Sub actions."]
132    pub r#action: Vec<RequestGroupAction>,
133}
134#[allow(clippy::derivable_impls)]
135impl Default for RequestGroupAction {
136    fn default() -> Self {
137        Self {
138            r#id: Default::default(),
139            r#extension: Default::default(),
140            r#modifier_extension: Default::default(),
141            r#prefix: Default::default(),
142            r#title: Default::default(),
143            r#description: Default::default(),
144            r#text_equivalent: Default::default(),
145            r#priority: Default::default(),
146            r#code: Default::default(),
147            r#documentation: Default::default(),
148            r#condition: Default::default(),
149            r#related_action: Default::default(),
150            r#timing: Default::default(),
151            r#participant: Default::default(),
152            r#type: Default::default(),
153            r#grouping_behavior: Default::default(),
154            r#selection_behavior: Default::default(),
155            r#required_behavior: Default::default(),
156            r#precheck_behavior: Default::default(),
157            r#cardinality_behavior: Default::default(),
158            r#resource: Default::default(),
159            r#action: Default::default(),
160        }
161    }
162}
163#[doc = "A group of related requests that can be used to capture intended activities that have inter-dependencies such as \"give this medication after that one\"."]
164#[derive(Debug, Clone, PartialEq)]
165pub struct RequestGroup {
166    #[doc = "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes."]
167    pub r#id: Option<super::super::types::Id>,
168    #[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."]
169    pub r#meta: Option<Box<super::super::types::Meta>>,
170    #[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."]
171    pub r#implicit_rules: Option<super::super::types::Uri>,
172    #[doc = "The base language in which the resource is written."]
173    pub r#language: Option<super::super::types::Code>,
174    #[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."]
175    pub r#text: Option<Box<super::super::types::Narrative>>,
176    #[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."]
177    pub r#contained: Vec<super::super::Resource>,
178    #[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."]
179    pub r#extension: Vec<super::super::types::Extension>,
180    #[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)."]
181    pub r#modifier_extension: Vec<super::super::types::Extension>,
182    #[doc = "Allows a service to provide a unique, business identifier for the request."]
183    pub r#identifier: Vec<super::super::types::Identifier>,
184    #[doc = "A canonical URL referencing a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this request."]
185    pub r#instantiates_canonical: Vec<super::super::types::Canonical>,
186    #[doc = "A URL referencing an externally defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this request."]
187    pub r#instantiates_uri: Vec<super::super::types::Uri>,
188    #[doc = "A plan, proposal or order that is fulfilled in whole or in part by this request."]
189    pub r#based_on: Vec<super::super::types::Reference>,
190    #[doc = "Completed or terminated request(s) whose function is taken by this new request."]
191    pub r#replaces: Vec<super::super::types::Reference>,
192    #[doc = "A shared identifier common to all requests that were authorized more or less simultaneously by a single author, representing the identifier of the requisition, prescription or similar form."]
193    pub r#group_identifier: Option<Box<super::super::types::Identifier>>,
194    #[doc = "The current state of the request. For request groups, the status reflects the status of all the requests in the group."]
195    pub r#status: super::super::types::Code,
196    #[doc = "Indicates the level of authority/intentionality associated with the request and where the request fits into the workflow chain."]
197    pub r#intent: super::super::types::Code,
198    #[doc = "Indicates how quickly the request should be addressed with respect to other requests."]
199    pub r#priority: Option<super::super::types::Code>,
200    #[doc = "A code that identifies what the overall request group is."]
201    pub r#code: Option<Box<super::super::types::CodeableConcept>>,
202    #[doc = "The subject for which the request group was created."]
203    pub r#subject: Option<Box<super::super::types::Reference>>,
204    #[doc = "Describes the context of the request group, if any."]
205    pub r#encounter: Option<Box<super::super::types::Reference>>,
206    #[doc = "Indicates when the request group was created."]
207    pub r#authored_on: Option<super::super::types::DateTime>,
208    #[doc = "Provides a reference to the author of the request group."]
209    pub r#author: Option<Box<super::super::types::Reference>>,
210    #[doc = "Describes the reason for the request group in coded or textual form."]
211    pub r#reason_code: Vec<super::super::types::CodeableConcept>,
212    #[doc = "Indicates another resource whose existence justifies this request group."]
213    pub r#reason_reference: Vec<super::super::types::Reference>,
214    #[doc = "Provides a mechanism to communicate additional information about the response."]
215    pub r#note: Vec<super::super::types::Annotation>,
216    #[doc = "The actions, if any, produced by the evaluation of the artifact."]
217    pub r#action: Vec<RequestGroupAction>,
218}
219#[allow(clippy::derivable_impls)]
220impl Default for RequestGroup {
221    fn default() -> Self {
222        Self {
223            r#id: Default::default(),
224            r#meta: Default::default(),
225            r#implicit_rules: Default::default(),
226            r#language: Default::default(),
227            r#text: Default::default(),
228            r#contained: Default::default(),
229            r#extension: Default::default(),
230            r#modifier_extension: Default::default(),
231            r#identifier: Default::default(),
232            r#instantiates_canonical: Default::default(),
233            r#instantiates_uri: Default::default(),
234            r#based_on: Default::default(),
235            r#replaces: Default::default(),
236            r#group_identifier: Default::default(),
237            r#status: super::super::types::Code {
238                id: Some("$invalid".to_string()),
239                ..Default::default()
240            },
241            r#intent: super::super::types::Code {
242                id: Some("$invalid".to_string()),
243                ..Default::default()
244            },
245            r#priority: Default::default(),
246            r#code: Default::default(),
247            r#subject: Default::default(),
248            r#encounter: Default::default(),
249            r#authored_on: Default::default(),
250            r#author: Default::default(),
251            r#reason_code: Default::default(),
252            r#reason_reference: Default::default(),
253            r#note: Default::default(),
254            r#action: Default::default(),
255        }
256    }
257}