1#[doc = "Indicates the mechanism used to compare versions to determine which is more current."]
3#[derive(Default, Debug, Clone, PartialEq)]
4pub enum StructureDefinitionVersionAlgorithm {
5 String(super::super::types::String),
6 Coding(Box<super::super::types::Coding>),
7 #[default]
8 Invalid,
9}
10#[doc = "An external specification that the content is mapped to."]
11#[derive(Debug, Clone, PartialEq)]
12pub struct StructureDefinitionMapping {
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 = "An Internal id that is used to identify this mapping set when specific mappings are made."]
20 pub r#identity: super::super::types::Id,
21 #[doc = "An absolute URI that identifies the specification that this mapping is expressed to."]
22 pub r#uri: Option<super::super::types::Uri>,
23 #[doc = "A name for the specification that is being mapped to."]
24 pub r#name: Option<super::super::types::String>,
25 #[doc = "Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage."]
26 pub r#comment: Option<super::super::types::String>,
27}
28#[allow(clippy::derivable_impls)]
29impl Default for StructureDefinitionMapping {
30 fn default() -> Self {
31 Self {
32 r#id: Default::default(),
33 r#extension: Default::default(),
34 r#modifier_extension: Default::default(),
35 r#identity: super::super::types::Id {
36 id: Some("$invalid".to_string()),
37 ..Default::default()
38 },
39 r#uri: Default::default(),
40 r#name: Default::default(),
41 r#comment: Default::default(),
42 }
43 }
44}
45#[doc = "Identifies the types of resource or data type elements to which the extension can be applied. For more guidance on using the 'context' element, see the [defining extensions page](defining-extensions.html#context)."]
46#[derive(Debug, Clone, PartialEq)]
47pub struct StructureDefinitionContext {
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 = "Defines how to interpret the expression that defines what the context of the extension is."]
55 pub r#type: super::super::types::Code,
56 #[doc = "An expression that defines where an extension can be used in resources."]
57 pub r#expression: super::super::types::String,
58}
59#[allow(clippy::derivable_impls)]
60impl Default for StructureDefinitionContext {
61 fn default() -> Self {
62 Self {
63 r#id: Default::default(),
64 r#extension: Default::default(),
65 r#modifier_extension: Default::default(),
66 r#type: super::super::types::Code {
67 id: Some("$invalid".to_string()),
68 ..Default::default()
69 },
70 r#expression: super::super::types::String {
71 id: Some("$invalid".to_string()),
72 ..Default::default()
73 },
74 }
75 }
76}
77#[doc = "A snapshot view is expressed in a standalone form that can be used and interpreted without considering the base StructureDefinition."]
78#[derive(Debug, Clone, PartialEq)]
79pub struct StructureDefinitionSnapshot {
80 #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
81 pub r#id: Option<std::string::String>,
82 #[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."]
83 pub r#extension: Vec<super::super::types::Extension>,
84 #[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)."]
85 pub r#modifier_extension: Vec<super::super::types::Extension>,
86 #[doc = "Captures constraints on each element within the resource."]
87 pub r#element: Vec<super::super::types::ElementDefinition>,
88}
89#[allow(clippy::derivable_impls)]
90impl Default for StructureDefinitionSnapshot {
91 fn default() -> Self {
92 Self {
93 r#id: Default::default(),
94 r#extension: Default::default(),
95 r#modifier_extension: Default::default(),
96 r#element: Default::default(),
97 }
98 }
99}
100#[doc = "A differential view is expressed relative to the base StructureDefinition - a statement of differences that it applies."]
101#[derive(Debug, Clone, PartialEq)]
102pub struct StructureDefinitionDifferential {
103 #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
104 pub r#id: Option<std::string::String>,
105 #[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."]
106 pub r#extension: Vec<super::super::types::Extension>,
107 #[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)."]
108 pub r#modifier_extension: Vec<super::super::types::Extension>,
109 #[doc = "Captures constraints on each element within the resource."]
110 pub r#element: Vec<super::super::types::ElementDefinition>,
111}
112#[allow(clippy::derivable_impls)]
113impl Default for StructureDefinitionDifferential {
114 fn default() -> Self {
115 Self {
116 r#id: Default::default(),
117 r#extension: Default::default(),
118 r#modifier_extension: Default::default(),
119 r#element: Default::default(),
120 }
121 }
122}
123#[doc = "A definition of a FHIR structure. This resource is used to describe the underlying resources, data types defined in FHIR, and also for describing extensions and constraints on resources and data types."]
124#[derive(Debug, Clone, PartialEq)]
125pub struct StructureDefinition {
126 #[doc = "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes."]
127 pub r#id: Option<super::super::types::Id>,
128 #[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."]
129 pub r#meta: Option<Box<super::super::types::Meta>>,
130 #[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."]
131 pub r#implicit_rules: Option<super::super::types::Uri>,
132 #[doc = "The base language in which the resource is written."]
133 pub r#language: Option<super::super::types::Code>,
134 #[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."]
135 pub r#text: Option<Box<super::super::types::Narrative>>,
136 #[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."]
137 pub r#contained: Vec<super::super::Resource>,
138 #[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."]
139 pub r#extension: Vec<super::super::types::Extension>,
140 #[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)."]
141 pub r#modifier_extension: Vec<super::super::types::Extension>,
142 #[doc = "An absolute URI that is used to identify this structure 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 structure definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the structure definition is stored on different servers."]
143 pub r#url: super::super::types::Uri,
144 #[doc = "A formal identifier that is used to identify this structure definition when it is represented in other formats, or referenced in a specification, model, design or an instance."]
145 pub r#identifier: Vec<super::super::types::Identifier>,
146 #[doc = "The identifier that is used to identify this version of the structure definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the structure definition author and is not expected to be globally unique. There is no expectation that versions can be placed in a lexicographical sequence, so authors are encouraged to populate the StructureDefinition.versionAlgorithm\\[x\\] element to enable comparisons. If there is no managed version available, authors can consider using ISO date/time syntax (e.g., '2023-01-01')."]
147 pub r#version: Option<super::super::types::String>,
148 #[doc = "Indicates the mechanism used to compare versions to determine which is more current."]
149 pub r#version_algorithm: Option<StructureDefinitionVersionAlgorithm>,
150 #[doc = "A natural language name identifying the structure definition. This name should be usable as an identifier for the module by machine processing applications such as code generation."]
151 pub r#name: super::super::types::String,
152 #[doc = "A short, descriptive, user-friendly title for the structure definition."]
153 pub r#title: Option<super::super::types::String>,
154 #[doc = "The status of this structure definition. Enables tracking the life-cycle of the content."]
155 pub r#status: super::super::types::Code,
156 #[doc = "A Boolean value to indicate that this structure definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage."]
157 pub r#experimental: Option<super::super::types::Boolean>,
158 #[doc = "The date (and optionally time) when the structure 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 structure definition changes."]
159 pub r#date: Option<super::super::types::DateTime>,
160 #[doc = "The name of the organization or individual responsible for the release and ongoing maintenance of the structure definition."]
161 pub r#publisher: Option<super::super::types::String>,
162 #[doc = "Contact details to assist a user in finding and communicating with the publisher."]
163 pub r#contact: Vec<super::super::types::ContactDetail>,
164 #[doc = "A free text natural language description of the structure definition from a consumer's perspective."]
165 pub r#description: Option<super::super::types::Markdown>,
166 #[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 structure definition instances."]
167 pub r#use_context: Vec<super::super::types::UsageContext>,
168 #[doc = "A legal or geographic region in which the structure definition is intended to be used."]
169 pub r#jurisdiction: Vec<super::super::types::CodeableConcept>,
170 #[doc = "Explanation of why this structure definition is needed and why it has been designed as it has."]
171 pub r#purpose: Option<super::super::types::Markdown>,
172 #[doc = "A copyright statement relating to the structure definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the structure definition. The short copyright declaration (e.g. (c) '2015+ xyz organization' should be sent in the copyrightLabel element."]
173 pub r#copyright: Option<super::super::types::Markdown>,
174 #[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')."]
175 pub r#copyright_label: Option<super::super::types::String>,
176 #[doc = "(DEPRECATED) A set of key words or terms from external terminologies that may be used to assist with indexing and searching of templates nby describing the use of this structure definition, or the content it describes."]
177 pub r#keyword: Vec<super::super::types::Coding>,
178 #[doc = "The version of the FHIR specification on which this StructureDefinition is based - this is the formal version of the specification, without the revision number, e.g. `publication`.`major`.`minor`, which is 4.6.0. for this version."]
179 pub r#fhir_version: Option<super::super::types::Code>,
180 #[doc = "An external specification that the content is mapped to."]
181 pub r#mapping: Vec<StructureDefinitionMapping>,
182 #[doc = "Defines the kind of structure that this definition is describing."]
183 pub r#kind: super::super::types::Code,
184 #[doc = "Whether structure this definition describes is abstract or not - that is, whether the structure is not intended to be instantiated. For Resources and Data types, abstract types will never be exchanged between systems."]
185 pub r#abstract: super::super::types::Boolean,
186 #[doc = "Identifies the types of resource or data type elements to which the extension can be applied. For more guidance on using the 'context' element, see the [defining extensions page](defining-extensions.html#context)."]
187 pub r#context: Vec<StructureDefinitionContext>,
188 #[doc = "A set of rules as FHIRPath Invariants about when the extension can be used (e.g. co-occurrence variants for the extension). All the rules must be true."]
189 pub r#context_invariant: Vec<super::super::types::String>,
190 #[doc = "The type this structure describes. If the derivation kind is 'specialization' then this is the master definition for a type, and there is always one of these (a data type, an extension, a resource, including abstract ones). Otherwise the structure definition is a constraint on the stated type (and in this case, the type cannot be an abstract type). References are URLs that are relative to <http://hl7.org/fhir/StructureDefinition> e.g. \"string\" is a reference to <http://hl7.org/fhir/StructureDefinition/string>. Absolute URLs are only allowed in logical models, where they are required."]
191 pub r#type: super::super::types::Uri,
192 #[doc = "An absolute URI that is the base structure from which this type is derived, either by specialization or constraint."]
193 pub r#base_definition: Option<super::super::types::Canonical>,
194 #[doc = "How the type relates to the baseDefinition."]
195 pub r#derivation: Option<super::super::types::Code>,
196 #[doc = "A snapshot view is expressed in a standalone form that can be used and interpreted without considering the base StructureDefinition."]
197 pub r#snapshot: Option<StructureDefinitionSnapshot>,
198 #[doc = "A differential view is expressed relative to the base StructureDefinition - a statement of differences that it applies."]
199 pub r#differential: Option<StructureDefinitionDifferential>,
200}
201#[allow(clippy::derivable_impls)]
202impl Default for StructureDefinition {
203 fn default() -> Self {
204 Self {
205 r#id: Default::default(),
206 r#meta: Default::default(),
207 r#implicit_rules: Default::default(),
208 r#language: Default::default(),
209 r#text: Default::default(),
210 r#contained: Default::default(),
211 r#extension: Default::default(),
212 r#modifier_extension: Default::default(),
213 r#url: super::super::types::Uri {
214 id: Some("$invalid".to_string()),
215 ..Default::default()
216 },
217 r#identifier: Default::default(),
218 r#version: Default::default(),
219 r#version_algorithm: Default::default(),
220 r#name: super::super::types::String {
221 id: Some("$invalid".to_string()),
222 ..Default::default()
223 },
224 r#title: Default::default(),
225 r#status: super::super::types::Code {
226 id: Some("$invalid".to_string()),
227 ..Default::default()
228 },
229 r#experimental: Default::default(),
230 r#date: Default::default(),
231 r#publisher: Default::default(),
232 r#contact: Default::default(),
233 r#description: Default::default(),
234 r#use_context: Default::default(),
235 r#jurisdiction: Default::default(),
236 r#purpose: Default::default(),
237 r#copyright: Default::default(),
238 r#copyright_label: Default::default(),
239 r#keyword: Default::default(),
240 r#fhir_version: Default::default(),
241 r#mapping: Default::default(),
242 r#kind: super::super::types::Code {
243 id: Some("$invalid".to_string()),
244 ..Default::default()
245 },
246 r#abstract: super::super::types::Boolean {
247 id: Some("$invalid".to_string()),
248 ..Default::default()
249 },
250 r#context: Default::default(),
251 r#context_invariant: Default::default(),
252 r#type: super::super::types::Uri {
253 id: Some("$invalid".to_string()),
254 ..Default::default()
255 },
256 r#base_definition: Default::default(),
257 r#derivation: Default::default(),
258 r#snapshot: Default::default(),
259 r#differential: Default::default(),
260 }
261 }
262}