fhirbolt_model/generated/r5/resources/
consent.rs

1// Generated on 2023-05-17 by fhirbolt-codegen v0.10.0
2#[doc = "A Reference or URL used to uniquely identify the policy the organization will enforce for this Consent. This Reference or URL should be specific to the version of the policy and should be dereferencable to a computable policy of some form."]
3#[derive(Debug, Clone, PartialEq)]
4pub struct ConsentPolicyBasis {
5    #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
6    pub r#id: Option<std::string::String>,
7    #[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."]
8    pub r#extension: Vec<super::super::types::Extension>,
9    #[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)."]
10    pub r#modifier_extension: Vec<super::super::types::Extension>,
11    #[doc = "A Reference that identifies the policy the organization will enforce for this Consent."]
12    pub r#reference: Option<Box<super::super::types::Reference>>,
13    #[doc = "A URL that links to a computable version of the policy the organization will enforce for this Consent."]
14    pub r#url: Option<super::super::types::Url>,
15}
16#[allow(clippy::derivable_impls)]
17impl Default for ConsentPolicyBasis {
18    fn default() -> Self {
19        Self {
20            r#id: Default::default(),
21            r#extension: Default::default(),
22            r#modifier_extension: Default::default(),
23            r#reference: Default::default(),
24            r#url: Default::default(),
25        }
26    }
27}
28#[doc = "Whether a treatment instruction (e.g. artificial respiration: yes or no) was verified with the patient, his/her family or another authorized person."]
29#[derive(Debug, Clone, PartialEq)]
30pub struct ConsentVerification {
31    #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
32    pub r#id: Option<std::string::String>,
33    #[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."]
34    pub r#extension: Vec<super::super::types::Extension>,
35    #[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)."]
36    pub r#modifier_extension: Vec<super::super::types::Extension>,
37    #[doc = "Has the instruction been verified."]
38    pub r#verified: super::super::types::Boolean,
39    #[doc = "Extensible list of verification type starting with verification and re-validation."]
40    pub r#verification_type: Option<Box<super::super::types::CodeableConcept>>,
41    #[doc = "The person who conducted the verification/validation of the Grantor decision."]
42    pub r#verified_by: Option<Box<super::super::types::Reference>>,
43    #[doc = "Who verified the instruction (Patient, Relative or other Authorized Person)."]
44    pub r#verified_with: Option<Box<super::super::types::Reference>>,
45    #[doc = "Date(s) verification was collected."]
46    pub r#verification_date: Vec<super::super::types::DateTime>,
47}
48#[allow(clippy::derivable_impls)]
49impl Default for ConsentVerification {
50    fn default() -> Self {
51        Self {
52            r#id: Default::default(),
53            r#extension: Default::default(),
54            r#modifier_extension: Default::default(),
55            r#verified: super::super::types::Boolean {
56                id: Some("$invalid".to_string()),
57                ..Default::default()
58            },
59            r#verification_type: Default::default(),
60            r#verified_by: Default::default(),
61            r#verified_with: Default::default(),
62            r#verification_date: Default::default(),
63        }
64    }
65}
66#[doc = "Who or what is controlled by this provision. Use group to identify a set of actors by some property they share (e.g. 'admitting officers')."]
67#[derive(Debug, Clone, PartialEq)]
68pub struct ConsentProvisionActor {
69    #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
70    pub r#id: Option<std::string::String>,
71    #[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."]
72    pub r#extension: Vec<super::super::types::Extension>,
73    #[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)."]
74    pub r#modifier_extension: Vec<super::super::types::Extension>,
75    #[doc = "How the individual is involved in the resources content that is described in the exception."]
76    pub r#role: Option<Box<super::super::types::CodeableConcept>>,
77    #[doc = "The resource that identifies the actor. To identify actors by type, use group to identify a set of actors by some property they share (e.g. 'admitting officers')."]
78    pub r#reference: Option<Box<super::super::types::Reference>>,
79}
80#[allow(clippy::derivable_impls)]
81impl Default for ConsentProvisionActor {
82    fn default() -> Self {
83        Self {
84            r#id: Default::default(),
85            r#extension: Default::default(),
86            r#modifier_extension: Default::default(),
87            r#role: Default::default(),
88            r#reference: Default::default(),
89        }
90    }
91}
92#[doc = "The resources controlled by this provision if specific resources are referenced."]
93#[derive(Debug, Clone, PartialEq)]
94pub struct ConsentProvisionData {
95    #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
96    pub r#id: Option<std::string::String>,
97    #[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."]
98    pub r#extension: Vec<super::super::types::Extension>,
99    #[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)."]
100    pub r#modifier_extension: Vec<super::super::types::Extension>,
101    #[doc = "How the resource reference is interpreted when testing consent restrictions."]
102    pub r#meaning: super::super::types::Code,
103    #[doc = "A reference to a specific resource that defines which resources are covered by this consent."]
104    pub r#reference: Box<super::super::types::Reference>,
105}
106#[allow(clippy::derivable_impls)]
107impl Default for ConsentProvisionData {
108    fn default() -> Self {
109        Self {
110            r#id: Default::default(),
111            r#extension: Default::default(),
112            r#modifier_extension: Default::default(),
113            r#meaning: super::super::types::Code {
114                id: Some("$invalid".to_string()),
115                ..Default::default()
116            },
117            r#reference: Box::new(super::super::types::Reference {
118                id: Some("$invalid".to_string()),
119                ..Default::default()
120            }),
121        }
122    }
123}
124#[doc = "An exception to the base policy of this consent. An exception can be an addition or removal of access permissions."]
125#[derive(Debug, Clone, PartialEq)]
126pub struct ConsentProvision {
127    #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
128    pub r#id: Option<std::string::String>,
129    #[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."]
130    pub r#extension: Vec<super::super::types::Extension>,
131    #[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)."]
132    pub r#modifier_extension: Vec<super::super::types::Extension>,
133    #[doc = "Timeframe for this provision."]
134    pub r#period: Option<Box<super::super::types::Period>>,
135    #[doc = "Who or what is controlled by this provision. Use group to identify a set of actors by some property they share (e.g. 'admitting officers')."]
136    pub r#actor: Vec<ConsentProvisionActor>,
137    #[doc = "Actions controlled by this provision."]
138    pub r#action: Vec<super::super::types::CodeableConcept>,
139    #[doc = "A security label, comprised of 0..* security label fields (Privacy tags), which define which resources are controlled by this exception."]
140    pub r#security_label: Vec<super::super::types::Coding>,
141    #[doc = "The context of the activities a user is taking - why the user is accessing the data - that are controlled by this provision."]
142    pub r#purpose: Vec<super::super::types::Coding>,
143    #[doc = "The documentType(s) covered by this provision. The type can be a CDA document, or some other type that indicates what sort of information the consent relates to."]
144    pub r#document_type: Vec<super::super::types::Coding>,
145    #[doc = "The resourceType(s) covered by this provision. The type can be a FHIR resource type or a profile on a type that indicates what information the consent relates to."]
146    pub r#resource_type: Vec<super::super::types::Coding>,
147    #[doc = "If this code is found in an instance, then the provision applies."]
148    pub r#code: Vec<super::super::types::CodeableConcept>,
149    #[doc = "Clinical or Operational Relevant period of time that bounds the data controlled by this provision."]
150    pub r#data_period: Option<Box<super::super::types::Period>>,
151    #[doc = "The resources controlled by this provision if specific resources are referenced."]
152    pub r#data: Vec<ConsentProvisionData>,
153    #[doc = "A computable (FHIRPath or other) definition of what is controlled by this consent."]
154    pub r#expression: Option<Box<super::super::types::Expression>>,
155    #[doc = "Provisions which provide exceptions to the base provision or subprovisions."]
156    pub r#provision: Vec<ConsentProvision>,
157}
158#[allow(clippy::derivable_impls)]
159impl Default for ConsentProvision {
160    fn default() -> Self {
161        Self {
162            r#id: Default::default(),
163            r#extension: Default::default(),
164            r#modifier_extension: Default::default(),
165            r#period: Default::default(),
166            r#actor: Default::default(),
167            r#action: Default::default(),
168            r#security_label: Default::default(),
169            r#purpose: Default::default(),
170            r#document_type: Default::default(),
171            r#resource_type: Default::default(),
172            r#code: Default::default(),
173            r#data_period: Default::default(),
174            r#data: Default::default(),
175            r#expression: Default::default(),
176            r#provision: Default::default(),
177        }
178    }
179}
180#[doc = "A record of a healthcare consumer’s  choices  or choices made on their behalf by a third party, which permits or denies identified recipient(s) or recipient role(s) to perform one or more actions within a given policy context, for specific purposes and periods of time."]
181#[derive(Debug, Clone, PartialEq)]
182pub struct Consent {
183    #[doc = "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes."]
184    pub r#id: Option<super::super::types::Id>,
185    #[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."]
186    pub r#meta: Option<Box<super::super::types::Meta>>,
187    #[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."]
188    pub r#implicit_rules: Option<super::super::types::Uri>,
189    #[doc = "The base language in which the resource is written."]
190    pub r#language: Option<super::super::types::Code>,
191    #[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."]
192    pub r#text: Option<Box<super::super::types::Narrative>>,
193    #[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."]
194    pub r#contained: Vec<super::super::Resource>,
195    #[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."]
196    pub r#extension: Vec<super::super::types::Extension>,
197    #[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)."]
198    pub r#modifier_extension: Vec<super::super::types::Extension>,
199    #[doc = "Unique identifier for this copy of the Consent Statement."]
200    pub r#identifier: Vec<super::super::types::Identifier>,
201    #[doc = "Indicates the current state of this Consent resource."]
202    pub r#status: super::super::types::Code,
203    #[doc = "A classification of the type of consents found in the statement. This element supports indexing and retrieval of consent statements."]
204    pub r#category: Vec<super::super::types::CodeableConcept>,
205    #[doc = "The patient/healthcare practitioner or group of persons to whom this consent applies."]
206    pub r#subject: Option<Box<super::super::types::Reference>>,
207    #[doc = "Date the consent instance was agreed to."]
208    pub r#date: Option<super::super::types::Date>,
209    #[doc = "Effective period for this Consent Resource and all provisions unless specified in that provision."]
210    pub r#period: Option<Box<super::super::types::Period>>,
211    #[doc = "The entity responsible for granting the rights listed in a Consent Directive."]
212    pub r#grantor: Vec<super::super::types::Reference>,
213    #[doc = "The entity responsible for complying with the Consent Directive, including any obligations or limitations on authorizations and enforcement of prohibitions."]
214    pub r#grantee: Vec<super::super::types::Reference>,
215    #[doc = "The actor that manages the consent through its lifecycle."]
216    pub r#manager: Vec<super::super::types::Reference>,
217    #[doc = "The actor that controls/enforces the access according to the consent."]
218    pub r#controller: Vec<super::super::types::Reference>,
219    #[doc = "The source on which this consent statement is based. The source might be a scanned original paper form."]
220    pub r#source_attachment: Vec<super::super::types::Attachment>,
221    #[doc = "A reference to a consent that links back to such a source, a reference to a document repository (e.g. XDS) that stores the original consent document."]
222    pub r#source_reference: Vec<super::super::types::Reference>,
223    #[doc = "A set of codes that indicate the regulatory basis (if any) that this consent supports."]
224    pub r#regulatory_basis: Vec<super::super::types::CodeableConcept>,
225    #[doc = "A Reference or URL used to uniquely identify the policy the organization will enforce for this Consent. This Reference or URL should be specific to the version of the policy and should be dereferencable to a computable policy of some form."]
226    pub r#policy_basis: Option<ConsentPolicyBasis>,
227    #[doc = "A Reference to the human readable policy explaining the basis for the Consent."]
228    pub r#policy_text: Vec<super::super::types::Reference>,
229    #[doc = "Whether a treatment instruction (e.g. artificial respiration: yes or no) was verified with the patient, his/her family or another authorized person."]
230    pub r#verification: Vec<ConsentVerification>,
231    #[doc = "Action to take - permit or deny - as default."]
232    pub r#decision: Option<super::super::types::Code>,
233    #[doc = "An exception to the base policy of this consent. An exception can be an addition or removal of access permissions."]
234    pub r#provision: Vec<ConsentProvision>,
235}
236#[allow(clippy::derivable_impls)]
237impl Default for Consent {
238    fn default() -> Self {
239        Self {
240            r#id: Default::default(),
241            r#meta: Default::default(),
242            r#implicit_rules: Default::default(),
243            r#language: Default::default(),
244            r#text: Default::default(),
245            r#contained: Default::default(),
246            r#extension: Default::default(),
247            r#modifier_extension: Default::default(),
248            r#identifier: Default::default(),
249            r#status: super::super::types::Code {
250                id: Some("$invalid".to_string()),
251                ..Default::default()
252            },
253            r#category: Default::default(),
254            r#subject: Default::default(),
255            r#date: Default::default(),
256            r#period: Default::default(),
257            r#grantor: Default::default(),
258            r#grantee: Default::default(),
259            r#manager: Default::default(),
260            r#controller: Default::default(),
261            r#source_attachment: Default::default(),
262            r#source_reference: Default::default(),
263            r#regulatory_basis: Default::default(),
264            r#policy_basis: Default::default(),
265            r#policy_text: Default::default(),
266            r#verification: Default::default(),
267            r#decision: Default::default(),
268            r#provision: Default::default(),
269        }
270    }
271}