1#[doc = "An external specification that the content is mapped to."]
3#[derive(Debug, Clone, PartialEq)]
4pub struct StructureDefinitionMapping {
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 = "An Internal id that is used to identify this mapping set when specific mappings are made."]
12 pub r#identity: super::super::types::Id,
13 #[doc = "An absolute URI that identifies the specification that this mapping is expressed to."]
14 pub r#uri: Option<super::super::types::Uri>,
15 #[doc = "A name for the specification that is being mapped to."]
16 pub r#name: Option<super::super::types::String>,
17 #[doc = "Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage."]
18 pub r#comment: Option<super::super::types::String>,
19}
20#[allow(clippy::derivable_impls)]
21impl Default for StructureDefinitionMapping {
22 fn default() -> Self {
23 Self {
24 r#id: Default::default(),
25 r#extension: Default::default(),
26 r#modifier_extension: Default::default(),
27 r#identity: super::super::types::Id {
28 id: Some("$invalid".to_string()),
29 ..Default::default()
30 },
31 r#uri: Default::default(),
32 r#name: Default::default(),
33 r#comment: Default::default(),
34 }
35 }
36}
37#[doc = "Identifies the types of resource or data type elements to which the extension can be applied."]
38#[derive(Debug, Clone, PartialEq)]
39pub struct StructureDefinitionContext {
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 = "Defines how to interpret the expression that defines what the context of the extension is."]
47 pub r#type: super::super::types::Code,
48 #[doc = "An expression that defines where an extension can be used in resources."]
49 pub r#expression: super::super::types::String,
50}
51#[allow(clippy::derivable_impls)]
52impl Default for StructureDefinitionContext {
53 fn default() -> Self {
54 Self {
55 r#id: Default::default(),
56 r#extension: Default::default(),
57 r#modifier_extension: Default::default(),
58 r#type: super::super::types::Code {
59 id: Some("$invalid".to_string()),
60 ..Default::default()
61 },
62 r#expression: super::super::types::String {
63 id: Some("$invalid".to_string()),
64 ..Default::default()
65 },
66 }
67 }
68}
69#[doc = "A snapshot view is expressed in a standalone form that can be used and interpreted without considering the base StructureDefinition."]
70#[derive(Debug, Clone, PartialEq)]
71pub struct StructureDefinitionSnapshot {
72 #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
73 pub r#id: Option<std::string::String>,
74 #[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."]
75 pub r#extension: Vec<super::super::types::Extension>,
76 #[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)."]
77 pub r#modifier_extension: Vec<super::super::types::Extension>,
78 #[doc = "Captures constraints on each element within the resource."]
79 pub r#element: Vec<super::super::types::ElementDefinition>,
80}
81#[allow(clippy::derivable_impls)]
82impl Default for StructureDefinitionSnapshot {
83 fn default() -> Self {
84 Self {
85 r#id: Default::default(),
86 r#extension: Default::default(),
87 r#modifier_extension: Default::default(),
88 r#element: Default::default(),
89 }
90 }
91}
92#[doc = "A differential view is expressed relative to the base StructureDefinition - a statement of differences that it applies."]
93#[derive(Debug, Clone, PartialEq)]
94pub struct StructureDefinitionDifferential {
95 #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
96 pub r#id: Option<std::string::String>,
97 #[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."]
98 pub r#extension: Vec<super::super::types::Extension>,
99 #[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)."]
100 pub r#modifier_extension: Vec<super::super::types::Extension>,
101 #[doc = "Captures constraints on each element within the resource."]
102 pub r#element: Vec<super::super::types::ElementDefinition>,
103}
104#[allow(clippy::derivable_impls)]
105impl Default for StructureDefinitionDifferential {
106 fn default() -> Self {
107 Self {
108 r#id: Default::default(),
109 r#extension: Default::default(),
110 r#modifier_extension: Default::default(),
111 r#element: Default::default(),
112 }
113 }
114}
115#[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."]
116#[derive(Debug, Clone, PartialEq)]
117pub struct StructureDefinition {
118 #[doc = "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes."]
119 pub r#id: Option<super::super::types::Id>,
120 #[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."]
121 pub r#meta: Option<Box<super::super::types::Meta>>,
122 #[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."]
123 pub r#implicit_rules: Option<super::super::types::Uri>,
124 #[doc = "The base language in which the resource is written."]
125 pub r#language: Option<super::super::types::Code>,
126 #[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."]
127 pub r#text: Option<Box<super::super::types::Narrative>>,
128 #[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."]
129 pub r#contained: Vec<super::super::Resource>,
130 #[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."]
131 pub r#extension: Vec<super::super::types::Extension>,
132 #[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)."]
133 pub r#modifier_extension: Vec<super::super::types::Extension>,
134 #[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 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."]
135 pub r#url: super::super::types::Uri,
136 #[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."]
137 pub r#identifier: Vec<super::super::types::Identifier>,
138 #[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. 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."]
139 pub r#version: Option<super::super::types::String>,
140 #[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."]
141 pub r#name: super::super::types::String,
142 #[doc = "A short, descriptive, user-friendly title for the structure definition."]
143 pub r#title: Option<super::super::types::String>,
144 #[doc = "The status of this structure definition. Enables tracking the life-cycle of the content."]
145 pub r#status: super::super::types::Code,
146 #[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."]
147 pub r#experimental: Option<super::super::types::Boolean>,
148 #[doc = "The date (and optionally time) when the structure definition was published. 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."]
149 pub r#date: Option<super::super::types::DateTime>,
150 #[doc = "The name of the organization or individual that published the structure definition."]
151 pub r#publisher: Option<super::super::types::String>,
152 #[doc = "Contact details to assist a user in finding and communicating with the publisher."]
153 pub r#contact: Vec<super::super::types::ContactDetail>,
154 #[doc = "A free text natural language description of the structure definition from a consumer's perspective."]
155 pub r#description: Option<super::super::types::Markdown>,
156 #[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."]
157 pub r#use_context: Vec<super::super::types::UsageContext>,
158 #[doc = "A legal or geographic region in which the structure definition is intended to be used."]
159 pub r#jurisdiction: Vec<super::super::types::CodeableConcept>,
160 #[doc = "Explanation of why this structure definition is needed and why it has been designed as it has."]
161 pub r#purpose: Option<super::super::types::Markdown>,
162 #[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."]
163 pub r#copyright: Option<super::super::types::Markdown>,
164 #[doc = "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."]
165 pub r#keyword: Vec<super::super::types::Coding>,
166 #[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.3.0 for this version."]
167 pub r#fhir_version: Option<super::super::types::Code>,
168 #[doc = "An external specification that the content is mapped to."]
169 pub r#mapping: Vec<StructureDefinitionMapping>,
170 #[doc = "Defines the kind of structure that this definition is describing."]
171 pub r#kind: super::super::types::Code,
172 #[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."]
173 pub r#abstract: super::super::types::Boolean,
174 #[doc = "Identifies the types of resource or data type elements to which the extension can be applied."]
175 pub r#context: Vec<StructureDefinitionContext>,
176 #[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."]
177 pub r#context_invariant: Vec<super::super::types::String>,
178 #[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."]
179 pub r#type: super::super::types::Uri,
180 #[doc = "An absolute URI that is the base structure from which this type is derived, either by specialization or constraint."]
181 pub r#base_definition: Option<super::super::types::Canonical>,
182 #[doc = "How the type relates to the baseDefinition."]
183 pub r#derivation: Option<super::super::types::Code>,
184 #[doc = "A snapshot view is expressed in a standalone form that can be used and interpreted without considering the base StructureDefinition."]
185 pub r#snapshot: Option<StructureDefinitionSnapshot>,
186 #[doc = "A differential view is expressed relative to the base StructureDefinition - a statement of differences that it applies."]
187 pub r#differential: Option<StructureDefinitionDifferential>,
188}
189#[allow(clippy::derivable_impls)]
190impl Default for StructureDefinition {
191 fn default() -> Self {
192 Self {
193 r#id: Default::default(),
194 r#meta: Default::default(),
195 r#implicit_rules: Default::default(),
196 r#language: Default::default(),
197 r#text: Default::default(),
198 r#contained: Default::default(),
199 r#extension: Default::default(),
200 r#modifier_extension: Default::default(),
201 r#url: super::super::types::Uri {
202 id: Some("$invalid".to_string()),
203 ..Default::default()
204 },
205 r#identifier: Default::default(),
206 r#version: Default::default(),
207 r#name: super::super::types::String {
208 id: Some("$invalid".to_string()),
209 ..Default::default()
210 },
211 r#title: Default::default(),
212 r#status: super::super::types::Code {
213 id: Some("$invalid".to_string()),
214 ..Default::default()
215 },
216 r#experimental: Default::default(),
217 r#date: Default::default(),
218 r#publisher: Default::default(),
219 r#contact: Default::default(),
220 r#description: Default::default(),
221 r#use_context: Default::default(),
222 r#jurisdiction: Default::default(),
223 r#purpose: Default::default(),
224 r#copyright: Default::default(),
225 r#keyword: Default::default(),
226 r#fhir_version: Default::default(),
227 r#mapping: Default::default(),
228 r#kind: super::super::types::Code {
229 id: Some("$invalid".to_string()),
230 ..Default::default()
231 },
232 r#abstract: super::super::types::Boolean {
233 id: Some("$invalid".to_string()),
234 ..Default::default()
235 },
236 r#context: Default::default(),
237 r#context_invariant: Default::default(),
238 r#type: super::super::types::Uri {
239 id: Some("$invalid".to_string()),
240 ..Default::default()
241 },
242 r#base_definition: Default::default(),
243 r#derivation: Default::default(),
244 r#snapshot: Default::default(),
245 r#differential: Default::default(),
246 }
247 }
248}