fhirbolt_model/generated/r4/resources/
substance_specification.rs

1// Generated on 2023-05-17 by fhirbolt-codegen v0.10.0
2#[doc = "Quantitative value for this moiety."]
3#[derive(Default, Debug, Clone, PartialEq)]
4pub enum SubstanceSpecificationMoietyAmount {
5    Quantity(Box<super::super::types::Quantity>),
6    String(super::super::types::String),
7    #[default]
8    Invalid,
9}
10#[doc = "A substance upon which a defining property depends (e.g. for solubility: in water, in alcohol)."]
11#[derive(Default, Debug, Clone, PartialEq)]
12pub enum SubstanceSpecificationPropertyDefiningSubstance {
13    Reference(Box<super::super::types::Reference>),
14    CodeableConcept(Box<super::super::types::CodeableConcept>),
15    #[default]
16    Invalid,
17}
18#[doc = "Quantitative value for this property."]
19#[derive(Default, Debug, Clone, PartialEq)]
20pub enum SubstanceSpecificationPropertyAmount {
21    Quantity(Box<super::super::types::Quantity>),
22    String(super::super::types::String),
23    #[default]
24    Invalid,
25}
26#[doc = "A pointer to another substance, as a resource or just a representational code."]
27#[derive(Default, Debug, Clone, PartialEq)]
28pub enum SubstanceSpecificationRelationshipSubstance {
29    Reference(Box<super::super::types::Reference>),
30    CodeableConcept(Box<super::super::types::CodeableConcept>),
31    #[default]
32    Invalid,
33}
34#[doc = "A numeric factor for the relationship, for instance to express that the salt of a substance has some percentage of the active substance in relation to some other."]
35#[derive(Default, Debug, Clone, PartialEq)]
36pub enum SubstanceSpecificationRelationshipAmount {
37    Quantity(Box<super::super::types::Quantity>),
38    Range(Box<super::super::types::Range>),
39    Ratio(Box<super::super::types::Ratio>),
40    String(super::super::types::String),
41    #[default]
42    Invalid,
43}
44#[doc = "Moiety, for structural modifications."]
45#[derive(Debug, Clone, PartialEq)]
46pub struct SubstanceSpecificationMoiety {
47    #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
48    pub r#id: Option<std::string::String>,
49    #[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."]
50    pub r#extension: Vec<super::super::types::Extension>,
51    #[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)."]
52    pub r#modifier_extension: Vec<super::super::types::Extension>,
53    #[doc = "Role that the moiety is playing."]
54    pub r#role: Option<Box<super::super::types::CodeableConcept>>,
55    #[doc = "Identifier by which this moiety substance is known."]
56    pub r#identifier: Option<Box<super::super::types::Identifier>>,
57    #[doc = "Textual name for this moiety substance."]
58    pub r#name: Option<super::super::types::String>,
59    #[doc = "Stereochemistry type."]
60    pub r#stereochemistry: Option<Box<super::super::types::CodeableConcept>>,
61    #[doc = "Optical activity type."]
62    pub r#optical_activity: Option<Box<super::super::types::CodeableConcept>>,
63    #[doc = "Molecular formula."]
64    pub r#molecular_formula: Option<super::super::types::String>,
65    #[doc = "Quantitative value for this moiety."]
66    pub r#amount: Option<SubstanceSpecificationMoietyAmount>,
67}
68#[allow(clippy::derivable_impls)]
69impl Default for SubstanceSpecificationMoiety {
70    fn default() -> Self {
71        Self {
72            r#id: Default::default(),
73            r#extension: Default::default(),
74            r#modifier_extension: Default::default(),
75            r#role: Default::default(),
76            r#identifier: Default::default(),
77            r#name: Default::default(),
78            r#stereochemistry: Default::default(),
79            r#optical_activity: Default::default(),
80            r#molecular_formula: Default::default(),
81            r#amount: Default::default(),
82        }
83    }
84}
85#[doc = "General specifications for this substance, including how it is related to other substances."]
86#[derive(Debug, Clone, PartialEq)]
87pub struct SubstanceSpecificationProperty {
88    #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
89    pub r#id: Option<std::string::String>,
90    #[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."]
91    pub r#extension: Vec<super::super::types::Extension>,
92    #[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)."]
93    pub r#modifier_extension: Vec<super::super::types::Extension>,
94    #[doc = "A category for this property, e.g. Physical, Chemical, Enzymatic."]
95    pub r#category: Option<Box<super::super::types::CodeableConcept>>,
96    #[doc = "Property type e.g. viscosity, pH, isoelectric point."]
97    pub r#code: Option<Box<super::super::types::CodeableConcept>>,
98    #[doc = "Parameters that were used in the measurement of a property (e.g. for viscosity: measured at 20C with a pH of 7.1)."]
99    pub r#parameters: Option<super::super::types::String>,
100    #[doc = "A substance upon which a defining property depends (e.g. for solubility: in water, in alcohol)."]
101    pub r#defining_substance: Option<SubstanceSpecificationPropertyDefiningSubstance>,
102    #[doc = "Quantitative value for this property."]
103    pub r#amount: Option<SubstanceSpecificationPropertyAmount>,
104}
105#[allow(clippy::derivable_impls)]
106impl Default for SubstanceSpecificationProperty {
107    fn default() -> Self {
108        Self {
109            r#id: Default::default(),
110            r#extension: Default::default(),
111            r#modifier_extension: Default::default(),
112            r#category: Default::default(),
113            r#code: Default::default(),
114            r#parameters: Default::default(),
115            r#defining_substance: Default::default(),
116            r#amount: Default::default(),
117        }
118    }
119}
120#[doc = "The molecular weight or weight range (for proteins, polymers or nucleic acids)."]
121#[derive(Debug, Clone, PartialEq)]
122pub struct SubstanceSpecificationStructureIsotopeMolecularWeight {
123    #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
124    pub r#id: Option<std::string::String>,
125    #[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."]
126    pub r#extension: Vec<super::super::types::Extension>,
127    #[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)."]
128    pub r#modifier_extension: Vec<super::super::types::Extension>,
129    #[doc = "The method by which the molecular weight was determined."]
130    pub r#method: Option<Box<super::super::types::CodeableConcept>>,
131    #[doc = "Type of molecular weight such as exact, average (also known as. number average), weight average."]
132    pub r#type: Option<Box<super::super::types::CodeableConcept>>,
133    #[doc = "Used to capture quantitative values for a variety of elements. If only limits are given, the arithmetic mean would be the average. If only a single definite value for a given element is given, it would be captured in this field."]
134    pub r#amount: Option<Box<super::super::types::Quantity>>,
135}
136#[allow(clippy::derivable_impls)]
137impl Default for SubstanceSpecificationStructureIsotopeMolecularWeight {
138    fn default() -> Self {
139        Self {
140            r#id: Default::default(),
141            r#extension: Default::default(),
142            r#modifier_extension: Default::default(),
143            r#method: Default::default(),
144            r#type: Default::default(),
145            r#amount: Default::default(),
146        }
147    }
148}
149#[doc = "Applicable for single substances that contain a radionuclide or a non-natural isotopic ratio."]
150#[derive(Debug, Clone, PartialEq)]
151pub struct SubstanceSpecificationStructureIsotope {
152    #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
153    pub r#id: Option<std::string::String>,
154    #[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."]
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 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)."]
157    pub r#modifier_extension: Vec<super::super::types::Extension>,
158    #[doc = "Substance identifier for each non-natural or radioisotope."]
159    pub r#identifier: Option<Box<super::super::types::Identifier>>,
160    #[doc = "Substance name for each non-natural or radioisotope."]
161    pub r#name: Option<Box<super::super::types::CodeableConcept>>,
162    #[doc = "The type of isotopic substitution present in a single substance."]
163    pub r#substitution: Option<Box<super::super::types::CodeableConcept>>,
164    #[doc = "Half life - for a non-natural nuclide."]
165    pub r#half_life: Option<Box<super::super::types::Quantity>>,
166    #[doc = "The molecular weight or weight range (for proteins, polymers or nucleic acids)."]
167    pub r#molecular_weight: Option<SubstanceSpecificationStructureIsotopeMolecularWeight>,
168}
169#[allow(clippy::derivable_impls)]
170impl Default for SubstanceSpecificationStructureIsotope {
171    fn default() -> Self {
172        Self {
173            r#id: Default::default(),
174            r#extension: Default::default(),
175            r#modifier_extension: Default::default(),
176            r#identifier: Default::default(),
177            r#name: Default::default(),
178            r#substitution: Default::default(),
179            r#half_life: Default::default(),
180            r#molecular_weight: Default::default(),
181        }
182    }
183}
184#[doc = "Molecular structural representation."]
185#[derive(Debug, Clone, PartialEq)]
186pub struct SubstanceSpecificationStructureRepresentation {
187    #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
188    pub r#id: Option<std::string::String>,
189    #[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."]
190    pub r#extension: Vec<super::super::types::Extension>,
191    #[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)."]
192    pub r#modifier_extension: Vec<super::super::types::Extension>,
193    #[doc = "The type of structure (e.g. Full, Partial, Representative)."]
194    pub r#type: Option<Box<super::super::types::CodeableConcept>>,
195    #[doc = "The structural representation as text string in a format e.g. InChI, SMILES, MOLFILE, CDX."]
196    pub r#representation: Option<super::super::types::String>,
197    #[doc = "An attached file with the structural representation."]
198    pub r#attachment: Option<Box<super::super::types::Attachment>>,
199}
200#[allow(clippy::derivable_impls)]
201impl Default for SubstanceSpecificationStructureRepresentation {
202    fn default() -> Self {
203        Self {
204            r#id: Default::default(),
205            r#extension: Default::default(),
206            r#modifier_extension: Default::default(),
207            r#type: Default::default(),
208            r#representation: Default::default(),
209            r#attachment: Default::default(),
210        }
211    }
212}
213#[doc = "Structural information."]
214#[derive(Debug, Clone, PartialEq)]
215pub struct SubstanceSpecificationStructure {
216    #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
217    pub r#id: Option<std::string::String>,
218    #[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."]
219    pub r#extension: Vec<super::super::types::Extension>,
220    #[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)."]
221    pub r#modifier_extension: Vec<super::super::types::Extension>,
222    #[doc = "Stereochemistry type."]
223    pub r#stereochemistry: Option<Box<super::super::types::CodeableConcept>>,
224    #[doc = "Optical activity type."]
225    pub r#optical_activity: Option<Box<super::super::types::CodeableConcept>>,
226    #[doc = "Molecular formula."]
227    pub r#molecular_formula: Option<super::super::types::String>,
228    #[doc = "Specified per moiety according to the Hill system, i.e. first C, then H, then alphabetical, each moiety separated by a dot."]
229    pub r#molecular_formula_by_moiety: Option<super::super::types::String>,
230    #[doc = "Applicable for single substances that contain a radionuclide or a non-natural isotopic ratio."]
231    pub r#isotope: Vec<SubstanceSpecificationStructureIsotope>,
232    #[doc = "The molecular weight or weight range (for proteins, polymers or nucleic acids)."]
233    pub r#molecular_weight: Option<SubstanceSpecificationStructureIsotopeMolecularWeight>,
234    #[doc = "Supporting literature."]
235    pub r#source: Vec<super::super::types::Reference>,
236    #[doc = "Molecular structural representation."]
237    pub r#representation: Vec<SubstanceSpecificationStructureRepresentation>,
238}
239#[allow(clippy::derivable_impls)]
240impl Default for SubstanceSpecificationStructure {
241    fn default() -> Self {
242        Self {
243            r#id: Default::default(),
244            r#extension: Default::default(),
245            r#modifier_extension: Default::default(),
246            r#stereochemistry: Default::default(),
247            r#optical_activity: Default::default(),
248            r#molecular_formula: Default::default(),
249            r#molecular_formula_by_moiety: Default::default(),
250            r#isotope: Default::default(),
251            r#molecular_weight: Default::default(),
252            r#source: Default::default(),
253            r#representation: Default::default(),
254        }
255    }
256}
257#[doc = "Codes associated with the substance."]
258#[derive(Debug, Clone, PartialEq)]
259pub struct SubstanceSpecificationCode {
260    #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
261    pub r#id: Option<std::string::String>,
262    #[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."]
263    pub r#extension: Vec<super::super::types::Extension>,
264    #[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)."]
265    pub r#modifier_extension: Vec<super::super::types::Extension>,
266    #[doc = "The specific code."]
267    pub r#code: Option<Box<super::super::types::CodeableConcept>>,
268    #[doc = "Status of the code assignment."]
269    pub r#status: Option<Box<super::super::types::CodeableConcept>>,
270    #[doc = "The date at which the code status is changed as part of the terminology maintenance."]
271    pub r#status_date: Option<super::super::types::DateTime>,
272    #[doc = "Any comment can be provided in this field, if necessary."]
273    pub r#comment: Option<super::super::types::String>,
274    #[doc = "Supporting literature."]
275    pub r#source: Vec<super::super::types::Reference>,
276}
277#[allow(clippy::derivable_impls)]
278impl Default for SubstanceSpecificationCode {
279    fn default() -> Self {
280        Self {
281            r#id: Default::default(),
282            r#extension: Default::default(),
283            r#modifier_extension: Default::default(),
284            r#code: Default::default(),
285            r#status: Default::default(),
286            r#status_date: Default::default(),
287            r#comment: Default::default(),
288            r#source: Default::default(),
289        }
290    }
291}
292#[doc = "Details of the official nature of this name."]
293#[derive(Debug, Clone, PartialEq)]
294pub struct SubstanceSpecificationNameOfficial {
295    #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
296    pub r#id: Option<std::string::String>,
297    #[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."]
298    pub r#extension: Vec<super::super::types::Extension>,
299    #[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)."]
300    pub r#modifier_extension: Vec<super::super::types::Extension>,
301    #[doc = "Which authority uses this official name."]
302    pub r#authority: Option<Box<super::super::types::CodeableConcept>>,
303    #[doc = "The status of the official name."]
304    pub r#status: Option<Box<super::super::types::CodeableConcept>>,
305    #[doc = "Date of official name change."]
306    pub r#date: Option<super::super::types::DateTime>,
307}
308#[allow(clippy::derivable_impls)]
309impl Default for SubstanceSpecificationNameOfficial {
310    fn default() -> Self {
311        Self {
312            r#id: Default::default(),
313            r#extension: Default::default(),
314            r#modifier_extension: Default::default(),
315            r#authority: Default::default(),
316            r#status: Default::default(),
317            r#date: Default::default(),
318        }
319    }
320}
321#[doc = "Names applicable to this substance."]
322#[derive(Debug, Clone, PartialEq)]
323pub struct SubstanceSpecificationName {
324    #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
325    pub r#id: Option<std::string::String>,
326    #[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."]
327    pub r#extension: Vec<super::super::types::Extension>,
328    #[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)."]
329    pub r#modifier_extension: Vec<super::super::types::Extension>,
330    #[doc = "The actual name."]
331    pub r#name: super::super::types::String,
332    #[doc = "Name type."]
333    pub r#type: Option<Box<super::super::types::CodeableConcept>>,
334    #[doc = "The status of the name."]
335    pub r#status: Option<Box<super::super::types::CodeableConcept>>,
336    #[doc = "If this is the preferred name for this substance."]
337    pub r#preferred: Option<super::super::types::Boolean>,
338    #[doc = "Language of the name."]
339    pub r#language: Vec<super::super::types::CodeableConcept>,
340    #[doc = "The use context of this name for example if there is a different name a drug active ingredient as opposed to a food colour additive."]
341    pub r#domain: Vec<super::super::types::CodeableConcept>,
342    #[doc = "The jurisdiction where this name applies."]
343    pub r#jurisdiction: Vec<super::super::types::CodeableConcept>,
344    #[doc = "A synonym of this name."]
345    pub r#synonym: Vec<SubstanceSpecificationName>,
346    #[doc = "A translation for this name."]
347    pub r#translation: Vec<SubstanceSpecificationName>,
348    #[doc = "Details of the official nature of this name."]
349    pub r#official: Vec<SubstanceSpecificationNameOfficial>,
350    #[doc = "Supporting literature."]
351    pub r#source: Vec<super::super::types::Reference>,
352}
353#[allow(clippy::derivable_impls)]
354impl Default for SubstanceSpecificationName {
355    fn default() -> Self {
356        Self {
357            r#id: Default::default(),
358            r#extension: Default::default(),
359            r#modifier_extension: Default::default(),
360            r#name: super::super::types::String {
361                id: Some("$invalid".to_string()),
362                ..Default::default()
363            },
364            r#type: Default::default(),
365            r#status: Default::default(),
366            r#preferred: Default::default(),
367            r#language: Default::default(),
368            r#domain: Default::default(),
369            r#jurisdiction: Default::default(),
370            r#synonym: Default::default(),
371            r#translation: Default::default(),
372            r#official: Default::default(),
373            r#source: Default::default(),
374        }
375    }
376}
377#[doc = "A link between this substance and another, with details of the relationship."]
378#[derive(Debug, Clone, PartialEq)]
379pub struct SubstanceSpecificationRelationship {
380    #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
381    pub r#id: Option<std::string::String>,
382    #[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."]
383    pub r#extension: Vec<super::super::types::Extension>,
384    #[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)."]
385    pub r#modifier_extension: Vec<super::super::types::Extension>,
386    #[doc = "A pointer to another substance, as a resource or just a representational code."]
387    pub r#substance: Option<SubstanceSpecificationRelationshipSubstance>,
388    #[doc = "For example \"salt to parent\", \"active moiety\", \"starting material\"."]
389    pub r#relationship: Option<Box<super::super::types::CodeableConcept>>,
390    #[doc = "For example where an enzyme strongly bonds with a particular substance, this is a defining relationship for that enzyme, out of several possible substance relationships."]
391    pub r#is_defining: Option<super::super::types::Boolean>,
392    #[doc = "A numeric factor for the relationship, for instance to express that the salt of a substance has some percentage of the active substance in relation to some other."]
393    pub r#amount: Option<SubstanceSpecificationRelationshipAmount>,
394    #[doc = "For use when the numeric."]
395    pub r#amount_ratio_low_limit: Option<Box<super::super::types::Ratio>>,
396    #[doc = "An operator for the amount, for example \"average\", \"approximately\", \"less than\"."]
397    pub r#amount_type: Option<Box<super::super::types::CodeableConcept>>,
398    #[doc = "Supporting literature."]
399    pub r#source: Vec<super::super::types::Reference>,
400}
401#[allow(clippy::derivable_impls)]
402impl Default for SubstanceSpecificationRelationship {
403    fn default() -> Self {
404        Self {
405            r#id: Default::default(),
406            r#extension: Default::default(),
407            r#modifier_extension: Default::default(),
408            r#substance: Default::default(),
409            r#relationship: Default::default(),
410            r#is_defining: Default::default(),
411            r#amount: Default::default(),
412            r#amount_ratio_low_limit: Default::default(),
413            r#amount_type: Default::default(),
414            r#source: Default::default(),
415        }
416    }
417}
418#[doc = "The detailed description of a substance, typically at a level beyond what is used for prescribing."]
419#[derive(Debug, Clone, PartialEq)]
420pub struct SubstanceSpecification {
421    #[doc = "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes."]
422    pub r#id: Option<super::super::types::Id>,
423    #[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."]
424    pub r#meta: Option<Box<super::super::types::Meta>>,
425    #[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."]
426    pub r#implicit_rules: Option<super::super::types::Uri>,
427    #[doc = "The base language in which the resource is written."]
428    pub r#language: Option<super::super::types::Code>,
429    #[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."]
430    pub r#text: Option<Box<super::super::types::Narrative>>,
431    #[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."]
432    pub r#contained: Vec<super::super::Resource>,
433    #[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."]
434    pub r#extension: Vec<super::super::types::Extension>,
435    #[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)."]
436    pub r#modifier_extension: Vec<super::super::types::Extension>,
437    #[doc = "Identifier by which this substance is known."]
438    pub r#identifier: Option<Box<super::super::types::Identifier>>,
439    #[doc = "High level categorization, e.g. polymer or nucleic acid."]
440    pub r#type: Option<Box<super::super::types::CodeableConcept>>,
441    #[doc = "Status of substance within the catalogue e.g. approved."]
442    pub r#status: Option<Box<super::super::types::CodeableConcept>>,
443    #[doc = "If the substance applies to only human or veterinary use."]
444    pub r#domain: Option<Box<super::super::types::CodeableConcept>>,
445    #[doc = "Textual description of the substance."]
446    pub r#description: Option<super::super::types::String>,
447    #[doc = "Supporting literature."]
448    pub r#source: Vec<super::super::types::Reference>,
449    #[doc = "Textual comment about this record of a substance."]
450    pub r#comment: Option<super::super::types::String>,
451    #[doc = "Moiety, for structural modifications."]
452    pub r#moiety: Vec<SubstanceSpecificationMoiety>,
453    #[doc = "General specifications for this substance, including how it is related to other substances."]
454    pub r#property: Vec<SubstanceSpecificationProperty>,
455    #[doc = "General information detailing this substance."]
456    pub r#reference_information: Option<Box<super::super::types::Reference>>,
457    #[doc = "Structural information."]
458    pub r#structure: Option<SubstanceSpecificationStructure>,
459    #[doc = "Codes associated with the substance."]
460    pub r#code: Vec<SubstanceSpecificationCode>,
461    #[doc = "Names applicable to this substance."]
462    pub r#name: Vec<SubstanceSpecificationName>,
463    #[doc = "The molecular weight or weight range (for proteins, polymers or nucleic acids)."]
464    pub r#molecular_weight: Vec<SubstanceSpecificationStructureIsotopeMolecularWeight>,
465    #[doc = "A link between this substance and another, with details of the relationship."]
466    pub r#relationship: Vec<SubstanceSpecificationRelationship>,
467    #[doc = "Data items specific to nucleic acids."]
468    pub r#nucleic_acid: Option<Box<super::super::types::Reference>>,
469    #[doc = "Data items specific to polymers."]
470    pub r#polymer: Option<Box<super::super::types::Reference>>,
471    #[doc = "Data items specific to proteins."]
472    pub r#protein: Option<Box<super::super::types::Reference>>,
473    #[doc = "Material or taxonomic/anatomical source for the substance."]
474    pub r#source_material: Option<Box<super::super::types::Reference>>,
475}
476#[allow(clippy::derivable_impls)]
477impl Default for SubstanceSpecification {
478    fn default() -> Self {
479        Self {
480            r#id: Default::default(),
481            r#meta: Default::default(),
482            r#implicit_rules: Default::default(),
483            r#language: Default::default(),
484            r#text: Default::default(),
485            r#contained: Default::default(),
486            r#extension: Default::default(),
487            r#modifier_extension: Default::default(),
488            r#identifier: Default::default(),
489            r#type: Default::default(),
490            r#status: Default::default(),
491            r#domain: Default::default(),
492            r#description: Default::default(),
493            r#source: Default::default(),
494            r#comment: Default::default(),
495            r#moiety: Default::default(),
496            r#property: Default::default(),
497            r#reference_information: Default::default(),
498            r#structure: Default::default(),
499            r#code: Default::default(),
500            r#name: Default::default(),
501            r#molecular_weight: Default::default(),
502            r#relationship: Default::default(),
503            r#nucleic_acid: Default::default(),
504            r#polymer: Default::default(),
505            r#protein: Default::default(),
506            r#source_material: Default::default(),
507        }
508    }
509}