fhirbolt_model/generated/r5/resources/
explanation_of_benefit.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 ExplanationOfBenefitEventWhen {
5    DateTime(super::super::types::DateTime),
6    Period(Box<super::super::types::Period>),
7    #[default]
8    Invalid,
9}
10#[doc = "The date when or period to which this information refers."]
11#[derive(Default, Debug, Clone, PartialEq)]
12pub enum ExplanationOfBenefitSupportingInfoTiming {
13    Date(super::super::types::Date),
14    Period(Box<super::super::types::Period>),
15    #[default]
16    Invalid,
17}
18#[doc = "Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data."]
19#[derive(Default, Debug, Clone, PartialEq)]
20pub enum ExplanationOfBenefitSupportingInfoValue {
21    Boolean(super::super::types::Boolean),
22    String(super::super::types::String),
23    Quantity(Box<super::super::types::Quantity>),
24    Attachment(Box<super::super::types::Attachment>),
25    Reference(Box<super::super::types::Reference>),
26    Identifier(Box<super::super::types::Identifier>),
27    #[default]
28    Invalid,
29}
30#[doc = "The nature of illness or problem in a coded form or as a reference to an external defined Condition."]
31#[derive(Default, Debug, Clone, PartialEq)]
32pub enum ExplanationOfBenefitDiagnosisDiagnosis {
33    CodeableConcept(Box<super::super::types::CodeableConcept>),
34    Reference(Box<super::super::types::Reference>),
35    #[default]
36    Invalid,
37}
38#[doc = "The code or reference to a Procedure resource which identifies the clinical intervention performed."]
39#[derive(Default, Debug, Clone, PartialEq)]
40pub enum ExplanationOfBenefitProcedureProcedure {
41    CodeableConcept(Box<super::super::types::CodeableConcept>),
42    Reference(Box<super::super::types::Reference>),
43    #[default]
44    Invalid,
45}
46#[doc = "The physical location of the accident event."]
47#[derive(Default, Debug, Clone, PartialEq)]
48pub enum ExplanationOfBenefitAccidentLocation {
49    Address(Box<super::super::types::Address>),
50    Reference(Box<super::super::types::Reference>),
51    #[default]
52    Invalid,
53}
54#[doc = "The date or dates when the service or product was supplied, performed or completed."]
55#[derive(Default, Debug, Clone, PartialEq)]
56pub enum ExplanationOfBenefitItemServiced {
57    Date(super::super::types::Date),
58    Period(Box<super::super::types::Period>),
59    #[default]
60    Invalid,
61}
62#[doc = "Where the product or service was provided."]
63#[derive(Default, Debug, Clone, PartialEq)]
64pub enum ExplanationOfBenefitItemLocation {
65    CodeableConcept(Box<super::super::types::CodeableConcept>),
66    Address(Box<super::super::types::Address>),
67    Reference(Box<super::super::types::Reference>),
68    #[default]
69    Invalid,
70}
71#[doc = "The date or dates when the service or product was supplied, performed or completed."]
72#[derive(Default, Debug, Clone, PartialEq)]
73pub enum ExplanationOfBenefitAddItemServiced {
74    Date(super::super::types::Date),
75    Period(Box<super::super::types::Period>),
76    #[default]
77    Invalid,
78}
79#[doc = "Where the product or service was provided."]
80#[derive(Default, Debug, Clone, PartialEq)]
81pub enum ExplanationOfBenefitAddItemLocation {
82    CodeableConcept(Box<super::super::types::CodeableConcept>),
83    Address(Box<super::super::types::Address>),
84    Reference(Box<super::super::types::Reference>),
85    #[default]
86    Invalid,
87}
88#[doc = "The quantity of the benefit which is permitted under the coverage."]
89#[derive(Default, Debug, Clone, PartialEq)]
90pub enum ExplanationOfBenefitBenefitBalanceFinancialAllowed {
91    UnsignedInt(super::super::types::UnsignedInt),
92    String(super::super::types::String),
93    Money(Box<super::super::types::Money>),
94    #[default]
95    Invalid,
96}
97#[doc = "The quantity of the benefit which have been consumed to date."]
98#[derive(Default, Debug, Clone, PartialEq)]
99pub enum ExplanationOfBenefitBenefitBalanceFinancialUsed {
100    UnsignedInt(super::super::types::UnsignedInt),
101    Money(Box<super::super::types::Money>),
102    #[default]
103    Invalid,
104}
105#[doc = "Other claims which are related to this claim such as prior submissions or claims for related services or for the same event."]
106#[derive(Debug, Clone, PartialEq)]
107pub struct ExplanationOfBenefitRelated {
108    #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
109    pub r#id: Option<std::string::String>,
110    #[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."]
111    pub r#extension: Vec<super::super::types::Extension>,
112    #[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)."]
113    pub r#modifier_extension: Vec<super::super::types::Extension>,
114    #[doc = "Reference to a related claim."]
115    pub r#claim: Option<Box<super::super::types::Reference>>,
116    #[doc = "A code to convey how the claims are related."]
117    pub r#relationship: Option<Box<super::super::types::CodeableConcept>>,
118    #[doc = "An alternate organizational reference to the case or file to which this particular claim pertains."]
119    pub r#reference: Option<Box<super::super::types::Identifier>>,
120}
121#[allow(clippy::derivable_impls)]
122impl Default for ExplanationOfBenefitRelated {
123    fn default() -> Self {
124        Self {
125            r#id: Default::default(),
126            r#extension: Default::default(),
127            r#modifier_extension: Default::default(),
128            r#claim: Default::default(),
129            r#relationship: Default::default(),
130            r#reference: Default::default(),
131        }
132    }
133}
134#[doc = "Information code for an event with a corresponding date or period."]
135#[derive(Debug, Clone, PartialEq)]
136pub struct ExplanationOfBenefitEvent {
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 coded event such as when a service is expected or a card printed."]
144    pub r#type: Box<super::super::types::CodeableConcept>,
145    #[doc = "A date or period in the past or future indicating when the event occurred or is expectd to occur."]
146    pub r#when: ExplanationOfBenefitEventWhen,
147}
148#[allow(clippy::derivable_impls)]
149impl Default for ExplanationOfBenefitEvent {
150    fn default() -> Self {
151        Self {
152            r#id: Default::default(),
153            r#extension: Default::default(),
154            r#modifier_extension: Default::default(),
155            r#type: Box::new(super::super::types::CodeableConcept {
156                id: Some("$invalid".to_string()),
157                ..Default::default()
158            }),
159            r#when: Default::default(),
160        }
161    }
162}
163#[doc = "The party to be reimbursed for cost of the products and services according to the terms of the policy."]
164#[derive(Debug, Clone, PartialEq)]
165pub struct ExplanationOfBenefitPayee {
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 = "Type of Party to be reimbursed: Subscriber, provider, other."]
173    pub r#type: Option<Box<super::super::types::CodeableConcept>>,
174    #[doc = "Reference to the individual or organization to whom any payment will be made."]
175    pub r#party: Option<Box<super::super::types::Reference>>,
176}
177#[allow(clippy::derivable_impls)]
178impl Default for ExplanationOfBenefitPayee {
179    fn default() -> Self {
180        Self {
181            r#id: Default::default(),
182            r#extension: Default::default(),
183            r#modifier_extension: Default::default(),
184            r#type: Default::default(),
185            r#party: Default::default(),
186        }
187    }
188}
189#[doc = "The members of the team who provided the products and services."]
190#[derive(Debug, Clone, PartialEq)]
191pub struct ExplanationOfBenefitCareTeam {
192    #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
193    pub r#id: Option<std::string::String>,
194    #[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."]
195    pub r#extension: Vec<super::super::types::Extension>,
196    #[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)."]
197    pub r#modifier_extension: Vec<super::super::types::Extension>,
198    #[doc = "A number to uniquely identify care team entries."]
199    pub r#sequence: super::super::types::PositiveInt,
200    #[doc = "Member of the team who provided the product or service."]
201    pub r#provider: Box<super::super::types::Reference>,
202    #[doc = "The party who is billing and/or responsible for the claimed products or services."]
203    pub r#responsible: Option<super::super::types::Boolean>,
204    #[doc = "The lead, assisting or supervising practitioner and their discipline if a multidisciplinary team."]
205    pub r#role: Option<Box<super::super::types::CodeableConcept>>,
206    #[doc = "The specialization of the practitioner or provider which is applicable for this service."]
207    pub r#specialty: Option<Box<super::super::types::CodeableConcept>>,
208}
209#[allow(clippy::derivable_impls)]
210impl Default for ExplanationOfBenefitCareTeam {
211    fn default() -> Self {
212        Self {
213            r#id: Default::default(),
214            r#extension: Default::default(),
215            r#modifier_extension: Default::default(),
216            r#sequence: super::super::types::PositiveInt {
217                id: Some("$invalid".to_string()),
218                ..Default::default()
219            },
220            r#provider: Box::new(super::super::types::Reference {
221                id: Some("$invalid".to_string()),
222                ..Default::default()
223            }),
224            r#responsible: Default::default(),
225            r#role: Default::default(),
226            r#specialty: Default::default(),
227        }
228    }
229}
230#[doc = "Additional information codes regarding exceptions, special considerations, the condition, situation, prior or concurrent issues."]
231#[derive(Debug, Clone, PartialEq)]
232pub struct ExplanationOfBenefitSupportingInfo {
233    #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
234    pub r#id: Option<std::string::String>,
235    #[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."]
236    pub r#extension: Vec<super::super::types::Extension>,
237    #[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)."]
238    pub r#modifier_extension: Vec<super::super::types::Extension>,
239    #[doc = "A number to uniquely identify supporting information entries."]
240    pub r#sequence: super::super::types::PositiveInt,
241    #[doc = "The general class of the information supplied: information; exception; accident, employment; onset, etc."]
242    pub r#category: Box<super::super::types::CodeableConcept>,
243    #[doc = "System and code pertaining to the specific information regarding special conditions relating to the setting, treatment or patient  for which care is sought."]
244    pub r#code: Option<Box<super::super::types::CodeableConcept>>,
245    #[doc = "The date when or period to which this information refers."]
246    pub r#timing: Option<ExplanationOfBenefitSupportingInfoTiming>,
247    #[doc = "Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data."]
248    pub r#value: Option<ExplanationOfBenefitSupportingInfoValue>,
249    #[doc = "Provides the reason in the situation where a reason code is required in addition to the content."]
250    pub r#reason: Option<Box<super::super::types::Coding>>,
251}
252#[allow(clippy::derivable_impls)]
253impl Default for ExplanationOfBenefitSupportingInfo {
254    fn default() -> Self {
255        Self {
256            r#id: Default::default(),
257            r#extension: Default::default(),
258            r#modifier_extension: Default::default(),
259            r#sequence: super::super::types::PositiveInt {
260                id: Some("$invalid".to_string()),
261                ..Default::default()
262            },
263            r#category: Box::new(super::super::types::CodeableConcept {
264                id: Some("$invalid".to_string()),
265                ..Default::default()
266            }),
267            r#code: Default::default(),
268            r#timing: Default::default(),
269            r#value: Default::default(),
270            r#reason: Default::default(),
271        }
272    }
273}
274#[doc = "Information about diagnoses relevant to the claim items."]
275#[derive(Debug, Clone, PartialEq)]
276pub struct ExplanationOfBenefitDiagnosis {
277    #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
278    pub r#id: Option<std::string::String>,
279    #[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."]
280    pub r#extension: Vec<super::super::types::Extension>,
281    #[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)."]
282    pub r#modifier_extension: Vec<super::super::types::Extension>,
283    #[doc = "A number to uniquely identify diagnosis entries."]
284    pub r#sequence: super::super::types::PositiveInt,
285    #[doc = "The nature of illness or problem in a coded form or as a reference to an external defined Condition."]
286    pub r#diagnosis: ExplanationOfBenefitDiagnosisDiagnosis,
287    #[doc = "When the condition was observed or the relative ranking."]
288    pub r#type: Vec<super::super::types::CodeableConcept>,
289    #[doc = "Indication of whether the diagnosis was present on admission to a facility."]
290    pub r#on_admission: Option<Box<super::super::types::CodeableConcept>>,
291}
292#[allow(clippy::derivable_impls)]
293impl Default for ExplanationOfBenefitDiagnosis {
294    fn default() -> Self {
295        Self {
296            r#id: Default::default(),
297            r#extension: Default::default(),
298            r#modifier_extension: Default::default(),
299            r#sequence: super::super::types::PositiveInt {
300                id: Some("$invalid".to_string()),
301                ..Default::default()
302            },
303            r#diagnosis: Default::default(),
304            r#type: Default::default(),
305            r#on_admission: Default::default(),
306        }
307    }
308}
309#[doc = "Procedures performed on the patient relevant to the billing items with the claim."]
310#[derive(Debug, Clone, PartialEq)]
311pub struct ExplanationOfBenefitProcedure {
312    #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
313    pub r#id: Option<std::string::String>,
314    #[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."]
315    pub r#extension: Vec<super::super::types::Extension>,
316    #[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)."]
317    pub r#modifier_extension: Vec<super::super::types::Extension>,
318    #[doc = "A number to uniquely identify procedure entries."]
319    pub r#sequence: super::super::types::PositiveInt,
320    #[doc = "When the condition was observed or the relative ranking."]
321    pub r#type: Vec<super::super::types::CodeableConcept>,
322    #[doc = "Date and optionally time the procedure was performed."]
323    pub r#date: Option<super::super::types::DateTime>,
324    #[doc = "The code or reference to a Procedure resource which identifies the clinical intervention performed."]
325    pub r#procedure: ExplanationOfBenefitProcedureProcedure,
326    #[doc = "Unique Device Identifiers associated with this line item."]
327    pub r#udi: Vec<super::super::types::Reference>,
328}
329#[allow(clippy::derivable_impls)]
330impl Default for ExplanationOfBenefitProcedure {
331    fn default() -> Self {
332        Self {
333            r#id: Default::default(),
334            r#extension: Default::default(),
335            r#modifier_extension: Default::default(),
336            r#sequence: super::super::types::PositiveInt {
337                id: Some("$invalid".to_string()),
338                ..Default::default()
339            },
340            r#type: Default::default(),
341            r#date: Default::default(),
342            r#procedure: Default::default(),
343            r#udi: Default::default(),
344        }
345    }
346}
347#[doc = "Financial instruments for reimbursement for the health care products and services specified on the claim."]
348#[derive(Debug, Clone, PartialEq)]
349pub struct ExplanationOfBenefitInsurance {
350    #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
351    pub r#id: Option<std::string::String>,
352    #[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."]
353    pub r#extension: Vec<super::super::types::Extension>,
354    #[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)."]
355    pub r#modifier_extension: Vec<super::super::types::Extension>,
356    #[doc = "A flag to indicate that this Coverage is to be used for adjudication of this claim when set to true."]
357    pub r#focal: super::super::types::Boolean,
358    #[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."]
359    pub r#coverage: Box<super::super::types::Reference>,
360    #[doc = "Reference numbers previously provided by the insurer to the provider to be quoted on subsequent claims containing services or products related to the prior authorization."]
361    pub r#pre_auth_ref: Vec<super::super::types::String>,
362}
363#[allow(clippy::derivable_impls)]
364impl Default for ExplanationOfBenefitInsurance {
365    fn default() -> Self {
366        Self {
367            r#id: Default::default(),
368            r#extension: Default::default(),
369            r#modifier_extension: Default::default(),
370            r#focal: super::super::types::Boolean {
371                id: Some("$invalid".to_string()),
372                ..Default::default()
373            },
374            r#coverage: Box::new(super::super::types::Reference {
375                id: Some("$invalid".to_string()),
376                ..Default::default()
377            }),
378            r#pre_auth_ref: Default::default(),
379        }
380    }
381}
382#[doc = "Details of a accident which resulted in injuries which required the products and services listed in the claim."]
383#[derive(Debug, Clone, PartialEq)]
384pub struct ExplanationOfBenefitAccident {
385    #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
386    pub r#id: Option<std::string::String>,
387    #[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."]
388    pub r#extension: Vec<super::super::types::Extension>,
389    #[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)."]
390    pub r#modifier_extension: Vec<super::super::types::Extension>,
391    #[doc = "Date of an accident event  related to the products and services contained in the claim."]
392    pub r#date: Option<super::super::types::Date>,
393    #[doc = "The type or context of the accident event for the purposes of selection of potential insurance coverages and determination of coordination between insurers."]
394    pub r#type: Option<Box<super::super::types::CodeableConcept>>,
395    #[doc = "The physical location of the accident event."]
396    pub r#location: Option<ExplanationOfBenefitAccidentLocation>,
397}
398#[allow(clippy::derivable_impls)]
399impl Default for ExplanationOfBenefitAccident {
400    fn default() -> Self {
401        Self {
402            r#id: Default::default(),
403            r#extension: Default::default(),
404            r#modifier_extension: Default::default(),
405            r#date: Default::default(),
406            r#type: Default::default(),
407            r#location: Default::default(),
408        }
409    }
410}
411#[doc = "Physical location where the service is performed or applies."]
412#[derive(Debug, Clone, PartialEq)]
413pub struct ExplanationOfBenefitItemBodySite {
414    #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
415    pub r#id: Option<std::string::String>,
416    #[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."]
417    pub r#extension: Vec<super::super::types::Extension>,
418    #[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)."]
419    pub r#modifier_extension: Vec<super::super::types::Extension>,
420    #[doc = "Physical service site on the patient (limb, tooth, etc.)."]
421    pub r#site: Vec<super::super::types::CodeableReference>,
422    #[doc = "A region or surface of the bodySite, e.g. limb region or tooth surface(s)."]
423    pub r#sub_site: Vec<super::super::types::CodeableConcept>,
424}
425#[allow(clippy::derivable_impls)]
426impl Default for ExplanationOfBenefitItemBodySite {
427    fn default() -> Self {
428        Self {
429            r#id: Default::default(),
430            r#extension: Default::default(),
431            r#modifier_extension: Default::default(),
432            r#site: Default::default(),
433            r#sub_site: Default::default(),
434        }
435    }
436}
437#[doc = "The high-level results of the adjudication if adjudication has been performed."]
438#[derive(Debug, Clone, PartialEq)]
439pub struct ExplanationOfBenefitItemReviewOutcome {
440    #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
441    pub r#id: Option<std::string::String>,
442    #[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."]
443    pub r#extension: Vec<super::super::types::Extension>,
444    #[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)."]
445    pub r#modifier_extension: Vec<super::super::types::Extension>,
446    #[doc = "The result of the claim, predetermination, or preauthorization adjudication."]
447    pub r#decision: Option<Box<super::super::types::CodeableConcept>>,
448    #[doc = "The reasons for the result of the claim, predetermination, or preauthorization adjudication."]
449    pub r#reason: Vec<super::super::types::CodeableConcept>,
450    #[doc = "Reference from the Insurer which is used in later communications which refers to this adjudication."]
451    pub r#pre_auth_ref: Option<super::super::types::String>,
452    #[doc = "The time frame during which this authorization is effective."]
453    pub r#pre_auth_period: Option<Box<super::super::types::Period>>,
454}
455#[allow(clippy::derivable_impls)]
456impl Default for ExplanationOfBenefitItemReviewOutcome {
457    fn default() -> Self {
458        Self {
459            r#id: Default::default(),
460            r#extension: Default::default(),
461            r#modifier_extension: Default::default(),
462            r#decision: Default::default(),
463            r#reason: Default::default(),
464            r#pre_auth_ref: Default::default(),
465            r#pre_auth_period: Default::default(),
466        }
467    }
468}
469#[doc = "If this item is a group then the values here are a summary of the adjudication of the detail items. If this item is a simple product or service then this is the result of the adjudication of this item."]
470#[derive(Debug, Clone, PartialEq)]
471pub struct ExplanationOfBenefitItemAdjudication {
472    #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
473    pub r#id: Option<std::string::String>,
474    #[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."]
475    pub r#extension: Vec<super::super::types::Extension>,
476    #[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)."]
477    pub r#modifier_extension: Vec<super::super::types::Extension>,
478    #[doc = "A code to indicate the information type of this adjudication record. Information types may include: the value submitted, maximum values or percentages allowed or payable under the plan, amounts that the patient is responsible for in-aggregate or pertaining to this item, amounts paid by other coverages, and the benefit payable for this item."]
479    pub r#category: Box<super::super::types::CodeableConcept>,
480    #[doc = "A code supporting the understanding of the adjudication result and explaining variance from expected amount."]
481    pub r#reason: Option<Box<super::super::types::CodeableConcept>>,
482    #[doc = "Monetary amount associated with the category."]
483    pub r#amount: Option<Box<super::super::types::Money>>,
484    #[doc = "A non-monetary value associated with the category. Mutually exclusive to the amount element above."]
485    pub r#quantity: Option<Box<super::super::types::Quantity>>,
486}
487#[allow(clippy::derivable_impls)]
488impl Default for ExplanationOfBenefitItemAdjudication {
489    fn default() -> Self {
490        Self {
491            r#id: Default::default(),
492            r#extension: Default::default(),
493            r#modifier_extension: Default::default(),
494            r#category: Box::new(super::super::types::CodeableConcept {
495                id: Some("$invalid".to_string()),
496                ..Default::default()
497            }),
498            r#reason: Default::default(),
499            r#amount: Default::default(),
500            r#quantity: Default::default(),
501        }
502    }
503}
504#[doc = "Third-tier of goods and services."]
505#[derive(Debug, Clone, PartialEq)]
506pub struct ExplanationOfBenefitItemDetailSubDetail {
507    #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
508    pub r#id: Option<std::string::String>,
509    #[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."]
510    pub r#extension: Vec<super::super::types::Extension>,
511    #[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)."]
512    pub r#modifier_extension: Vec<super::super::types::Extension>,
513    #[doc = "A claim detail line. Either a simple (a product or service) or a 'group' of sub-details which are simple items."]
514    pub r#sequence: super::super::types::PositiveInt,
515    #[doc = "Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners."]
516    pub r#trace_number: Vec<super::super::types::Identifier>,
517    #[doc = "The type of revenue or cost center providing the product and/or service."]
518    pub r#revenue: Option<Box<super::super::types::CodeableConcept>>,
519    #[doc = "Code to identify the general type of benefits under which products and services are provided."]
520    pub r#category: Option<Box<super::super::types::CodeableConcept>>,
521    #[doc = "When the value is a group code then this item collects a set of related item details, otherwise this contains the product, service, drug or other billing code for the item. This element may be the start of a range of .productOrService codes used in conjunction with .productOrServiceEnd or it may be a solo element where .productOrServiceEnd is not used."]
522    pub r#product_or_service: Option<Box<super::super::types::CodeableConcept>>,
523    #[doc = "This contains the end of a range of product, service, drug or other billing codes for the item. This element is not used when the .productOrService is a group code. This value may only be present when a .productOfService code has been provided to convey the start of the range. Typically this value may be used only with preauthorizations and not with claims."]
524    pub r#product_or_service_end: Option<Box<super::super::types::CodeableConcept>>,
525    #[doc = "Item typification or modifiers codes to convey additional context for the product or service."]
526    pub r#modifier: Vec<super::super::types::CodeableConcept>,
527    #[doc = "Identifies the program under which this may be recovered."]
528    pub r#program_code: Vec<super::super::types::CodeableConcept>,
529    #[doc = "The amount paid by the patient, in total at the claim claim level or specifically for the item and detail level, to the provider for goods and services."]
530    pub r#patient_paid: Option<Box<super::super::types::Money>>,
531    #[doc = "The number of repetitions of a service or product."]
532    pub r#quantity: Option<Box<super::super::types::Quantity>>,
533    #[doc = "If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group."]
534    pub r#unit_price: Option<Box<super::super::types::Money>>,
535    #[doc = "A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount."]
536    pub r#factor: Option<super::super::types::Decimal>,
537    #[doc = "The total of taxes applicable for this product or service."]
538    pub r#tax: Option<Box<super::super::types::Money>>,
539    #[doc = "The total amount claimed for the line item.detail.subDetail. Net = unit price * quantity * factor."]
540    pub r#net: Option<Box<super::super::types::Money>>,
541    #[doc = "Unique Device Identifiers associated with this line item."]
542    pub r#udi: Vec<super::super::types::Reference>,
543    #[doc = "The numbers associated with notes below which apply to the adjudication of this item."]
544    pub r#note_number: Vec<super::super::types::PositiveInt>,
545    #[doc = "The high-level results of the adjudication if adjudication has been performed."]
546    pub r#review_outcome: Option<ExplanationOfBenefitItemReviewOutcome>,
547    #[doc = "The adjudication results."]
548    pub r#adjudication: Vec<ExplanationOfBenefitItemAdjudication>,
549}
550#[allow(clippy::derivable_impls)]
551impl Default for ExplanationOfBenefitItemDetailSubDetail {
552    fn default() -> Self {
553        Self {
554            r#id: Default::default(),
555            r#extension: Default::default(),
556            r#modifier_extension: Default::default(),
557            r#sequence: super::super::types::PositiveInt {
558                id: Some("$invalid".to_string()),
559                ..Default::default()
560            },
561            r#trace_number: Default::default(),
562            r#revenue: Default::default(),
563            r#category: Default::default(),
564            r#product_or_service: Default::default(),
565            r#product_or_service_end: Default::default(),
566            r#modifier: Default::default(),
567            r#program_code: Default::default(),
568            r#patient_paid: Default::default(),
569            r#quantity: Default::default(),
570            r#unit_price: Default::default(),
571            r#factor: Default::default(),
572            r#tax: Default::default(),
573            r#net: Default::default(),
574            r#udi: Default::default(),
575            r#note_number: Default::default(),
576            r#review_outcome: Default::default(),
577            r#adjudication: Default::default(),
578        }
579    }
580}
581#[doc = "Second-tier of goods and services."]
582#[derive(Debug, Clone, PartialEq)]
583pub struct ExplanationOfBenefitItemDetail {
584    #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
585    pub r#id: Option<std::string::String>,
586    #[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."]
587    pub r#extension: Vec<super::super::types::Extension>,
588    #[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)."]
589    pub r#modifier_extension: Vec<super::super::types::Extension>,
590    #[doc = "A claim detail line. Either a simple (a product or service) or a 'group' of sub-details which are simple items."]
591    pub r#sequence: super::super::types::PositiveInt,
592    #[doc = "Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners."]
593    pub r#trace_number: Vec<super::super::types::Identifier>,
594    #[doc = "The type of revenue or cost center providing the product and/or service."]
595    pub r#revenue: Option<Box<super::super::types::CodeableConcept>>,
596    #[doc = "Code to identify the general type of benefits under which products and services are provided."]
597    pub r#category: Option<Box<super::super::types::CodeableConcept>>,
598    #[doc = "When the value is a group code then this item collects a set of related item details, otherwise this contains the product, service, drug or other billing code for the item. This element may be the start of a range of .productOrService codes used in conjunction with .productOrServiceEnd or it may be a solo element where .productOrServiceEnd is not used."]
599    pub r#product_or_service: Option<Box<super::super::types::CodeableConcept>>,
600    #[doc = "This contains the end of a range of product, service, drug or other billing codes for the item. This element is not used when the .productOrService is a group code. This value may only be present when a .productOfService code has been provided to convey the start of the range. Typically this value may be used only with preauthorizations and not with claims."]
601    pub r#product_or_service_end: Option<Box<super::super::types::CodeableConcept>>,
602    #[doc = "Item typification or modifiers codes to convey additional context for the product or service."]
603    pub r#modifier: Vec<super::super::types::CodeableConcept>,
604    #[doc = "Identifies the program under which this may be recovered."]
605    pub r#program_code: Vec<super::super::types::CodeableConcept>,
606    #[doc = "The amount paid by the patient, in total at the claim claim level or specifically for the item and detail level, to the provider for goods and services."]
607    pub r#patient_paid: Option<Box<super::super::types::Money>>,
608    #[doc = "The number of repetitions of a service or product."]
609    pub r#quantity: Option<Box<super::super::types::Quantity>>,
610    #[doc = "If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group."]
611    pub r#unit_price: Option<Box<super::super::types::Money>>,
612    #[doc = "A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount."]
613    pub r#factor: Option<super::super::types::Decimal>,
614    #[doc = "The total of taxes applicable for this product or service."]
615    pub r#tax: Option<Box<super::super::types::Money>>,
616    #[doc = "The total amount claimed for the group (if a grouper) or the line item.detail. Net = unit price * quantity * factor."]
617    pub r#net: Option<Box<super::super::types::Money>>,
618    #[doc = "Unique Device Identifiers associated with this line item."]
619    pub r#udi: Vec<super::super::types::Reference>,
620    #[doc = "The numbers associated with notes below which apply to the adjudication of this item."]
621    pub r#note_number: Vec<super::super::types::PositiveInt>,
622    #[doc = "The high-level results of the adjudication if adjudication has been performed."]
623    pub r#review_outcome: Option<ExplanationOfBenefitItemReviewOutcome>,
624    #[doc = "The adjudication results."]
625    pub r#adjudication: Vec<ExplanationOfBenefitItemAdjudication>,
626    #[doc = "Third-tier of goods and services."]
627    pub r#sub_detail: Vec<ExplanationOfBenefitItemDetailSubDetail>,
628}
629#[allow(clippy::derivable_impls)]
630impl Default for ExplanationOfBenefitItemDetail {
631    fn default() -> Self {
632        Self {
633            r#id: Default::default(),
634            r#extension: Default::default(),
635            r#modifier_extension: Default::default(),
636            r#sequence: super::super::types::PositiveInt {
637                id: Some("$invalid".to_string()),
638                ..Default::default()
639            },
640            r#trace_number: Default::default(),
641            r#revenue: Default::default(),
642            r#category: Default::default(),
643            r#product_or_service: Default::default(),
644            r#product_or_service_end: Default::default(),
645            r#modifier: Default::default(),
646            r#program_code: Default::default(),
647            r#patient_paid: Default::default(),
648            r#quantity: Default::default(),
649            r#unit_price: Default::default(),
650            r#factor: Default::default(),
651            r#tax: Default::default(),
652            r#net: Default::default(),
653            r#udi: Default::default(),
654            r#note_number: Default::default(),
655            r#review_outcome: Default::default(),
656            r#adjudication: Default::default(),
657            r#sub_detail: Default::default(),
658        }
659    }
660}
661#[doc = "A claim line. Either a simple (a product or service) or a 'group' of details which can also be a simple items or groups of sub-details."]
662#[derive(Debug, Clone, PartialEq)]
663pub struct ExplanationOfBenefitItem {
664    #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
665    pub r#id: Option<std::string::String>,
666    #[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."]
667    pub r#extension: Vec<super::super::types::Extension>,
668    #[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)."]
669    pub r#modifier_extension: Vec<super::super::types::Extension>,
670    #[doc = "A number to uniquely identify item entries."]
671    pub r#sequence: super::super::types::PositiveInt,
672    #[doc = "Care team members related to this service or product."]
673    pub r#care_team_sequence: Vec<super::super::types::PositiveInt>,
674    #[doc = "Diagnoses applicable for this service or product."]
675    pub r#diagnosis_sequence: Vec<super::super::types::PositiveInt>,
676    #[doc = "Procedures applicable for this service or product."]
677    pub r#procedure_sequence: Vec<super::super::types::PositiveInt>,
678    #[doc = "Exceptions, special conditions and supporting information applicable for this service or product."]
679    pub r#information_sequence: Vec<super::super::types::PositiveInt>,
680    #[doc = "Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners."]
681    pub r#trace_number: Vec<super::super::types::Identifier>,
682    #[doc = "The type of revenue or cost center providing the product and/or service."]
683    pub r#revenue: Option<Box<super::super::types::CodeableConcept>>,
684    #[doc = "Code to identify the general type of benefits under which products and services are provided."]
685    pub r#category: Option<Box<super::super::types::CodeableConcept>>,
686    #[doc = "When the value is a group code then this item collects a set of related item details, otherwise this contains the product, service, drug or other billing code for the item. This element may be the start of a range of .productOrService codes used in conjunction with .productOrServiceEnd or it may be a solo element where .productOrServiceEnd is not used."]
687    pub r#product_or_service: Option<Box<super::super::types::CodeableConcept>>,
688    #[doc = "This contains the end of a range of product, service, drug or other billing codes for the item. This element is not used when the .productOrService is a group code. This value may only be present when a .productOfService code has been provided to convey the start of the range. Typically this value may be used only with preauthorizations and not with claims."]
689    pub r#product_or_service_end: Option<Box<super::super::types::CodeableConcept>>,
690    #[doc = "Request or Referral for Goods or Service to be rendered."]
691    pub r#request: Vec<super::super::types::Reference>,
692    #[doc = "Item typification or modifiers codes to convey additional context for the product or service."]
693    pub r#modifier: Vec<super::super::types::CodeableConcept>,
694    #[doc = "Identifies the program under which this may be recovered."]
695    pub r#program_code: Vec<super::super::types::CodeableConcept>,
696    #[doc = "The date or dates when the service or product was supplied, performed or completed."]
697    pub r#serviced: Option<ExplanationOfBenefitItemServiced>,
698    #[doc = "Where the product or service was provided."]
699    pub r#location: Option<ExplanationOfBenefitItemLocation>,
700    #[doc = "The amount paid by the patient, in total at the claim claim level or specifically for the item and detail level, to the provider for goods and services."]
701    pub r#patient_paid: Option<Box<super::super::types::Money>>,
702    #[doc = "The number of repetitions of a service or product."]
703    pub r#quantity: Option<Box<super::super::types::Quantity>>,
704    #[doc = "If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group."]
705    pub r#unit_price: Option<Box<super::super::types::Money>>,
706    #[doc = "A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount."]
707    pub r#factor: Option<super::super::types::Decimal>,
708    #[doc = "The total of taxes applicable for this product or service."]
709    pub r#tax: Option<Box<super::super::types::Money>>,
710    #[doc = "The total amount claimed for the group (if a grouper) or the line item. Net = unit price * quantity * factor."]
711    pub r#net: Option<Box<super::super::types::Money>>,
712    #[doc = "Unique Device Identifiers associated with this line item."]
713    pub r#udi: Vec<super::super::types::Reference>,
714    #[doc = "Physical location where the service is performed or applies."]
715    pub r#body_site: Vec<ExplanationOfBenefitItemBodySite>,
716    #[doc = "Healthcare encounters related to this claim."]
717    pub r#encounter: Vec<super::super::types::Reference>,
718    #[doc = "The numbers associated with notes below which apply to the adjudication of this item."]
719    pub r#note_number: Vec<super::super::types::PositiveInt>,
720    #[doc = "The high-level results of the adjudication if adjudication has been performed."]
721    pub r#review_outcome: Option<ExplanationOfBenefitItemReviewOutcome>,
722    #[doc = "If this item is a group then the values here are a summary of the adjudication of the detail items. If this item is a simple product or service then this is the result of the adjudication of this item."]
723    pub r#adjudication: Vec<ExplanationOfBenefitItemAdjudication>,
724    #[doc = "Second-tier of goods and services."]
725    pub r#detail: Vec<ExplanationOfBenefitItemDetail>,
726}
727#[allow(clippy::derivable_impls)]
728impl Default for ExplanationOfBenefitItem {
729    fn default() -> Self {
730        Self {
731            r#id: Default::default(),
732            r#extension: Default::default(),
733            r#modifier_extension: Default::default(),
734            r#sequence: super::super::types::PositiveInt {
735                id: Some("$invalid".to_string()),
736                ..Default::default()
737            },
738            r#care_team_sequence: Default::default(),
739            r#diagnosis_sequence: Default::default(),
740            r#procedure_sequence: Default::default(),
741            r#information_sequence: Default::default(),
742            r#trace_number: Default::default(),
743            r#revenue: Default::default(),
744            r#category: Default::default(),
745            r#product_or_service: Default::default(),
746            r#product_or_service_end: Default::default(),
747            r#request: Default::default(),
748            r#modifier: Default::default(),
749            r#program_code: Default::default(),
750            r#serviced: Default::default(),
751            r#location: Default::default(),
752            r#patient_paid: Default::default(),
753            r#quantity: Default::default(),
754            r#unit_price: Default::default(),
755            r#factor: Default::default(),
756            r#tax: Default::default(),
757            r#net: Default::default(),
758            r#udi: Default::default(),
759            r#body_site: Default::default(),
760            r#encounter: Default::default(),
761            r#note_number: Default::default(),
762            r#review_outcome: Default::default(),
763            r#adjudication: Default::default(),
764            r#detail: Default::default(),
765        }
766    }
767}
768#[doc = "Physical location where the service is performed or applies."]
769#[derive(Debug, Clone, PartialEq)]
770pub struct ExplanationOfBenefitAddItemBodySite {
771    #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
772    pub r#id: Option<std::string::String>,
773    #[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."]
774    pub r#extension: Vec<super::super::types::Extension>,
775    #[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)."]
776    pub r#modifier_extension: Vec<super::super::types::Extension>,
777    #[doc = "Physical service site on the patient (limb, tooth, etc.)."]
778    pub r#site: Vec<super::super::types::CodeableReference>,
779    #[doc = "A region or surface of the bodySite, e.g. limb region or tooth surface(s)."]
780    pub r#sub_site: Vec<super::super::types::CodeableConcept>,
781}
782#[allow(clippy::derivable_impls)]
783impl Default for ExplanationOfBenefitAddItemBodySite {
784    fn default() -> Self {
785        Self {
786            r#id: Default::default(),
787            r#extension: Default::default(),
788            r#modifier_extension: Default::default(),
789            r#site: Default::default(),
790            r#sub_site: Default::default(),
791        }
792    }
793}
794#[doc = "The third-tier service adjudications for payor added services."]
795#[derive(Debug, Clone, PartialEq)]
796pub struct ExplanationOfBenefitAddItemDetailSubDetail {
797    #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
798    pub r#id: Option<std::string::String>,
799    #[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."]
800    pub r#extension: Vec<super::super::types::Extension>,
801    #[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)."]
802    pub r#modifier_extension: Vec<super::super::types::Extension>,
803    #[doc = "Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners."]
804    pub r#trace_number: Vec<super::super::types::Identifier>,
805    #[doc = "The type of revenue or cost center providing the product and/or service."]
806    pub r#revenue: Option<Box<super::super::types::CodeableConcept>>,
807    #[doc = "When the value is a group code then this item collects a set of related item details, otherwise this contains the product, service, drug or other billing code for the item. This element may be the start of a range of .productOrService codes used in conjunction with .productOrServiceEnd or it may be a solo element where .productOrServiceEnd is not used."]
808    pub r#product_or_service: Option<Box<super::super::types::CodeableConcept>>,
809    #[doc = "This contains the end of a range of product, service, drug or other billing codes for the item. This element is not used when the .productOrService is a group code. This value may only be present when a .productOfService code has been provided to convey the start of the range. Typically this value may be used only with preauthorizations and not with claims."]
810    pub r#product_or_service_end: Option<Box<super::super::types::CodeableConcept>>,
811    #[doc = "Item typification or modifiers codes to convey additional context for the product or service."]
812    pub r#modifier: Vec<super::super::types::CodeableConcept>,
813    #[doc = "The amount paid by the patient, in total at the claim claim level or specifically for the item and detail level, to the provider for goods and services."]
814    pub r#patient_paid: Option<Box<super::super::types::Money>>,
815    #[doc = "The number of repetitions of a service or product."]
816    pub r#quantity: Option<Box<super::super::types::Quantity>>,
817    #[doc = "If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group."]
818    pub r#unit_price: Option<Box<super::super::types::Money>>,
819    #[doc = "A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount."]
820    pub r#factor: Option<super::super::types::Decimal>,
821    #[doc = "The total of taxes applicable for this product or service."]
822    pub r#tax: Option<Box<super::super::types::Money>>,
823    #[doc = "The total amount claimed for the addItem.detail.subDetail. Net = unit price * quantity * factor."]
824    pub r#net: Option<Box<super::super::types::Money>>,
825    #[doc = "The numbers associated with notes below which apply to the adjudication of this item."]
826    pub r#note_number: Vec<super::super::types::PositiveInt>,
827    #[doc = "The high-level results of the adjudication if adjudication has been performed."]
828    pub r#review_outcome: Option<ExplanationOfBenefitItemReviewOutcome>,
829    #[doc = "The adjudication results."]
830    pub r#adjudication: Vec<ExplanationOfBenefitItemAdjudication>,
831}
832#[allow(clippy::derivable_impls)]
833impl Default for ExplanationOfBenefitAddItemDetailSubDetail {
834    fn default() -> Self {
835        Self {
836            r#id: Default::default(),
837            r#extension: Default::default(),
838            r#modifier_extension: Default::default(),
839            r#trace_number: Default::default(),
840            r#revenue: Default::default(),
841            r#product_or_service: Default::default(),
842            r#product_or_service_end: Default::default(),
843            r#modifier: Default::default(),
844            r#patient_paid: Default::default(),
845            r#quantity: Default::default(),
846            r#unit_price: Default::default(),
847            r#factor: Default::default(),
848            r#tax: Default::default(),
849            r#net: Default::default(),
850            r#note_number: Default::default(),
851            r#review_outcome: Default::default(),
852            r#adjudication: Default::default(),
853        }
854    }
855}
856#[doc = "The second-tier service adjudications for payor added services."]
857#[derive(Debug, Clone, PartialEq)]
858pub struct ExplanationOfBenefitAddItemDetail {
859    #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
860    pub r#id: Option<std::string::String>,
861    #[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."]
862    pub r#extension: Vec<super::super::types::Extension>,
863    #[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)."]
864    pub r#modifier_extension: Vec<super::super::types::Extension>,
865    #[doc = "Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners."]
866    pub r#trace_number: Vec<super::super::types::Identifier>,
867    #[doc = "The type of revenue or cost center providing the product and/or service."]
868    pub r#revenue: Option<Box<super::super::types::CodeableConcept>>,
869    #[doc = "When the value is a group code then this item collects a set of related item details, otherwise this contains the product, service, drug or other billing code for the item. This element may be the start of a range of .productOrService codes used in conjunction with .productOrServiceEnd or it may be a solo element where .productOrServiceEnd is not used."]
870    pub r#product_or_service: Option<Box<super::super::types::CodeableConcept>>,
871    #[doc = "This contains the end of a range of product, service, drug or other billing codes for the item. This element is not used when the .productOrService is a group code. This value may only be present when a .productOfService code has been provided to convey the start of the range. Typically this value may be used only with preauthorizations and not with claims."]
872    pub r#product_or_service_end: Option<Box<super::super::types::CodeableConcept>>,
873    #[doc = "Item typification or modifiers codes to convey additional context for the product or service."]
874    pub r#modifier: Vec<super::super::types::CodeableConcept>,
875    #[doc = "The amount paid by the patient, in total at the claim claim level or specifically for the item and detail level, to the provider for goods and services."]
876    pub r#patient_paid: Option<Box<super::super::types::Money>>,
877    #[doc = "The number of repetitions of a service or product."]
878    pub r#quantity: Option<Box<super::super::types::Quantity>>,
879    #[doc = "If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group."]
880    pub r#unit_price: Option<Box<super::super::types::Money>>,
881    #[doc = "A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount."]
882    pub r#factor: Option<super::super::types::Decimal>,
883    #[doc = "The total of taxes applicable for this product or service."]
884    pub r#tax: Option<Box<super::super::types::Money>>,
885    #[doc = "The total amount claimed for the group (if a grouper) or the addItem.detail. Net = unit price * quantity * factor."]
886    pub r#net: Option<Box<super::super::types::Money>>,
887    #[doc = "The numbers associated with notes below which apply to the adjudication of this item."]
888    pub r#note_number: Vec<super::super::types::PositiveInt>,
889    #[doc = "The high-level results of the adjudication if adjudication has been performed."]
890    pub r#review_outcome: Option<ExplanationOfBenefitItemReviewOutcome>,
891    #[doc = "The adjudication results."]
892    pub r#adjudication: Vec<ExplanationOfBenefitItemAdjudication>,
893    #[doc = "The third-tier service adjudications for payor added services."]
894    pub r#sub_detail: Vec<ExplanationOfBenefitAddItemDetailSubDetail>,
895}
896#[allow(clippy::derivable_impls)]
897impl Default for ExplanationOfBenefitAddItemDetail {
898    fn default() -> Self {
899        Self {
900            r#id: Default::default(),
901            r#extension: Default::default(),
902            r#modifier_extension: Default::default(),
903            r#trace_number: Default::default(),
904            r#revenue: Default::default(),
905            r#product_or_service: Default::default(),
906            r#product_or_service_end: Default::default(),
907            r#modifier: Default::default(),
908            r#patient_paid: Default::default(),
909            r#quantity: Default::default(),
910            r#unit_price: Default::default(),
911            r#factor: Default::default(),
912            r#tax: Default::default(),
913            r#net: Default::default(),
914            r#note_number: Default::default(),
915            r#review_outcome: Default::default(),
916            r#adjudication: Default::default(),
917            r#sub_detail: Default::default(),
918        }
919    }
920}
921#[doc = "The first-tier service adjudications for payor added product or service lines."]
922#[derive(Debug, Clone, PartialEq)]
923pub struct ExplanationOfBenefitAddItem {
924    #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
925    pub r#id: Option<std::string::String>,
926    #[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."]
927    pub r#extension: Vec<super::super::types::Extension>,
928    #[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)."]
929    pub r#modifier_extension: Vec<super::super::types::Extension>,
930    #[doc = "Claim items which this service line is intended to replace."]
931    pub r#item_sequence: Vec<super::super::types::PositiveInt>,
932    #[doc = "The sequence number of the details within the claim item which this line is intended to replace."]
933    pub r#detail_sequence: Vec<super::super::types::PositiveInt>,
934    #[doc = "The sequence number of the sub-details woithin the details within the claim item which this line is intended to replace."]
935    pub r#sub_detail_sequence: Vec<super::super::types::PositiveInt>,
936    #[doc = "Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners."]
937    pub r#trace_number: Vec<super::super::types::Identifier>,
938    #[doc = "The providers who are authorized for the services rendered to the patient."]
939    pub r#provider: Vec<super::super::types::Reference>,
940    #[doc = "The type of revenue or cost center providing the product and/or service."]
941    pub r#revenue: Option<Box<super::super::types::CodeableConcept>>,
942    #[doc = "When the value is a group code then this item collects a set of related item details, otherwise this contains the product, service, drug or other billing code for the item. This element may be the start of a range of .productOrService codes used in conjunction with .productOrServiceEnd or it may be a solo element where .productOrServiceEnd is not used."]
943    pub r#product_or_service: Option<Box<super::super::types::CodeableConcept>>,
944    #[doc = "This contains the end of a range of product, service, drug or other billing codes for the item. This element is not used when the .productOrService is a group code. This value may only be present when a .productOfService code has been provided to convey the start of the range. Typically this value may be used only with preauthorizations and not with claims."]
945    pub r#product_or_service_end: Option<Box<super::super::types::CodeableConcept>>,
946    #[doc = "Request or Referral for Goods or Service to be rendered."]
947    pub r#request: Vec<super::super::types::Reference>,
948    #[doc = "Item typification or modifiers codes to convey additional context for the product or service."]
949    pub r#modifier: Vec<super::super::types::CodeableConcept>,
950    #[doc = "Identifies the program under which this may be recovered."]
951    pub r#program_code: Vec<super::super::types::CodeableConcept>,
952    #[doc = "The date or dates when the service or product was supplied, performed or completed."]
953    pub r#serviced: Option<ExplanationOfBenefitAddItemServiced>,
954    #[doc = "Where the product or service was provided."]
955    pub r#location: Option<ExplanationOfBenefitAddItemLocation>,
956    #[doc = "The amount paid by the patient, in total at the claim claim level or specifically for the item and detail level, to the provider for goods and services."]
957    pub r#patient_paid: Option<Box<super::super::types::Money>>,
958    #[doc = "The number of repetitions of a service or product."]
959    pub r#quantity: Option<Box<super::super::types::Quantity>>,
960    #[doc = "If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group."]
961    pub r#unit_price: Option<Box<super::super::types::Money>>,
962    #[doc = "A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount."]
963    pub r#factor: Option<super::super::types::Decimal>,
964    #[doc = "The total of taxes applicable for this product or service."]
965    pub r#tax: Option<Box<super::super::types::Money>>,
966    #[doc = "The total amount claimed for the group (if a grouper) or the addItem. Net = unit price * quantity * factor."]
967    pub r#net: Option<Box<super::super::types::Money>>,
968    #[doc = "Physical location where the service is performed or applies."]
969    pub r#body_site: Vec<ExplanationOfBenefitAddItemBodySite>,
970    #[doc = "The numbers associated with notes below which apply to the adjudication of this item."]
971    pub r#note_number: Vec<super::super::types::PositiveInt>,
972    #[doc = "The high-level results of the adjudication if adjudication has been performed."]
973    pub r#review_outcome: Option<ExplanationOfBenefitItemReviewOutcome>,
974    #[doc = "The adjudication results."]
975    pub r#adjudication: Vec<ExplanationOfBenefitItemAdjudication>,
976    #[doc = "The second-tier service adjudications for payor added services."]
977    pub r#detail: Vec<ExplanationOfBenefitAddItemDetail>,
978}
979#[allow(clippy::derivable_impls)]
980impl Default for ExplanationOfBenefitAddItem {
981    fn default() -> Self {
982        Self {
983            r#id: Default::default(),
984            r#extension: Default::default(),
985            r#modifier_extension: Default::default(),
986            r#item_sequence: Default::default(),
987            r#detail_sequence: Default::default(),
988            r#sub_detail_sequence: Default::default(),
989            r#trace_number: Default::default(),
990            r#provider: Default::default(),
991            r#revenue: Default::default(),
992            r#product_or_service: Default::default(),
993            r#product_or_service_end: Default::default(),
994            r#request: Default::default(),
995            r#modifier: Default::default(),
996            r#program_code: Default::default(),
997            r#serviced: Default::default(),
998            r#location: Default::default(),
999            r#patient_paid: Default::default(),
1000            r#quantity: Default::default(),
1001            r#unit_price: Default::default(),
1002            r#factor: Default::default(),
1003            r#tax: Default::default(),
1004            r#net: Default::default(),
1005            r#body_site: Default::default(),
1006            r#note_number: Default::default(),
1007            r#review_outcome: Default::default(),
1008            r#adjudication: Default::default(),
1009            r#detail: Default::default(),
1010        }
1011    }
1012}
1013#[doc = "Categorized monetary totals for the adjudication."]
1014#[derive(Debug, Clone, PartialEq)]
1015pub struct ExplanationOfBenefitTotal {
1016    #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
1017    pub r#id: Option<std::string::String>,
1018    #[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."]
1019    pub r#extension: Vec<super::super::types::Extension>,
1020    #[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)."]
1021    pub r#modifier_extension: Vec<super::super::types::Extension>,
1022    #[doc = "A code to indicate the information type of this adjudication record. Information types may include: the value submitted, maximum values or percentages allowed or payable under the plan, amounts that the patient is responsible for in aggregate or pertaining to this item, amounts paid by other coverages, and the benefit payable for this item."]
1023    pub r#category: Box<super::super::types::CodeableConcept>,
1024    #[doc = "Monetary total amount associated with the category."]
1025    pub r#amount: Box<super::super::types::Money>,
1026}
1027#[allow(clippy::derivable_impls)]
1028impl Default for ExplanationOfBenefitTotal {
1029    fn default() -> Self {
1030        Self {
1031            r#id: Default::default(),
1032            r#extension: Default::default(),
1033            r#modifier_extension: Default::default(),
1034            r#category: Box::new(super::super::types::CodeableConcept {
1035                id: Some("$invalid".to_string()),
1036                ..Default::default()
1037            }),
1038            r#amount: Box::new(super::super::types::Money {
1039                id: Some("$invalid".to_string()),
1040                ..Default::default()
1041            }),
1042        }
1043    }
1044}
1045#[doc = "Payment details for the adjudication of the claim."]
1046#[derive(Debug, Clone, PartialEq)]
1047pub struct ExplanationOfBenefitPayment {
1048    #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
1049    pub r#id: Option<std::string::String>,
1050    #[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."]
1051    pub r#extension: Vec<super::super::types::Extension>,
1052    #[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)."]
1053    pub r#modifier_extension: Vec<super::super::types::Extension>,
1054    #[doc = "Whether this represents partial or complete payment of the benefits payable."]
1055    pub r#type: Option<Box<super::super::types::CodeableConcept>>,
1056    #[doc = "Total amount of all adjustments to this payment included in this transaction which are not related to this claim's adjudication."]
1057    pub r#adjustment: Option<Box<super::super::types::Money>>,
1058    #[doc = "Reason for the payment adjustment."]
1059    pub r#adjustment_reason: Option<Box<super::super::types::CodeableConcept>>,
1060    #[doc = "Estimated date the payment will be issued or the actual issue date of payment."]
1061    pub r#date: Option<super::super::types::Date>,
1062    #[doc = "Benefits payable less any payment adjustment."]
1063    pub r#amount: Option<Box<super::super::types::Money>>,
1064    #[doc = "Issuer's unique identifier for the payment instrument."]
1065    pub r#identifier: Option<Box<super::super::types::Identifier>>,
1066}
1067#[allow(clippy::derivable_impls)]
1068impl Default for ExplanationOfBenefitPayment {
1069    fn default() -> Self {
1070        Self {
1071            r#id: Default::default(),
1072            r#extension: Default::default(),
1073            r#modifier_extension: Default::default(),
1074            r#type: Default::default(),
1075            r#adjustment: Default::default(),
1076            r#adjustment_reason: Default::default(),
1077            r#date: Default::default(),
1078            r#amount: Default::default(),
1079            r#identifier: Default::default(),
1080        }
1081    }
1082}
1083#[doc = "A note that describes or explains adjudication results in a human readable form."]
1084#[derive(Debug, Clone, PartialEq)]
1085pub struct ExplanationOfBenefitProcessNote {
1086    #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
1087    pub r#id: Option<std::string::String>,
1088    #[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."]
1089    pub r#extension: Vec<super::super::types::Extension>,
1090    #[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)."]
1091    pub r#modifier_extension: Vec<super::super::types::Extension>,
1092    #[doc = "A number to uniquely identify a note entry."]
1093    pub r#number: Option<super::super::types::PositiveInt>,
1094    #[doc = "The business purpose of the note text."]
1095    pub r#type: Option<Box<super::super::types::CodeableConcept>>,
1096    #[doc = "The explanation or description associated with the processing."]
1097    pub r#text: Option<super::super::types::String>,
1098    #[doc = "A code to define the language used in the text of the note."]
1099    pub r#language: Option<Box<super::super::types::CodeableConcept>>,
1100}
1101#[allow(clippy::derivable_impls)]
1102impl Default for ExplanationOfBenefitProcessNote {
1103    fn default() -> Self {
1104        Self {
1105            r#id: Default::default(),
1106            r#extension: Default::default(),
1107            r#modifier_extension: Default::default(),
1108            r#number: Default::default(),
1109            r#type: Default::default(),
1110            r#text: Default::default(),
1111            r#language: Default::default(),
1112        }
1113    }
1114}
1115#[doc = "Benefits Used to date."]
1116#[derive(Debug, Clone, PartialEq)]
1117pub struct ExplanationOfBenefitBenefitBalanceFinancial {
1118    #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
1119    pub r#id: Option<std::string::String>,
1120    #[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."]
1121    pub r#extension: Vec<super::super::types::Extension>,
1122    #[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)."]
1123    pub r#modifier_extension: Vec<super::super::types::Extension>,
1124    #[doc = "Classification of benefit being provided."]
1125    pub r#type: Box<super::super::types::CodeableConcept>,
1126    #[doc = "The quantity of the benefit which is permitted under the coverage."]
1127    pub r#allowed: Option<ExplanationOfBenefitBenefitBalanceFinancialAllowed>,
1128    #[doc = "The quantity of the benefit which have been consumed to date."]
1129    pub r#used: Option<ExplanationOfBenefitBenefitBalanceFinancialUsed>,
1130}
1131#[allow(clippy::derivable_impls)]
1132impl Default for ExplanationOfBenefitBenefitBalanceFinancial {
1133    fn default() -> Self {
1134        Self {
1135            r#id: Default::default(),
1136            r#extension: Default::default(),
1137            r#modifier_extension: Default::default(),
1138            r#type: Box::new(super::super::types::CodeableConcept {
1139                id: Some("$invalid".to_string()),
1140                ..Default::default()
1141            }),
1142            r#allowed: Default::default(),
1143            r#used: Default::default(),
1144        }
1145    }
1146}
1147#[doc = "Balance by Benefit Category."]
1148#[derive(Debug, Clone, PartialEq)]
1149pub struct ExplanationOfBenefitBenefitBalance {
1150    #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
1151    pub r#id: Option<std::string::String>,
1152    #[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."]
1153    pub r#extension: Vec<super::super::types::Extension>,
1154    #[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)."]
1155    pub r#modifier_extension: Vec<super::super::types::Extension>,
1156    #[doc = "Code to identify the general type of benefits under which products and services are provided."]
1157    pub r#category: Box<super::super::types::CodeableConcept>,
1158    #[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."]
1159    pub r#excluded: Option<super::super::types::Boolean>,
1160    #[doc = "A short name or tag for the benefit."]
1161    pub r#name: Option<super::super::types::String>,
1162    #[doc = "A richer description of the benefit or services covered."]
1163    pub r#description: Option<super::super::types::String>,
1164    #[doc = "Is a flag to indicate whether the benefits refer to in-network providers or out-of-network providers."]
1165    pub r#network: Option<Box<super::super::types::CodeableConcept>>,
1166    #[doc = "Indicates if the benefits apply to an individual or to the family."]
1167    pub r#unit: Option<Box<super::super::types::CodeableConcept>>,
1168    #[doc = "The term or period of the values such as 'maximum lifetime benefit' or 'maximum annual visits'."]
1169    pub r#term: Option<Box<super::super::types::CodeableConcept>>,
1170    #[doc = "Benefits Used to date."]
1171    pub r#financial: Vec<ExplanationOfBenefitBenefitBalanceFinancial>,
1172}
1173#[allow(clippy::derivable_impls)]
1174impl Default for ExplanationOfBenefitBenefitBalance {
1175    fn default() -> Self {
1176        Self {
1177            r#id: Default::default(),
1178            r#extension: Default::default(),
1179            r#modifier_extension: Default::default(),
1180            r#category: Box::new(super::super::types::CodeableConcept {
1181                id: Some("$invalid".to_string()),
1182                ..Default::default()
1183            }),
1184            r#excluded: Default::default(),
1185            r#name: Default::default(),
1186            r#description: Default::default(),
1187            r#network: Default::default(),
1188            r#unit: Default::default(),
1189            r#term: Default::default(),
1190            r#financial: Default::default(),
1191        }
1192    }
1193}
1194#[doc = "This resource provides: the claim details; adjudication details from the processing of a Claim; and optionally account balance information, for informing the subscriber of the benefits provided."]
1195#[derive(Debug, Clone, PartialEq)]
1196pub struct ExplanationOfBenefit {
1197    #[doc = "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes."]
1198    pub r#id: Option<super::super::types::Id>,
1199    #[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."]
1200    pub r#meta: Option<Box<super::super::types::Meta>>,
1201    #[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."]
1202    pub r#implicit_rules: Option<super::super::types::Uri>,
1203    #[doc = "The base language in which the resource is written."]
1204    pub r#language: Option<super::super::types::Code>,
1205    #[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."]
1206    pub r#text: Option<Box<super::super::types::Narrative>>,
1207    #[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."]
1208    pub r#contained: Vec<super::super::Resource>,
1209    #[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."]
1210    pub r#extension: Vec<super::super::types::Extension>,
1211    #[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)."]
1212    pub r#modifier_extension: Vec<super::super::types::Extension>,
1213    #[doc = "A unique identifier assigned to this explanation of benefit."]
1214    pub r#identifier: Vec<super::super::types::Identifier>,
1215    #[doc = "Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners."]
1216    pub r#trace_number: Vec<super::super::types::Identifier>,
1217    #[doc = "The status of the resource instance."]
1218    pub r#status: super::super::types::Code,
1219    #[doc = "The category of claim, e.g. oral, pharmacy, vision, institutional, professional."]
1220    pub r#type: Box<super::super::types::CodeableConcept>,
1221    #[doc = "A finer grained suite of claim type codes which may convey additional information such as Inpatient vs Outpatient and/or a specialty service."]
1222    pub r#sub_type: Option<Box<super::super::types::CodeableConcept>>,
1223    #[doc = "A code to indicate whether the nature of the request is: Claim - A request to an Insurer to adjudicate the supplied charges for health care goods and services under the identified policy and to pay the determined Benefit amount, if any; Preauthorization - A request to an Insurer to adjudicate the supplied proposed future charges for health care goods and services under the identified policy and to approve the services and provide the expected benefit amounts and potentially to reserve funds to pay the benefits when Claims for the indicated services are later submitted; or, Pre-determination - A request to an Insurer to adjudicate the supplied 'what if' charges for health care goods and services under the identified policy and report back what the Benefit payable would be had the services actually been provided."]
1224    pub r#use: super::super::types::Code,
1225    #[doc = "The party to whom the professional services and/or products have been supplied or are being considered and for whom actual for forecast reimbursement is sought."]
1226    pub r#patient: Box<super::super::types::Reference>,
1227    #[doc = "The period for which charges are being submitted."]
1228    pub r#billable_period: Option<Box<super::super::types::Period>>,
1229    #[doc = "The date this resource was created."]
1230    pub r#created: super::super::types::DateTime,
1231    #[doc = "Individual who created the claim, predetermination or preauthorization."]
1232    pub r#enterer: Option<Box<super::super::types::Reference>>,
1233    #[doc = "The party responsible for authorization, adjudication and reimbursement."]
1234    pub r#insurer: Option<Box<super::super::types::Reference>>,
1235    #[doc = "The provider which is responsible for the claim, predetermination or preauthorization."]
1236    pub r#provider: Option<Box<super::super::types::Reference>>,
1237    #[doc = "The provider-required urgency of processing the request. Typical values include: stat, normal deferred."]
1238    pub r#priority: Option<Box<super::super::types::CodeableConcept>>,
1239    #[doc = "A code to indicate whether and for whom funds are to be reserved for future claims."]
1240    pub r#funds_reserve_requested: Option<Box<super::super::types::CodeableConcept>>,
1241    #[doc = "A code, used only on a response to a preauthorization, to indicate whether the benefits payable have been reserved and for whom."]
1242    pub r#funds_reserve: Option<Box<super::super::types::CodeableConcept>>,
1243    #[doc = "Other claims which are related to this claim such as prior submissions or claims for related services or for the same event."]
1244    pub r#related: Vec<ExplanationOfBenefitRelated>,
1245    #[doc = "Prescription is the document/authorization given to the claim author for them to provide products and services for which consideration (reimbursement) is sought. Could be a RX for medications, an 'order' for oxygen or wheelchair or physiotherapy treatments."]
1246    pub r#prescription: Option<Box<super::super::types::Reference>>,
1247    #[doc = "Original prescription which has been superseded by this prescription to support the dispensing of pharmacy services, medications or products."]
1248    pub r#original_prescription: Option<Box<super::super::types::Reference>>,
1249    #[doc = "Information code for an event with a corresponding date or period."]
1250    pub r#event: Vec<ExplanationOfBenefitEvent>,
1251    #[doc = "The party to be reimbursed for cost of the products and services according to the terms of the policy."]
1252    pub r#payee: Option<ExplanationOfBenefitPayee>,
1253    #[doc = "The referral information received by the claim author, it is not to be used when the author generates a referral for a patient. A copy of that referral may be provided as supporting information. Some insurers require proof of referral to pay for services or to pay specialist rates for services."]
1254    pub r#referral: Option<Box<super::super::types::Reference>>,
1255    #[doc = "Healthcare encounters related to this claim."]
1256    pub r#encounter: Vec<super::super::types::Reference>,
1257    #[doc = "Facility where the services were provided."]
1258    pub r#facility: Option<Box<super::super::types::Reference>>,
1259    #[doc = "The business identifier for the instance of the adjudication request: claim predetermination or preauthorization."]
1260    pub r#claim: Option<Box<super::super::types::Reference>>,
1261    #[doc = "The business identifier for the instance of the adjudication response: claim, predetermination or preauthorization response."]
1262    pub r#claim_response: Option<Box<super::super::types::Reference>>,
1263    #[doc = "The outcome of the claim, predetermination, or preauthorization processing."]
1264    pub r#outcome: super::super::types::Code,
1265    #[doc = "The result of the claim, predetermination, or preauthorization adjudication."]
1266    pub r#decision: Option<Box<super::super::types::CodeableConcept>>,
1267    #[doc = "A human readable description of the status of the adjudication."]
1268    pub r#disposition: Option<super::super::types::String>,
1269    #[doc = "Reference from the Insurer which is used in later communications which refers to this adjudication."]
1270    pub r#pre_auth_ref: Vec<super::super::types::String>,
1271    #[doc = "The timeframe during which the supplied preauthorization reference may be quoted on claims to obtain the adjudication as provided."]
1272    pub r#pre_auth_ref_period: Vec<super::super::types::Period>,
1273    #[doc = "A package billing code or bundle code used to group products and services to a particular health condition (such as heart attack) which is based on a predetermined grouping code system."]
1274    pub r#diagnosis_related_group: Option<Box<super::super::types::CodeableConcept>>,
1275    #[doc = "The members of the team who provided the products and services."]
1276    pub r#care_team: Vec<ExplanationOfBenefitCareTeam>,
1277    #[doc = "Additional information codes regarding exceptions, special considerations, the condition, situation, prior or concurrent issues."]
1278    pub r#supporting_info: Vec<ExplanationOfBenefitSupportingInfo>,
1279    #[doc = "Information about diagnoses relevant to the claim items."]
1280    pub r#diagnosis: Vec<ExplanationOfBenefitDiagnosis>,
1281    #[doc = "Procedures performed on the patient relevant to the billing items with the claim."]
1282    pub r#procedure: Vec<ExplanationOfBenefitProcedure>,
1283    #[doc = "This indicates the relative order of a series of EOBs related to different coverages for the same suite of services."]
1284    pub r#precedence: Option<super::super::types::PositiveInt>,
1285    #[doc = "Financial instruments for reimbursement for the health care products and services specified on the claim."]
1286    pub r#insurance: Vec<ExplanationOfBenefitInsurance>,
1287    #[doc = "Details of a accident which resulted in injuries which required the products and services listed in the claim."]
1288    pub r#accident: Option<ExplanationOfBenefitAccident>,
1289    #[doc = "The amount paid by the patient, in total at the claim claim level or specifically for the item and detail level, to the provider for goods and services."]
1290    pub r#patient_paid: Option<Box<super::super::types::Money>>,
1291    #[doc = "A claim line. Either a simple (a product or service) or a 'group' of details which can also be a simple items or groups of sub-details."]
1292    pub r#item: Vec<ExplanationOfBenefitItem>,
1293    #[doc = "The first-tier service adjudications for payor added product or service lines."]
1294    pub r#add_item: Vec<ExplanationOfBenefitAddItem>,
1295    #[doc = "The adjudication results which are presented at the header level rather than at the line-item or add-item levels."]
1296    pub r#adjudication: Vec<ExplanationOfBenefitItemAdjudication>,
1297    #[doc = "Categorized monetary totals for the adjudication."]
1298    pub r#total: Vec<ExplanationOfBenefitTotal>,
1299    #[doc = "Payment details for the adjudication of the claim."]
1300    pub r#payment: Option<ExplanationOfBenefitPayment>,
1301    #[doc = "A code for the form to be used for printing the content."]
1302    pub r#form_code: Option<Box<super::super::types::CodeableConcept>>,
1303    #[doc = "The actual form, by reference or inclusion, for printing the content or an EOB."]
1304    pub r#form: Option<Box<super::super::types::Attachment>>,
1305    #[doc = "A note that describes or explains adjudication results in a human readable form."]
1306    pub r#process_note: Vec<ExplanationOfBenefitProcessNote>,
1307    #[doc = "The term of the benefits documented in this response."]
1308    pub r#benefit_period: Option<Box<super::super::types::Period>>,
1309    #[doc = "Balance by Benefit Category."]
1310    pub r#benefit_balance: Vec<ExplanationOfBenefitBenefitBalance>,
1311}
1312#[allow(clippy::derivable_impls)]
1313impl Default for ExplanationOfBenefit {
1314    fn default() -> Self {
1315        Self {
1316            r#id: Default::default(),
1317            r#meta: Default::default(),
1318            r#implicit_rules: Default::default(),
1319            r#language: Default::default(),
1320            r#text: Default::default(),
1321            r#contained: Default::default(),
1322            r#extension: Default::default(),
1323            r#modifier_extension: Default::default(),
1324            r#identifier: Default::default(),
1325            r#trace_number: Default::default(),
1326            r#status: super::super::types::Code {
1327                id: Some("$invalid".to_string()),
1328                ..Default::default()
1329            },
1330            r#type: Box::new(super::super::types::CodeableConcept {
1331                id: Some("$invalid".to_string()),
1332                ..Default::default()
1333            }),
1334            r#sub_type: Default::default(),
1335            r#use: super::super::types::Code {
1336                id: Some("$invalid".to_string()),
1337                ..Default::default()
1338            },
1339            r#patient: Box::new(super::super::types::Reference {
1340                id: Some("$invalid".to_string()),
1341                ..Default::default()
1342            }),
1343            r#billable_period: Default::default(),
1344            r#created: super::super::types::DateTime {
1345                id: Some("$invalid".to_string()),
1346                ..Default::default()
1347            },
1348            r#enterer: Default::default(),
1349            r#insurer: Default::default(),
1350            r#provider: Default::default(),
1351            r#priority: Default::default(),
1352            r#funds_reserve_requested: Default::default(),
1353            r#funds_reserve: Default::default(),
1354            r#related: Default::default(),
1355            r#prescription: Default::default(),
1356            r#original_prescription: Default::default(),
1357            r#event: Default::default(),
1358            r#payee: Default::default(),
1359            r#referral: Default::default(),
1360            r#encounter: Default::default(),
1361            r#facility: Default::default(),
1362            r#claim: Default::default(),
1363            r#claim_response: Default::default(),
1364            r#outcome: super::super::types::Code {
1365                id: Some("$invalid".to_string()),
1366                ..Default::default()
1367            },
1368            r#decision: Default::default(),
1369            r#disposition: Default::default(),
1370            r#pre_auth_ref: Default::default(),
1371            r#pre_auth_ref_period: Default::default(),
1372            r#diagnosis_related_group: Default::default(),
1373            r#care_team: Default::default(),
1374            r#supporting_info: Default::default(),
1375            r#diagnosis: Default::default(),
1376            r#procedure: Default::default(),
1377            r#precedence: Default::default(),
1378            r#insurance: Default::default(),
1379            r#accident: Default::default(),
1380            r#patient_paid: Default::default(),
1381            r#item: Default::default(),
1382            r#add_item: Default::default(),
1383            r#adjudication: Default::default(),
1384            r#total: Default::default(),
1385            r#payment: Default::default(),
1386            r#form_code: Default::default(),
1387            r#form: Default::default(),
1388            r#process_note: Default::default(),
1389            r#benefit_period: Default::default(),
1390            r#benefit_balance: Default::default(),
1391        }
1392    }
1393}