fhirbolt_model/generated/r4/resources/
medication_administration.rs

1// Generated on 2023-05-17 by fhirbolt-codegen v0.10.0
2#[doc = "Identifies the medication that was administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications."]
3#[derive(Default, Debug, Clone, PartialEq)]
4pub enum MedicationAdministrationMedication {
5    CodeableConcept(Box<super::super::types::CodeableConcept>),
6    Reference(Box<super::super::types::Reference>),
7    #[default]
8    Invalid,
9}
10#[doc = "A specific date/time or interval of time during which the administration took place (or did not take place, when the 'notGiven' attribute is true). For many administrations, such as swallowing a tablet the use of dateTime is more appropriate."]
11#[derive(Default, Debug, Clone, PartialEq)]
12pub enum MedicationAdministrationEffective {
13    DateTime(super::super::types::DateTime),
14    Period(Box<super::super::types::Period>),
15    #[default]
16    Invalid,
17}
18#[doc = "Identifies the speed with which the medication was or will be introduced into the patient.  Typically, the rate for an infusion e.g. 100 ml per 1 hour or 100 ml/hr.  May also be expressed as a rate per unit of time, e.g. 500 ml per 2 hours.  Other examples:  200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours."]
19#[derive(Default, Debug, Clone, PartialEq)]
20pub enum MedicationAdministrationDosageRate {
21    Ratio(Box<super::super::types::Ratio>),
22    Quantity(Box<super::super::types::Quantity>),
23    #[default]
24    Invalid,
25}
26#[doc = "Indicates who or what performed the medication administration and how they were involved."]
27#[derive(Debug, Clone, PartialEq)]
28pub struct MedicationAdministrationPerformer {
29    #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
30    pub r#id: Option<std::string::String>,
31    #[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."]
32    pub r#extension: Vec<super::super::types::Extension>,
33    #[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)."]
34    pub r#modifier_extension: Vec<super::super::types::Extension>,
35    #[doc = "Distinguishes the type of involvement of the performer in the medication administration."]
36    pub r#function: Option<Box<super::super::types::CodeableConcept>>,
37    #[doc = "Indicates who or what performed the medication administration."]
38    pub r#actor: Box<super::super::types::Reference>,
39}
40#[allow(clippy::derivable_impls)]
41impl Default for MedicationAdministrationPerformer {
42    fn default() -> Self {
43        Self {
44            r#id: Default::default(),
45            r#extension: Default::default(),
46            r#modifier_extension: Default::default(),
47            r#function: Default::default(),
48            r#actor: Box::new(super::super::types::Reference {
49                id: Some("$invalid".to_string()),
50                ..Default::default()
51            }),
52        }
53    }
54}
55#[doc = "Describes the medication dosage information details e.g. dose, rate, site, route, etc."]
56#[derive(Debug, Clone, PartialEq)]
57pub struct MedicationAdministrationDosage {
58    #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
59    pub r#id: Option<std::string::String>,
60    #[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."]
61    pub r#extension: Vec<super::super::types::Extension>,
62    #[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)."]
63    pub r#modifier_extension: Vec<super::super::types::Extension>,
64    #[doc = "Free text dosage can be used for cases where the dosage administered is too complex to code. When coded dosage is present, the free text dosage may still be present for display to humans.\r\rThe dosage instructions should reflect the dosage of the medication that was administered."]
65    pub r#text: Option<super::super::types::String>,
66    #[doc = "A coded specification of the anatomic site where the medication first entered the body.  For example, \"left arm\"."]
67    pub r#site: Option<Box<super::super::types::CodeableConcept>>,
68    #[doc = "A code specifying the route or physiological path of administration of a therapeutic agent into or onto the patient.  For example, topical, intravenous, etc."]
69    pub r#route: Option<Box<super::super::types::CodeableConcept>>,
70    #[doc = "A coded value indicating the method by which the medication is intended to be or was introduced into or on the body.  This attribute will most often NOT be populated.  It is most commonly used for injections.  For example, Slow Push, Deep IV."]
71    pub r#method: Option<Box<super::super::types::CodeableConcept>>,
72    #[doc = "The amount of the medication given at one administration event.   Use this value when the administration is essentially an instantaneous event such as a swallowing a tablet or giving an injection."]
73    pub r#dose: Option<Box<super::super::types::Quantity>>,
74    #[doc = "Identifies the speed with which the medication was or will be introduced into the patient.  Typically, the rate for an infusion e.g. 100 ml per 1 hour or 100 ml/hr.  May also be expressed as a rate per unit of time, e.g. 500 ml per 2 hours.  Other examples:  200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours."]
75    pub r#rate: Option<MedicationAdministrationDosageRate>,
76}
77#[allow(clippy::derivable_impls)]
78impl Default for MedicationAdministrationDosage {
79    fn default() -> Self {
80        Self {
81            r#id: Default::default(),
82            r#extension: Default::default(),
83            r#modifier_extension: Default::default(),
84            r#text: Default::default(),
85            r#site: Default::default(),
86            r#route: Default::default(),
87            r#method: Default::default(),
88            r#dose: Default::default(),
89            r#rate: Default::default(),
90        }
91    }
92}
93#[doc = "Describes the event of a patient consuming or otherwise being administered a medication.  This may be as simple as swallowing a tablet or it may be a long running infusion.  Related resources tie this event to the authorizing prescription, and the specific encounter between patient and health care practitioner."]
94#[derive(Debug, Clone, PartialEq)]
95pub struct MedicationAdministration {
96    #[doc = "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes."]
97    pub r#id: Option<super::super::types::Id>,
98    #[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."]
99    pub r#meta: Option<Box<super::super::types::Meta>>,
100    #[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."]
101    pub r#implicit_rules: Option<super::super::types::Uri>,
102    #[doc = "The base language in which the resource is written."]
103    pub r#language: Option<super::super::types::Code>,
104    #[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."]
105    pub r#text: Option<Box<super::super::types::Narrative>>,
106    #[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."]
107    pub r#contained: Vec<super::super::Resource>,
108    #[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."]
109    pub r#extension: Vec<super::super::types::Extension>,
110    #[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)."]
111    pub r#modifier_extension: Vec<super::super::types::Extension>,
112    #[doc = "Identifiers associated with this Medication Administration that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate. They are business identifiers assigned to this resource by the performer or other systems and remain constant as the resource is updated and propagates from server to server."]
113    pub r#identifier: Vec<super::super::types::Identifier>,
114    #[doc = "A protocol, guideline, orderset, or other definition that was adhered to in whole or in part by this event."]
115    pub r#instantiates: Vec<super::super::types::Uri>,
116    #[doc = "A larger event of which this particular event is a component or step."]
117    pub r#part_of: Vec<super::super::types::Reference>,
118    #[doc = "Will generally be set to show that the administration has been completed.  For some long running administrations such as infusions, it is possible for an administration to be started but not completed or it may be paused while some other process is under way."]
119    pub r#status: super::super::types::Code,
120    #[doc = "A code indicating why the administration was not performed."]
121    pub r#status_reason: Vec<super::super::types::CodeableConcept>,
122    #[doc = "Indicates where the medication is expected to be consumed or administered."]
123    pub r#category: Option<Box<super::super::types::CodeableConcept>>,
124    #[doc = "Identifies the medication that was administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications."]
125    pub r#medication: MedicationAdministrationMedication,
126    #[doc = "The person or animal or group receiving the medication."]
127    pub r#subject: Box<super::super::types::Reference>,
128    #[doc = "The visit, admission, or other contact between patient and health care provider during which the medication administration was performed."]
129    pub r#context: Option<Box<super::super::types::Reference>>,
130    #[doc = "Additional information (for example, patient height and weight) that supports the administration of the medication."]
131    pub r#supporting_information: Vec<super::super::types::Reference>,
132    #[doc = "A specific date/time or interval of time during which the administration took place (or did not take place, when the 'notGiven' attribute is true). For many administrations, such as swallowing a tablet the use of dateTime is more appropriate."]
133    pub r#effective: MedicationAdministrationEffective,
134    #[doc = "Indicates who or what performed the medication administration and how they were involved."]
135    pub r#performer: Vec<MedicationAdministrationPerformer>,
136    #[doc = "A code indicating why the medication was given."]
137    pub r#reason_code: Vec<super::super::types::CodeableConcept>,
138    #[doc = "Condition or observation that supports why the medication was administered."]
139    pub r#reason_reference: Vec<super::super::types::Reference>,
140    #[doc = "The original request, instruction or authority to perform the administration."]
141    pub r#request: Option<Box<super::super::types::Reference>>,
142    #[doc = "The device used in administering the medication to the patient.  For example, a particular infusion pump."]
143    pub r#device: Vec<super::super::types::Reference>,
144    #[doc = "Extra information about the medication administration that is not conveyed by the other attributes."]
145    pub r#note: Vec<super::super::types::Annotation>,
146    #[doc = "Describes the medication dosage information details e.g. dose, rate, site, route, etc."]
147    pub r#dosage: Option<MedicationAdministrationDosage>,
148    #[doc = "A summary of the events of interest that have occurred, such as when the administration was verified."]
149    pub r#event_history: Vec<super::super::types::Reference>,
150}
151#[allow(clippy::derivable_impls)]
152impl Default for MedicationAdministration {
153    fn default() -> Self {
154        Self {
155            r#id: Default::default(),
156            r#meta: Default::default(),
157            r#implicit_rules: Default::default(),
158            r#language: Default::default(),
159            r#text: Default::default(),
160            r#contained: Default::default(),
161            r#extension: Default::default(),
162            r#modifier_extension: Default::default(),
163            r#identifier: Default::default(),
164            r#instantiates: Default::default(),
165            r#part_of: Default::default(),
166            r#status: super::super::types::Code {
167                id: Some("$invalid".to_string()),
168                ..Default::default()
169            },
170            r#status_reason: Default::default(),
171            r#category: Default::default(),
172            r#medication: Default::default(),
173            r#subject: Box::new(super::super::types::Reference {
174                id: Some("$invalid".to_string()),
175                ..Default::default()
176            }),
177            r#context: Default::default(),
178            r#supporting_information: Default::default(),
179            r#effective: Default::default(),
180            r#performer: Default::default(),
181            r#reason_code: Default::default(),
182            r#reason_reference: Default::default(),
183            r#request: Default::default(),
184            r#device: Default::default(),
185            r#note: Default::default(),
186            r#dosage: Default::default(),
187            r#event_history: Default::default(),
188        }
189    }
190}