fhirbolt_model/generated/r4b/resources/
claim_response.rs

1// Generated on 2023-05-17 by fhirbolt-codegen v0.10.0
2#[doc = "The date or dates when the service or product was supplied, performed or completed."]
3#[derive(Default, Debug, Clone, PartialEq)]
4pub enum ClaimResponseAddItemServiced {
5    Date(super::super::types::Date),
6    Period(Box<super::super::types::Period>),
7    #[default]
8    Invalid,
9}
10#[doc = "Where the product or service was provided."]
11#[derive(Default, Debug, Clone, PartialEq)]
12pub enum ClaimResponseAddItemLocation {
13    CodeableConcept(Box<super::super::types::CodeableConcept>),
14    Address(Box<super::super::types::Address>),
15    Reference(Box<super::super::types::Reference>),
16    #[default]
17    Invalid,
18}
19#[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."]
20#[derive(Debug, Clone, PartialEq)]
21pub struct ClaimResponseItemAdjudication {
22    #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
23    pub r#id: Option<std::string::String>,
24    #[doc = "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."]
25    pub r#extension: Vec<super::super::types::Extension>,
26    #[doc = "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."]
27    pub r#modifier_extension: Vec<super::super::types::Extension>,
28    #[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."]
29    pub r#category: Box<super::super::types::CodeableConcept>,
30    #[doc = "A code supporting the understanding of the adjudication result and explaining variance from expected amount."]
31    pub r#reason: Option<Box<super::super::types::CodeableConcept>>,
32    #[doc = "Monetary amount associated with the category."]
33    pub r#amount: Option<Box<super::super::types::Money>>,
34    #[doc = "A non-monetary value associated with the category. Mutually exclusive to the amount element above."]
35    pub r#value: Option<super::super::types::Decimal>,
36}
37#[allow(clippy::derivable_impls)]
38impl Default for ClaimResponseItemAdjudication {
39    fn default() -> Self {
40        Self {
41            r#id: Default::default(),
42            r#extension: Default::default(),
43            r#modifier_extension: Default::default(),
44            r#category: Box::new(super::super::types::CodeableConcept {
45                id: Some("$invalid".to_string()),
46                ..Default::default()
47            }),
48            r#reason: Default::default(),
49            r#amount: Default::default(),
50            r#value: Default::default(),
51        }
52    }
53}
54#[doc = "A sub-detail adjudication of a simple product or service."]
55#[derive(Debug, Clone, PartialEq)]
56pub struct ClaimResponseItemDetailSubDetail {
57    #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
58    pub r#id: Option<std::string::String>,
59    #[doc = "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."]
60    pub r#extension: Vec<super::super::types::Extension>,
61    #[doc = "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."]
62    pub r#modifier_extension: Vec<super::super::types::Extension>,
63    #[doc = "A number to uniquely reference the claim sub-detail entry."]
64    pub r#sub_detail_sequence: super::super::types::PositiveInt,
65    #[doc = "The numbers associated with notes below which apply to the adjudication of this item."]
66    pub r#note_number: Vec<super::super::types::PositiveInt>,
67    #[doc = "The adjudication results."]
68    pub r#adjudication: Vec<ClaimResponseItemAdjudication>,
69}
70#[allow(clippy::derivable_impls)]
71impl Default for ClaimResponseItemDetailSubDetail {
72    fn default() -> Self {
73        Self {
74            r#id: Default::default(),
75            r#extension: Default::default(),
76            r#modifier_extension: Default::default(),
77            r#sub_detail_sequence: super::super::types::PositiveInt {
78                id: Some("$invalid".to_string()),
79                ..Default::default()
80            },
81            r#note_number: Default::default(),
82            r#adjudication: Default::default(),
83        }
84    }
85}
86#[doc = "A claim detail. Either a simple (a product or service) or a 'group' of sub-details which are simple items."]
87#[derive(Debug, Clone, PartialEq)]
88pub struct ClaimResponseItemDetail {
89    #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
90    pub r#id: Option<std::string::String>,
91    #[doc = "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."]
92    pub r#extension: Vec<super::super::types::Extension>,
93    #[doc = "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."]
94    pub r#modifier_extension: Vec<super::super::types::Extension>,
95    #[doc = "A number to uniquely reference the claim detail entry."]
96    pub r#detail_sequence: super::super::types::PositiveInt,
97    #[doc = "The numbers associated with notes below which apply to the adjudication of this item."]
98    pub r#note_number: Vec<super::super::types::PositiveInt>,
99    #[doc = "The adjudication results."]
100    pub r#adjudication: Vec<ClaimResponseItemAdjudication>,
101    #[doc = "A sub-detail adjudication of a simple product or service."]
102    pub r#sub_detail: Vec<ClaimResponseItemDetailSubDetail>,
103}
104#[allow(clippy::derivable_impls)]
105impl Default for ClaimResponseItemDetail {
106    fn default() -> Self {
107        Self {
108            r#id: Default::default(),
109            r#extension: Default::default(),
110            r#modifier_extension: Default::default(),
111            r#detail_sequence: super::super::types::PositiveInt {
112                id: Some("$invalid".to_string()),
113                ..Default::default()
114            },
115            r#note_number: Default::default(),
116            r#adjudication: Default::default(),
117            r#sub_detail: Default::default(),
118        }
119    }
120}
121#[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."]
122#[derive(Debug, Clone, PartialEq)]
123pub struct ClaimResponseItem {
124    #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
125    pub r#id: Option<std::string::String>,
126    #[doc = "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."]
127    pub r#extension: Vec<super::super::types::Extension>,
128    #[doc = "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."]
129    pub r#modifier_extension: Vec<super::super::types::Extension>,
130    #[doc = "A number to uniquely reference the claim item entries."]
131    pub r#item_sequence: super::super::types::PositiveInt,
132    #[doc = "The numbers associated with notes below which apply to the adjudication of this item."]
133    pub r#note_number: Vec<super::super::types::PositiveInt>,
134    #[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."]
135    pub r#adjudication: Vec<ClaimResponseItemAdjudication>,
136    #[doc = "A claim detail. Either a simple (a product or service) or a 'group' of sub-details which are simple items."]
137    pub r#detail: Vec<ClaimResponseItemDetail>,
138}
139#[allow(clippy::derivable_impls)]
140impl Default for ClaimResponseItem {
141    fn default() -> Self {
142        Self {
143            r#id: Default::default(),
144            r#extension: Default::default(),
145            r#modifier_extension: Default::default(),
146            r#item_sequence: super::super::types::PositiveInt {
147                id: Some("$invalid".to_string()),
148                ..Default::default()
149            },
150            r#note_number: Default::default(),
151            r#adjudication: Default::default(),
152            r#detail: Default::default(),
153        }
154    }
155}
156#[doc = "The third-tier service adjudications for payor added services."]
157#[derive(Debug, Clone, PartialEq)]
158pub struct ClaimResponseAddItemDetailSubDetail {
159    #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
160    pub r#id: Option<std::string::String>,
161    #[doc = "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."]
162    pub r#extension: Vec<super::super::types::Extension>,
163    #[doc = "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."]
164    pub r#modifier_extension: Vec<super::super::types::Extension>,
165    #[doc = "When the value is a group code then this item collects a set of related claim details, otherwise this contains the product, service, drug or other billing code for the item."]
166    pub r#product_or_service: Box<super::super::types::CodeableConcept>,
167    #[doc = "Item typification or modifiers codes to convey additional context for the product or service."]
168    pub r#modifier: Vec<super::super::types::CodeableConcept>,
169    #[doc = "The number of repetitions of a service or product."]
170    pub r#quantity: Option<Box<super::super::types::Quantity>>,
171    #[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."]
172    pub r#unit_price: Option<Box<super::super::types::Money>>,
173    #[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."]
174    pub r#factor: Option<super::super::types::Decimal>,
175    #[doc = "The quantity times the unit price for an additional service or product or charge."]
176    pub r#net: Option<Box<super::super::types::Money>>,
177    #[doc = "The numbers associated with notes below which apply to the adjudication of this item."]
178    pub r#note_number: Vec<super::super::types::PositiveInt>,
179    #[doc = "The adjudication results."]
180    pub r#adjudication: Vec<ClaimResponseItemAdjudication>,
181}
182#[allow(clippy::derivable_impls)]
183impl Default for ClaimResponseAddItemDetailSubDetail {
184    fn default() -> Self {
185        Self {
186            r#id: Default::default(),
187            r#extension: Default::default(),
188            r#modifier_extension: Default::default(),
189            r#product_or_service: Box::new(super::super::types::CodeableConcept {
190                id: Some("$invalid".to_string()),
191                ..Default::default()
192            }),
193            r#modifier: Default::default(),
194            r#quantity: Default::default(),
195            r#unit_price: Default::default(),
196            r#factor: Default::default(),
197            r#net: Default::default(),
198            r#note_number: Default::default(),
199            r#adjudication: Default::default(),
200        }
201    }
202}
203#[doc = "The second-tier service adjudications for payor added services."]
204#[derive(Debug, Clone, PartialEq)]
205pub struct ClaimResponseAddItemDetail {
206    #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
207    pub r#id: Option<std::string::String>,
208    #[doc = "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."]
209    pub r#extension: Vec<super::super::types::Extension>,
210    #[doc = "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."]
211    pub r#modifier_extension: Vec<super::super::types::Extension>,
212    #[doc = "When the value is a group code then this item collects a set of related claim details, otherwise this contains the product, service, drug or other billing code for the item."]
213    pub r#product_or_service: Box<super::super::types::CodeableConcept>,
214    #[doc = "Item typification or modifiers codes to convey additional context for the product or service."]
215    pub r#modifier: Vec<super::super::types::CodeableConcept>,
216    #[doc = "The number of repetitions of a service or product."]
217    pub r#quantity: Option<Box<super::super::types::Quantity>>,
218    #[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."]
219    pub r#unit_price: Option<Box<super::super::types::Money>>,
220    #[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."]
221    pub r#factor: Option<super::super::types::Decimal>,
222    #[doc = "The quantity times the unit price for an additional service or product or charge."]
223    pub r#net: Option<Box<super::super::types::Money>>,
224    #[doc = "The numbers associated with notes below which apply to the adjudication of this item."]
225    pub r#note_number: Vec<super::super::types::PositiveInt>,
226    #[doc = "The adjudication results."]
227    pub r#adjudication: Vec<ClaimResponseItemAdjudication>,
228    #[doc = "The third-tier service adjudications for payor added services."]
229    pub r#sub_detail: Vec<ClaimResponseAddItemDetailSubDetail>,
230}
231#[allow(clippy::derivable_impls)]
232impl Default for ClaimResponseAddItemDetail {
233    fn default() -> Self {
234        Self {
235            r#id: Default::default(),
236            r#extension: Default::default(),
237            r#modifier_extension: Default::default(),
238            r#product_or_service: Box::new(super::super::types::CodeableConcept {
239                id: Some("$invalid".to_string()),
240                ..Default::default()
241            }),
242            r#modifier: Default::default(),
243            r#quantity: Default::default(),
244            r#unit_price: Default::default(),
245            r#factor: Default::default(),
246            r#net: Default::default(),
247            r#note_number: Default::default(),
248            r#adjudication: Default::default(),
249            r#sub_detail: Default::default(),
250        }
251    }
252}
253#[doc = "The first-tier service adjudications for payor added product or service lines."]
254#[derive(Debug, Clone, PartialEq)]
255pub struct ClaimResponseAddItem {
256    #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
257    pub r#id: Option<std::string::String>,
258    #[doc = "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."]
259    pub r#extension: Vec<super::super::types::Extension>,
260    #[doc = "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."]
261    pub r#modifier_extension: Vec<super::super::types::Extension>,
262    #[doc = "Claim items which this service line is intended to replace."]
263    pub r#item_sequence: Vec<super::super::types::PositiveInt>,
264    #[doc = "The sequence number of the details within the claim item which this line is intended to replace."]
265    pub r#detail_sequence: Vec<super::super::types::PositiveInt>,
266    #[doc = "The sequence number of the sub-details within the details within the claim item which this line is intended to replace."]
267    pub r#subdetail_sequence: Vec<super::super::types::PositiveInt>,
268    #[doc = "The providers who are authorized for the services rendered to the patient."]
269    pub r#provider: Vec<super::super::types::Reference>,
270    #[doc = "When the value is a group code then this item collects a set of related claim details, otherwise this contains the product, service, drug or other billing code for the item."]
271    pub r#product_or_service: Box<super::super::types::CodeableConcept>,
272    #[doc = "Item typification or modifiers codes to convey additional context for the product or service."]
273    pub r#modifier: Vec<super::super::types::CodeableConcept>,
274    #[doc = "Identifies the program under which this may be recovered."]
275    pub r#program_code: Vec<super::super::types::CodeableConcept>,
276    #[doc = "The date or dates when the service or product was supplied, performed or completed."]
277    pub r#serviced: Option<ClaimResponseAddItemServiced>,
278    #[doc = "Where the product or service was provided."]
279    pub r#location: Option<ClaimResponseAddItemLocation>,
280    #[doc = "The number of repetitions of a service or product."]
281    pub r#quantity: Option<Box<super::super::types::Quantity>>,
282    #[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."]
283    pub r#unit_price: Option<Box<super::super::types::Money>>,
284    #[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."]
285    pub r#factor: Option<super::super::types::Decimal>,
286    #[doc = "The quantity times the unit price for an additional service or product or charge."]
287    pub r#net: Option<Box<super::super::types::Money>>,
288    #[doc = "Physical service site on the patient (limb, tooth, etc.)."]
289    pub r#body_site: Option<Box<super::super::types::CodeableConcept>>,
290    #[doc = "A region or surface of the bodySite, e.g. limb region or tooth surface(s)."]
291    pub r#sub_site: Vec<super::super::types::CodeableConcept>,
292    #[doc = "The numbers associated with notes below which apply to the adjudication of this item."]
293    pub r#note_number: Vec<super::super::types::PositiveInt>,
294    #[doc = "The adjudication results."]
295    pub r#adjudication: Vec<ClaimResponseItemAdjudication>,
296    #[doc = "The second-tier service adjudications for payor added services."]
297    pub r#detail: Vec<ClaimResponseAddItemDetail>,
298}
299#[allow(clippy::derivable_impls)]
300impl Default for ClaimResponseAddItem {
301    fn default() -> Self {
302        Self {
303            r#id: Default::default(),
304            r#extension: Default::default(),
305            r#modifier_extension: Default::default(),
306            r#item_sequence: Default::default(),
307            r#detail_sequence: Default::default(),
308            r#subdetail_sequence: Default::default(),
309            r#provider: Default::default(),
310            r#product_or_service: Box::new(super::super::types::CodeableConcept {
311                id: Some("$invalid".to_string()),
312                ..Default::default()
313            }),
314            r#modifier: Default::default(),
315            r#program_code: Default::default(),
316            r#serviced: Default::default(),
317            r#location: Default::default(),
318            r#quantity: Default::default(),
319            r#unit_price: Default::default(),
320            r#factor: Default::default(),
321            r#net: Default::default(),
322            r#body_site: Default::default(),
323            r#sub_site: Default::default(),
324            r#note_number: Default::default(),
325            r#adjudication: Default::default(),
326            r#detail: Default::default(),
327        }
328    }
329}
330#[doc = "Categorized monetary totals for the adjudication."]
331#[derive(Debug, Clone, PartialEq)]
332pub struct ClaimResponseTotal {
333    #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
334    pub r#id: Option<std::string::String>,
335    #[doc = "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."]
336    pub r#extension: Vec<super::super::types::Extension>,
337    #[doc = "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."]
338    pub r#modifier_extension: Vec<super::super::types::Extension>,
339    #[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."]
340    pub r#category: Box<super::super::types::CodeableConcept>,
341    #[doc = "Monetary total amount associated with the category."]
342    pub r#amount: Box<super::super::types::Money>,
343}
344#[allow(clippy::derivable_impls)]
345impl Default for ClaimResponseTotal {
346    fn default() -> Self {
347        Self {
348            r#id: Default::default(),
349            r#extension: Default::default(),
350            r#modifier_extension: Default::default(),
351            r#category: Box::new(super::super::types::CodeableConcept {
352                id: Some("$invalid".to_string()),
353                ..Default::default()
354            }),
355            r#amount: Box::new(super::super::types::Money {
356                id: Some("$invalid".to_string()),
357                ..Default::default()
358            }),
359        }
360    }
361}
362#[doc = "Payment details for the adjudication of the claim."]
363#[derive(Debug, Clone, PartialEq)]
364pub struct ClaimResponsePayment {
365    #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
366    pub r#id: Option<std::string::String>,
367    #[doc = "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."]
368    pub r#extension: Vec<super::super::types::Extension>,
369    #[doc = "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."]
370    pub r#modifier_extension: Vec<super::super::types::Extension>,
371    #[doc = "Whether this represents partial or complete payment of the benefits payable."]
372    pub r#type: Box<super::super::types::CodeableConcept>,
373    #[doc = "Total amount of all adjustments to this payment included in this transaction which are not related to this claim's adjudication."]
374    pub r#adjustment: Option<Box<super::super::types::Money>>,
375    #[doc = "Reason for the payment adjustment."]
376    pub r#adjustment_reason: Option<Box<super::super::types::CodeableConcept>>,
377    #[doc = "Estimated date the payment will be issued or the actual issue date of payment."]
378    pub r#date: Option<super::super::types::Date>,
379    #[doc = "Benefits payable less any payment adjustment."]
380    pub r#amount: Box<super::super::types::Money>,
381    #[doc = "Issuer's unique identifier for the payment instrument."]
382    pub r#identifier: Option<Box<super::super::types::Identifier>>,
383}
384#[allow(clippy::derivable_impls)]
385impl Default for ClaimResponsePayment {
386    fn default() -> Self {
387        Self {
388            r#id: Default::default(),
389            r#extension: Default::default(),
390            r#modifier_extension: Default::default(),
391            r#type: Box::new(super::super::types::CodeableConcept {
392                id: Some("$invalid".to_string()),
393                ..Default::default()
394            }),
395            r#adjustment: Default::default(),
396            r#adjustment_reason: Default::default(),
397            r#date: Default::default(),
398            r#amount: Box::new(super::super::types::Money {
399                id: Some("$invalid".to_string()),
400                ..Default::default()
401            }),
402            r#identifier: Default::default(),
403        }
404    }
405}
406#[doc = "A note that describes or explains adjudication results in a human readable form."]
407#[derive(Debug, Clone, PartialEq)]
408pub struct ClaimResponseProcessNote {
409    #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
410    pub r#id: Option<std::string::String>,
411    #[doc = "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."]
412    pub r#extension: Vec<super::super::types::Extension>,
413    #[doc = "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."]
414    pub r#modifier_extension: Vec<super::super::types::Extension>,
415    #[doc = "A number to uniquely identify a note entry."]
416    pub r#number: Option<super::super::types::PositiveInt>,
417    #[doc = "The business purpose of the note text."]
418    pub r#type: Option<super::super::types::Code>,
419    #[doc = "The explanation or description associated with the processing."]
420    pub r#text: super::super::types::String,
421    #[doc = "A code to define the language used in the text of the note."]
422    pub r#language: Option<Box<super::super::types::CodeableConcept>>,
423}
424#[allow(clippy::derivable_impls)]
425impl Default for ClaimResponseProcessNote {
426    fn default() -> Self {
427        Self {
428            r#id: Default::default(),
429            r#extension: Default::default(),
430            r#modifier_extension: Default::default(),
431            r#number: Default::default(),
432            r#type: Default::default(),
433            r#text: super::super::types::String {
434                id: Some("$invalid".to_string()),
435                ..Default::default()
436            },
437            r#language: Default::default(),
438        }
439    }
440}
441#[doc = "Financial instruments for reimbursement for the health care products and services specified on the claim."]
442#[derive(Debug, Clone, PartialEq)]
443pub struct ClaimResponseInsurance {
444    #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
445    pub r#id: Option<std::string::String>,
446    #[doc = "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."]
447    pub r#extension: Vec<super::super::types::Extension>,
448    #[doc = "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."]
449    pub r#modifier_extension: Vec<super::super::types::Extension>,
450    #[doc = "A number to uniquely identify insurance entries and provide a sequence of coverages to convey coordination of benefit order."]
451    pub r#sequence: super::super::types::PositiveInt,
452    #[doc = "A flag to indicate that this Coverage is to be used for adjudication of this claim when set to true."]
453    pub r#focal: super::super::types::Boolean,
454    #[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."]
455    pub r#coverage: Box<super::super::types::Reference>,
456    #[doc = "A business agreement number established between the provider and the insurer for special business processing purposes."]
457    pub r#business_arrangement: Option<super::super::types::String>,
458    #[doc = "The result of the adjudication of the line items for the Coverage specified in this insurance."]
459    pub r#claim_response: Option<Box<super::super::types::Reference>>,
460}
461#[allow(clippy::derivable_impls)]
462impl Default for ClaimResponseInsurance {
463    fn default() -> Self {
464        Self {
465            r#id: Default::default(),
466            r#extension: Default::default(),
467            r#modifier_extension: Default::default(),
468            r#sequence: super::super::types::PositiveInt {
469                id: Some("$invalid".to_string()),
470                ..Default::default()
471            },
472            r#focal: super::super::types::Boolean {
473                id: Some("$invalid".to_string()),
474                ..Default::default()
475            },
476            r#coverage: Box::new(super::super::types::Reference {
477                id: Some("$invalid".to_string()),
478                ..Default::default()
479            }),
480            r#business_arrangement: Default::default(),
481            r#claim_response: Default::default(),
482        }
483    }
484}
485#[doc = "Errors encountered during the processing of the adjudication."]
486#[derive(Debug, Clone, PartialEq)]
487pub struct ClaimResponseError {
488    #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
489    pub r#id: Option<std::string::String>,
490    #[doc = "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."]
491    pub r#extension: Vec<super::super::types::Extension>,
492    #[doc = "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."]
493    pub r#modifier_extension: Vec<super::super::types::Extension>,
494    #[doc = "The sequence number of the line item submitted which contains the error. This value is omitted when the error occurs outside of the item structure."]
495    pub r#item_sequence: Option<super::super::types::PositiveInt>,
496    #[doc = "The sequence number of the detail within the line item submitted which contains the error. This value is omitted when the error occurs outside of the item structure."]
497    pub r#detail_sequence: Option<super::super::types::PositiveInt>,
498    #[doc = "The sequence number of the sub-detail within the detail within the line item submitted which contains the error. This value is omitted when the error occurs outside of the item structure."]
499    pub r#sub_detail_sequence: Option<super::super::types::PositiveInt>,
500    #[doc = "An error code, from a specified code system, which details why the claim could not be adjudicated."]
501    pub r#code: Box<super::super::types::CodeableConcept>,
502}
503#[allow(clippy::derivable_impls)]
504impl Default for ClaimResponseError {
505    fn default() -> Self {
506        Self {
507            r#id: Default::default(),
508            r#extension: Default::default(),
509            r#modifier_extension: Default::default(),
510            r#item_sequence: Default::default(),
511            r#detail_sequence: Default::default(),
512            r#sub_detail_sequence: Default::default(),
513            r#code: Box::new(super::super::types::CodeableConcept {
514                id: Some("$invalid".to_string()),
515                ..Default::default()
516            }),
517        }
518    }
519}
520#[doc = "This resource provides the adjudication details from the processing of a Claim resource."]
521#[derive(Debug, Clone, PartialEq)]
522pub struct ClaimResponse {
523    #[doc = "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes."]
524    pub r#id: Option<super::super::types::Id>,
525    #[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."]
526    pub r#meta: Option<Box<super::super::types::Meta>>,
527    #[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."]
528    pub r#implicit_rules: Option<super::super::types::Uri>,
529    #[doc = "The base language in which the resource is written."]
530    pub r#language: Option<super::super::types::Code>,
531    #[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."]
532    pub r#text: Option<Box<super::super::types::Narrative>>,
533    #[doc = "These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, and nor can they have their own independent transaction scope."]
534    pub r#contained: Vec<super::super::Resource>,
535    #[doc = "May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."]
536    pub r#extension: Vec<super::super::types::Extension>,
537    #[doc = "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."]
538    pub r#modifier_extension: Vec<super::super::types::Extension>,
539    #[doc = "A unique identifier assigned to this claim response."]
540    pub r#identifier: Vec<super::super::types::Identifier>,
541    #[doc = "The status of the resource instance."]
542    pub r#status: super::super::types::Code,
543    #[doc = "A finer grained suite of claim type codes which may convey additional information such as Inpatient vs Outpatient and/or a specialty service."]
544    pub r#type: Box<super::super::types::CodeableConcept>,
545    #[doc = "A finer grained suite of claim type codes which may convey additional information such as Inpatient vs Outpatient and/or a specialty service."]
546    pub r#sub_type: Option<Box<super::super::types::CodeableConcept>>,
547    #[doc = "A code to indicate whether the nature of the request is: to request adjudication of products and services previously rendered; or requesting authorization and adjudication for provision in the future; or requesting the non-binding adjudication of the listed products and services which could be provided in the future."]
548    pub r#use: super::super::types::Code,
549    #[doc = "The party to whom the professional services and/or products have been supplied or are being considered and for whom actual for facast reimbursement is sought."]
550    pub r#patient: Box<super::super::types::Reference>,
551    #[doc = "The date this resource was created."]
552    pub r#created: super::super::types::DateTime,
553    #[doc = "The party responsible for authorization, adjudication and reimbursement."]
554    pub r#insurer: Box<super::super::types::Reference>,
555    #[doc = "The provider which is responsible for the claim, predetermination or preauthorization."]
556    pub r#requestor: Option<Box<super::super::types::Reference>>,
557    #[doc = "Original request resource reference."]
558    pub r#request: Option<Box<super::super::types::Reference>>,
559    #[doc = "The outcome of the claim, predetermination, or preauthorization processing."]
560    pub r#outcome: super::super::types::Code,
561    #[doc = "A human readable description of the status of the adjudication."]
562    pub r#disposition: Option<super::super::types::String>,
563    #[doc = "Reference from the Insurer which is used in later communications which refers to this adjudication."]
564    pub r#pre_auth_ref: Option<super::super::types::String>,
565    #[doc = "The time frame during which this authorization is effective."]
566    pub r#pre_auth_period: Option<Box<super::super::types::Period>>,
567    #[doc = "Type of Party to be reimbursed: subscriber, provider, other."]
568    pub r#payee_type: Option<Box<super::super::types::CodeableConcept>>,
569    #[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."]
570    pub r#item: Vec<ClaimResponseItem>,
571    #[doc = "The first-tier service adjudications for payor added product or service lines."]
572    pub r#add_item: Vec<ClaimResponseAddItem>,
573    #[doc = "The adjudication results which are presented at the header level rather than at the line-item or add-item levels."]
574    pub r#adjudication: Vec<ClaimResponseItemAdjudication>,
575    #[doc = "Categorized monetary totals for the adjudication."]
576    pub r#total: Vec<ClaimResponseTotal>,
577    #[doc = "Payment details for the adjudication of the claim."]
578    pub r#payment: Option<ClaimResponsePayment>,
579    #[doc = "A code, used only on a response to a preauthorization, to indicate whether the benefits payable have been reserved and for whom."]
580    pub r#funds_reserve: Option<Box<super::super::types::CodeableConcept>>,
581    #[doc = "A code for the form to be used for printing the content."]
582    pub r#form_code: Option<Box<super::super::types::CodeableConcept>>,
583    #[doc = "The actual form, by reference or inclusion, for printing the content or an EOB."]
584    pub r#form: Option<Box<super::super::types::Attachment>>,
585    #[doc = "A note that describes or explains adjudication results in a human readable form."]
586    pub r#process_note: Vec<ClaimResponseProcessNote>,
587    #[doc = "Request for additional supporting or authorizing information."]
588    pub r#communication_request: Vec<super::super::types::Reference>,
589    #[doc = "Financial instruments for reimbursement for the health care products and services specified on the claim."]
590    pub r#insurance: Vec<ClaimResponseInsurance>,
591    #[doc = "Errors encountered during the processing of the adjudication."]
592    pub r#error: Vec<ClaimResponseError>,
593}
594#[allow(clippy::derivable_impls)]
595impl Default for ClaimResponse {
596    fn default() -> Self {
597        Self {
598            r#id: Default::default(),
599            r#meta: Default::default(),
600            r#implicit_rules: Default::default(),
601            r#language: Default::default(),
602            r#text: Default::default(),
603            r#contained: Default::default(),
604            r#extension: Default::default(),
605            r#modifier_extension: Default::default(),
606            r#identifier: Default::default(),
607            r#status: super::super::types::Code {
608                id: Some("$invalid".to_string()),
609                ..Default::default()
610            },
611            r#type: Box::new(super::super::types::CodeableConcept {
612                id: Some("$invalid".to_string()),
613                ..Default::default()
614            }),
615            r#sub_type: Default::default(),
616            r#use: super::super::types::Code {
617                id: Some("$invalid".to_string()),
618                ..Default::default()
619            },
620            r#patient: Box::new(super::super::types::Reference {
621                id: Some("$invalid".to_string()),
622                ..Default::default()
623            }),
624            r#created: super::super::types::DateTime {
625                id: Some("$invalid".to_string()),
626                ..Default::default()
627            },
628            r#insurer: Box::new(super::super::types::Reference {
629                id: Some("$invalid".to_string()),
630                ..Default::default()
631            }),
632            r#requestor: Default::default(),
633            r#request: Default::default(),
634            r#outcome: super::super::types::Code {
635                id: Some("$invalid".to_string()),
636                ..Default::default()
637            },
638            r#disposition: Default::default(),
639            r#pre_auth_ref: Default::default(),
640            r#pre_auth_period: Default::default(),
641            r#payee_type: Default::default(),
642            r#item: Default::default(),
643            r#add_item: Default::default(),
644            r#adjudication: Default::default(),
645            r#total: Default::default(),
646            r#payment: Default::default(),
647            r#funds_reserve: Default::default(),
648            r#form_code: Default::default(),
649            r#form: Default::default(),
650            r#process_note: Default::default(),
651            r#communication_request: Default::default(),
652            r#insurance: Default::default(),
653            r#error: Default::default(),
654        }
655    }
656}