fhirbolt_model/generated/r5/resources/
nutrition_product.rs1#[doc = "The actual characteristic value corresponding to the type."]
3#[derive(Default, Debug, Clone, PartialEq)]
4pub enum NutritionProductCharacteristicValue {
5 CodeableConcept(Box<super::super::types::CodeableConcept>),
6 String(super::super::types::String),
7 Quantity(Box<super::super::types::Quantity>),
8 Base64Binary(super::super::types::Base64Binary),
9 Attachment(Box<super::super::types::Attachment>),
10 Boolean(super::super::types::Boolean),
11 #[default]
12 Invalid,
13}
14#[doc = "The product's nutritional information expressed by the nutrients."]
15#[derive(Debug, Clone, PartialEq)]
16pub struct NutritionProductNutrient {
17 #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
18 pub r#id: Option<std::string::String>,
19 #[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."]
20 pub r#extension: Vec<super::super::types::Extension>,
21 #[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)."]
22 pub r#modifier_extension: Vec<super::super::types::Extension>,
23 #[doc = "The (relevant) nutrients in the product."]
24 pub r#item: Option<Box<super::super::types::CodeableReference>>,
25 #[doc = "The amount of nutrient expressed in one or more units: X per pack / per serving / per dose."]
26 pub r#amount: Vec<super::super::types::Ratio>,
27}
28#[allow(clippy::derivable_impls)]
29impl Default for NutritionProductNutrient {
30 fn default() -> Self {
31 Self {
32 r#id: Default::default(),
33 r#extension: Default::default(),
34 r#modifier_extension: Default::default(),
35 r#item: Default::default(),
36 r#amount: Default::default(),
37 }
38 }
39}
40#[doc = "Ingredients contained in this product."]
41#[derive(Debug, Clone, PartialEq)]
42pub struct NutritionProductIngredient {
43 #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
44 pub r#id: Option<std::string::String>,
45 #[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."]
46 pub r#extension: Vec<super::super::types::Extension>,
47 #[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)."]
48 pub r#modifier_extension: Vec<super::super::types::Extension>,
49 #[doc = "The ingredient contained in the product."]
50 pub r#item: Box<super::super::types::CodeableReference>,
51 #[doc = "The amount of ingredient that is in the product."]
52 pub r#amount: Vec<super::super::types::Ratio>,
53}
54#[allow(clippy::derivable_impls)]
55impl Default for NutritionProductIngredient {
56 fn default() -> Self {
57 Self {
58 r#id: Default::default(),
59 r#extension: Default::default(),
60 r#modifier_extension: Default::default(),
61 r#item: Box::new(super::super::types::CodeableReference {
62 id: Some("$invalid".to_string()),
63 ..Default::default()
64 }),
65 r#amount: Default::default(),
66 }
67 }
68}
69#[doc = "Specifies descriptive properties of the nutrition product."]
70#[derive(Debug, Clone, PartialEq)]
71pub struct NutritionProductCharacteristic {
72 #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
73 pub r#id: Option<std::string::String>,
74 #[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."]
75 pub r#extension: Vec<super::super::types::Extension>,
76 #[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)."]
77 pub r#modifier_extension: Vec<super::super::types::Extension>,
78 #[doc = "A code specifying which characteristic of the product is being described (for example, colour, shape)."]
79 pub r#type: Box<super::super::types::CodeableConcept>,
80 #[doc = "The actual characteristic value corresponding to the type."]
81 pub r#value: NutritionProductCharacteristicValue,
82}
83#[allow(clippy::derivable_impls)]
84impl Default for NutritionProductCharacteristic {
85 fn default() -> Self {
86 Self {
87 r#id: Default::default(),
88 r#extension: Default::default(),
89 r#modifier_extension: Default::default(),
90 r#type: Box::new(super::super::types::CodeableConcept {
91 id: Some("$invalid".to_string()),
92 ..Default::default()
93 }),
94 r#value: Default::default(),
95 }
96 }
97}
98#[doc = "Conveys instance-level information about this product item. One or several physical, countable instances or occurrences of the product."]
99#[derive(Debug, Clone, PartialEq)]
100pub struct NutritionProductInstance {
101 #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
102 pub r#id: Option<std::string::String>,
103 #[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."]
104 pub r#extension: Vec<super::super::types::Extension>,
105 #[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)."]
106 pub r#modifier_extension: Vec<super::super::types::Extension>,
107 #[doc = "The amount of items or instances that the resource considers, for instance when referring to 2 identical units together."]
108 pub r#quantity: Option<Box<super::super::types::Quantity>>,
109 #[doc = "The identifier for the physical instance, typically a serial number or manufacturer number."]
110 pub r#identifier: Vec<super::super::types::Identifier>,
111 #[doc = "The name for the specific product."]
112 pub r#name: Option<super::super::types::String>,
113 #[doc = "The identification of the batch or lot of the product."]
114 pub r#lot_number: Option<super::super::types::String>,
115 #[doc = "The time after which the product is no longer expected to be in proper condition, or its use is not advised or not allowed."]
116 pub r#expiry: Option<super::super::types::DateTime>,
117 #[doc = "The time after which the product is no longer expected to be in proper condition, or its use is not advised or not allowed."]
118 pub r#use_by: Option<super::super::types::DateTime>,
119 #[doc = "An identifier that supports traceability to the event during which material in this product from one or more biological entities was obtained or pooled."]
120 pub r#biological_source_event: Option<Box<super::super::types::Identifier>>,
121}
122#[allow(clippy::derivable_impls)]
123impl Default for NutritionProductInstance {
124 fn default() -> Self {
125 Self {
126 r#id: Default::default(),
127 r#extension: Default::default(),
128 r#modifier_extension: Default::default(),
129 r#quantity: Default::default(),
130 r#identifier: Default::default(),
131 r#name: Default::default(),
132 r#lot_number: Default::default(),
133 r#expiry: Default::default(),
134 r#use_by: Default::default(),
135 r#biological_source_event: Default::default(),
136 }
137 }
138}
139#[doc = "A food or supplement that is consumed by patients."]
140#[derive(Debug, Clone, PartialEq)]
141pub struct NutritionProduct {
142 #[doc = "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes."]
143 pub r#id: Option<super::super::types::Id>,
144 #[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."]
145 pub r#meta: Option<Box<super::super::types::Meta>>,
146 #[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."]
147 pub r#implicit_rules: Option<super::super::types::Uri>,
148 #[doc = "The base language in which the resource is written."]
149 pub r#language: Option<super::super::types::Code>,
150 #[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."]
151 pub r#text: Option<Box<super::super::types::Narrative>>,
152 #[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."]
153 pub r#contained: Vec<super::super::Resource>,
154 #[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."]
155 pub r#extension: Vec<super::super::types::Extension>,
156 #[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)."]
157 pub r#modifier_extension: Vec<super::super::types::Extension>,
158 #[doc = "The code assigned to the product, for example a USDA NDB number, a USDA FDC ID number, or a Langual code."]
159 pub r#code: Option<Box<super::super::types::CodeableConcept>>,
160 #[doc = "The current state of the product."]
161 pub r#status: super::super::types::Code,
162 #[doc = "Nutrition products can have different classifications - according to its nutritional properties, preparation methods, etc."]
163 pub r#category: Vec<super::super::types::CodeableConcept>,
164 #[doc = "The organisation (manufacturer, representative or legal authorization holder) that is responsible for the device."]
165 pub r#manufacturer: Vec<super::super::types::Reference>,
166 #[doc = "The product's nutritional information expressed by the nutrients."]
167 pub r#nutrient: Vec<NutritionProductNutrient>,
168 #[doc = "Ingredients contained in this product."]
169 pub r#ingredient: Vec<NutritionProductIngredient>,
170 #[doc = "Allergens that are known or suspected to be a part of this nutrition product."]
171 pub r#known_allergen: Vec<super::super::types::CodeableReference>,
172 #[doc = "Specifies descriptive properties of the nutrition product."]
173 pub r#characteristic: Vec<NutritionProductCharacteristic>,
174 #[doc = "Conveys instance-level information about this product item. One or several physical, countable instances or occurrences of the product."]
175 pub r#instance: Vec<NutritionProductInstance>,
176 #[doc = "Comments made about the product."]
177 pub r#note: Vec<super::super::types::Annotation>,
178}
179#[allow(clippy::derivable_impls)]
180impl Default for NutritionProduct {
181 fn default() -> Self {
182 Self {
183 r#id: Default::default(),
184 r#meta: Default::default(),
185 r#implicit_rules: Default::default(),
186 r#language: Default::default(),
187 r#text: Default::default(),
188 r#contained: Default::default(),
189 r#extension: Default::default(),
190 r#modifier_extension: Default::default(),
191 r#code: Default::default(),
192 r#status: super::super::types::Code {
193 id: Some("$invalid".to_string()),
194 ..Default::default()
195 },
196 r#category: Default::default(),
197 r#manufacturer: Default::default(),
198 r#nutrient: Default::default(),
199 r#ingredient: Default::default(),
200 r#known_allergen: Default::default(),
201 r#characteristic: Default::default(),
202 r#instance: Default::default(),
203 r#note: Default::default(),
204 }
205 }
206}