fhirbolt_model/generated/r4b/resources/
concept_map.rs

1// Generated on 2023-05-17 by fhirbolt-codegen v0.10.0
2#[doc = "Identifier for the source value set that contains the concepts that are being mapped and provides context for the mappings."]
3#[derive(Default, Debug, Clone, PartialEq)]
4pub enum ConceptMapSource {
5    Uri(super::super::types::Uri),
6    Canonical(super::super::types::Canonical),
7    #[default]
8    Invalid,
9}
10#[doc = "The target value set provides context for the mappings. Note that the mapping is made between concepts, not between value sets, but the value set provides important context about how the concept mapping choices are made."]
11#[derive(Default, Debug, Clone, PartialEq)]
12pub enum ConceptMapTarget {
13    Uri(super::super::types::Uri),
14    Canonical(super::super::types::Canonical),
15    #[default]
16    Invalid,
17}
18#[doc = "A set of additional dependencies for this mapping to hold. This mapping is only applicable if the specified element can be resolved, and it has the specified value."]
19#[derive(Debug, Clone, PartialEq)]
20pub struct ConceptMapGroupElementTargetDependsOn {
21    #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
22    pub r#id: Option<std::string::String>,
23    #[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."]
24    pub r#extension: Vec<super::super::types::Extension>,
25    #[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)."]
26    pub r#modifier_extension: Vec<super::super::types::Extension>,
27    #[doc = "A reference to an element that holds a coded value that corresponds to a code system property. The idea is that the information model carries an element somewhere that is labeled to correspond with a code system property."]
28    pub r#property: super::super::types::Uri,
29    #[doc = "An absolute URI that identifies the code system of the dependency code (if the source/dependency is a value set that crosses code systems)."]
30    pub r#system: Option<super::super::types::Canonical>,
31    #[doc = "Identity (code or path) or the element/item/ValueSet/text that the map depends on / refers to."]
32    pub r#value: super::super::types::String,
33    #[doc = "The display for the code. The display is only provided to help editors when editing the concept map."]
34    pub r#display: Option<super::super::types::String>,
35}
36#[allow(clippy::derivable_impls)]
37impl Default for ConceptMapGroupElementTargetDependsOn {
38    fn default() -> Self {
39        Self {
40            r#id: Default::default(),
41            r#extension: Default::default(),
42            r#modifier_extension: Default::default(),
43            r#property: super::super::types::Uri {
44                id: Some("$invalid".to_string()),
45                ..Default::default()
46            },
47            r#system: Default::default(),
48            r#value: super::super::types::String {
49                id: Some("$invalid".to_string()),
50                ..Default::default()
51            },
52            r#display: Default::default(),
53        }
54    }
55}
56#[doc = "A concept from the target value set that this concept maps to."]
57#[derive(Debug, Clone, PartialEq)]
58pub struct ConceptMapGroupElementTarget {
59    #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
60    pub r#id: Option<std::string::String>,
61    #[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."]
62    pub r#extension: Vec<super::super::types::Extension>,
63    #[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)."]
64    pub r#modifier_extension: Vec<super::super::types::Extension>,
65    #[doc = "Identity (code or path) or the element/item that the map refers to."]
66    pub r#code: Option<super::super::types::Code>,
67    #[doc = "The display for the code. The display is only provided to help editors when editing the concept map."]
68    pub r#display: Option<super::super::types::String>,
69    #[doc = "The equivalence between the source and target concepts (counting for the dependencies and products). The equivalence is read from target to source (e.g. the target is 'wider' than the source)."]
70    pub r#equivalence: super::super::types::Code,
71    #[doc = "A description of status/issues in mapping that conveys additional information not represented in  the structured data."]
72    pub r#comment: Option<super::super::types::String>,
73    #[doc = "A set of additional dependencies for this mapping to hold. This mapping is only applicable if the specified element can be resolved, and it has the specified value."]
74    pub r#depends_on: Vec<ConceptMapGroupElementTargetDependsOn>,
75    #[doc = "A set of additional outcomes from this mapping to other elements. To properly execute this mapping, the specified element must be mapped to some data element or source that is in context. The mapping may still be useful without a place for the additional data elements, but the equivalence cannot be relied on."]
76    pub r#product: Vec<ConceptMapGroupElementTargetDependsOn>,
77}
78#[allow(clippy::derivable_impls)]
79impl Default for ConceptMapGroupElementTarget {
80    fn default() -> Self {
81        Self {
82            r#id: Default::default(),
83            r#extension: Default::default(),
84            r#modifier_extension: Default::default(),
85            r#code: Default::default(),
86            r#display: Default::default(),
87            r#equivalence: super::super::types::Code {
88                id: Some("$invalid".to_string()),
89                ..Default::default()
90            },
91            r#comment: Default::default(),
92            r#depends_on: Default::default(),
93            r#product: Default::default(),
94        }
95    }
96}
97#[doc = "Mappings for an individual concept in the source to one or more concepts in the target."]
98#[derive(Debug, Clone, PartialEq)]
99pub struct ConceptMapGroupElement {
100    #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
101    pub r#id: Option<std::string::String>,
102    #[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."]
103    pub r#extension: Vec<super::super::types::Extension>,
104    #[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)."]
105    pub r#modifier_extension: Vec<super::super::types::Extension>,
106    #[doc = "Identity (code or path) or the element/item being mapped."]
107    pub r#code: Option<super::super::types::Code>,
108    #[doc = "The display for the code. The display is only provided to help editors when editing the concept map."]
109    pub r#display: Option<super::super::types::String>,
110    #[doc = "A concept from the target value set that this concept maps to."]
111    pub r#target: Vec<ConceptMapGroupElementTarget>,
112}
113#[allow(clippy::derivable_impls)]
114impl Default for ConceptMapGroupElement {
115    fn default() -> Self {
116        Self {
117            r#id: Default::default(),
118            r#extension: Default::default(),
119            r#modifier_extension: Default::default(),
120            r#code: Default::default(),
121            r#display: Default::default(),
122            r#target: Default::default(),
123        }
124    }
125}
126#[doc = "What to do when there is no mapping for the source concept. \"Unmapped\" does not include codes that are unmatched, and the unmapped element is ignored in a code is specified to have equivalence = unmatched."]
127#[derive(Debug, Clone, PartialEq)]
128pub struct ConceptMapGroupUnmapped {
129    #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
130    pub r#id: Option<std::string::String>,
131    #[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."]
132    pub r#extension: Vec<super::super::types::Extension>,
133    #[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)."]
134    pub r#modifier_extension: Vec<super::super::types::Extension>,
135    #[doc = "Defines which action to take if there is no match for the source concept in the target system designated for the group. One of 3 actions are possible: use the unmapped code (this is useful when doing a mapping between versions, and only a few codes have changed), use a fixed code (a default code), or alternatively, a reference to a different concept map can be provided (by canonical URL)."]
136    pub r#mode: super::super::types::Code,
137    #[doc = "The fixed code to use when the mode = 'fixed'  - all unmapped codes are mapped to a single fixed code."]
138    pub r#code: Option<super::super::types::Code>,
139    #[doc = "The display for the code. The display is only provided to help editors when editing the concept map."]
140    pub r#display: Option<super::super::types::String>,
141    #[doc = "The canonical reference to an additional ConceptMap resource instance to use for mapping if this ConceptMap resource contains no matching mapping for the source concept."]
142    pub r#url: Option<super::super::types::Canonical>,
143}
144#[allow(clippy::derivable_impls)]
145impl Default for ConceptMapGroupUnmapped {
146    fn default() -> Self {
147        Self {
148            r#id: Default::default(),
149            r#extension: Default::default(),
150            r#modifier_extension: Default::default(),
151            r#mode: super::super::types::Code {
152                id: Some("$invalid".to_string()),
153                ..Default::default()
154            },
155            r#code: Default::default(),
156            r#display: Default::default(),
157            r#url: Default::default(),
158        }
159    }
160}
161#[doc = "A group of mappings that all have the same source and target system."]
162#[derive(Debug, Clone, PartialEq)]
163pub struct ConceptMapGroup {
164    #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
165    pub r#id: Option<std::string::String>,
166    #[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."]
167    pub r#extension: Vec<super::super::types::Extension>,
168    #[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)."]
169    pub r#modifier_extension: Vec<super::super::types::Extension>,
170    #[doc = "An absolute URI that identifies the source system where the concepts to be mapped are defined."]
171    pub r#source: Option<super::super::types::Uri>,
172    #[doc = "The specific version of the code system, as determined by the code system authority."]
173    pub r#source_version: Option<super::super::types::String>,
174    #[doc = "An absolute URI that identifies the target system that the concepts will be mapped to."]
175    pub r#target: Option<super::super::types::Uri>,
176    #[doc = "The specific version of the code system, as determined by the code system authority."]
177    pub r#target_version: Option<super::super::types::String>,
178    #[doc = "Mappings for an individual concept in the source to one or more concepts in the target."]
179    pub r#element: Vec<ConceptMapGroupElement>,
180    #[doc = "What to do when there is no mapping for the source concept. \"Unmapped\" does not include codes that are unmatched, and the unmapped element is ignored in a code is specified to have equivalence = unmatched."]
181    pub r#unmapped: Option<ConceptMapGroupUnmapped>,
182}
183#[allow(clippy::derivable_impls)]
184impl Default for ConceptMapGroup {
185    fn default() -> Self {
186        Self {
187            r#id: Default::default(),
188            r#extension: Default::default(),
189            r#modifier_extension: Default::default(),
190            r#source: Default::default(),
191            r#source_version: Default::default(),
192            r#target: Default::default(),
193            r#target_version: Default::default(),
194            r#element: Default::default(),
195            r#unmapped: Default::default(),
196        }
197    }
198}
199#[doc = "A statement of relationships from one set of concepts to one or more other concepts - either concepts in code systems, or data element/data element concepts, or classes in class models."]
200#[derive(Debug, Clone, PartialEq)]
201pub struct ConceptMap {
202    #[doc = "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes."]
203    pub r#id: Option<super::super::types::Id>,
204    #[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."]
205    pub r#meta: Option<Box<super::super::types::Meta>>,
206    #[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."]
207    pub r#implicit_rules: Option<super::super::types::Uri>,
208    #[doc = "The base language in which the resource is written."]
209    pub r#language: Option<super::super::types::Code>,
210    #[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."]
211    pub r#text: Option<Box<super::super::types::Narrative>>,
212    #[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."]
213    pub r#contained: Vec<super::super::Resource>,
214    #[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."]
215    pub r#extension: Vec<super::super::types::Extension>,
216    #[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)."]
217    pub r#modifier_extension: Vec<super::super::types::Extension>,
218    #[doc = "An absolute URI that is used to identify this concept map 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 concept map is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the concept map is stored on different servers."]
219    pub r#url: Option<super::super::types::Uri>,
220    #[doc = "A formal identifier that is used to identify this concept map when it is represented in other formats, or referenced in a specification, model, design or an instance."]
221    pub r#identifier: Option<Box<super::super::types::Identifier>>,
222    #[doc = "The identifier that is used to identify this version of the concept map when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the concept map 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."]
223    pub r#version: Option<super::super::types::String>,
224    #[doc = "A natural language name identifying the concept map. This name should be usable as an identifier for the module by machine processing applications such as code generation."]
225    pub r#name: Option<super::super::types::String>,
226    #[doc = "A short, descriptive, user-friendly title for the concept map."]
227    pub r#title: Option<super::super::types::String>,
228    #[doc = "The status of this concept map. Enables tracking the life-cycle of the content."]
229    pub r#status: super::super::types::Code,
230    #[doc = "A Boolean value to indicate that this concept map is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage."]
231    pub r#experimental: Option<super::super::types::Boolean>,
232    #[doc = "The date  (and optionally time) when the concept map 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 concept map changes."]
233    pub r#date: Option<super::super::types::DateTime>,
234    #[doc = "The name of the organization or individual that published the concept map."]
235    pub r#publisher: Option<super::super::types::String>,
236    #[doc = "Contact details to assist a user in finding and communicating with the publisher."]
237    pub r#contact: Vec<super::super::types::ContactDetail>,
238    #[doc = "A free text natural language description of the concept map from a consumer's perspective."]
239    pub r#description: Option<super::super::types::Markdown>,
240    #[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 concept map instances."]
241    pub r#use_context: Vec<super::super::types::UsageContext>,
242    #[doc = "A legal or geographic region in which the concept map is intended to be used."]
243    pub r#jurisdiction: Vec<super::super::types::CodeableConcept>,
244    #[doc = "Explanation of why this concept map is needed and why it has been designed as it has."]
245    pub r#purpose: Option<super::super::types::Markdown>,
246    #[doc = "A copyright statement relating to the concept map and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the concept map."]
247    pub r#copyright: Option<super::super::types::Markdown>,
248    #[doc = "Identifier for the source value set that contains the concepts that are being mapped and provides context for the mappings."]
249    pub r#source: Option<ConceptMapSource>,
250    #[doc = "The target value set provides context for the mappings. Note that the mapping is made between concepts, not between value sets, but the value set provides important context about how the concept mapping choices are made."]
251    pub r#target: Option<ConceptMapTarget>,
252    #[doc = "A group of mappings that all have the same source and target system."]
253    pub r#group: Vec<ConceptMapGroup>,
254}
255#[allow(clippy::derivable_impls)]
256impl Default for ConceptMap {
257    fn default() -> Self {
258        Self {
259            r#id: Default::default(),
260            r#meta: Default::default(),
261            r#implicit_rules: Default::default(),
262            r#language: Default::default(),
263            r#text: Default::default(),
264            r#contained: Default::default(),
265            r#extension: Default::default(),
266            r#modifier_extension: Default::default(),
267            r#url: Default::default(),
268            r#identifier: Default::default(),
269            r#version: Default::default(),
270            r#name: Default::default(),
271            r#title: Default::default(),
272            r#status: super::super::types::Code {
273                id: Some("$invalid".to_string()),
274                ..Default::default()
275            },
276            r#experimental: Default::default(),
277            r#date: Default::default(),
278            r#publisher: Default::default(),
279            r#contact: Default::default(),
280            r#description: Default::default(),
281            r#use_context: Default::default(),
282            r#jurisdiction: Default::default(),
283            r#purpose: Default::default(),
284            r#copyright: Default::default(),
285            r#source: Default::default(),
286            r#target: Default::default(),
287            r#group: Default::default(),
288        }
289    }
290}