fhirbolt_model/generated/r4b/resources/
ingredient.rs

1// Generated on 2023-05-17 by fhirbolt-codegen v0.10.0
2#[doc = "The quantity of substance in the unit of presentation, or in the volume (or mass) of the single pharmaceutical product or manufactured item. Unit of presentation refers to the quantity that the item occurs in e.g. a strength per tablet size, perhaps 'per 20mg' (the size of the tablet). It is not generally normalized as a unitary unit, which would be 'per mg')."]
3#[derive(Default, Debug, Clone, PartialEq)]
4pub enum IngredientSubstanceStrengthPresentation {
5    Ratio(Box<super::super::types::Ratio>),
6    RatioRange(Box<super::super::types::RatioRange>),
7    #[default]
8    Invalid,
9}
10#[doc = "The strength per unitary volume (or mass)."]
11#[derive(Default, Debug, Clone, PartialEq)]
12pub enum IngredientSubstanceStrengthConcentration {
13    Ratio(Box<super::super::types::Ratio>),
14    RatioRange(Box<super::super::types::RatioRange>),
15    #[default]
16    Invalid,
17}
18#[doc = "Strength expressed in terms of a reference substance."]
19#[derive(Default, Debug, Clone, PartialEq)]
20pub enum IngredientSubstanceStrengthReferenceStrengthStrength {
21    Ratio(Box<super::super::types::Ratio>),
22    RatioRange(Box<super::super::types::RatioRange>),
23    #[default]
24    Invalid,
25}
26#[doc = "The organization(s) that manufacture this ingredient. Can be used to indicate:         1) Organizations we are aware of that manufacture this ingredient         2) Specific Manufacturer(s) currently being used         3) Set of organisations allowed to manufacture this ingredient for this product         Users must be clear on the application of context relevant to their use case."]
27#[derive(Debug, Clone, PartialEq)]
28pub struct IngredientManufacturer {
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 = "The way in which this manufacturer is associated with the ingredient. For example whether it is a possible one (others allowed), or an exclusive authorized one for this ingredient. Note that this is not the manufacturing process role."]
36    pub r#role: Option<super::super::types::Code>,
37    #[doc = "An organization that manufactures this ingredient."]
38    pub r#manufacturer: Box<super::super::types::Reference>,
39}
40#[allow(clippy::derivable_impls)]
41impl Default for IngredientManufacturer {
42    fn default() -> Self {
43        Self {
44            r#id: Default::default(),
45            r#extension: Default::default(),
46            r#modifier_extension: Default::default(),
47            r#role: Default::default(),
48            r#manufacturer: Box::new(super::super::types::Reference {
49                id: Some("$invalid".to_string()),
50                ..Default::default()
51            }),
52        }
53    }
54}
55#[doc = "Strength expressed in terms of a reference substance. For when the ingredient strength is additionally expressed as equivalent to the strength of some other closely related substance (e.g. salt vs. base). Reference strength represents the strength (quantitative composition) of the active moiety of the active substance. There are situations when the active substance and active moiety are different, therefore both a strength and a reference strength are needed."]
56#[derive(Debug, Clone, PartialEq)]
57pub struct IngredientSubstanceStrengthReferenceStrength {
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 = "Relevant reference substance."]
65    pub r#substance: Option<Box<super::super::types::CodeableReference>>,
66    #[doc = "Strength expressed in terms of a reference substance."]
67    pub r#strength: IngredientSubstanceStrengthReferenceStrengthStrength,
68    #[doc = "For when strength is measured at a particular point or distance."]
69    pub r#measurement_point: Option<super::super::types::String>,
70    #[doc = "The country or countries for which the strength range applies."]
71    pub r#country: Vec<super::super::types::CodeableConcept>,
72}
73#[allow(clippy::derivable_impls)]
74impl Default for IngredientSubstanceStrengthReferenceStrength {
75    fn default() -> Self {
76        Self {
77            r#id: Default::default(),
78            r#extension: Default::default(),
79            r#modifier_extension: Default::default(),
80            r#substance: Default::default(),
81            r#strength: Default::default(),
82            r#measurement_point: Default::default(),
83            r#country: Default::default(),
84        }
85    }
86}
87#[doc = "The quantity of substance in the unit of presentation, or in the volume (or mass) of the single pharmaceutical product or manufactured item. The allowed repetitions do not represent different strengths, but are different representations - mathematically equivalent - of a single strength."]
88#[derive(Debug, Clone, PartialEq)]
89pub struct IngredientSubstanceStrength {
90    #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
91    pub r#id: Option<std::string::String>,
92    #[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."]
93    pub r#extension: Vec<super::super::types::Extension>,
94    #[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)."]
95    pub r#modifier_extension: Vec<super::super::types::Extension>,
96    #[doc = "The quantity of substance in the unit of presentation, or in the volume (or mass) of the single pharmaceutical product or manufactured item. Unit of presentation refers to the quantity that the item occurs in e.g. a strength per tablet size, perhaps 'per 20mg' (the size of the tablet). It is not generally normalized as a unitary unit, which would be 'per mg')."]
97    pub r#presentation: Option<IngredientSubstanceStrengthPresentation>,
98    #[doc = "A textual represention of either the whole of the presentation strength or a part of it - with the rest being in Strength.presentation as a ratio."]
99    pub r#text_presentation: Option<super::super::types::String>,
100    #[doc = "The strength per unitary volume (or mass)."]
101    pub r#concentration: Option<IngredientSubstanceStrengthConcentration>,
102    #[doc = "A textual represention of either the whole of the concentration strength or a part of it - with the rest being in Strength.concentration as a ratio."]
103    pub r#text_concentration: Option<super::super::types::String>,
104    #[doc = "For when strength is measured at a particular point or distance. There are products where strength is measured at a particular point. For example, the strength of the ingredient in some inhalers is measured at a particular position relative to the point of aerosolization."]
105    pub r#measurement_point: Option<super::super::types::String>,
106    #[doc = "The country or countries for which the strength range applies."]
107    pub r#country: Vec<super::super::types::CodeableConcept>,
108    #[doc = "Strength expressed in terms of a reference substance. For when the ingredient strength is additionally expressed as equivalent to the strength of some other closely related substance (e.g. salt vs. base). Reference strength represents the strength (quantitative composition) of the active moiety of the active substance. There are situations when the active substance and active moiety are different, therefore both a strength and a reference strength are needed."]
109    pub r#reference_strength: Vec<IngredientSubstanceStrengthReferenceStrength>,
110}
111#[allow(clippy::derivable_impls)]
112impl Default for IngredientSubstanceStrength {
113    fn default() -> Self {
114        Self {
115            r#id: Default::default(),
116            r#extension: Default::default(),
117            r#modifier_extension: Default::default(),
118            r#presentation: Default::default(),
119            r#text_presentation: Default::default(),
120            r#concentration: Default::default(),
121            r#text_concentration: Default::default(),
122            r#measurement_point: Default::default(),
123            r#country: Default::default(),
124            r#reference_strength: Default::default(),
125        }
126    }
127}
128#[doc = "The substance that comprises this ingredient."]
129#[derive(Debug, Clone, PartialEq)]
130pub struct IngredientSubstance {
131    #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
132    pub r#id: Option<std::string::String>,
133    #[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."]
134    pub r#extension: Vec<super::super::types::Extension>,
135    #[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)."]
136    pub r#modifier_extension: Vec<super::super::types::Extension>,
137    #[doc = "A code or full resource that represents the ingredient's substance."]
138    pub r#code: Box<super::super::types::CodeableReference>,
139    #[doc = "The quantity of substance in the unit of presentation, or in the volume (or mass) of the single pharmaceutical product or manufactured item. The allowed repetitions do not represent different strengths, but are different representations - mathematically equivalent - of a single strength."]
140    pub r#strength: Vec<IngredientSubstanceStrength>,
141}
142#[allow(clippy::derivable_impls)]
143impl Default for IngredientSubstance {
144    fn default() -> Self {
145        Self {
146            r#id: Default::default(),
147            r#extension: Default::default(),
148            r#modifier_extension: Default::default(),
149            r#code: Box::new(super::super::types::CodeableReference {
150                id: Some("$invalid".to_string()),
151                ..Default::default()
152            }),
153            r#strength: Default::default(),
154        }
155    }
156}
157#[doc = "An ingredient of a manufactured item or pharmaceutical product."]
158#[derive(Debug, Clone, PartialEq)]
159pub struct Ingredient {
160    #[doc = "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes."]
161    pub r#id: Option<super::super::types::Id>,
162    #[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."]
163    pub r#meta: Option<Box<super::super::types::Meta>>,
164    #[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."]
165    pub r#implicit_rules: Option<super::super::types::Uri>,
166    #[doc = "The base language in which the resource is written."]
167    pub r#language: Option<super::super::types::Code>,
168    #[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."]
169    pub r#text: Option<Box<super::super::types::Narrative>>,
170    #[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."]
171    pub r#contained: Vec<super::super::Resource>,
172    #[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."]
173    pub r#extension: Vec<super::super::types::Extension>,
174    #[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)."]
175    pub r#modifier_extension: Vec<super::super::types::Extension>,
176    #[doc = "The identifier(s) of this Ingredient that are assigned by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate."]
177    pub r#identifier: Option<Box<super::super::types::Identifier>>,
178    #[doc = "The status of this ingredient. Enables tracking the life-cycle of the content."]
179    pub r#status: super::super::types::Code,
180    #[doc = "The product which this ingredient is a constituent part of."]
181    pub r#for: Vec<super::super::types::Reference>,
182    #[doc = "A classification of the ingredient identifying its purpose within the product, e.g. active, inactive."]
183    pub r#role: Box<super::super::types::CodeableConcept>,
184    #[doc = "A classification of the ingredient identifying its precise purpose(s) in the drug product. This extends the Ingredient.role to add more detail. Example: antioxidant, alkalizing agent."]
185    pub r#function: Vec<super::super::types::CodeableConcept>,
186    #[doc = "If the ingredient is a known or suspected allergen. Note that this is a property of the substance, so if a reference to a SubstanceDefinition is used to decribe that (rather than just a code), the allergen information should go there, not here."]
187    pub r#allergenic_indicator: Option<super::super::types::Boolean>,
188    #[doc = "The organization(s) that manufacture this ingredient. Can be used to indicate:         1) Organizations we are aware of that manufacture this ingredient         2) Specific Manufacturer(s) currently being used         3) Set of organisations allowed to manufacture this ingredient for this product         Users must be clear on the application of context relevant to their use case."]
189    pub r#manufacturer: Vec<IngredientManufacturer>,
190    #[doc = "The substance that comprises this ingredient."]
191    pub r#substance: IngredientSubstance,
192}
193#[allow(clippy::derivable_impls)]
194impl Default for Ingredient {
195    fn default() -> Self {
196        Self {
197            r#id: Default::default(),
198            r#meta: Default::default(),
199            r#implicit_rules: Default::default(),
200            r#language: Default::default(),
201            r#text: Default::default(),
202            r#contained: Default::default(),
203            r#extension: Default::default(),
204            r#modifier_extension: Default::default(),
205            r#identifier: Default::default(),
206            r#status: super::super::types::Code {
207                id: Some("$invalid".to_string()),
208                ..Default::default()
209            },
210            r#for: Default::default(),
211            r#role: Box::new(super::super::types::CodeableConcept {
212                id: Some("$invalid".to_string()),
213                ..Default::default()
214            }),
215            r#function: Default::default(),
216            r#allergenic_indicator: Default::default(),
217            r#manufacturer: Default::default(),
218            r#substance: IngredientSubstance {
219                id: Some("$invalid".to_string()),
220                ..Default::default()
221            },
222        }
223    }
224}