fhirbolt_model/generated/r5/resources/
device.rs

1// Generated on 2023-05-17 by fhirbolt-codegen v0.10.0
2#[doc = "The value of the property specified by the associated property.type code."]
3#[derive(Default, Debug, Clone, PartialEq)]
4pub enum DevicePropertyValue {
5    Quantity(Box<super::super::types::Quantity>),
6    CodeableConcept(Box<super::super::types::CodeableConcept>),
7    String(super::super::types::String),
8    Boolean(super::super::types::Boolean),
9    Integer(super::super::types::Integer),
10    Range(Box<super::super::types::Range>),
11    Attachment(Box<super::super::types::Attachment>),
12    #[default]
13    Invalid,
14}
15#[doc = "Unique device identifier (UDI) assigned to device label or package.  Note that the Device may include multiple udiCarriers as it either may include just the udiCarrier for the jurisdiction it is sold, or for multiple jurisdictions it could have been sold."]
16#[derive(Debug, Clone, PartialEq)]
17pub struct DeviceUdiCarrier {
18    #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
19    pub r#id: Option<std::string::String>,
20    #[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."]
21    pub r#extension: Vec<super::super::types::Extension>,
22    #[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)."]
23    pub r#modifier_extension: Vec<super::super::types::Extension>,
24    #[doc = "The device identifier (DI) is a mandatory, fixed portion of a UDI that identifies the labeler and the specific version or model of a device."]
25    pub r#device_identifier: super::super::types::String,
26    #[doc = "Organization that is charged with issuing UDIs for devices. For example, the US FDA issuers include: \n1) GS1: <http://hl7.org/fhir/NamingSystem/gs1>-di, \n2) HIBCC: <http://hl7.org/fhir/NamingSystem/hibcc>-diI, \n3) ICCBBA for blood containers: <http://hl7.org/fhir/NamingSystem/iccbba>-blood-di, \n4) ICCBA for other devices: <http://hl7.org/fhir/NamingSystem/iccbba>-other-di # Informationsstelle für Arzneispezialitäten (IFA GmbH) (EU only): <http://hl7.org/fhir/NamingSystem/ifa>-gmbh-di."]
27    pub r#issuer: super::super::types::Uri,
28    #[doc = "The identity of the authoritative source for UDI generation within a jurisdiction. All UDIs are globally unique within a single namespace with the appropriate repository uri as the system. For example, UDIs of devices managed in the U.S. by the FDA, the value is <http://hl7.org/fhir/NamingSystem/us>-fda-udi or in the European Union by the European Commission <http://hl7.org/fhir/NamingSystem/eu>-ec-udi."]
29    pub r#jurisdiction: Option<super::super::types::Uri>,
30    #[doc = "The full UDI carrier of the Automatic Identification and Data Capture (AIDC) technology representation of the barcode string as printed on the packaging of the device - e.g., a barcode or RFID.   Because of limitations on character sets in XML and the need to round-trip JSON data through XML, AIDC Formats *SHALL* be base64 encoded."]
31    pub r#carrier_aidc: Option<super::super::types::Base64Binary>,
32    #[doc = "The full UDI carrier as the human readable form (HRF) representation of the barcode string as printed on the packaging of the device."]
33    pub r#carrier_hrf: Option<super::super::types::String>,
34    #[doc = "A coded entry to indicate how the data was entered."]
35    pub r#entry_type: Option<super::super::types::Code>,
36}
37#[allow(clippy::derivable_impls)]
38impl Default for DeviceUdiCarrier {
39    fn default() -> Self {
40        Self {
41            r#id: Default::default(),
42            r#extension: Default::default(),
43            r#modifier_extension: Default::default(),
44            r#device_identifier: super::super::types::String {
45                id: Some("$invalid".to_string()),
46                ..Default::default()
47            },
48            r#issuer: super::super::types::Uri {
49                id: Some("$invalid".to_string()),
50                ..Default::default()
51            },
52            r#jurisdiction: Default::default(),
53            r#carrier_aidc: Default::default(),
54            r#carrier_hrf: Default::default(),
55            r#entry_type: Default::default(),
56        }
57    }
58}
59#[doc = "This represents the manufacturer's name of the device as provided by the device, from a UDI label, or by a person describing the Device.  This typically would be used when a person provides the name(s) or when the device represents one of the names available from DeviceDefinition."]
60#[derive(Debug, Clone, PartialEq)]
61pub struct DeviceName {
62    #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
63    pub r#id: Option<std::string::String>,
64    #[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."]
65    pub r#extension: Vec<super::super::types::Extension>,
66    #[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)."]
67    pub r#modifier_extension: Vec<super::super::types::Extension>,
68    #[doc = "The actual name that identifies the device."]
69    pub r#value: super::super::types::String,
70    #[doc = "Indicates the kind of name. RegisteredName | UserFriendlyName | PatientReportedName."]
71    pub r#type: super::super::types::Code,
72    #[doc = "Indicates the default or preferred name to be displayed."]
73    pub r#display: Option<super::super::types::Boolean>,
74}
75#[allow(clippy::derivable_impls)]
76impl Default for DeviceName {
77    fn default() -> Self {
78        Self {
79            r#id: Default::default(),
80            r#extension: Default::default(),
81            r#modifier_extension: Default::default(),
82            r#value: super::super::types::String {
83                id: Some("$invalid".to_string()),
84                ..Default::default()
85            },
86            r#type: super::super::types::Code {
87                id: Some("$invalid".to_string()),
88                ..Default::default()
89            },
90            r#display: Default::default(),
91        }
92    }
93}
94#[doc = "The actual design of the device or software version running on the device."]
95#[derive(Debug, Clone, PartialEq)]
96pub struct DeviceVersion {
97    #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
98    pub r#id: Option<std::string::String>,
99    #[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."]
100    pub r#extension: Vec<super::super::types::Extension>,
101    #[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)."]
102    pub r#modifier_extension: Vec<super::super::types::Extension>,
103    #[doc = "The type of the device version, e.g. manufacturer, approved, internal."]
104    pub r#type: Option<Box<super::super::types::CodeableConcept>>,
105    #[doc = "The hardware or software module of the device to which the version applies."]
106    pub r#component: Option<Box<super::super::types::Identifier>>,
107    #[doc = "The date the version was installed on the device."]
108    pub r#install_date: Option<super::super::types::DateTime>,
109    #[doc = "The version text."]
110    pub r#value: super::super::types::String,
111}
112#[allow(clippy::derivable_impls)]
113impl Default for DeviceVersion {
114    fn default() -> Self {
115        Self {
116            r#id: Default::default(),
117            r#extension: Default::default(),
118            r#modifier_extension: Default::default(),
119            r#type: Default::default(),
120            r#component: Default::default(),
121            r#install_date: Default::default(),
122            r#value: super::super::types::String {
123                id: Some("$invalid".to_string()),
124                ..Default::default()
125            },
126        }
127    }
128}
129#[doc = "Identifies the standards, specifications, or formal guidances for the capabilities supported by the device. The device may be certified as conformant to these specifications e.g., communication, performance, process, measurement, or specialization standards."]
130#[derive(Debug, Clone, PartialEq)]
131pub struct DeviceConformsTo {
132    #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
133    pub r#id: Option<std::string::String>,
134    #[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."]
135    pub r#extension: Vec<super::super::types::Extension>,
136    #[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)."]
137    pub r#modifier_extension: Vec<super::super::types::Extension>,
138    #[doc = "Describes the type of the standard, specification, or formal guidance."]
139    pub r#category: Option<Box<super::super::types::CodeableConcept>>,
140    #[doc = "Code that identifies the specific standard, specification, protocol, formal guidance, regulation, legislation, or certification scheme to which the device adheres."]
141    pub r#specification: Box<super::super::types::CodeableConcept>,
142    #[doc = "Identifies the specific form or variant of the standard, specification, or formal guidance. This may be a 'version number', release, document edition, publication year, or other label."]
143    pub r#version: Option<super::super::types::String>,
144}
145#[allow(clippy::derivable_impls)]
146impl Default for DeviceConformsTo {
147    fn default() -> Self {
148        Self {
149            r#id: Default::default(),
150            r#extension: Default::default(),
151            r#modifier_extension: Default::default(),
152            r#category: Default::default(),
153            r#specification: Box::new(super::super::types::CodeableConcept {
154                id: Some("$invalid".to_string()),
155                ..Default::default()
156            }),
157            r#version: Default::default(),
158        }
159    }
160}
161#[doc = "Static or essentially fixed characteristics or features of the device (e.g., time or timing attributes, resolution, accuracy, intended use or instructions for use, and physical attributes) that are not otherwise captured in more specific attributes."]
162#[derive(Debug, Clone, PartialEq)]
163pub struct DeviceProperty {
164    #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
165    pub r#id: Option<std::string::String>,
166    #[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."]
167    pub r#extension: Vec<super::super::types::Extension>,
168    #[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)."]
169    pub r#modifier_extension: Vec<super::super::types::Extension>,
170    #[doc = "Code that specifies the property, such as resolution, color, size, being represented."]
171    pub r#type: Box<super::super::types::CodeableConcept>,
172    #[doc = "The value of the property specified by the associated property.type code."]
173    pub r#value: DevicePropertyValue,
174}
175#[allow(clippy::derivable_impls)]
176impl Default for DeviceProperty {
177    fn default() -> Self {
178        Self {
179            r#id: Default::default(),
180            r#extension: Default::default(),
181            r#modifier_extension: Default::default(),
182            r#type: Box::new(super::super::types::CodeableConcept {
183                id: Some("$invalid".to_string()),
184                ..Default::default()
185            }),
186            r#value: Default::default(),
187        }
188    }
189}
190#[doc = "This resource describes the properties (regulated, has real time clock, etc.), adminstrative (manufacturer name, model number, serial number, firmware, etc.), and type (knee replacement, blood pressure cuff, MRI, etc.) of a physical unit (these values do not change much within a given module, for example the serail number, manufacturer name, and model number). An actual unit may consist of several modules in a distinct hierarchy and these are represented by multiple Device resources and bound through the 'parent' element.\n\nAllows institutions to track their devices."]
191#[derive(Debug, Clone, PartialEq)]
192pub struct Device {
193    #[doc = "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes."]
194    pub r#id: Option<super::super::types::Id>,
195    #[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."]
196    pub r#meta: Option<Box<super::super::types::Meta>>,
197    #[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."]
198    pub r#implicit_rules: Option<super::super::types::Uri>,
199    #[doc = "The base language in which the resource is written."]
200    pub r#language: Option<super::super::types::Code>,
201    #[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."]
202    pub r#text: Option<Box<super::super::types::Narrative>>,
203    #[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."]
204    pub r#contained: Vec<super::super::Resource>,
205    #[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."]
206    pub r#extension: Vec<super::super::types::Extension>,
207    #[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)."]
208    pub r#modifier_extension: Vec<super::super::types::Extension>,
209    #[doc = "Unique instance identifiers assigned to a device by manufacturers other organizations or owners."]
210    pub r#identifier: Vec<super::super::types::Identifier>,
211    #[doc = "The name used to display by default when the device is referenced. Based on intent of use by the resource creator, this may reflect one of the names in Device.name, or may be another simple name."]
212    pub r#display_name: Option<super::super::types::String>,
213    #[doc = "The reference to the definition for the device."]
214    pub r#definition: Option<Box<super::super::types::CodeableReference>>,
215    #[doc = "Unique device identifier (UDI) assigned to device label or package.  Note that the Device may include multiple udiCarriers as it either may include just the udiCarrier for the jurisdiction it is sold, or for multiple jurisdictions it could have been sold."]
216    pub r#udi_carrier: Vec<DeviceUdiCarrier>,
217    #[doc = "The Device record status. This is not the status of the device like availability."]
218    pub r#status: Option<super::super::types::Code>,
219    #[doc = "The availability of the device."]
220    pub r#availability_status: Option<Box<super::super::types::CodeableConcept>>,
221    #[doc = "An identifier that supports traceability to the event during which material in this product from one or more biological entities was obtained or pooled."]
222    pub r#biological_source_event: Option<Box<super::super::types::Identifier>>,
223    #[doc = "A name of the manufacturer or entity legally responsible for the device."]
224    pub r#manufacturer: Option<super::super::types::String>,
225    #[doc = "The date and time when the device was manufactured."]
226    pub r#manufacture_date: Option<super::super::types::DateTime>,
227    #[doc = "The date and time beyond which this device is no longer valid or should not be used (if applicable)."]
228    pub r#expiration_date: Option<super::super::types::DateTime>,
229    #[doc = "Lot number assigned by the manufacturer."]
230    pub r#lot_number: Option<super::super::types::String>,
231    #[doc = "The serial number assigned by the organization when the device was manufactured."]
232    pub r#serial_number: Option<super::super::types::String>,
233    #[doc = "This represents the manufacturer's name of the device as provided by the device, from a UDI label, or by a person describing the Device.  This typically would be used when a person provides the name(s) or when the device represents one of the names available from DeviceDefinition."]
234    pub r#name: Vec<DeviceName>,
235    #[doc = "The manufacturer's model number for the device."]
236    pub r#model_number: Option<super::super::types::String>,
237    #[doc = "The part number or catalog number of the device."]
238    pub r#part_number: Option<super::super::types::String>,
239    #[doc = "Devices may be associated with one or more categories."]
240    pub r#category: Vec<super::super::types::CodeableConcept>,
241    #[doc = "The kind or type of device. A device instance may have more than one type - in which case those are the types that apply to the specific instance of the device."]
242    pub r#type: Vec<super::super::types::CodeableConcept>,
243    #[doc = "The actual design of the device or software version running on the device."]
244    pub r#version: Vec<DeviceVersion>,
245    #[doc = "Identifies the standards, specifications, or formal guidances for the capabilities supported by the device. The device may be certified as conformant to these specifications e.g., communication, performance, process, measurement, or specialization standards."]
246    pub r#conforms_to: Vec<DeviceConformsTo>,
247    #[doc = "Static or essentially fixed characteristics or features of the device (e.g., time or timing attributes, resolution, accuracy, intended use or instructions for use, and physical attributes) that are not otherwise captured in more specific attributes."]
248    pub r#property: Vec<DeviceProperty>,
249    #[doc = "The designated condition for performing a task with the device."]
250    pub r#mode: Option<Box<super::super::types::CodeableConcept>>,
251    #[doc = "The series of occurrences that repeats during the operation of the device."]
252    pub r#cycle: Option<Box<super::super::types::Count>>,
253    #[doc = "A measurement of time during the device's operation (e.g., days, hours, mins, etc.)."]
254    pub r#duration: Option<Box<super::super::types::Duration>>,
255    #[doc = "An organization that is responsible for the provision and ongoing maintenance of the device."]
256    pub r#owner: Option<Box<super::super::types::Reference>>,
257    #[doc = "Contact details for an organization or a particular human that is responsible for the device."]
258    pub r#contact: Vec<super::super::types::ContactPoint>,
259    #[doc = "The place where the device can be found."]
260    pub r#location: Option<Box<super::super::types::Reference>>,
261    #[doc = "A network address on which the device may be contacted directly."]
262    pub r#url: Option<super::super::types::Uri>,
263    #[doc = "Technical endpoints providing access to services provided by the device defined at this resource."]
264    pub r#endpoint: Vec<super::super::types::Reference>,
265    #[doc = "The linked device acting as a communication controller, data collector, translator, or concentrator for the current device (e.g., mobile phone application that relays a blood pressure device's data)."]
266    pub r#gateway: Vec<super::super::types::CodeableReference>,
267    #[doc = "Descriptive information, usage information or implantation information that is not captured in an existing element."]
268    pub r#note: Vec<super::super::types::Annotation>,
269    #[doc = "Provides additional safety characteristics about a medical device.  For example devices containing latex."]
270    pub r#safety: Vec<super::super::types::CodeableConcept>,
271    #[doc = "The higher level or encompassing device that this device is a logical part of."]
272    pub r#parent: Option<Box<super::super::types::Reference>>,
273}
274#[allow(clippy::derivable_impls)]
275impl Default for Device {
276    fn default() -> Self {
277        Self {
278            r#id: Default::default(),
279            r#meta: Default::default(),
280            r#implicit_rules: Default::default(),
281            r#language: Default::default(),
282            r#text: Default::default(),
283            r#contained: Default::default(),
284            r#extension: Default::default(),
285            r#modifier_extension: Default::default(),
286            r#identifier: Default::default(),
287            r#display_name: Default::default(),
288            r#definition: Default::default(),
289            r#udi_carrier: Default::default(),
290            r#status: Default::default(),
291            r#availability_status: Default::default(),
292            r#biological_source_event: Default::default(),
293            r#manufacturer: Default::default(),
294            r#manufacture_date: Default::default(),
295            r#expiration_date: Default::default(),
296            r#lot_number: Default::default(),
297            r#serial_number: Default::default(),
298            r#name: Default::default(),
299            r#model_number: Default::default(),
300            r#part_number: Default::default(),
301            r#category: Default::default(),
302            r#type: Default::default(),
303            r#version: Default::default(),
304            r#conforms_to: Default::default(),
305            r#property: Default::default(),
306            r#mode: Default::default(),
307            r#cycle: Default::default(),
308            r#duration: Default::default(),
309            r#owner: Default::default(),
310            r#contact: Default::default(),
311            r#location: Default::default(),
312            r#url: Default::default(),
313            r#endpoint: Default::default(),
314            r#gateway: Default::default(),
315            r#note: Default::default(),
316            r#safety: Default::default(),
317            r#parent: Default::default(),
318        }
319    }
320}