Skip to main content

fhir_rs/datatype/complex/
mod.rs

1mod narrative;
2
3pub use narrative::*;
4use crate::prelude::*;
5
6#[derive(Element, Complex, Debug, Clone, Default)]
7pub struct Coding {
8    /// Unique id for inter-element referencing
9    #[fhir(name="id", min="0", max="1", summary=false, modifier=false, choice="")]
10    pub id: Option<Id>,
11    /// Additional content defined by implementations
12    #[fhir(name="extension", min="0", max="*", summary=false, modifier=false, choice="")]
13    pub extension: Option<Vec<Extension>>,
14    /// Identity of the terminology system
15    #[fhir(name="system", min="0", max="1", summary=true, modifier=false, choice="")]
16    pub system: Option<UriDt>,
17    /// Version of the system - if relevant
18    #[fhir(name="version", min="0", max="1", summary=true, modifier=false, choice="")]
19    pub version: Option<StringDt>,
20    /// Symbol in syntax defined by the system
21    #[fhir(name="code", min="0", max="1", summary=true, modifier=false, choice="")]
22    pub code: Option<CodeDt>,
23    /// Representation defined by the system
24    #[fhir(name="display", min="0", max="1", summary=true, modifier=false, choice="")]
25    pub display: Option<StringDt>,
26    /// If this coding was chosen directly by the user
27    #[fhir(name="userSelected", min="0", max="1", summary=true, modifier=false, choice="")]
28    pub user_selected: Option<BooleanDt>,
29}
30
31#[derive(Element, Complex, Debug, Clone, Default)]
32pub struct Address {
33    /// Unique id for inter-element referencing
34    #[fhir(name="id", min="0", max="1", summary=false, modifier=false, choice="")]
35    pub id: Option<Id>,
36    /// Additional content defined by implementations
37    #[fhir(name="extension", min="0", max="*", summary=false, modifier=false, choice="")]
38    pub extension: Option<Vec<Extension>>,
39    /// home | work | temp | old | billing - purpose of this address
40    #[fhir(name="use", min="0", max="1", summary=true, modifier=true)]
41    pub use_: Option<CodeDt>,
42    /// postal | physical | both
43    #[fhir(name="type", min="0", max="1", summary=true, modifier=false, choice="")]
44    pub type_: Option<CodeDt>,
45    /// Text representation of the address
46    #[fhir(name="text", min="0", max="1", summary=true, modifier=false, choice="")]
47    pub text: Option<StringDt>,
48    /// Street name, number, direction & P.O. Box etc.
49    #[fhir(name="line", min="0", max="*", summary=true, modifier=false, choice="")]
50    pub line: Option<Vec<StringDt>>,
51    /// Name of city, town etc.
52    #[fhir(name="city", min="0", max="1", summary=true, modifier=false, choice="")]
53    pub city: Option<StringDt>,
54    /// District name (aka county)
55    #[fhir(name="district", min="0", max="1", summary=true, modifier=false, choice="")]
56    pub district: Option<StringDt>,
57    /// Sub-unit of country (abbreviations ok)
58    #[fhir(name="state", min="0", max="1", summary=true, modifier=false, choice="")]
59    pub state: Option<StringDt>,
60    /// Postal code for area
61    #[fhir(name="postalCode", min="0", max="1", summary=true, modifier=false, choice="")]
62    pub postal_code: Option<StringDt>,
63    /// Country (e.g. may be ISO 3166 2 or 3 letter code)
64    #[fhir(name="country", min="0", max="1", summary=true, modifier=false, choice="")]
65    pub country: Option<StringDt>,
66    /// Time period when address was/is in use
67    #[fhir(name="period", min="0", max="1", summary=true, modifier=false, choice="")]
68    pub period: Option<Period>,
69}
70
71#[derive(Element, Complex, Debug, Clone, Default)]
72pub struct Age {
73    /// Unique id for inter-element referencing
74    #[fhir(name="id", min="0", max="1", summary=false, modifier=false, choice="")]
75    pub id: Option<Id>,
76    /// Additional content defined by implementations
77    #[fhir(name="extension", min="0", max="*", summary=false, modifier=false, choice="")]
78    pub extension: Option<Vec<Extension>>,
79    /// Numerical value (with implicit precision)
80    #[fhir(name="value", min="0", max="1", summary=true, modifier=false, choice="")]
81    pub value: Option<DecimalDt>,
82    /// < | <= | >= | > | ad - how to understand the value
83    #[fhir(name="comparator", min="0", max="1", summary=true, modifier=true)]
84    pub comparator: Option<CodeDt>,
85    /// Unit representation
86    #[fhir(name="unit", min="0", max="1", summary=true, modifier=false, choice="")]
87    pub unit: Option<StringDt>,
88    /// System that defines coded unit form
89    #[fhir(name="system", min="0", max="1", summary=true, modifier=false, choice="")]
90    pub system: Option<UriDt>,
91    /// Coded form of the unit
92    #[fhir(name="code", min="0", max="1", summary=true, modifier=false, choice="")]
93    pub code: Option<CodeDt>,
94}
95
96#[derive(Element, Complex, Debug, Clone, Default)]
97pub struct Annotation {
98    /// Unique id for inter-element referencing
99    #[fhir(name="id", min="0", max="1", summary=false, modifier=false, choice="")]
100    pub id: Option<Id>,
101    /// Additional content defined by implementations
102    #[fhir(name="extension", min="0", max="*", summary=false, modifier=false, choice="")]
103    pub extension: Option<Vec<Extension>>,
104    /// Individual responsible for the annotation
105    #[fhir(name="author", min="0", max="1", summary=true, modifier=false, choice="")]
106    pub author: Option<StringDt>,
107    /// When the annotation was made
108    #[fhir(name="time", min="0", max="1", summary=true, modifier=false, choice="")]
109    pub time: Option<DateTimeDt>,
110    /// The annotation  - text content (as markdown)
111    #[fhir(name="text", min="1", max="1", summary=true, modifier=false, choice="")]
112    pub text: Option<MarkdownDt>,
113}
114
115#[derive(Element, Complex, Debug, Clone, Default)]
116pub struct Attachment {
117    /// Unique id for inter-element referencing
118    #[fhir(name="id", min="0", max="1", summary=false, modifier=false, choice="")]
119    pub id: Option<Id>,
120    /// Additional content defined by implementations
121    #[fhir(name="extension", min="0", max="*", summary=false, modifier=false, choice="")]
122    pub extension: Option<Vec<Extension>>,
123    /// Mime type of the content, with charset etc.
124    #[fhir(name="contentType", min="0", max="1", summary=true, modifier=false, choice="")]
125    pub content_type: Option<CodeDt>,
126    /// Human language of the content (BCP-47)
127    #[fhir(name="language", min="0", max="1", summary=true, modifier=false, choice="")]
128    pub language: Option<CodeDt>,
129    /// Data inline, base64ed
130    #[fhir(name="data", min="0", max="1", summary=false, modifier=false, choice="")]
131    pub data: Option<Base64BinaryDt>,
132    /// Uri where the data can be found
133    #[fhir(name="url", min="0", max="1", summary=true, modifier=false, choice="")]
134    pub url: Option<UrlDt>,
135    /// Number of bytes of content (if url provided)
136    #[fhir(name="size", min="0", max="1", summary=true, modifier=false, choice="")]
137    pub size: Option<Integer64Dt>,
138    /// Hash of the data (sha-1, base64ed)
139    #[fhir(name="hash", min="0", max="1", summary=true, modifier=false, choice="")]
140    pub hash: Option<Base64BinaryDt>,
141    /// Label to display in place of the data
142    #[fhir(name="title", min="0", max="1", summary=true, modifier=false, choice="")]
143    pub title: Option<StringDt>,
144    /// Date attachment was first created
145    #[fhir(name="creation", min="0", max="1", summary=true, modifier=false, choice="")]
146    pub creation: Option<DateTimeDt>,
147    /// Height of the image in pixels (photo/video)
148    #[fhir(name="height", min="0", max="1", summary=false, modifier=false, choice="")]
149    pub height: Option<PositiveIntDt>,
150    /// Width of the image in pixels (photo/video)
151    #[fhir(name="width", min="0", max="1", summary=false, modifier=false, choice="")]
152    pub width: Option<PositiveIntDt>,
153    /// Number of frames if > 1 (photo)
154    #[fhir(name="frames", min="0", max="1", summary=false, modifier=false, choice="")]
155    pub frames: Option<PositiveIntDt>,
156    /// Length in seconds (audio / video)
157    #[fhir(name="duration", min="0", max="1", summary=false, modifier=false, choice="")]
158    pub duration: Option<DecimalDt>,
159    /// Number of printed pages
160    #[fhir(name="pages", min="0", max="1", summary=false, modifier=false, choice="")]
161    pub pages: Option<PositiveIntDt>,
162}
163
164#[derive(Element, Complex, Debug, Clone, Default)]
165pub struct Availability {
166    /// Unique id for inter-element referencing
167    #[fhir(name="id", min="0", max="1", summary=false, modifier=false, choice="")]
168    pub id: Option<Id>,
169    /// Additional content defined by implementations
170    #[fhir(name="extension", min="0", max="*", summary=false, modifier=false, choice="")]
171    pub extension: Option<Vec<Extension>>,
172    /// Times the {item} is available
173    #[fhir(name="availableTime", min="0", max="*", summary=true, modifier=false, choice="")]
174    pub available_time: Option<Vec<AvailabilityAvailableTimeElement>>,
175    /// Not available during this time due to provided reason
176    #[fhir(name="notAvailableTime", min="0", max="*", summary=true, modifier=false, choice="")]
177    pub not_available_time: Option<Vec<AvailabilityNotAvailableTimeElement>>,
178}
179
180#[derive(Element, Complex, Debug, Clone, Default)]
181pub struct AvailabilityAvailableTimeElement {
182    /// Unique id for inter-element referencing
183    #[fhir(name="id", min="0", max="1", summary=false, modifier=false, choice="")]
184    pub id: Option<String>,
185    /// Additional content defined by implementations
186    #[fhir(name="extension", min="0", max="*", summary=false, modifier=false, choice="")]
187    pub extension: Option<Vec<Extension>>,
188    /// mon | tue | wed | thu | fri | sat | sun
189    #[fhir(name="daysOfWeek", min="0", max="*", summary=true, modifier=false, choice="")]
190    pub days_of_week: Option<Vec<CodeDt>>,
191    /// Always available? i.e. 24 hour service
192    #[fhir(name="allDay", min="0", max="1", summary=true, modifier=false, choice="")]
193    pub all_day: Option<BooleanDt>,
194    /// Opening time of day (ignored if allDay = true)
195    #[fhir(name="availableStartTime", min="0", max="1", summary=true, modifier=false, choice="")]
196    pub available_start_time: Option<TimeDt>,
197    /// Closing time of day (ignored if allDay = true)
198    #[fhir(name="availableEndTime", min="0", max="1", summary=true, modifier=false, choice="")]
199    pub available_end_time: Option<TimeDt>,
200}
201
202#[derive(Element, Complex, Debug, Clone, Default)]
203pub struct AvailabilityNotAvailableTimeElement {
204    /// Unique id for inter-element referencing
205    #[fhir(name="id", min="0", max="1", summary=false, modifier=false, choice="")]
206    pub id: Option<String>,
207    /// Additional content defined by implementations
208    #[fhir(name="extension", min="0", max="*", summary=false, modifier=false, choice="")]
209    pub extension: Option<Vec<Extension>>,
210    /// Reason presented to the user explaining why time not available
211    #[fhir(name="description", min="0", max="1", summary=true, modifier=false, choice="")]
212    pub description: Option<StringDt>,
213    /// Service not available during this period
214    #[fhir(name="during", min="0", max="1", summary=true, modifier=false, choice="")]
215    pub during: Option<Period>,
216}
217
218#[derive(Element, Complex, Debug, Clone, Default)]
219pub struct CodeableConcept {
220    /// Unique id for inter-element referencing
221    #[fhir(name="id", min="0", max="1", summary=false, modifier=false, choice="")]
222    pub id: Option<Id>,
223    /// Additional content defined by implementations
224    #[fhir(name="extension", min="0", max="*", summary=false, modifier=false, choice="")]
225    pub extension: Option<Vec<Extension>>,
226    /// Code defined by a terminology system
227    #[fhir(name="coding", min="0", max="*", summary=true, modifier=false, choice="")]
228    pub coding: Option<Vec<Coding>>,
229    /// Plain text representation of the concept
230    #[fhir(name="text", min="0", max="1", summary=true, modifier=false, choice="")]
231    pub text: Option<StringDt>,
232}
233
234#[derive(Element, Complex, Debug, Clone, Default)]
235pub struct CodeableReference {
236    /// Unique id for inter-element referencing
237    #[fhir(name="id", min="0", max="1", summary=false, modifier=false, choice="")]
238    pub id: Option<Id>,
239    /// Additional content defined by implementations
240    #[fhir(name="extension", min="0", max="*", summary=false, modifier=false, choice="")]
241    pub extension: Option<Vec<Extension>>,
242    /// Reference to a concept (by class)
243    #[fhir(name="concept", min="0", max="1", summary=true, modifier=false, choice="")]
244    pub concept: Option<CodeableConcept>,
245    /// Reference to a resource (by instance)
246    #[fhir(name="reference", min="0", max="1", summary=true, modifier=false, choice="")]
247    pub reference: Option<Reference>,
248}
249
250#[derive(Element, Complex, Debug, Clone, Default)]
251pub struct ContactDetail {
252    /// Unique id for inter-element referencing
253    #[fhir(name="id", min="0", max="1", summary=false, modifier=false, choice="")]
254    pub id: Option<Id>,
255    /// Additional content defined by implementations
256    #[fhir(name="extension", min="0", max="*", summary=false, modifier=false, choice="")]
257    pub extension: Option<Vec<Extension>>,
258    /// Name of an individual to contact
259    #[fhir(name="name", min="0", max="1", summary=true, modifier=false, choice="")]
260    pub name: Option<StringDt>,
261    /// Contact details for individual or organization
262    #[fhir(name="telecom", min="0", max="*", summary=true, modifier=false, choice="")]
263    pub telecom: Option<Vec<ContactPoint>>,
264}
265
266#[derive(Element, Complex, Debug, Clone, Default)]
267pub struct ContactPoint {
268    /// Unique id for inter-element referencing
269    #[fhir(name="id", min="0", max="1", summary=false, modifier=false, choice="")]
270    pub id: Option<Id>,
271    /// Additional content defined by implementations
272    #[fhir(name="extension", min="0", max="*", summary=false, modifier=false, choice="")]
273    pub extension: Option<Vec<Extension>>,
274    /// phone | fax | email | pager | url | sms | other
275    #[fhir(name="system", min="0", max="1", summary=true, modifier=false, choice="")]
276    pub system: Option<CodeDt>,
277    /// The actual contact point details
278    #[fhir(name="value", min="0", max="1", summary=true, modifier=false, choice="")]
279    pub value: Option<StringDt>,
280    /// home | work | temp | old | mobile - purpose of this contact point
281    #[fhir(name="use", min="0", max="1", summary=true, modifier=true)]
282    pub use_: Option<CodeDt>,
283    /// Specify preferred order of use (1 = highest)
284    #[fhir(name="rank", min="0", max="1", summary=true, modifier=false, choice="")]
285    pub rank: Option<PositiveIntDt>,
286    /// Time period when the contact point was/is in use
287    #[fhir(name="period", min="0", max="1", summary=true, modifier=false, choice="")]
288    pub period: Option<Period>,
289}
290
291#[derive(Element, Complex, Debug, Clone, Default)]
292pub struct Contributor {
293    /// Unique id for inter-element referencing
294    #[fhir(name="id", min="0", max="1", summary=false, modifier=false, choice="")]
295    pub id: Option<Id>,
296    /// Additional content defined by implementations
297    #[fhir(name="extension", min="0", max="*", summary=false, modifier=false, choice="")]
298    pub extension: Option<Vec<Extension>>,
299    /// author | editor | reviewer | endorser
300    #[fhir(name="type", min="1", max="1", summary=true, modifier=false, choice="")]
301    pub type_: Option<CodeDt>,
302    /// Who contributed the content
303    #[fhir(name="name", min="1", max="1", summary=true, modifier=false, choice="")]
304    pub name: Option<StringDt>,
305    /// Contact details of the contributor
306    #[fhir(name="contact", min="0", max="*", summary=true, modifier=false, choice="")]
307    pub contact: Option<Vec<ContactDetail>>,
308}
309
310#[derive(Element, Complex, Debug, Clone, Default)]
311pub struct Count {
312    /// Unique id for inter-element referencing
313    #[fhir(name="id", min="0", max="1", summary=false, modifier=false, choice="")]
314    pub id: Option<Id>,
315    /// Additional content defined by implementations
316    #[fhir(name="extension", min="0", max="*", summary=false, modifier=false, choice="")]
317    pub extension: Option<Vec<Extension>>,
318    /// Numerical value (with implicit precision)
319    #[fhir(name="value", min="0", max="1", summary=true, modifier=false, choice="")]
320    pub value: Option<DecimalDt>,
321    /// < | <= | >= | > | ad - how to understand the value
322    #[fhir(name="comparator", min="0", max="1", summary=true, modifier=true)]
323    pub comparator: Option<CodeDt>,
324    /// Unit representation
325    #[fhir(name="unit", min="0", max="1", summary=true, modifier=false, choice="")]
326    pub unit: Option<StringDt>,
327    /// System that defines coded unit form
328    #[fhir(name="system", min="0", max="1", summary=true, modifier=false, choice="")]
329    pub system: Option<UriDt>,
330    /// Coded form of the unit
331    #[fhir(name="code", min="0", max="1", summary=true, modifier=false, choice="")]
332    pub code: Option<CodeDt>,
333}
334
335#[derive(Element, Complex, Debug, Clone, Default)]
336pub struct DataRequirement {
337    /// Unique id for inter-element referencing
338    #[fhir(name="id", min="0", max="1", summary=false, modifier=false, choice="")]
339    pub id: Option<Id>,
340    /// Additional content defined by implementations
341    #[fhir(name="extension", min="0", max="*", summary=false, modifier=false, choice="")]
342    pub extension: Option<Vec<Extension>>,
343    /// The type of the required data
344    #[fhir(name="type", min="1", max="1", summary=true, modifier=false, choice="")]
345    pub type_: Option<CodeDt>,
346    /// The profile of the required data
347    #[fhir(name="profile", min="0", max="*", summary=true, modifier=false, choice="")]
348    pub profile: Option<Vec<CanonicalDt>>,
349    /// E.g. Patient, Practitioner, RelatedPerson, Organization, Location, Device
350    #[fhir(name="subject", min="0", max="1", summary=true, modifier=false, choice="")]
351    pub subject: Option<Reference>,
352    /// Indicates specific structure elements that are referenced by the knowledge module
353    #[fhir(name="mustSupport", min="0", max="*", summary=true, modifier=false, choice="")]
354    pub must_support: Option<Vec<StringDt>>,
355    /// What codes are expected
356    #[fhir(name="codeFilter", min="0", max="*", summary=true, modifier=false, choice="")]
357    pub code_filter: Option<Vec<DataRequirementCodeFilterElement>>,
358    /// What dates/date ranges are expected
359    #[fhir(name="dateFilter", min="0", max="*", summary=true, modifier=false, choice="")]
360    pub date_filter: Option<Vec<DataRequirementDateFilterElement>>,
361    /// What values are expected
362    #[fhir(name="valueFilter", min="0", max="*", summary=true, modifier=false, choice="")]
363    pub value_filter: Option<Vec<DataRequirementValueFilterElement>>,
364    /// Number of results
365    #[fhir(name="limit", min="0", max="1", summary=true, modifier=false, choice="")]
366    pub limit: Option<PositiveIntDt>,
367    /// Order of the results
368    #[fhir(name="sort", min="0", max="*", summary=true, modifier=false, choice="")]
369    pub sort: Option<Vec<DataRequirementSortElement>>,
370}
371
372#[derive(Element, Complex, Debug, Clone, Default)]
373pub struct DataRequirementSortElement {
374    /// Unique id for inter-element referencing
375    #[fhir(name="id", min="0", max="1", summary=false, modifier=false, choice="")]
376    pub id: Option<String>,
377    /// Additional content defined by implementations
378    #[fhir(name="extension", min="0", max="*", summary=false, modifier=false, choice="")]
379    pub extension: Option<Vec<Extension>>,
380    /// The name of the attribute to perform the sort
381    #[fhir(name="path", min="1", max="1", summary=true, modifier=false, choice="")]
382    pub path: Option<StringDt>,
383    /// ascending | descending
384    #[fhir(name="direction", min="1", max="1", summary=true, modifier=false, choice="")]
385    pub direction: Option<CodeDt>,
386}
387
388#[derive(Element, Complex, Debug, Clone, Default)]
389pub struct DataRequirementCodeFilterElement {
390    /// Unique id for inter-element referencing
391    #[fhir(name="id", min="0", max="1", summary=false, modifier=false, choice="")]
392    pub id: Option<String>,
393    /// Additional content defined by implementations
394    #[fhir(name="extension", min="0", max="*", summary=false, modifier=false, choice="")]
395    pub extension: Option<Vec<Extension>>,
396    /// A code-valued attribute to filter on
397    #[fhir(name="path", min="0", max="1", summary=true, modifier=false, choice="")]
398    pub path: Option<StringDt>,
399    /// A coded (token) parameter to search on
400    #[fhir(name="searchParam", min="0", max="1", summary=true, modifier=false, choice="")]
401    pub search_param: Option<StringDt>,
402    /// ValueSet for the filter
403    #[fhir(name="valueSet", min="0", max="1", summary=true, modifier=false, choice="")]
404    pub value_set: Option<CanonicalDt>,
405    /// What code is expected
406    #[fhir(name="code", min="0", max="*", summary=true, modifier=false, choice="")]
407    pub code: Option<Vec<Coding>>,
408}
409
410#[derive(Element, Complex, Debug, Clone, Default)]
411pub struct DataRequirementValueFilterElement {
412    /// Unique id for inter-element referencing
413    #[fhir(name="id", min="0", max="1", summary=false, modifier=false, choice="")]
414    pub id: Option<String>,
415    /// Additional content defined by implementations
416    #[fhir(name="extension", min="0", max="*", summary=false, modifier=false, choice="")]
417    pub extension: Option<Vec<Extension>>,
418    /// An attribute to filter on
419    #[fhir(name="path", min="0", max="1", summary=true, modifier=false, choice="")]
420    pub path: Option<StringDt>,
421    /// A parameter to search on
422    #[fhir(name="searchParam", min="0", max="1", summary=true, modifier=false, choice="")]
423    pub search_param: Option<StringDt>,
424    /// eq | gt | lt | ge | le | sa | eb
425    #[fhir(name="comparator", min="0", max="1", summary=true, modifier=false, choice="")]
426    pub comparator: Option<CodeDt>,
427    /// The value of the filter, as a Period, DateTime, or Duration value
428    #[fhir(name="value", min="0", max="1", summary=true, modifier=false, choice="")]
429    pub value: Option<Duration>,
430}
431
432#[derive(Element, Complex, Debug, Clone, Default)]
433pub struct DataRequirementDateFilterElement {
434    /// Unique id for inter-element referencing
435    #[fhir(name="id", min="0", max="1", summary=false, modifier=false, choice="")]
436    pub id: Option<String>,
437    /// Additional content defined by implementations
438    #[fhir(name="extension", min="0", max="*", summary=false, modifier=false, choice="")]
439    pub extension: Option<Vec<Extension>>,
440    /// A date-valued attribute to filter on
441    #[fhir(name="path", min="0", max="1", summary=true, modifier=false, choice="")]
442    pub path: Option<StringDt>,
443    /// A date valued parameter to search on
444    #[fhir(name="searchParam", min="0", max="1", summary=true, modifier=false, choice="")]
445    pub search_param: Option<StringDt>,
446    /// The value of the filter, as a Period, DateTime, or Duration value
447    #[fhir(name="value", min="0", max="1", summary=true, modifier=false, choice="")]
448    pub value: Option<Duration>,
449}
450
451#[derive(Element, Complex, Debug, Clone, Default)]
452pub struct Complex {
453    /// Unique id for inter-element referencing
454    #[fhir(name="id", min="0", max="1", summary=false, modifier=false, choice="")]
455    pub id: Option<Id>,
456    /// Additional content defined by implementations
457    #[fhir(name="extension", min="0", max="*", summary=false, modifier=false, choice="")]
458    pub extension: Option<Vec<Extension>>,
459}
460
461#[derive(Element, Complex, Debug, Clone, Default)]
462pub struct Distance {
463    /// Unique id for inter-element referencing
464    #[fhir(name="id", min="0", max="1", summary=false, modifier=false, choice="")]
465    pub id: Option<Id>,
466    /// Additional content defined by implementations
467    #[fhir(name="extension", min="0", max="*", summary=false, modifier=false, choice="")]
468    pub extension: Option<Vec<Extension>>,
469    /// Numerical value (with implicit precision)
470    #[fhir(name="value", min="0", max="1", summary=true, modifier=false, choice="")]
471    pub value: Option<DecimalDt>,
472    /// < | <= | >= | > | ad - how to understand the value
473    #[fhir(name="comparator", min="0", max="1", summary=true, modifier=true)]
474    pub comparator: Option<CodeDt>,
475    /// Unit representation
476    #[fhir(name="unit", min="0", max="1", summary=true, modifier=false, choice="")]
477    pub unit: Option<StringDt>,
478    /// System that defines coded unit form
479    #[fhir(name="system", min="0", max="1", summary=true, modifier=false, choice="")]
480    pub system: Option<UriDt>,
481    /// Coded form of the unit
482    #[fhir(name="code", min="0", max="1", summary=true, modifier=false, choice="")]
483    pub code: Option<CodeDt>,
484}
485
486#[derive(Element, Complex, Debug, Clone, Default)]
487pub struct Dosage {
488    /// Unique id for inter-element referencing
489    #[fhir(name="id", min="0", max="1", summary=false, modifier=false, choice="")]
490    pub id: Option<Id>,
491    /// Additional content defined by implementations
492    #[fhir(name="extension", min="0", max="*", summary=false, modifier=false, choice="")]
493    pub extension: Option<Vec<Extension>>,
494    /// Extensions that cannot be ignored even if unrecognized
495    #[fhir(name="modifierExtension", min="0", max="*", summary=true, modifier=true)]
496    pub modifier_extension: Option<Vec<Extension>>,
497    /// The order of the dosage instructions
498    #[fhir(name="sequence", min="0", max="1", summary=true, modifier=false, choice="")]
499    pub sequence: Option<IntegerDt>,
500    /// Free text dosage instructions e.g. SIG
501    #[fhir(name="text", min="0", max="1", summary=true, modifier=false, choice="")]
502    pub text: Option<StringDt>,
503    /// Supplemental instruction or warnings to the patient - e.g. "with meals", "may cause drowsiness"
504    #[fhir(name="additionalInstruction", min="0", max="*", summary=true, modifier=false, choice="")]
505    pub additional_instruction: Option<Vec<CodeableConcept>>,
506    /// Patient or consumer oriented instructions
507    #[fhir(name="patientInstruction", min="0", max="1", summary=true, modifier=false, choice="")]
508    pub patient_instruction: Option<StringDt>,
509    /// When medication should be administered
510    #[fhir(name="timing", min="0", max="1", summary=true, modifier=false, choice="")]
511    pub timing: Option<Timing>,
512    /// Take "as needed"
513    #[fhir(name="asNeeded", min="0", max="1", summary=true, modifier=false, choice="")]
514    pub as_needed: Option<BooleanDt>,
515    /// Take "as needed" (for x)
516    #[fhir(name="asNeededFor", min="0", max="*", summary=true, modifier=false, choice="")]
517    pub as_needed_for: Option<Vec<CodeableConcept>>,
518    /// Body site to administer to
519    #[fhir(name="site", min="0", max="1", summary=true, modifier=false, choice="")]
520    pub site: Option<CodeableConcept>,
521    /// How drug should enter body
522    #[fhir(name="route", min="0", max="1", summary=true, modifier=false, choice="")]
523    pub route: Option<CodeableConcept>,
524    /// Technique for administering medication
525    #[fhir(name="method", min="0", max="1", summary=true, modifier=false, choice="")]
526    pub method: Option<CodeableConcept>,
527    /// Amount of medication administered, to be administered or typical amount to be administered
528    #[fhir(name="doseAndRate", min="0", max="*", summary=true, modifier=false, choice="")]
529    pub dose_and_rate: Option<Vec<DosageDoseAndRateElement>>,
530    /// Upper limit on medication per unit of time
531    #[fhir(name="maxDosePerPeriod", min="0", max="*", summary=true, modifier=false, choice="")]
532    pub max_dose_per_period: Option<Vec<Ratio>>,
533    /// Upper limit on medication per administration
534    #[fhir(name="maxDosePerAdministration", min="0", max="1", summary=true, modifier=false, choice="")]
535    pub max_dose_per_administration: Option<Quantity>,
536    /// Upper limit on medication per lifetime of the patient
537    #[fhir(name="maxDosePerLifetime", min="0", max="1", summary=true, modifier=false, choice="")]
538    pub max_dose_per_lifetime: Option<Quantity>,
539}
540
541#[derive(Element, Complex, Debug, Clone, Default)]
542pub struct DosageDoseAndRateElement {
543    /// Unique id for inter-element referencing
544    #[fhir(name="id", min="0", max="1", summary=false, modifier=false, choice="")]
545    pub id: Option<String>,
546    /// Additional content defined by implementations
547    #[fhir(name="extension", min="0", max="*", summary=false, modifier=false, choice="")]
548    pub extension: Option<Vec<Extension>>,
549    /// The kind of dose or rate specified
550    #[fhir(name="type", min="0", max="1", summary=true, modifier=false, choice="")]
551    pub type_: Option<CodeableConcept>,
552    /// Amount of medication per dose
553    #[fhir(name="dose", min="0", max="1", summary=true, modifier=false, choice="")]
554    pub dose: Option<Quantity>,
555    /// Amount of medication per unit of time
556    #[fhir(name="rate", min="0", max="1", summary=true, modifier=false, choice="")]
557    pub rate: Option<Quantity>,
558}
559
560#[derive(Element, Complex, Debug, Clone, Default)]
561pub struct Duration {
562    /// Unique id for inter-element referencing
563    #[fhir(name="id", min="0", max="1", summary=false, modifier=false, choice="")]
564    pub id: Option<Id>,
565    /// Additional content defined by implementations
566    #[fhir(name="extension", min="0", max="*", summary=false, modifier=false, choice="")]
567    pub extension: Option<Vec<Extension>>,
568    /// Numerical value (with implicit precision)
569    #[fhir(name="value", min="0", max="1", summary=true, modifier=false, choice="")]
570    pub value: Option<DecimalDt>,
571    /// < | <= | >= | > | ad - how to understand the value
572    #[fhir(name="comparator", min="0", max="1", summary=true, modifier=true)]
573    pub comparator: Option<CodeDt>,
574    /// Unit representation
575    #[fhir(name="unit", min="0", max="1", summary=true, modifier=false, choice="")]
576    pub unit: Option<StringDt>,
577    /// System that defines coded unit form
578    #[fhir(name="system", min="0", max="1", summary=true, modifier=false, choice="")]
579    pub system: Option<UriDt>,
580    /// Coded form of the unit
581    #[fhir(name="code", min="0", max="1", summary=true, modifier=false, choice="")]
582    pub code: Option<CodeDt>,
583}
584
585#[derive(Element, Complex, Debug, Clone, Default)]
586pub struct ElementDefinition {
587    /// Unique id for inter-element referencing
588    #[fhir(name="id", min="0", max="1", summary=false, modifier=false, choice="")]
589    pub id: Option<Id>,
590    /// Additional content defined by implementations
591    #[fhir(name="extension", min="0", max="*", summary=false, modifier=false, choice="")]
592    pub extension: Option<Vec<Extension>>,
593    /// Extensions that cannot be ignored even if unrecognized
594    #[fhir(name="modifierExtension", min="0", max="*", summary=true, modifier=true)]
595    pub modifier_extension: Option<Vec<Extension>>,
596    /// Path of the element in the hierarchy of elements
597    #[fhir(name="path", min="1", max="1", summary=true, modifier=false, choice="")]
598    pub path: Option<StringDt>,
599    /// xmlAttr | xmlText | typeAttr | cdaText | xhtml
600    #[fhir(name="representation", min="0", max="*", summary=true, modifier=false, choice="")]
601    pub representation: Option<Vec<CodeDt>>,
602    /// Name for this particular element (in a set of slices)
603    #[fhir(name="sliceName", min="0", max="1", summary=true, modifier=false, choice="")]
604    pub slice_name: Option<StringDt>,
605    /// If this slice definition constrains an inherited slice definition (or not)
606    #[fhir(name="sliceIsConstraining", min="0", max="1", summary=true, modifier=false, choice="")]
607    pub slice_is_constraining: Option<BooleanDt>,
608    /// Name for element to display with or prompt for element
609    #[fhir(name="label", min="0", max="1", summary=true, modifier=false, choice="")]
610    pub label: Option<StringDt>,
611    /// Corresponding codes in terminologies
612    #[fhir(name="code", min="0", max="*", summary=true, modifier=false, choice="")]
613    pub code: Option<Vec<Coding>>,
614    /// This element is sliced - slices follow
615    #[fhir(name="slicing", min="0", max="1", summary=true, modifier=false, choice="")]
616    pub slicing: Option<ElementDefinitionSlicingElement>,
617    /// Concise definition for space-constrained presentation
618    #[fhir(name="short", min="0", max="1", summary=true, modifier=false, choice="")]
619    pub short: Option<StringDt>,
620    /// Full formal definition as narrative text
621    #[fhir(name="definition", min="0", max="1", summary=true, modifier=false, choice="")]
622    pub definition: Option<MarkdownDt>,
623    /// Comments about the use of this element
624    #[fhir(name="comment", min="0", max="1", summary=true, modifier=false, choice="")]
625    pub comment: Option<MarkdownDt>,
626    /// Why this resource has been created
627    #[fhir(name="requirements", min="0", max="1", summary=true, modifier=false, choice="")]
628    pub requirements: Option<MarkdownDt>,
629    /// Other names
630    #[fhir(name="alias", min="0", max="*", summary=true, modifier=false, choice="")]
631    pub alias: Option<Vec<StringDt>>,
632    /// Minimum Cardinality
633    #[fhir(name="min", min="0", max="1", summary=true, modifier=false, choice="")]
634    pub min: Option<UnsignedIntDt>,
635    /// Maximum Cardinality (a number or *)
636    #[fhir(name="max", min="0", max="1", summary=true, modifier=false, choice="")]
637    pub max: Option<StringDt>,
638    // Base definition information for tools
639    #[fhir(name="base", min="0", max="1", summary=true, modifier=false, choice="")]
640    pub base: Option<ElementDefinitionBaseElement>,
641    /// Reference to definition of content for the element
642    #[fhir(name="contentReference", min="0", max="1", summary=true, modifier=false, choice="")]
643    pub content_reference: Option<UriDt>,
644    // Data type and Profile for this element
645    #[fhir(name="type", min="0", max="*", summary=true, modifier=false, choice="")]
646    pub type_: Option<Vec<ElementDefinitionTypeElement>>,
647    /// Specified value if missing from instance
648    #[fhir(name="defaultValue", min="0", max="1", summary=true, modifier=false, choice="")]
649    pub default_value: Option<Meta>,
650    /// Implicit meaning when this element is missing
651    #[fhir(name="meaningWhenMissing", min="0", max="1", summary=true, modifier=false, choice="")]
652    pub meaning_when_missing: Option<MarkdownDt>,
653    /// What the order of the elements means
654    #[fhir(name="orderMeaning", min="0", max="1", summary=true, modifier=false, choice="")]
655    pub order_meaning: Option<StringDt>,
656    /// Value must be exactly this
657    #[fhir(name="fixed", min="0", max="1", summary=true, modifier=false, choice="")]
658    pub fixed: Option<Meta>,
659    /// Value must have at least these property values
660    #[fhir(name="pattern", min="0", max="1", summary=true, modifier=false, choice="Uri|CodeableConcept")]
661    pub pattern: Option<AnyType>,
662    /// Example value (as defined for type)
663    #[fhir(name="example", min="0", max="*", summary=true, modifier=false, choice="")]
664    pub example: Option<Vec<ElementDefinitionExampleElement>>,
665    /// Minimum Allowed Value (for some types)
666    #[fhir(name="minValue", min="0", max="1", summary=true, modifier=false, choice="")]
667    pub min_value: Option<Quantity>,
668    /// Maximum Allowed Value (for some types)
669    #[fhir(name="maxValue", min="0", max="1", summary=true, modifier=false, choice="")]
670    pub max_value: Option<Quantity>,
671    /// Max length for string type data
672    #[fhir(name="maxLength", min="0", max="1", summary=true, modifier=false, choice="")]
673    pub max_length: Option<IntegerDt>,
674    /// Reference to invariant about presence
675    #[fhir(name="condition", min="0", max="*", summary=true, modifier=false, choice="")]
676    pub condition: Option<Vec<IdDt>>,
677    /// Condition that must evaluate to true
678    #[fhir(name="constraint", min="0", max="*", summary=true, modifier=false, choice="")]
679    pub constraint: Option<Vec<ElementDefinitionConstraintElement>>,
680    /// For primitives, that a value must be present - not replaced by an extension
681    #[fhir(name="mustHaveValue", min="0", max="1", summary=true, modifier=false, choice="")]
682    pub must_have_value: Option<BooleanDt>,
683    /// Extensions that are allowed to replace a primitive value
684    #[fhir(name="valueAlternatives", min="0", max="*", summary=true, modifier=false, choice="")]
685    pub value_alternatives: Option<Vec<CanonicalDt>>,
686    /// If the element must be supported (discouraged - see obligations)
687    #[fhir(name="mustSupport", min="0", max="1", summary=true, modifier=false, choice="")]
688    pub must_support: Option<BooleanDt>,
689    /// If this modifies the meaning of other elements
690    #[fhir(name="isModifier", min="0", max="1", summary=true, modifier=false, choice="")]
691    pub is_modifier: Option<BooleanDt>,
692    /// Reason that this element is marked as a modifier
693    #[fhir(name="isModifierReason", min="0", max="1", summary=true, modifier=false, choice="")]
694    pub is_modifier_reason: Option<StringDt>,
695    /// Include when _summary = true?
696    #[fhir(name="isSummary", min="0", max="1", summary=true, modifier=false, choice="")]
697    pub is_summary: Option<BooleanDt>,
698    /// ValueSet details if this is coded
699    #[fhir(name="binding", min="0", max="1", summary=true, modifier=false, choice="")]
700    pub binding: Option<ElementDefinitionBindingElement>,
701    /// Map element to another set of definitions
702    #[fhir(name="mapping", min="0", max="*", summary=true, modifier=false, choice="")]
703    pub mapping: Option<Vec<ElementDefinitionMappingElement>>,
704}
705
706#[derive(Element, Complex, Debug, Clone, Default)]
707pub struct ElementDefinitionBaseElement {
708    /// Unique id for inter-element referencing
709    #[fhir(name="id", min="0", max="1", summary=false, modifier=false, choice="")]
710    pub id: Option<String>,
711    /// Additional content defined by implementations
712    #[fhir(name="extension", min="0", max="*", summary=false, modifier=false, choice="")]
713    pub extension: Option<Vec<Extension>>,
714    /// Path that identifies the base element
715    #[fhir(name="path", min="1", max="1", summary=true, modifier=false, choice="")]
716    pub path: Option<StringDt>,
717    /// Min cardinality of the base element
718    #[fhir(name="min", min="1", max="1", summary=true, modifier=false, choice="")]
719    pub min: Option<UnsignedIntDt>,
720    /// Max cardinality of the base element
721    #[fhir(name="max", min="1", max="1", summary=true, modifier=false, choice="")]
722    pub max: Option<StringDt>,
723}
724
725#[derive(Element, Complex, Debug, Clone, Default)]
726pub struct ElementDefinitionSlicingElement {
727    /// Unique id for inter-element referencing
728    #[fhir(name="id", min="0", max="1", summary=false, modifier=false, choice="")]
729    pub id: Option<String>,
730    /// Additional content defined by implementations
731    #[fhir(name="extension", min="0", max="*", summary=false, modifier=false, choice="")]
732    pub extension: Option<Vec<Extension>>,
733    /// Element values that are used to distinguish the slices
734    #[fhir(name="discriminator", min="0", max="*", summary=true, modifier=false, choice="")]
735    pub discriminator: Option<Vec<ElementDefinitionSlicingDiscriminatorElement>>,
736    /// Text description of how slicing works (or not)
737    #[fhir(name="description", min="0", max="1", summary=true, modifier=false, choice="")]
738    pub description: Option<StringDt>,
739    /// If elements must be in same order as slices
740    #[fhir(name="ordered", min="0", max="1", summary=true, modifier=false, choice="")]
741    pub ordered: Option<BooleanDt>,
742    /// closed | open | openAtEnd
743    #[fhir(name="rules", min="1", max="1", summary=true, modifier=false, choice="")]
744    pub rules: Option<CodeDt>,
745}
746
747#[derive(Element, Complex, Debug, Clone, Default)]
748pub struct ElementDefinitionSlicingDiscriminatorElement {
749    /// Unique id for inter-element referencing
750    #[fhir(name="id", min="0", max="1", summary=false, modifier=false, choice="")]
751    pub id: Option<String>,
752    /// Additional content defined by implementations
753    #[fhir(name="extension", min="0", max="*", summary=false, modifier=false, choice="")]
754    pub extension: Option<Vec<Extension>>,
755    /// value | exists | type | profile | position
756    #[fhir(name="type", min="1", max="1", summary=true, modifier=false, choice="")]
757    pub type_: Option<CodeDt>,
758    /// Path to element value
759    #[fhir(name="path", min="1", max="1", summary=true, modifier=false, choice="")]
760    pub path: Option<StringDt>,
761}
762
763#[derive(Element, Complex, Debug, Clone, Default)]
764pub struct ElementDefinitionMappingElement {
765    /// Unique id for inter-element referencing
766    #[fhir(name="id", min="0", max="1", summary=false, modifier=false, choice="")]
767    pub id: Option<String>,
768    /// Additional content defined by implementations
769    #[fhir(name="extension", min="0", max="*", summary=false, modifier=false, choice="")]
770    pub extension: Option<Vec<Extension>>,
771    /// Reference to mapping declaration
772    #[fhir(name="identity", min="1", max="1", summary=true, modifier=false, choice="")]
773    pub identity: Option<IdDt>,
774    /// Computable language of mapping
775    #[fhir(name="language", min="0", max="1", summary=true, modifier=false, choice="")]
776    pub language: Option<CodeDt>,
777    /// Details of the mapping
778    #[fhir(name="map", min="1", max="1", summary=true, modifier=false, choice="")]
779    pub map: Option<StringDt>,
780    /// Comments about the mapping or its use
781    #[fhir(name="comment", min="0", max="1", summary=true, modifier=false, choice="")]
782    pub comment: Option<MarkdownDt>,
783}
784
785#[derive(Element, Complex, Debug, Clone, Default)]
786pub struct ElementDefinitionTypeElement {
787    /// Unique id for inter-element referencing
788    #[fhir(name="id", min="0", max="1", summary=false, modifier=false, choice="")]
789    pub id: Option<String>,
790    /// Additional content defined by implementations
791    #[fhir(name="extension", min="0", max="*", summary=false, modifier=false, choice="")]
792    pub extension: Option<Vec<Extension>>,
793    /// Data type or Resource (reference to definition)
794    #[fhir(name="code", min="1", max="1", summary=true, modifier=false, choice="")]
795    pub code: Option<UriDt>,
796    /// Profiles (StructureDefinition or IG) - one must apply
797    #[fhir(name="profile", min="0", max="*", summary=true, modifier=false, choice="")]
798    pub profile: Option<Vec<CanonicalDt>>,
799    /// Profile (StructureDefinition or IG) on the Reference/canonical target - one must apply
800    #[fhir(name="targetProfile", min="0", max="*", summary=true, modifier=false, choice="")]
801    pub target_profile: Option<Vec<CanonicalDt>>,
802    /// contained | referenced | bundled - how aggregated
803    #[fhir(name="aggregation", min="0", max="*", summary=true, modifier=false, choice="")]
804    pub aggregation: Option<Vec<CodeDt>>,
805    /// either | independent | specific
806    #[fhir(name="versioning", min="0", max="1", summary=true, modifier=false, choice="")]
807    pub versioning: Option<CodeDt>,
808}
809
810#[derive(Element, Complex, Debug, Clone, Default)]
811pub struct ElementDefinitionBindingElement {
812    /// Unique id for inter-element referencing
813    #[fhir(name="id", min="0", max="1", summary=false, modifier=false, choice="")]
814    pub id: Option<String>,
815    /// Additional content defined by implementations
816    #[fhir(name="extension", min="0", max="*", summary=false, modifier=false, choice="")]
817    pub extension: Option<Vec<Extension>>,
818    /// required | extensible | preferred | example
819    #[fhir(name="strength", min="1", max="1", summary=true, modifier=false, choice="")]
820    pub strength: Option<CodeDt>,
821    /// Intended use of codes in the bound value set
822    #[fhir(name="description", min="0", max="1", summary=true, modifier=false, choice="")]
823    pub description: Option<MarkdownDt>,
824    /// Source of value set
825    #[fhir(name="valueSet", min="0", max="1", summary=true, modifier=false, choice="")]
826    pub value_set: Option<CanonicalDt>,
827    /// Additional Bindings - more rules about the binding
828    #[fhir(name="additional", min="0", max="*", summary=true, modifier=false, choice="")]
829    pub additional: Option<Vec<ElementDefinitionBindingAdditionalElement>>,
830}
831
832#[derive(Element, Complex, Debug, Clone, Default)]
833pub struct ElementDefinitionBindingAdditionalElement {
834    /// Unique id for inter-element referencing
835    #[fhir(name="id", min="0", max="1", summary=false, modifier=false, choice="")]
836    pub id: Option<String>,
837    /// Additional content defined by implementations
838    #[fhir(name="extension", min="0", max="*", summary=false, modifier=false, choice="")]
839    pub extension: Option<Vec<Extension>>,
840    /// maximum | minimum | required | extensible | candidate | current | preferred | ui | starter | component
841    #[fhir(name="purpose", min="1", max="1", summary=true, modifier=false, choice="")]
842    pub purpose: Option<CodeDt>,
843    /// The value set for the additional binding
844    #[fhir(name="valueSet", min="1", max="1", summary=true, modifier=false, choice="")]
845    pub value_set: Option<CanonicalDt>,
846    /// Documentation of the purpose of use of the binding
847    #[fhir(name="documentation", min="0", max="1", summary=true, modifier=false, choice="")]
848    pub documentation: Option<MarkdownDt>,
849    /// Concise documentation - for summary tables
850    #[fhir(name="shortDoco", min="0", max="1", summary=true, modifier=false, choice="")]
851    pub short_doco: Option<StringDt>,
852    /// Qualifies the usage - jurisdiction, gender, workflow status etc.
853    #[fhir(name="usage", min="0", max="*", summary=true, modifier=false, choice="")]
854    pub usage: Option<Vec<UsageContext>>,
855    /// Whether binding can applies to all repeats, or just one
856    #[fhir(name="any", min="0", max="1", summary=true, modifier=false, choice="")]
857    pub any: Option<BooleanDt>,
858}
859
860#[derive(Element, Complex, Debug, Clone, Default)]
861pub struct ElementDefinitionExampleElement {
862    /// Unique id for inter-element referencing
863    #[fhir(name="id", min="0", max="1", summary=false, modifier=false, choice="")]
864    pub id: Option<String>,
865    /// Additional content defined by implementations
866    #[fhir(name="extension", min="0", max="*", summary=false, modifier=false, choice="")]
867    pub extension: Option<Vec<Extension>>,
868    /// Describes the purpose of this example
869    #[fhir(name="label", min="1", max="1", summary=true, modifier=false, choice="")]
870    pub label: Option<StringDt>,
871    /// Value of Example (one of allowed types)
872    #[fhir(name="value", min="1", max="1", summary=true, modifier=false, choice="Uri|String")]
873    pub value: Option<AnyType>,
874}
875
876#[derive(Element, Complex, Debug, Clone, Default)]
877pub struct ElementDefinitionConstraintElement {
878    /// Unique id for inter-element referencing
879    #[fhir(name="id", min="0", max="1", summary=false, modifier=false, choice="")]
880    pub id: Option<String>,
881    /// Additional content defined by implementations
882    #[fhir(name="extension", min="0", max="*", summary=false, modifier=false, choice="")]
883    pub extension: Option<Vec<Extension>>,
884    /// Target of 'condition' reference above
885    #[fhir(name="key", min="1", max="1", summary=true, modifier=false, choice="")]
886    pub key: Option<IdDt>,
887    /// Why this constraint is necessary or appropriate
888    #[fhir(name="requirements", min="0", max="1", summary=true, modifier=false, choice="")]
889    pub requirements: Option<MarkdownDt>,
890    /// error | warning
891    #[fhir(name="severity", min="1", max="1", summary=true, modifier=false, choice="")]
892    pub severity: Option<CodeDt>,
893    /// Suppress warning or hint in profile
894    #[fhir(name="suppress", min="0", max="1", summary=true, modifier=false, choice="")]
895    pub suppress: Option<BooleanDt>,
896    /// Human description of constraint
897    #[fhir(name="human", min="1", max="1", summary=true, modifier=false, choice="")]
898    pub human: Option<StringDt>,
899    /// FHIRPath expression of constraint
900    #[fhir(name="expression", min="0", max="1", summary=true, modifier=false, choice="")]
901    pub expression: Option<StringDt>,
902    /// Reference to original source of constraint
903    #[fhir(name="source", min="0", max="1", summary=true, modifier=false, choice="")]
904    pub source: Option<CanonicalDt>,
905}
906
907#[derive(Element, Complex, Debug, Clone, Default)]
908pub struct Expression {
909    /// Unique id for inter-element referencing
910    #[fhir(name="id", min="0", max="1", summary=false, modifier=false, choice="")]
911    pub id: Option<Id>,
912    /// Additional content defined by implementations
913    #[fhir(name="extension", min="0", max="*", summary=false, modifier=false, choice="")]
914    pub extension: Option<Vec<Extension>>,
915    /// Natural language description of the condition
916    #[fhir(name="description", min="0", max="1", summary=true, modifier=false, choice="")]
917    pub description: Option<StringDt>,
918    /// Short name assigned to expression for reuse
919    #[fhir(name="name", min="0", max="1", summary=true, modifier=false, choice="")]
920    pub name: Option<CodeDt>,
921    /// text/cql | text/fhirpath | application/x-fhir-query | etc.
922    #[fhir(name="language", min="0", max="1", summary=true, modifier=false, choice="")]
923    pub language: Option<CodeDt>,
924    /// Expression in specified language
925    #[fhir(name="expression", min="0", max="1", summary=true, modifier=false, choice="")]
926    pub expression: Option<StringDt>,
927    /// Where the expression is found
928    #[fhir(name="reference", min="0", max="1", summary=true, modifier=false, choice="")]
929    pub reference: Option<UriDt>,
930}
931
932#[derive(Element, Complex, Debug, Clone, Default)]
933pub struct ExtendedContactDetail {
934    /// Unique id for inter-element referencing
935    #[fhir(name="id", min="0", max="1", summary=false, modifier=false, choice="")]
936    pub id: Option<Id>,
937    /// Additional content defined by implementations
938    #[fhir(name="extension", min="0", max="*", summary=false, modifier=false, choice="")]
939    pub extension: Option<Vec<Extension>>,
940    /// The type of contact
941    #[fhir(name="purpose", min="0", max="1", summary=true, modifier=false, choice="")]
942    pub purpose: Option<CodeableConcept>,
943    /// Name of an individual to contact
944    #[fhir(name="name", min="0", max="*", summary=true, modifier=false, choice="")]
945    pub name: Option<Vec<HumanName>>,
946    /// Contact details (e.g.phone/fax/url)
947    #[fhir(name="telecom", min="0", max="*", summary=true, modifier=false, choice="")]
948    pub telecom: Option<Vec<ContactPoint>>,
949    /// Address for the contact
950    #[fhir(name="address", min="0", max="1", summary=true, modifier=false, choice="")]
951    pub address: Option<Address>,
952    /// This contact detail is handled/monitored by a specific organization
953    #[fhir(name="organization", min="0", max="1", summary=true, modifier=false, choice="")]
954    pub organization: Option<Reference>,
955    /// Period that this contact was valid for usage
956    #[fhir(name="period", min="0", max="1", summary=true, modifier=false, choice="")]
957    pub period: Option<Period>,
958}
959
960
961
962#[derive(Element, Complex, Debug, Clone, Default)]
963pub struct HumanName {
964    /// Unique id for inter-element referencing
965    #[fhir(name="id", min="0", max="1", summary=false, modifier=false, choice="")]
966    pub id: Option<Id>,
967    /// Additional content defined by implementations
968    #[fhir(name="extension", min="0", max="*", summary=false, modifier=false, choice="")]
969    pub extension: Option<Vec<Extension>>,
970    /// usual | official | temp | nickname | anonymous | old | maiden
971    #[fhir(name="use", min="0", max="1", summary=true, modifier=true)]
972    pub use_: Option<CodeDt>,
973    /// Text representation of the full name
974    #[fhir(name="text", min="0", max="1", summary=true, modifier=false, choice="")]
975    pub text: Option<StringDt>,
976    /// Family name (often called 'Surname')
977    #[fhir(name="family", min="0", max="1", summary=true, modifier=false, choice="")]
978    pub family: Option<StringDt>,
979    /// Given names (not always 'first'). Includes middle names
980    #[fhir(name="given", min="0", max="*", summary=true, modifier=false, choice="")]
981    pub given: Option<Vec<StringDt>>,
982    /// Parts that come before the name
983    #[fhir(name="prefix", min="0", max="*", summary=true, modifier=false, choice="")]
984    pub prefix: Option<Vec<StringDt>>,
985    /// Parts that come after the name
986    #[fhir(name="suffix", min="0", max="*", summary=true, modifier=false, choice="")]
987    pub suffix: Option<Vec<StringDt>>,
988    /// Time period when name was/is in use
989    #[fhir(name="period", min="0", max="1", summary=true, modifier=false, choice="")]
990    pub period: Option<Period>,
991}
992
993#[derive(Element, Complex, Debug, Clone, Default)]
994pub struct Identifier {
995    /// Unique id for inter-element referencing
996    #[fhir(name="id", min="0", max="1", summary=false, modifier=false, choice="")]
997    pub id: Option<Id>,
998    /// Additional content defined by implementations
999    #[fhir(name="extension", min="0", max="*", summary=false, modifier=false, choice="")]
1000    pub extension: Option<Vec<Extension>>,
1001    /// usual | official | temp | secondary | old (If known)
1002    #[fhir(name="use", min="0", max="1", summary=true, modifier=true)]
1003    pub use_: Option<CodeDt>,
1004    /// Description of identifier
1005    #[fhir(name="type", min="0", max="1", summary=true, modifier=false, choice="")]
1006    pub type_: Option<CodeableConcept>,
1007    /// The namespace for the identifier value
1008    #[fhir(name="system", min="0", max="1", summary=true, modifier=false, choice="")]
1009    pub system: Option<UriDt>,
1010    /// The value that is unique
1011    #[fhir(name="value", min="0", max="1", summary=true, modifier=false, choice="")]
1012    pub value: Option<StringDt>,
1013    /// Time period when id is/was valid for use
1014    #[fhir(name="period", min="0", max="1", summary=true, modifier=false, choice="")]
1015    pub period: Option<Period>,
1016    /// Organization that issued id (may be just text)
1017    #[fhir(name="assigner", min="0", max="1", summary=true, modifier=false, choice="")]
1018    pub assigner: Option<Reference>,
1019}
1020
1021#[derive(Element, Complex, Debug, Clone, Default)]
1022pub struct MarketingStatus {
1023    /// Unique id for inter-element referencing
1024    #[fhir(name="id", min="0", max="1", summary=false, modifier=false, choice="")]
1025    pub id: Option<Id>,
1026    /// Additional content defined by implementations
1027    #[fhir(name="extension", min="0", max="*", summary=false, modifier=false, choice="")]
1028    pub extension: Option<Vec<Extension>>,
1029    /// Extensions that cannot be ignored even if unrecognized
1030    #[fhir(name="modifierExtension", min="0", max="*", summary=true, modifier=true)]
1031    pub modifier_extension: Option<Vec<Extension>>,
1032    /// The country in which the marketing authorization has been granted shall be specified It should be specified using the ISO 3166 ‑ 1 alpha-2 code elements
1033    #[fhir(name="country", min="0", max="1", summary=true, modifier=false, choice="")]
1034    pub country: Option<CodeableConcept>,
1035    /// Where a Medicines Regulatory Agency has granted a marketing authorization 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
1036    #[fhir(name="jurisdiction", min="0", max="1", summary=true, modifier=false, choice="")]
1037    pub jurisdiction: Option<CodeableConcept>,
1038    /// This attribute provides information on the status of the marketing of the medicinal product See ISO/TS 20443 for more information and examples
1039    #[fhir(name="status", min="1", max="1", summary=true, modifier=false, choice="")]
1040    pub status: Option<CodeableConcept>,
1041    /// The date when the Medicinal Product is placed on the market by the Marketing Authorization 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
1042    #[fhir(name="dateRange", min="0", max="1", summary=true, modifier=false, choice="")]
1043    pub date_range: Option<Period>,
1044    /// The date when the Medicinal Product is placed on the market by the Marketing Authorization 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
1045    #[fhir(name="restoreDate", min="0", max="1", summary=true, modifier=false, choice="")]
1046    pub restore_date: Option<DateTimeDt>,
1047}
1048
1049#[derive(Element, Complex, Debug, Clone, Default)]
1050pub struct Meta {
1051    /// Unique id for inter-element referencing
1052    #[fhir(name="id", min="0", max="1", summary=false, modifier=false, choice="")]
1053    pub id: Option<Id>,
1054    /// Additional content defined by implementations
1055    #[fhir(name="extension", min="0", max="*", summary=false, modifier=false, choice="")]
1056    pub extension: Option<Vec<Extension>>,
1057    /// Version specific identifier
1058    #[fhir(name="versionId", min="0", max="1", summary=true, modifier=false, choice="")]
1059    pub version_id: Option<IdDt>,
1060    /// When the resource version last changed
1061    #[fhir(name="lastUpdated", min="0", max="1", summary=true, modifier=false, choice="")]
1062    pub last_updated: Option<InstantDt>,
1063    /// Identifies where the resource comes from
1064    #[fhir(name="source", min="0", max="1", summary=true, modifier=false, choice="")]
1065    pub source: Option<UriDt>,
1066    /// Profiles this resource claims to conform to
1067    #[fhir(name="profile", min="0", max="*", summary=true, modifier=false, choice="")]
1068    pub profile: Option<Vec<CanonicalDt>>,
1069    /// Security Labels applied to this resource
1070    #[fhir(name="security", min="0", max="*", summary=true, modifier=false, choice="")]
1071    pub security: Option<Vec<Coding>>,
1072    /// Tags applied to this resource
1073    #[fhir(name="tag", min="0", max="*", summary=true, modifier=false, choice="")]
1074    pub tag: Option<Vec<Coding>>,
1075}
1076
1077#[derive(Element, Complex, Debug, Clone, Default)]
1078pub struct MonetaryComponent {
1079    /// Unique id for inter-element referencing
1080    #[fhir(name="id", min="0", max="1", summary=false, modifier=false, choice="")]
1081    pub id: Option<Id>,
1082    /// Additional content defined by implementations
1083    #[fhir(name="extension", min="0", max="*", summary=false, modifier=false, choice="")]
1084    pub extension: Option<Vec<Extension>>,
1085    /// base | surcharge | deduction | discount | tax | informational
1086    #[fhir(name="type", min="1", max="1", summary=true, modifier=false, choice="")]
1087    pub type_: Option<CodeDt>,
1088    /// Codes may be used to differentiate between kinds of taxes, surcharges, discounts etc.
1089    #[fhir(name="code", min="0", max="1", summary=true, modifier=false, choice="")]
1090    pub code: Option<CodeableConcept>,
1091    /// Factor used for calculating this component
1092    #[fhir(name="factor", min="0", max="1", summary=true, modifier=false, choice="")]
1093    pub factor: Option<DecimalDt>,
1094    /// Explicit value amount to be used
1095    #[fhir(name="amount", min="0", max="1", summary=true, modifier=false, choice="")]
1096    pub amount: Option<Money>,
1097}
1098
1099#[derive(Element, Complex, Debug, Clone, Default)]
1100pub struct Money {
1101    /// Unique id for inter-element referencing
1102    #[fhir(name="id", min="0", max="1", summary=false, modifier=false, choice="")]
1103    pub id: Option<Id>,
1104    /// Additional content defined by implementations
1105    #[fhir(name="extension", min="0", max="*", summary=false, modifier=false, choice="")]
1106    pub extension: Option<Vec<Extension>>,
1107    /// Numerical value (with implicit precision)
1108    #[fhir(name="value", min="0", max="1", summary=true, modifier=false, choice="")]
1109    pub value: Option<DecimalDt>,
1110    /// ISO 4217 Currency Code
1111    #[fhir(name="currency", min="0", max="1", summary=true, modifier=false, choice="")]
1112    pub currency: Option<CodeDt>,
1113}
1114
1115
1116
1117#[derive(Element, Complex, Debug, Clone, Default)]
1118pub struct ParameterDefinition {
1119    /// Unique id for inter-element referencing
1120    #[fhir(name="id", min="0", max="1", summary=false, modifier=false, choice="")]
1121    pub id: Option<Id>,
1122    /// Additional content defined by implementations
1123    #[fhir(name="extension", min="0", max="*", summary=false, modifier=false, choice="")]
1124    pub extension: Option<Vec<Extension>>,
1125    /// Name used to access the parameter value
1126    #[fhir(name="name", min="0", max="1", summary=true, modifier=false, choice="")]
1127    pub name: Option<CodeDt>,
1128    /// in | out
1129    #[fhir(name="use", min="1", max="1", summary=true, modifier=false, choice="")]
1130    pub use_: Option<CodeDt>,
1131    /// Minimum cardinality
1132    #[fhir(name="min", min="0", max="1", summary=true, modifier=false, choice="")]
1133    pub min: Option<IntegerDt>,
1134    /// Maximum cardinality (a number of *)
1135    #[fhir(name="max", min="0", max="1", summary=true, modifier=false, choice="")]
1136    pub max: Option<StringDt>,
1137    /// A brief description of the parameter
1138    #[fhir(name="documentation", min="0", max="1", summary=true, modifier=false, choice="")]
1139    pub documentation: Option<StringDt>,
1140    /// What type of value
1141    #[fhir(name="type", min="1", max="1", summary=true, modifier=false, choice="")]
1142    pub type_: Option<CodeDt>,
1143    /// What profile the value is expected to be
1144    #[fhir(name="profile", min="0", max="1", summary=true, modifier=false, choice="")]
1145    pub profile: Option<CanonicalDt>,
1146}
1147
1148#[derive(Element, Complex, Debug, Clone, Default)]
1149pub struct Period {
1150    /// Unique id for inter-element referencing
1151    #[fhir(name="id", min="0", max="1", summary=false, modifier=false, choice="")]
1152    pub id: Option<Id>,
1153    /// Additional content defined by implementations
1154    #[fhir(name="extension", min="0", max="*", summary=false, modifier=false, choice="")]
1155    pub extension: Option<Vec<Extension>>,
1156    /// Starting time with inclusive boundary
1157    #[fhir(name="start", min="0", max="1", summary=true, modifier=false, choice="")]
1158    pub start: Option<DateTimeDt>,
1159    /// End time with inclusive boundary, if not ongoing
1160    #[fhir(name="end", min="0", max="1", summary=true, modifier=false, choice="")]
1161    pub end: Option<DateTimeDt>,
1162}
1163
1164#[derive(Element, Complex, Debug, Clone, Default)]
1165pub struct PrimitiveType {
1166    /// Unique id for inter-element referencing
1167    #[fhir(name="id", min="0", max="1", summary=false, modifier=false, choice="")]
1168    pub id: Option<Id>,
1169    /// Additional content defined by implementations
1170    #[fhir(name="extension", min="0", max="*", summary=false, modifier=false, choice="")]
1171    pub extension: Option<Vec<Extension>>,
1172}
1173
1174#[derive(Element, Complex, Debug, Clone, Default)]
1175pub struct ProductShelfLife {
1176    /// Unique id for inter-element referencing
1177    #[fhir(name="id", min="0", max="1", summary=false, modifier=false, choice="")]
1178    pub id: Option<Id>,
1179    /// Additional content defined by implementations
1180    #[fhir(name="extension", min="0", max="*", summary=false, modifier=false, choice="")]
1181    pub extension: Option<Vec<Extension>>,
1182    /// Extensions that cannot be ignored even if unrecognized
1183    #[fhir(name="modifierExtension", min="0", max="*", summary=true, modifier=true)]
1184    pub modifier_extension: Option<Vec<Extension>>,
1185    /// 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
1186    #[fhir(name="type", min="0", max="1", summary=true, modifier=false, choice="")]
1187    pub type_: Option<CodeableConcept>,
1188    /// 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
1189    #[fhir(name="period", min="0", max="1", summary=true, modifier=false, choice="")]
1190    pub period: Option<StringDt>,
1191    /// 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
1192    #[fhir(name="specialPrecautionsForStorage", min="0", max="*", summary=true, modifier=false, choice="")]
1193    pub special_precautions_for_storage: Option<Vec<CodeableConcept>>,
1194}
1195
1196#[derive(Element, Complex, Debug, Clone, Default)]
1197pub struct Quantity {
1198    /// Unique id for inter-element referencing
1199    #[fhir(name="id", min="0", max="1", summary=false, modifier=false, choice="")]
1200    pub id: Option<Id>,
1201    /// Additional content defined by implementations
1202    #[fhir(name="extension", min="0", max="*", summary=false, modifier=false, choice="")]
1203    pub extension: Option<Vec<Extension>>,
1204    /// Numerical value (with implicit precision)
1205    #[fhir(name="value", min="0", max="1", summary=true, modifier=false, choice="")]
1206    pub value: Option<DecimalDt>,
1207    /// < | <= | >= | > | ad - how to understand the value
1208    #[fhir(name="comparator", min="0", max="1", summary=true, modifier=true)]
1209    pub comparator: Option<CodeDt>,
1210    /// Unit representation
1211    #[fhir(name="unit", min="0", max="1", summary=true, modifier=false, choice="")]
1212    pub unit: Option<StringDt>,
1213    /// System that defines coded unit form
1214    #[fhir(name="system", min="0", max="1", summary=true, modifier=false, choice="")]
1215    pub system: Option<UriDt>,
1216    /// Coded form of the unit
1217    #[fhir(name="code", min="0", max="1", summary=true, modifier=false, choice="")]
1218    pub code: Option<CodeDt>,
1219}
1220
1221#[derive(Element, Complex, Debug, Clone, Default)]
1222pub struct Range {
1223    /// Unique id for inter-element referencing
1224    #[fhir(name="id", min="0", max="1", summary=false, modifier=false, choice="")]
1225    pub id: Option<Id>,
1226    /// Additional content defined by implementations
1227    #[fhir(name="extension", min="0", max="*", summary=false, modifier=false, choice="")]
1228    pub extension: Option<Vec<Extension>>,
1229    /// Low limit
1230    #[fhir(name="low", min="0", max="1", summary=true, modifier=false, choice="")]
1231    pub low: Option<Quantity>,
1232    /// High limit
1233    #[fhir(name="high", min="0", max="1", summary=true, modifier=false, choice="")]
1234    pub high: Option<Quantity>,
1235}
1236
1237#[derive(Element, Complex, Debug, Clone, Default)]
1238pub struct Ratio {
1239    /// Unique id for inter-element referencing
1240    #[fhir(name="id", min="0", max="1", summary=false, modifier=false, choice="")]
1241    pub id: Option<Id>,
1242    /// Additional content defined by implementations
1243    #[fhir(name="extension", min="0", max="*", summary=false, modifier=false, choice="")]
1244    pub extension: Option<Vec<Extension>>,
1245    /// Numerator value
1246    #[fhir(name="numerator", min="0", max="1", summary=true, modifier=false, choice="")]
1247    pub numerator: Option<Quantity>,
1248    /// Denominator value
1249    #[fhir(name="denominator", min="0", max="1", summary=true, modifier=false, choice="")]
1250    pub denominator: Option<Quantity>,
1251}
1252
1253#[derive(Element, Complex, Debug, Clone, Default)]
1254pub struct RatioRange {
1255    /// Unique id for inter-element referencing
1256    #[fhir(name="id", min="0", max="1", summary=false, modifier=false, choice="")]
1257    pub id: Option<Id>,
1258    /// Additional content defined by implementations
1259    #[fhir(name="extension", min="0", max="*", summary=false, modifier=false, choice="")]
1260    pub extension: Option<Vec<Extension>>,
1261    /// Low Numerator limit
1262    #[fhir(name="lowNumerator", min="0", max="1", summary=true, modifier=false, choice="")]
1263    pub low_numerator: Option<Quantity>,
1264    /// High Numerator limit
1265    #[fhir(name="highNumerator", min="0", max="1", summary=true, modifier=false, choice="")]
1266    pub high_numerator: Option<Quantity>,
1267    /// Denominator value
1268    #[fhir(name="denominator", min="0", max="1", summary=true, modifier=false, choice="")]
1269    pub denominator: Option<Quantity>,
1270}
1271
1272#[derive(Element, Complex, Debug, Clone, Default)]
1273pub struct Reference {
1274    /// Unique id for inter-element referencing
1275    #[fhir(name="id", min="0", max="1", summary=false, modifier=false, choice="")]
1276    pub id: Option<Id>,
1277    /// Additional content defined by implementations
1278    #[fhir(name="extension", min="0", max="*", summary=false, modifier=false, choice="")]
1279    pub extension: Option<Vec<Extension>>,
1280    /// Literal reference, Relative, internal or absolute URL
1281    #[fhir(name="reference", min="0", max="1", summary=true, modifier=false, choice="")]
1282    pub reference: Option<StringDt>,
1283    /// Type the reference refers to (e.g. "Patient") - must be a resource in resources
1284    #[fhir(name="type", min="0", max="1", summary=true, modifier=false, choice="")]
1285    pub type_: Option<UriDt>,
1286    /// Logical reference, when literal reference is not known
1287    #[fhir(name="identifier", min="0", max="1", summary=true, modifier=false, choice="")]
1288    pub identifier: Option<Box<Identifier>>,
1289    /// Text alternative for the resource
1290    #[fhir(name="display", min="0", max="1", summary=true, modifier=false, choice="")]
1291    pub display: Option<StringDt>,
1292}
1293
1294#[derive(Element, Complex, Debug, Clone, Default)]
1295pub struct RelatedArtifact {
1296    /// Unique id for inter-element referencing
1297    #[fhir(name="id", min="0", max="1", summary=false, modifier=false, choice="")]
1298    pub id: Option<Id>,
1299    /// Additional content defined by implementations
1300    #[fhir(name="extension", min="0", max="*", summary=false, modifier=false, choice="")]
1301    pub extension: Option<Vec<Extension>>,
1302    /// documentation | justification | citation | predecessor | successor | derived-from | depends-on | composed-of | part-of | amends | amended-with | appends | appended-with | cites | cited-by | comments-on | comment-in | contains | contained-in | corrects | correction-in | replaces | replaced-with | retracts | retracted-by | signs | similar-to | supports | supported-with | transforms | transformed-into | transformed-with | documents | specification-of | created-with | cite-as
1303    #[fhir(name="type", min="1", max="1", summary=true, modifier=false, choice="")]
1304    pub type_: Option<CodeDt>,
1305    /// Additional classifiers
1306    #[fhir(name="classifier", min="0", max="*", summary=true, modifier=false, choice="")]
1307    pub classifier: Option<Vec<CodeableConcept>>,
1308    /// Short label
1309    #[fhir(name="label", min="0", max="1", summary=true, modifier=false, choice="")]
1310    pub label: Option<StringDt>,
1311    /// Brief description of the related artifact
1312    #[fhir(name="display", min="0", max="1", summary=true, modifier=false, choice="")]
1313    pub display: Option<StringDt>,
1314    /// Bibliographic citation for the artifact
1315    #[fhir(name="citation", min="0", max="1", summary=true, modifier=false, choice="")]
1316    pub citation: Option<MarkdownDt>,
1317    /// What document is being referenced
1318    #[fhir(name="document", min="0", max="1", summary=true, modifier=false, choice="")]
1319    pub document: Option<Attachment>,
1320    /// What artifact is being referenced
1321    #[fhir(name="resource", min="0", max="1", summary=true, modifier=false, choice="")]
1322    pub resource: Option<CanonicalDt>,
1323    /// What artifact, if not a conformance resource
1324    #[fhir(name="resourceReference", min="0", max="1", summary=true, modifier=false, choice="")]
1325    pub resource_reference: Option<Reference>,
1326    /// draft | active | retired | unknown
1327    #[fhir(name="publicationStatus", min="0", max="1", summary=true, modifier=false, choice="")]
1328    pub publication_status: Option<CodeDt>,
1329    /// Date of publication of the artifact being referred to
1330    #[fhir(name="publicationDate", min="0", max="1", summary=true, modifier=false, choice="")]
1331    pub publication_date: Option<DateDt>,
1332}
1333
1334#[derive(Element, Complex, Debug, Clone, Default)]
1335pub struct SampledData {
1336    /// Unique id for inter-element referencing
1337    #[fhir(name="id", min="0", max="1", summary=false, modifier=false, choice="")]
1338    pub id: Option<Id>,
1339    /// Additional content defined by implementations
1340    #[fhir(name="extension", min="0", max="*", summary=false, modifier=false, choice="")]
1341    pub extension: Option<Vec<Extension>>,
1342    /// Zero value and units
1343    #[fhir(name="origin", min="1", max="1", summary=true, modifier=false, choice="")]
1344    pub origin: Option<Quantity>,
1345    /// Number of intervalUnits between samples
1346    #[fhir(name="interval", min="0", max="1", summary=true, modifier=false, choice="")]
1347    pub interval: Option<DecimalDt>,
1348    /// The measurement unit of the interval between samples
1349    #[fhir(name="intervalUnit", min="1", max="1", summary=true, modifier=false, choice="")]
1350    pub interval_unit: Option<CodeDt>,
1351    /// Multiply data by this before adding to origin
1352    #[fhir(name="factor", min="0", max="1", summary=true, modifier=false, choice="")]
1353    pub factor: Option<DecimalDt>,
1354    /// Lower limit of detection
1355    #[fhir(name="lowerLimit", min="0", max="1", summary=true, modifier=false, choice="")]
1356    pub lower_limit: Option<DecimalDt>,
1357    /// Upper limit of detection
1358    #[fhir(name="upperLimit", min="0", max="1", summary=true, modifier=false, choice="")]
1359    pub upper_limit: Option<DecimalDt>,
1360    /// Number of sample points at each time point
1361    #[fhir(name="dimensions", min="1", max="1", summary=true, modifier=false, choice="")]
1362    pub dimensions: Option<PositiveIntDt>,
1363    /// Defines the codes used in the data
1364    #[fhir(name="codeMap", min="0", max="1", summary=false, modifier=false, choice="")]
1365    pub code_map: Option<CanonicalDt>,
1366    /// Offsets, typically in time, at which data values were taken
1367    #[fhir(name="offsets", min="0", max="1", summary=false, modifier=false, choice="")]
1368    pub offsets: Option<StringDt>,
1369    /// Decimal values with spaces, or "E" | "U" | "L", or another code
1370    #[fhir(name="data", min="0", max="1", summary=false, modifier=false, choice="")]
1371    pub data: Option<StringDt>,
1372}
1373
1374#[derive(Element, Complex, Debug, Clone, Default)]
1375pub struct Signature {
1376    /// Unique id for inter-element referencing
1377    #[fhir(name="id", min="0", max="1", summary=false, modifier=false, choice="")]
1378    pub id: Option<Id>,
1379    /// Additional content defined by implementations
1380    #[fhir(name="extension", min="0", max="*", summary=false, modifier=false, choice="")]
1381    pub extension: Option<Vec<Extension>>,
1382    /// Indication of the reason the entity signed the object(s)
1383    #[fhir(name="type", min="0", max="*", summary=true, modifier=false, choice="")]
1384    pub type_: Option<Vec<Coding>>,
1385    /// When the signature was created
1386    #[fhir(name="when", min="0", max="1", summary=true, modifier=false, choice="")]
1387    pub when: Option<InstantDt>,
1388    /// Who signed
1389    #[fhir(name="who", min="0", max="1", summary=true, modifier=false, choice="")]
1390    pub who: Option<Reference>,
1391    /// The party represented
1392    #[fhir(name="onBehalfOf", min="0", max="1", summary=true, modifier=false, choice="")]
1393    pub on_behalf_of: Option<Reference>,
1394    /// The technical format of the signed resources
1395    #[fhir(name="targetFormat", min="0", max="1", summary=false, modifier=false, choice="")]
1396    pub target_format: Option<CodeDt>,
1397    /// The technical format of the signature
1398    #[fhir(name="sigFormat", min="0", max="1", summary=false, modifier=false, choice="")]
1399    pub sig_format: Option<CodeDt>,
1400    /// The actual signature content (XML DigSig. JWS, picture, etc.)
1401    #[fhir(name="data", min="0", max="1", summary=false, modifier=false, choice="")]
1402    pub data: Option<Base64BinaryDt>,
1403}
1404
1405#[derive(Element, Complex, Debug, Clone, Default)]
1406pub struct Timing {
1407    /// Unique id for inter-element referencing
1408    #[fhir(name="id", min="0", max="1", summary=false, modifier=false, choice="")]
1409    pub id: Option<Id>,
1410    /// Additional content defined by implementations
1411    #[fhir(name="extension", min="0", max="*", summary=false, modifier=false, choice="")]
1412    pub extension: Option<Vec<Extension>>,
1413    /// Extensions that cannot be ignored even if unrecognized
1414    #[fhir(name="modifierExtension", min="0", max="*", summary=true, modifier=true)]
1415    pub modifier_extension: Option<Vec<Extension>>,
1416    /// When the event occurs
1417    #[fhir(name="event", min="0", max="*", summary=true, modifier=false, choice="")]
1418    pub event: Option<Vec<DateTimeDt>>,
1419    /// When the event is to occur
1420    #[fhir(name="repeat", min="0", max="1", summary=true, modifier=false, choice="")]
1421    pub repeat: Option<TimingRepeatElement>,
1422    /// C | BID | TID | QID | AM | PM | QD | QOD | +
1423    #[fhir(name="code", min="0", max="1", summary=true, modifier=false, choice="")]
1424    pub code: Option<CodeableConcept>,
1425}
1426
1427#[derive(Element, Complex, Debug, Clone, Default)]
1428pub struct TimingRepeatElement {
1429    /// Unique id for inter-element referencing
1430    #[fhir(name="id", min="0", max="1", summary=false, modifier=false, choice="")]
1431    pub id: Option<String>,
1432    /// Additional content defined by implementations
1433    #[fhir(name="extension", min="0", max="*", summary=false, modifier=false, choice="")]
1434    pub extension: Option<Vec<Extension>>,
1435    /// Length/Range of lengths, or (Start and/or end) limits
1436    #[fhir(name="bounds", min="0", max="1", summary=true, modifier=false, choice="")]
1437    pub bounds: Option<Period>,
1438    /// Number of times to repeat
1439    #[fhir(name="count", min="0", max="1", summary=true, modifier=false, choice="")]
1440    pub count: Option<PositiveIntDt>,
1441    /// Maximum number of times to repeat
1442    #[fhir(name="countMax", min="0", max="1", summary=true, modifier=false, choice="")]
1443    pub count_max: Option<PositiveIntDt>,
1444    /// How long when it happens
1445    #[fhir(name="duration", min="0", max="1", summary=true, modifier=false, choice="")]
1446    pub duration: Option<DecimalDt>,
1447    /// How long when it happens (Max)
1448    #[fhir(name="durationMax", min="0", max="1", summary=true, modifier=false, choice="")]
1449    pub duration_max: Option<DecimalDt>,
1450    /// s | min | h | d | wk | mo | a - unit of time (UCUM)
1451    #[fhir(name="durationUnit", min="0", max="1", summary=true, modifier=false, choice="")]
1452    pub duration_unit: Option<CodeDt>,
1453    /// Indicates the number of repetitions that should occur within a period. I.e. Event occurs frequency times per period
1454    #[fhir(name="frequency", min="0", max="1", summary=true, modifier=false, choice="")]
1455    pub frequency: Option<PositiveIntDt>,
1456    /// Event occurs up to frequencyMax times per period
1457    #[fhir(name="frequencyMax", min="0", max="1", summary=true, modifier=false, choice="")]
1458    pub frequency_max: Option<PositiveIntDt>,
1459    /// The duration to which the frequency applies. I.e. Event occurs frequency times per period
1460    #[fhir(name="period", min="0", max="1", summary=true, modifier=false, choice="")]
1461    pub period: Option<DecimalDt>,
1462    /// Upper limit of period (3-4 hours)
1463    #[fhir(name="periodMax", min="0", max="1", summary=true, modifier=false, choice="")]
1464    pub period_max: Option<DecimalDt>,
1465    /// s | min | h | d | wk | mo | a - unit of time (UCUM)
1466    #[fhir(name="periodUnit", min="0", max="1", summary=true, modifier=false, choice="")]
1467    pub period_unit: Option<CodeDt>,
1468    /// mon | tue | wed | thu | fri | sat | sun
1469    #[fhir(name="dayOfWeek", min="0", max="*", summary=true, modifier=false, choice="")]
1470    pub day_of_week: Option<Vec<CodeDt>>,
1471    /// Time of day for action
1472    #[fhir(name="timeOfDay", min="0", max="*", summary=true, modifier=false, choice="")]
1473    pub time_of_day: Option<Vec<TimeDt>>,
1474    /// Code for time period of occurrence
1475    #[fhir(name="when", min="0", max="*", summary=true, modifier=false, choice="")]
1476    pub when: Option<Vec<CodeDt>>,
1477    /// Minutes from event (before or after)
1478    #[fhir(name="offset", min="0", max="1", summary=true, modifier=false, choice="")]
1479    pub offset: Option<UnsignedIntDt>,
1480}
1481
1482#[derive(Element, Complex, Debug, Clone, Default)]
1483pub struct TriggerDefinition {
1484    /// Unique id for inter-element referencing
1485    #[fhir(name="id", min="0", max="1", summary=false, modifier=false, choice="")]
1486    pub id: Option<Id>,
1487    /// Additional content defined by implementations
1488    #[fhir(name="extension", min="0", max="*", summary=false, modifier=false, choice="")]
1489    pub extension: Option<Vec<Extension>>,
1490    /// named-event | periodic | data-changed | data-added | data-modified | data-removed | data-accessed | data-access-ended
1491    #[fhir(name="type", min="1", max="1", summary=true, modifier=false, choice="")]
1492    pub type_: Option<CodeDt>,
1493    /// Name or URI that identifies the event
1494    #[fhir(name="name", min="0", max="1", summary=true, modifier=false, choice="")]
1495    pub name: Option<StringDt>,
1496    /// Coded definition of the event
1497    #[fhir(name="code", min="0", max="1", summary=true, modifier=false, choice="")]
1498    pub code: Option<CodeableConcept>,
1499    /// What event
1500    #[fhir(name="subscriptionTopic", min="0", max="1", summary=true, modifier=false, choice="")]
1501    pub subscription_topic: Option<CanonicalDt>,
1502    /// Timing of the event
1503    #[fhir(name="timing", min="0", max="1", summary=true, modifier=false, choice="")]
1504    pub timing: Option<DateTimeDt>,
1505    /// Triggering data of the event (multiple = 'and')
1506    #[fhir(name="data", min="0", max="*", summary=true, modifier=false, choice="")]
1507    pub data: Option<Vec<DataRequirement>>,
1508    /// Whether the event triggers (boolean expression)
1509    #[fhir(name="condition", min="0", max="1", summary=true, modifier=false, choice="")]
1510    pub condition: Option<Expression>,
1511}
1512
1513#[derive(Element, Complex, Debug, Clone, Default)]
1514pub struct UsageContext {
1515    /// Unique id for inter-element referencing
1516    #[fhir(name="id", min="0", max="1", summary=false, modifier=false, choice="")]
1517    pub id: Option<Id>,
1518    /// Additional content defined by implementations
1519    #[fhir(name="extension", min="0", max="*", summary=false, modifier=false, choice="")]
1520    pub extension: Option<Vec<Extension>>,
1521    /// Type of context being specified
1522    #[fhir(name="code", min="1", max="1", summary=true, modifier=false, choice="")]
1523    pub code: Option<Coding>,
1524    /// Value that defines the context
1525    #[fhir(name="value", min="1", max="1", summary=true, modifier=false, choice="")]
1526    pub value: Option<Reference>,
1527}
1528
1529#[derive(Element, Complex, Debug, Clone, Default)]
1530pub struct VirtualServiceDetail {
1531    /// Unique id for inter-element referencing
1532    #[fhir(name="id", min="0", max="1", summary=false, modifier=false, choice="")]
1533    pub id: Option<Id>,
1534    /// Additional content defined by implementations
1535    #[fhir(name="extension", min="0", max="*", summary=false, modifier=false, choice="")]
1536    pub extension: Option<Vec<Extension>>,
1537    /// Channel Type
1538    #[fhir(name="channelType", min="0", max="1", summary=true, modifier=false, choice="")]
1539    pub channel_type: Option<Coding>,
1540    /// Contact address/number
1541    #[fhir(name="address", min="0", max="1", summary=true, modifier=false, choice="")]
1542    pub address: Option<ExtendedContactDetail>,
1543    /// Address to see alternative connection details
1544    #[fhir(name="additionalInfo", min="0", max="*", summary=true, modifier=false, choice="")]
1545    pub additional_info: Option<Vec<UrlDt>>,
1546    /// Maximum number of participants supported by the virtual service
1547    #[fhir(name="maxParticipants", min="0", max="1", summary=true, modifier=false, choice="")]
1548    pub max_participants: Option<PositiveIntDt>,
1549    /// Session Key required by the virtual service
1550    #[fhir(name="sessionKey", min="0", max="1", summary=true, modifier=false, choice="")]
1551    pub session_key: Option<StringDt>,
1552}
1553
1554#[derive(Element, Complex, Debug, Clone, Default)]
1555pub struct MoneyQuantity {
1556    /// Unique id for inter-element referencing
1557    #[fhir(name="id", min="0", max="1", summary=false, modifier=false, choice="")]
1558    pub id: Option<Id>,
1559    /// Additional content defined by implementations
1560    #[fhir(name="extension", min="0", max="*", summary=false, modifier=false, choice="")]
1561    pub extension: Option<Vec<Extension>>,
1562    /// Numerical value (with implicit precision)
1563    #[fhir(name="value", min="0", max="1", summary=true, modifier=false, choice="")]
1564    pub value: Option<DecimalDt>,
1565    /// < | <= | >= | > | ad - how to understand the value
1566    #[fhir(name="comparator", min="0", max="1", summary=true, modifier=true)]
1567    pub comparator: Option<CodeDt>,
1568    /// Unit representation
1569    #[fhir(name="unit", min="0", max="1", summary=true, modifier=false, choice="")]
1570    pub unit: Option<StringDt>,
1571    /// System that defines coded unit form
1572    #[fhir(name="system", min="0", max="1", summary=true, modifier=false, choice="")]
1573    pub system: Option<UriDt>,
1574    /// Coded form of the unit
1575    #[fhir(name="code", min="0", max="1", summary=true, modifier=false, choice="")]
1576    pub code: Option<CodeDt>,
1577}
1578
1579#[derive(Element, Complex, Debug, Clone, Default)]
1580pub struct SimpleQuantity {
1581    /// Unique id for inter-element referencing
1582    #[fhir(name="id", min="0", max="1", summary=false, modifier=false, choice="")]
1583    pub id: Option<Id>,
1584    /// Additional content defined by implementations
1585    #[fhir(name="extension", min="0", max="*", summary=false, modifier=false, choice="")]
1586    pub extension: Option<Vec<Extension>>,
1587    /// Numerical value (with implicit precision)
1588    #[fhir(name="value", min="0", max="1", summary=true, modifier=false, choice="")]
1589    pub value: Option<DecimalDt>,
1590    /// < | <= | >= | > | ad - how to understand the value
1591    #[fhir(name="comparator", min="0", max="0", summary=true, modifier=true)]
1592    pub comparator: Option<CodeDt>,
1593    /// Unit representation
1594    #[fhir(name="unit", min="0", max="1", summary=true, modifier=false, choice="")]
1595    pub unit: Option<StringDt>,
1596    /// System that defines coded unit form
1597    #[fhir(name="system", min="0", max="1", summary=true, modifier=false, choice="")]
1598    pub system: Option<UriDt>,
1599    /// Coded form of the unit
1600    #[fhir(name="code", min="0", max="1", summary=true, modifier=false, choice="")]
1601    pub code: Option<CodeDt>,
1602}