fhirbolt_model/generated/r5/resources/
device_request.rs1#[doc = "The value of the device detail."]
3#[derive(Default, Debug, Clone, PartialEq)]
4pub enum DeviceRequestParameterValue {
5 CodeableConcept(Box<super::super::types::CodeableConcept>),
6 Quantity(Box<super::super::types::Quantity>),
7 Range(Box<super::super::types::Range>),
8 Boolean(super::super::types::Boolean),
9 #[default]
10 Invalid,
11}
12#[doc = "The timing schedule for the use of the device. The Schedule data type allows many different expressions, for example. \"Every 8 hours\"; \"Three times a day\"; \"1/2 an hour before breakfast for 10 days from 23-Dec 2011:\"; \"15 Oct 2013, 17 Oct 2013 and 1 Nov 2013\"."]
13#[derive(Default, Debug, Clone, PartialEq)]
14pub enum DeviceRequestOccurrence {
15 DateTime(super::super::types::DateTime),
16 Period(Box<super::super::types::Period>),
17 Timing(Box<super::super::types::Timing>),
18 #[default]
19 Invalid,
20}
21#[doc = "Specific parameters for the ordered item. For example, the prism value for lenses."]
22#[derive(Debug, Clone, PartialEq)]
23pub struct DeviceRequestParameter {
24 #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
25 pub r#id: Option<std::string::String>,
26 #[doc = "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."]
27 pub r#extension: Vec<super::super::types::Extension>,
28 #[doc = "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."]
29 pub r#modifier_extension: Vec<super::super::types::Extension>,
30 #[doc = "A code or string that identifies the device detail being asserted."]
31 pub r#code: Option<Box<super::super::types::CodeableConcept>>,
32 #[doc = "The value of the device detail."]
33 pub r#value: Option<DeviceRequestParameterValue>,
34}
35#[allow(clippy::derivable_impls)]
36impl Default for DeviceRequestParameter {
37 fn default() -> Self {
38 Self {
39 r#id: Default::default(),
40 r#extension: Default::default(),
41 r#modifier_extension: Default::default(),
42 r#code: Default::default(),
43 r#value: Default::default(),
44 }
45 }
46}
47#[doc = "Represents a request a device to be provided to a specific patient. The device may be an implantable device to be subsequently implanted, or an external assistive device, such as a walker, to be delivered and subsequently be used."]
48#[derive(Debug, Clone, PartialEq)]
49pub struct DeviceRequest {
50 #[doc = "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes."]
51 pub r#id: Option<super::super::types::Id>,
52 #[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."]
53 pub r#meta: Option<Box<super::super::types::Meta>>,
54 #[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."]
55 pub r#implicit_rules: Option<super::super::types::Uri>,
56 #[doc = "The base language in which the resource is written."]
57 pub r#language: Option<super::super::types::Code>,
58 #[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."]
59 pub r#text: Option<Box<super::super::types::Narrative>>,
60 #[doc = "These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning."]
61 pub r#contained: Vec<super::super::Resource>,
62 #[doc = "May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."]
63 pub r#extension: Vec<super::super::types::Extension>,
64 #[doc = "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."]
65 pub r#modifier_extension: Vec<super::super::types::Extension>,
66 #[doc = "Identifiers assigned to this order by the orderer or by the receiver."]
67 pub r#identifier: Vec<super::super::types::Identifier>,
68 #[doc = "The URL pointing to a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this DeviceRequest."]
69 pub r#instantiates_canonical: Vec<super::super::types::Canonical>,
70 #[doc = "The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this DeviceRequest."]
71 pub r#instantiates_uri: Vec<super::super::types::Uri>,
72 #[doc = "Plan/proposal/order fulfilled by this request."]
73 pub r#based_on: Vec<super::super::types::Reference>,
74 #[doc = "The request takes the place of the referenced completed or terminated request(s)."]
75 pub r#replaces: Vec<super::super::types::Reference>,
76 #[doc = "A shared identifier common to multiple independent Request instances that were activated/authorized more or less simultaneously by a single author. The presence of the same identifier on each request ties those requests together and may have business ramifications in terms of reporting of results, billing, etc. E.g. a requisition number shared by a set of lab tests ordered together, or a prescription number shared by all meds ordered at one time."]
77 pub r#group_identifier: Option<Box<super::super::types::Identifier>>,
78 #[doc = "The status of the request."]
79 pub r#status: Option<super::super::types::Code>,
80 #[doc = "Whether the request is a proposal, plan, an original order or a reflex order."]
81 pub r#intent: super::super::types::Code,
82 #[doc = "Indicates how quickly the request should be addressed with respect to other requests."]
83 pub r#priority: Option<super::super::types::Code>,
84 #[doc = "If true, indicates that the provider is asking for the patient to either stop using or to not start using the specified device or category of devices. For example, the patient has undergone surgery and the provider is indicating that the patient should not wear contact lenses."]
85 pub r#do_not_perform: Option<super::super::types::Boolean>,
86 #[doc = "The details of the device to be used."]
87 pub r#code: Box<super::super::types::CodeableReference>,
88 #[doc = "The number of devices to be provided."]
89 pub r#quantity: Option<super::super::types::Integer>,
90 #[doc = "Specific parameters for the ordered item. For example, the prism value for lenses."]
91 pub r#parameter: Vec<DeviceRequestParameter>,
92 #[doc = "The patient who will use the device."]
93 pub r#subject: Box<super::super::types::Reference>,
94 #[doc = "An encounter that provides additional context in which this request is made."]
95 pub r#encounter: Option<Box<super::super::types::Reference>>,
96 #[doc = "The timing schedule for the use of the device. The Schedule data type allows many different expressions, for example. \"Every 8 hours\"; \"Three times a day\"; \"1/2 an hour before breakfast for 10 days from 23-Dec 2011:\"; \"15 Oct 2013, 17 Oct 2013 and 1 Nov 2013\"."]
97 pub r#occurrence: Option<DeviceRequestOccurrence>,
98 #[doc = "When the request transitioned to being actionable."]
99 pub r#authored_on: Option<super::super::types::DateTime>,
100 #[doc = "The individual or entity who initiated the request and has responsibility for its activation."]
101 pub r#requester: Option<Box<super::super::types::Reference>>,
102 #[doc = "The desired individual or entity to provide the device to the subject of the request (e.g., patient, location)."]
103 pub r#performer: Option<Box<super::super::types::CodeableReference>>,
104 #[doc = "Reason or justification for the use of this device."]
105 pub r#reason: Vec<super::super::types::CodeableReference>,
106 #[doc = "This status is to indicate whether the request is a PRN or may be given as needed."]
107 pub r#as_needed: Option<super::super::types::Boolean>,
108 #[doc = "The reason for using the device."]
109 pub r#as_needed_for: Option<Box<super::super::types::CodeableConcept>>,
110 #[doc = "Insurance plans, coverage extensions, pre-authorizations and/or pre-determinations that may be required for delivering the requested service."]
111 pub r#insurance: Vec<super::super::types::Reference>,
112 #[doc = "Additional clinical information about the patient that may influence the request fulfilment. For example, this may include where on the subject's body the device will be used (i.e. the target site)."]
113 pub r#supporting_info: Vec<super::super::types::Reference>,
114 #[doc = "Details about this request that were not represented at all or sufficiently in one of the attributes provided in a class. These may include for example a comment, an instruction, or a note associated with the statement."]
115 pub r#note: Vec<super::super::types::Annotation>,
116 #[doc = "Key events in the history of the request."]
117 pub r#relevant_history: Vec<super::super::types::Reference>,
118}
119#[allow(clippy::derivable_impls)]
120impl Default for DeviceRequest {
121 fn default() -> Self {
122 Self {
123 r#id: Default::default(),
124 r#meta: Default::default(),
125 r#implicit_rules: Default::default(),
126 r#language: Default::default(),
127 r#text: Default::default(),
128 r#contained: Default::default(),
129 r#extension: Default::default(),
130 r#modifier_extension: Default::default(),
131 r#identifier: Default::default(),
132 r#instantiates_canonical: Default::default(),
133 r#instantiates_uri: Default::default(),
134 r#based_on: Default::default(),
135 r#replaces: Default::default(),
136 r#group_identifier: Default::default(),
137 r#status: Default::default(),
138 r#intent: super::super::types::Code {
139 id: Some("$invalid".to_string()),
140 ..Default::default()
141 },
142 r#priority: Default::default(),
143 r#do_not_perform: Default::default(),
144 r#code: Box::new(super::super::types::CodeableReference {
145 id: Some("$invalid".to_string()),
146 ..Default::default()
147 }),
148 r#quantity: Default::default(),
149 r#parameter: Default::default(),
150 r#subject: Box::new(super::super::types::Reference {
151 id: Some("$invalid".to_string()),
152 ..Default::default()
153 }),
154 r#encounter: Default::default(),
155 r#occurrence: Default::default(),
156 r#authored_on: Default::default(),
157 r#requester: Default::default(),
158 r#performer: Default::default(),
159 r#reason: Default::default(),
160 r#as_needed: Default::default(),
161 r#as_needed_for: Default::default(),
162 r#insurance: Default::default(),
163 r#supporting_info: Default::default(),
164 r#note: Default::default(),
165 r#relevant_history: Default::default(),
166 }
167 }
168}