fhirbolt_model/generated/r4/resources/
care_plan.rs

1// Generated on 2023-05-17 by fhirbolt-codegen v0.10.0
2#[doc = "The period, timing or frequency upon which the described activity is to occur."]
3#[derive(Default, Debug, Clone, PartialEq)]
4pub enum CarePlanActivityDetailScheduled {
5    Timing(Box<super::super::types::Timing>),
6    Period(Box<super::super::types::Period>),
7    String(super::super::types::String),
8    #[default]
9    Invalid,
10}
11#[doc = "Identifies the food, drug or other product to be consumed or supplied in the activity."]
12#[derive(Default, Debug, Clone, PartialEq)]
13pub enum CarePlanActivityDetailProduct {
14    CodeableConcept(Box<super::super::types::CodeableConcept>),
15    Reference(Box<super::super::types::Reference>),
16    #[default]
17    Invalid,
18}
19#[doc = "A simple summary of a planned activity suitable for a general care plan system (e.g. form driven) that doesn't know about specific resources such as procedure etc."]
20#[derive(Debug, Clone, PartialEq)]
21pub struct CarePlanActivityDetail {
22    #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
23    pub r#id: Option<std::string::String>,
24    #[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."]
25    pub r#extension: Vec<super::super::types::Extension>,
26    #[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)."]
27    pub r#modifier_extension: Vec<super::super::types::Extension>,
28    #[doc = "A description of the kind of resource the in-line definition of a care plan activity is representing.  The CarePlan.activity.detail is an in-line definition when a resource is not referenced using CarePlan.activity.reference.  For example, a MedicationRequest, a ServiceRequest, or a CommunicationRequest."]
29    pub r#kind: Option<super::super::types::Code>,
30    #[doc = "The URL pointing to a FHIR-defined protocol, guideline, questionnaire or other definition that is adhered to in whole or in part by this CarePlan activity."]
31    pub r#instantiates_canonical: Vec<super::super::types::Canonical>,
32    #[doc = "The URL pointing to an externally maintained protocol, guideline, questionnaire or other definition that is adhered to in whole or in part by this CarePlan activity."]
33    pub r#instantiates_uri: Vec<super::super::types::Uri>,
34    #[doc = "Detailed description of the type of planned activity; e.g. what lab test, what procedure, what kind of encounter."]
35    pub r#code: Option<Box<super::super::types::CodeableConcept>>,
36    #[doc = "Provides the rationale that drove the inclusion of this particular activity as part of the plan or the reason why the activity was prohibited."]
37    pub r#reason_code: Vec<super::super::types::CodeableConcept>,
38    #[doc = "Indicates another resource, such as the health condition(s), whose existence justifies this request and drove the inclusion of this particular activity as part of the plan."]
39    pub r#reason_reference: Vec<super::super::types::Reference>,
40    #[doc = "Internal reference that identifies the goals that this activity is intended to contribute towards meeting."]
41    pub r#goal: Vec<super::super::types::Reference>,
42    #[doc = "Identifies what progress is being made for the specific activity."]
43    pub r#status: super::super::types::Code,
44    #[doc = "Provides reason why the activity isn't yet started, is on hold, was cancelled, etc."]
45    pub r#status_reason: Option<Box<super::super::types::CodeableConcept>>,
46    #[doc = "If true, indicates that the described activity is one that must NOT be engaged in when following the plan.  If false, or missing, indicates that the described activity is one that should be engaged in when following the plan."]
47    pub r#do_not_perform: Option<super::super::types::Boolean>,
48    #[doc = "The period, timing or frequency upon which the described activity is to occur."]
49    pub r#scheduled: Option<CarePlanActivityDetailScheduled>,
50    #[doc = "Identifies the facility where the activity will occur; e.g. home, hospital, specific clinic, etc."]
51    pub r#location: Option<Box<super::super::types::Reference>>,
52    #[doc = "Identifies who's expected to be involved in the activity."]
53    pub r#performer: Vec<super::super::types::Reference>,
54    #[doc = "Identifies the food, drug or other product to be consumed or supplied in the activity."]
55    pub r#product: Option<CarePlanActivityDetailProduct>,
56    #[doc = "Identifies the quantity expected to be consumed in a given day."]
57    pub r#daily_amount: Option<Box<super::super::types::Quantity>>,
58    #[doc = "Identifies the quantity expected to be supplied, administered or consumed by the subject."]
59    pub r#quantity: Option<Box<super::super::types::Quantity>>,
60    #[doc = "This provides a textual description of constraints on the intended activity occurrence, including relation to other activities.  It may also include objectives, pre-conditions and end-conditions.  Finally, it may convey specifics about the activity such as body site, method, route, etc."]
61    pub r#description: Option<super::super::types::String>,
62}
63#[allow(clippy::derivable_impls)]
64impl Default for CarePlanActivityDetail {
65    fn default() -> Self {
66        Self {
67            r#id: Default::default(),
68            r#extension: Default::default(),
69            r#modifier_extension: Default::default(),
70            r#kind: Default::default(),
71            r#instantiates_canonical: Default::default(),
72            r#instantiates_uri: Default::default(),
73            r#code: Default::default(),
74            r#reason_code: Default::default(),
75            r#reason_reference: Default::default(),
76            r#goal: Default::default(),
77            r#status: super::super::types::Code {
78                id: Some("$invalid".to_string()),
79                ..Default::default()
80            },
81            r#status_reason: Default::default(),
82            r#do_not_perform: Default::default(),
83            r#scheduled: Default::default(),
84            r#location: Default::default(),
85            r#performer: Default::default(),
86            r#product: Default::default(),
87            r#daily_amount: Default::default(),
88            r#quantity: Default::default(),
89            r#description: Default::default(),
90        }
91    }
92}
93#[doc = "Identifies a planned action to occur as part of the plan.  For example, a medication to be used, lab tests to perform, self-monitoring, education, etc."]
94#[derive(Debug, Clone, PartialEq)]
95pub struct CarePlanActivity {
96    #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
97    pub r#id: Option<std::string::String>,
98    #[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."]
99    pub r#extension: Vec<super::super::types::Extension>,
100    #[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)."]
101    pub r#modifier_extension: Vec<super::super::types::Extension>,
102    #[doc = "Identifies the outcome at the point when the status of the activity is assessed.  For example, the outcome of an education activity could be patient understands (or not)."]
103    pub r#outcome_codeable_concept: Vec<super::super::types::CodeableConcept>,
104    #[doc = "Details of the outcome or action resulting from the activity.  The reference to an \"event\" resource, such as Procedure or Encounter or Observation, is the result/outcome of the activity itself.  The activity can be conveyed using CarePlan.activity.detail OR using the CarePlan.activity.reference (a reference to a “request” resource)."]
105    pub r#outcome_reference: Vec<super::super::types::Reference>,
106    #[doc = "Notes about the adherence/status/progress of the activity."]
107    pub r#progress: Vec<super::super::types::Annotation>,
108    #[doc = "The details of the proposed activity represented in a specific resource."]
109    pub r#reference: Option<Box<super::super::types::Reference>>,
110    #[doc = "A simple summary of a planned activity suitable for a general care plan system (e.g. form driven) that doesn't know about specific resources such as procedure etc."]
111    pub r#detail: Option<CarePlanActivityDetail>,
112}
113#[allow(clippy::derivable_impls)]
114impl Default for CarePlanActivity {
115    fn default() -> Self {
116        Self {
117            r#id: Default::default(),
118            r#extension: Default::default(),
119            r#modifier_extension: Default::default(),
120            r#outcome_codeable_concept: Default::default(),
121            r#outcome_reference: Default::default(),
122            r#progress: Default::default(),
123            r#reference: Default::default(),
124            r#detail: Default::default(),
125        }
126    }
127}
128#[doc = "Describes the intention of how one or more practitioners intend to deliver care for a particular patient, group or community for a period of time, possibly limited to care for a specific condition or set of conditions."]
129#[derive(Debug, Clone, PartialEq)]
130pub struct CarePlan {
131    #[doc = "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes."]
132    pub r#id: Option<super::super::types::Id>,
133    #[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."]
134    pub r#meta: Option<Box<super::super::types::Meta>>,
135    #[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."]
136    pub r#implicit_rules: Option<super::super::types::Uri>,
137    #[doc = "The base language in which the resource is written."]
138    pub r#language: Option<super::super::types::Code>,
139    #[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."]
140    pub r#text: Option<Box<super::super::types::Narrative>>,
141    #[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."]
142    pub r#contained: Vec<super::super::Resource>,
143    #[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."]
144    pub r#extension: Vec<super::super::types::Extension>,
145    #[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)."]
146    pub r#modifier_extension: Vec<super::super::types::Extension>,
147    #[doc = "Business identifiers assigned to this care plan by the performer or other systems which remain constant as the resource is updated and propagates from server to server."]
148    pub r#identifier: Vec<super::super::types::Identifier>,
149    #[doc = "The URL pointing to a FHIR-defined protocol, guideline, questionnaire or other definition that is adhered to in whole or in part by this CarePlan."]
150    pub r#instantiates_canonical: Vec<super::super::types::Canonical>,
151    #[doc = "The URL pointing to an externally maintained protocol, guideline, questionnaire or other definition that is adhered to in whole or in part by this CarePlan."]
152    pub r#instantiates_uri: Vec<super::super::types::Uri>,
153    #[doc = "A care plan that is fulfilled in whole or in part by this care plan."]
154    pub r#based_on: Vec<super::super::types::Reference>,
155    #[doc = "Completed or terminated care plan whose function is taken by this new care plan."]
156    pub r#replaces: Vec<super::super::types::Reference>,
157    #[doc = "A larger care plan of which this particular care plan is a component or step."]
158    pub r#part_of: Vec<super::super::types::Reference>,
159    #[doc = "Indicates whether the plan is currently being acted upon, represents future intentions or is now a historical record."]
160    pub r#status: super::super::types::Code,
161    #[doc = "Indicates the level of authority/intentionality associated with the care plan and where the care plan fits into the workflow chain."]
162    pub r#intent: super::super::types::Code,
163    #[doc = "Identifies what \"kind\" of plan this is to support differentiation between multiple co-existing plans; e.g. \"Home health\", \"psychiatric\", \"asthma\", \"disease management\", \"wellness plan\", etc."]
164    pub r#category: Vec<super::super::types::CodeableConcept>,
165    #[doc = "Human-friendly name for the care plan."]
166    pub r#title: Option<super::super::types::String>,
167    #[doc = "A description of the scope and nature of the plan."]
168    pub r#description: Option<super::super::types::String>,
169    #[doc = "Identifies the patient or group whose intended care is described by the plan."]
170    pub r#subject: Box<super::super::types::Reference>,
171    #[doc = "The Encounter during which this CarePlan was created or to which the creation of this record is tightly associated."]
172    pub r#encounter: Option<Box<super::super::types::Reference>>,
173    #[doc = "Indicates when the plan did (or is intended to) come into effect and end."]
174    pub r#period: Option<Box<super::super::types::Period>>,
175    #[doc = "Represents when this particular CarePlan record was created in the system, which is often a system-generated date."]
176    pub r#created: Option<super::super::types::DateTime>,
177    #[doc = "When populated, the author is responsible for the care plan.  The care plan is attributed to the author."]
178    pub r#author: Option<Box<super::super::types::Reference>>,
179    #[doc = "Identifies the individual(s) or organization who provided the contents of the care plan."]
180    pub r#contributor: Vec<super::super::types::Reference>,
181    #[doc = "Identifies all people and organizations who are expected to be involved in the care envisioned by this plan."]
182    pub r#care_team: Vec<super::super::types::Reference>,
183    #[doc = "Identifies the conditions/problems/concerns/diagnoses/etc. whose management and/or mitigation are handled by this plan."]
184    pub r#addresses: Vec<super::super::types::Reference>,
185    #[doc = "Identifies portions of the patient's record that specifically influenced the formation of the plan.  These might include comorbidities, recent procedures, limitations, recent assessments, etc."]
186    pub r#supporting_info: Vec<super::super::types::Reference>,
187    #[doc = "Describes the intended objective(s) of carrying out the care plan."]
188    pub r#goal: Vec<super::super::types::Reference>,
189    #[doc = "Identifies a planned action to occur as part of the plan.  For example, a medication to be used, lab tests to perform, self-monitoring, education, etc."]
190    pub r#activity: Vec<CarePlanActivity>,
191    #[doc = "General notes about the care plan not covered elsewhere."]
192    pub r#note: Vec<super::super::types::Annotation>,
193}
194#[allow(clippy::derivable_impls)]
195impl Default for CarePlan {
196    fn default() -> Self {
197        Self {
198            r#id: Default::default(),
199            r#meta: Default::default(),
200            r#implicit_rules: Default::default(),
201            r#language: Default::default(),
202            r#text: Default::default(),
203            r#contained: Default::default(),
204            r#extension: Default::default(),
205            r#modifier_extension: Default::default(),
206            r#identifier: Default::default(),
207            r#instantiates_canonical: Default::default(),
208            r#instantiates_uri: Default::default(),
209            r#based_on: Default::default(),
210            r#replaces: Default::default(),
211            r#part_of: Default::default(),
212            r#status: super::super::types::Code {
213                id: Some("$invalid".to_string()),
214                ..Default::default()
215            },
216            r#intent: super::super::types::Code {
217                id: Some("$invalid".to_string()),
218                ..Default::default()
219            },
220            r#category: Default::default(),
221            r#title: Default::default(),
222            r#description: Default::default(),
223            r#subject: Box::new(super::super::types::Reference {
224                id: Some("$invalid".to_string()),
225                ..Default::default()
226            }),
227            r#encounter: Default::default(),
228            r#period: Default::default(),
229            r#created: Default::default(),
230            r#author: Default::default(),
231            r#contributor: Default::default(),
232            r#care_team: Default::default(),
233            r#addresses: Default::default(),
234            r#supporting_info: Default::default(),
235            r#goal: Default::default(),
236            r#activity: Default::default(),
237            r#note: Default::default(),
238        }
239    }
240}