fhirbolt_model/generated/r4b/resources/
subscription_topic.rs

1// Generated on 2023-05-17 by fhirbolt-codegen v0.10.0
2#[doc = "The FHIR query based rules that the server should use to determine when to trigger a notification for this subscription topic."]
3#[derive(Debug, Clone, PartialEq)]
4pub struct SubscriptionTopicResourceTriggerQueryCriteria {
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 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."]
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 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)."]
10    pub r#modifier_extension: Vec<super::super::types::Extension>,
11    #[doc = "The FHIR query based rules are applied to the previous resource state (e.g., state before an update)."]
12    pub r#previous: Option<super::super::types::String>,
13    #[doc = "For \"create\" interactions, should the \"previous\" criteria count as an automatic pass or an automatic fail."]
14    pub r#result_for_create: Option<super::super::types::Code>,
15    #[doc = "The FHIR query based rules are applied to the current resource state (e.g., state after an update)."]
16    pub r#current: Option<super::super::types::String>,
17    #[doc = "For \"delete\" interactions, should the \"current\" criteria count as an automatic pass or an automatic fail."]
18    pub r#result_for_delete: Option<super::super::types::Code>,
19    #[doc = "If set to true, both current and previous criteria must evaluate true to  trigger a notification for this topic.  Otherwise a notification for this topic will be triggered if either one evaluates to true."]
20    pub r#require_both: Option<super::super::types::Boolean>,
21}
22#[allow(clippy::derivable_impls)]
23impl Default for SubscriptionTopicResourceTriggerQueryCriteria {
24    fn default() -> Self {
25        Self {
26            r#id: Default::default(),
27            r#extension: Default::default(),
28            r#modifier_extension: Default::default(),
29            r#previous: Default::default(),
30            r#result_for_create: Default::default(),
31            r#current: Default::default(),
32            r#result_for_delete: Default::default(),
33            r#require_both: Default::default(),
34        }
35    }
36}
37#[doc = "A definition of a resource-based event that triggers a notification based on the SubscriptionTopic. The criteria may be just a human readable description and/or a full FHIR search string or FHIRPath expression. Multiple triggers are considered OR joined (e.g., a resource update matching ANY of the definitions will trigger a notification)."]
38#[derive(Debug, Clone, PartialEq)]
39pub struct SubscriptionTopicResourceTrigger {
40    #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
41    pub r#id: Option<std::string::String>,
42    #[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."]
43    pub r#extension: Vec<super::super::types::Extension>,
44    #[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)."]
45    pub r#modifier_extension: Vec<super::super::types::Extension>,
46    #[doc = "The human readable description of this resource trigger for the SubscriptionTopic -  for example, \"An Encounter enters the 'in-progress' state\"."]
47    pub r#description: Option<super::super::types::Markdown>,
48    #[doc = "URL of the Resource that is the type used in this resource trigger.  Relative URLs are relative to the StructureDefinition root of the implemented FHIR version (e.g., <http://hl7.org/fhir/StructureDefinition>). For example, \"Patient\" maps to <http://hl7.org/fhir/StructureDefinition/Patient>.  For more information, see <a href=\"elementdefinition-definitions.html#ElementDefinition.type.code\">ElementDefinition.type.code</a>."]
49    pub r#resource: super::super::types::Uri,
50    #[doc = "The FHIR RESTful interaction which can be used to trigger a notification for the SubscriptionTopic. Multiple values are considered OR joined (e.g., CREATE or UPDATE)."]
51    pub r#supported_interaction: Vec<super::super::types::Code>,
52    #[doc = "The FHIR query based rules that the server should use to determine when to trigger a notification for this subscription topic."]
53    pub r#query_criteria: Option<SubscriptionTopicResourceTriggerQueryCriteria>,
54    #[doc = "The FHIRPath based rules that the server should use to determine when to trigger a notification for this topic."]
55    pub r#fhir_path_criteria: Option<super::super::types::String>,
56}
57#[allow(clippy::derivable_impls)]
58impl Default for SubscriptionTopicResourceTrigger {
59    fn default() -> Self {
60        Self {
61            r#id: Default::default(),
62            r#extension: Default::default(),
63            r#modifier_extension: Default::default(),
64            r#description: Default::default(),
65            r#resource: super::super::types::Uri {
66                id: Some("$invalid".to_string()),
67                ..Default::default()
68            },
69            r#supported_interaction: Default::default(),
70            r#query_criteria: Default::default(),
71            r#fhir_path_criteria: Default::default(),
72        }
73    }
74}
75#[doc = "Event definition which can be used to trigger the SubscriptionTopic."]
76#[derive(Debug, Clone, PartialEq)]
77pub struct SubscriptionTopicEventTrigger {
78    #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
79    pub r#id: Option<std::string::String>,
80    #[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."]
81    pub r#extension: Vec<super::super::types::Extension>,
82    #[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)."]
83    pub r#modifier_extension: Vec<super::super::types::Extension>,
84    #[doc = "The human readable description of an event to trigger a notification for the SubscriptionTopic - for example, \"Patient Admission, as defined in HL7v2 via message ADT^A01\". Multiple values are considered OR joined (e.g., matching any single event listed)."]
85    pub r#description: Option<super::super::types::Markdown>,
86    #[doc = "A well-defined event which can be used to trigger notifications from the SubscriptionTopic."]
87    pub r#event: Box<super::super::types::CodeableConcept>,
88    #[doc = "URL of the Resource that is the focus type used in this event trigger.  Relative URLs are relative to the StructureDefinition root of the implemented FHIR version (e.g., <http://hl7.org/fhir/StructureDefinition>). For example, \"Patient\" maps to <http://hl7.org/fhir/StructureDefinition/Patient>.  For more information, see <a href=\"elementdefinition-definitions.html#ElementDefinition.type.code\">ElementDefinition.type.code</a>."]
89    pub r#resource: super::super::types::Uri,
90}
91#[allow(clippy::derivable_impls)]
92impl Default for SubscriptionTopicEventTrigger {
93    fn default() -> Self {
94        Self {
95            r#id: Default::default(),
96            r#extension: Default::default(),
97            r#modifier_extension: Default::default(),
98            r#description: Default::default(),
99            r#event: Box::new(super::super::types::CodeableConcept {
100                id: Some("$invalid".to_string()),
101                ..Default::default()
102            }),
103            r#resource: super::super::types::Uri {
104                id: Some("$invalid".to_string()),
105                ..Default::default()
106            },
107        }
108    }
109}
110#[doc = "List of properties by which Subscriptions on the SubscriptionTopic can be filtered. May be defined Search Parameters (e.g., Encounter.patient) or parameters defined within this SubscriptionTopic context (e.g., hub.event)."]
111#[derive(Debug, Clone, PartialEq)]
112pub struct SubscriptionTopicCanFilterBy {
113    #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
114    pub r#id: Option<std::string::String>,
115    #[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."]
116    pub r#extension: Vec<super::super::types::Extension>,
117    #[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)."]
118    pub r#modifier_extension: Vec<super::super::types::Extension>,
119    #[doc = "Description of how this filtering parameter is intended to be used."]
120    pub r#description: Option<super::super::types::Markdown>,
121    #[doc = "URL of the Resource that is the type used in this filter. This is the \"focus\" of the topic (or one of them if there are more than one). It will be the same, a generality, or a specificity of SubscriptionTopic.resourceTrigger.resource or SubscriptionTopic.eventTrigger.resource when they are present."]
122    pub r#resource: Option<super::super::types::Uri>,
123    #[doc = "Either the canonical URL to a search parameter (like \"<http://hl7.org/fhir/SearchParameter/encounter>-patient\") or topic-defined parameter (like \"hub.event\") which is a label for the filter."]
124    pub r#filter_parameter: super::super::types::String,
125    #[doc = "Either the canonical URL to a search parameter (like \"<http://hl7.org/fhir/SearchParameter/encounter>-patient\") or the officially-defined URI for a shared filter concept (like \"<http://example.org/concepts/shared>-common-event\")."]
126    pub r#filter_definition: Option<super::super::types::Uri>,
127    #[doc = "Allowable operators to apply when determining matches (Search Modifiers).  If the filterParameter is a SearchParameter, this list of modifiers SHALL be a strict subset of the modifiers defined on that SearchParameter."]
128    pub r#modifier: Vec<super::super::types::Code>,
129}
130#[allow(clippy::derivable_impls)]
131impl Default for SubscriptionTopicCanFilterBy {
132    fn default() -> Self {
133        Self {
134            r#id: Default::default(),
135            r#extension: Default::default(),
136            r#modifier_extension: Default::default(),
137            r#description: Default::default(),
138            r#resource: Default::default(),
139            r#filter_parameter: super::super::types::String {
140                id: Some("$invalid".to_string()),
141                ..Default::default()
142            },
143            r#filter_definition: Default::default(),
144            r#modifier: Default::default(),
145        }
146    }
147}
148#[doc = "List of properties to describe the shape (e.g., resources) included in notifications from this Subscription Topic."]
149#[derive(Debug, Clone, PartialEq)]
150pub struct SubscriptionTopicNotificationShape {
151    #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
152    pub r#id: Option<std::string::String>,
153    #[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."]
154    pub r#extension: Vec<super::super::types::Extension>,
155    #[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)."]
156    pub r#modifier_extension: Vec<super::super::types::Extension>,
157    #[doc = "URL of the Resource that is the type used in this shape. This is the \"focus\" of the topic (or one of them if there are more than one) and the root resource for this shape definition. It will be the same, a generality, or a specificity of SubscriptionTopic.resourceTrigger.resource or SubscriptionTopic.eventTrigger.resource when they are present."]
158    pub r#resource: super::super::types::Uri,
159    #[doc = "Search-style _include directives, rooted in the resource for this shape. Servers SHOULD include resources listed here, if they exist and the user is authorized to receive them.  Clients SHOULD be prepared to receive these additional resources, but SHALL function properly without them."]
160    pub r#include: Vec<super::super::types::String>,
161    #[doc = "Search-style _revinclude directives, rooted in the resource for this shape. Servers SHOULD include resources listed here, if they exist and the user is authorized to receive them.  Clients SHOULD be prepared to receive these additional resources, but SHALL function properly without them."]
162    pub r#rev_include: Vec<super::super::types::String>,
163}
164#[allow(clippy::derivable_impls)]
165impl Default for SubscriptionTopicNotificationShape {
166    fn default() -> Self {
167        Self {
168            r#id: Default::default(),
169            r#extension: Default::default(),
170            r#modifier_extension: Default::default(),
171            r#resource: super::super::types::Uri {
172                id: Some("$invalid".to_string()),
173                ..Default::default()
174            },
175            r#include: Default::default(),
176            r#rev_include: Default::default(),
177        }
178    }
179}
180#[doc = "Describes a stream of resource state changes identified by trigger criteria and annotated with labels useful to filter projections from this topic."]
181#[derive(Debug, Clone, PartialEq)]
182pub struct SubscriptionTopic {
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, and nor can they have their own independent transaction scope."]
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 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."]
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 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)."]
198    pub r#modifier_extension: Vec<super::super::types::Extension>,
199    #[doc = "An absolute URI that is used to identify this subscription topic when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this subscription topic is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the subscription topic is stored on different servers."]
200    pub r#url: super::super::types::Uri,
201    #[doc = "Business identifiers assigned to this subscription topic by the performer and/or other systems.  These identifiers remain constant as the resource is updated and propagates from server to server."]
202    pub r#identifier: Vec<super::super::types::Identifier>,
203    #[doc = "The identifier that is used to identify this version of the subscription topic when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the Topic author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions are orderable."]
204    pub r#version: Option<super::super::types::String>,
205    #[doc = "A short, descriptive, user-friendly title for the SubscriptionTopic, for example, \"admission\"."]
206    pub r#title: Option<super::super::types::String>,
207    #[doc = "The canonical URL pointing to another FHIR-defined SubscriptionTopic that is adhered to in whole or in part by this SubscriptionTopic."]
208    pub r#derived_from: Vec<super::super::types::Canonical>,
209    #[doc = "The current state of the SubscriptionTopic."]
210    pub r#status: super::super::types::Code,
211    #[doc = "A flag to indicate that this TopSubscriptionTopicic is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage."]
212    pub r#experimental: Option<super::super::types::Boolean>,
213    #[doc = "For draft definitions, indicates the date of initial creation.  For active definitions, represents the date of activation.  For withdrawn definitions, indicates the date of withdrawal."]
214    pub r#date: Option<super::super::types::DateTime>,
215    #[doc = "Helps establish the \"authority/credibility\" of the SubscriptionTopic.  May also allow for contact."]
216    pub r#publisher: Option<super::super::types::String>,
217    #[doc = "Contact details to assist a user in finding and communicating with the publisher."]
218    pub r#contact: Vec<super::super::types::ContactDetail>,
219    #[doc = "A free text natural language description of the Topic from the consumer's perspective."]
220    pub r#description: Option<super::super::types::Markdown>,
221    #[doc = "The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of code system definitions."]
222    pub r#use_context: Vec<super::super::types::UsageContext>,
223    #[doc = "A jurisdiction in which the Topic is intended to be used."]
224    pub r#jurisdiction: Vec<super::super::types::CodeableConcept>,
225    #[doc = "Explains why this Topic is needed and why it has been designed as it has."]
226    pub r#purpose: Option<super::super::types::Markdown>,
227    #[doc = "A copyright statement relating to the SubscriptionTopic and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the SubscriptionTopic."]
228    pub r#copyright: Option<super::super::types::Markdown>,
229    #[doc = "The date on which the asset content was approved by the publisher. Approval happens once when the content is officially approved for usage."]
230    pub r#approval_date: Option<super::super::types::Date>,
231    #[doc = "The date on which the asset content was last reviewed. Review happens periodically after that, but doesn't change the original approval date."]
232    pub r#last_review_date: Option<super::super::types::Date>,
233    #[doc = "The period during which the SubscriptionTopic content was or is planned to be effective."]
234    pub r#effective_period: Option<Box<super::super::types::Period>>,
235    #[doc = "A definition of a resource-based event that triggers a notification based on the SubscriptionTopic. The criteria may be just a human readable description and/or a full FHIR search string or FHIRPath expression. Multiple triggers are considered OR joined (e.g., a resource update matching ANY of the definitions will trigger a notification)."]
236    pub r#resource_trigger: Vec<SubscriptionTopicResourceTrigger>,
237    #[doc = "Event definition which can be used to trigger the SubscriptionTopic."]
238    pub r#event_trigger: Vec<SubscriptionTopicEventTrigger>,
239    #[doc = "List of properties by which Subscriptions on the SubscriptionTopic can be filtered. May be defined Search Parameters (e.g., Encounter.patient) or parameters defined within this SubscriptionTopic context (e.g., hub.event)."]
240    pub r#can_filter_by: Vec<SubscriptionTopicCanFilterBy>,
241    #[doc = "List of properties to describe the shape (e.g., resources) included in notifications from this Subscription Topic."]
242    pub r#notification_shape: Vec<SubscriptionTopicNotificationShape>,
243}
244#[allow(clippy::derivable_impls)]
245impl Default for SubscriptionTopic {
246    fn default() -> Self {
247        Self {
248            r#id: Default::default(),
249            r#meta: Default::default(),
250            r#implicit_rules: Default::default(),
251            r#language: Default::default(),
252            r#text: Default::default(),
253            r#contained: Default::default(),
254            r#extension: Default::default(),
255            r#modifier_extension: Default::default(),
256            r#url: super::super::types::Uri {
257                id: Some("$invalid".to_string()),
258                ..Default::default()
259            },
260            r#identifier: Default::default(),
261            r#version: Default::default(),
262            r#title: Default::default(),
263            r#derived_from: Default::default(),
264            r#status: super::super::types::Code {
265                id: Some("$invalid".to_string()),
266                ..Default::default()
267            },
268            r#experimental: Default::default(),
269            r#date: Default::default(),
270            r#publisher: Default::default(),
271            r#contact: Default::default(),
272            r#description: Default::default(),
273            r#use_context: Default::default(),
274            r#jurisdiction: Default::default(),
275            r#purpose: Default::default(),
276            r#copyright: Default::default(),
277            r#approval_date: Default::default(),
278            r#last_review_date: Default::default(),
279            r#effective_period: Default::default(),
280            r#resource_trigger: Default::default(),
281            r#event_trigger: Default::default(),
282            r#can_filter_by: Default::default(),
283            r#notification_shape: Default::default(),
284        }
285    }
286}