1#![allow(non_snake_case)]
2#[doc = r" DO NOT EDIT THIS FILE. It is auto-generated by the FHIR Rust code generator."]
3use self::super::resources::Resource;
4use self::super::terminology;
5use haste_fhir_serialization_json;
6use haste_reflect::{derive::Reflect, MetaValue};
7#[derive(
8 Clone,
9 Reflect,
10 Debug,
11 Default,
12 haste_fhir_serialization_json :: derive :: FHIRSerdeSerialize,
13 haste_fhir_serialization_json :: derive :: FHIRSerdeDeserialize,
14)]
15#[fhir_type = "Element"]
16#[fhir_serialize_type = "complex"]
17#[doc = "Base definition for all elements in a resource."]
18pub struct Element {
19 #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
20 pub id: Option<String>,
21 #[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."]
22 pub extension: Option<Vec<Box<Extension>>>,
23}
24#[derive(
25 Clone,
26 Reflect,
27 Debug,
28 Default,
29 haste_fhir_serialization_json :: derive :: FHIRSerdeSerialize,
30 haste_fhir_serialization_json :: derive :: FHIRSerdeDeserialize,
31)]
32#[fhir_type = "BackboneElement"]
33#[fhir_serialize_type = "complex"]
34#[doc = "Base definition for all elements that are defined inside a resource - but not those in a data type."]
35pub struct BackboneElement {
36 #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
37 pub id: Option<String>,
38 #[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."]
39 pub extension: Option<Vec<Box<Extension>>>,
40 #[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)."]
41 pub modifierExtension: Option<Vec<Box<Extension>>>,
42}
43#[derive(
44 Clone,
45 Reflect,
46 Debug,
47 Default,
48 haste_fhir_serialization_json :: derive :: FHIRSerdeSerialize,
49 haste_fhir_serialization_json :: derive :: FHIRSerdeDeserialize,
50)]
51#[fhir_type = "base64Binary"]
52#[fhir_serialize_type = "primitive"]
53#[doc = "A stream of bytes"]
54pub struct FHIRBase64Binary {
55 #[doc = "unique id for the element within a resource (for internal references)"]
56 pub id: Option<String>,
57 #[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."]
58 pub extension: Option<Vec<Box<Extension>>>,
59 #[doc = "The actual value"]
60 pub value: Option<String>,
61}
62impl FHIRBase64Binary {
63 pub fn extension_mut(&mut self) -> &mut Option<Vec<Box<Extension>>> {
64 &mut self.extension
65 }
66 pub fn id_mut(&mut self) -> &mut Option<String> {
67 &mut self.id
68 }
69}
70impl From<String> for FHIRBase64Binary {
71 fn from(value: String) -> Self {
72 let mut instance = Self::default();
73 instance.value = Some(value);
74 instance
75 }
76}
77#[derive(
78 Clone,
79 Reflect,
80 Debug,
81 Default,
82 haste_fhir_serialization_json :: derive :: FHIRSerdeSerialize,
83 haste_fhir_serialization_json :: derive :: FHIRSerdeDeserialize,
84)]
85#[fhir_type = "boolean"]
86#[fhir_serialize_type = "primitive"]
87#[doc = "Value of \"true\" or \"false\""]
88pub struct FHIRBoolean {
89 #[doc = "unique id for the element within a resource (for internal references)"]
90 pub id: Option<String>,
91 #[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."]
92 pub extension: Option<Vec<Box<Extension>>>,
93 #[doc = "The actual value"]
94 pub value: Option<bool>,
95}
96impl FHIRBoolean {
97 pub fn extension_mut(&mut self) -> &mut Option<Vec<Box<Extension>>> {
98 &mut self.extension
99 }
100 pub fn id_mut(&mut self) -> &mut Option<String> {
101 &mut self.id
102 }
103}
104impl From<bool> for FHIRBoolean {
105 fn from(value: bool) -> Self {
106 let mut instance = Self::default();
107 instance.value = Some(value);
108 instance
109 }
110}
111#[derive(
112 Clone,
113 Reflect,
114 Debug,
115 Default,
116 haste_fhir_serialization_json :: derive :: FHIRSerdeSerialize,
117 haste_fhir_serialization_json :: derive :: FHIRSerdeDeserialize,
118)]
119#[fhir_type = "canonical"]
120#[fhir_serialize_type = "primitive"]
121#[doc = "A URI that is a reference to a canonical URL on a FHIR resource"]
122pub struct FHIRCanonical {
123 #[doc = "unique id for the element within a resource (for internal references)"]
124 pub id: Option<String>,
125 #[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."]
126 pub extension: Option<Vec<Box<Extension>>>,
127 #[doc = "Primitive value for canonical"]
128 pub value: Option<String>,
129}
130impl FHIRCanonical {
131 pub fn extension_mut(&mut self) -> &mut Option<Vec<Box<Extension>>> {
132 &mut self.extension
133 }
134 pub fn id_mut(&mut self) -> &mut Option<String> {
135 &mut self.id
136 }
137}
138impl From<String> for FHIRCanonical {
139 fn from(value: String) -> Self {
140 let mut instance = Self::default();
141 instance.value = Some(value);
142 instance
143 }
144}
145#[derive(
146 Clone,
147 Reflect,
148 Debug,
149 Default,
150 haste_fhir_serialization_json :: derive :: FHIRSerdeSerialize,
151 haste_fhir_serialization_json :: derive :: FHIRSerdeDeserialize,
152)]
153#[fhir_type = "code"]
154#[fhir_serialize_type = "primitive"]
155#[doc = "A string which has at least one character and no leading or trailing whitespace and where there is no whitespace other than single spaces in the contents"]
156pub struct FHIRCode {
157 #[doc = "unique id for the element within a resource (for internal references)"]
158 pub id: Option<String>,
159 #[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."]
160 pub extension: Option<Vec<Box<Extension>>>,
161 #[doc = "Primitive value for code"]
162 pub value: Option<String>,
163}
164impl FHIRCode {
165 pub fn extension_mut(&mut self) -> &mut Option<Vec<Box<Extension>>> {
166 &mut self.extension
167 }
168 pub fn id_mut(&mut self) -> &mut Option<String> {
169 &mut self.id
170 }
171}
172impl From<String> for FHIRCode {
173 fn from(value: String) -> Self {
174 let mut instance = Self::default();
175 instance.value = Some(value);
176 instance
177 }
178}
179#[derive(
180 Clone,
181 Reflect,
182 Debug,
183 Default,
184 haste_fhir_serialization_json :: derive :: FHIRSerdeSerialize,
185 haste_fhir_serialization_json :: derive :: FHIRSerdeDeserialize,
186)]
187#[fhir_type = "date"]
188#[fhir_serialize_type = "primitive"]
189#[doc = "A date or partial date (e.g. just year or year + month). There is no time zone. The format is a union of the schema types gYear, gYearMonth and date. Dates SHALL be valid dates."]
190pub struct FHIRDate {
191 #[doc = "unique id for the element within a resource (for internal references)"]
192 pub id: Option<String>,
193 #[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."]
194 pub extension: Option<Vec<Box<Extension>>>,
195 #[doc = "The actual value"]
196 pub value: Option<crate::r4::datetime::Date>,
197}
198impl FHIRDate {
199 pub fn extension_mut(&mut self) -> &mut Option<Vec<Box<Extension>>> {
200 &mut self.extension
201 }
202 pub fn id_mut(&mut self) -> &mut Option<String> {
203 &mut self.id
204 }
205}
206impl From<crate::r4::datetime::Date> for FHIRDate {
207 fn from(value: crate::r4::datetime::Date) -> Self {
208 let mut instance = Self::default();
209 instance.value = Some(value);
210 instance
211 }
212}
213#[derive(
214 Clone,
215 Reflect,
216 Debug,
217 Default,
218 haste_fhir_serialization_json :: derive :: FHIRSerdeSerialize,
219 haste_fhir_serialization_json :: derive :: FHIRSerdeDeserialize,
220)]
221#[fhir_type = "dateTime"]
222#[fhir_serialize_type = "primitive"]
223#[doc = "A date, date-time or partial date (e.g. just year or year + month). If hours and minutes are specified, a time zone SHALL be populated. The format is a union of the schema types gYear, gYearMonth, date and dateTime. Seconds must be provided due to schema type constraints but may be zero-filled and may be ignored. Dates SHALL be valid dates."]
224pub struct FHIRDateTime {
225 #[doc = "unique id for the element within a resource (for internal references)"]
226 pub id: Option<String>,
227 #[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."]
228 pub extension: Option<Vec<Box<Extension>>>,
229 #[doc = "The actual value"]
230 pub value: Option<crate::r4::datetime::DateTime>,
231}
232impl FHIRDateTime {
233 pub fn extension_mut(&mut self) -> &mut Option<Vec<Box<Extension>>> {
234 &mut self.extension
235 }
236 pub fn id_mut(&mut self) -> &mut Option<String> {
237 &mut self.id
238 }
239}
240impl From<crate::r4::datetime::DateTime> for FHIRDateTime {
241 fn from(value: crate::r4::datetime::DateTime) -> Self {
242 let mut instance = Self::default();
243 instance.value = Some(value);
244 instance
245 }
246}
247#[derive(
248 Clone,
249 Reflect,
250 Debug,
251 Default,
252 haste_fhir_serialization_json :: derive :: FHIRSerdeSerialize,
253 haste_fhir_serialization_json :: derive :: FHIRSerdeDeserialize,
254)]
255#[fhir_type = "decimal"]
256#[fhir_serialize_type = "primitive"]
257#[doc = "A rational number with implicit precision"]
258pub struct FHIRDecimal {
259 #[doc = "unique id for the element within a resource (for internal references)"]
260 pub id: Option<String>,
261 #[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."]
262 pub extension: Option<Vec<Box<Extension>>>,
263 #[doc = "The actual value"]
264 pub value: Option<f64>,
265}
266impl FHIRDecimal {
267 pub fn extension_mut(&mut self) -> &mut Option<Vec<Box<Extension>>> {
268 &mut self.extension
269 }
270 pub fn id_mut(&mut self) -> &mut Option<String> {
271 &mut self.id
272 }
273}
274impl From<f64> for FHIRDecimal {
275 fn from(value: f64) -> Self {
276 let mut instance = Self::default();
277 instance.value = Some(value);
278 instance
279 }
280}
281#[derive(
282 Clone,
283 Reflect,
284 Debug,
285 Default,
286 haste_fhir_serialization_json :: derive :: FHIRSerdeSerialize,
287 haste_fhir_serialization_json :: derive :: FHIRSerdeDeserialize,
288)]
289#[fhir_type = "id"]
290#[fhir_serialize_type = "primitive"]
291#[doc = "Any combination of letters, numerals, \"-\" and \".\", with a length limit of 64 characters. (This might be an integer, an unprefixed OID, UUID or any other identifier pattern that meets these constraints.) Ids are case-insensitive."]
292pub struct FHIRId {
293 #[doc = "unique id for the element within a resource (for internal references)"]
294 pub id: Option<String>,
295 #[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."]
296 pub extension: Option<Vec<Box<Extension>>>,
297 #[doc = "Primitive value for id"]
298 pub value: Option<String>,
299}
300impl FHIRId {
301 pub fn extension_mut(&mut self) -> &mut Option<Vec<Box<Extension>>> {
302 &mut self.extension
303 }
304 pub fn id_mut(&mut self) -> &mut Option<String> {
305 &mut self.id
306 }
307}
308impl From<String> for FHIRId {
309 fn from(value: String) -> Self {
310 let mut instance = Self::default();
311 instance.value = Some(value);
312 instance
313 }
314}
315#[derive(
316 Clone,
317 Reflect,
318 Debug,
319 Default,
320 haste_fhir_serialization_json :: derive :: FHIRSerdeSerialize,
321 haste_fhir_serialization_json :: derive :: FHIRSerdeDeserialize,
322)]
323#[fhir_type = "instant"]
324#[fhir_serialize_type = "primitive"]
325#[doc = "An instant in time - known at least to the second"]
326pub struct FHIRInstant {
327 #[doc = "unique id for the element within a resource (for internal references)"]
328 pub id: Option<String>,
329 #[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."]
330 pub extension: Option<Vec<Box<Extension>>>,
331 #[doc = "The actual value"]
332 pub value: Option<crate::r4::datetime::Instant>,
333}
334impl FHIRInstant {
335 pub fn extension_mut(&mut self) -> &mut Option<Vec<Box<Extension>>> {
336 &mut self.extension
337 }
338 pub fn id_mut(&mut self) -> &mut Option<String> {
339 &mut self.id
340 }
341}
342impl From<crate::r4::datetime::Instant> for FHIRInstant {
343 fn from(value: crate::r4::datetime::Instant) -> Self {
344 let mut instance = Self::default();
345 instance.value = Some(value);
346 instance
347 }
348}
349#[derive(
350 Clone,
351 Reflect,
352 Debug,
353 Default,
354 haste_fhir_serialization_json :: derive :: FHIRSerdeSerialize,
355 haste_fhir_serialization_json :: derive :: FHIRSerdeDeserialize,
356)]
357#[fhir_type = "integer"]
358#[fhir_serialize_type = "primitive"]
359#[doc = "A whole number"]
360pub struct FHIRInteger {
361 #[doc = "unique id for the element within a resource (for internal references)"]
362 pub id: Option<String>,
363 #[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."]
364 pub extension: Option<Vec<Box<Extension>>>,
365 #[doc = "The actual value"]
366 pub value: Option<i64>,
367}
368impl FHIRInteger {
369 pub fn extension_mut(&mut self) -> &mut Option<Vec<Box<Extension>>> {
370 &mut self.extension
371 }
372 pub fn id_mut(&mut self) -> &mut Option<String> {
373 &mut self.id
374 }
375}
376impl From<i64> for FHIRInteger {
377 fn from(value: i64) -> Self {
378 let mut instance = Self::default();
379 instance.value = Some(value);
380 instance
381 }
382}
383#[derive(
384 Clone,
385 Reflect,
386 Debug,
387 Default,
388 haste_fhir_serialization_json :: derive :: FHIRSerdeSerialize,
389 haste_fhir_serialization_json :: derive :: FHIRSerdeDeserialize,
390)]
391#[fhir_type = "markdown"]
392#[fhir_serialize_type = "primitive"]
393#[doc = "A string that may contain Github Flavored Markdown syntax for optional processing by a mark down presentation engine"]
394pub struct FHIRMarkdown {
395 #[doc = "unique id for the element within a resource (for internal references)"]
396 pub id: Option<String>,
397 #[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."]
398 pub extension: Option<Vec<Box<Extension>>>,
399 #[doc = "Primitive value for markdown"]
400 pub value: Option<String>,
401}
402impl FHIRMarkdown {
403 pub fn extension_mut(&mut self) -> &mut Option<Vec<Box<Extension>>> {
404 &mut self.extension
405 }
406 pub fn id_mut(&mut self) -> &mut Option<String> {
407 &mut self.id
408 }
409}
410impl From<String> for FHIRMarkdown {
411 fn from(value: String) -> Self {
412 let mut instance = Self::default();
413 instance.value = Some(value);
414 instance
415 }
416}
417#[derive(
418 Clone,
419 Reflect,
420 Debug,
421 Default,
422 haste_fhir_serialization_json :: derive :: FHIRSerdeSerialize,
423 haste_fhir_serialization_json :: derive :: FHIRSerdeDeserialize,
424)]
425#[fhir_type = "oid"]
426#[fhir_serialize_type = "primitive"]
427#[doc = "An OID represented as a URI"]
428pub struct FHIROid {
429 #[doc = "unique id for the element within a resource (for internal references)"]
430 pub id: Option<String>,
431 #[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."]
432 pub extension: Option<Vec<Box<Extension>>>,
433 #[doc = "Primitive value for oid"]
434 pub value: Option<String>,
435}
436impl FHIROid {
437 pub fn extension_mut(&mut self) -> &mut Option<Vec<Box<Extension>>> {
438 &mut self.extension
439 }
440 pub fn id_mut(&mut self) -> &mut Option<String> {
441 &mut self.id
442 }
443}
444impl From<String> for FHIROid {
445 fn from(value: String) -> Self {
446 let mut instance = Self::default();
447 instance.value = Some(value);
448 instance
449 }
450}
451#[derive(
452 Clone,
453 Reflect,
454 Debug,
455 Default,
456 haste_fhir_serialization_json :: derive :: FHIRSerdeSerialize,
457 haste_fhir_serialization_json :: derive :: FHIRSerdeDeserialize,
458)]
459#[fhir_type = "positiveInt"]
460#[fhir_serialize_type = "primitive"]
461#[doc = "An integer with a value that is positive (e.g. >0)"]
462pub struct FHIRPositiveInt {
463 #[doc = "unique id for the element within a resource (for internal references)"]
464 pub id: Option<String>,
465 #[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."]
466 pub extension: Option<Vec<Box<Extension>>>,
467 #[doc = "Primitive value for positiveInt"]
468 pub value: Option<u64>,
469}
470impl FHIRPositiveInt {
471 pub fn extension_mut(&mut self) -> &mut Option<Vec<Box<Extension>>> {
472 &mut self.extension
473 }
474 pub fn id_mut(&mut self) -> &mut Option<String> {
475 &mut self.id
476 }
477}
478impl From<u64> for FHIRPositiveInt {
479 fn from(value: u64) -> Self {
480 let mut instance = Self::default();
481 instance.value = Some(value);
482 instance
483 }
484}
485#[derive(
486 Clone,
487 Reflect,
488 Debug,
489 Default,
490 haste_fhir_serialization_json :: derive :: FHIRSerdeSerialize,
491 haste_fhir_serialization_json :: derive :: FHIRSerdeDeserialize,
492)]
493#[fhir_type = "string"]
494#[fhir_serialize_type = "primitive"]
495#[doc = "A sequence of Unicode characters"]
496pub struct FHIRString {
497 #[doc = "unique id for the element within a resource (for internal references)"]
498 pub id: Option<String>,
499 #[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."]
500 pub extension: Option<Vec<Box<Extension>>>,
501 #[doc = "The actual value"]
502 pub value: Option<String>,
503}
504impl FHIRString {
505 pub fn extension_mut(&mut self) -> &mut Option<Vec<Box<Extension>>> {
506 &mut self.extension
507 }
508 pub fn id_mut(&mut self) -> &mut Option<String> {
509 &mut self.id
510 }
511}
512impl From<String> for FHIRString {
513 fn from(value: String) -> Self {
514 let mut instance = Self::default();
515 instance.value = Some(value);
516 instance
517 }
518}
519#[derive(
520 Clone,
521 Reflect,
522 Debug,
523 Default,
524 haste_fhir_serialization_json :: derive :: FHIRSerdeSerialize,
525 haste_fhir_serialization_json :: derive :: FHIRSerdeDeserialize,
526)]
527#[fhir_type = "time"]
528#[fhir_serialize_type = "primitive"]
529#[doc = "A time during the day, with no date specified"]
530pub struct FHIRTime {
531 #[doc = "unique id for the element within a resource (for internal references)"]
532 pub id: Option<String>,
533 #[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."]
534 pub extension: Option<Vec<Box<Extension>>>,
535 #[doc = "The actual value"]
536 pub value: Option<crate::r4::datetime::Time>,
537}
538impl FHIRTime {
539 pub fn extension_mut(&mut self) -> &mut Option<Vec<Box<Extension>>> {
540 &mut self.extension
541 }
542 pub fn id_mut(&mut self) -> &mut Option<String> {
543 &mut self.id
544 }
545}
546impl From<crate::r4::datetime::Time> for FHIRTime {
547 fn from(value: crate::r4::datetime::Time) -> Self {
548 let mut instance = Self::default();
549 instance.value = Some(value);
550 instance
551 }
552}
553#[derive(
554 Clone,
555 Reflect,
556 Debug,
557 Default,
558 haste_fhir_serialization_json :: derive :: FHIRSerdeSerialize,
559 haste_fhir_serialization_json :: derive :: FHIRSerdeDeserialize,
560)]
561#[fhir_type = "unsignedInt"]
562#[fhir_serialize_type = "primitive"]
563#[doc = "An integer with a value that is not negative (e.g. >= 0)"]
564pub struct FHIRUnsignedInt {
565 #[doc = "unique id for the element within a resource (for internal references)"]
566 pub id: Option<String>,
567 #[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."]
568 pub extension: Option<Vec<Box<Extension>>>,
569 #[doc = "Primitive value for unsignedInt"]
570 pub value: Option<u64>,
571}
572impl FHIRUnsignedInt {
573 pub fn extension_mut(&mut self) -> &mut Option<Vec<Box<Extension>>> {
574 &mut self.extension
575 }
576 pub fn id_mut(&mut self) -> &mut Option<String> {
577 &mut self.id
578 }
579}
580impl From<u64> for FHIRUnsignedInt {
581 fn from(value: u64) -> Self {
582 let mut instance = Self::default();
583 instance.value = Some(value);
584 instance
585 }
586}
587#[derive(
588 Clone,
589 Reflect,
590 Debug,
591 Default,
592 haste_fhir_serialization_json :: derive :: FHIRSerdeSerialize,
593 haste_fhir_serialization_json :: derive :: FHIRSerdeDeserialize,
594)]
595#[fhir_type = "uri"]
596#[fhir_serialize_type = "primitive"]
597#[doc = "String of characters used to identify a name or a resource"]
598pub struct FHIRUri {
599 #[doc = "unique id for the element within a resource (for internal references)"]
600 pub id: Option<String>,
601 #[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."]
602 pub extension: Option<Vec<Box<Extension>>>,
603 #[doc = "The actual value"]
604 pub value: Option<String>,
605}
606impl FHIRUri {
607 pub fn extension_mut(&mut self) -> &mut Option<Vec<Box<Extension>>> {
608 &mut self.extension
609 }
610 pub fn id_mut(&mut self) -> &mut Option<String> {
611 &mut self.id
612 }
613}
614impl From<String> for FHIRUri {
615 fn from(value: String) -> Self {
616 let mut instance = Self::default();
617 instance.value = Some(value);
618 instance
619 }
620}
621#[derive(
622 Clone,
623 Reflect,
624 Debug,
625 Default,
626 haste_fhir_serialization_json :: derive :: FHIRSerdeSerialize,
627 haste_fhir_serialization_json :: derive :: FHIRSerdeDeserialize,
628)]
629#[fhir_type = "url"]
630#[fhir_serialize_type = "primitive"]
631#[doc = "A URI that is a literal reference"]
632pub struct FHIRUrl {
633 #[doc = "unique id for the element within a resource (for internal references)"]
634 pub id: Option<String>,
635 #[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."]
636 pub extension: Option<Vec<Box<Extension>>>,
637 #[doc = "Primitive value for url"]
638 pub value: Option<String>,
639}
640impl FHIRUrl {
641 pub fn extension_mut(&mut self) -> &mut Option<Vec<Box<Extension>>> {
642 &mut self.extension
643 }
644 pub fn id_mut(&mut self) -> &mut Option<String> {
645 &mut self.id
646 }
647}
648impl From<String> for FHIRUrl {
649 fn from(value: String) -> Self {
650 let mut instance = Self::default();
651 instance.value = Some(value);
652 instance
653 }
654}
655#[derive(
656 Clone,
657 Reflect,
658 Debug,
659 Default,
660 haste_fhir_serialization_json :: derive :: FHIRSerdeSerialize,
661 haste_fhir_serialization_json :: derive :: FHIRSerdeDeserialize,
662)]
663#[fhir_type = "uuid"]
664#[fhir_serialize_type = "primitive"]
665#[doc = "A UUID, represented as a URI"]
666pub struct FHIRUuid {
667 #[doc = "unique id for the element within a resource (for internal references)"]
668 pub id: Option<String>,
669 #[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."]
670 pub extension: Option<Vec<Box<Extension>>>,
671 #[doc = "Primitive value for uuid"]
672 pub value: Option<String>,
673}
674impl FHIRUuid {
675 pub fn extension_mut(&mut self) -> &mut Option<Vec<Box<Extension>>> {
676 &mut self.extension
677 }
678 pub fn id_mut(&mut self) -> &mut Option<String> {
679 &mut self.id
680 }
681}
682impl From<String> for FHIRUuid {
683 fn from(value: String) -> Self {
684 let mut instance = Self::default();
685 instance.value = Some(value);
686 instance
687 }
688}
689#[derive(
690 Clone,
691 Reflect,
692 Debug,
693 Default,
694 haste_fhir_serialization_json :: derive :: FHIRSerdeSerialize,
695 haste_fhir_serialization_json :: derive :: FHIRSerdeDeserialize,
696)]
697#[fhir_type = "xhtml"]
698#[fhir_serialize_type = "primitive"]
699#[doc = "XHTML"]
700pub struct FHIRXhtml {
701 #[doc = "unique id for the element within a resource (for internal references)"]
702 pub id: Option<String>,
703 #[cardinality(max = 0usize)]
704 #[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."]
705 pub extension: Option<Vec<Box<Extension>>>,
706 #[doc = "Actual xhtml"]
707 pub value: String,
708}
709impl FHIRXhtml {
710 pub fn extension_mut(&mut self) -> &mut Option<Vec<Box<Extension>>> {
711 &mut self.extension
712 }
713 pub fn id_mut(&mut self) -> &mut Option<String> {
714 &mut self.id
715 }
716}
717impl From<String> for FHIRXhtml {
718 fn from(value: String) -> Self {
719 Self {
720 value: value,
721 ..Default::default()
722 }
723 }
724}
725#[derive(
726 Clone,
727 Reflect,
728 Debug,
729 Default,
730 haste_fhir_serialization_json :: derive :: FHIRSerdeSerialize,
731 haste_fhir_serialization_json :: derive :: FHIRSerdeDeserialize,
732)]
733#[fhir_type = "Address"]
734#[fhir_serialize_type = "complex"]
735#[doc = "An address expressed using postal conventions (as opposed to GPS or other location definition formats). This data type may be used to convey addresses for use in delivering mail as well as for visiting locations which might not be valid for mail delivery. There are a variety of postal address formats defined around the world."]
736pub struct Address {
737 #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
738 pub id: Option<String>,
739 #[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."]
740 pub extension: Option<Vec<Box<Extension>>>,
741 #[rename_field = "use"]
742 #[primitive]
743 #[doc = "The purpose of this address."]
744 pub use_: Option<Box<terminology::AddressUse>>,
745 #[rename_field = "type"]
746 #[primitive]
747 #[doc = "Distinguishes between physical addresses (those you can visit) and mailing addresses (e.g. PO Boxes and care-of addresses). Most addresses are both."]
748 pub type_: Option<Box<terminology::AddressType>>,
749 #[primitive]
750 #[doc = "Specifies the entire address as it should be displayed e.g. on a postal label. This may be provided instead of or as well as the specific parts."]
751 pub text: Option<Box<FHIRString>>,
752 #[primitive]
753 #[doc = "This component contains the house number, apartment number, street name, street direction, P.O. Box number, delivery hints, and similar address information."]
754 pub line: Option<Vec<Box<FHIRString>>>,
755 #[primitive]
756 #[doc = "The name of the city, town, suburb, village or other community or delivery center."]
757 pub city: Option<Box<FHIRString>>,
758 #[primitive]
759 #[doc = "The name of the administrative area (county)."]
760 pub district: Option<Box<FHIRString>>,
761 #[primitive]
762 #[doc = "Sub-unit of a country with limited sovereignty in a federally organized country. A code may be used if codes are in common use (e.g. US 2 letter state codes)."]
763 pub state: Option<Box<FHIRString>>,
764 #[primitive]
765 #[doc = "A postal code designating a region defined by the postal service."]
766 pub postalCode: Option<Box<FHIRString>>,
767 #[primitive]
768 #[doc = "Country - a nation as commonly understood or generally accepted."]
769 pub country: Option<Box<FHIRString>>,
770 #[doc = "Time period when address was/is in use."]
771 pub period: Option<Box<Period>>,
772}
773#[derive(
774 Clone,
775 Reflect,
776 Debug,
777 Default,
778 haste_fhir_serialization_json :: derive :: FHIRSerdeSerialize,
779 haste_fhir_serialization_json :: derive :: FHIRSerdeDeserialize,
780)]
781#[fhir_type = "Age"]
782#[fhir_serialize_type = "complex"]
783#[doc = "A duration of time during which an organism (or a process) has existed."]
784pub struct Age {
785 #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
786 pub id: Option<String>,
787 #[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."]
788 pub extension: Option<Vec<Box<Extension>>>,
789 #[primitive]
790 #[doc = "The value of the measured amount. The value includes an implicit precision in the presentation of the value."]
791 pub value: Option<Box<FHIRDecimal>>,
792 #[primitive]
793 #[doc = "How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is \"<\" , then the real value is < stated value."]
794 pub comparator: Option<Box<terminology::QuantityComparator>>,
795 #[primitive]
796 #[doc = "A human-readable form of the unit."]
797 pub unit: Option<Box<FHIRString>>,
798 #[primitive]
799 #[doc = "The identification of the system that provides the coded form of the unit."]
800 pub system: Option<Box<FHIRUri>>,
801 #[primitive]
802 #[doc = "A computer processable form of the unit in some unit representation system."]
803 pub code: Option<Box<FHIRCode>>,
804}
805#[derive(
806 Clone,
807 Reflect,
808 Debug,
809 haste_fhir_serialization_json :: derive :: FHIRSerdeSerialize,
810 haste_fhir_serialization_json :: derive :: FHIRSerdeDeserialize,
811)]
812#[fhir_serialize_type = "typechoice"]
813#[type_choice_field_name = "author"]
814pub enum AnnotationAuthorTypeChoice {
815 # [reference (targets = ["Practitioner" , "Patient" , "RelatedPerson" , "Organization"])]
816 Reference(Box<Reference>),
817 #[primitive]
818 String(Box<FHIRString>),
819}
820impl Default for AnnotationAuthorTypeChoice {
821 fn default() -> Self {
822 AnnotationAuthorTypeChoice::Reference(Box::new(Default::default()))
823 }
824}
825#[derive(
826 Clone,
827 Reflect,
828 Debug,
829 Default,
830 haste_fhir_serialization_json :: derive :: FHIRSerdeSerialize,
831 haste_fhir_serialization_json :: derive :: FHIRSerdeDeserialize,
832)]
833#[fhir_type = "Annotation"]
834#[fhir_serialize_type = "complex"]
835#[doc = "A text note which also contains information about who made the statement and when."]
836pub struct Annotation {
837 #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
838 pub id: Option<String>,
839 #[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."]
840 pub extension: Option<Vec<Box<Extension>>>,
841 # [type_choice_variants (complex = ["authorReference"] , primitive = ["authorString"])]
842 #[doc = "The individual responsible for making the annotation."]
843 pub author: Option<AnnotationAuthorTypeChoice>,
844 #[primitive]
845 #[doc = "Indicates when this particular annotation was made."]
846 pub time: Option<Box<FHIRDateTime>>,
847 #[primitive]
848 #[doc = "The text of the annotation in markdown format."]
849 pub text: Box<FHIRMarkdown>,
850}
851#[derive(
852 Clone,
853 Reflect,
854 Debug,
855 Default,
856 haste_fhir_serialization_json :: derive :: FHIRSerdeSerialize,
857 haste_fhir_serialization_json :: derive :: FHIRSerdeDeserialize,
858)]
859#[fhir_type = "Attachment"]
860#[fhir_serialize_type = "complex"]
861#[doc = "For referring to data content defined in other formats."]
862pub struct Attachment {
863 #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
864 pub id: Option<String>,
865 #[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."]
866 pub extension: Option<Vec<Box<Extension>>>,
867 #[primitive]
868 #[doc = "Identifies the type of the data in the attachment and allows a method to be chosen to interpret or render the data. Includes mime type parameters such as charset where appropriate."]
869 pub contentType: Option<Box<FHIRCode>>,
870 #[primitive]
871 #[doc = "The human language of the content. The value can be any valid value according to BCP 47."]
872 pub language: Option<Box<FHIRCode>>,
873 #[primitive]
874 #[doc = "The actual data of the attachment - a sequence of bytes, base64 encoded."]
875 pub data: Option<Box<FHIRBase64Binary>>,
876 #[primitive]
877 #[doc = "A location where the data can be accessed."]
878 pub url: Option<Box<FHIRUrl>>,
879 #[primitive]
880 #[doc = "The number of bytes of data that make up this attachment (before base64 encoding, if that is done)."]
881 pub size: Option<Box<FHIRUnsignedInt>>,
882 #[primitive]
883 #[doc = "The calculated hash of the data using SHA-1. Represented using base64."]
884 pub hash: Option<Box<FHIRBase64Binary>>,
885 #[primitive]
886 #[doc = "A label or set of text to display in place of the data."]
887 pub title: Option<Box<FHIRString>>,
888 #[primitive]
889 #[doc = "The date that the attachment was first created."]
890 pub creation: Option<Box<FHIRDateTime>>,
891}
892#[derive(
893 Clone,
894 Reflect,
895 Debug,
896 Default,
897 haste_fhir_serialization_json :: derive :: FHIRSerdeSerialize,
898 haste_fhir_serialization_json :: derive :: FHIRSerdeDeserialize,
899)]
900#[fhir_type = "CodeableConcept"]
901#[fhir_serialize_type = "complex"]
902#[doc = "A concept that may be defined by a formal reference to a terminology or ontology or may be provided by text."]
903pub struct CodeableConcept {
904 #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
905 pub id: Option<String>,
906 #[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."]
907 pub extension: Option<Vec<Box<Extension>>>,
908 #[doc = "A reference to a code defined by a terminology system."]
909 pub coding: Option<Vec<Box<Coding>>>,
910 #[primitive]
911 #[doc = "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."]
912 pub text: Option<Box<FHIRString>>,
913}
914#[derive(
915 Clone,
916 Reflect,
917 Debug,
918 Default,
919 haste_fhir_serialization_json :: derive :: FHIRSerdeSerialize,
920 haste_fhir_serialization_json :: derive :: FHIRSerdeDeserialize,
921)]
922#[fhir_type = "Coding"]
923#[fhir_serialize_type = "complex"]
924#[doc = "A reference to a code defined by a terminology system."]
925pub struct Coding {
926 #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
927 pub id: Option<String>,
928 #[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."]
929 pub extension: Option<Vec<Box<Extension>>>,
930 #[primitive]
931 #[doc = "The identification of the code system that defines the meaning of the symbol in the code."]
932 pub system: Option<Box<FHIRUri>>,
933 #[primitive]
934 #[doc = "The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."]
935 pub version: Option<Box<FHIRString>>,
936 #[primitive]
937 #[doc = "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination)."]
938 pub code: Option<Box<FHIRCode>>,
939 #[primitive]
940 #[doc = "A representation of the meaning of the code in the system, following the rules of the system."]
941 pub display: Option<Box<FHIRString>>,
942 #[primitive]
943 #[doc = "Indicates that this coding was chosen by a user directly - e.g. off a pick list of available items (codes or displays)."]
944 pub userSelected: Option<Box<FHIRBoolean>>,
945}
946#[derive(
947 Clone,
948 Reflect,
949 Debug,
950 Default,
951 haste_fhir_serialization_json :: derive :: FHIRSerdeSerialize,
952 haste_fhir_serialization_json :: derive :: FHIRSerdeDeserialize,
953)]
954#[fhir_type = "ContactDetail"]
955#[fhir_serialize_type = "complex"]
956#[doc = "Specifies contact information for a person or organization."]
957pub struct ContactDetail {
958 #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
959 pub id: Option<String>,
960 #[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."]
961 pub extension: Option<Vec<Box<Extension>>>,
962 #[primitive]
963 #[doc = "The name of an individual to contact."]
964 pub name: Option<Box<FHIRString>>,
965 #[doc = "The contact details for the individual (if a name was provided) or the organization."]
966 pub telecom: Option<Vec<Box<ContactPoint>>>,
967}
968#[derive(
969 Clone,
970 Reflect,
971 Debug,
972 Default,
973 haste_fhir_serialization_json :: derive :: FHIRSerdeSerialize,
974 haste_fhir_serialization_json :: derive :: FHIRSerdeDeserialize,
975)]
976#[fhir_type = "ContactPoint"]
977#[fhir_serialize_type = "complex"]
978#[doc = "Details for all kinds of technology mediated contact points for a person or organization, including telephone, email, etc."]
979pub struct ContactPoint {
980 #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
981 pub id: Option<String>,
982 #[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."]
983 pub extension: Option<Vec<Box<Extension>>>,
984 #[primitive]
985 #[doc = "Telecommunications form for contact point - what communications system is required to make use of the contact."]
986 pub system: Option<Box<terminology::ContactPointSystem>>,
987 #[primitive]
988 #[doc = "The actual contact point details, in a form that is meaningful to the designated communication system (i.e. phone number or email address)."]
989 pub value: Option<Box<FHIRString>>,
990 #[rename_field = "use"]
991 #[primitive]
992 #[doc = "Identifies the purpose for the contact point."]
993 pub use_: Option<Box<terminology::ContactPointUse>>,
994 #[primitive]
995 #[doc = "Specifies a preferred order in which to use a set of contacts. ContactPoints with lower rank values are more preferred than those with higher rank values."]
996 pub rank: Option<Box<FHIRPositiveInt>>,
997 #[doc = "Time period when the contact point was/is in use."]
998 pub period: Option<Box<Period>>,
999}
1000#[derive(
1001 Clone,
1002 Reflect,
1003 Debug,
1004 Default,
1005 haste_fhir_serialization_json :: derive :: FHIRSerdeSerialize,
1006 haste_fhir_serialization_json :: derive :: FHIRSerdeDeserialize,
1007)]
1008#[fhir_type = "Contributor"]
1009#[fhir_serialize_type = "complex"]
1010#[doc = "A contributor to the content of a knowledge asset, including authors, editors, reviewers, and endorsers."]
1011pub struct Contributor {
1012 #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
1013 pub id: Option<String>,
1014 #[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."]
1015 pub extension: Option<Vec<Box<Extension>>>,
1016 #[rename_field = "type"]
1017 #[primitive]
1018 #[doc = "The type of contributor."]
1019 pub type_: Box<terminology::ContributorType>,
1020 #[primitive]
1021 #[doc = "The name of the individual or organization responsible for the contribution."]
1022 pub name: Box<FHIRString>,
1023 #[doc = "Contact details to assist a user in finding and communicating with the contributor."]
1024 pub contact: Option<Vec<Box<ContactDetail>>>,
1025}
1026#[derive(
1027 Clone,
1028 Reflect,
1029 Debug,
1030 Default,
1031 haste_fhir_serialization_json :: derive :: FHIRSerdeSerialize,
1032 haste_fhir_serialization_json :: derive :: FHIRSerdeDeserialize,
1033)]
1034#[fhir_type = "Count"]
1035#[fhir_serialize_type = "complex"]
1036#[doc = "A measured amount (or an amount that can potentially be measured). Note that measured amounts include amounts that are not precisely quantified, including amounts involving arbitrary units and floating currencies."]
1037pub struct Count {
1038 #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
1039 pub id: Option<String>,
1040 #[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."]
1041 pub extension: Option<Vec<Box<Extension>>>,
1042 #[primitive]
1043 #[doc = "The value of the measured amount. The value includes an implicit precision in the presentation of the value."]
1044 pub value: Option<Box<FHIRDecimal>>,
1045 #[primitive]
1046 #[doc = "How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is \"<\" , then the real value is < stated value."]
1047 pub comparator: Option<Box<terminology::QuantityComparator>>,
1048 #[primitive]
1049 #[doc = "A human-readable form of the unit."]
1050 pub unit: Option<Box<FHIRString>>,
1051 #[primitive]
1052 #[doc = "The identification of the system that provides the coded form of the unit."]
1053 pub system: Option<Box<FHIRUri>>,
1054 #[primitive]
1055 #[doc = "A computer processable form of the unit in some unit representation system."]
1056 pub code: Option<Box<FHIRCode>>,
1057}
1058#[derive(
1059 Clone,
1060 Reflect,
1061 Debug,
1062 haste_fhir_serialization_json :: derive :: FHIRSerdeSerialize,
1063 haste_fhir_serialization_json :: derive :: FHIRSerdeDeserialize,
1064)]
1065#[fhir_serialize_type = "typechoice"]
1066#[type_choice_field_name = "subject"]
1067pub enum DataRequirementSubjectTypeChoice {
1068 CodeableConcept(Box<CodeableConcept>),
1069 # [reference (targets = ["Group"])]
1070 Reference(Box<Reference>),
1071}
1072impl Default for DataRequirementSubjectTypeChoice {
1073 fn default() -> Self {
1074 DataRequirementSubjectTypeChoice::CodeableConcept(Box::new(Default::default()))
1075 }
1076}
1077#[derive(
1078 Clone,
1079 Reflect,
1080 Debug,
1081 Default,
1082 haste_fhir_serialization_json :: derive :: FHIRSerdeSerialize,
1083 haste_fhir_serialization_json :: derive :: FHIRSerdeDeserialize,
1084)]
1085#[fhir_type = "Element"]
1086#[fhir_serialize_type = "complex"]
1087#[doc = "Code filters specify additional constraints on the data, specifying the value set of interest for a particular element of the data. Each code filter defines an additional constraint on the data, i.e. code filters are AND'ed, not OR'ed."]
1088pub struct DataRequirementCodeFilter {
1089 #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
1090 pub id: Option<String>,
1091 #[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."]
1092 pub extension: Option<Vec<Box<Extension>>>,
1093 #[primitive]
1094 #[doc = "The code-valued attribute of the filter. The specified path SHALL be a FHIRPath resolveable on the specified type of the DataRequirement, and SHALL consist only of identifiers, constant indexers, and .resolve(). The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements (see the [Simple FHIRPath Profile](fhirpath.html#simple) for full details). Note that the index must be an integer constant. The path must resolve to an element of type code, Coding, or CodeableConcept."]
1095 pub path: Option<Box<FHIRString>>,
1096 #[primitive]
1097 #[doc = "A token parameter that refers to a search parameter defined on the specified type of the DataRequirement, and which searches on elements of type code, Coding, or CodeableConcept."]
1098 pub searchParam: Option<Box<FHIRString>>,
1099 #[primitive]
1100 #[doc = "The valueset for the code filter. The valueSet and code elements are additive. If valueSet is specified, the filter will return only those data items for which the value of the code-valued element specified in the path is a member of the specified valueset."]
1101 pub valueSet: Option<Box<FHIRCanonical>>,
1102 #[doc = "The codes for the code filter. If values are given, the filter will return only those data items for which the code-valued attribute specified by the path has a value that is one of the specified codes. If codes are specified in addition to a value set, the filter returns items matching a code in the value set or one of the specified codes."]
1103 pub code: Option<Vec<Box<Coding>>>,
1104}
1105#[derive(
1106 Clone,
1107 Reflect,
1108 Debug,
1109 haste_fhir_serialization_json :: derive :: FHIRSerdeSerialize,
1110 haste_fhir_serialization_json :: derive :: FHIRSerdeDeserialize,
1111)]
1112#[fhir_serialize_type = "typechoice"]
1113#[type_choice_field_name = "value"]
1114pub enum DataRequirementDateFilterValueTypeChoice {
1115 #[primitive]
1116 DateTime(Box<FHIRDateTime>),
1117 Period(Box<Period>),
1118 Duration(Box<Duration>),
1119}
1120impl Default for DataRequirementDateFilterValueTypeChoice {
1121 fn default() -> Self {
1122 DataRequirementDateFilterValueTypeChoice::DateTime(Box::new(Default::default()))
1123 }
1124}
1125#[derive(
1126 Clone,
1127 Reflect,
1128 Debug,
1129 Default,
1130 haste_fhir_serialization_json :: derive :: FHIRSerdeSerialize,
1131 haste_fhir_serialization_json :: derive :: FHIRSerdeDeserialize,
1132)]
1133#[fhir_type = "Element"]
1134#[fhir_serialize_type = "complex"]
1135#[doc = "Date filters specify additional constraints on the data in terms of the applicable date range for specific elements. Each date filter specifies an additional constraint on the data, i.e. date filters are AND'ed, not OR'ed."]
1136pub struct DataRequirementDateFilter {
1137 #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
1138 pub id: Option<String>,
1139 #[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."]
1140 pub extension: Option<Vec<Box<Extension>>>,
1141 #[primitive]
1142 #[doc = "The date-valued attribute of the filter. The specified path SHALL be a FHIRPath resolveable on the specified type of the DataRequirement, and SHALL consist only of identifiers, constant indexers, and .resolve(). The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements (see the [Simple FHIRPath Profile](fhirpath.html#simple) for full details). Note that the index must be an integer constant. The path must resolve to an element of type date, dateTime, Period, Schedule, or Timing."]
1143 pub path: Option<Box<FHIRString>>,
1144 #[primitive]
1145 #[doc = "A date parameter that refers to a search parameter defined on the specified type of the DataRequirement, and which searches on elements of type date, dateTime, Period, Schedule, or Timing."]
1146 pub searchParam: Option<Box<FHIRString>>,
1147 # [type_choice_variants (complex = ["valuePeriod" , "valueDuration"] , primitive = ["valueDateTime"])]
1148 #[doc = "The value of the filter. If period is specified, the filter will return only those data items that fall within the bounds determined by the Period, inclusive of the period boundaries. If dateTime is specified, the filter will return only those data items that are equal to the specified dateTime. If a Duration is specified, the filter will return only those data items that fall within Duration before now."]
1149 pub value: Option<DataRequirementDateFilterValueTypeChoice>,
1150}
1151#[derive(
1152 Clone,
1153 Reflect,
1154 Debug,
1155 Default,
1156 haste_fhir_serialization_json :: derive :: FHIRSerdeSerialize,
1157 haste_fhir_serialization_json :: derive :: FHIRSerdeDeserialize,
1158)]
1159#[fhir_type = "Element"]
1160#[fhir_serialize_type = "complex"]
1161#[doc = "Specifies the order of the results to be returned."]
1162pub struct DataRequirementSort {
1163 #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
1164 pub id: Option<String>,
1165 #[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."]
1166 pub extension: Option<Vec<Box<Extension>>>,
1167 #[primitive]
1168 #[doc = "The attribute of the sort. The specified path must be resolvable from the type of the required data. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements. Note that the index must be an integer constant."]
1169 pub path: Box<FHIRString>,
1170 #[primitive]
1171 #[doc = "The direction of the sort, ascending or descending."]
1172 pub direction: Box<terminology::SortDirection>,
1173}
1174#[derive(
1175 Clone,
1176 Reflect,
1177 Debug,
1178 Default,
1179 haste_fhir_serialization_json :: derive :: FHIRSerdeSerialize,
1180 haste_fhir_serialization_json :: derive :: FHIRSerdeDeserialize,
1181)]
1182#[fhir_type = "DataRequirement"]
1183#[fhir_serialize_type = "complex"]
1184#[doc = "Describes a required data item for evaluation in terms of the type of data, and optional code or date-based filters of the data."]
1185pub struct DataRequirement {
1186 #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
1187 pub id: Option<String>,
1188 #[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."]
1189 pub extension: Option<Vec<Box<Extension>>>,
1190 #[rename_field = "type"]
1191 #[primitive]
1192 #[doc = "The type of the required data, specified as the type name of a resource. For profiles, this value is set to the type of the base resource of the profile."]
1193 pub type_: Box<terminology::AllTypes>,
1194 #[primitive]
1195 #[doc = "The profile of the required data, specified as the uri of the profile definition."]
1196 pub profile: Option<Vec<Box<FHIRCanonical>>>,
1197 # [type_choice_variants (complex = ["subjectCodeableConcept" , "subjectReference"] , primitive = [])]
1198 #[doc = "The intended subjects of the data requirement. If this element is not provided, a Patient subject is assumed."]
1199 pub subject: Option<DataRequirementSubjectTypeChoice>,
1200 #[primitive]
1201 #[doc = "Indicates that specific elements of the type are referenced by the knowledge module and must be supported by the consumer in order to obtain an effective evaluation. This does not mean that a value is required for this element, only that the consuming system must understand the element and be able to provide values for it if they are available. \n\nThe value of mustSupport SHALL be a FHIRPath resolveable on the type of the DataRequirement. The path SHALL consist only of identifiers, constant indexers, and .resolve() (see the [Simple FHIRPath Profile](fhirpath.html#simple) for full details)."]
1202 pub mustSupport: Option<Vec<Box<FHIRString>>>,
1203 #[doc = "Code filters specify additional constraints on the data, specifying the value set of interest for a particular element of the data. Each code filter defines an additional constraint on the data, i.e. code filters are AND'ed, not OR'ed."]
1204 pub codeFilter: Option<Vec<DataRequirementCodeFilter>>,
1205 #[doc = "Date filters specify additional constraints on the data in terms of the applicable date range for specific elements. Each date filter specifies an additional constraint on the data, i.e. date filters are AND'ed, not OR'ed."]
1206 pub dateFilter: Option<Vec<DataRequirementDateFilter>>,
1207 #[primitive]
1208 #[doc = "Specifies a maximum number of results that are required (uses the _count search parameter)."]
1209 pub limit: Option<Box<FHIRPositiveInt>>,
1210 #[doc = "Specifies the order of the results to be returned."]
1211 pub sort: Option<Vec<DataRequirementSort>>,
1212}
1213#[derive(
1214 Clone,
1215 Reflect,
1216 Debug,
1217 Default,
1218 haste_fhir_serialization_json :: derive :: FHIRSerdeSerialize,
1219 haste_fhir_serialization_json :: derive :: FHIRSerdeDeserialize,
1220)]
1221#[fhir_type = "Distance"]
1222#[fhir_serialize_type = "complex"]
1223#[doc = "A length - a value with a unit that is a physical distance."]
1224pub struct Distance {
1225 #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
1226 pub id: Option<String>,
1227 #[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."]
1228 pub extension: Option<Vec<Box<Extension>>>,
1229 #[primitive]
1230 #[doc = "The value of the measured amount. The value includes an implicit precision in the presentation of the value."]
1231 pub value: Option<Box<FHIRDecimal>>,
1232 #[primitive]
1233 #[doc = "How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is \"<\" , then the real value is < stated value."]
1234 pub comparator: Option<Box<terminology::QuantityComparator>>,
1235 #[primitive]
1236 #[doc = "A human-readable form of the unit."]
1237 pub unit: Option<Box<FHIRString>>,
1238 #[primitive]
1239 #[doc = "The identification of the system that provides the coded form of the unit."]
1240 pub system: Option<Box<FHIRUri>>,
1241 #[primitive]
1242 #[doc = "A computer processable form of the unit in some unit representation system."]
1243 pub code: Option<Box<FHIRCode>>,
1244}
1245#[derive(
1246 Clone,
1247 Reflect,
1248 Debug,
1249 haste_fhir_serialization_json :: derive :: FHIRSerdeSerialize,
1250 haste_fhir_serialization_json :: derive :: FHIRSerdeDeserialize,
1251)]
1252#[fhir_serialize_type = "typechoice"]
1253#[type_choice_field_name = "asNeeded"]
1254pub enum DosageAsNeededTypeChoice {
1255 #[primitive]
1256 Boolean(Box<FHIRBoolean>),
1257 CodeableConcept(Box<CodeableConcept>),
1258}
1259impl Default for DosageAsNeededTypeChoice {
1260 fn default() -> Self {
1261 DosageAsNeededTypeChoice::Boolean(Box::new(Default::default()))
1262 }
1263}
1264#[derive(
1265 Clone,
1266 Reflect,
1267 Debug,
1268 haste_fhir_serialization_json :: derive :: FHIRSerdeSerialize,
1269 haste_fhir_serialization_json :: derive :: FHIRSerdeDeserialize,
1270)]
1271#[fhir_serialize_type = "typechoice"]
1272#[type_choice_field_name = "dose"]
1273pub enum DosageDoseAndRateDoseTypeChoice {
1274 Range(Box<Range>),
1275 Quantity(Box<Quantity>),
1276}
1277impl Default for DosageDoseAndRateDoseTypeChoice {
1278 fn default() -> Self {
1279 DosageDoseAndRateDoseTypeChoice::Range(Box::new(Default::default()))
1280 }
1281}
1282#[derive(
1283 Clone,
1284 Reflect,
1285 Debug,
1286 haste_fhir_serialization_json :: derive :: FHIRSerdeSerialize,
1287 haste_fhir_serialization_json :: derive :: FHIRSerdeDeserialize,
1288)]
1289#[fhir_serialize_type = "typechoice"]
1290#[type_choice_field_name = "rate"]
1291pub enum DosageDoseAndRateRateTypeChoice {
1292 Ratio(Box<Ratio>),
1293 Range(Box<Range>),
1294 Quantity(Box<Quantity>),
1295}
1296impl Default for DosageDoseAndRateRateTypeChoice {
1297 fn default() -> Self {
1298 DosageDoseAndRateRateTypeChoice::Ratio(Box::new(Default::default()))
1299 }
1300}
1301#[derive(
1302 Clone,
1303 Reflect,
1304 Debug,
1305 Default,
1306 haste_fhir_serialization_json :: derive :: FHIRSerdeSerialize,
1307 haste_fhir_serialization_json :: derive :: FHIRSerdeDeserialize,
1308)]
1309#[fhir_type = "Element"]
1310#[fhir_serialize_type = "complex"]
1311#[doc = "The amount of medication administered."]
1312pub struct DosageDoseAndRate {
1313 #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
1314 pub id: Option<String>,
1315 #[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."]
1316 pub extension: Option<Vec<Box<Extension>>>,
1317 #[rename_field = "type"]
1318 #[doc = "The kind of dose or rate specified, for example, ordered or calculated."]
1319 pub type_: Option<Box<CodeableConcept>>,
1320 # [type_choice_variants (complex = ["doseRange" , "doseQuantity"] , primitive = [])]
1321 #[doc = "Amount of medication per dose."]
1322 pub dose: Option<DosageDoseAndRateDoseTypeChoice>,
1323 # [type_choice_variants (complex = ["rateRatio" , "rateRange" , "rateQuantity"] , primitive = [])]
1324 #[doc = "Amount of medication per unit of time."]
1325 pub rate: Option<DosageDoseAndRateRateTypeChoice>,
1326}
1327#[derive(
1328 Clone,
1329 Reflect,
1330 Debug,
1331 Default,
1332 haste_fhir_serialization_json :: derive :: FHIRSerdeSerialize,
1333 haste_fhir_serialization_json :: derive :: FHIRSerdeDeserialize,
1334)]
1335#[fhir_type = "Dosage"]
1336#[fhir_serialize_type = "complex"]
1337#[doc = "Indicates how the medication is/was taken or should be taken by the patient."]
1338pub struct Dosage {
1339 #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
1340 pub id: Option<String>,
1341 #[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."]
1342 pub extension: Option<Vec<Box<Extension>>>,
1343 #[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)."]
1344 pub modifierExtension: Option<Vec<Box<Extension>>>,
1345 #[primitive]
1346 #[doc = "Indicates the order in which the dosage instructions should be applied or interpreted."]
1347 pub sequence: Option<Box<FHIRInteger>>,
1348 #[primitive]
1349 #[doc = "Free text dosage instructions e.g. SIG."]
1350 pub text: Option<Box<FHIRString>>,
1351 #[doc = "Supplemental instructions to the patient on how to take the medication (e.g. \"with meals\" or\"take half to one hour before food\") or warnings for the patient about the medication (e.g. \"may cause drowsiness\" or \"avoid exposure of skin to direct sunlight or sunlamps\")."]
1352 pub additionalInstruction: Option<Vec<Box<CodeableConcept>>>,
1353 #[primitive]
1354 #[doc = "Instructions in terms that are understood by the patient or consumer."]
1355 pub patientInstruction: Option<Box<FHIRString>>,
1356 #[doc = "When medication should be administered."]
1357 pub timing: Option<Box<Timing>>,
1358 # [type_choice_variants (complex = ["asNeededCodeableConcept"] , primitive = ["asNeededBoolean"])]
1359 #[doc = "Indicates whether the Medication is only taken when needed within a specific dosing schedule (Boolean option), or it indicates the precondition for taking the Medication (CodeableConcept)."]
1360 pub asNeeded: Option<DosageAsNeededTypeChoice>,
1361 #[doc = "Body site to administer to."]
1362 pub site: Option<Box<CodeableConcept>>,
1363 #[doc = "How drug should enter body."]
1364 pub route: Option<Box<CodeableConcept>>,
1365 #[doc = "Technique for administering medication."]
1366 pub method: Option<Box<CodeableConcept>>,
1367 #[doc = "The amount of medication administered."]
1368 pub doseAndRate: Option<Vec<DosageDoseAndRate>>,
1369 #[doc = "Upper limit on medication per unit of time."]
1370 pub maxDosePerPeriod: Option<Box<Ratio>>,
1371 #[doc = "Upper limit on medication per administration."]
1372 pub maxDosePerAdministration: Option<Box<Quantity>>,
1373 #[doc = "Upper limit on medication per lifetime of the patient."]
1374 pub maxDosePerLifetime: Option<Box<Quantity>>,
1375}
1376#[derive(
1377 Clone,
1378 Reflect,
1379 Debug,
1380 Default,
1381 haste_fhir_serialization_json :: derive :: FHIRSerdeSerialize,
1382 haste_fhir_serialization_json :: derive :: FHIRSerdeDeserialize,
1383)]
1384#[fhir_type = "Duration"]
1385#[fhir_serialize_type = "complex"]
1386#[doc = "A length of time."]
1387pub struct Duration {
1388 #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
1389 pub id: Option<String>,
1390 #[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."]
1391 pub extension: Option<Vec<Box<Extension>>>,
1392 #[primitive]
1393 #[doc = "The value of the measured amount. The value includes an implicit precision in the presentation of the value."]
1394 pub value: Option<Box<FHIRDecimal>>,
1395 #[primitive]
1396 #[doc = "How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is \"<\" , then the real value is < stated value."]
1397 pub comparator: Option<Box<terminology::QuantityComparator>>,
1398 #[primitive]
1399 #[doc = "A human-readable form of the unit."]
1400 pub unit: Option<Box<FHIRString>>,
1401 #[primitive]
1402 #[doc = "The identification of the system that provides the coded form of the unit."]
1403 pub system: Option<Box<FHIRUri>>,
1404 #[primitive]
1405 #[doc = "A computer processable form of the unit in some unit representation system."]
1406 pub code: Option<Box<FHIRCode>>,
1407}
1408#[derive(
1409 Clone,
1410 Reflect,
1411 Debug,
1412 Default,
1413 haste_fhir_serialization_json :: derive :: FHIRSerdeSerialize,
1414 haste_fhir_serialization_json :: derive :: FHIRSerdeDeserialize,
1415)]
1416#[fhir_type = "Element"]
1417#[fhir_serialize_type = "complex"]
1418#[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."]
1419pub struct ElementDefinitionSlicingDiscriminator {
1420 #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
1421 pub id: Option<String>,
1422 #[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."]
1423 pub extension: Option<Vec<Box<Extension>>>,
1424 #[rename_field = "type"]
1425 #[primitive]
1426 #[doc = "How the element value is interpreted when discrimination is evaluated."]
1427 pub type_: Box<terminology::DiscriminatorType>,
1428 #[primitive]
1429 #[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."]
1430 pub path: Box<FHIRString>,
1431}
1432#[derive(
1433 Clone,
1434 Reflect,
1435 Debug,
1436 Default,
1437 haste_fhir_serialization_json :: derive :: FHIRSerdeSerialize,
1438 haste_fhir_serialization_json :: derive :: FHIRSerdeDeserialize,
1439)]
1440#[fhir_type = "Element"]
1441#[fhir_serialize_type = "complex"]
1442#[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)."]
1443pub struct ElementDefinitionSlicing {
1444 #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
1445 pub id: Option<String>,
1446 #[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."]
1447 pub extension: Option<Vec<Box<Extension>>>,
1448 #[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."]
1449 pub discriminator: Option<Vec<ElementDefinitionSlicingDiscriminator>>,
1450 #[primitive]
1451 #[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."]
1452 pub description: Option<Box<FHIRString>>,
1453 #[primitive]
1454 #[doc = "If the matching elements have to occur in the same order as defined in the profile."]
1455 pub ordered: Option<Box<FHIRBoolean>>,
1456 #[primitive]
1457 #[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."]
1458 pub rules: Box<terminology::ResourceSlicingRules>,
1459}
1460#[derive(
1461 Clone,
1462 Reflect,
1463 Debug,
1464 Default,
1465 haste_fhir_serialization_json :: derive :: FHIRSerdeSerialize,
1466 haste_fhir_serialization_json :: derive :: FHIRSerdeDeserialize,
1467)]
1468#[fhir_type = "Element"]
1469#[fhir_serialize_type = "complex"]
1470#[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."]
1471pub struct ElementDefinitionBase {
1472 #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
1473 pub id: Option<String>,
1474 #[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."]
1475 pub extension: Option<Vec<Box<Extension>>>,
1476 #[primitive]
1477 #[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."]
1478 pub path: Box<FHIRString>,
1479 #[primitive]
1480 #[doc = "Minimum cardinality of the base element identified by the path."]
1481 pub min: Box<FHIRUnsignedInt>,
1482 #[primitive]
1483 #[doc = "Maximum cardinality of the base element identified by the path."]
1484 pub max: Box<FHIRString>,
1485}
1486#[derive(
1487 Clone,
1488 Reflect,
1489 Debug,
1490 Default,
1491 haste_fhir_serialization_json :: derive :: FHIRSerdeSerialize,
1492 haste_fhir_serialization_json :: derive :: FHIRSerdeDeserialize,
1493)]
1494#[fhir_type = "Element"]
1495#[fhir_serialize_type = "complex"]
1496#[doc = "The data type or resource that the value of this element is permitted to be."]
1497pub struct ElementDefinitionType {
1498 #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
1499 pub id: Option<String>,
1500 #[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."]
1501 pub extension: Option<Vec<Box<Extension>>>,
1502 #[primitive]
1503 #[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."]
1504 pub code: Box<FHIRUri>,
1505 #[primitive]
1506 #[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."]
1507 pub profile: Option<Vec<Box<FHIRCanonical>>>,
1508 #[primitive]
1509 #[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."]
1510 pub targetProfile: Option<Vec<Box<FHIRCanonical>>>,
1511 #[primitive]
1512 #[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."]
1513 pub aggregation: Option<Vec<Box<terminology::ResourceAggregationMode>>>,
1514 #[primitive]
1515 #[doc = "Whether this reference needs to be version specific or version independent, or whether either can be used."]
1516 pub versioning: Option<Box<terminology::ReferenceVersionRules>>,
1517}
1518#[derive(
1519 Clone,
1520 Reflect,
1521 Debug,
1522 haste_fhir_serialization_json :: derive :: FHIRSerdeSerialize,
1523 haste_fhir_serialization_json :: derive :: FHIRSerdeDeserialize,
1524)]
1525#[fhir_serialize_type = "typechoice"]
1526#[type_choice_field_name = "defaultValue"]
1527pub enum ElementDefinitionDefaultValueTypeChoice {
1528 #[primitive]
1529 Base64Binary(Box<FHIRBase64Binary>),
1530 #[primitive]
1531 Boolean(Box<FHIRBoolean>),
1532 #[primitive]
1533 Canonical(Box<FHIRCanonical>),
1534 #[primitive]
1535 Code(Box<FHIRCode>),
1536 #[primitive]
1537 Date(Box<FHIRDate>),
1538 #[primitive]
1539 DateTime(Box<FHIRDateTime>),
1540 #[primitive]
1541 Decimal(Box<FHIRDecimal>),
1542 #[primitive]
1543 Id(Box<FHIRId>),
1544 #[primitive]
1545 Instant(Box<FHIRInstant>),
1546 #[primitive]
1547 Integer(Box<FHIRInteger>),
1548 #[primitive]
1549 Markdown(Box<FHIRMarkdown>),
1550 #[primitive]
1551 Oid(Box<FHIROid>),
1552 #[primitive]
1553 PositiveInt(Box<FHIRPositiveInt>),
1554 #[primitive]
1555 String(Box<FHIRString>),
1556 #[primitive]
1557 Time(Box<FHIRTime>),
1558 #[primitive]
1559 UnsignedInt(Box<FHIRUnsignedInt>),
1560 #[primitive]
1561 Uri(Box<FHIRUri>),
1562 #[primitive]
1563 Url(Box<FHIRUrl>),
1564 #[primitive]
1565 Uuid(Box<FHIRUuid>),
1566 Address(Box<Address>),
1567 Age(Box<Age>),
1568 Annotation(Box<Annotation>),
1569 Attachment(Box<Attachment>),
1570 CodeableConcept(Box<CodeableConcept>),
1571 Coding(Box<Coding>),
1572 ContactPoint(Box<ContactPoint>),
1573 Count(Box<Count>),
1574 Distance(Box<Distance>),
1575 Duration(Box<Duration>),
1576 HumanName(Box<HumanName>),
1577 Identifier(Box<Identifier>),
1578 Money(Box<Money>),
1579 Period(Box<Period>),
1580 Quantity(Box<Quantity>),
1581 Range(Box<Range>),
1582 Ratio(Box<Ratio>),
1583 Reference(Box<Reference>),
1584 SampledData(Box<SampledData>),
1585 Signature(Box<Signature>),
1586 Timing(Box<Timing>),
1587 ContactDetail(Box<ContactDetail>),
1588 Contributor(Box<Contributor>),
1589 DataRequirement(Box<DataRequirement>),
1590 Expression(Box<Expression>),
1591 ParameterDefinition(Box<ParameterDefinition>),
1592 RelatedArtifact(Box<RelatedArtifact>),
1593 TriggerDefinition(Box<TriggerDefinition>),
1594 UsageContext(Box<UsageContext>),
1595 Dosage(Box<Dosage>),
1596 Meta(Box<Meta>),
1597}
1598impl Default for ElementDefinitionDefaultValueTypeChoice {
1599 fn default() -> Self {
1600 ElementDefinitionDefaultValueTypeChoice::Base64Binary(Box::new(Default::default()))
1601 }
1602}
1603#[derive(
1604 Clone,
1605 Reflect,
1606 Debug,
1607 haste_fhir_serialization_json :: derive :: FHIRSerdeSerialize,
1608 haste_fhir_serialization_json :: derive :: FHIRSerdeDeserialize,
1609)]
1610#[fhir_serialize_type = "typechoice"]
1611#[type_choice_field_name = "fixed"]
1612pub enum ElementDefinitionFixedTypeChoice {
1613 #[primitive]
1614 Base64Binary(Box<FHIRBase64Binary>),
1615 #[primitive]
1616 Boolean(Box<FHIRBoolean>),
1617 #[primitive]
1618 Canonical(Box<FHIRCanonical>),
1619 #[primitive]
1620 Code(Box<FHIRCode>),
1621 #[primitive]
1622 Date(Box<FHIRDate>),
1623 #[primitive]
1624 DateTime(Box<FHIRDateTime>),
1625 #[primitive]
1626 Decimal(Box<FHIRDecimal>),
1627 #[primitive]
1628 Id(Box<FHIRId>),
1629 #[primitive]
1630 Instant(Box<FHIRInstant>),
1631 #[primitive]
1632 Integer(Box<FHIRInteger>),
1633 #[primitive]
1634 Markdown(Box<FHIRMarkdown>),
1635 #[primitive]
1636 Oid(Box<FHIROid>),
1637 #[primitive]
1638 PositiveInt(Box<FHIRPositiveInt>),
1639 #[primitive]
1640 String(Box<FHIRString>),
1641 #[primitive]
1642 Time(Box<FHIRTime>),
1643 #[primitive]
1644 UnsignedInt(Box<FHIRUnsignedInt>),
1645 #[primitive]
1646 Uri(Box<FHIRUri>),
1647 #[primitive]
1648 Url(Box<FHIRUrl>),
1649 #[primitive]
1650 Uuid(Box<FHIRUuid>),
1651 Address(Box<Address>),
1652 Age(Box<Age>),
1653 Annotation(Box<Annotation>),
1654 Attachment(Box<Attachment>),
1655 CodeableConcept(Box<CodeableConcept>),
1656 Coding(Box<Coding>),
1657 ContactPoint(Box<ContactPoint>),
1658 Count(Box<Count>),
1659 Distance(Box<Distance>),
1660 Duration(Box<Duration>),
1661 HumanName(Box<HumanName>),
1662 Identifier(Box<Identifier>),
1663 Money(Box<Money>),
1664 Period(Box<Period>),
1665 Quantity(Box<Quantity>),
1666 Range(Box<Range>),
1667 Ratio(Box<Ratio>),
1668 Reference(Box<Reference>),
1669 SampledData(Box<SampledData>),
1670 Signature(Box<Signature>),
1671 Timing(Box<Timing>),
1672 ContactDetail(Box<ContactDetail>),
1673 Contributor(Box<Contributor>),
1674 DataRequirement(Box<DataRequirement>),
1675 Expression(Box<Expression>),
1676 ParameterDefinition(Box<ParameterDefinition>),
1677 RelatedArtifact(Box<RelatedArtifact>),
1678 TriggerDefinition(Box<TriggerDefinition>),
1679 UsageContext(Box<UsageContext>),
1680 Dosage(Box<Dosage>),
1681 Meta(Box<Meta>),
1682}
1683impl Default for ElementDefinitionFixedTypeChoice {
1684 fn default() -> Self {
1685 ElementDefinitionFixedTypeChoice::Base64Binary(Box::new(Default::default()))
1686 }
1687}
1688#[derive(
1689 Clone,
1690 Reflect,
1691 Debug,
1692 haste_fhir_serialization_json :: derive :: FHIRSerdeSerialize,
1693 haste_fhir_serialization_json :: derive :: FHIRSerdeDeserialize,
1694)]
1695#[fhir_serialize_type = "typechoice"]
1696#[type_choice_field_name = "pattern"]
1697pub enum ElementDefinitionPatternTypeChoice {
1698 #[primitive]
1699 Base64Binary(Box<FHIRBase64Binary>),
1700 #[primitive]
1701 Boolean(Box<FHIRBoolean>),
1702 #[primitive]
1703 Canonical(Box<FHIRCanonical>),
1704 #[primitive]
1705 Code(Box<FHIRCode>),
1706 #[primitive]
1707 Date(Box<FHIRDate>),
1708 #[primitive]
1709 DateTime(Box<FHIRDateTime>),
1710 #[primitive]
1711 Decimal(Box<FHIRDecimal>),
1712 #[primitive]
1713 Id(Box<FHIRId>),
1714 #[primitive]
1715 Instant(Box<FHIRInstant>),
1716 #[primitive]
1717 Integer(Box<FHIRInteger>),
1718 #[primitive]
1719 Markdown(Box<FHIRMarkdown>),
1720 #[primitive]
1721 Oid(Box<FHIROid>),
1722 #[primitive]
1723 PositiveInt(Box<FHIRPositiveInt>),
1724 #[primitive]
1725 String(Box<FHIRString>),
1726 #[primitive]
1727 Time(Box<FHIRTime>),
1728 #[primitive]
1729 UnsignedInt(Box<FHIRUnsignedInt>),
1730 #[primitive]
1731 Uri(Box<FHIRUri>),
1732 #[primitive]
1733 Url(Box<FHIRUrl>),
1734 #[primitive]
1735 Uuid(Box<FHIRUuid>),
1736 Address(Box<Address>),
1737 Age(Box<Age>),
1738 Annotation(Box<Annotation>),
1739 Attachment(Box<Attachment>),
1740 CodeableConcept(Box<CodeableConcept>),
1741 Coding(Box<Coding>),
1742 ContactPoint(Box<ContactPoint>),
1743 Count(Box<Count>),
1744 Distance(Box<Distance>),
1745 Duration(Box<Duration>),
1746 HumanName(Box<HumanName>),
1747 Identifier(Box<Identifier>),
1748 Money(Box<Money>),
1749 Period(Box<Period>),
1750 Quantity(Box<Quantity>),
1751 Range(Box<Range>),
1752 Ratio(Box<Ratio>),
1753 Reference(Box<Reference>),
1754 SampledData(Box<SampledData>),
1755 Signature(Box<Signature>),
1756 Timing(Box<Timing>),
1757 ContactDetail(Box<ContactDetail>),
1758 Contributor(Box<Contributor>),
1759 DataRequirement(Box<DataRequirement>),
1760 Expression(Box<Expression>),
1761 ParameterDefinition(Box<ParameterDefinition>),
1762 RelatedArtifact(Box<RelatedArtifact>),
1763 TriggerDefinition(Box<TriggerDefinition>),
1764 UsageContext(Box<UsageContext>),
1765 Dosage(Box<Dosage>),
1766 Meta(Box<Meta>),
1767}
1768impl Default for ElementDefinitionPatternTypeChoice {
1769 fn default() -> Self {
1770 ElementDefinitionPatternTypeChoice::Base64Binary(Box::new(Default::default()))
1771 }
1772}
1773#[derive(
1774 Clone,
1775 Reflect,
1776 Debug,
1777 haste_fhir_serialization_json :: derive :: FHIRSerdeSerialize,
1778 haste_fhir_serialization_json :: derive :: FHIRSerdeDeserialize,
1779)]
1780#[fhir_serialize_type = "typechoice"]
1781#[type_choice_field_name = "value"]
1782pub enum ElementDefinitionExampleValueTypeChoice {
1783 #[primitive]
1784 Base64Binary(Box<FHIRBase64Binary>),
1785 #[primitive]
1786 Boolean(Box<FHIRBoolean>),
1787 #[primitive]
1788 Canonical(Box<FHIRCanonical>),
1789 #[primitive]
1790 Code(Box<FHIRCode>),
1791 #[primitive]
1792 Date(Box<FHIRDate>),
1793 #[primitive]
1794 DateTime(Box<FHIRDateTime>),
1795 #[primitive]
1796 Decimal(Box<FHIRDecimal>),
1797 #[primitive]
1798 Id(Box<FHIRId>),
1799 #[primitive]
1800 Instant(Box<FHIRInstant>),
1801 #[primitive]
1802 Integer(Box<FHIRInteger>),
1803 #[primitive]
1804 Markdown(Box<FHIRMarkdown>),
1805 #[primitive]
1806 Oid(Box<FHIROid>),
1807 #[primitive]
1808 PositiveInt(Box<FHIRPositiveInt>),
1809 #[primitive]
1810 String(Box<FHIRString>),
1811 #[primitive]
1812 Time(Box<FHIRTime>),
1813 #[primitive]
1814 UnsignedInt(Box<FHIRUnsignedInt>),
1815 #[primitive]
1816 Uri(Box<FHIRUri>),
1817 #[primitive]
1818 Url(Box<FHIRUrl>),
1819 #[primitive]
1820 Uuid(Box<FHIRUuid>),
1821 Address(Box<Address>),
1822 Age(Box<Age>),
1823 Annotation(Box<Annotation>),
1824 Attachment(Box<Attachment>),
1825 CodeableConcept(Box<CodeableConcept>),
1826 Coding(Box<Coding>),
1827 ContactPoint(Box<ContactPoint>),
1828 Count(Box<Count>),
1829 Distance(Box<Distance>),
1830 Duration(Box<Duration>),
1831 HumanName(Box<HumanName>),
1832 Identifier(Box<Identifier>),
1833 Money(Box<Money>),
1834 Period(Box<Period>),
1835 Quantity(Box<Quantity>),
1836 Range(Box<Range>),
1837 Ratio(Box<Ratio>),
1838 Reference(Box<Reference>),
1839 SampledData(Box<SampledData>),
1840 Signature(Box<Signature>),
1841 Timing(Box<Timing>),
1842 ContactDetail(Box<ContactDetail>),
1843 Contributor(Box<Contributor>),
1844 DataRequirement(Box<DataRequirement>),
1845 Expression(Box<Expression>),
1846 ParameterDefinition(Box<ParameterDefinition>),
1847 RelatedArtifact(Box<RelatedArtifact>),
1848 TriggerDefinition(Box<TriggerDefinition>),
1849 UsageContext(Box<UsageContext>),
1850 Dosage(Box<Dosage>),
1851 Meta(Box<Meta>),
1852}
1853impl Default for ElementDefinitionExampleValueTypeChoice {
1854 fn default() -> Self {
1855 ElementDefinitionExampleValueTypeChoice::Base64Binary(Box::new(Default::default()))
1856 }
1857}
1858#[derive(
1859 Clone,
1860 Reflect,
1861 Debug,
1862 Default,
1863 haste_fhir_serialization_json :: derive :: FHIRSerdeSerialize,
1864 haste_fhir_serialization_json :: derive :: FHIRSerdeDeserialize,
1865)]
1866#[fhir_type = "Element"]
1867#[fhir_serialize_type = "complex"]
1868#[doc = "A sample value for this element demonstrating the type of information that would typically be found in the element."]
1869pub struct ElementDefinitionExample {
1870 #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
1871 pub id: Option<String>,
1872 #[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."]
1873 pub extension: Option<Vec<Box<Extension>>>,
1874 #[primitive]
1875 #[doc = "Describes the purpose of this example amoung the set of examples."]
1876 pub label: Box<FHIRString>,
1877 # [type_choice_variants (complex = ["valueAddress" , "valueAge" , "valueAnnotation" , "valueAttachment" , "valueCodeableConcept" , "valueCoding" , "valueContactPoint" , "valueCount" , "valueDistance" , "valueDuration" , "valueHumanName" , "valueIdentifier" , "valueMoney" , "valuePeriod" , "valueQuantity" , "valueRange" , "valueRatio" , "valueReference" , "valueSampledData" , "valueSignature" , "valueTiming" , "valueContactDetail" , "valueContributor" , "valueDataRequirement" , "valueExpression" , "valueParameterDefinition" , "valueRelatedArtifact" , "valueTriggerDefinition" , "valueUsageContext" , "valueDosage" , "valueMeta"] , primitive = ["valueBase64Binary" , "valueBoolean" , "valueCanonical" , "valueCode" , "valueDate" , "valueDateTime" , "valueDecimal" , "valueId" , "valueInstant" , "valueInteger" , "valueMarkdown" , "valueOid" , "valuePositiveInt" , "valueString" , "valueTime" , "valueUnsignedInt" , "valueUri" , "valueUrl" , "valueUuid"])]
1878 #[doc = "The actual value for the element, which must be one of the types allowed for this element."]
1879 pub value: ElementDefinitionExampleValueTypeChoice,
1880}
1881#[derive(
1882 Clone,
1883 Reflect,
1884 Debug,
1885 haste_fhir_serialization_json :: derive :: FHIRSerdeSerialize,
1886 haste_fhir_serialization_json :: derive :: FHIRSerdeDeserialize,
1887)]
1888#[fhir_serialize_type = "typechoice"]
1889#[type_choice_field_name = "minValue"]
1890pub enum ElementDefinitionMinValueTypeChoice {
1891 #[primitive]
1892 Date(Box<FHIRDate>),
1893 #[primitive]
1894 DateTime(Box<FHIRDateTime>),
1895 #[primitive]
1896 Instant(Box<FHIRInstant>),
1897 #[primitive]
1898 Time(Box<FHIRTime>),
1899 #[primitive]
1900 Decimal(Box<FHIRDecimal>),
1901 #[primitive]
1902 Integer(Box<FHIRInteger>),
1903 #[primitive]
1904 PositiveInt(Box<FHIRPositiveInt>),
1905 #[primitive]
1906 UnsignedInt(Box<FHIRUnsignedInt>),
1907 Quantity(Box<Quantity>),
1908}
1909impl Default for ElementDefinitionMinValueTypeChoice {
1910 fn default() -> Self {
1911 ElementDefinitionMinValueTypeChoice::Date(Box::new(Default::default()))
1912 }
1913}
1914#[derive(
1915 Clone,
1916 Reflect,
1917 Debug,
1918 haste_fhir_serialization_json :: derive :: FHIRSerdeSerialize,
1919 haste_fhir_serialization_json :: derive :: FHIRSerdeDeserialize,
1920)]
1921#[fhir_serialize_type = "typechoice"]
1922#[type_choice_field_name = "maxValue"]
1923pub enum ElementDefinitionMaxValueTypeChoice {
1924 #[primitive]
1925 Date(Box<FHIRDate>),
1926 #[primitive]
1927 DateTime(Box<FHIRDateTime>),
1928 #[primitive]
1929 Instant(Box<FHIRInstant>),
1930 #[primitive]
1931 Time(Box<FHIRTime>),
1932 #[primitive]
1933 Decimal(Box<FHIRDecimal>),
1934 #[primitive]
1935 Integer(Box<FHIRInteger>),
1936 #[primitive]
1937 PositiveInt(Box<FHIRPositiveInt>),
1938 #[primitive]
1939 UnsignedInt(Box<FHIRUnsignedInt>),
1940 Quantity(Box<Quantity>),
1941}
1942impl Default for ElementDefinitionMaxValueTypeChoice {
1943 fn default() -> Self {
1944 ElementDefinitionMaxValueTypeChoice::Date(Box::new(Default::default()))
1945 }
1946}
1947#[derive(
1948 Clone,
1949 Reflect,
1950 Debug,
1951 Default,
1952 haste_fhir_serialization_json :: derive :: FHIRSerdeSerialize,
1953 haste_fhir_serialization_json :: derive :: FHIRSerdeDeserialize,
1954)]
1955#[fhir_type = "Element"]
1956#[fhir_serialize_type = "complex"]
1957#[doc = "Formal constraints such as co-occurrence and other constraints that can be computationally evaluated within the context of the instance."]
1958pub struct ElementDefinitionConstraint {
1959 #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
1960 pub id: Option<String>,
1961 #[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."]
1962 pub extension: Option<Vec<Box<Extension>>>,
1963 #[primitive]
1964 #[doc = "Allows identification of which elements have their cardinalities impacted by the constraint. Will not be referenced for constraints that do not affect cardinality."]
1965 pub key: Box<FHIRId>,
1966 #[primitive]
1967 #[doc = "Description of why this constraint is necessary or appropriate."]
1968 pub requirements: Option<Box<FHIRString>>,
1969 #[primitive]
1970 #[doc = "Identifies the impact constraint violation has on the conformance of the instance."]
1971 pub severity: Box<terminology::ConstraintSeverity>,
1972 #[primitive]
1973 #[doc = "Text that can be used to describe the constraint in messages identifying that the constraint has been violated."]
1974 pub human: Box<FHIRString>,
1975 #[primitive]
1976 #[doc = "A [FHIRPath](fhirpath.html) expression of constraint that can be executed to see if this constraint is met."]
1977 pub expression: Option<Box<FHIRString>>,
1978 #[primitive]
1979 #[doc = "An XPath expression of constraint that can be executed to see if this constraint is met."]
1980 pub xpath: Option<Box<FHIRString>>,
1981 #[primitive]
1982 #[doc = "A reference to the original source of the constraint, for traceability purposes."]
1983 pub source: Option<Box<FHIRCanonical>>,
1984}
1985#[derive(
1986 Clone,
1987 Reflect,
1988 Debug,
1989 Default,
1990 haste_fhir_serialization_json :: derive :: FHIRSerdeSerialize,
1991 haste_fhir_serialization_json :: derive :: FHIRSerdeDeserialize,
1992)]
1993#[fhir_type = "Element"]
1994#[fhir_serialize_type = "complex"]
1995#[doc = "Binds to a value set if this element is coded (code, Coding, CodeableConcept, Quantity), or the data types (string, uri)."]
1996pub struct ElementDefinitionBinding {
1997 #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
1998 pub id: Option<String>,
1999 #[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."]
2000 pub extension: Option<Vec<Box<Extension>>>,
2001 #[primitive]
2002 #[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."]
2003 pub strength: Box<terminology::BindingStrength>,
2004 #[primitive]
2005 #[doc = "Describes the intended use of this particular set of codes."]
2006 pub description: Option<Box<FHIRString>>,
2007 #[primitive]
2008 #[doc = "Refers to the value set that identifies the set of codes the binding refers to."]
2009 pub valueSet: Option<Box<FHIRCanonical>>,
2010}
2011#[derive(
2012 Clone,
2013 Reflect,
2014 Debug,
2015 Default,
2016 haste_fhir_serialization_json :: derive :: FHIRSerdeSerialize,
2017 haste_fhir_serialization_json :: derive :: FHIRSerdeDeserialize,
2018)]
2019#[fhir_type = "Element"]
2020#[fhir_serialize_type = "complex"]
2021#[doc = "Identifies a concept from an external specification that roughly corresponds to this element."]
2022pub struct ElementDefinitionMapping {
2023 #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
2024 pub id: Option<String>,
2025 #[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."]
2026 pub extension: Option<Vec<Box<Extension>>>,
2027 #[primitive]
2028 #[doc = "An internal reference to the definition of a mapping."]
2029 pub identity: Box<FHIRId>,
2030 #[primitive]
2031 #[doc = "Identifies the computable language in which mapping.map is expressed."]
2032 pub language: Option<Box<FHIRCode>>,
2033 #[primitive]
2034 #[doc = "Expresses what part of the target specification corresponds to this element."]
2035 pub map: Box<FHIRString>,
2036 #[primitive]
2037 #[doc = "Comments that provide information about the mapping or its use."]
2038 pub comment: Option<Box<FHIRString>>,
2039}
2040#[derive(
2041 Clone,
2042 Reflect,
2043 Debug,
2044 Default,
2045 haste_fhir_serialization_json :: derive :: FHIRSerdeSerialize,
2046 haste_fhir_serialization_json :: derive :: FHIRSerdeDeserialize,
2047)]
2048#[fhir_type = "ElementDefinition"]
2049#[fhir_serialize_type = "complex"]
2050#[doc = "Captures constraints on each element within the resource, profile, or extension."]
2051pub struct ElementDefinition {
2052 #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
2053 pub id: Option<String>,
2054 #[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."]
2055 pub extension: Option<Vec<Box<Extension>>>,
2056 #[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)."]
2057 pub modifierExtension: Option<Vec<Box<Extension>>>,
2058 #[primitive]
2059 #[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."]
2060 pub path: Box<FHIRString>,
2061 #[primitive]
2062 #[doc = "Codes that define how this element is represented in instances, when the deviation varies from the normal case."]
2063 pub representation: Option<Vec<Box<terminology::PropertyRepresentation>>>,
2064 #[primitive]
2065 #[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."]
2066 pub sliceName: Option<Box<FHIRString>>,
2067 #[primitive]
2068 #[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."]
2069 pub sliceIsConstraining: Option<Box<FHIRBoolean>>,
2070 #[primitive]
2071 #[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."]
2072 pub label: Option<Box<FHIRString>>,
2073 #[doc = "A code that has the same meaning as the element in a particular terminology."]
2074 pub code: Option<Vec<Box<Coding>>>,
2075 #[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)."]
2076 pub slicing: Option<ElementDefinitionSlicing>,
2077 #[primitive]
2078 #[doc = "A concise description of what this element means (e.g. for use in autogenerated summaries)."]
2079 pub short: Option<Box<FHIRString>>,
2080 #[primitive]
2081 #[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)."]
2082 pub definition: Option<Box<FHIRMarkdown>>,
2083 #[primitive]
2084 #[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)."]
2085 pub comment: Option<Box<FHIRMarkdown>>,
2086 #[primitive]
2087 #[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."]
2088 pub requirements: Option<Box<FHIRMarkdown>>,
2089 #[primitive]
2090 #[doc = "Identifies additional names by which this element might also be known."]
2091 pub alias: Option<Vec<Box<FHIRString>>>,
2092 #[primitive]
2093 #[doc = "The minimum number of times this element SHALL appear in the instance."]
2094 pub min: Option<Box<FHIRUnsignedInt>>,
2095 #[primitive]
2096 #[doc = "The maximum number of times this element is permitted to appear in the instance."]
2097 pub max: Option<Box<FHIRString>>,
2098 #[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."]
2099 pub base: Option<ElementDefinitionBase>,
2100 #[primitive]
2101 #[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."]
2102 pub contentReference: Option<Box<FHIRUri>>,
2103 #[rename_field = "type"]
2104 #[doc = "The data type or resource that the value of this element is permitted to be."]
2105 pub type_: Option<Vec<ElementDefinitionType>>,
2106 # [type_choice_variants (complex = ["defaultValueAddress" , "defaultValueAge" , "defaultValueAnnotation" , "defaultValueAttachment" , "defaultValueCodeableConcept" , "defaultValueCoding" , "defaultValueContactPoint" , "defaultValueCount" , "defaultValueDistance" , "defaultValueDuration" , "defaultValueHumanName" , "defaultValueIdentifier" , "defaultValueMoney" , "defaultValuePeriod" , "defaultValueQuantity" , "defaultValueRange" , "defaultValueRatio" , "defaultValueReference" , "defaultValueSampledData" , "defaultValueSignature" , "defaultValueTiming" , "defaultValueContactDetail" , "defaultValueContributor" , "defaultValueDataRequirement" , "defaultValueExpression" , "defaultValueParameterDefinition" , "defaultValueRelatedArtifact" , "defaultValueTriggerDefinition" , "defaultValueUsageContext" , "defaultValueDosage" , "defaultValueMeta"] , primitive = ["defaultValueBase64Binary" , "defaultValueBoolean" , "defaultValueCanonical" , "defaultValueCode" , "defaultValueDate" , "defaultValueDateTime" , "defaultValueDecimal" , "defaultValueId" , "defaultValueInstant" , "defaultValueInteger" , "defaultValueMarkdown" , "defaultValueOid" , "defaultValuePositiveInt" , "defaultValueString" , "defaultValueTime" , "defaultValueUnsignedInt" , "defaultValueUri" , "defaultValueUrl" , "defaultValueUuid"])]
2107 #[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')."]
2108 pub defaultValue: Option<ElementDefinitionDefaultValueTypeChoice>,
2109 #[primitive]
2110 #[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')."]
2111 pub meaningWhenMissing: Option<Box<FHIRMarkdown>>,
2112 #[primitive]
2113 #[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."]
2114 pub orderMeaning: Option<Box<FHIRString>>,
2115 # [type_choice_variants (complex = ["fixedAddress" , "fixedAge" , "fixedAnnotation" , "fixedAttachment" , "fixedCodeableConcept" , "fixedCoding" , "fixedContactPoint" , "fixedCount" , "fixedDistance" , "fixedDuration" , "fixedHumanName" , "fixedIdentifier" , "fixedMoney" , "fixedPeriod" , "fixedQuantity" , "fixedRange" , "fixedRatio" , "fixedReference" , "fixedSampledData" , "fixedSignature" , "fixedTiming" , "fixedContactDetail" , "fixedContributor" , "fixedDataRequirement" , "fixedExpression" , "fixedParameterDefinition" , "fixedRelatedArtifact" , "fixedTriggerDefinition" , "fixedUsageContext" , "fixedDosage" , "fixedMeta"] , primitive = ["fixedBase64Binary" , "fixedBoolean" , "fixedCanonical" , "fixedCode" , "fixedDate" , "fixedDateTime" , "fixedDecimal" , "fixedId" , "fixedInstant" , "fixedInteger" , "fixedMarkdown" , "fixedOid" , "fixedPositiveInt" , "fixedString" , "fixedTime" , "fixedUnsignedInt" , "fixedUri" , "fixedUrl" , "fixedUuid"])]
2116 #[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."]
2117 pub fixed: Option<ElementDefinitionFixedTypeChoice>,
2118 # [type_choice_variants (complex = ["patternAddress" , "patternAge" , "patternAnnotation" , "patternAttachment" , "patternCodeableConcept" , "patternCoding" , "patternContactPoint" , "patternCount" , "patternDistance" , "patternDuration" , "patternHumanName" , "patternIdentifier" , "patternMoney" , "patternPeriod" , "patternQuantity" , "patternRange" , "patternRatio" , "patternReference" , "patternSampledData" , "patternSignature" , "patternTiming" , "patternContactDetail" , "patternContributor" , "patternDataRequirement" , "patternExpression" , "patternParameterDefinition" , "patternRelatedArtifact" , "patternTriggerDefinition" , "patternUsageContext" , "patternDosage" , "patternMeta"] , primitive = ["patternBase64Binary" , "patternBoolean" , "patternCanonical" , "patternCode" , "patternDate" , "patternDateTime" , "patternDecimal" , "patternId" , "patternInstant" , "patternInteger" , "patternMarkdown" , "patternOid" , "patternPositiveInt" , "patternString" , "patternTime" , "patternUnsignedInt" , "patternUri" , "patternUrl" , "patternUuid"])]
2119 #[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."]
2120 pub pattern: Option<ElementDefinitionPatternTypeChoice>,
2121 #[doc = "A sample value for this element demonstrating the type of information that would typically be found in the element."]
2122 pub example: Option<Vec<ElementDefinitionExample>>,
2123 # [type_choice_variants (complex = ["minValueQuantity"] , primitive = ["minValueDate" , "minValueDateTime" , "minValueInstant" , "minValueTime" , "minValueDecimal" , "minValueInteger" , "minValuePositiveInt" , "minValueUnsignedInt"])]
2124 #[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."]
2125 pub minValue: Option<ElementDefinitionMinValueTypeChoice>,
2126 # [type_choice_variants (complex = ["maxValueQuantity"] , primitive = ["maxValueDate" , "maxValueDateTime" , "maxValueInstant" , "maxValueTime" , "maxValueDecimal" , "maxValueInteger" , "maxValuePositiveInt" , "maxValueUnsignedInt"])]
2127 #[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."]
2128 pub maxValue: Option<ElementDefinitionMaxValueTypeChoice>,
2129 #[primitive]
2130 #[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."]
2131 pub maxLength: Option<Box<FHIRInteger>>,
2132 #[primitive]
2133 #[doc = "A reference to an invariant that may make additional statements about the cardinality or value in the instance."]
2134 pub condition: Option<Vec<Box<FHIRId>>>,
2135 #[doc = "Formal constraints such as co-occurrence and other constraints that can be computationally evaluated within the context of the instance."]
2136 pub constraint: Option<Vec<ElementDefinitionConstraint>>,
2137 #[primitive]
2138 #[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."]
2139 pub mustSupport: Option<Box<FHIRBoolean>>,
2140 #[primitive]
2141 #[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."]
2142 pub isModifier: Option<Box<FHIRBoolean>>,
2143 #[primitive]
2144 #[doc = "Explains how that element affects the interpretation of the resource or element that contains it."]
2145 pub isModifierReason: Option<Box<FHIRString>>,
2146 #[primitive]
2147 #[doc = "Whether the element should be included if a client requests a search with the parameter _summary=true."]
2148 pub isSummary: Option<Box<FHIRBoolean>>,
2149 #[doc = "Binds to a value set if this element is coded (code, Coding, CodeableConcept, Quantity), or the data types (string, uri)."]
2150 pub binding: Option<ElementDefinitionBinding>,
2151 #[doc = "Identifies a concept from an external specification that roughly corresponds to this element."]
2152 pub mapping: Option<Vec<ElementDefinitionMapping>>,
2153}
2154#[derive(
2155 Clone,
2156 Reflect,
2157 Debug,
2158 Default,
2159 haste_fhir_serialization_json :: derive :: FHIRSerdeSerialize,
2160 haste_fhir_serialization_json :: derive :: FHIRSerdeDeserialize,
2161)]
2162#[fhir_type = "Expression"]
2163#[fhir_serialize_type = "complex"]
2164#[doc = "A expression that is evaluated in a specified context and returns a value. The context of use of the expression must specify the context in which the expression is evaluated, and how the result of the expression is used."]
2165pub struct Expression {
2166 #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
2167 pub id: Option<String>,
2168 #[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."]
2169 pub extension: Option<Vec<Box<Extension>>>,
2170 #[primitive]
2171 #[doc = "A brief, natural language description of the condition that effectively communicates the intended semantics."]
2172 pub description: Option<Box<FHIRString>>,
2173 #[primitive]
2174 #[doc = "A short name assigned to the expression to allow for multiple reuse of the expression in the context where it is defined."]
2175 pub name: Option<Box<FHIRId>>,
2176 #[primitive]
2177 #[doc = "The media type of the language for the expression."]
2178 pub language: Box<FHIRCode>,
2179 #[primitive]
2180 #[doc = "An expression in the specified language that returns a value."]
2181 pub expression: Option<Box<FHIRString>>,
2182 #[primitive]
2183 #[doc = "A URI that defines where the expression is found."]
2184 pub reference: Option<Box<FHIRUri>>,
2185}
2186#[derive(
2187 Clone,
2188 Reflect,
2189 Debug,
2190 haste_fhir_serialization_json :: derive :: FHIRSerdeSerialize,
2191 haste_fhir_serialization_json :: derive :: FHIRSerdeDeserialize,
2192)]
2193#[fhir_serialize_type = "typechoice"]
2194#[type_choice_field_name = "value"]
2195pub enum ExtensionValueTypeChoice {
2196 #[primitive]
2197 Base64Binary(Box<FHIRBase64Binary>),
2198 #[primitive]
2199 Boolean(Box<FHIRBoolean>),
2200 #[primitive]
2201 Canonical(Box<FHIRCanonical>),
2202 #[primitive]
2203 Code(Box<FHIRCode>),
2204 #[primitive]
2205 Date(Box<FHIRDate>),
2206 #[primitive]
2207 DateTime(Box<FHIRDateTime>),
2208 #[primitive]
2209 Decimal(Box<FHIRDecimal>),
2210 #[primitive]
2211 Id(Box<FHIRId>),
2212 #[primitive]
2213 Instant(Box<FHIRInstant>),
2214 #[primitive]
2215 Integer(Box<FHIRInteger>),
2216 #[primitive]
2217 Markdown(Box<FHIRMarkdown>),
2218 #[primitive]
2219 Oid(Box<FHIROid>),
2220 #[primitive]
2221 PositiveInt(Box<FHIRPositiveInt>),
2222 #[primitive]
2223 String(Box<FHIRString>),
2224 #[primitive]
2225 Time(Box<FHIRTime>),
2226 #[primitive]
2227 UnsignedInt(Box<FHIRUnsignedInt>),
2228 #[primitive]
2229 Uri(Box<FHIRUri>),
2230 #[primitive]
2231 Url(Box<FHIRUrl>),
2232 #[primitive]
2233 Uuid(Box<FHIRUuid>),
2234 Address(Box<Address>),
2235 Age(Box<Age>),
2236 Annotation(Box<Annotation>),
2237 Attachment(Box<Attachment>),
2238 CodeableConcept(Box<CodeableConcept>),
2239 Coding(Box<Coding>),
2240 ContactPoint(Box<ContactPoint>),
2241 Count(Box<Count>),
2242 Distance(Box<Distance>),
2243 Duration(Box<Duration>),
2244 HumanName(Box<HumanName>),
2245 Identifier(Box<Identifier>),
2246 Money(Box<Money>),
2247 Period(Box<Period>),
2248 Quantity(Box<Quantity>),
2249 Range(Box<Range>),
2250 Ratio(Box<Ratio>),
2251 Reference(Box<Reference>),
2252 SampledData(Box<SampledData>),
2253 Signature(Box<Signature>),
2254 Timing(Box<Timing>),
2255 ContactDetail(Box<ContactDetail>),
2256 Contributor(Box<Contributor>),
2257 DataRequirement(Box<DataRequirement>),
2258 Expression(Box<Expression>),
2259 ParameterDefinition(Box<ParameterDefinition>),
2260 RelatedArtifact(Box<RelatedArtifact>),
2261 TriggerDefinition(Box<TriggerDefinition>),
2262 UsageContext(Box<UsageContext>),
2263 Dosage(Box<Dosage>),
2264 Meta(Box<Meta>),
2265}
2266impl Default for ExtensionValueTypeChoice {
2267 fn default() -> Self {
2268 ExtensionValueTypeChoice::Base64Binary(Box::new(Default::default()))
2269 }
2270}
2271#[derive(
2272 Clone,
2273 Reflect,
2274 Debug,
2275 Default,
2276 haste_fhir_serialization_json :: derive :: FHIRSerdeSerialize,
2277 haste_fhir_serialization_json :: derive :: FHIRSerdeDeserialize,
2278)]
2279#[fhir_type = "Extension"]
2280#[fhir_serialize_type = "complex"]
2281#[doc = "Optional Extension Element - found in all resources."]
2282pub struct Extension {
2283 #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
2284 pub id: Option<String>,
2285 #[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."]
2286 pub extension: Option<Vec<Box<Extension>>>,
2287 #[doc = "Source of the definition for the extension code - a logical name or a URL."]
2288 pub url: String,
2289 # [type_choice_variants (complex = ["valueAddress" , "valueAge" , "valueAnnotation" , "valueAttachment" , "valueCodeableConcept" , "valueCoding" , "valueContactPoint" , "valueCount" , "valueDistance" , "valueDuration" , "valueHumanName" , "valueIdentifier" , "valueMoney" , "valuePeriod" , "valueQuantity" , "valueRange" , "valueRatio" , "valueReference" , "valueSampledData" , "valueSignature" , "valueTiming" , "valueContactDetail" , "valueContributor" , "valueDataRequirement" , "valueExpression" , "valueParameterDefinition" , "valueRelatedArtifact" , "valueTriggerDefinition" , "valueUsageContext" , "valueDosage" , "valueMeta"] , primitive = ["valueBase64Binary" , "valueBoolean" , "valueCanonical" , "valueCode" , "valueDate" , "valueDateTime" , "valueDecimal" , "valueId" , "valueInstant" , "valueInteger" , "valueMarkdown" , "valueOid" , "valuePositiveInt" , "valueString" , "valueTime" , "valueUnsignedInt" , "valueUri" , "valueUrl" , "valueUuid"])]
2290 #[doc = "Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list)."]
2291 pub value: Option<ExtensionValueTypeChoice>,
2292}
2293#[derive(
2294 Clone,
2295 Reflect,
2296 Debug,
2297 Default,
2298 haste_fhir_serialization_json :: derive :: FHIRSerdeSerialize,
2299 haste_fhir_serialization_json :: derive :: FHIRSerdeDeserialize,
2300)]
2301#[fhir_type = "HumanName"]
2302#[fhir_serialize_type = "complex"]
2303#[doc = "A human's name with the ability to identify parts and usage."]
2304pub struct HumanName {
2305 #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
2306 pub id: Option<String>,
2307 #[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."]
2308 pub extension: Option<Vec<Box<Extension>>>,
2309 #[rename_field = "use"]
2310 #[primitive]
2311 #[doc = "Identifies the purpose for this name."]
2312 pub use_: Option<Box<terminology::NameUse>>,
2313 #[primitive]
2314 #[doc = "Specifies the entire name as it should be displayed e.g. on an application UI. This may be provided instead of or as well as the specific parts."]
2315 pub text: Option<Box<FHIRString>>,
2316 #[primitive]
2317 #[doc = "The part of a name that links to the genealogy. In some cultures (e.g. Eritrea) the family name of a son is the first name of his father."]
2318 pub family: Option<Box<FHIRString>>,
2319 #[primitive]
2320 #[doc = "Given name."]
2321 pub given: Option<Vec<Box<FHIRString>>>,
2322 #[primitive]
2323 #[doc = "Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the start of the name."]
2324 pub prefix: Option<Vec<Box<FHIRString>>>,
2325 #[primitive]
2326 #[doc = "Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the end of the name."]
2327 pub suffix: Option<Vec<Box<FHIRString>>>,
2328 #[doc = "Indicates the period of time when this name was valid for the named person."]
2329 pub period: Option<Box<Period>>,
2330}
2331#[derive(
2332 Clone,
2333 Reflect,
2334 Debug,
2335 Default,
2336 haste_fhir_serialization_json :: derive :: FHIRSerdeSerialize,
2337 haste_fhir_serialization_json :: derive :: FHIRSerdeDeserialize,
2338)]
2339#[fhir_type = "Identifier"]
2340#[fhir_serialize_type = "complex"]
2341#[doc = "An identifier - identifies some entity uniquely and unambiguously. Typically this is used for business identifiers."]
2342pub struct Identifier {
2343 #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
2344 pub id: Option<String>,
2345 #[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."]
2346 pub extension: Option<Vec<Box<Extension>>>,
2347 #[rename_field = "use"]
2348 #[primitive]
2349 #[doc = "The purpose of this identifier."]
2350 pub use_: Option<Box<terminology::IdentifierUse>>,
2351 #[rename_field = "type"]
2352 #[doc = "A coded type for the identifier that can be used to determine which identifier to use for a specific purpose."]
2353 pub type_: Option<Box<CodeableConcept>>,
2354 #[primitive]
2355 #[doc = "Establishes the namespace for the value - that is, a URL that describes a set values that are unique."]
2356 pub system: Option<Box<FHIRUri>>,
2357 #[primitive]
2358 #[doc = "The portion of the identifier typically relevant to the user and which is unique within the context of the system."]
2359 pub value: Option<Box<FHIRString>>,
2360 #[doc = "Time period during which identifier is/was valid for use."]
2361 pub period: Option<Box<Period>>,
2362 # [reference (targets = ["Organization"])]
2363 #[doc = "Organization that issued/manages the identifier."]
2364 pub assigner: Option<Box<Reference>>,
2365}
2366#[derive(
2367 Clone,
2368 Reflect,
2369 Debug,
2370 Default,
2371 haste_fhir_serialization_json :: derive :: FHIRSerdeSerialize,
2372 haste_fhir_serialization_json :: derive :: FHIRSerdeDeserialize,
2373)]
2374#[fhir_type = "MarketingStatus"]
2375#[fhir_serialize_type = "complex"]
2376#[doc = "The marketing status describes the date when a medicinal product is actually put on the market or the date as of which it is no longer available."]
2377pub struct MarketingStatus {
2378 #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
2379 pub id: Option<String>,
2380 #[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."]
2381 pub extension: Option<Vec<Box<Extension>>>,
2382 #[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)."]
2383 pub modifierExtension: Option<Vec<Box<Extension>>>,
2384 #[doc = "The country in which the marketing authorisation has been granted shall be specified It should be specified using the ISO 3166 ‑ 1 alpha-2 code elements."]
2385 pub country: Box<CodeableConcept>,
2386 #[doc = "Where a Medicines Regulatory Agency has granted a marketing authorisation for which specific provisions within a jurisdiction apply, the jurisdiction can be specified using an appropriate controlled terminology The controlled term and the controlled term identifier shall be specified."]
2387 pub jurisdiction: Option<Box<CodeableConcept>>,
2388 #[doc = "This attribute provides information on the status of the marketing of the medicinal product See ISO/TS 20443 for more information and examples."]
2389 pub status: Box<CodeableConcept>,
2390 #[doc = "The date when the Medicinal Product is placed on the market by the Marketing Authorisation Holder (or where applicable, the manufacturer/distributor) in a country and/or jurisdiction shall be provided A complete date consisting of day, month and year shall be specified using the ISO 8601 date format NOTE “Placed on the market” refers to the release of the Medicinal Product into the distribution chain."]
2391 pub dateRange: Box<Period>,
2392 #[primitive]
2393 #[doc = "The date when the Medicinal Product is placed on the market by the Marketing Authorisation Holder (or where applicable, the manufacturer/distributor) in a country and/or jurisdiction shall be provided A complete date consisting of day, month and year shall be specified using the ISO 8601 date format NOTE “Placed on the market” refers to the release of the Medicinal Product into the distribution chain."]
2394 pub restoreDate: Option<Box<FHIRDateTime>>,
2395}
2396#[derive(
2397 Clone,
2398 Reflect,
2399 Debug,
2400 Default,
2401 haste_fhir_serialization_json :: derive :: FHIRSerdeSerialize,
2402 haste_fhir_serialization_json :: derive :: FHIRSerdeDeserialize,
2403)]
2404#[fhir_type = "Meta"]
2405#[fhir_serialize_type = "complex"]
2406#[doc = "The metadata about a resource. This is content in the resource that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource."]
2407pub struct Meta {
2408 #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
2409 pub id: Option<String>,
2410 #[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."]
2411 pub extension: Option<Vec<Box<Extension>>>,
2412 #[primitive]
2413 #[doc = "The version specific identifier, as it appears in the version portion of the URL. This value changes when the resource is created, updated, or deleted."]
2414 pub versionId: Option<Box<FHIRId>>,
2415 #[primitive]
2416 #[doc = "When the resource last changed - e.g. when the version changed."]
2417 pub lastUpdated: Option<Box<FHIRInstant>>,
2418 #[primitive]
2419 #[doc = "A uri that identifies the source system of the resource. This provides a minimal amount of [Provenance](provenance.html#) information that can be used to track or differentiate the source of information in the resource. The source may identify another FHIR server, document, message, database, etc."]
2420 pub source: Option<Box<FHIRUri>>,
2421 #[primitive]
2422 #[doc = "A list of profiles (references to [StructureDefinition](structuredefinition.html#) resources) that this resource claims to conform to. The URL is a reference to [StructureDefinition.url](structuredefinition-definitions.html#StructureDefinition.url)."]
2423 pub profile: Option<Vec<Box<FHIRCanonical>>>,
2424 #[doc = "Security labels applied to this resource. These tags connect specific resources to the overall security policy and infrastructure."]
2425 pub security: Option<Vec<Box<Coding>>>,
2426 #[doc = "Tags applied to this resource. Tags are intended to be used to identify and relate resources to process and workflow, and applications are not required to consider the tags when interpreting the meaning of a resource."]
2427 pub tag: Option<Vec<Box<Coding>>>,
2428}
2429#[derive(
2430 Clone,
2431 Reflect,
2432 Debug,
2433 Default,
2434 haste_fhir_serialization_json :: derive :: FHIRSerdeSerialize,
2435 haste_fhir_serialization_json :: derive :: FHIRSerdeDeserialize,
2436)]
2437#[fhir_type = "Money"]
2438#[fhir_serialize_type = "complex"]
2439#[doc = "An amount of economic utility in some recognized currency."]
2440pub struct Money {
2441 #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
2442 pub id: Option<String>,
2443 #[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."]
2444 pub extension: Option<Vec<Box<Extension>>>,
2445 #[primitive]
2446 #[doc = "Numerical value (with implicit precision)."]
2447 pub value: Option<Box<FHIRDecimal>>,
2448 #[primitive]
2449 #[doc = "ISO 4217 Currency Code."]
2450 pub currency: Option<Box<FHIRCode>>,
2451}
2452#[derive(
2453 Clone,
2454 Reflect,
2455 Debug,
2456 Default,
2457 haste_fhir_serialization_json :: derive :: FHIRSerdeSerialize,
2458 haste_fhir_serialization_json :: derive :: FHIRSerdeDeserialize,
2459)]
2460#[fhir_type = "Narrative"]
2461#[fhir_serialize_type = "complex"]
2462#[doc = "A human-readable summary of the resource conveying the essential clinical and business information for the resource."]
2463pub struct Narrative {
2464 #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
2465 pub id: Option<String>,
2466 #[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."]
2467 pub extension: Option<Vec<Box<Extension>>>,
2468 #[primitive]
2469 #[doc = "The status of the narrative - whether it's entirely generated (from just the defined data or the extensions too), or whether a human authored it and it may contain additional data."]
2470 pub status: Box<terminology::NarrativeStatus>,
2471 #[primitive]
2472 #[doc = "The actual narrative content, a stripped down version of XHTML."]
2473 pub div: Box<FHIRXhtml>,
2474}
2475#[derive(
2476 Clone,
2477 Reflect,
2478 Debug,
2479 Default,
2480 haste_fhir_serialization_json :: derive :: FHIRSerdeSerialize,
2481 haste_fhir_serialization_json :: derive :: FHIRSerdeDeserialize,
2482)]
2483#[fhir_type = "ParameterDefinition"]
2484#[fhir_serialize_type = "complex"]
2485#[doc = "The parameters to the module. This collection specifies both the input and output parameters. Input parameters are provided by the caller as part of the $evaluate operation. Output parameters are included in the GuidanceResponse."]
2486pub struct ParameterDefinition {
2487 #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
2488 pub id: Option<String>,
2489 #[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."]
2490 pub extension: Option<Vec<Box<Extension>>>,
2491 #[primitive]
2492 #[doc = "The name of the parameter used to allow access to the value of the parameter in evaluation contexts."]
2493 pub name: Option<Box<FHIRCode>>,
2494 #[rename_field = "use"]
2495 #[primitive]
2496 #[doc = "Whether the parameter is input or output for the module."]
2497 pub use_: Box<terminology::OperationParameterUse>,
2498 #[primitive]
2499 #[doc = "The minimum number of times this parameter SHALL appear in the request or response."]
2500 pub min: Option<Box<FHIRInteger>>,
2501 #[primitive]
2502 #[doc = "The maximum number of times this element is permitted to appear in the request or response."]
2503 pub max: Option<Box<FHIRString>>,
2504 #[primitive]
2505 #[doc = "A brief discussion of what the parameter is for and how it is used by the module."]
2506 pub documentation: Option<Box<FHIRString>>,
2507 #[rename_field = "type"]
2508 #[primitive]
2509 #[doc = "The type of the parameter."]
2510 pub type_: Box<terminology::AllTypes>,
2511 #[primitive]
2512 #[doc = "If specified, this indicates a profile that the input data must conform to, or that the output data will conform to."]
2513 pub profile: Option<Box<FHIRCanonical>>,
2514}
2515#[derive(
2516 Clone,
2517 Reflect,
2518 Debug,
2519 Default,
2520 haste_fhir_serialization_json :: derive :: FHIRSerdeSerialize,
2521 haste_fhir_serialization_json :: derive :: FHIRSerdeDeserialize,
2522)]
2523#[fhir_type = "Period"]
2524#[fhir_serialize_type = "complex"]
2525#[doc = "A time period defined by a start and end date and optionally time."]
2526pub struct Period {
2527 #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
2528 pub id: Option<String>,
2529 #[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."]
2530 pub extension: Option<Vec<Box<Extension>>>,
2531 #[primitive]
2532 #[doc = "The start of the period. The boundary is inclusive."]
2533 pub start: Option<Box<FHIRDateTime>>,
2534 #[primitive]
2535 #[doc = "The end of the period. If the end of the period is missing, it means no end was known or planned at the time the instance was created. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time."]
2536 pub end: Option<Box<FHIRDateTime>>,
2537}
2538#[derive(
2539 Clone,
2540 Reflect,
2541 Debug,
2542 haste_fhir_serialization_json :: derive :: FHIRSerdeSerialize,
2543 haste_fhir_serialization_json :: derive :: FHIRSerdeDeserialize,
2544)]
2545#[fhir_serialize_type = "typechoice"]
2546#[type_choice_field_name = "age"]
2547pub enum PopulationAgeTypeChoice {
2548 Range(Box<Range>),
2549 CodeableConcept(Box<CodeableConcept>),
2550}
2551impl Default for PopulationAgeTypeChoice {
2552 fn default() -> Self {
2553 PopulationAgeTypeChoice::Range(Box::new(Default::default()))
2554 }
2555}
2556#[derive(
2557 Clone,
2558 Reflect,
2559 Debug,
2560 Default,
2561 haste_fhir_serialization_json :: derive :: FHIRSerdeSerialize,
2562 haste_fhir_serialization_json :: derive :: FHIRSerdeDeserialize,
2563)]
2564#[fhir_type = "Population"]
2565#[fhir_serialize_type = "complex"]
2566#[doc = "A populatioof people with some set of grouping criteria."]
2567pub struct Population {
2568 #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
2569 pub id: Option<String>,
2570 #[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."]
2571 pub extension: Option<Vec<Box<Extension>>>,
2572 #[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)."]
2573 pub modifierExtension: Option<Vec<Box<Extension>>>,
2574 # [type_choice_variants (complex = ["ageRange" , "ageCodeableConcept"] , primitive = [])]
2575 #[doc = "The age of the specific population."]
2576 pub age: Option<PopulationAgeTypeChoice>,
2577 #[doc = "The gender of the specific population."]
2578 pub gender: Option<Box<CodeableConcept>>,
2579 #[doc = "Race of the specific population."]
2580 pub race: Option<Box<CodeableConcept>>,
2581 #[doc = "The existing physiological conditions of the specific population to which this applies."]
2582 pub physiologicalCondition: Option<Box<CodeableConcept>>,
2583}
2584#[derive(
2585 Clone,
2586 Reflect,
2587 Debug,
2588 Default,
2589 haste_fhir_serialization_json :: derive :: FHIRSerdeSerialize,
2590 haste_fhir_serialization_json :: derive :: FHIRSerdeDeserialize,
2591)]
2592#[fhir_type = "ProdCharacteristic"]
2593#[fhir_serialize_type = "complex"]
2594#[doc = "The marketing status describes the date when a medicinal product is actually put on the market or the date as of which it is no longer available."]
2595pub struct ProdCharacteristic {
2596 #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
2597 pub id: Option<String>,
2598 #[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."]
2599 pub extension: Option<Vec<Box<Extension>>>,
2600 #[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)."]
2601 pub modifierExtension: Option<Vec<Box<Extension>>>,
2602 #[doc = "Where applicable, the height can be specified using a numerical value and its unit of measurement The unit of measurement shall be specified in accordance with ISO 11240 and the resulting terminology The symbol and the symbol identifier shall be used."]
2603 pub height: Option<Box<Quantity>>,
2604 #[doc = "Where applicable, the width can be specified using a numerical value and its unit of measurement The unit of measurement shall be specified in accordance with ISO 11240 and the resulting terminology The symbol and the symbol identifier shall be used."]
2605 pub width: Option<Box<Quantity>>,
2606 #[doc = "Where applicable, the depth can be specified using a numerical value and its unit of measurement The unit of measurement shall be specified in accordance with ISO 11240 and the resulting terminology The symbol and the symbol identifier shall be used."]
2607 pub depth: Option<Box<Quantity>>,
2608 #[doc = "Where applicable, the weight can be specified using a numerical value and its unit of measurement The unit of measurement shall be specified in accordance with ISO 11240 and the resulting terminology The symbol and the symbol identifier shall be used."]
2609 pub weight: Option<Box<Quantity>>,
2610 #[doc = "Where applicable, the nominal volume can be specified using a numerical value and its unit of measurement The unit of measurement shall be specified in accordance with ISO 11240 and the resulting terminology The symbol and the symbol identifier shall be used."]
2611 pub nominalVolume: Option<Box<Quantity>>,
2612 #[doc = "Where applicable, the external diameter can be specified using a numerical value and its unit of measurement The unit of measurement shall be specified in accordance with ISO 11240 and the resulting terminology The symbol and the symbol identifier shall be used."]
2613 pub externalDiameter: Option<Box<Quantity>>,
2614 #[primitive]
2615 #[doc = "Where applicable, the shape can be specified An appropriate controlled vocabulary shall be used The term and the term identifier shall be used."]
2616 pub shape: Option<Box<FHIRString>>,
2617 #[primitive]
2618 #[doc = "Where applicable, the color can be specified An appropriate controlled vocabulary shall be used The term and the term identifier shall be used."]
2619 pub color: Option<Vec<Box<FHIRString>>>,
2620 #[primitive]
2621 #[doc = "Where applicable, the imprint can be specified as text."]
2622 pub imprint: Option<Vec<Box<FHIRString>>>,
2623 #[doc = "Where applicable, the image can be provided The format of the image attachment shall be specified by regional implementations."]
2624 pub image: Option<Vec<Box<Attachment>>>,
2625 #[doc = "Where applicable, the scoring can be specified An appropriate controlled vocabulary shall be used The term and the term identifier shall be used."]
2626 pub scoring: Option<Box<CodeableConcept>>,
2627}
2628#[derive(
2629 Clone,
2630 Reflect,
2631 Debug,
2632 Default,
2633 haste_fhir_serialization_json :: derive :: FHIRSerdeSerialize,
2634 haste_fhir_serialization_json :: derive :: FHIRSerdeDeserialize,
2635)]
2636#[fhir_type = "ProductShelfLife"]
2637#[fhir_serialize_type = "complex"]
2638#[doc = "The shelf-life and storage information for a medicinal product item or container can be described using this class."]
2639pub struct ProductShelfLife {
2640 #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
2641 pub id: Option<String>,
2642 #[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."]
2643 pub extension: Option<Vec<Box<Extension>>>,
2644 #[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)."]
2645 pub modifierExtension: Option<Vec<Box<Extension>>>,
2646 #[rename_field = "identifier"]
2647 #[doc = "Unique identifier for the packaged Medicinal Product."]
2648 pub identifier_: Option<Box<Identifier>>,
2649 #[rename_field = "type"]
2650 #[doc = "This describes the shelf life, taking into account various scenarios such as shelf life of the packaged Medicinal Product itself, shelf life after transformation where necessary and shelf life after the first opening of a bottle, etc. The shelf life type shall be specified using an appropriate controlled vocabulary The controlled term and the controlled term identifier shall be specified."]
2651 pub type_: Box<CodeableConcept>,
2652 #[doc = "The shelf life time period can be specified using a numerical value for the period of time and its unit of time measurement The unit of measurement shall be specified in accordance with ISO 11240 and the resulting terminology The symbol and the symbol identifier shall be used."]
2653 pub period: Box<Quantity>,
2654 #[doc = "Special precautions for storage, if any, can be specified using an appropriate controlled vocabulary The controlled term and the controlled term identifier shall be specified."]
2655 pub specialPrecautionsForStorage: Option<Vec<Box<CodeableConcept>>>,
2656}
2657#[derive(
2658 Clone,
2659 Reflect,
2660 Debug,
2661 Default,
2662 haste_fhir_serialization_json :: derive :: FHIRSerdeSerialize,
2663 haste_fhir_serialization_json :: derive :: FHIRSerdeDeserialize,
2664)]
2665#[fhir_type = "Quantity"]
2666#[fhir_serialize_type = "complex"]
2667#[doc = "A measured amount (or an amount that can potentially be measured). Note that measured amounts include amounts that are not precisely quantified, including amounts involving arbitrary units and floating currencies."]
2668pub struct Quantity {
2669 #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
2670 pub id: Option<String>,
2671 #[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."]
2672 pub extension: Option<Vec<Box<Extension>>>,
2673 #[primitive]
2674 #[doc = "The value of the measured amount. The value includes an implicit precision in the presentation of the value."]
2675 pub value: Option<Box<FHIRDecimal>>,
2676 #[primitive]
2677 #[doc = "How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is \"<\" , then the real value is < stated value."]
2678 pub comparator: Option<Box<terminology::QuantityComparator>>,
2679 #[primitive]
2680 #[doc = "A human-readable form of the unit."]
2681 pub unit: Option<Box<FHIRString>>,
2682 #[primitive]
2683 #[doc = "The identification of the system that provides the coded form of the unit."]
2684 pub system: Option<Box<FHIRUri>>,
2685 #[primitive]
2686 #[doc = "A computer processable form of the unit in some unit representation system."]
2687 pub code: Option<Box<FHIRCode>>,
2688}
2689#[derive(
2690 Clone,
2691 Reflect,
2692 Debug,
2693 Default,
2694 haste_fhir_serialization_json :: derive :: FHIRSerdeSerialize,
2695 haste_fhir_serialization_json :: derive :: FHIRSerdeDeserialize,
2696)]
2697#[fhir_type = "Range"]
2698#[fhir_serialize_type = "complex"]
2699#[doc = "A set of ordered Quantities defined by a low and high limit."]
2700pub struct Range {
2701 #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
2702 pub id: Option<String>,
2703 #[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."]
2704 pub extension: Option<Vec<Box<Extension>>>,
2705 #[doc = "The low limit. The boundary is inclusive."]
2706 pub low: Option<Box<Quantity>>,
2707 #[doc = "The high limit. The boundary is inclusive."]
2708 pub high: Option<Box<Quantity>>,
2709}
2710#[derive(
2711 Clone,
2712 Reflect,
2713 Debug,
2714 Default,
2715 haste_fhir_serialization_json :: derive :: FHIRSerdeSerialize,
2716 haste_fhir_serialization_json :: derive :: FHIRSerdeDeserialize,
2717)]
2718#[fhir_type = "Ratio"]
2719#[fhir_serialize_type = "complex"]
2720#[doc = "A relationship of two Quantity values - expressed as a numerator and a denominator."]
2721pub struct Ratio {
2722 #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
2723 pub id: Option<String>,
2724 #[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."]
2725 pub extension: Option<Vec<Box<Extension>>>,
2726 #[doc = "The value of the numerator."]
2727 pub numerator: Option<Box<Quantity>>,
2728 #[doc = "The value of the denominator."]
2729 pub denominator: Option<Box<Quantity>>,
2730}
2731#[derive(
2732 Clone,
2733 Reflect,
2734 Debug,
2735 Default,
2736 haste_fhir_serialization_json :: derive :: FHIRSerdeSerialize,
2737 haste_fhir_serialization_json :: derive :: FHIRSerdeDeserialize,
2738)]
2739#[fhir_type = "Reference"]
2740#[fhir_serialize_type = "complex"]
2741#[doc = "A reference from one resource to another."]
2742pub struct Reference {
2743 #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
2744 pub id: Option<String>,
2745 #[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."]
2746 pub extension: Option<Vec<Box<Extension>>>,
2747 #[primitive]
2748 #[doc = "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources."]
2749 pub reference: Option<Box<FHIRString>>,
2750 #[rename_field = "type"]
2751 #[primitive]
2752 #[doc = "The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent.\n\nThe type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. \"Patient\" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources)."]
2753 pub type_: Option<Box<FHIRUri>>,
2754 #[rename_field = "identifier"]
2755 #[doc = "An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference."]
2756 pub identifier_: Option<Box<Identifier>>,
2757 #[primitive]
2758 #[doc = "Plain text narrative that identifies the resource in addition to the resource reference."]
2759 pub display: Option<Box<FHIRString>>,
2760}
2761#[derive(
2762 Clone,
2763 Reflect,
2764 Debug,
2765 Default,
2766 haste_fhir_serialization_json :: derive :: FHIRSerdeSerialize,
2767 haste_fhir_serialization_json :: derive :: FHIRSerdeDeserialize,
2768)]
2769#[fhir_type = "RelatedArtifact"]
2770#[fhir_serialize_type = "complex"]
2771#[doc = "Related artifacts such as additional documentation, justification, or bibliographic references."]
2772pub struct RelatedArtifact {
2773 #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
2774 pub id: Option<String>,
2775 #[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."]
2776 pub extension: Option<Vec<Box<Extension>>>,
2777 #[rename_field = "type"]
2778 #[primitive]
2779 #[doc = "The type of relationship to the related artifact."]
2780 pub type_: Box<terminology::RelatedArtifactType>,
2781 #[primitive]
2782 #[doc = "A short label that can be used to reference the citation from elsewhere in the containing artifact, such as a footnote index."]
2783 pub label: Option<Box<FHIRString>>,
2784 #[primitive]
2785 #[doc = "A brief description of the document or knowledge resource being referenced, suitable for display to a consumer."]
2786 pub display: Option<Box<FHIRString>>,
2787 #[primitive]
2788 #[doc = "A bibliographic citation for the related artifact. This text SHOULD be formatted according to an accepted citation format."]
2789 pub citation: Option<Box<FHIRMarkdown>>,
2790 #[primitive]
2791 #[doc = "A url for the artifact that can be followed to access the actual content."]
2792 pub url: Option<Box<FHIRUrl>>,
2793 #[doc = "The document being referenced, represented as an attachment. This is exclusive with the resource element."]
2794 pub document: Option<Box<Attachment>>,
2795 #[primitive]
2796 #[doc = "The related resource, such as a library, value set, profile, or other knowledge resource."]
2797 pub resource: Option<Box<FHIRCanonical>>,
2798}
2799#[derive(
2800 Clone,
2801 Reflect,
2802 Debug,
2803 Default,
2804 haste_fhir_serialization_json :: derive :: FHIRSerdeSerialize,
2805 haste_fhir_serialization_json :: derive :: FHIRSerdeDeserialize,
2806)]
2807#[fhir_type = "SampledData"]
2808#[fhir_serialize_type = "complex"]
2809#[doc = "A series of measurements taken by a device, with upper and lower limits. There may be more than one dimension in the data."]
2810pub struct SampledData {
2811 #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
2812 pub id: Option<String>,
2813 #[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."]
2814 pub extension: Option<Vec<Box<Extension>>>,
2815 #[doc = "The base quantity that a measured value of zero represents. In addition, this provides the units of the entire measurement series."]
2816 pub origin: Box<Quantity>,
2817 #[primitive]
2818 #[doc = "The length of time between sampling times, measured in milliseconds."]
2819 pub period: Box<FHIRDecimal>,
2820 #[primitive]
2821 #[doc = "A correction factor that is applied to the sampled data points before they are added to the origin."]
2822 pub factor: Option<Box<FHIRDecimal>>,
2823 #[primitive]
2824 #[doc = "The lower limit of detection of the measured points. This is needed if any of the data points have the value \"L\" (lower than detection limit)."]
2825 pub lowerLimit: Option<Box<FHIRDecimal>>,
2826 #[primitive]
2827 #[doc = "The upper limit of detection of the measured points. This is needed if any of the data points have the value \"U\" (higher than detection limit)."]
2828 pub upperLimit: Option<Box<FHIRDecimal>>,
2829 #[primitive]
2830 #[doc = "The number of sample points at each time point. If this value is greater than one, then the dimensions will be interlaced - all the sample points for a point in time will be recorded at once."]
2831 pub dimensions: Box<FHIRPositiveInt>,
2832 #[primitive]
2833 #[doc = "A series of data points which are decimal values separated by a single space (character u20). The special values \"E\" (error), \"L\" (below detection limit) and \"U\" (above detection limit) can also be used in place of a decimal value."]
2834 pub data: Option<Box<FHIRString>>,
2835}
2836#[derive(
2837 Clone,
2838 Reflect,
2839 Debug,
2840 Default,
2841 haste_fhir_serialization_json :: derive :: FHIRSerdeSerialize,
2842 haste_fhir_serialization_json :: derive :: FHIRSerdeDeserialize,
2843)]
2844#[fhir_type = "Signature"]
2845#[fhir_serialize_type = "complex"]
2846#[doc = "A signature along with supporting context. The signature may be a digital signature that is cryptographic in nature, or some other signature acceptable to the domain. This other signature may be as simple as a graphical image representing a hand-written signature, or a signature ceremony Different signature approaches have different utilities."]
2847pub struct Signature {
2848 #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
2849 pub id: Option<String>,
2850 #[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."]
2851 pub extension: Option<Vec<Box<Extension>>>,
2852 #[rename_field = "type"]
2853 #[cardinality(min = 1usize)]
2854 #[doc = "An indication of the reason that the entity signed this document. This may be explicitly included as part of the signature information and can be used when determining accountability for various actions concerning the document."]
2855 pub type_: Vec<Box<Coding>>,
2856 #[primitive]
2857 #[doc = "When the digital signature was signed."]
2858 pub when: Box<FHIRInstant>,
2859 # [reference (targets = ["Practitioner" , "PractitionerRole" , "RelatedPerson" , "Patient" , "Device" , "Organization"])]
2860 #[doc = "A reference to an application-usable description of the identity that signed (e.g. the signature used their private key)."]
2861 pub who: Box<Reference>,
2862 # [reference (targets = ["Practitioner" , "PractitionerRole" , "RelatedPerson" , "Patient" , "Device" , "Organization"])]
2863 #[doc = "A reference to an application-usable description of the identity that is represented by the signature."]
2864 pub onBehalfOf: Option<Box<Reference>>,
2865 #[primitive]
2866 #[doc = "A mime type that indicates the technical format of the target resources signed by the signature."]
2867 pub targetFormat: Option<Box<FHIRCode>>,
2868 #[primitive]
2869 #[doc = "A mime type that indicates the technical format of the signature. Important mime types are application/signature+xml for X ML DigSig, application/jose for JWS, and image/* for a graphical image of a signature, etc."]
2870 pub sigFormat: Option<Box<FHIRCode>>,
2871 #[primitive]
2872 #[doc = "The base64 encoding of the Signature content. When signature is not recorded electronically this element would be empty."]
2873 pub data: Option<Box<FHIRBase64Binary>>,
2874}
2875#[derive(
2876 Clone,
2877 Reflect,
2878 Debug,
2879 haste_fhir_serialization_json :: derive :: FHIRSerdeSerialize,
2880 haste_fhir_serialization_json :: derive :: FHIRSerdeDeserialize,
2881)]
2882#[fhir_serialize_type = "typechoice"]
2883#[type_choice_field_name = "amount"]
2884pub enum SubstanceAmountAmountTypeChoice {
2885 Quantity(Box<Quantity>),
2886 Range(Box<Range>),
2887 #[primitive]
2888 String(Box<FHIRString>),
2889}
2890impl Default for SubstanceAmountAmountTypeChoice {
2891 fn default() -> Self {
2892 SubstanceAmountAmountTypeChoice::Quantity(Box::new(Default::default()))
2893 }
2894}
2895#[derive(
2896 Clone,
2897 Reflect,
2898 Debug,
2899 Default,
2900 haste_fhir_serialization_json :: derive :: FHIRSerdeSerialize,
2901 haste_fhir_serialization_json :: derive :: FHIRSerdeDeserialize,
2902)]
2903#[fhir_type = "Element"]
2904#[fhir_serialize_type = "complex"]
2905#[doc = "Reference range of possible or expected values."]
2906pub struct SubstanceAmountReferenceRange {
2907 #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
2908 pub id: Option<String>,
2909 #[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."]
2910 pub extension: Option<Vec<Box<Extension>>>,
2911 #[doc = "Lower limit possible or expected."]
2912 pub lowLimit: Option<Box<Quantity>>,
2913 #[doc = "Upper limit possible or expected."]
2914 pub highLimit: Option<Box<Quantity>>,
2915}
2916#[derive(
2917 Clone,
2918 Reflect,
2919 Debug,
2920 Default,
2921 haste_fhir_serialization_json :: derive :: FHIRSerdeSerialize,
2922 haste_fhir_serialization_json :: derive :: FHIRSerdeDeserialize,
2923)]
2924#[fhir_type = "SubstanceAmount"]
2925#[fhir_serialize_type = "complex"]
2926#[doc = "Chemical substances are a single substance type whose primary defining element is the molecular structure. Chemical substances shall be defined on the basis of their complete covalent molecular structure; the presence of a salt (counter-ion) and/or solvates (water, alcohols) is also captured. Purity, grade, physical form or particle size are not taken into account in the definition of a chemical substance or in the assignment of a Substance ID."]
2927pub struct SubstanceAmount {
2928 #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
2929 pub id: Option<String>,
2930 #[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."]
2931 pub extension: Option<Vec<Box<Extension>>>,
2932 #[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)."]
2933 pub modifierExtension: Option<Vec<Box<Extension>>>,
2934 # [type_choice_variants (complex = ["amountQuantity" , "amountRange"] , primitive = ["amountString"])]
2935 #[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."]
2936 pub amount: Option<SubstanceAmountAmountTypeChoice>,
2937 #[doc = "Most elements that require a quantitative value will also have a field called amount type. Amount type should always be specified because the actual value of the amount is often dependent on it. EXAMPLE: In capturing the actual relative amounts of substances or molecular fragments it is essential to indicate whether the amount refers to a mole ratio or weight ratio. For any given element an effort should be made to use same the amount type for all related definitional elements."]
2938 pub amountType: Option<Box<CodeableConcept>>,
2939 #[primitive]
2940 #[doc = "A textual comment on a numeric value."]
2941 pub amountText: Option<Box<FHIRString>>,
2942 #[doc = "Reference range of possible or expected values."]
2943 pub referenceRange: Option<SubstanceAmountReferenceRange>,
2944}
2945#[derive(
2946 Clone,
2947 Reflect,
2948 Debug,
2949 haste_fhir_serialization_json :: derive :: FHIRSerdeSerialize,
2950 haste_fhir_serialization_json :: derive :: FHIRSerdeDeserialize,
2951)]
2952#[fhir_serialize_type = "typechoice"]
2953#[type_choice_field_name = "bounds"]
2954pub enum TimingRepeatBoundsTypeChoice {
2955 Duration(Box<Duration>),
2956 Range(Box<Range>),
2957 Period(Box<Period>),
2958}
2959impl Default for TimingRepeatBoundsTypeChoice {
2960 fn default() -> Self {
2961 TimingRepeatBoundsTypeChoice::Duration(Box::new(Default::default()))
2962 }
2963}
2964#[derive(
2965 Clone,
2966 Reflect,
2967 Debug,
2968 Default,
2969 haste_fhir_serialization_json :: derive :: FHIRSerdeSerialize,
2970 haste_fhir_serialization_json :: derive :: FHIRSerdeDeserialize,
2971)]
2972#[fhir_type = "Element"]
2973#[fhir_serialize_type = "complex"]
2974#[doc = "A set of rules that describe when the event is scheduled."]
2975pub struct TimingRepeat {
2976 #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
2977 pub id: Option<String>,
2978 #[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."]
2979 pub extension: Option<Vec<Box<Extension>>>,
2980 # [type_choice_variants (complex = ["boundsDuration" , "boundsRange" , "boundsPeriod"] , primitive = [])]
2981 #[doc = "Either a duration for the length of the timing schedule, a range of possible length, or outer bounds for start and/or end limits of the timing schedule."]
2982 pub bounds: Option<TimingRepeatBoundsTypeChoice>,
2983 #[primitive]
2984 #[doc = "A total count of the desired number of repetitions across the duration of the entire timing specification. If countMax is present, this element indicates the lower bound of the allowed range of count values."]
2985 pub count: Option<Box<FHIRPositiveInt>>,
2986 #[primitive]
2987 #[doc = "If present, indicates that the count is a range - so to perform the action between [count] and [countMax] times."]
2988 pub countMax: Option<Box<FHIRPositiveInt>>,
2989 #[primitive]
2990 #[doc = "How long this thing happens for when it happens. If durationMax is present, this element indicates the lower bound of the allowed range of the duration."]
2991 pub duration: Option<Box<FHIRDecimal>>,
2992 #[primitive]
2993 #[doc = "If present, indicates that the duration is a range - so to perform the action between [duration] and [durationMax] time length."]
2994 pub durationMax: Option<Box<FHIRDecimal>>,
2995 #[primitive]
2996 #[doc = "The units of time for the duration, in UCUM units."]
2997 pub durationUnit: Option<Box<terminology::UnitsOfTime>>,
2998 #[primitive]
2999 #[doc = "The number of times to repeat the action within the specified period. If frequencyMax is present, this element indicates the lower bound of the allowed range of the frequency."]
3000 pub frequency: Option<Box<FHIRPositiveInt>>,
3001 #[primitive]
3002 #[doc = "If present, indicates that the frequency is a range - so to repeat between [frequency] and [frequencyMax] times within the period or period range."]
3003 pub frequencyMax: Option<Box<FHIRPositiveInt>>,
3004 #[primitive]
3005 #[doc = "Indicates the duration of time over which repetitions are to occur; e.g. to express \"3 times per day\", 3 would be the frequency and \"1 day\" would be the period. If periodMax is present, this element indicates the lower bound of the allowed range of the period length."]
3006 pub period: Option<Box<FHIRDecimal>>,
3007 #[primitive]
3008 #[doc = "If present, indicates that the period is a range from [period] to [periodMax], allowing expressing concepts such as \"do this once every 3-5 days."]
3009 pub periodMax: Option<Box<FHIRDecimal>>,
3010 #[primitive]
3011 #[doc = "The units of time for the period in UCUM units."]
3012 pub periodUnit: Option<Box<terminology::UnitsOfTime>>,
3013 #[primitive]
3014 #[doc = "If one or more days of week is provided, then the action happens only on the specified day(s)."]
3015 pub dayOfWeek: Option<Vec<Box<terminology::DaysOfWeek>>>,
3016 #[primitive]
3017 #[doc = "Specified time of day for action to take place."]
3018 pub timeOfDay: Option<Vec<Box<FHIRTime>>>,
3019 #[primitive]
3020 #[doc = "An approximate time period during the day, potentially linked to an event of daily living that indicates when the action should occur."]
3021 pub when: Option<Vec<Box<terminology::EventTiming>>>,
3022 #[primitive]
3023 #[doc = "The number of minutes from the event. If the event code does not indicate whether the minutes is before or after the event, then the offset is assumed to be after the event."]
3024 pub offset: Option<Box<FHIRUnsignedInt>>,
3025}
3026#[derive(
3027 Clone,
3028 Reflect,
3029 Debug,
3030 Default,
3031 haste_fhir_serialization_json :: derive :: FHIRSerdeSerialize,
3032 haste_fhir_serialization_json :: derive :: FHIRSerdeDeserialize,
3033)]
3034#[fhir_type = "Timing"]
3035#[fhir_serialize_type = "complex"]
3036#[doc = "Specifies an event that may occur multiple times. Timing schedules are used to record when things are planned, expected or requested to occur. The most common usage is in dosage instructions for medications. They are also used when planning care of various kinds, and may be used for reporting the schedule to which past regular activities were carried out."]
3037pub struct Timing {
3038 #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
3039 pub id: Option<String>,
3040 #[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."]
3041 pub extension: Option<Vec<Box<Extension>>>,
3042 #[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)."]
3043 pub modifierExtension: Option<Vec<Box<Extension>>>,
3044 #[primitive]
3045 #[doc = "Identifies specific times when the event occurs."]
3046 pub event: Option<Vec<Box<FHIRDateTime>>>,
3047 #[doc = "A set of rules that describe when the event is scheduled."]
3048 pub repeat: Option<TimingRepeat>,
3049 #[doc = "A code for the timing schedule (or just text in code.text). Some codes such as BID are ubiquitous, but many institutions define their own additional codes. If a code is provided, the code is understood to be a complete statement of whatever is specified in the structured timing data, and either the code or the data may be used to interpret the Timing, with the exception that .repeat.bounds still applies over the code (and is not contained in the code)."]
3050 pub code: Option<Box<CodeableConcept>>,
3051}
3052#[derive(
3053 Clone,
3054 Reflect,
3055 Debug,
3056 haste_fhir_serialization_json :: derive :: FHIRSerdeSerialize,
3057 haste_fhir_serialization_json :: derive :: FHIRSerdeDeserialize,
3058)]
3059#[fhir_serialize_type = "typechoice"]
3060#[type_choice_field_name = "timing"]
3061pub enum TriggerDefinitionTimingTypeChoice {
3062 Timing(Box<Timing>),
3063 # [reference (targets = ["Schedule"])]
3064 Reference(Box<Reference>),
3065 #[primitive]
3066 Date(Box<FHIRDate>),
3067 #[primitive]
3068 DateTime(Box<FHIRDateTime>),
3069}
3070impl Default for TriggerDefinitionTimingTypeChoice {
3071 fn default() -> Self {
3072 TriggerDefinitionTimingTypeChoice::Timing(Box::new(Default::default()))
3073 }
3074}
3075#[derive(
3076 Clone,
3077 Reflect,
3078 Debug,
3079 Default,
3080 haste_fhir_serialization_json :: derive :: FHIRSerdeSerialize,
3081 haste_fhir_serialization_json :: derive :: FHIRSerdeDeserialize,
3082)]
3083#[fhir_type = "TriggerDefinition"]
3084#[fhir_serialize_type = "complex"]
3085#[doc = "A description of a triggering event. Triggering events can be named events, data events, or periodic, as determined by the type element."]
3086pub struct TriggerDefinition {
3087 #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
3088 pub id: Option<String>,
3089 #[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."]
3090 pub extension: Option<Vec<Box<Extension>>>,
3091 #[rename_field = "type"]
3092 #[primitive]
3093 #[doc = "The type of triggering event."]
3094 pub type_: Box<terminology::TriggerType>,
3095 #[primitive]
3096 #[doc = "A formal name for the event. This may be an absolute URI that identifies the event formally (e.g. from a trigger registry), or a simple relative URI that identifies the event in a local context."]
3097 pub name: Option<Box<FHIRString>>,
3098 # [type_choice_variants (complex = ["timingTiming" , "timingReference"] , primitive = ["timingDate" , "timingDateTime"])]
3099 #[doc = "The timing of the event (if this is a periodic trigger)."]
3100 pub timing: Option<TriggerDefinitionTimingTypeChoice>,
3101 #[doc = "The triggering data of the event (if this is a data trigger). If more than one data is requirement is specified, then all the data requirements must be true."]
3102 pub data: Option<Vec<Box<DataRequirement>>>,
3103 #[doc = "A boolean-valued expression that is evaluated in the context of the container of the trigger definition and returns whether or not the trigger fires."]
3104 pub condition: Option<Box<Expression>>,
3105}
3106#[derive(
3107 Clone,
3108 Reflect,
3109 Debug,
3110 haste_fhir_serialization_json :: derive :: FHIRSerdeSerialize,
3111 haste_fhir_serialization_json :: derive :: FHIRSerdeDeserialize,
3112)]
3113#[fhir_serialize_type = "typechoice"]
3114#[type_choice_field_name = "value"]
3115pub enum UsageContextValueTypeChoice {
3116 CodeableConcept(Box<CodeableConcept>),
3117 Quantity(Box<Quantity>),
3118 Range(Box<Range>),
3119 # [reference (targets = ["PlanDefinition" , "ResearchStudy" , "InsurancePlan" , "HealthcareService" , "Group" , "Location" , "Organization"])]
3120 Reference(Box<Reference>),
3121}
3122impl Default for UsageContextValueTypeChoice {
3123 fn default() -> Self {
3124 UsageContextValueTypeChoice::CodeableConcept(Box::new(Default::default()))
3125 }
3126}
3127#[derive(
3128 Clone,
3129 Reflect,
3130 Debug,
3131 Default,
3132 haste_fhir_serialization_json :: derive :: FHIRSerdeSerialize,
3133 haste_fhir_serialization_json :: derive :: FHIRSerdeDeserialize,
3134)]
3135#[fhir_type = "UsageContext"]
3136#[fhir_serialize_type = "complex"]
3137#[doc = "Specifies clinical/business/etc. metadata that can be used to retrieve, index and/or categorize an artifact. This metadata can either be specific to the applicable population (e.g., age category, DRG) or the specific context of care (e.g., venue, care setting, provider of care)."]
3138pub struct UsageContext {
3139 #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
3140 pub id: Option<String>,
3141 #[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."]
3142 pub extension: Option<Vec<Box<Extension>>>,
3143 #[doc = "A code that identifies the type of context being specified by this usage context."]
3144 pub code: Box<Coding>,
3145 # [type_choice_variants (complex = ["valueCodeableConcept" , "valueQuantity" , "valueRange" , "valueReference"] , primitive = [])]
3146 #[doc = "A value that defines the context specified in this context of use. The interpretation of the value is defined by the code."]
3147 pub value: UsageContextValueTypeChoice,
3148}
3149#[derive(
3150 Clone,
3151 Reflect,
3152 Debug,
3153 Default,
3154 haste_fhir_serialization_json :: derive :: FHIRSerdeSerialize,
3155 haste_fhir_serialization_json :: derive :: FHIRSerdeDeserialize,
3156)]
3157#[fhir_type = "MetadataResource"]
3158#[fhir_serialize_type = "complex"]
3159#[doc = "Common Ancestor declaration for conformance and knowledge artifact resources."]
3160pub struct MetadataResource {
3161 #[doc = "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes."]
3162 pub id: Option<String>,
3163 #[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."]
3164 pub meta: Option<Box<Meta>>,
3165 #[primitive]
3166 #[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."]
3167 pub implicitRules: Option<Box<FHIRUri>>,
3168 #[primitive]
3169 #[doc = "The base language in which the resource is written."]
3170 pub language: Option<Box<FHIRCode>>,
3171 #[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."]
3172 pub text: Option<Box<Narrative>>,
3173 #[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."]
3174 pub contained: Option<Vec<Box<Resource>>>,
3175 #[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."]
3176 pub extension: Option<Vec<Box<Extension>>>,
3177 #[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)."]
3178 pub modifierExtension: Option<Vec<Box<Extension>>>,
3179 #[primitive]
3180 #[doc = "An absolute URI that is used to identify this metadata resource when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this metadata resource is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the metadata resource is stored on different servers."]
3181 pub url: Option<Box<FHIRUri>>,
3182 #[primitive]
3183 #[doc = "The identifier that is used to identify this version of the metadata resource when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the metadata resource author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence."]
3184 pub version: Option<Box<FHIRString>>,
3185 #[primitive]
3186 #[doc = "A natural language name identifying the metadata resource. This name should be usable as an identifier for the module by machine processing applications such as code generation."]
3187 pub name: Option<Box<FHIRString>>,
3188 #[primitive]
3189 #[doc = "A short, descriptive, user-friendly title for the metadata resource."]
3190 pub title: Option<Box<FHIRString>>,
3191 #[primitive]
3192 #[doc = "The status of this metadata resource. Enables tracking the life-cycle of the content."]
3193 pub status: Box<terminology::PublicationStatus>,
3194 #[primitive]
3195 #[doc = "A Boolean value to indicate that this metadata resource is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage."]
3196 pub experimental: Option<Box<FHIRBoolean>>,
3197 #[primitive]
3198 #[doc = "The date (and optionally time) when the metadata resource was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the metadata resource changes."]
3199 pub date: Option<Box<FHIRDateTime>>,
3200 #[primitive]
3201 #[doc = "The name of the organization or individual that published the metadata resource."]
3202 pub publisher: Option<Box<FHIRString>>,
3203 #[doc = "Contact details to assist a user in finding and communicating with the publisher."]
3204 pub contact: Option<Vec<Box<ContactDetail>>>,
3205 #[primitive]
3206 #[doc = "A free text natural language description of the metadata resource from a consumer's perspective."]
3207 pub description: Option<Box<FHIRMarkdown>>,
3208 #[doc = "The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate metadata resource instances."]
3209 pub useContext: Option<Vec<Box<UsageContext>>>,
3210 #[doc = "A legal or geographic region in which the metadata resource is intended to be used."]
3211 pub jurisdiction: Option<Vec<Box<CodeableConcept>>>,
3212}