1#[doc = "The value of the extra detail."]
3#[derive(Default, Debug, Clone, PartialEq)]
4pub enum AuditEventEntityDetailValue {
5 String(super::super::types::String),
6 Base64Binary(super::super::types::Base64Binary),
7 #[default]
8 Invalid,
9}
10#[doc = "Logical network location for application activity, if the activity has a network location."]
11#[derive(Debug, Clone, PartialEq)]
12pub struct AuditEventAgentNetwork {
13 #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
14 pub r#id: Option<std::string::String>,
15 #[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 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."]
16 pub r#extension: Vec<super::super::types::Extension>,
17 #[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 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. 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)."]
18 pub r#modifier_extension: Vec<super::super::types::Extension>,
19 #[doc = "An identifier for the network access point of the user device for the audit event."]
20 pub r#address: Option<super::super::types::String>,
21 #[doc = "An identifier for the type of network access point that originated the audit event."]
22 pub r#type: Option<super::super::types::Code>,
23}
24#[allow(clippy::derivable_impls)]
25impl Default for AuditEventAgentNetwork {
26 fn default() -> Self {
27 Self {
28 r#id: Default::default(),
29 r#extension: Default::default(),
30 r#modifier_extension: Default::default(),
31 r#address: Default::default(),
32 r#type: Default::default(),
33 }
34 }
35}
36#[doc = "An actor taking an active role in the event or activity that is logged."]
37#[derive(Debug, Clone, PartialEq)]
38pub struct AuditEventAgent {
39 #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
40 pub r#id: Option<std::string::String>,
41 #[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 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."]
42 pub r#extension: Vec<super::super::types::Extension>,
43 #[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 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. 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)."]
44 pub r#modifier_extension: Vec<super::super::types::Extension>,
45 #[doc = "Specification of the participation type the user plays when performing the event."]
46 pub r#type: Option<Box<super::super::types::CodeableConcept>>,
47 #[doc = "The security role that the user was acting under, that come from local codes defined by the access control security system (e.g. RBAC, ABAC) used in the local context."]
48 pub r#role: Vec<super::super::types::CodeableConcept>,
49 #[doc = "Reference to who this agent is that was involved in the event."]
50 pub r#who: Option<Box<super::super::types::Reference>>,
51 #[doc = "Alternative agent Identifier. For a human, this should be a user identifier text string from authentication system. This identifier would be one known to a common authentication system (e.g. single sign-on), if available."]
52 pub r#alt_id: Option<super::super::types::String>,
53 #[doc = "Human-meaningful name for the agent."]
54 pub r#name: Option<super::super::types::String>,
55 #[doc = "Indicator that the user is or is not the requestor, or initiator, for the event being audited."]
56 pub r#requestor: super::super::types::Boolean,
57 #[doc = "Where the event occurred."]
58 pub r#location: Option<Box<super::super::types::Reference>>,
59 #[doc = "The policy or plan that authorized the activity being recorded. Typically, a single activity may have multiple applicable policies, such as patient consent, guarantor funding, etc. The policy would also indicate the security token used."]
60 pub r#policy: Vec<super::super::types::Uri>,
61 #[doc = "Type of media involved. Used when the event is about exporting/importing onto media."]
62 pub r#media: Option<Box<super::super::types::Coding>>,
63 #[doc = "Logical network location for application activity, if the activity has a network location."]
64 pub r#network: Option<AuditEventAgentNetwork>,
65 #[doc = "The reason (purpose of use), specific to this agent, that was used during the event being recorded."]
66 pub r#purpose_of_use: Vec<super::super::types::CodeableConcept>,
67}
68#[allow(clippy::derivable_impls)]
69impl Default for AuditEventAgent {
70 fn default() -> Self {
71 Self {
72 r#id: Default::default(),
73 r#extension: Default::default(),
74 r#modifier_extension: Default::default(),
75 r#type: Default::default(),
76 r#role: Default::default(),
77 r#who: Default::default(),
78 r#alt_id: Default::default(),
79 r#name: Default::default(),
80 r#requestor: super::super::types::Boolean {
81 id: Some("$invalid".to_string()),
82 ..Default::default()
83 },
84 r#location: Default::default(),
85 r#policy: Default::default(),
86 r#media: Default::default(),
87 r#network: Default::default(),
88 r#purpose_of_use: Default::default(),
89 }
90 }
91}
92#[doc = "The system that is reporting the event."]
93#[derive(Debug, Clone, PartialEq)]
94pub struct AuditEventSource {
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 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."]
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 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. 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 = "Logical source location within the healthcare enterprise network. For example, a hospital or other provider location within a multi-entity provider group."]
102 pub r#site: Option<super::super::types::String>,
103 #[doc = "Identifier of the source where the event was detected."]
104 pub r#observer: Box<super::super::types::Reference>,
105 #[doc = "Code specifying the type of source where event originated."]
106 pub r#type: Vec<super::super::types::Coding>,
107}
108#[allow(clippy::derivable_impls)]
109impl Default for AuditEventSource {
110 fn default() -> Self {
111 Self {
112 r#id: Default::default(),
113 r#extension: Default::default(),
114 r#modifier_extension: Default::default(),
115 r#site: Default::default(),
116 r#observer: Box::new(super::super::types::Reference {
117 id: Some("$invalid".to_string()),
118 ..Default::default()
119 }),
120 r#type: Default::default(),
121 }
122 }
123}
124#[doc = "Tagged value pairs for conveying additional information about the entity."]
125#[derive(Debug, Clone, PartialEq)]
126pub struct AuditEventEntityDetail {
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 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."]
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 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. 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 = "The type of extra detail provided in the value."]
134 pub r#type: super::super::types::String,
135 #[doc = "The value of the extra detail."]
136 pub r#value: AuditEventEntityDetailValue,
137}
138#[allow(clippy::derivable_impls)]
139impl Default for AuditEventEntityDetail {
140 fn default() -> Self {
141 Self {
142 r#id: Default::default(),
143 r#extension: Default::default(),
144 r#modifier_extension: Default::default(),
145 r#type: super::super::types::String {
146 id: Some("$invalid".to_string()),
147 ..Default::default()
148 },
149 r#value: Default::default(),
150 }
151 }
152}
153#[doc = "Specific instances of data or objects that have been accessed."]
154#[derive(Debug, Clone, PartialEq)]
155pub struct AuditEventEntity {
156 #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
157 pub r#id: Option<std::string::String>,
158 #[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 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."]
159 pub r#extension: Vec<super::super::types::Extension>,
160 #[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 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. 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)."]
161 pub r#modifier_extension: Vec<super::super::types::Extension>,
162 #[doc = "Identifies a specific instance of the entity. The reference should be version specific."]
163 pub r#what: Option<Box<super::super::types::Reference>>,
164 #[doc = "The type of the object that was involved in this audit event."]
165 pub r#type: Option<Box<super::super::types::Coding>>,
166 #[doc = "Code representing the role the entity played in the event being audited."]
167 pub r#role: Option<Box<super::super::types::Coding>>,
168 #[doc = "Identifier for the data life-cycle stage for the entity."]
169 pub r#lifecycle: Option<Box<super::super::types::Coding>>,
170 #[doc = "Security labels for the identified entity."]
171 pub r#security_label: Vec<super::super::types::Coding>,
172 #[doc = "A name of the entity in the audit event."]
173 pub r#name: Option<super::super::types::String>,
174 #[doc = "Text that describes the entity in more detail."]
175 pub r#description: Option<super::super::types::String>,
176 #[doc = "The query parameters for a query-type entities."]
177 pub r#query: Option<super::super::types::Base64Binary>,
178 #[doc = "Tagged value pairs for conveying additional information about the entity."]
179 pub r#detail: Vec<AuditEventEntityDetail>,
180}
181#[allow(clippy::derivable_impls)]
182impl Default for AuditEventEntity {
183 fn default() -> Self {
184 Self {
185 r#id: Default::default(),
186 r#extension: Default::default(),
187 r#modifier_extension: Default::default(),
188 r#what: Default::default(),
189 r#type: Default::default(),
190 r#role: Default::default(),
191 r#lifecycle: Default::default(),
192 r#security_label: Default::default(),
193 r#name: Default::default(),
194 r#description: Default::default(),
195 r#query: Default::default(),
196 r#detail: Default::default(),
197 }
198 }
199}
200#[doc = "A record of an event made for purposes of maintaining a security log. Typical uses include detection of intrusion attempts and monitoring for inappropriate usage."]
201#[derive(Debug, Clone, PartialEq)]
202pub struct AuditEvent {
203 #[doc = "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes."]
204 pub r#id: Option<super::super::types::Id>,
205 #[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."]
206 pub r#meta: Option<Box<super::super::types::Meta>>,
207 #[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."]
208 pub r#implicit_rules: Option<super::super::types::Uri>,
209 #[doc = "The base language in which the resource is written."]
210 pub r#language: Option<super::super::types::Code>,
211 #[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."]
212 pub r#text: Option<Box<super::super::types::Narrative>>,
213 #[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."]
214 pub r#contained: Vec<super::super::Resource>,
215 #[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."]
216 pub r#extension: Vec<super::super::types::Extension>,
217 #[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)."]
218 pub r#modifier_extension: Vec<super::super::types::Extension>,
219 #[doc = "Identifier for a family of the event. For example, a menu item, program, rule, policy, function code, application name or URL. It identifies the performed function."]
220 pub r#type: Box<super::super::types::Coding>,
221 #[doc = "Identifier for the category of event."]
222 pub r#subtype: Vec<super::super::types::Coding>,
223 #[doc = "Indicator for type of action performed during the event that generated the audit."]
224 pub r#action: Option<super::super::types::Code>,
225 #[doc = "The period during which the activity occurred."]
226 pub r#period: Option<Box<super::super::types::Period>>,
227 #[doc = "The time when the event was recorded."]
228 pub r#recorded: super::super::types::Instant,
229 #[doc = "Indicates whether the event succeeded or failed."]
230 pub r#outcome: Option<super::super::types::Code>,
231 #[doc = "A free text description of the outcome of the event."]
232 pub r#outcome_desc: Option<super::super::types::String>,
233 #[doc = "The purposeOfUse (reason) that was used during the event being recorded."]
234 pub r#purpose_of_event: Vec<super::super::types::CodeableConcept>,
235 #[doc = "An actor taking an active role in the event or activity that is logged."]
236 pub r#agent: Vec<AuditEventAgent>,
237 #[doc = "The system that is reporting the event."]
238 pub r#source: AuditEventSource,
239 #[doc = "Specific instances of data or objects that have been accessed."]
240 pub r#entity: Vec<AuditEventEntity>,
241}
242#[allow(clippy::derivable_impls)]
243impl Default for AuditEvent {
244 fn default() -> Self {
245 Self {
246 r#id: Default::default(),
247 r#meta: Default::default(),
248 r#implicit_rules: Default::default(),
249 r#language: Default::default(),
250 r#text: Default::default(),
251 r#contained: Default::default(),
252 r#extension: Default::default(),
253 r#modifier_extension: Default::default(),
254 r#type: Box::new(super::super::types::Coding {
255 id: Some("$invalid".to_string()),
256 ..Default::default()
257 }),
258 r#subtype: Default::default(),
259 r#action: Default::default(),
260 r#period: Default::default(),
261 r#recorded: super::super::types::Instant {
262 id: Some("$invalid".to_string()),
263 ..Default::default()
264 },
265 r#outcome: Default::default(),
266 r#outcome_desc: Default::default(),
267 r#purpose_of_event: Default::default(),
268 r#agent: Default::default(),
269 r#source: AuditEventSource {
270 id: Some("$invalid".to_string()),
271 ..Default::default()
272 },
273 r#entity: Default::default(),
274 }
275 }
276}