fhirbolt_model/generated/r4b/types/
dosage.rs1#[doc = "Indicates whether the Medication is only taken when needed within a specific dosing schedule (Boolean option), or it indicates the precondition for taking the Medication (CodeableConcept)."]
3#[derive(Default, Debug, Clone, PartialEq)]
4pub enum DosageAsNeeded {
5 Boolean(super::super::types::Boolean),
6 CodeableConcept(Box<super::super::types::CodeableConcept>),
7 #[default]
8 Invalid,
9}
10#[doc = "Amount of medication per dose."]
11#[derive(Default, Debug, Clone, PartialEq)]
12pub enum DosageDoseAndRateDose {
13 Range(Box<super::super::types::Range>),
14 Quantity(Box<super::super::types::Quantity>),
15 #[default]
16 Invalid,
17}
18#[doc = "Amount of medication per unit of time."]
19#[derive(Default, Debug, Clone, PartialEq)]
20pub enum DosageDoseAndRateRate {
21 Ratio(Box<super::super::types::Ratio>),
22 Range(Box<super::super::types::Range>),
23 Quantity(Box<super::super::types::Quantity>),
24 #[default]
25 Invalid,
26}
27#[doc = "The amount of medication administered."]
28#[derive(Debug, Clone, PartialEq)]
29pub struct DosageDoseAndRate {
30 #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
31 pub r#id: Option<std::string::String>,
32 #[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."]
33 pub r#extension: Vec<super::super::types::Extension>,
34 #[doc = "The kind of dose or rate specified, for example, ordered or calculated."]
35 pub r#type: Option<Box<super::super::types::CodeableConcept>>,
36 #[doc = "Amount of medication per dose."]
37 pub r#dose: Option<DosageDoseAndRateDose>,
38 #[doc = "Amount of medication per unit of time."]
39 pub r#rate: Option<DosageDoseAndRateRate>,
40}
41#[allow(clippy::derivable_impls)]
42impl Default for DosageDoseAndRate {
43 fn default() -> Self {
44 Self {
45 r#id: Default::default(),
46 r#extension: Default::default(),
47 r#type: Default::default(),
48 r#dose: Default::default(),
49 r#rate: Default::default(),
50 }
51 }
52}
53#[doc = "Base StructureDefinition for Dosage Type: Indicates how the medication is/was taken or should be taken by the patient."]
54#[derive(Debug, Clone, PartialEq)]
55pub struct Dosage {
56 #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
57 pub r#id: Option<std::string::String>,
58 #[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."]
59 pub r#extension: Vec<super::super::types::Extension>,
60 #[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)."]
61 pub r#modifier_extension: Vec<super::super::types::Extension>,
62 #[doc = "Indicates the order in which the dosage instructions should be applied or interpreted."]
63 pub r#sequence: Option<super::super::types::Integer>,
64 #[doc = "Free text dosage instructions e.g. SIG."]
65 pub r#text: Option<super::super::types::String>,
66 #[doc = "Supplemental instructions to the patient on how to take the medication (e.g. \"with meals\" or\"take half to one hour before food\") or warnings for the patient about the medication (e.g. \"may cause drowsiness\" or \"avoid exposure of skin to direct sunlight or sunlamps\")."]
67 pub r#additional_instruction: Vec<super::super::types::CodeableConcept>,
68 #[doc = "Instructions in terms that are understood by the patient or consumer."]
69 pub r#patient_instruction: Option<super::super::types::String>,
70 #[doc = "When medication should be administered."]
71 pub r#timing: Option<Box<super::super::types::Timing>>,
72 #[doc = "Indicates whether the Medication is only taken when needed within a specific dosing schedule (Boolean option), or it indicates the precondition for taking the Medication (CodeableConcept)."]
73 pub r#as_needed: Option<DosageAsNeeded>,
74 #[doc = "Body site to administer to."]
75 pub r#site: Option<Box<super::super::types::CodeableConcept>>,
76 #[doc = "How drug should enter body."]
77 pub r#route: Option<Box<super::super::types::CodeableConcept>>,
78 #[doc = "Technique for administering medication."]
79 pub r#method: Option<Box<super::super::types::CodeableConcept>>,
80 #[doc = "The amount of medication administered."]
81 pub r#dose_and_rate: Vec<DosageDoseAndRate>,
82 #[doc = "Upper limit on medication per unit of time."]
83 pub r#max_dose_per_period: Option<Box<super::super::types::Ratio>>,
84 #[doc = "Upper limit on medication per administration."]
85 pub r#max_dose_per_administration: Option<Box<super::super::types::Quantity>>,
86 #[doc = "Upper limit on medication per lifetime of the patient."]
87 pub r#max_dose_per_lifetime: Option<Box<super::super::types::Quantity>>,
88}
89#[allow(clippy::derivable_impls)]
90impl Default for Dosage {
91 fn default() -> Self {
92 Self {
93 r#id: Default::default(),
94 r#extension: Default::default(),
95 r#modifier_extension: Default::default(),
96 r#sequence: Default::default(),
97 r#text: Default::default(),
98 r#additional_instruction: Default::default(),
99 r#patient_instruction: Default::default(),
100 r#timing: Default::default(),
101 r#as_needed: Default::default(),
102 r#site: Default::default(),
103 r#route: Default::default(),
104 r#method: Default::default(),
105 r#dose_and_rate: Default::default(),
106 r#max_dose_per_period: Default::default(),
107 r#max_dose_per_administration: Default::default(),
108 r#max_dose_per_lifetime: Default::default(),
109 }
110 }
111}