fhirbolt_model/generated/r5/resources/
code_system.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 CodeSystem is more current."]
3#[derive(Default, Debug, Clone, PartialEq)]
4pub enum CodeSystemVersionAlgorithm {
5    String(super::super::types::String),
6    Coding(Box<super::super::types::Coding>),
7    #[default]
8    Invalid,
9}
10#[doc = "The value of this property."]
11#[derive(Default, Debug, Clone, PartialEq)]
12pub enum CodeSystemConceptPropertyValue {
13    Code(super::super::types::Code),
14    Coding(Box<super::super::types::Coding>),
15    String(super::super::types::String),
16    Integer(super::super::types::Integer),
17    Boolean(super::super::types::Boolean),
18    DateTime(super::super::types::DateTime),
19    Decimal(super::super::types::Decimal),
20    #[default]
21    Invalid,
22}
23#[doc = "A filter that can be used in a value set compose statement when selecting concepts using a filter."]
24#[derive(Debug, Clone, PartialEq)]
25pub struct CodeSystemFilter {
26    #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
27    pub r#id: Option<std::string::String>,
28    #[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."]
29    pub r#extension: Vec<super::super::types::Extension>,
30    #[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)."]
31    pub r#modifier_extension: Vec<super::super::types::Extension>,
32    #[doc = "The code that identifies this filter when it is used as a filter in [ValueSet](valueset.html#).compose.include.filter."]
33    pub r#code: super::super::types::Code,
34    #[doc = "A description of how or why the filter is used."]
35    pub r#description: Option<super::super::types::String>,
36    #[doc = "A list of operators that can be used with the filter."]
37    pub r#operator: Vec<super::super::types::Code>,
38    #[doc = "A description of what the value for the filter should be."]
39    pub r#value: super::super::types::String,
40}
41#[allow(clippy::derivable_impls)]
42impl Default for CodeSystemFilter {
43    fn default() -> Self {
44        Self {
45            r#id: Default::default(),
46            r#extension: Default::default(),
47            r#modifier_extension: Default::default(),
48            r#code: super::super::types::Code {
49                id: Some("$invalid".to_string()),
50                ..Default::default()
51            },
52            r#description: Default::default(),
53            r#operator: Default::default(),
54            r#value: super::super::types::String {
55                id: Some("$invalid".to_string()),
56                ..Default::default()
57            },
58        }
59    }
60}
61#[doc = "A property defines an additional slot through which additional information can be provided about a concept."]
62#[derive(Debug, Clone, PartialEq)]
63pub struct CodeSystemProperty {
64    #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
65    pub r#id: Option<std::string::String>,
66    #[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."]
67    pub r#extension: Vec<super::super::types::Extension>,
68    #[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)."]
69    pub r#modifier_extension: Vec<super::super::types::Extension>,
70    #[doc = "A code that is used to identify the property. The code is used internally (in CodeSystem.concept.property.code) and also externally, such as in property filters."]
71    pub r#code: super::super::types::Code,
72    #[doc = "Reference to the formal meaning of the property. One possible source of meaning is the [Concept Properties](https://hl7.org/FHIR/codesystem-concept-properties.html)) code system."]
73    pub r#uri: Option<super::super::types::Uri>,
74    #[doc = "A description of the property- why it is defined, and how its value might be used."]
75    pub r#description: Option<super::super::types::String>,
76    #[doc = "The type of the property value. Properties of type \"code\" contain a code defined by the code system (e.g. a reference to another defined concept)."]
77    pub r#type: super::super::types::Code,
78}
79#[allow(clippy::derivable_impls)]
80impl Default for CodeSystemProperty {
81    fn default() -> Self {
82        Self {
83            r#id: Default::default(),
84            r#extension: Default::default(),
85            r#modifier_extension: Default::default(),
86            r#code: super::super::types::Code {
87                id: Some("$invalid".to_string()),
88                ..Default::default()
89            },
90            r#uri: Default::default(),
91            r#description: Default::default(),
92            r#type: super::super::types::Code {
93                id: Some("$invalid".to_string()),
94                ..Default::default()
95            },
96        }
97    }
98}
99#[doc = "Additional representations for the concept - other languages, aliases, specialized purposes, used for particular purposes, etc."]
100#[derive(Debug, Clone, PartialEq)]
101pub struct CodeSystemConceptDesignation {
102    #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
103    pub r#id: Option<std::string::String>,
104    #[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."]
105    pub r#extension: Vec<super::super::types::Extension>,
106    #[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)."]
107    pub r#modifier_extension: Vec<super::super::types::Extension>,
108    #[doc = "The language this designation is defined for."]
109    pub r#language: Option<super::super::types::Code>,
110    #[doc = "A code that details how this designation would be used."]
111    pub r#use: Option<Box<super::super::types::Coding>>,
112    #[doc = "Additional codes that detail how this designation would be used, if there is more than one use."]
113    pub r#additional_use: Vec<super::super::types::Coding>,
114    #[doc = "The text value for this designation."]
115    pub r#value: super::super::types::String,
116}
117#[allow(clippy::derivable_impls)]
118impl Default for CodeSystemConceptDesignation {
119    fn default() -> Self {
120        Self {
121            r#id: Default::default(),
122            r#extension: Default::default(),
123            r#modifier_extension: Default::default(),
124            r#language: Default::default(),
125            r#use: Default::default(),
126            r#additional_use: Default::default(),
127            r#value: super::super::types::String {
128                id: Some("$invalid".to_string()),
129                ..Default::default()
130            },
131        }
132    }
133}
134#[doc = "A property value for this concept."]
135#[derive(Debug, Clone, PartialEq)]
136pub struct CodeSystemConceptProperty {
137    #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
138    pub r#id: Option<std::string::String>,
139    #[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."]
140    pub r#extension: Vec<super::super::types::Extension>,
141    #[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)."]
142    pub r#modifier_extension: Vec<super::super::types::Extension>,
143    #[doc = "A code that is a reference to CodeSystem.property.code."]
144    pub r#code: super::super::types::Code,
145    #[doc = "The value of this property."]
146    pub r#value: CodeSystemConceptPropertyValue,
147}
148#[allow(clippy::derivable_impls)]
149impl Default for CodeSystemConceptProperty {
150    fn default() -> Self {
151        Self {
152            r#id: Default::default(),
153            r#extension: Default::default(),
154            r#modifier_extension: Default::default(),
155            r#code: super::super::types::Code {
156                id: Some("$invalid".to_string()),
157                ..Default::default()
158            },
159            r#value: Default::default(),
160        }
161    }
162}
163#[doc = "Concepts that are in the code system. The concept definitions are inherently hierarchical, but the definitions must be consulted to determine what the meanings of the hierarchical relationships are."]
164#[derive(Debug, Clone, PartialEq)]
165pub struct CodeSystemConcept {
166    #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
167    pub r#id: Option<std::string::String>,
168    #[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."]
169    pub r#extension: Vec<super::super::types::Extension>,
170    #[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)."]
171    pub r#modifier_extension: Vec<super::super::types::Extension>,
172    #[doc = "A code - a text symbol - that uniquely identifies the concept within the code system."]
173    pub r#code: super::super::types::Code,
174    #[doc = "A human readable string that is the recommended default way to present this concept to a user."]
175    pub r#display: Option<super::super::types::String>,
176    #[doc = "The formal definition of the concept. The code system resource does not make formal definitions required, because of the prevalence of legacy systems. However, they are highly recommended, as without them there is no formal meaning associated with the concept."]
177    pub r#definition: Option<super::super::types::String>,
178    #[doc = "Additional representations for the concept - other languages, aliases, specialized purposes, used for particular purposes, etc."]
179    pub r#designation: Vec<CodeSystemConceptDesignation>,
180    #[doc = "A property value for this concept."]
181    pub r#property: Vec<CodeSystemConceptProperty>,
182    #[doc = "Defines children of a concept to produce a hierarchy of concepts. The nature of the relationships is variable (is-a/contains/categorizes) - see hierarchyMeaning."]
183    pub r#concept: Vec<CodeSystemConcept>,
184}
185#[allow(clippy::derivable_impls)]
186impl Default for CodeSystemConcept {
187    fn default() -> Self {
188        Self {
189            r#id: Default::default(),
190            r#extension: Default::default(),
191            r#modifier_extension: Default::default(),
192            r#code: super::super::types::Code {
193                id: Some("$invalid".to_string()),
194                ..Default::default()
195            },
196            r#display: Default::default(),
197            r#definition: Default::default(),
198            r#designation: Default::default(),
199            r#property: Default::default(),
200            r#concept: Default::default(),
201        }
202    }
203}
204#[doc = "The CodeSystem resource is used to declare the existence of and describe a code system or code system supplement and its key properties, and optionally define a part or all of its content."]
205#[derive(Debug, Clone, PartialEq)]
206pub struct CodeSystem {
207    #[doc = "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes."]
208    pub r#id: Option<super::super::types::Id>,
209    #[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."]
210    pub r#meta: Option<Box<super::super::types::Meta>>,
211    #[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."]
212    pub r#implicit_rules: Option<super::super::types::Uri>,
213    #[doc = "The base language in which the resource is written."]
214    pub r#language: Option<super::super::types::Code>,
215    #[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."]
216    pub r#text: Option<Box<super::super::types::Narrative>>,
217    #[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."]
218    pub r#contained: Vec<super::super::Resource>,
219    #[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."]
220    pub r#extension: Vec<super::super::types::Extension>,
221    #[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)."]
222    pub r#modifier_extension: Vec<super::super::types::Extension>,
223    #[doc = "An absolute URI that is used to identify this code system 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 code system is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the code system is stored on different servers. This is used in [Coding](datatypes.html#Coding).system."]
224    pub r#url: Option<super::super::types::Uri>,
225    #[doc = "A formal identifier that is used to identify this code system when it is represented in other formats, or referenced in a specification, model, design or an instance."]
226    pub r#identifier: Vec<super::super::types::Identifier>,
227    #[doc = "The identifier that is used to identify this version of the code system when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the code system 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. This is used in [Coding](datatypes.html#Coding).version."]
228    pub r#version: Option<super::super::types::String>,
229    #[doc = "Indicates the mechanism used to compare versions to determine which CodeSystem is more current."]
230    pub r#version_algorithm: Option<CodeSystemVersionAlgorithm>,
231    #[doc = "A natural language name identifying the code system. This name should be usable as an identifier for the module by machine processing applications such as code generation."]
232    pub r#name: Option<super::super::types::String>,
233    #[doc = "A short, descriptive, user-friendly title for the code system."]
234    pub r#title: Option<super::super::types::String>,
235    #[doc = "The status of this code system. Enables tracking the life-cycle of the content."]
236    pub r#status: super::super::types::Code,
237    #[doc = "A Boolean value to indicate that this code system is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage."]
238    pub r#experimental: Option<super::super::types::Boolean>,
239    #[doc = "The date  (and optionally time) when the code system 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 code system changes."]
240    pub r#date: Option<super::super::types::DateTime>,
241    #[doc = "The name of the organization or individual responsible for the release and ongoing maintenance of the code system."]
242    pub r#publisher: Option<super::super::types::String>,
243    #[doc = "Contact details to assist a user in finding and communicating with the publisher."]
244    pub r#contact: Vec<super::super::types::ContactDetail>,
245    #[doc = "A free text natural language description of the code system from a consumer's perspective."]
246    pub r#description: Option<super::super::types::Markdown>,
247    #[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 code system instances."]
248    pub r#use_context: Vec<super::super::types::UsageContext>,
249    #[doc = "A legal or geographic region in which the code system is intended to be used."]
250    pub r#jurisdiction: Vec<super::super::types::CodeableConcept>,
251    #[doc = "Explanation of why this code system is needed and why it has been designed as it has."]
252    pub r#purpose: Option<super::super::types::Markdown>,
253    #[doc = "A copyright statement relating to the code system and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the code system."]
254    pub r#copyright: Option<super::super::types::Markdown>,
255    #[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')."]
256    pub r#copyright_label: Option<super::super::types::String>,
257    #[doc = "The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage."]
258    pub r#approval_date: Option<super::super::types::Date>,
259    #[doc = "The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date."]
260    pub r#last_review_date: Option<super::super::types::Date>,
261    #[doc = "The period during which the CodeSystem content was or is planned to be in active use."]
262    pub r#effective_period: Option<Box<super::super::types::Period>>,
263    #[doc = "Descriptions related to the content of the CodeSystem. Topics provide a high-level categorization as well as keywords for the CodeSystem that can be useful for filtering and searching."]
264    pub r#topic: Vec<super::super::types::CodeableConcept>,
265    #[doc = "An individiual or organization primarily involved in the creation and maintenance of the CodeSystem."]
266    pub r#author: Vec<super::super::types::ContactDetail>,
267    #[doc = "An individual or organization primarily responsible for internal coherence of the CodeSystem."]
268    pub r#editor: Vec<super::super::types::ContactDetail>,
269    #[doc = "An individual or organization asserted by the publisher to be primarily responsible for review of some aspect of the CodeSystem."]
270    pub r#reviewer: Vec<super::super::types::ContactDetail>,
271    #[doc = "An individual or organization asserted by the publisher to be responsible for officially endorsing the CodeSystem for use in some setting."]
272    pub r#endorser: Vec<super::super::types::ContactDetail>,
273    #[doc = "Related artifacts such as additional documentation, justification, dependencies, bibliographic references, and predecessor and successor artifacts."]
274    pub r#related_artifact: Vec<super::super::types::RelatedArtifact>,
275    #[doc = "If code comparison is case sensitive when codes within this system are compared to each other."]
276    pub r#case_sensitive: Option<super::super::types::Boolean>,
277    #[doc = "Canonical reference to the value set that contains all codes in the code system independent of code status."]
278    pub r#value_set: Option<super::super::types::Canonical>,
279    #[doc = "The meaning of the hierarchy of concepts as represented in this resource."]
280    pub r#hierarchy_meaning: Option<super::super::types::Code>,
281    #[doc = "The code system defines a compositional (post-coordination) grammar."]
282    pub r#compositional: Option<super::super::types::Boolean>,
283    #[doc = "This flag is used to signify that the code system does not commit to concept permanence across versions. If true, a version must be specified when referencing this code system."]
284    pub r#version_needed: Option<super::super::types::Boolean>,
285    #[doc = "The extent of the content of the code system (the concepts and codes it defines) are represented in this resource instance."]
286    pub r#content: super::super::types::Code,
287    #[doc = "The canonical URL of the code system that this code system supplement is adding designations and properties to."]
288    pub r#supplements: Option<super::super::types::Canonical>,
289    #[doc = "The total number of concepts defined by the code system. Where the code system has a compositional grammar, the basis of this count is defined by the system steward."]
290    pub r#count: Option<super::super::types::UnsignedInt>,
291    #[doc = "A filter that can be used in a value set compose statement when selecting concepts using a filter."]
292    pub r#filter: Vec<CodeSystemFilter>,
293    #[doc = "A property defines an additional slot through which additional information can be provided about a concept."]
294    pub r#property: Vec<CodeSystemProperty>,
295    #[doc = "Concepts that are in the code system. The concept definitions are inherently hierarchical, but the definitions must be consulted to determine what the meanings of the hierarchical relationships are."]
296    pub r#concept: Vec<CodeSystemConcept>,
297}
298#[allow(clippy::derivable_impls)]
299impl Default for CodeSystem {
300    fn default() -> Self {
301        Self {
302            r#id: Default::default(),
303            r#meta: Default::default(),
304            r#implicit_rules: Default::default(),
305            r#language: Default::default(),
306            r#text: Default::default(),
307            r#contained: Default::default(),
308            r#extension: Default::default(),
309            r#modifier_extension: Default::default(),
310            r#url: Default::default(),
311            r#identifier: Default::default(),
312            r#version: Default::default(),
313            r#version_algorithm: Default::default(),
314            r#name: Default::default(),
315            r#title: Default::default(),
316            r#status: super::super::types::Code {
317                id: Some("$invalid".to_string()),
318                ..Default::default()
319            },
320            r#experimental: Default::default(),
321            r#date: Default::default(),
322            r#publisher: Default::default(),
323            r#contact: Default::default(),
324            r#description: Default::default(),
325            r#use_context: Default::default(),
326            r#jurisdiction: Default::default(),
327            r#purpose: Default::default(),
328            r#copyright: Default::default(),
329            r#copyright_label: Default::default(),
330            r#approval_date: Default::default(),
331            r#last_review_date: Default::default(),
332            r#effective_period: Default::default(),
333            r#topic: Default::default(),
334            r#author: Default::default(),
335            r#editor: Default::default(),
336            r#reviewer: Default::default(),
337            r#endorser: Default::default(),
338            r#related_artifact: Default::default(),
339            r#case_sensitive: Default::default(),
340            r#value_set: Default::default(),
341            r#hierarchy_meaning: Default::default(),
342            r#compositional: Default::default(),
343            r#version_needed: Default::default(),
344            r#content: super::super::types::Code {
345                id: Some("$invalid".to_string()),
346                ..Default::default()
347            },
348            r#supplements: Default::default(),
349            r#count: Default::default(),
350            r#filter: Default::default(),
351            r#property: Default::default(),
352            r#concept: Default::default(),
353        }
354    }
355}