fhirbolt_model/generated/r5/resources/
activity_definition.rs

1// Generated on 2023-05-17 by fhirbolt-codegen v0.10.0
2#[doc = "Indicates the mechanism used to compare versions to determine which is more current."]
3#[derive(Default, Debug, Clone, PartialEq)]
4pub enum ActivityDefinitionVersionAlgorithm {
5    String(super::super::types::String),
6    Coding(Box<super::super::types::Coding>),
7    #[default]
8    Invalid,
9}
10#[doc = "A code, group definition, or canonical reference that describes  or identifies the intended subject of the activity being defined.  Canonical references are allowed to support the definition of protocols for drug and substance quality specifications, and is allowed to reference a MedicinalProductDefinition, SubstanceDefinition, AdministrableProductDefinition, ManufacturedItemDefinition, or PackagedProductDefinition resource."]
11#[derive(Default, Debug, Clone, PartialEq)]
12pub enum ActivityDefinitionSubject {
13    CodeableConcept(Box<super::super::types::CodeableConcept>),
14    Reference(Box<super::super::types::Reference>),
15    Canonical(super::super::types::Canonical),
16    #[default]
17    Invalid,
18}
19#[doc = "The timing or frequency upon which the described activity is to occur."]
20#[derive(Default, Debug, Clone, PartialEq)]
21pub enum ActivityDefinitionTiming {
22    Timing(Box<super::super::types::Timing>),
23    Age(Box<super::super::types::Age>),
24    Range(Box<super::super::types::Range>),
25    Duration(Box<super::super::types::Duration>),
26    #[default]
27    Invalid,
28}
29#[doc = "If a CodeableConcept is present, it indicates the pre-condition for performing the service.  For example \"pain\", \"on flare-up\", etc."]
30#[derive(Default, Debug, Clone, PartialEq)]
31pub enum ActivityDefinitionAsNeeded {
32    Boolean(super::super::types::Boolean),
33    CodeableConcept(Box<super::super::types::CodeableConcept>),
34    #[default]
35    Invalid,
36}
37#[doc = "Identifies the food, drug or other product being consumed or supplied in the activity."]
38#[derive(Default, Debug, Clone, PartialEq)]
39pub enum ActivityDefinitionProduct {
40    Reference(Box<super::super::types::Reference>),
41    CodeableConcept(Box<super::super::types::CodeableConcept>),
42    #[default]
43    Invalid,
44}
45#[doc = "Indicates who should participate in performing the action described."]
46#[derive(Debug, Clone, PartialEq)]
47pub struct ActivityDefinitionParticipant {
48    #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
49    pub r#id: Option<std::string::String>,
50    #[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."]
51    pub r#extension: Vec<super::super::types::Extension>,
52    #[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)."]
53    pub r#modifier_extension: Vec<super::super::types::Extension>,
54    #[doc = "The type of participant in the action."]
55    pub r#type: Option<super::super::types::Code>,
56    #[doc = "The type of participant in the action."]
57    pub r#type_canonical: Option<super::super::types::Canonical>,
58    #[doc = "The type of participant in the action."]
59    pub r#type_reference: Option<Box<super::super::types::Reference>>,
60    #[doc = "The role the participant should play in performing the described action."]
61    pub r#role: Option<Box<super::super::types::CodeableConcept>>,
62    #[doc = "Indicates how the actor will be involved in the action - author, reviewer, witness, etc."]
63    pub r#function: Option<Box<super::super::types::CodeableConcept>>,
64}
65#[allow(clippy::derivable_impls)]
66impl Default for ActivityDefinitionParticipant {
67    fn default() -> Self {
68        Self {
69            r#id: Default::default(),
70            r#extension: Default::default(),
71            r#modifier_extension: Default::default(),
72            r#type: Default::default(),
73            r#type_canonical: Default::default(),
74            r#type_reference: Default::default(),
75            r#role: Default::default(),
76            r#function: Default::default(),
77        }
78    }
79}
80#[doc = "Dynamic values that will be evaluated to produce values for elements of the resulting resource. For example, if the dosage of a medication must be computed based on the patient's weight, a dynamic value would be used to specify an expression that calculated the weight, and the path on the request resource that would contain the result."]
81#[derive(Debug, Clone, PartialEq)]
82pub struct ActivityDefinitionDynamicValue {
83    #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
84    pub r#id: Option<std::string::String>,
85    #[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."]
86    pub r#extension: Vec<super::super::types::Extension>,
87    #[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)."]
88    pub r#modifier_extension: Vec<super::super::types::Extension>,
89    #[doc = "The path to the element to be customized. This is the path on the resource that will hold the result of the calculation defined by the expression. The specified path SHALL be a FHIRPath resolvable on the specified target type of the ActivityDefinition, and SHALL consist only of identifiers, constant indexers, and a restricted subset of functions. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers (\\[x\\]) to traverse multiple-cardinality sub-elements (see the [Simple FHIRPath Profile](fhirpath.html#simple) for full details)."]
90    pub r#path: super::super::types::String,
91    #[doc = "An expression specifying the value of the customized element."]
92    pub r#expression: Box<super::super::types::Expression>,
93}
94#[allow(clippy::derivable_impls)]
95impl Default for ActivityDefinitionDynamicValue {
96    fn default() -> Self {
97        Self {
98            r#id: Default::default(),
99            r#extension: Default::default(),
100            r#modifier_extension: Default::default(),
101            r#path: super::super::types::String {
102                id: Some("$invalid".to_string()),
103                ..Default::default()
104            },
105            r#expression: Box::new(super::super::types::Expression {
106                id: Some("$invalid".to_string()),
107                ..Default::default()
108            }),
109        }
110    }
111}
112#[doc = "This resource allows for the definition of some activity to be performed, independent of a particular patient, practitioner, or other performance context."]
113#[derive(Debug, Clone, PartialEq)]
114pub struct ActivityDefinition {
115    #[doc = "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes."]
116    pub r#id: Option<super::super::types::Id>,
117    #[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."]
118    pub r#meta: Option<Box<super::super::types::Meta>>,
119    #[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."]
120    pub r#implicit_rules: Option<super::super::types::Uri>,
121    #[doc = "The base language in which the resource is written."]
122    pub r#language: Option<super::super::types::Code>,
123    #[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."]
124    pub r#text: Option<Box<super::super::types::Narrative>>,
125    #[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."]
126    pub r#contained: Vec<super::super::Resource>,
127    #[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."]
128    pub r#extension: Vec<super::super::types::Extension>,
129    #[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)."]
130    pub r#modifier_extension: Vec<super::super::types::Extension>,
131    #[doc = "An absolute URI that is used to identify this activity definition 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 an authoritative instance of this activity definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the activity definition is stored on different servers."]
132    pub r#url: Option<super::super::types::Uri>,
133    #[doc = "A formal identifier that is used to identify this activity definition when it is represented in other formats, or referenced in a specification, model, design or an instance."]
134    pub r#identifier: Vec<super::super::types::Identifier>,
135    #[doc = "The identifier that is used to identify this version of the activity definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the activity definition 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 can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active assets."]
136    pub r#version: Option<super::super::types::String>,
137    #[doc = "Indicates the mechanism used to compare versions to determine which is more current."]
138    pub r#version_algorithm: Option<ActivityDefinitionVersionAlgorithm>,
139    #[doc = "A natural language name identifying the activity definition. This name should be usable as an identifier for the module by machine processing applications such as code generation."]
140    pub r#name: Option<super::super::types::String>,
141    #[doc = "A short, descriptive, user-friendly title for the activity definition."]
142    pub r#title: Option<super::super::types::String>,
143    #[doc = "An explanatory or alternate title for the activity definition giving additional information about its content."]
144    pub r#subtitle: Option<super::super::types::String>,
145    #[doc = "The status of this activity definition. Enables tracking the life-cycle of the content."]
146    pub r#status: super::super::types::Code,
147    #[doc = "A Boolean value to indicate that this activity definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage."]
148    pub r#experimental: Option<super::super::types::Boolean>,
149    #[doc = "A code, group definition, or canonical reference that describes  or identifies the intended subject of the activity being defined.  Canonical references are allowed to support the definition of protocols for drug and substance quality specifications, and is allowed to reference a MedicinalProductDefinition, SubstanceDefinition, AdministrableProductDefinition, ManufacturedItemDefinition, or PackagedProductDefinition resource."]
150    pub r#subject: Option<ActivityDefinitionSubject>,
151    #[doc = "The date  (and optionally time) when the activity definition was last significantly changed. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the activity definition changes."]
152    pub r#date: Option<super::super::types::DateTime>,
153    #[doc = "The name of the organization or individual responsible for the release and ongoing maintenance of the activity definition."]
154    pub r#publisher: Option<super::super::types::String>,
155    #[doc = "Contact details to assist a user in finding and communicating with the publisher."]
156    pub r#contact: Vec<super::super::types::ContactDetail>,
157    #[doc = "A free text natural language description of the activity definition from a consumer's perspective."]
158    pub r#description: Option<super::super::types::Markdown>,
159    #[doc = "The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate activity definition instances."]
160    pub r#use_context: Vec<super::super::types::UsageContext>,
161    #[doc = "A legal or geographic region in which the activity definition is intended to be used."]
162    pub r#jurisdiction: Vec<super::super::types::CodeableConcept>,
163    #[doc = "Explanation of why this activity definition is needed and why it has been designed as it has."]
164    pub r#purpose: Option<super::super::types::Markdown>,
165    #[doc = "A detailed description of how the activity definition is used from a clinical perspective."]
166    pub r#usage: Option<super::super::types::Markdown>,
167    #[doc = "A copyright statement relating to the activity definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the activity definition."]
168    pub r#copyright: Option<super::super::types::Markdown>,
169    #[doc = "A short string (<50 characters), suitable for inclusion in a page footer that identifies the copyright holder, effective period, and optionally whether rights are resctricted. (e.g. 'All rights reserved', 'Some rights reserved')."]
170    pub r#copyright_label: Option<super::super::types::String>,
171    #[doc = "The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage."]
172    pub r#approval_date: Option<super::super::types::Date>,
173    #[doc = "The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date."]
174    pub r#last_review_date: Option<super::super::types::Date>,
175    #[doc = "The period during which the activity definition content was or is planned to be in active use."]
176    pub r#effective_period: Option<Box<super::super::types::Period>>,
177    #[doc = "Descriptive topics related to the content of the activity. Topics provide a high-level categorization of the activity that can be useful for filtering and searching."]
178    pub r#topic: Vec<super::super::types::CodeableConcept>,
179    #[doc = "An individiual or organization primarily involved in the creation and maintenance of the content."]
180    pub r#author: Vec<super::super::types::ContactDetail>,
181    #[doc = "An individual or organization primarily responsible for internal coherence of the content."]
182    pub r#editor: Vec<super::super::types::ContactDetail>,
183    #[doc = "An individual or organization asserted by the publisher to be primarily responsible for review of some aspect of the content."]
184    pub r#reviewer: Vec<super::super::types::ContactDetail>,
185    #[doc = "An individual or organization asserted by the publisher to be responsible for officially endorsing the content for use in some setting."]
186    pub r#endorser: Vec<super::super::types::ContactDetail>,
187    #[doc = "Related artifacts such as additional documentation, justification, or bibliographic references."]
188    pub r#related_artifact: Vec<super::super::types::RelatedArtifact>,
189    #[doc = "A reference to a Library resource containing any formal logic used by the activity definition."]
190    pub r#library: Vec<super::super::types::Canonical>,
191    #[doc = "A description of the kind of resource the activity definition is representing. For example, a MedicationRequest, a ServiceRequest, or a CommunicationRequest."]
192    pub r#kind: Option<super::super::types::Code>,
193    #[doc = "A profile to which the target of the activity definition is expected to conform."]
194    pub r#profile: Option<super::super::types::Canonical>,
195    #[doc = "Detailed description of the type of activity; e.g. What lab test, what procedure, what kind of encounter."]
196    pub r#code: Option<Box<super::super::types::CodeableConcept>>,
197    #[doc = "Indicates the level of authority/intentionality associated with the activity and where the request should fit into the workflow chain."]
198    pub r#intent: Option<super::super::types::Code>,
199    #[doc = "Indicates how quickly the activity  should be addressed with respect to other requests."]
200    pub r#priority: Option<super::super::types::Code>,
201    #[doc = "Set this to true if the definition is to indicate that a particular activity should NOT be performed. If true, this element should be interpreted to reinforce a negative coding. For example NPO as a code with a doNotPerform of true would still indicate to NOT perform the action."]
202    pub r#do_not_perform: Option<super::super::types::Boolean>,
203    #[doc = "The timing or frequency upon which the described activity is to occur."]
204    pub r#timing: Option<ActivityDefinitionTiming>,
205    #[doc = "If a CodeableConcept is present, it indicates the pre-condition for performing the service.  For example \"pain\", \"on flare-up\", etc."]
206    pub r#as_needed: Option<ActivityDefinitionAsNeeded>,
207    #[doc = "Identifies the facility where the activity will occur; e.g. home, hospital, specific clinic, etc."]
208    pub r#location: Option<Box<super::super::types::CodeableReference>>,
209    #[doc = "Indicates who should participate in performing the action described."]
210    pub r#participant: Vec<ActivityDefinitionParticipant>,
211    #[doc = "Identifies the food, drug or other product being consumed or supplied in the activity."]
212    pub r#product: Option<ActivityDefinitionProduct>,
213    #[doc = "Identifies the quantity expected to be consumed at once (per dose, per meal, etc.)."]
214    pub r#quantity: Option<Box<super::super::types::Quantity>>,
215    #[doc = "Provides detailed dosage instructions in the same way that they are described for MedicationRequest resources."]
216    pub r#dosage: Vec<super::super::types::Dosage>,
217    #[doc = "Indicates the sites on the subject's body where the procedure should be performed (I.e. the target sites)."]
218    pub r#body_site: Vec<super::super::types::CodeableConcept>,
219    #[doc = "Defines specimen requirements for the action to be performed, such as required specimens for a lab test."]
220    pub r#specimen_requirement: Vec<super::super::types::Canonical>,
221    #[doc = "Defines observation requirements for the action to be performed, such as body weight or surface area."]
222    pub r#observation_requirement: Vec<super::super::types::Canonical>,
223    #[doc = "Defines the observations that are expected to be produced by the action."]
224    pub r#observation_result_requirement: Vec<super::super::types::Canonical>,
225    #[doc = "A reference to a StructureMap resource that defines a transform that can be executed to produce the intent resource using the ActivityDefinition instance as the input."]
226    pub r#transform: Option<super::super::types::Canonical>,
227    #[doc = "Dynamic values that will be evaluated to produce values for elements of the resulting resource. For example, if the dosage of a medication must be computed based on the patient's weight, a dynamic value would be used to specify an expression that calculated the weight, and the path on the request resource that would contain the result."]
228    pub r#dynamic_value: Vec<ActivityDefinitionDynamicValue>,
229}
230#[allow(clippy::derivable_impls)]
231impl Default for ActivityDefinition {
232    fn default() -> Self {
233        Self {
234            r#id: Default::default(),
235            r#meta: Default::default(),
236            r#implicit_rules: Default::default(),
237            r#language: Default::default(),
238            r#text: Default::default(),
239            r#contained: Default::default(),
240            r#extension: Default::default(),
241            r#modifier_extension: Default::default(),
242            r#url: Default::default(),
243            r#identifier: Default::default(),
244            r#version: Default::default(),
245            r#version_algorithm: Default::default(),
246            r#name: Default::default(),
247            r#title: Default::default(),
248            r#subtitle: Default::default(),
249            r#status: super::super::types::Code {
250                id: Some("$invalid".to_string()),
251                ..Default::default()
252            },
253            r#experimental: Default::default(),
254            r#subject: Default::default(),
255            r#date: Default::default(),
256            r#publisher: Default::default(),
257            r#contact: Default::default(),
258            r#description: Default::default(),
259            r#use_context: Default::default(),
260            r#jurisdiction: Default::default(),
261            r#purpose: Default::default(),
262            r#usage: Default::default(),
263            r#copyright: Default::default(),
264            r#copyright_label: Default::default(),
265            r#approval_date: Default::default(),
266            r#last_review_date: Default::default(),
267            r#effective_period: Default::default(),
268            r#topic: Default::default(),
269            r#author: Default::default(),
270            r#editor: Default::default(),
271            r#reviewer: Default::default(),
272            r#endorser: Default::default(),
273            r#related_artifact: Default::default(),
274            r#library: Default::default(),
275            r#kind: Default::default(),
276            r#profile: Default::default(),
277            r#code: Default::default(),
278            r#intent: Default::default(),
279            r#priority: Default::default(),
280            r#do_not_perform: Default::default(),
281            r#timing: Default::default(),
282            r#as_needed: Default::default(),
283            r#location: Default::default(),
284            r#participant: Default::default(),
285            r#product: Default::default(),
286            r#quantity: Default::default(),
287            r#dosage: Default::default(),
288            r#body_site: Default::default(),
289            r#specimen_requirement: Default::default(),
290            r#observation_requirement: Default::default(),
291            r#observation_result_requirement: Default::default(),
292            r#transform: Default::default(),
293            r#dynamic_value: Default::default(),
294        }
295    }
296}