fhirbolt_model/generated/r5/resources/
compartment_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 CompartmentDefinitionVersionAlgorithm {
5    String(super::super::types::String),
6    Coding(Box<super::super::types::Coding>),
7    #[default]
8    Invalid,
9}
10#[doc = "Information about how a resource is related to the compartment."]
11#[derive(Debug, Clone, PartialEq)]
12pub struct CompartmentDefinitionResource {
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 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."]
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 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)."]
18    pub r#modifier_extension: Vec<super::super::types::Extension>,
19    #[doc = "The name of a resource supported by the server."]
20    pub r#code: super::super::types::Code,
21    #[doc = "The name of a search parameter that represents the link to the compartment. More than one may be listed because a resource may be linked to a compartment in more than one way,."]
22    pub r#param: Vec<super::super::types::String>,
23    #[doc = "Additional documentation about the resource and compartment."]
24    pub r#documentation: Option<super::super::types::String>,
25    #[doc = "Search Parameter for mapping requests made with $everything.start (e.g. on [Patient.$everything](patient-operation-everything.html))."]
26    pub r#start_param: Option<super::super::types::Uri>,
27    #[doc = "Search Parameter for mapping requests made with $everything.end (e.g. on [Patient.$everything](patient-operation-everything.html))."]
28    pub r#end_param: Option<super::super::types::Uri>,
29}
30#[allow(clippy::derivable_impls)]
31impl Default for CompartmentDefinitionResource {
32    fn default() -> Self {
33        Self {
34            r#id: Default::default(),
35            r#extension: Default::default(),
36            r#modifier_extension: Default::default(),
37            r#code: super::super::types::Code {
38                id: Some("$invalid".to_string()),
39                ..Default::default()
40            },
41            r#param: Default::default(),
42            r#documentation: Default::default(),
43            r#start_param: Default::default(),
44            r#end_param: Default::default(),
45        }
46    }
47}
48#[doc = "A compartment definition that defines how resources are accessed on a server."]
49#[derive(Debug, Clone, PartialEq)]
50pub struct CompartmentDefinition {
51    #[doc = "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes."]
52    pub r#id: Option<super::super::types::Id>,
53    #[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."]
54    pub r#meta: Option<Box<super::super::types::Meta>>,
55    #[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."]
56    pub r#implicit_rules: Option<super::super::types::Uri>,
57    #[doc = "The base language in which the resource is written."]
58    pub r#language: Option<super::super::types::Code>,
59    #[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."]
60    pub r#text: Option<Box<super::super::types::Narrative>>,
61    #[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."]
62    pub r#contained: Vec<super::super::Resource>,
63    #[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."]
64    pub r#extension: Vec<super::super::types::Extension>,
65    #[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)."]
66    pub r#modifier_extension: Vec<super::super::types::Extension>,
67    #[doc = "An absolute URI that is used to identify this compartment 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 compartment definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the compartment definition is stored on different servers."]
68    pub r#url: super::super::types::Uri,
69    #[doc = "The identifier that is used to identify this version of the compartment definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the compartment 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."]
70    pub r#version: Option<super::super::types::String>,
71    #[doc = "Indicates the mechanism used to compare versions to determine which is more current."]
72    pub r#version_algorithm: Option<CompartmentDefinitionVersionAlgorithm>,
73    #[doc = "A natural language name identifying the compartment definition. This name should be usable as an identifier for the module by machine processing applications such as code generation."]
74    pub r#name: super::super::types::String,
75    #[doc = "A short, descriptive, user-friendly title for the capability statement."]
76    pub r#title: Option<super::super::types::String>,
77    #[doc = "The status of this compartment definition. Enables tracking the life-cycle of the content."]
78    pub r#status: super::super::types::Code,
79    #[doc = "A Boolean value to indicate that this compartment definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage."]
80    pub r#experimental: Option<super::super::types::Boolean>,
81    #[doc = "The date  (and optionally time) when the compartment 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 compartment definition changes."]
82    pub r#date: Option<super::super::types::DateTime>,
83    #[doc = "The name of the organization or individual responsible for the release and ongoing maintenance of the compartment definition."]
84    pub r#publisher: Option<super::super::types::String>,
85    #[doc = "Contact details to assist a user in finding and communicating with the publisher."]
86    pub r#contact: Vec<super::super::types::ContactDetail>,
87    #[doc = "A free text natural language description of the compartment definition from a consumer's perspective."]
88    pub r#description: Option<super::super::types::Markdown>,
89    #[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 compartment definition instances."]
90    pub r#use_context: Vec<super::super::types::UsageContext>,
91    #[doc = "Explanation of why this compartment definition is needed and why it has been designed as it has."]
92    pub r#purpose: Option<super::super::types::Markdown>,
93    #[doc = "Which compartment this definition describes."]
94    pub r#code: super::super::types::Code,
95    #[doc = "Whether the search syntax is supported,."]
96    pub r#search: super::super::types::Boolean,
97    #[doc = "Information about how a resource is related to the compartment."]
98    pub r#resource: Vec<CompartmentDefinitionResource>,
99}
100#[allow(clippy::derivable_impls)]
101impl Default for CompartmentDefinition {
102    fn default() -> Self {
103        Self {
104            r#id: Default::default(),
105            r#meta: Default::default(),
106            r#implicit_rules: Default::default(),
107            r#language: Default::default(),
108            r#text: Default::default(),
109            r#contained: Default::default(),
110            r#extension: Default::default(),
111            r#modifier_extension: Default::default(),
112            r#url: super::super::types::Uri {
113                id: Some("$invalid".to_string()),
114                ..Default::default()
115            },
116            r#version: Default::default(),
117            r#version_algorithm: Default::default(),
118            r#name: super::super::types::String {
119                id: Some("$invalid".to_string()),
120                ..Default::default()
121            },
122            r#title: Default::default(),
123            r#status: super::super::types::Code {
124                id: Some("$invalid".to_string()),
125                ..Default::default()
126            },
127            r#experimental: Default::default(),
128            r#date: Default::default(),
129            r#publisher: Default::default(),
130            r#contact: Default::default(),
131            r#description: Default::default(),
132            r#use_context: Default::default(),
133            r#purpose: Default::default(),
134            r#code: super::super::types::Code {
135                id: Some("$invalid".to_string()),
136                ..Default::default()
137            },
138            r#search: super::super::types::Boolean {
139                id: Some("$invalid".to_string()),
140                ..Default::default()
141            },
142            r#resource: Default::default(),
143        }
144    }
145}