fhir_rs/resource/r5/
subscription_topic.rs

1use crate::prelude::*;
2
3#[derive(Resource, Debug, Clone, Default)]
4#[fhir(base="DomainResource")]
5pub struct SubscriptionTopic {
6    /// Logical id of this artifact
7    #[fhir(name="id", min="0", max="1", summary=true, modifier=false, choice="")]
8    pub id: Option<Id>,
9    /// Metadata about the resource
10    #[fhir(name="meta", min="0", max="1", summary=true, modifier=false, choice="")]
11    pub meta: Option<Meta>,
12    /// A set of rules under which this content was created
13    #[fhir(name="implicitRules", min="0", max="1", summary=true, modifier=true)]
14    pub implicit_rules: Option<UriDt>,
15    /// Language of the resource content
16    #[fhir(name="language", min="0", max="1", summary=false, modifier=false, choice="")]
17    pub language: Option<CodeDt>,
18    /// Text summary of the resource, for human interpretation
19    #[fhir(name="text", min="0", max="1", summary=false, modifier=false, choice="")]
20    pub text: Option<Narrative>,
21    /// Contained, inline Resources
22    #[fhir(name="contained", min="0", max="*", summary=false, modifier=false, choice="")]
23    pub contained: Option<Vec<AnyResource>>,
24    /// Additional content defined by implementations
25    #[fhir(name="extension", min="0", max="*", summary=false, modifier=false, choice="")]
26    pub extension: Option<Vec<Extension>>,
27    /// Extensions that cannot be ignored
28    #[fhir(name="modifierExtension", min="0", max="*", summary=true, modifier=true)]
29    pub modifier_extension: Option<Vec<Extension>>,
30    /// Canonical identifier for this subscription topic, represented as an absolute URI (globally unique)
31    #[fhir(name="url", min="1", max="1", summary=true, modifier=false, choice="")]
32    pub url: Option<UriDt>,
33    /// Business identifier for subscription topic
34    #[fhir(name="identifier", min="0", max="*", summary=true, modifier=false, choice="")]
35    pub identifier: Option<Vec<Identifier>>,
36    /// Business version of the subscription topic
37    #[fhir(name="version", min="0", max="1", summary=true, modifier=false, choice="")]
38    pub version: Option<StringDt>,
39    /// How to compare versions
40    #[fhir(name="versionAlgorithm", min="0", max="1", summary=true, modifier=false, choice="")]
41    pub version_algorithm: Option<Coding>,
42    /// Name for this subscription topic (computer friendly)
43    #[fhir(name="name", min="0", max="1", summary=true, modifier=false, choice="")]
44    pub name: Option<StringDt>,
45    /// Name for this subscription topic (human friendly)
46    #[fhir(name="title", min="0", max="1", summary=true, modifier=false, choice="")]
47    pub title: Option<StringDt>,
48    /// Based on FHIR protocol or definition
49    #[fhir(name="derivedFrom", min="0", max="*", summary=true, modifier=false, choice="")]
50    pub derived_from: Option<Vec<CanonicalDt>>,
51    /// draft | active | retired | unknown
52    #[fhir(name="status", min="1", max="1", summary=true, modifier=true)]
53    pub status: Option<CodeDt>,
54    /// If for testing purposes, not real usage
55    #[fhir(name="experimental", min="0", max="1", summary=true, modifier=false, choice="")]
56    pub experimental: Option<BooleanDt>,
57    /// Date status first applied
58    #[fhir(name="date", min="0", max="1", summary=true, modifier=false, choice="")]
59    pub date: Option<DateTimeDt>,
60    /// The name of the individual or organization that published the SubscriptionTopic
61    #[fhir(name="publisher", min="0", max="1", summary=true, modifier=false, choice="")]
62    pub publisher: Option<StringDt>,
63    /// Contact details for the publisher
64    #[fhir(name="contact", min="0", max="*", summary=true, modifier=false, choice="")]
65    pub contact: Option<Vec<ContactDetail>>,
66    /// Natural language description of the SubscriptionTopic
67    #[fhir(name="description", min="0", max="1", summary=false, modifier=false, choice="")]
68    pub description: Option<MarkdownDt>,
69    /// Content intends to support these contexts
70    #[fhir(name="useContext", min="0", max="*", summary=true, modifier=false, choice="")]
71    pub use_context: Option<Vec<UsageContext>>,
72    /// Intended jurisdiction of the SubscriptionTopic (if applicable)
73    #[fhir(name="jurisdiction", min="0", max="*", summary=true, modifier=false, choice="")]
74    pub jurisdiction: Option<Vec<CodeableConcept>>,
75    /// Why this SubscriptionTopic is defined
76    #[fhir(name="purpose", min="0", max="1", summary=false, modifier=false, choice="")]
77    pub purpose: Option<MarkdownDt>,
78    /// Use and/or publishing restrictions
79    #[fhir(name="copyright", min="0", max="1", summary=false, modifier=false, choice="")]
80    pub copyright: Option<MarkdownDt>,
81    /// Copyright holder and year(s)
82    #[fhir(name="copyrightLabel", min="0", max="1", summary=false, modifier=false, choice="")]
83    pub copyright_label: Option<StringDt>,
84    /// When SubscriptionTopic is/was approved by publisher
85    #[fhir(name="approvalDate", min="0", max="1", summary=false, modifier=false, choice="")]
86    pub approval_date: Option<DateDt>,
87    /// Date the Subscription Topic was last reviewed by the publisher
88    #[fhir(name="lastReviewDate", min="0", max="1", summary=false, modifier=false, choice="")]
89    pub last_review_date: Option<DateDt>,
90    /// The effective date range for the SubscriptionTopic
91    #[fhir(name="effectivePeriod", min="0", max="1", summary=true, modifier=false, choice="")]
92    pub effective_period: Option<Period>,
93    /// Definition of a resource-based trigger for the subscription topic
94    #[fhir(name="resourceTrigger", min="0", max="*", summary=true, modifier=false, choice="")]
95    pub resource_trigger: Option<Vec<SubscriptionTopicResourceTriggerBackboneElement>>,
96    /// Event definitions the SubscriptionTopic
97    #[fhir(name="eventTrigger", min="0", max="*", summary=true, modifier=false, choice="")]
98    pub event_trigger: Option<Vec<SubscriptionTopicEventTriggerBackboneElement>>,
99    /// Properties by which a Subscription can filter notifications from the SubscriptionTopic
100    #[fhir(name="canFilterBy", min="0", max="*", summary=true, modifier=false, choice="")]
101    pub can_filter_by: Option<Vec<SubscriptionTopicCanFilterByBackboneElement>>,
102    /// Properties for describing the shape of notifications generated by this topic
103    #[fhir(name="notificationShape", min="0", max="*", summary=true, modifier=false, choice="")]
104    pub notification_shape: Option<Vec<SubscriptionTopicNotificationShapeBackboneElement>>,
105}
106
107#[derive(Element, BackboneElement, Debug, Clone, Default)]
108pub struct SubscriptionTopicEventTriggerBackboneElement {
109    /// Unique id for inter-element referencing
110    #[fhir(name="id", min="0", max="1", summary=false, modifier=false, choice="")]
111    pub id: Option<String>,
112    /// Additional content defined by implementations
113    #[fhir(name="extension", min="0", max="*", summary=false, modifier=false, choice="")]
114    pub extension: Option<Vec<Extension>>,
115    /// Extensions that cannot be ignored even if unrecognized
116    #[fhir(name="modifierExtension", min="0", max="*", summary=true, modifier=true)]
117    pub modifier_extension: Option<Vec<Extension>>,
118    /// Text representation of the event trigger
119    #[fhir(name="description", min="0", max="1", summary=true, modifier=false, choice="")]
120    pub description: Option<MarkdownDt>,
121    /// Event which can trigger a notification from the SubscriptionTopic
122    #[fhir(name="event", min="1", max="1", summary=true, modifier=false, choice="")]
123    pub event: Option<CodeableConcept>,
124    /// Data Type or Resource (reference to definition) for this trigger definition
125    #[fhir(name="resource", min="1", max="1", summary=true, modifier=false, choice="")]
126    pub resource: Option<UriDt>,
127}
128
129#[derive(Element, BackboneElement, Debug, Clone, Default)]
130pub struct SubscriptionTopicCanFilterByBackboneElement {
131    /// Unique id for inter-element referencing
132    #[fhir(name="id", min="0", max="1", summary=false, modifier=false, choice="")]
133    pub id: Option<String>,
134    /// Additional content defined by implementations
135    #[fhir(name="extension", min="0", max="*", summary=false, modifier=false, choice="")]
136    pub extension: Option<Vec<Extension>>,
137    /// Extensions that cannot be ignored even if unrecognized
138    #[fhir(name="modifierExtension", min="0", max="*", summary=true, modifier=true)]
139    pub modifier_extension: Option<Vec<Extension>>,
140    /// Description of this filter parameter
141    #[fhir(name="description", min="0", max="1", summary=true, modifier=false, choice="")]
142    pub description: Option<MarkdownDt>,
143    /// URL of the triggering Resource that this filter applies to
144    #[fhir(name="resource", min="0", max="1", summary=true, modifier=false, choice="")]
145    pub resource: Option<UriDt>,
146    /// Human-readable and computation-friendly name for a filter parameter usable by subscriptions on this topic, via Subscription.filterBy.filterParameter
147    #[fhir(name="filterParameter", min="1", max="1", summary=true, modifier=false, choice="")]
148    pub filter_parameter: Option<StringDt>,
149    /// Canonical URL for a filterParameter definition
150    #[fhir(name="filterDefinition", min="0", max="1", summary=true, modifier=false, choice="")]
151    pub filter_definition: Option<UriDt>,
152    /// eq | ne | gt | lt | ge | le | sa | eb | ap
153    #[fhir(name="comparator", min="0", max="*", summary=false, modifier=false, choice="")]
154    pub comparator: Option<Vec<CodeDt>>,
155    /// missing | exact | contains | not | text | in | not-in | below | above | type | identifier | of-type | code-text | text-advanced | iterate
156    #[fhir(name="modifier", min="0", max="*", summary=false, modifier=false, choice="")]
157    pub modifier: Option<Vec<CodeDt>>,
158}
159
160#[derive(Element, BackboneElement, Debug, Clone, Default)]
161pub struct SubscriptionTopicResourceTriggerBackboneElement {
162    /// Unique id for inter-element referencing
163    #[fhir(name="id", min="0", max="1", summary=false, modifier=false, choice="")]
164    pub id: Option<String>,
165    /// Additional content defined by implementations
166    #[fhir(name="extension", min="0", max="*", summary=false, modifier=false, choice="")]
167    pub extension: Option<Vec<Extension>>,
168    /// Extensions that cannot be ignored even if unrecognized
169    #[fhir(name="modifierExtension", min="0", max="*", summary=true, modifier=true)]
170    pub modifier_extension: Option<Vec<Extension>>,
171    /// Text representation of the resource trigger
172    #[fhir(name="description", min="0", max="1", summary=true, modifier=false, choice="")]
173    pub description: Option<MarkdownDt>,
174    /// Data Type or Resource (reference to definition) for this trigger definition
175    #[fhir(name="resource", min="1", max="1", summary=true, modifier=false, choice="")]
176    pub resource: Option<UriDt>,
177    /// create | update | delete
178    #[fhir(name="supportedInteraction", min="0", max="*", summary=true, modifier=false, choice="")]
179    pub supported_interaction: Option<Vec<CodeDt>>,
180    /// Query based trigger rule
181    #[fhir(name="queryCriteria", min="0", max="1", summary=true, modifier=false, choice="")]
182    pub query_criteria: Option<SubscriptionTopicResourceTriggerQueryCriteriaBackboneElement>,
183    /// FHIRPath based trigger rule
184    #[fhir(name="fhirPathCriteria", min="0", max="1", summary=true, modifier=false, choice="")]
185    pub fhir_path_criteria: Option<StringDt>,
186}
187
188#[derive(Element, BackboneElement, Debug, Clone, Default)]
189pub struct SubscriptionTopicResourceTriggerQueryCriteriaBackboneElement {
190    /// Unique id for inter-element referencing
191    #[fhir(name="id", min="0", max="1", summary=false, modifier=false, choice="")]
192    pub id: Option<String>,
193    /// Additional content defined by implementations
194    #[fhir(name="extension", min="0", max="*", summary=false, modifier=false, choice="")]
195    pub extension: Option<Vec<Extension>>,
196    /// Extensions that cannot be ignored even if unrecognized
197    #[fhir(name="modifierExtension", min="0", max="*", summary=true, modifier=true)]
198    pub modifier_extension: Option<Vec<Extension>>,
199    /// Rule applied to previous resource state
200    #[fhir(name="previous", min="0", max="1", summary=true, modifier=false, choice="")]
201    pub previous: Option<StringDt>,
202    /// test-passes | test-fails
203    #[fhir(name="resultForCreate", min="0", max="1", summary=true, modifier=false, choice="")]
204    pub result_for_create: Option<CodeDt>,
205    /// Rule applied to current resource state
206    #[fhir(name="current", min="0", max="1", summary=true, modifier=false, choice="")]
207    pub current: Option<StringDt>,
208    /// test-passes | test-fails
209    #[fhir(name="resultForDelete", min="0", max="1", summary=true, modifier=false, choice="")]
210    pub result_for_delete: Option<CodeDt>,
211    /// Both must be true flag
212    #[fhir(name="requireBoth", min="0", max="1", summary=true, modifier=false, choice="")]
213    pub require_both: Option<BooleanDt>,
214}
215
216#[derive(Element, BackboneElement, Debug, Clone, Default)]
217pub struct SubscriptionTopicNotificationShapeBackboneElement {
218    /// Unique id for inter-element referencing
219    #[fhir(name="id", min="0", max="1", summary=false, modifier=false, choice="")]
220    pub id: Option<String>,
221    /// Additional content defined by implementations
222    #[fhir(name="extension", min="0", max="*", summary=false, modifier=false, choice="")]
223    pub extension: Option<Vec<Extension>>,
224    /// Extensions that cannot be ignored even if unrecognized
225    #[fhir(name="modifierExtension", min="0", max="*", summary=true, modifier=true)]
226    pub modifier_extension: Option<Vec<Extension>>,
227    /// URL of the Resource that is the focus (main) resource in a notification shape
228    #[fhir(name="resource", min="1", max="1", summary=true, modifier=false, choice="")]
229    pub resource: Option<UriDt>,
230    /// Include directives, rooted in the resource for this shape
231    #[fhir(name="include", min="0", max="*", summary=true, modifier=false, choice="")]
232    pub include: Option<Vec<StringDt>>,
233    /// Reverse include directives, rooted in the resource for this shape
234    #[fhir(name="revInclude", min="0", max="*", summary=true, modifier=false, choice="")]
235    pub rev_include: Option<Vec<StringDt>>,
236}
237