1#[doc = "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false')."]
3#[derive(Default, Debug, Clone, PartialEq)]
4pub enum ElementDefinitionDefaultValue {
5 Base64Binary(super::super::types::Base64Binary),
6 Boolean(super::super::types::Boolean),
7 Canonical(super::super::types::Canonical),
8 Code(super::super::types::Code),
9 Date(super::super::types::Date),
10 DateTime(super::super::types::DateTime),
11 Decimal(super::super::types::Decimal),
12 Id(super::super::types::Id),
13 Instant(super::super::types::Instant),
14 Integer(super::super::types::Integer),
15 Markdown(super::super::types::Markdown),
16 Oid(super::super::types::Oid),
17 PositiveInt(super::super::types::PositiveInt),
18 String(super::super::types::String),
19 Time(super::super::types::Time),
20 UnsignedInt(super::super::types::UnsignedInt),
21 Uri(super::super::types::Uri),
22 Url(super::super::types::Url),
23 Uuid(super::super::types::Uuid),
24 Address(Box<super::super::types::Address>),
25 Age(Box<super::super::types::Age>),
26 Annotation(Box<super::super::types::Annotation>),
27 Attachment(Box<super::super::types::Attachment>),
28 CodeableConcept(Box<super::super::types::CodeableConcept>),
29 CodeableReference(Box<super::super::types::CodeableReference>),
30 Coding(Box<super::super::types::Coding>),
31 ContactPoint(Box<super::super::types::ContactPoint>),
32 Count(Box<super::super::types::Count>),
33 Distance(Box<super::super::types::Distance>),
34 Duration(Box<super::super::types::Duration>),
35 HumanName(Box<super::super::types::HumanName>),
36 Identifier(Box<super::super::types::Identifier>),
37 Money(Box<super::super::types::Money>),
38 Period(Box<super::super::types::Period>),
39 Quantity(Box<super::super::types::Quantity>),
40 Range(Box<super::super::types::Range>),
41 Ratio(Box<super::super::types::Ratio>),
42 RatioRange(Box<super::super::types::RatioRange>),
43 Reference(Box<super::super::types::Reference>),
44 SampledData(Box<super::super::types::SampledData>),
45 Signature(Box<super::super::types::Signature>),
46 Timing(Box<super::super::types::Timing>),
47 ContactDetail(Box<super::super::types::ContactDetail>),
48 Contributor(Box<super::super::types::Contributor>),
49 DataRequirement(Box<super::super::types::DataRequirement>),
50 Expression(Box<super::super::types::Expression>),
51 ParameterDefinition(Box<super::super::types::ParameterDefinition>),
52 RelatedArtifact(Box<super::super::types::RelatedArtifact>),
53 TriggerDefinition(Box<super::super::types::TriggerDefinition>),
54 UsageContext(Box<super::super::types::UsageContext>),
55 Dosage(Box<super::super::types::Dosage>),
56 #[default]
57 Invalid,
58}
59#[doc = "Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing."]
60#[derive(Default, Debug, Clone, PartialEq)]
61pub enum ElementDefinitionFixed {
62 Base64Binary(super::super::types::Base64Binary),
63 Boolean(super::super::types::Boolean),
64 Canonical(super::super::types::Canonical),
65 Code(super::super::types::Code),
66 Date(super::super::types::Date),
67 DateTime(super::super::types::DateTime),
68 Decimal(super::super::types::Decimal),
69 Id(super::super::types::Id),
70 Instant(super::super::types::Instant),
71 Integer(super::super::types::Integer),
72 Markdown(super::super::types::Markdown),
73 Oid(super::super::types::Oid),
74 PositiveInt(super::super::types::PositiveInt),
75 String(super::super::types::String),
76 Time(super::super::types::Time),
77 UnsignedInt(super::super::types::UnsignedInt),
78 Uri(super::super::types::Uri),
79 Url(super::super::types::Url),
80 Uuid(super::super::types::Uuid),
81 Address(Box<super::super::types::Address>),
82 Age(Box<super::super::types::Age>),
83 Annotation(Box<super::super::types::Annotation>),
84 Attachment(Box<super::super::types::Attachment>),
85 CodeableConcept(Box<super::super::types::CodeableConcept>),
86 CodeableReference(Box<super::super::types::CodeableReference>),
87 Coding(Box<super::super::types::Coding>),
88 ContactPoint(Box<super::super::types::ContactPoint>),
89 Count(Box<super::super::types::Count>),
90 Distance(Box<super::super::types::Distance>),
91 Duration(Box<super::super::types::Duration>),
92 HumanName(Box<super::super::types::HumanName>),
93 Identifier(Box<super::super::types::Identifier>),
94 Money(Box<super::super::types::Money>),
95 Period(Box<super::super::types::Period>),
96 Quantity(Box<super::super::types::Quantity>),
97 Range(Box<super::super::types::Range>),
98 Ratio(Box<super::super::types::Ratio>),
99 RatioRange(Box<super::super::types::RatioRange>),
100 Reference(Box<super::super::types::Reference>),
101 SampledData(Box<super::super::types::SampledData>),
102 Signature(Box<super::super::types::Signature>),
103 Timing(Box<super::super::types::Timing>),
104 ContactDetail(Box<super::super::types::ContactDetail>),
105 Contributor(Box<super::super::types::Contributor>),
106 DataRequirement(Box<super::super::types::DataRequirement>),
107 Expression(Box<super::super::types::Expression>),
108 ParameterDefinition(Box<super::super::types::ParameterDefinition>),
109 RelatedArtifact(Box<super::super::types::RelatedArtifact>),
110 TriggerDefinition(Box<super::super::types::TriggerDefinition>),
111 UsageContext(Box<super::super::types::UsageContext>),
112 Dosage(Box<super::super::types::Dosage>),
113 #[default]
114 Invalid,
115}
116#[doc = "Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. \n\nWhen pattern\\[x\\] is used to constrain a primitive, it means that the value provided in the pattern\\[x\\] must match the instance value exactly.\n\nWhen pattern\\[x\\] is used to constrain an array, it means that each element provided in the pattern\\[x\\] array must (recursively) match at least one element from the instance array.\n\nWhen pattern\\[x\\] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value."]
117#[derive(Default, Debug, Clone, PartialEq)]
118pub enum ElementDefinitionPattern {
119 Base64Binary(super::super::types::Base64Binary),
120 Boolean(super::super::types::Boolean),
121 Canonical(super::super::types::Canonical),
122 Code(super::super::types::Code),
123 Date(super::super::types::Date),
124 DateTime(super::super::types::DateTime),
125 Decimal(super::super::types::Decimal),
126 Id(super::super::types::Id),
127 Instant(super::super::types::Instant),
128 Integer(super::super::types::Integer),
129 Markdown(super::super::types::Markdown),
130 Oid(super::super::types::Oid),
131 PositiveInt(super::super::types::PositiveInt),
132 String(super::super::types::String),
133 Time(super::super::types::Time),
134 UnsignedInt(super::super::types::UnsignedInt),
135 Uri(super::super::types::Uri),
136 Url(super::super::types::Url),
137 Uuid(super::super::types::Uuid),
138 Address(Box<super::super::types::Address>),
139 Age(Box<super::super::types::Age>),
140 Annotation(Box<super::super::types::Annotation>),
141 Attachment(Box<super::super::types::Attachment>),
142 CodeableConcept(Box<super::super::types::CodeableConcept>),
143 CodeableReference(Box<super::super::types::CodeableReference>),
144 Coding(Box<super::super::types::Coding>),
145 ContactPoint(Box<super::super::types::ContactPoint>),
146 Count(Box<super::super::types::Count>),
147 Distance(Box<super::super::types::Distance>),
148 Duration(Box<super::super::types::Duration>),
149 HumanName(Box<super::super::types::HumanName>),
150 Identifier(Box<super::super::types::Identifier>),
151 Money(Box<super::super::types::Money>),
152 Period(Box<super::super::types::Period>),
153 Quantity(Box<super::super::types::Quantity>),
154 Range(Box<super::super::types::Range>),
155 Ratio(Box<super::super::types::Ratio>),
156 RatioRange(Box<super::super::types::RatioRange>),
157 Reference(Box<super::super::types::Reference>),
158 SampledData(Box<super::super::types::SampledData>),
159 Signature(Box<super::super::types::Signature>),
160 Timing(Box<super::super::types::Timing>),
161 ContactDetail(Box<super::super::types::ContactDetail>),
162 Contributor(Box<super::super::types::Contributor>),
163 DataRequirement(Box<super::super::types::DataRequirement>),
164 Expression(Box<super::super::types::Expression>),
165 ParameterDefinition(Box<super::super::types::ParameterDefinition>),
166 RelatedArtifact(Box<super::super::types::RelatedArtifact>),
167 TriggerDefinition(Box<super::super::types::TriggerDefinition>),
168 UsageContext(Box<super::super::types::UsageContext>),
169 Dosage(Box<super::super::types::Dosage>),
170 #[default]
171 Invalid,
172}
173#[doc = "The actual value for the element, which must be one of the types allowed for this element."]
174#[derive(Default, Debug, Clone, PartialEq)]
175pub enum ElementDefinitionExampleValue {
176 Base64Binary(super::super::types::Base64Binary),
177 Boolean(super::super::types::Boolean),
178 Canonical(super::super::types::Canonical),
179 Code(super::super::types::Code),
180 Date(super::super::types::Date),
181 DateTime(super::super::types::DateTime),
182 Decimal(super::super::types::Decimal),
183 Id(super::super::types::Id),
184 Instant(super::super::types::Instant),
185 Integer(super::super::types::Integer),
186 Markdown(super::super::types::Markdown),
187 Oid(super::super::types::Oid),
188 PositiveInt(super::super::types::PositiveInt),
189 String(super::super::types::String),
190 Time(super::super::types::Time),
191 UnsignedInt(super::super::types::UnsignedInt),
192 Uri(super::super::types::Uri),
193 Url(super::super::types::Url),
194 Uuid(super::super::types::Uuid),
195 Address(Box<super::super::types::Address>),
196 Age(Box<super::super::types::Age>),
197 Annotation(Box<super::super::types::Annotation>),
198 Attachment(Box<super::super::types::Attachment>),
199 CodeableConcept(Box<super::super::types::CodeableConcept>),
200 CodeableReference(Box<super::super::types::CodeableReference>),
201 Coding(Box<super::super::types::Coding>),
202 ContactPoint(Box<super::super::types::ContactPoint>),
203 Count(Box<super::super::types::Count>),
204 Distance(Box<super::super::types::Distance>),
205 Duration(Box<super::super::types::Duration>),
206 HumanName(Box<super::super::types::HumanName>),
207 Identifier(Box<super::super::types::Identifier>),
208 Money(Box<super::super::types::Money>),
209 Period(Box<super::super::types::Period>),
210 Quantity(Box<super::super::types::Quantity>),
211 Range(Box<super::super::types::Range>),
212 Ratio(Box<super::super::types::Ratio>),
213 RatioRange(Box<super::super::types::RatioRange>),
214 Reference(Box<super::super::types::Reference>),
215 SampledData(Box<super::super::types::SampledData>),
216 Signature(Box<super::super::types::Signature>),
217 Timing(Box<super::super::types::Timing>),
218 ContactDetail(Box<super::super::types::ContactDetail>),
219 Contributor(Box<super::super::types::Contributor>),
220 DataRequirement(Box<super::super::types::DataRequirement>),
221 Expression(Box<super::super::types::Expression>),
222 ParameterDefinition(Box<super::super::types::ParameterDefinition>),
223 RelatedArtifact(Box<super::super::types::RelatedArtifact>),
224 TriggerDefinition(Box<super::super::types::TriggerDefinition>),
225 UsageContext(Box<super::super::types::UsageContext>),
226 Dosage(Box<super::super::types::Dosage>),
227 #[default]
228 Invalid,
229}
230#[doc = "The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity."]
231#[derive(Default, Debug, Clone, PartialEq)]
232pub enum ElementDefinitionMinValue {
233 Date(super::super::types::Date),
234 DateTime(super::super::types::DateTime),
235 Instant(super::super::types::Instant),
236 Time(super::super::types::Time),
237 Decimal(super::super::types::Decimal),
238 Integer(super::super::types::Integer),
239 PositiveInt(super::super::types::PositiveInt),
240 UnsignedInt(super::super::types::UnsignedInt),
241 Quantity(Box<super::super::types::Quantity>),
242 #[default]
243 Invalid,
244}
245#[doc = "The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity."]
246#[derive(Default, Debug, Clone, PartialEq)]
247pub enum ElementDefinitionMaxValue {
248 Date(super::super::types::Date),
249 DateTime(super::super::types::DateTime),
250 Instant(super::super::types::Instant),
251 Time(super::super::types::Time),
252 Decimal(super::super::types::Decimal),
253 Integer(super::super::types::Integer),
254 PositiveInt(super::super::types::PositiveInt),
255 UnsignedInt(super::super::types::UnsignedInt),
256 Quantity(Box<super::super::types::Quantity>),
257 #[default]
258 Invalid,
259}
260#[doc = "Designates which child elements are used to discriminate between the slices when processing an instance. If one or more discriminators are provided, the value of the child elements in the instance data SHALL completely distinguish which slice the element in the resource matches based on the allowed values for those elements in each of the slices."]
261#[derive(Debug, Clone, PartialEq)]
262pub struct ElementDefinitionSlicingDiscriminator {
263 #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
264 pub r#id: Option<std::string::String>,
265 #[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."]
266 pub r#extension: Vec<super::super::types::Extension>,
267 #[doc = "How the element value is interpreted when discrimination is evaluated."]
268 pub r#type: super::super::types::Code,
269 #[doc = "A FHIRPath expression, using [the simple subset of FHIRPath](fhirpath.html#simple), that is used to identify the element on which discrimination is based."]
270 pub r#path: super::super::types::String,
271}
272#[allow(clippy::derivable_impls)]
273impl Default for ElementDefinitionSlicingDiscriminator {
274 fn default() -> Self {
275 Self {
276 r#id: Default::default(),
277 r#extension: Default::default(),
278 r#type: super::super::types::Code {
279 id: Some("$invalid".to_string()),
280 ..Default::default()
281 },
282 r#path: super::super::types::String {
283 id: Some("$invalid".to_string()),
284 ..Default::default()
285 },
286 }
287 }
288}
289#[doc = "Indicates that the element is sliced into a set of alternative definitions (i.e. in a structure definition, there are multiple different constraints on a single element in the base resource). Slicing can be used in any resource that has cardinality ..* on the base resource, or any resource with a choice of types. The set of slices is any elements that come after this in the element sequence that have the same path, until a shorter path occurs (the shorter path terminates the set)."]
290#[derive(Debug, Clone, PartialEq)]
291pub struct ElementDefinitionSlicing {
292 #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
293 pub r#id: Option<std::string::String>,
294 #[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."]
295 pub r#extension: Vec<super::super::types::Extension>,
296 #[doc = "Designates which child elements are used to discriminate between the slices when processing an instance. If one or more discriminators are provided, the value of the child elements in the instance data SHALL completely distinguish which slice the element in the resource matches based on the allowed values for those elements in each of the slices."]
297 pub r#discriminator: Vec<ElementDefinitionSlicingDiscriminator>,
298 #[doc = "A human-readable text description of how the slicing works. If there is no discriminator, this is required to be present to provide whatever information is possible about how the slices can be differentiated."]
299 pub r#description: Option<super::super::types::String>,
300 #[doc = "If the matching elements have to occur in the same order as defined in the profile."]
301 pub r#ordered: Option<super::super::types::Boolean>,
302 #[doc = "Whether additional slices are allowed or not. When the slices are ordered, profile authors can also say that additional slices are only allowed at the end."]
303 pub r#rules: super::super::types::Code,
304}
305#[allow(clippy::derivable_impls)]
306impl Default for ElementDefinitionSlicing {
307 fn default() -> Self {
308 Self {
309 r#id: Default::default(),
310 r#extension: Default::default(),
311 r#discriminator: Default::default(),
312 r#description: Default::default(),
313 r#ordered: Default::default(),
314 r#rules: super::super::types::Code {
315 id: Some("$invalid".to_string()),
316 ..Default::default()
317 },
318 }
319 }
320}
321#[doc = "Information about the base definition of the element, provided to make it unnecessary for tools to trace the deviation of the element through the derived and related profiles. When the element definition is not the original definition of an element - i.g. either in a constraint on another type, or for elements from a super type in a snap shot - then the information in provided in the element definition may be different to the base definition. On the original definition of the element, it will be same."]
322#[derive(Debug, Clone, PartialEq)]
323pub struct ElementDefinitionBase {
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 = "The Path that identifies the base element - this matches the ElementDefinition.path for that element. Across FHIR, there is only one base definition of any element - that is, an element definition on a [StructureDefinition](structuredefinition.html#) without a StructureDefinition.base."]
329 pub r#path: super::super::types::String,
330 #[doc = "Minimum cardinality of the base element identified by the path."]
331 pub r#min: super::super::types::UnsignedInt,
332 #[doc = "Maximum cardinality of the base element identified by the path."]
333 pub r#max: super::super::types::String,
334}
335#[allow(clippy::derivable_impls)]
336impl Default for ElementDefinitionBase {
337 fn default() -> Self {
338 Self {
339 r#id: Default::default(),
340 r#extension: Default::default(),
341 r#path: super::super::types::String {
342 id: Some("$invalid".to_string()),
343 ..Default::default()
344 },
345 r#min: super::super::types::UnsignedInt {
346 id: Some("$invalid".to_string()),
347 ..Default::default()
348 },
349 r#max: super::super::types::String {
350 id: Some("$invalid".to_string()),
351 ..Default::default()
352 },
353 }
354 }
355}
356#[doc = "The data type or resource that the value of this element is permitted to be."]
357#[derive(Debug, Clone, PartialEq)]
358pub struct ElementDefinitionType {
359 #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
360 pub r#id: Option<std::string::String>,
361 #[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."]
362 pub r#extension: Vec<super::super::types::Extension>,
363 #[doc = "URL of Data type or Resource that is a(or the) type used for this element. References are URLs that are relative to <http://hl7.org/fhir/StructureDefinition> e.g. \"string\" is a reference to <http://hl7.org/fhir/StructureDefinition/string>. Absolute URLs are only allowed in logical models."]
364 pub r#code: super::super::types::Uri,
365 #[doc = "Identifies a profile structure or implementation Guide that applies to the datatype this element refers to. If any profiles are specified, then the content must conform to at least one of them. The URL can be a local reference - to a contained StructureDefinition, or a reference to another StructureDefinition or Implementation Guide by a canonical URL. When an implementation guide is specified, the type SHALL conform to at least one profile defined in the implementation guide."]
366 pub r#profile: Vec<super::super::types::Canonical>,
367 #[doc = "Used when the type is \"Reference\" or \"canonical\", and identifies a profile structure or implementation Guide that applies to the target of the reference this element refers to. If any profiles are specified, then the content must conform to at least one of them. The URL can be a local reference - to a contained StructureDefinition, or a reference to another StructureDefinition or Implementation Guide by a canonical URL. When an implementation guide is specified, the target resource SHALL conform to at least one profile defined in the implementation guide."]
368 pub r#target_profile: Vec<super::super::types::Canonical>,
369 #[doc = "If the type is a reference to another resource, how the resource is or can be aggregated - is it a contained resource, or a reference, and if the context is a bundle, is it included in the bundle."]
370 pub r#aggregation: Vec<super::super::types::Code>,
371 #[doc = "Whether this reference needs to be version specific or version independent, or whether either can be used."]
372 pub r#versioning: Option<super::super::types::Code>,
373}
374#[allow(clippy::derivable_impls)]
375impl Default for ElementDefinitionType {
376 fn default() -> Self {
377 Self {
378 r#id: Default::default(),
379 r#extension: Default::default(),
380 r#code: super::super::types::Uri {
381 id: Some("$invalid".to_string()),
382 ..Default::default()
383 },
384 r#profile: Default::default(),
385 r#target_profile: Default::default(),
386 r#aggregation: Default::default(),
387 r#versioning: Default::default(),
388 }
389 }
390}
391#[doc = "A sample value for this element demonstrating the type of information that would typically be found in the element."]
392#[derive(Debug, Clone, PartialEq)]
393pub struct ElementDefinitionExample {
394 #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
395 pub r#id: Option<std::string::String>,
396 #[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."]
397 pub r#extension: Vec<super::super::types::Extension>,
398 #[doc = "Describes the purpose of this example amoung the set of examples."]
399 pub r#label: super::super::types::String,
400 #[doc = "The actual value for the element, which must be one of the types allowed for this element."]
401 pub r#value: ElementDefinitionExampleValue,
402}
403#[allow(clippy::derivable_impls)]
404impl Default for ElementDefinitionExample {
405 fn default() -> Self {
406 Self {
407 r#id: Default::default(),
408 r#extension: Default::default(),
409 r#label: super::super::types::String {
410 id: Some("$invalid".to_string()),
411 ..Default::default()
412 },
413 r#value: Default::default(),
414 }
415 }
416}
417#[doc = "Formal constraints such as co-occurrence and other constraints that can be computationally evaluated within the context of the instance."]
418#[derive(Debug, Clone, PartialEq)]
419pub struct ElementDefinitionConstraint {
420 #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
421 pub r#id: Option<std::string::String>,
422 #[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."]
423 pub r#extension: Vec<super::super::types::Extension>,
424 #[doc = "Allows identification of which elements have their cardinalities impacted by the constraint. Will not be referenced for constraints that do not affect cardinality."]
425 pub r#key: super::super::types::Id,
426 #[doc = "Description of why this constraint is necessary or appropriate."]
427 pub r#requirements: Option<super::super::types::String>,
428 #[doc = "Identifies the impact constraint violation has on the conformance of the instance."]
429 pub r#severity: super::super::types::Code,
430 #[doc = "Text that can be used to describe the constraint in messages identifying that the constraint has been violated."]
431 pub r#human: super::super::types::String,
432 #[doc = "A [FHIRPath](https://hl7.org/FHIR/fhirpath.html)) expression of constraint that can be executed to see if this constraint is met."]
433 pub r#expression: Option<super::super::types::String>,
434 #[doc = "An XPath expression of constraint that can be executed to see if this constraint is met."]
435 pub r#xpath: Option<super::super::types::String>,
436 #[doc = "A reference to the original source of the constraint, for traceability purposes."]
437 pub r#source: Option<super::super::types::Canonical>,
438}
439#[allow(clippy::derivable_impls)]
440impl Default for ElementDefinitionConstraint {
441 fn default() -> Self {
442 Self {
443 r#id: Default::default(),
444 r#extension: Default::default(),
445 r#key: super::super::types::Id {
446 id: Some("$invalid".to_string()),
447 ..Default::default()
448 },
449 r#requirements: Default::default(),
450 r#severity: super::super::types::Code {
451 id: Some("$invalid".to_string()),
452 ..Default::default()
453 },
454 r#human: super::super::types::String {
455 id: Some("$invalid".to_string()),
456 ..Default::default()
457 },
458 r#expression: Default::default(),
459 r#xpath: Default::default(),
460 r#source: Default::default(),
461 }
462 }
463}
464#[doc = "Binds to a value set if this element is coded (code, Coding, CodeableConcept, Quantity), or the data types (string, uri)."]
465#[derive(Debug, Clone, PartialEq)]
466pub struct ElementDefinitionBinding {
467 #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
468 pub r#id: Option<std::string::String>,
469 #[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."]
470 pub r#extension: Vec<super::super::types::Extension>,
471 #[doc = "Indicates the degree of conformance expectations associated with this binding - that is, the degree to which the provided value set must be adhered to in the instances."]
472 pub r#strength: super::super::types::Code,
473 #[doc = "Describes the intended use of this particular set of codes."]
474 pub r#description: Option<super::super::types::String>,
475 #[doc = "Refers to the value set that identifies the set of codes the binding refers to."]
476 pub r#value_set: Option<super::super::types::Canonical>,
477}
478#[allow(clippy::derivable_impls)]
479impl Default for ElementDefinitionBinding {
480 fn default() -> Self {
481 Self {
482 r#id: Default::default(),
483 r#extension: Default::default(),
484 r#strength: super::super::types::Code {
485 id: Some("$invalid".to_string()),
486 ..Default::default()
487 },
488 r#description: Default::default(),
489 r#value_set: Default::default(),
490 }
491 }
492}
493#[doc = "Identifies a concept from an external specification that roughly corresponds to this element."]
494#[derive(Debug, Clone, PartialEq)]
495pub struct ElementDefinitionMapping {
496 #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
497 pub r#id: Option<std::string::String>,
498 #[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."]
499 pub r#extension: Vec<super::super::types::Extension>,
500 #[doc = "An internal reference to the definition of a mapping."]
501 pub r#identity: super::super::types::Id,
502 #[doc = "Identifies the computable language in which mapping.map is expressed."]
503 pub r#language: Option<super::super::types::Code>,
504 #[doc = "Expresses what part of the target specification corresponds to this element."]
505 pub r#map: super::super::types::String,
506 #[doc = "Comments that provide information about the mapping or its use."]
507 pub r#comment: Option<super::super::types::String>,
508}
509#[allow(clippy::derivable_impls)]
510impl Default for ElementDefinitionMapping {
511 fn default() -> Self {
512 Self {
513 r#id: Default::default(),
514 r#extension: Default::default(),
515 r#identity: super::super::types::Id {
516 id: Some("$invalid".to_string()),
517 ..Default::default()
518 },
519 r#language: Default::default(),
520 r#map: super::super::types::String {
521 id: Some("$invalid".to_string()),
522 ..Default::default()
523 },
524 r#comment: Default::default(),
525 }
526 }
527}
528#[doc = "Base StructureDefinition for ElementDefinition Type: Captures constraints on each element within the resource, profile, or extension."]
529#[derive(Debug, Clone, PartialEq)]
530pub struct ElementDefinition {
531 #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
532 pub r#id: Option<std::string::String>,
533 #[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."]
534 pub r#extension: Vec<super::super::types::Extension>,
535 #[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)."]
536 pub r#modifier_extension: Vec<super::super::types::Extension>,
537 #[doc = "The path identifies the element and is expressed as a \".\"-separated list of ancestor elements, beginning with the name of the resource or extension."]
538 pub r#path: super::super::types::String,
539 #[doc = "Codes that define how this element is represented in instances, when the deviation varies from the normal case."]
540 pub r#representation: Vec<super::super::types::Code>,
541 #[doc = "The name of this element definition slice, when slicing is working. The name must be a token with no dots or spaces. This is a unique name referring to a specific set of constraints applied to this element, used to provide a name to different slices of the same element."]
542 pub r#slice_name: Option<super::super::types::String>,
543 #[doc = "If true, indicates that this slice definition is constraining a slice definition with the same name in an inherited profile. If false, the slice is not overriding any slice in an inherited profile. If missing, the slice might or might not be overriding a slice in an inherited profile, depending on the sliceName."]
544 pub r#slice_is_constraining: Option<super::super::types::Boolean>,
545 #[doc = "A single preferred label which is the text to display beside the element indicating its meaning or to use to prompt for the element in a user display or form."]
546 pub r#label: Option<super::super::types::String>,
547 #[doc = "A code that has the same meaning as the element in a particular terminology."]
548 pub r#code: Vec<super::super::types::Coding>,
549 #[doc = "Indicates that the element is sliced into a set of alternative definitions (i.e. in a structure definition, there are multiple different constraints on a single element in the base resource). Slicing can be used in any resource that has cardinality ..* on the base resource, or any resource with a choice of types. The set of slices is any elements that come after this in the element sequence that have the same path, until a shorter path occurs (the shorter path terminates the set)."]
550 pub r#slicing: Option<ElementDefinitionSlicing>,
551 #[doc = "A concise description of what this element means (e.g. for use in autogenerated summaries)."]
552 pub r#short: Option<super::super::types::String>,
553 #[doc = "Provides a complete explanation of the meaning of the data element for human readability. For the case of elements derived from existing elements (e.g. constraints), the definition SHALL be consistent with the base definition, but convey the meaning of the element in the particular context of use of the resource. (Note: The text you are reading is specified in ElementDefinition.definition)."]
554 pub r#definition: Option<super::super::types::Markdown>,
555 #[doc = "Explanatory notes and implementation guidance about the data element, including notes about how to use the data properly, exceptions to proper use, etc. (Note: The text you are reading is specified in ElementDefinition.comment)."]
556 pub r#comment: Option<super::super::types::Markdown>,
557 #[doc = "This element is for traceability of why the element was created and why the constraints exist as they do. This may be used to point to source materials or specifications that drove the structure of this element."]
558 pub r#requirements: Option<super::super::types::Markdown>,
559 #[doc = "Identifies additional names by which this element might also be known."]
560 pub r#alias: Vec<super::super::types::String>,
561 #[doc = "The minimum number of times this element SHALL appear in the instance."]
562 pub r#min: Option<super::super::types::UnsignedInt>,
563 #[doc = "The maximum number of times this element is permitted to appear in the instance."]
564 pub r#max: Option<super::super::types::String>,
565 #[doc = "Information about the base definition of the element, provided to make it unnecessary for tools to trace the deviation of the element through the derived and related profiles. When the element definition is not the original definition of an element - i.g. either in a constraint on another type, or for elements from a super type in a snap shot - then the information in provided in the element definition may be different to the base definition. On the original definition of the element, it will be same."]
566 pub r#base: Option<ElementDefinitionBase>,
567 #[doc = "Identifies an element defined elsewhere in the definition whose content rules should be applied to the current element. ContentReferences bring across all the rules that are in the ElementDefinition for the element, including definitions, cardinality constraints, bindings, invariants etc."]
568 pub r#content_reference: Option<super::super::types::Uri>,
569 #[doc = "The data type or resource that the value of this element is permitted to be."]
570 pub r#type: Vec<ElementDefinitionType>,
571 #[doc = "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false')."]
572 pub r#default_value: Option<ElementDefinitionDefaultValue>,
573 #[doc = "The Implicit meaning that is to be understood when this element is missing (e.g. 'when this element is missing, the period is ongoing')."]
574 pub r#meaning_when_missing: Option<super::super::types::Markdown>,
575 #[doc = "If present, indicates that the order of the repeating element has meaning and describes what that meaning is. If absent, it means that the order of the element has no meaning."]
576 pub r#order_meaning: Option<super::super::types::String>,
577 #[doc = "Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing."]
578 pub r#fixed: Option<ElementDefinitionFixed>,
579 #[doc = "Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. \n\nWhen pattern\\[x\\] is used to constrain a primitive, it means that the value provided in the pattern\\[x\\] must match the instance value exactly.\n\nWhen pattern\\[x\\] is used to constrain an array, it means that each element provided in the pattern\\[x\\] array must (recursively) match at least one element from the instance array.\n\nWhen pattern\\[x\\] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value."]
580 pub r#pattern: Option<ElementDefinitionPattern>,
581 #[doc = "A sample value for this element demonstrating the type of information that would typically be found in the element."]
582 pub r#example: Vec<ElementDefinitionExample>,
583 #[doc = "The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity."]
584 pub r#min_value: Option<ElementDefinitionMinValue>,
585 #[doc = "The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity."]
586 pub r#max_value: Option<ElementDefinitionMaxValue>,
587 #[doc = "Indicates the maximum length in characters that is permitted to be present in conformant instances and which is expected to be supported by conformant consumers that support the element."]
588 pub r#max_length: Option<super::super::types::Integer>,
589 #[doc = "A reference to an invariant that may make additional statements about the cardinality or value in the instance."]
590 pub r#condition: Vec<super::super::types::Id>,
591 #[doc = "Formal constraints such as co-occurrence and other constraints that can be computationally evaluated within the context of the instance."]
592 pub r#constraint: Vec<ElementDefinitionConstraint>,
593 #[doc = "If true, implementations that produce or consume resources SHALL provide \"support\" for the element in some meaningful way. If false, the element may be ignored and not supported. If false, whether to populate or use the data element in any way is at the discretion of the implementation."]
594 pub r#must_support: Option<super::super::types::Boolean>,
595 #[doc = "If true, the value of this element affects the interpretation of the element or resource that contains it, and the value of the element cannot be ignored. Typically, this is used for status, negation and qualification codes. The effect of this is that the element cannot be ignored by systems: they SHALL either recognize the element and process it, and/or a pre-determination has been made that it is not relevant to their particular system."]
596 pub r#is_modifier: Option<super::super::types::Boolean>,
597 #[doc = "Explains how that element affects the interpretation of the resource or element that contains it."]
598 pub r#is_modifier_reason: Option<super::super::types::String>,
599 #[doc = "Whether the element should be included if a client requests a search with the parameter _summary=true."]
600 pub r#is_summary: Option<super::super::types::Boolean>,
601 #[doc = "Binds to a value set if this element is coded (code, Coding, CodeableConcept, Quantity), or the data types (string, uri)."]
602 pub r#binding: Option<ElementDefinitionBinding>,
603 #[doc = "Identifies a concept from an external specification that roughly corresponds to this element."]
604 pub r#mapping: Vec<ElementDefinitionMapping>,
605}
606#[allow(clippy::derivable_impls)]
607impl Default for ElementDefinition {
608 fn default() -> Self {
609 Self {
610 r#id: Default::default(),
611 r#extension: Default::default(),
612 r#modifier_extension: Default::default(),
613 r#path: super::super::types::String {
614 id: Some("$invalid".to_string()),
615 ..Default::default()
616 },
617 r#representation: Default::default(),
618 r#slice_name: Default::default(),
619 r#slice_is_constraining: Default::default(),
620 r#label: Default::default(),
621 r#code: Default::default(),
622 r#slicing: Default::default(),
623 r#short: Default::default(),
624 r#definition: Default::default(),
625 r#comment: Default::default(),
626 r#requirements: Default::default(),
627 r#alias: Default::default(),
628 r#min: Default::default(),
629 r#max: Default::default(),
630 r#base: Default::default(),
631 r#content_reference: Default::default(),
632 r#type: Default::default(),
633 r#default_value: Default::default(),
634 r#meaning_when_missing: Default::default(),
635 r#order_meaning: Default::default(),
636 r#fixed: Default::default(),
637 r#pattern: Default::default(),
638 r#example: Default::default(),
639 r#min_value: Default::default(),
640 r#max_value: Default::default(),
641 r#max_length: Default::default(),
642 r#condition: Default::default(),
643 r#constraint: Default::default(),
644 r#must_support: Default::default(),
645 r#is_modifier: Default::default(),
646 r#is_modifier_reason: Default::default(),
647 r#is_summary: Default::default(),
648 r#binding: Default::default(),
649 r#mapping: Default::default(),
650 }
651 }
652}