fhirbolt_model/generated/r5/resources/
search_parameter.rs

1// Generated on 2023-05-17 by fhirbolt-codegen v0.10.0
2#[doc = "Indicates the mechanism used to compare versions to determine which is more current."]
3#[derive(Default, Debug, Clone, PartialEq)]
4pub enum SearchParameterVersionAlgorithm {
5    String(super::super::types::String),
6    Coding(Box<super::super::types::Coding>),
7    #[default]
8    Invalid,
9}
10#[doc = "Used to define the parts of a composite search parameter."]
11#[derive(Debug, Clone, PartialEq)]
12pub struct SearchParameterComponent {
13    #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
14    pub r#id: Option<std::string::String>,
15    #[doc = "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."]
16    pub r#extension: Vec<super::super::types::Extension>,
17    #[doc = "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."]
18    pub r#modifier_extension: Vec<super::super::types::Extension>,
19    #[doc = "The definition of the search parameter that describes this part."]
20    pub r#definition: super::super::types::Canonical,
21    #[doc = "A sub-expression that defines how to extract values for this component from the output of the main SearchParameter.expression."]
22    pub r#expression: super::super::types::String,
23}
24#[allow(clippy::derivable_impls)]
25impl Default for SearchParameterComponent {
26    fn default() -> Self {
27        Self {
28            r#id: Default::default(),
29            r#extension: Default::default(),
30            r#modifier_extension: Default::default(),
31            r#definition: super::super::types::Canonical {
32                id: Some("$invalid".to_string()),
33                ..Default::default()
34            },
35            r#expression: super::super::types::String {
36                id: Some("$invalid".to_string()),
37                ..Default::default()
38            },
39        }
40    }
41}
42#[doc = "A search parameter that defines a named search item that can be used to search/filter on a resource."]
43#[derive(Debug, Clone, PartialEq)]
44pub struct SearchParameter {
45    #[doc = "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes."]
46    pub r#id: Option<super::super::types::Id>,
47    #[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."]
48    pub r#meta: Option<Box<super::super::types::Meta>>,
49    #[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."]
50    pub r#implicit_rules: Option<super::super::types::Uri>,
51    #[doc = "The base language in which the resource is written."]
52    pub r#language: Option<super::super::types::Code>,
53    #[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."]
54    pub r#text: Option<Box<super::super::types::Narrative>>,
55    #[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."]
56    pub r#contained: Vec<super::super::Resource>,
57    #[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."]
58    pub r#extension: Vec<super::super::types::Extension>,
59    #[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)."]
60    pub r#modifier_extension: Vec<super::super::types::Extension>,
61    #[doc = "An absolute URI that is used to identify this search parameter 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 search parameter is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the search parameter is stored on different servers."]
62    pub r#url: super::super::types::Uri,
63    #[doc = "A formal identifier that is used to identify this search parameter when it is represented in other formats, or referenced in a specification, model, design or an instance."]
64    pub r#identifier: Vec<super::super::types::Identifier>,
65    #[doc = "The identifier that is used to identify this version of the search parameter when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the search parameter 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."]
66    pub r#version: Option<super::super::types::String>,
67    #[doc = "Indicates the mechanism used to compare versions to determine which is more current."]
68    pub r#version_algorithm: Option<SearchParameterVersionAlgorithm>,
69    #[doc = "A natural language name identifying the search parameter. This name should be usable as an identifier for the module by machine processing applications such as code generation."]
70    pub r#name: super::super::types::String,
71    #[doc = "A short, descriptive, user-friendly title for the search parameter."]
72    pub r#title: Option<super::super::types::String>,
73    #[doc = "Where this search parameter is originally defined. If a derivedFrom is provided, then the details in the search parameter must be consistent with the definition from which it is defined. i.e. the parameter should have the same meaning, and (usually) the functionality should be a proper subset of the underlying search parameter."]
74    pub r#derived_from: Option<super::super::types::Canonical>,
75    #[doc = "The status of this search parameter. Enables tracking the life-cycle of the content."]
76    pub r#status: super::super::types::Code,
77    #[doc = "A Boolean value to indicate that this search parameter is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage."]
78    pub r#experimental: Option<super::super::types::Boolean>,
79    #[doc = "The date  (and optionally time) when the search parameter 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 search parameter changes."]
80    pub r#date: Option<super::super::types::DateTime>,
81    #[doc = "The name of the organization or individual tresponsible for the release and ongoing maintenance of the search parameter."]
82    pub r#publisher: Option<super::super::types::String>,
83    #[doc = "Contact details to assist a user in finding and communicating with the publisher."]
84    pub r#contact: Vec<super::super::types::ContactDetail>,
85    #[doc = "And how it used."]
86    pub r#description: super::super::types::Markdown,
87    #[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 search parameter instances."]
88    pub r#use_context: Vec<super::super::types::UsageContext>,
89    #[doc = "A legal or geographic region in which the search parameter is intended to be used."]
90    pub r#jurisdiction: Vec<super::super::types::CodeableConcept>,
91    #[doc = "Explanation of why this search parameter is needed and why it has been designed as it has."]
92    pub r#purpose: Option<super::super::types::Markdown>,
93    #[doc = "A copyright statement relating to the search parameter and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the search parameter."]
94    pub r#copyright: Option<super::super::types::Markdown>,
95    #[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')."]
96    pub r#copyright_label: Option<super::super::types::String>,
97    #[doc = "The label that is recommended to be used in the URL or the parameter name in a parameters resource for this search parameter.  In some cases, servers may need to use a different CapabilityStatement searchParam.name to differentiate between multiple SearchParameters that happen to have the same code."]
98    pub r#code: super::super::types::Code,
99    #[doc = "The base resource type(s) that this search parameter can be used against."]
100    pub r#base: Vec<super::super::types::Code>,
101    #[doc = "The type of value that a search parameter may contain, and how the content is interpreted."]
102    pub r#type: super::super::types::Code,
103    #[doc = "A FHIRPath expression that returns a set of elements for the search parameter."]
104    pub r#expression: Option<super::super::types::String>,
105    #[doc = "How the search parameter relates to the set of elements returned by evaluating the expression query."]
106    pub r#processing_mode: Option<super::super::types::Code>,
107    #[doc = "FHIRPath expression that defines/sets a complex constraint for when this SearchParameter is applicable."]
108    pub r#constraint: Option<super::super::types::String>,
109    #[doc = "Types of resource (if a resource is referenced)."]
110    pub r#target: Vec<super::super::types::Code>,
111    #[doc = "Whether multiple values are allowed for each time the parameter exists. Values are separated by commas, and the parameter matches if any of the values match."]
112    pub r#multiple_or: Option<super::super::types::Boolean>,
113    #[doc = "Whether multiple parameters are allowed - e.g. more than one parameter with the same name. The search matches if all the parameters match."]
114    pub r#multiple_and: Option<super::super::types::Boolean>,
115    #[doc = "Comparators supported for the search parameter."]
116    pub r#comparator: Vec<super::super::types::Code>,
117    #[doc = "A modifier supported for the search parameter."]
118    pub r#modifier: Vec<super::super::types::Code>,
119    #[doc = "Contains the names of any search parameters which may be chained to the containing search parameter. Chained parameters may be added to search parameters of type reference and specify that resources will only be returned if they contain a reference to a resource which matches the chained parameter value. Values for this field should be drawn from SearchParameter.code for a parameter on the target resource type."]
120    pub r#chain: Vec<super::super::types::String>,
121    #[doc = "Used to define the parts of a composite search parameter."]
122    pub r#component: Vec<SearchParameterComponent>,
123}
124#[allow(clippy::derivable_impls)]
125impl Default for SearchParameter {
126    fn default() -> Self {
127        Self {
128            r#id: Default::default(),
129            r#meta: Default::default(),
130            r#implicit_rules: Default::default(),
131            r#language: Default::default(),
132            r#text: Default::default(),
133            r#contained: Default::default(),
134            r#extension: Default::default(),
135            r#modifier_extension: Default::default(),
136            r#url: super::super::types::Uri {
137                id: Some("$invalid".to_string()),
138                ..Default::default()
139            },
140            r#identifier: Default::default(),
141            r#version: Default::default(),
142            r#version_algorithm: Default::default(),
143            r#name: super::super::types::String {
144                id: Some("$invalid".to_string()),
145                ..Default::default()
146            },
147            r#title: Default::default(),
148            r#derived_from: Default::default(),
149            r#status: super::super::types::Code {
150                id: Some("$invalid".to_string()),
151                ..Default::default()
152            },
153            r#experimental: Default::default(),
154            r#date: Default::default(),
155            r#publisher: Default::default(),
156            r#contact: Default::default(),
157            r#description: super::super::types::Markdown {
158                id: Some("$invalid".to_string()),
159                ..Default::default()
160            },
161            r#use_context: Default::default(),
162            r#jurisdiction: Default::default(),
163            r#purpose: Default::default(),
164            r#copyright: Default::default(),
165            r#copyright_label: Default::default(),
166            r#code: super::super::types::Code {
167                id: Some("$invalid".to_string()),
168                ..Default::default()
169            },
170            r#base: Default::default(),
171            r#type: super::super::types::Code {
172                id: Some("$invalid".to_string()),
173                ..Default::default()
174            },
175            r#expression: Default::default(),
176            r#processing_mode: Default::default(),
177            r#constraint: Default::default(),
178            r#target: Default::default(),
179            r#multiple_or: Default::default(),
180            r#multiple_and: Default::default(),
181            r#comparator: Default::default(),
182            r#modifier: Default::default(),
183            r#chain: Default::default(),
184            r#component: Default::default(),
185        }
186    }
187}