fhirbolt_model/generated/r5/resources/
coverage_eligibility_response.rs

1// Generated on 2023-05-17 by fhirbolt-codegen v0.10.0
2#[doc = "A date or period in the past or future indicating when the event occurred or is expectd to occur."]
3#[derive(Default, Debug, Clone, PartialEq)]
4pub enum CoverageEligibilityResponseEventWhen {
5    DateTime(super::super::types::DateTime),
6    Period(Box<super::super::types::Period>),
7    #[default]
8    Invalid,
9}
10#[doc = "The date or dates when the enclosed suite of services were performed or completed."]
11#[derive(Default, Debug, Clone, PartialEq)]
12pub enum CoverageEligibilityResponseServiced {
13    Date(super::super::types::Date),
14    Period(Box<super::super::types::Period>),
15    #[default]
16    Invalid,
17}
18#[doc = "The quantity of the benefit which is permitted under the coverage."]
19#[derive(Default, Debug, Clone, PartialEq)]
20pub enum CoverageEligibilityResponseInsuranceItemBenefitAllowed {
21    UnsignedInt(super::super::types::UnsignedInt),
22    String(super::super::types::String),
23    Money(Box<super::super::types::Money>),
24    #[default]
25    Invalid,
26}
27#[doc = "The quantity of the benefit which have been consumed to date."]
28#[derive(Default, Debug, Clone, PartialEq)]
29pub enum CoverageEligibilityResponseInsuranceItemBenefitUsed {
30    UnsignedInt(super::super::types::UnsignedInt),
31    String(super::super::types::String),
32    Money(Box<super::super::types::Money>),
33    #[default]
34    Invalid,
35}
36#[doc = "Information code for an event with a corresponding date or period."]
37#[derive(Debug, Clone, PartialEq)]
38pub struct CoverageEligibilityResponseEvent {
39    #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
40    pub r#id: Option<std::string::String>,
41    #[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."]
42    pub r#extension: Vec<super::super::types::Extension>,
43    #[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)."]
44    pub r#modifier_extension: Vec<super::super::types::Extension>,
45    #[doc = "A coded event such as when a service is expected or a card printed."]
46    pub r#type: Box<super::super::types::CodeableConcept>,
47    #[doc = "A date or period in the past or future indicating when the event occurred or is expectd to occur."]
48    pub r#when: CoverageEligibilityResponseEventWhen,
49}
50#[allow(clippy::derivable_impls)]
51impl Default for CoverageEligibilityResponseEvent {
52    fn default() -> Self {
53        Self {
54            r#id: Default::default(),
55            r#extension: Default::default(),
56            r#modifier_extension: Default::default(),
57            r#type: Box::new(super::super::types::CodeableConcept {
58                id: Some("$invalid".to_string()),
59                ..Default::default()
60            }),
61            r#when: Default::default(),
62        }
63    }
64}
65#[doc = "Benefits used to date."]
66#[derive(Debug, Clone, PartialEq)]
67pub struct CoverageEligibilityResponseInsuranceItemBenefit {
68    #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
69    pub r#id: Option<std::string::String>,
70    #[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."]
71    pub r#extension: Vec<super::super::types::Extension>,
72    #[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)."]
73    pub r#modifier_extension: Vec<super::super::types::Extension>,
74    #[doc = "Classification of benefit being provided."]
75    pub r#type: Box<super::super::types::CodeableConcept>,
76    #[doc = "The quantity of the benefit which is permitted under the coverage."]
77    pub r#allowed: Option<CoverageEligibilityResponseInsuranceItemBenefitAllowed>,
78    #[doc = "The quantity of the benefit which have been consumed to date."]
79    pub r#used: Option<CoverageEligibilityResponseInsuranceItemBenefitUsed>,
80}
81#[allow(clippy::derivable_impls)]
82impl Default for CoverageEligibilityResponseInsuranceItemBenefit {
83    fn default() -> Self {
84        Self {
85            r#id: Default::default(),
86            r#extension: Default::default(),
87            r#modifier_extension: Default::default(),
88            r#type: Box::new(super::super::types::CodeableConcept {
89                id: Some("$invalid".to_string()),
90                ..Default::default()
91            }),
92            r#allowed: Default::default(),
93            r#used: Default::default(),
94        }
95    }
96}
97#[doc = "Benefits and optionally current balances, and authorization details by category or service."]
98#[derive(Debug, Clone, PartialEq)]
99pub struct CoverageEligibilityResponseInsuranceItem {
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 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."]
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 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)."]
105    pub r#modifier_extension: Vec<super::super::types::Extension>,
106    #[doc = "Code to identify the general type of benefits under which products and services are provided."]
107    pub r#category: Option<Box<super::super::types::CodeableConcept>>,
108    #[doc = "This contains the product, service, drug or other billing code for the item."]
109    pub r#product_or_service: Option<Box<super::super::types::CodeableConcept>>,
110    #[doc = "Item typification or modifiers codes to convey additional context for the product or service."]
111    pub r#modifier: Vec<super::super::types::CodeableConcept>,
112    #[doc = "The practitioner who is eligible for the provision of the product or service."]
113    pub r#provider: Option<Box<super::super::types::Reference>>,
114    #[doc = "True if the indicated class of service is excluded from the plan, missing or False indicates the product or service is included in the coverage."]
115    pub r#excluded: Option<super::super::types::Boolean>,
116    #[doc = "A short name or tag for the benefit."]
117    pub r#name: Option<super::super::types::String>,
118    #[doc = "A richer description of the benefit or services covered."]
119    pub r#description: Option<super::super::types::String>,
120    #[doc = "Is a flag to indicate whether the benefits refer to in-network providers or out-of-network providers."]
121    pub r#network: Option<Box<super::super::types::CodeableConcept>>,
122    #[doc = "Indicates if the benefits apply to an individual or to the family."]
123    pub r#unit: Option<Box<super::super::types::CodeableConcept>>,
124    #[doc = "The term or period of the values such as 'maximum lifetime benefit' or 'maximum annual visits'."]
125    pub r#term: Option<Box<super::super::types::CodeableConcept>>,
126    #[doc = "Benefits used to date."]
127    pub r#benefit: Vec<CoverageEligibilityResponseInsuranceItemBenefit>,
128    #[doc = "A boolean flag indicating whether a preauthorization is required prior to actual service delivery."]
129    pub r#authorization_required: Option<super::super::types::Boolean>,
130    #[doc = "Codes or comments regarding information or actions associated with the preauthorization."]
131    pub r#authorization_supporting: Vec<super::super::types::CodeableConcept>,
132    #[doc = "A web location for obtaining requirements or descriptive information regarding the preauthorization."]
133    pub r#authorization_url: Option<super::super::types::Uri>,
134}
135#[allow(clippy::derivable_impls)]
136impl Default for CoverageEligibilityResponseInsuranceItem {
137    fn default() -> Self {
138        Self {
139            r#id: Default::default(),
140            r#extension: Default::default(),
141            r#modifier_extension: Default::default(),
142            r#category: Default::default(),
143            r#product_or_service: Default::default(),
144            r#modifier: Default::default(),
145            r#provider: Default::default(),
146            r#excluded: Default::default(),
147            r#name: Default::default(),
148            r#description: Default::default(),
149            r#network: Default::default(),
150            r#unit: Default::default(),
151            r#term: Default::default(),
152            r#benefit: Default::default(),
153            r#authorization_required: Default::default(),
154            r#authorization_supporting: Default::default(),
155            r#authorization_url: Default::default(),
156        }
157    }
158}
159#[doc = "Financial instruments for reimbursement for the health care products and services."]
160#[derive(Debug, Clone, PartialEq)]
161pub struct CoverageEligibilityResponseInsurance {
162    #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
163    pub r#id: Option<std::string::String>,
164    #[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."]
165    pub r#extension: Vec<super::super::types::Extension>,
166    #[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)."]
167    pub r#modifier_extension: Vec<super::super::types::Extension>,
168    #[doc = "Reference to the insurance card level information contained in the Coverage resource. The coverage issuing insurer will use these details to locate the patient's actual coverage within the insurer's information system."]
169    pub r#coverage: Box<super::super::types::Reference>,
170    #[doc = "Flag indicating if the coverage provided is inforce currently if no service date(s) specified or for the whole duration of the service dates."]
171    pub r#inforce: Option<super::super::types::Boolean>,
172    #[doc = "The term of the benefits documented in this response."]
173    pub r#benefit_period: Option<Box<super::super::types::Period>>,
174    #[doc = "Benefits and optionally current balances, and authorization details by category or service."]
175    pub r#item: Vec<CoverageEligibilityResponseInsuranceItem>,
176}
177#[allow(clippy::derivable_impls)]
178impl Default for CoverageEligibilityResponseInsurance {
179    fn default() -> Self {
180        Self {
181            r#id: Default::default(),
182            r#extension: Default::default(),
183            r#modifier_extension: Default::default(),
184            r#coverage: Box::new(super::super::types::Reference {
185                id: Some("$invalid".to_string()),
186                ..Default::default()
187            }),
188            r#inforce: Default::default(),
189            r#benefit_period: Default::default(),
190            r#item: Default::default(),
191        }
192    }
193}
194#[doc = "Errors encountered during the processing of the request."]
195#[derive(Debug, Clone, PartialEq)]
196pub struct CoverageEligibilityResponseError {
197    #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
198    pub r#id: Option<std::string::String>,
199    #[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."]
200    pub r#extension: Vec<super::super::types::Extension>,
201    #[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)."]
202    pub r#modifier_extension: Vec<super::super::types::Extension>,
203    #[doc = "An error code,from a specified code system, which details why the eligibility check could not be performed."]
204    pub r#code: Box<super::super::types::CodeableConcept>,
205    #[doc = "A [simple subset of FHIRPath](fhirpath.html#simple) limited to element names, repetition indicators and the default child accessor that identifies one of the elements in the resource that caused this issue to be raised."]
206    pub r#expression: Vec<super::super::types::String>,
207}
208#[allow(clippy::derivable_impls)]
209impl Default for CoverageEligibilityResponseError {
210    fn default() -> Self {
211        Self {
212            r#id: Default::default(),
213            r#extension: Default::default(),
214            r#modifier_extension: Default::default(),
215            r#code: Box::new(super::super::types::CodeableConcept {
216                id: Some("$invalid".to_string()),
217                ..Default::default()
218            }),
219            r#expression: Default::default(),
220        }
221    }
222}
223#[doc = "This resource provides eligibility and plan details from the processing of an CoverageEligibilityRequest resource."]
224#[derive(Debug, Clone, PartialEq)]
225pub struct CoverageEligibilityResponse {
226    #[doc = "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes."]
227    pub r#id: Option<super::super::types::Id>,
228    #[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."]
229    pub r#meta: Option<Box<super::super::types::Meta>>,
230    #[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."]
231    pub r#implicit_rules: Option<super::super::types::Uri>,
232    #[doc = "The base language in which the resource is written."]
233    pub r#language: Option<super::super::types::Code>,
234    #[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."]
235    pub r#text: Option<Box<super::super::types::Narrative>>,
236    #[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."]
237    pub r#contained: Vec<super::super::Resource>,
238    #[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."]
239    pub r#extension: Vec<super::super::types::Extension>,
240    #[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)."]
241    pub r#modifier_extension: Vec<super::super::types::Extension>,
242    #[doc = "A unique identifier assigned to this coverage eligiblity request."]
243    pub r#identifier: Vec<super::super::types::Identifier>,
244    #[doc = "The status of the resource instance."]
245    pub r#status: super::super::types::Code,
246    #[doc = "Code to specify whether requesting: prior authorization requirements for some service categories or billing codes; benefits for coverages specified or discovered; discovery and return of coverages for the patient; and/or validation that the specified coverage is in-force at the date/period specified or 'now' if not specified."]
247    pub r#purpose: Vec<super::super::types::Code>,
248    #[doc = "The party who is the beneficiary of the supplied coverage and for whom eligibility is sought."]
249    pub r#patient: Box<super::super::types::Reference>,
250    #[doc = "Information code for an event with a corresponding date or period."]
251    pub r#event: Vec<CoverageEligibilityResponseEvent>,
252    #[doc = "The date or dates when the enclosed suite of services were performed or completed."]
253    pub r#serviced: Option<CoverageEligibilityResponseServiced>,
254    #[doc = "The date this resource was created."]
255    pub r#created: super::super::types::DateTime,
256    #[doc = "The provider which is responsible for the request."]
257    pub r#requestor: Option<Box<super::super::types::Reference>>,
258    #[doc = "Reference to the original request resource."]
259    pub r#request: Box<super::super::types::Reference>,
260    #[doc = "The outcome of the request processing."]
261    pub r#outcome: super::super::types::Code,
262    #[doc = "A human readable description of the status of the adjudication."]
263    pub r#disposition: Option<super::super::types::String>,
264    #[doc = "The Insurer who issued the coverage in question and is the author of the response."]
265    pub r#insurer: Box<super::super::types::Reference>,
266    #[doc = "Financial instruments for reimbursement for the health care products and services."]
267    pub r#insurance: Vec<CoverageEligibilityResponseInsurance>,
268    #[doc = "A reference from the Insurer to which these services pertain to be used on further communication and as proof that the request occurred."]
269    pub r#pre_auth_ref: Option<super::super::types::String>,
270    #[doc = "A code for the form to be used for printing the content."]
271    pub r#form: Option<Box<super::super::types::CodeableConcept>>,
272    #[doc = "Errors encountered during the processing of the request."]
273    pub r#error: Vec<CoverageEligibilityResponseError>,
274}
275#[allow(clippy::derivable_impls)]
276impl Default for CoverageEligibilityResponse {
277    fn default() -> Self {
278        Self {
279            r#id: Default::default(),
280            r#meta: Default::default(),
281            r#implicit_rules: Default::default(),
282            r#language: Default::default(),
283            r#text: Default::default(),
284            r#contained: Default::default(),
285            r#extension: Default::default(),
286            r#modifier_extension: Default::default(),
287            r#identifier: Default::default(),
288            r#status: super::super::types::Code {
289                id: Some("$invalid".to_string()),
290                ..Default::default()
291            },
292            r#purpose: Default::default(),
293            r#patient: Box::new(super::super::types::Reference {
294                id: Some("$invalid".to_string()),
295                ..Default::default()
296            }),
297            r#event: Default::default(),
298            r#serviced: Default::default(),
299            r#created: super::super::types::DateTime {
300                id: Some("$invalid".to_string()),
301                ..Default::default()
302            },
303            r#requestor: Default::default(),
304            r#request: Box::new(super::super::types::Reference {
305                id: Some("$invalid".to_string()),
306                ..Default::default()
307            }),
308            r#outcome: super::super::types::Code {
309                id: Some("$invalid".to_string()),
310                ..Default::default()
311            },
312            r#disposition: Default::default(),
313            r#insurer: Box::new(super::super::types::Reference {
314                id: Some("$invalid".to_string()),
315                ..Default::default()
316            }),
317            r#insurance: Default::default(),
318            r#pre_auth_ref: Default::default(),
319            r#form: Default::default(),
320            r#error: Default::default(),
321        }
322    }
323}