fhirbolt_model/generated/r4/resources/
device_use_statement.rs1#[doc = "How often the device was used."]
3#[derive(Default, Debug, Clone, PartialEq)]
4pub enum DeviceUseStatementTiming {
5    Timing(Box<super::super::types::Timing>),
6    Period(Box<super::super::types::Period>),
7    DateTime(super::super::types::DateTime),
8    #[default]
9    Invalid,
10}
11#[doc = "A record of a device being used by a patient where the record is the result of a report from the patient or another clinician."]
12#[derive(Debug, Clone, PartialEq)]
13pub struct DeviceUseStatement {
14    #[doc = "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes."]
15    pub r#id: Option<super::super::types::Id>,
16    #[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."]
17    pub r#meta: Option<Box<super::super::types::Meta>>,
18    #[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."]
19    pub r#implicit_rules: Option<super::super::types::Uri>,
20    #[doc = "The base language in which the resource is written."]
21    pub r#language: Option<super::super::types::Code>,
22    #[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."]
23    pub r#text: Option<Box<super::super::types::Narrative>>,
24    #[doc = "These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, and nor can they have their own independent transaction scope."]
25    pub r#contained: Vec<super::super::Resource>,
26    #[doc = "May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."]
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 resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."]
29    pub r#modifier_extension: Vec<super::super::types::Extension>,
30    #[doc = "An external identifier for this statement such as an IRI."]
31    pub r#identifier: Vec<super::super::types::Identifier>,
32    #[doc = "A plan, proposal or order that is fulfilled in whole or in part by this DeviceUseStatement."]
33    pub r#based_on: Vec<super::super::types::Reference>,
34    #[doc = "A code representing the patient or other source's judgment about the state of the device used that this statement is about.  Generally this will be active or completed."]
35    pub r#status: super::super::types::Code,
36    #[doc = "The patient who used the device."]
37    pub r#subject: Box<super::super::types::Reference>,
38    #[doc = "Allows linking the DeviceUseStatement to the underlying Request, or to other information that supports or is used to derive the DeviceUseStatement."]
39    pub r#derived_from: Vec<super::super::types::Reference>,
40    #[doc = "How often the device was used."]
41    pub r#timing: Option<DeviceUseStatementTiming>,
42    #[doc = "The time at which the statement was made/recorded."]
43    pub r#recorded_on: Option<super::super::types::DateTime>,
44    #[doc = "Who reported the device was being used by the patient."]
45    pub r#source: Option<Box<super::super::types::Reference>>,
46    #[doc = "The details of the device used."]
47    pub r#device: Box<super::super::types::Reference>,
48    #[doc = "Reason or justification for the use of the device."]
49    pub r#reason_code: Vec<super::super::types::CodeableConcept>,
50    #[doc = "Indicates another resource whose existence justifies this DeviceUseStatement."]
51    pub r#reason_reference: Vec<super::super::types::Reference>,
52    #[doc = "Indicates the anotomic location on the subject's body where the device was used ( i.e. the target)."]
53    pub r#body_site: Option<Box<super::super::types::CodeableConcept>>,
54    #[doc = "Details about the device statement 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."]
55    pub r#note: Vec<super::super::types::Annotation>,
56}
57#[allow(clippy::derivable_impls)]
58impl Default for DeviceUseStatement {
59    fn default() -> Self {
60        Self {
61            r#id: Default::default(),
62            r#meta: Default::default(),
63            r#implicit_rules: Default::default(),
64            r#language: Default::default(),
65            r#text: Default::default(),
66            r#contained: Default::default(),
67            r#extension: Default::default(),
68            r#modifier_extension: Default::default(),
69            r#identifier: Default::default(),
70            r#based_on: Default::default(),
71            r#status: super::super::types::Code {
72                id: Some("$invalid".to_string()),
73                ..Default::default()
74            },
75            r#subject: Box::new(super::super::types::Reference {
76                id: Some("$invalid".to_string()),
77                ..Default::default()
78            }),
79            r#derived_from: Default::default(),
80            r#timing: Default::default(),
81            r#recorded_on: Default::default(),
82            r#source: Default::default(),
83            r#device: Box::new(super::super::types::Reference {
84                id: Some("$invalid".to_string()),
85                ..Default::default()
86            }),
87            r#reason_code: Default::default(),
88            r#reason_reference: Default::default(),
89            r#body_site: Default::default(),
90            r#note: Default::default(),
91        }
92    }
93}