fhirbolt_model/generated/r5/resources/
plan_definition.rs

1// Generated on 2023-05-17 by fhirbolt-codegen v0.10.0
2#[doc = "Indicates the mechanism used to compare versions to determine which is more current."]
3#[derive(Default, Debug, Clone, PartialEq)]
4pub enum PlanDefinitionVersionAlgorithm {
5    String(super::super::types::String),
6    Coding(Box<super::super::types::Coding>),
7    #[default]
8    Invalid,
9}
10#[doc = "A code, group definition, or canonical reference that describes  or identifies the intended subject of the plan definition. Canonical references are allowed to support the definition of protocols for drug and substance quality specifications, and is allowed to reference a MedicinalProductDefinition, SubstanceDefinition, AdministrableProductDefinition, ManufacturedItemDefinition, or PackagedProductDefinition resource."]
11#[derive(Default, Debug, Clone, PartialEq)]
12pub enum PlanDefinitionSubject {
13    CodeableConcept(Box<super::super::types::CodeableConcept>),
14    Reference(Box<super::super::types::Reference>),
15    Canonical(super::super::types::Canonical),
16    #[default]
17    Invalid,
18}
19#[doc = "The target value of the measure to be achieved to signify fulfillment of the goal, e.g. 150 pounds or 7.0%, or in the case of pharmaceutical quality - NMT 0.6%, Clear solution, etc. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any value at or above the low value."]
20#[derive(Default, Debug, Clone, PartialEq)]
21pub enum PlanDefinitionGoalTargetDetail {
22    Quantity(Box<super::super::types::Quantity>),
23    Range(Box<super::super::types::Range>),
24    CodeableConcept(Box<super::super::types::CodeableConcept>),
25    String(super::super::types::String),
26    Boolean(super::super::types::Boolean),
27    Integer(super::super::types::Integer),
28    Ratio(Box<super::super::types::Ratio>),
29    #[default]
30    Invalid,
31}
32#[doc = "A code, group definition, or canonical reference that describes the intended subject of the action and its children, if any. Canonical references are allowed to support the definition of protocols for drug and substance quality specifications, and is allowed to reference a MedicinalProductDefinition, SubstanceDefinition, AdministrableProductDefinition, ManufacturedItemDefinition, or PackagedProductDefinition resource."]
33#[derive(Default, Debug, Clone, PartialEq)]
34pub enum PlanDefinitionActionSubject {
35    CodeableConcept(Box<super::super::types::CodeableConcept>),
36    Reference(Box<super::super::types::Reference>),
37    Canonical(super::super::types::Canonical),
38    #[default]
39    Invalid,
40}
41#[doc = "A duration or range of durations to apply to the relationship. For example, 30-60 minutes before."]
42#[derive(Default, Debug, Clone, PartialEq)]
43pub enum PlanDefinitionActionRelatedActionOffset {
44    Duration(Box<super::super::types::Duration>),
45    Range(Box<super::super::types::Range>),
46    #[default]
47    Invalid,
48}
49#[doc = "An optional value describing when the action should be performed."]
50#[derive(Default, Debug, Clone, PartialEq)]
51pub enum PlanDefinitionActionTiming {
52    Age(Box<super::super::types::Age>),
53    Duration(Box<super::super::types::Duration>),
54    Range(Box<super::super::types::Range>),
55    Timing(Box<super::super::types::Timing>),
56    #[default]
57    Invalid,
58}
59#[doc = "A reference to an ActivityDefinition that describes the action to be taken in detail, a MessageDefinition describing a message to be snet, a PlanDefinition that describes a series of actions to be taken, a Questionnaire that should be filled out, a SpecimenDefinition describing a specimen to be collected, or an ObservationDefinition that specifies what observation should be captured."]
60#[derive(Default, Debug, Clone, PartialEq)]
61pub enum PlanDefinitionActionDefinition {
62    Canonical(super::super::types::Canonical),
63    Uri(super::super::types::Uri),
64    #[default]
65    Invalid,
66}
67#[doc = "If a CodeableConcept is present, it indicates the pre-condition for performing the service.  For example \"pain\", \"on flare-up\", etc."]
68#[derive(Default, Debug, Clone, PartialEq)]
69pub enum PlanDefinitionAsNeeded {
70    Boolean(super::super::types::Boolean),
71    CodeableConcept(Box<super::super::types::CodeableConcept>),
72    #[default]
73    Invalid,
74}
75#[doc = "Indicates what should be done and within what timeframe."]
76#[derive(Debug, Clone, PartialEq)]
77pub struct PlanDefinitionGoalTarget {
78    #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
79    pub r#id: Option<std::string::String>,
80    #[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."]
81    pub r#extension: Vec<super::super::types::Extension>,
82    #[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)."]
83    pub r#modifier_extension: Vec<super::super::types::Extension>,
84    #[doc = "The parameter whose value is to be tracked, e.g. body weight, blood pressure, or hemoglobin A1c level."]
85    pub r#measure: Option<Box<super::super::types::CodeableConcept>>,
86    #[doc = "The target value of the measure to be achieved to signify fulfillment of the goal, e.g. 150 pounds or 7.0%, or in the case of pharmaceutical quality - NMT 0.6%, Clear solution, etc. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any value at or above the low value."]
87    pub r#detail: Option<PlanDefinitionGoalTargetDetail>,
88    #[doc = "Indicates the timeframe after the start of the goal in which the goal should be met."]
89    pub r#due: Option<Box<super::super::types::Duration>>,
90}
91#[allow(clippy::derivable_impls)]
92impl Default for PlanDefinitionGoalTarget {
93    fn default() -> Self {
94        Self {
95            r#id: Default::default(),
96            r#extension: Default::default(),
97            r#modifier_extension: Default::default(),
98            r#measure: Default::default(),
99            r#detail: Default::default(),
100            r#due: Default::default(),
101        }
102    }
103}
104#[doc = "A goal describes an expected outcome that activities within the plan are intended to achieve. For example, weight loss, restoring an activity of daily living, obtaining herd immunity via immunization, meeting a process improvement objective, meeting the acceptance criteria for a test as specified by a quality specification, etc."]
105#[derive(Debug, Clone, PartialEq)]
106pub struct PlanDefinitionGoal {
107    #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
108    pub r#id: Option<std::string::String>,
109    #[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."]
110    pub r#extension: Vec<super::super::types::Extension>,
111    #[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)."]
112    pub r#modifier_extension: Vec<super::super::types::Extension>,
113    #[doc = "Indicates a category the goal falls within."]
114    pub r#category: Option<Box<super::super::types::CodeableConcept>>,
115    #[doc = "Human-readable and/or coded description of a specific desired objective of care, such as \"control blood pressure\" or \"negotiate an obstacle course\" or \"dance with child at wedding\"."]
116    pub r#description: Box<super::super::types::CodeableConcept>,
117    #[doc = "Identifies the expected level of importance associated with reaching/sustaining the defined goal."]
118    pub r#priority: Option<Box<super::super::types::CodeableConcept>>,
119    #[doc = "The event after which the goal should begin being pursued."]
120    pub r#start: Option<Box<super::super::types::CodeableConcept>>,
121    #[doc = "Identifies problems, conditions, issues, or concerns the goal is intended to address."]
122    pub r#addresses: Vec<super::super::types::CodeableConcept>,
123    #[doc = "Didactic or other informational resources associated with the goal that provide further supporting information about the goal. Information resources can include inline text commentary and links to web resources."]
124    pub r#documentation: Vec<super::super::types::RelatedArtifact>,
125    #[doc = "Indicates what should be done and within what timeframe."]
126    pub r#target: Vec<PlanDefinitionGoalTarget>,
127}
128#[allow(clippy::derivable_impls)]
129impl Default for PlanDefinitionGoal {
130    fn default() -> Self {
131        Self {
132            r#id: Default::default(),
133            r#extension: Default::default(),
134            r#modifier_extension: Default::default(),
135            r#category: Default::default(),
136            r#description: Box::new(super::super::types::CodeableConcept {
137                id: Some("$invalid".to_string()),
138                ..Default::default()
139            }),
140            r#priority: Default::default(),
141            r#start: Default::default(),
142            r#addresses: Default::default(),
143            r#documentation: Default::default(),
144            r#target: Default::default(),
145        }
146    }
147}
148#[doc = "The characteristics of the candidates that could serve as the actor."]
149#[derive(Debug, Clone, PartialEq)]
150pub struct PlanDefinitionActorOption {
151    #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
152    pub r#id: Option<std::string::String>,
153    #[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."]
154    pub r#extension: Vec<super::super::types::Extension>,
155    #[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)."]
156    pub r#modifier_extension: Vec<super::super::types::Extension>,
157    #[doc = "The type of participant in the action."]
158    pub r#type: Option<super::super::types::Code>,
159    #[doc = "The type of participant in the action."]
160    pub r#type_canonical: Option<super::super::types::Canonical>,
161    #[doc = "The type of participant in the action."]
162    pub r#type_reference: Option<Box<super::super::types::Reference>>,
163    #[doc = "The role the participant should play in performing the described action."]
164    pub r#role: Option<Box<super::super::types::CodeableConcept>>,
165}
166#[allow(clippy::derivable_impls)]
167impl Default for PlanDefinitionActorOption {
168    fn default() -> Self {
169        Self {
170            r#id: Default::default(),
171            r#extension: Default::default(),
172            r#modifier_extension: Default::default(),
173            r#type: Default::default(),
174            r#type_canonical: Default::default(),
175            r#type_reference: Default::default(),
176            r#role: Default::default(),
177        }
178    }
179}
180#[doc = "Actors represent the individuals or groups involved in the execution of the defined set of activities."]
181#[derive(Debug, Clone, PartialEq)]
182pub struct PlanDefinitionActor {
183    #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
184    pub r#id: Option<std::string::String>,
185    #[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."]
186    pub r#extension: Vec<super::super::types::Extension>,
187    #[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)."]
188    pub r#modifier_extension: Vec<super::super::types::Extension>,
189    #[doc = "A descriptive label for the actor."]
190    pub r#title: Option<super::super::types::String>,
191    #[doc = "A description of how the actor fits into the overall actions of the plan definition."]
192    pub r#description: Option<super::super::types::Markdown>,
193    #[doc = "The characteristics of the candidates that could serve as the actor."]
194    pub r#option: Vec<PlanDefinitionActorOption>,
195}
196#[allow(clippy::derivable_impls)]
197impl Default for PlanDefinitionActor {
198    fn default() -> Self {
199        Self {
200            r#id: Default::default(),
201            r#extension: Default::default(),
202            r#modifier_extension: Default::default(),
203            r#title: Default::default(),
204            r#description: Default::default(),
205            r#option: Default::default(),
206        }
207    }
208}
209#[doc = "An expression that describes applicability criteria or start/stop conditions for the action."]
210#[derive(Debug, Clone, PartialEq)]
211pub struct PlanDefinitionActionCondition {
212    #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
213    pub r#id: Option<std::string::String>,
214    #[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."]
215    pub r#extension: Vec<super::super::types::Extension>,
216    #[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)."]
217    pub r#modifier_extension: Vec<super::super::types::Extension>,
218    #[doc = "The kind of condition."]
219    pub r#kind: super::super::types::Code,
220    #[doc = "An expression that returns true or false, indicating whether the condition is satisfied."]
221    pub r#expression: Option<Box<super::super::types::Expression>>,
222}
223#[allow(clippy::derivable_impls)]
224impl Default for PlanDefinitionActionCondition {
225    fn default() -> Self {
226        Self {
227            r#id: Default::default(),
228            r#extension: Default::default(),
229            r#modifier_extension: Default::default(),
230            r#kind: super::super::types::Code {
231                id: Some("$invalid".to_string()),
232                ..Default::default()
233            },
234            r#expression: Default::default(),
235        }
236    }
237}
238#[doc = "Defines input data requirements for the action."]
239#[derive(Debug, Clone, PartialEq)]
240pub struct PlanDefinitionActionInput {
241    #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
242    pub r#id: Option<std::string::String>,
243    #[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."]
244    pub r#extension: Vec<super::super::types::Extension>,
245    #[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)."]
246    pub r#modifier_extension: Vec<super::super::types::Extension>,
247    #[doc = "A human-readable label for the data requirement used to label data flows in BPMN or similar diagrams. Also provides a human readable label when rendering the data requirement that conveys its purpose to human readers."]
248    pub r#title: Option<super::super::types::String>,
249    #[doc = "Defines the data that is to be provided as input to the action."]
250    pub r#requirement: Option<Box<super::super::types::DataRequirement>>,
251    #[doc = "Points to an existing input or output element that provides data to this input."]
252    pub r#related_data: Option<super::super::types::Id>,
253}
254#[allow(clippy::derivable_impls)]
255impl Default for PlanDefinitionActionInput {
256    fn default() -> Self {
257        Self {
258            r#id: Default::default(),
259            r#extension: Default::default(),
260            r#modifier_extension: Default::default(),
261            r#title: Default::default(),
262            r#requirement: Default::default(),
263            r#related_data: Default::default(),
264        }
265    }
266}
267#[doc = "Defines the outputs of the action, if any."]
268#[derive(Debug, Clone, PartialEq)]
269pub struct PlanDefinitionActionOutput {
270    #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
271    pub r#id: Option<std::string::String>,
272    #[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."]
273    pub r#extension: Vec<super::super::types::Extension>,
274    #[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)."]
275    pub r#modifier_extension: Vec<super::super::types::Extension>,
276    #[doc = "A human-readable label for the data requirement used to label data flows in BPMN or similar diagrams. Also provides a human readable label when rendering the data requirement that conveys its purpose to human readers."]
277    pub r#title: Option<super::super::types::String>,
278    #[doc = "Defines the data that results as output from the action."]
279    pub r#requirement: Option<Box<super::super::types::DataRequirement>>,
280    #[doc = "Points to an existing input or output element that is results as output from the action."]
281    pub r#related_data: Option<super::super::types::String>,
282}
283#[allow(clippy::derivable_impls)]
284impl Default for PlanDefinitionActionOutput {
285    fn default() -> Self {
286        Self {
287            r#id: Default::default(),
288            r#extension: Default::default(),
289            r#modifier_extension: Default::default(),
290            r#title: Default::default(),
291            r#requirement: Default::default(),
292            r#related_data: Default::default(),
293        }
294    }
295}
296#[doc = "A relationship to another action such as \"before\" or \"30-60 minutes after start of\"."]
297#[derive(Debug, Clone, PartialEq)]
298pub struct PlanDefinitionActionRelatedAction {
299    #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
300    pub r#id: Option<std::string::String>,
301    #[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."]
302    pub r#extension: Vec<super::super::types::Extension>,
303    #[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)."]
304    pub r#modifier_extension: Vec<super::super::types::Extension>,
305    #[doc = "The element id of the target related action."]
306    pub r#target_id: super::super::types::Id,
307    #[doc = "The relationship of the start of this action to the related action."]
308    pub r#relationship: super::super::types::Code,
309    #[doc = "The relationship of the end of this action to the related action."]
310    pub r#end_relationship: Option<super::super::types::Code>,
311    #[doc = "A duration or range of durations to apply to the relationship. For example, 30-60 minutes before."]
312    pub r#offset: Option<PlanDefinitionActionRelatedActionOffset>,
313}
314#[allow(clippy::derivable_impls)]
315impl Default for PlanDefinitionActionRelatedAction {
316    fn default() -> Self {
317        Self {
318            r#id: Default::default(),
319            r#extension: Default::default(),
320            r#modifier_extension: Default::default(),
321            r#target_id: super::super::types::Id {
322                id: Some("$invalid".to_string()),
323                ..Default::default()
324            },
325            r#relationship: super::super::types::Code {
326                id: Some("$invalid".to_string()),
327                ..Default::default()
328            },
329            r#end_relationship: Default::default(),
330            r#offset: Default::default(),
331        }
332    }
333}
334#[doc = "Indicates who should participate in performing the action described."]
335#[derive(Debug, Clone, PartialEq)]
336pub struct PlanDefinitionActionParticipant {
337    #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
338    pub r#id: Option<std::string::String>,
339    #[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."]
340    pub r#extension: Vec<super::super::types::Extension>,
341    #[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)."]
342    pub r#modifier_extension: Vec<super::super::types::Extension>,
343    #[doc = "A reference to the id element of the actor who will participate in this action."]
344    pub r#actor_id: Option<super::super::types::String>,
345    #[doc = "The type of participant in the action."]
346    pub r#type: Option<super::super::types::Code>,
347    #[doc = "The type of participant in the action."]
348    pub r#type_canonical: Option<super::super::types::Canonical>,
349    #[doc = "The type of participant in the action."]
350    pub r#type_reference: Option<Box<super::super::types::Reference>>,
351    #[doc = "The role the participant should play in performing the described action."]
352    pub r#role: Option<Box<super::super::types::CodeableConcept>>,
353    #[doc = "Indicates how the actor will be involved in the action - author, reviewer, witness, etc."]
354    pub r#function: Option<Box<super::super::types::CodeableConcept>>,
355}
356#[allow(clippy::derivable_impls)]
357impl Default for PlanDefinitionActionParticipant {
358    fn default() -> Self {
359        Self {
360            r#id: Default::default(),
361            r#extension: Default::default(),
362            r#modifier_extension: Default::default(),
363            r#actor_id: Default::default(),
364            r#type: Default::default(),
365            r#type_canonical: Default::default(),
366            r#type_reference: Default::default(),
367            r#role: Default::default(),
368            r#function: Default::default(),
369        }
370    }
371}
372#[doc = "Customizations that should be applied to the statically defined resource. For example, if the dosage of a medication must be computed based on the patient's weight, a customization would be used to specify an expression that calculated the weight, and the path on the resource that would contain the result."]
373#[derive(Debug, Clone, PartialEq)]
374pub struct PlanDefinitionActionDynamicValue {
375    #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
376    pub r#id: Option<std::string::String>,
377    #[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."]
378    pub r#extension: Vec<super::super::types::Extension>,
379    #[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)."]
380    pub r#modifier_extension: Vec<super::super::types::Extension>,
381    #[doc = "The path to the element to be customized. This is the path on the resource that will hold the result of the calculation defined by the expression. The specified path SHALL be a FHIRPath resolvable on the specified target type of the ActivityDefinition, and SHALL consist only of identifiers, constant indexers, and a restricted subset of functions. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers (\\[x\\]) to traverse multiple-cardinality sub-elements (see the [Simple FHIRPath Profile](fhirpath.html#simple) for full details)."]
382    pub r#path: Option<super::super::types::String>,
383    #[doc = "An expression specifying the value of the customized element."]
384    pub r#expression: Option<Box<super::super::types::Expression>>,
385}
386#[allow(clippy::derivable_impls)]
387impl Default for PlanDefinitionActionDynamicValue {
388    fn default() -> Self {
389        Self {
390            r#id: Default::default(),
391            r#extension: Default::default(),
392            r#modifier_extension: Default::default(),
393            r#path: Default::default(),
394            r#expression: Default::default(),
395        }
396    }
397}
398#[doc = "An action or group of actions to be taken as part of the plan. For example, in clinical care, an action would be to prescribe a particular indicated medication, or perform a particular test as appropriate. In pharmaceutical quality, an action would be the test that needs to be performed on a drug product as defined in the quality specification."]
399#[derive(Debug, Clone, PartialEq)]
400pub struct PlanDefinitionAction {
401    #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
402    pub r#id: Option<std::string::String>,
403    #[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."]
404    pub r#extension: Vec<super::super::types::Extension>,
405    #[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)."]
406    pub r#modifier_extension: Vec<super::super::types::Extension>,
407    #[doc = "An identifier that is unique within the PlanDefinition to allow linkage within the realized CarePlan and/or RequestOrchestration."]
408    pub r#link_id: Option<super::super::types::String>,
409    #[doc = "A user-visible prefix for the action. For example a section or item numbering such as 1. or A."]
410    pub r#prefix: Option<super::super::types::String>,
411    #[doc = "The textual description of the action displayed to a user. For example, when the action is a test to be performed, the title would be the title of the test such as Assay by HPLC."]
412    pub r#title: Option<super::super::types::String>,
413    #[doc = "A brief description of the action used to provide a summary to display to the user."]
414    pub r#description: Option<super::super::types::Markdown>,
415    #[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."]
416    pub r#text_equivalent: Option<super::super::types::Markdown>,
417    #[doc = "Indicates how quickly the action should be addressed with respect to other actions."]
418    pub r#priority: Option<super::super::types::Code>,
419    #[doc = "A code that provides a meaning, grouping, or classification for the action or action group. For example, a section may have a LOINC code for the section of a documentation template. In pharmaceutical quality, an action (Test) such as pH could be classified as a physical property."]
420    pub r#code: Option<Box<super::super::types::CodeableConcept>>,
421    #[doc = "A description of why this action is necessary or appropriate."]
422    pub r#reason: Vec<super::super::types::CodeableConcept>,
423    #[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."]
424    pub r#documentation: Vec<super::super::types::RelatedArtifact>,
425    #[doc = "Identifies goals that this action supports. The reference must be to a goal element defined within this plan definition. In pharmaceutical quality, a goal represents acceptance criteria (Goal) for a given action (Test), so the goalId would be the unique id of a defined goal element establishing the acceptance criteria for the action."]
426    pub r#goal_id: Vec<super::super::types::Id>,
427    #[doc = "A code, group definition, or canonical reference that describes the intended subject of the action and its children, if any. Canonical references are allowed to support the definition of protocols for drug and substance quality specifications, and is allowed to reference a MedicinalProductDefinition, SubstanceDefinition, AdministrableProductDefinition, ManufacturedItemDefinition, or PackagedProductDefinition resource."]
428    pub r#subject: Option<PlanDefinitionActionSubject>,
429    #[doc = "A description of when the action should be triggered. When multiple triggers are specified on an action, any triggering event invokes the action."]
430    pub r#trigger: Vec<super::super::types::TriggerDefinition>,
431    #[doc = "An expression that describes applicability criteria or start/stop conditions for the action."]
432    pub r#condition: Vec<PlanDefinitionActionCondition>,
433    #[doc = "Defines input data requirements for the action."]
434    pub r#input: Vec<PlanDefinitionActionInput>,
435    #[doc = "Defines the outputs of the action, if any."]
436    pub r#output: Vec<PlanDefinitionActionOutput>,
437    #[doc = "A relationship to another action such as \"before\" or \"30-60 minutes after start of\"."]
438    pub r#related_action: Vec<PlanDefinitionActionRelatedAction>,
439    #[doc = "An optional value describing when the action should be performed."]
440    pub r#timing: Option<PlanDefinitionActionTiming>,
441    #[doc = "Identifies the facility where the action will occur; e.g. home, hospital, specific clinic, etc."]
442    pub r#location: Option<Box<super::super::types::CodeableReference>>,
443    #[doc = "Indicates who should participate in performing the action described."]
444    pub r#participant: Vec<PlanDefinitionActionParticipant>,
445    #[doc = "The type of action to perform (create, update, remove)."]
446    pub r#type: Option<Box<super::super::types::CodeableConcept>>,
447    #[doc = "Defines the grouping behavior for the action and its children."]
448    pub r#grouping_behavior: Option<super::super::types::Code>,
449    #[doc = "Defines the selection behavior for the action and its children."]
450    pub r#selection_behavior: Option<super::super::types::Code>,
451    #[doc = "Defines the required behavior for the action."]
452    pub r#required_behavior: Option<super::super::types::Code>,
453    #[doc = "Defines whether the action should usually be preselected."]
454    pub r#precheck_behavior: Option<super::super::types::Code>,
455    #[doc = "Defines whether the action can be selected multiple times."]
456    pub r#cardinality_behavior: Option<super::super::types::Code>,
457    #[doc = "A reference to an ActivityDefinition that describes the action to be taken in detail, a MessageDefinition describing a message to be snet, a PlanDefinition that describes a series of actions to be taken, a Questionnaire that should be filled out, a SpecimenDefinition describing a specimen to be collected, or an ObservationDefinition that specifies what observation should be captured."]
458    pub r#definition: Option<PlanDefinitionActionDefinition>,
459    #[doc = "A reference to a StructureMap resource that defines a transform that can be executed to produce the intent resource using the ActivityDefinition instance as the input."]
460    pub r#transform: Option<super::super::types::Canonical>,
461    #[doc = "Customizations that should be applied to the statically defined resource. For example, if the dosage of a medication must be computed based on the patient's weight, a customization would be used to specify an expression that calculated the weight, and the path on the resource that would contain the result."]
462    pub r#dynamic_value: Vec<PlanDefinitionActionDynamicValue>,
463    #[doc = "Sub actions that are contained within the action. The behavior of this action determines the functionality of the sub-actions. For example, a selection behavior of at-most-one indicates that of the sub-actions, at most one may be chosen as part of realizing the action definition."]
464    pub r#action: Vec<PlanDefinitionAction>,
465}
466#[allow(clippy::derivable_impls)]
467impl Default for PlanDefinitionAction {
468    fn default() -> Self {
469        Self {
470            r#id: Default::default(),
471            r#extension: Default::default(),
472            r#modifier_extension: Default::default(),
473            r#link_id: Default::default(),
474            r#prefix: Default::default(),
475            r#title: Default::default(),
476            r#description: Default::default(),
477            r#text_equivalent: Default::default(),
478            r#priority: Default::default(),
479            r#code: Default::default(),
480            r#reason: Default::default(),
481            r#documentation: Default::default(),
482            r#goal_id: Default::default(),
483            r#subject: Default::default(),
484            r#trigger: Default::default(),
485            r#condition: Default::default(),
486            r#input: Default::default(),
487            r#output: Default::default(),
488            r#related_action: Default::default(),
489            r#timing: Default::default(),
490            r#location: Default::default(),
491            r#participant: Default::default(),
492            r#type: Default::default(),
493            r#grouping_behavior: Default::default(),
494            r#selection_behavior: Default::default(),
495            r#required_behavior: Default::default(),
496            r#precheck_behavior: Default::default(),
497            r#cardinality_behavior: Default::default(),
498            r#definition: Default::default(),
499            r#transform: Default::default(),
500            r#dynamic_value: Default::default(),
501            r#action: Default::default(),
502        }
503    }
504}
505#[doc = "This resource allows for the definition of various types of plans as a sharable, consumable, and executable artifact. The resource is general enough to support the description of a broad range of clinical and non-clinical artifacts such as clinical decision support rules, order sets, protocols, and drug quality specifications."]
506#[derive(Debug, Clone, PartialEq)]
507pub struct PlanDefinition {
508    #[doc = "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes."]
509    pub r#id: Option<super::super::types::Id>,
510    #[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."]
511    pub r#meta: Option<Box<super::super::types::Meta>>,
512    #[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."]
513    pub r#implicit_rules: Option<super::super::types::Uri>,
514    #[doc = "The base language in which the resource is written."]
515    pub r#language: Option<super::super::types::Code>,
516    #[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."]
517    pub r#text: Option<Box<super::super::types::Narrative>>,
518    #[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."]
519    pub r#contained: Vec<super::super::Resource>,
520    #[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."]
521    pub r#extension: Vec<super::super::types::Extension>,
522    #[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)."]
523    pub r#modifier_extension: Vec<super::super::types::Extension>,
524    #[doc = "An absolute URI that is used to identify this plan definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which an authoritative instance of this plan definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the plan definition is stored on different servers."]
525    pub r#url: Option<super::super::types::Uri>,
526    #[doc = "A formal identifier that is used to identify this plan definition when it is represented in other formats, or referenced in a specification, model, design or an instance."]
527    pub r#identifier: Vec<super::super::types::Identifier>,
528    #[doc = "The identifier that is used to identify this version of the plan definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the plan definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active artifacts."]
529    pub r#version: Option<super::super::types::String>,
530    #[doc = "Indicates the mechanism used to compare versions to determine which is more current."]
531    pub r#version_algorithm: Option<PlanDefinitionVersionAlgorithm>,
532    #[doc = "A natural language name identifying the plan definition. This name should be usable as an identifier for the module by machine processing applications such as code generation."]
533    pub r#name: Option<super::super::types::String>,
534    #[doc = "A short, descriptive, user-friendly title for the plan definition."]
535    pub r#title: Option<super::super::types::String>,
536    #[doc = "An explanatory or alternate title for the plan definition giving additional information about its content."]
537    pub r#subtitle: Option<super::super::types::String>,
538    #[doc = "A high-level category for the plan definition that distinguishes the kinds of systems that would be interested in the plan definition."]
539    pub r#type: Option<Box<super::super::types::CodeableConcept>>,
540    #[doc = "The status of this plan definition. Enables tracking the life-cycle of the content."]
541    pub r#status: super::super::types::Code,
542    #[doc = "A Boolean value to indicate that this plan definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage."]
543    pub r#experimental: Option<super::super::types::Boolean>,
544    #[doc = "A code, group definition, or canonical reference that describes  or identifies the intended subject of the plan definition. Canonical references are allowed to support the definition of protocols for drug and substance quality specifications, and is allowed to reference a MedicinalProductDefinition, SubstanceDefinition, AdministrableProductDefinition, ManufacturedItemDefinition, or PackagedProductDefinition resource."]
545    pub r#subject: Option<PlanDefinitionSubject>,
546    #[doc = "The date  (and optionally time) when the plan definition was last significantly changed. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the plan definition changes."]
547    pub r#date: Option<super::super::types::DateTime>,
548    #[doc = "The name of the organization or individual responsible for the release and ongoing maintenance of the plan definition."]
549    pub r#publisher: Option<super::super::types::String>,
550    #[doc = "Contact details to assist a user in finding and communicating with the publisher."]
551    pub r#contact: Vec<super::super::types::ContactDetail>,
552    #[doc = "A free text natural language description of the plan definition from a consumer's perspective."]
553    pub r#description: Option<super::super::types::Markdown>,
554    #[doc = "The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate plan definition instances."]
555    pub r#use_context: Vec<super::super::types::UsageContext>,
556    #[doc = "A legal or geographic region in which the plan definition is intended to be used."]
557    pub r#jurisdiction: Vec<super::super::types::CodeableConcept>,
558    #[doc = "Explanation of why this plan definition is needed and why it has been designed as it has."]
559    pub r#purpose: Option<super::super::types::Markdown>,
560    #[doc = "A detailed description of how the plan definition is used from a clinical perspective."]
561    pub r#usage: Option<super::super::types::Markdown>,
562    #[doc = "A copyright statement relating to the plan definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the plan definition."]
563    pub r#copyright: Option<super::super::types::Markdown>,
564    #[doc = "A short string (<50 characters), suitable for inclusion in a page footer that identifies the copyright holder, effective period, and optionally whether rights are resctricted. (e.g. 'All rights reserved', 'Some rights reserved')."]
565    pub r#copyright_label: Option<super::super::types::String>,
566    #[doc = "The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage."]
567    pub r#approval_date: Option<super::super::types::Date>,
568    #[doc = "The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date."]
569    pub r#last_review_date: Option<super::super::types::Date>,
570    #[doc = "The period during which the plan definition content was or is planned to be in active use."]
571    pub r#effective_period: Option<Box<super::super::types::Period>>,
572    #[doc = "Descriptive topics related to the content of the plan definition. Topics provide a high-level categorization of the definition that can be useful for filtering and searching."]
573    pub r#topic: Vec<super::super::types::CodeableConcept>,
574    #[doc = "An individiual or organization primarily involved in the creation and maintenance of the content."]
575    pub r#author: Vec<super::super::types::ContactDetail>,
576    #[doc = "An individual or organization primarily responsible for internal coherence of the content."]
577    pub r#editor: Vec<super::super::types::ContactDetail>,
578    #[doc = "An individual or organization asserted by the publisher to be primarily responsible for review of some aspect of the content."]
579    pub r#reviewer: Vec<super::super::types::ContactDetail>,
580    #[doc = "An individual or organization asserted by the publisher to be responsible for officially endorsing the content for use in some setting."]
581    pub r#endorser: Vec<super::super::types::ContactDetail>,
582    #[doc = "Related artifacts such as additional documentation, justification, or bibliographic references."]
583    pub r#related_artifact: Vec<super::super::types::RelatedArtifact>,
584    #[doc = "A reference to a Library resource containing any formal logic used by the plan definition."]
585    pub r#library: Vec<super::super::types::Canonical>,
586    #[doc = "A goal describes an expected outcome that activities within the plan are intended to achieve. For example, weight loss, restoring an activity of daily living, obtaining herd immunity via immunization, meeting a process improvement objective, meeting the acceptance criteria for a test as specified by a quality specification, etc."]
587    pub r#goal: Vec<PlanDefinitionGoal>,
588    #[doc = "Actors represent the individuals or groups involved in the execution of the defined set of activities."]
589    pub r#actor: Vec<PlanDefinitionActor>,
590    #[doc = "An action or group of actions to be taken as part of the plan. For example, in clinical care, an action would be to prescribe a particular indicated medication, or perform a particular test as appropriate. In pharmaceutical quality, an action would be the test that needs to be performed on a drug product as defined in the quality specification."]
591    pub r#action: Vec<PlanDefinitionAction>,
592    #[doc = "If a CodeableConcept is present, it indicates the pre-condition for performing the service.  For example \"pain\", \"on flare-up\", etc."]
593    pub r#as_needed: Option<PlanDefinitionAsNeeded>,
594}
595#[allow(clippy::derivable_impls)]
596impl Default for PlanDefinition {
597    fn default() -> Self {
598        Self {
599            r#id: Default::default(),
600            r#meta: Default::default(),
601            r#implicit_rules: Default::default(),
602            r#language: Default::default(),
603            r#text: Default::default(),
604            r#contained: Default::default(),
605            r#extension: Default::default(),
606            r#modifier_extension: Default::default(),
607            r#url: Default::default(),
608            r#identifier: Default::default(),
609            r#version: Default::default(),
610            r#version_algorithm: Default::default(),
611            r#name: Default::default(),
612            r#title: Default::default(),
613            r#subtitle: Default::default(),
614            r#type: Default::default(),
615            r#status: super::super::types::Code {
616                id: Some("$invalid".to_string()),
617                ..Default::default()
618            },
619            r#experimental: Default::default(),
620            r#subject: Default::default(),
621            r#date: Default::default(),
622            r#publisher: Default::default(),
623            r#contact: Default::default(),
624            r#description: Default::default(),
625            r#use_context: Default::default(),
626            r#jurisdiction: Default::default(),
627            r#purpose: Default::default(),
628            r#usage: Default::default(),
629            r#copyright: Default::default(),
630            r#copyright_label: Default::default(),
631            r#approval_date: Default::default(),
632            r#last_review_date: Default::default(),
633            r#effective_period: Default::default(),
634            r#topic: Default::default(),
635            r#author: Default::default(),
636            r#editor: Default::default(),
637            r#reviewer: Default::default(),
638            r#endorser: Default::default(),
639            r#related_artifact: Default::default(),
640            r#library: Default::default(),
641            r#goal: Default::default(),
642            r#actor: Default::default(),
643            r#action: Default::default(),
644            r#as_needed: Default::default(),
645        }
646    }
647}