fhirbolt_model/generated/r5/resources/
coverage.rs

1// Generated on 2023-05-17 by fhirbolt-codegen v0.10.0
2#[doc = "The amount due from the patient for the cost category."]
3#[derive(Default, Debug, Clone, PartialEq)]
4pub enum CoverageCostToBeneficiaryValue {
5    Quantity(Box<super::super::types::Quantity>),
6    Money(Box<super::super::types::Money>),
7    #[default]
8    Invalid,
9}
10#[doc = "Link to the paying party and optionally what specifically they will be responsible to pay."]
11#[derive(Debug, Clone, PartialEq)]
12pub struct CoveragePaymentBy {
13    #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
14    pub r#id: Option<std::string::String>,
15    #[doc = "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."]
16    pub r#extension: Vec<super::super::types::Extension>,
17    #[doc = "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."]
18    pub r#modifier_extension: Vec<super::super::types::Extension>,
19    #[doc = "The list of parties providing non-insurance payment for the treatment costs."]
20    pub r#party: Box<super::super::types::Reference>,
21    #[doc = " Description of the financial responsibility."]
22    pub r#responsibility: Option<super::super::types::String>,
23}
24#[allow(clippy::derivable_impls)]
25impl Default for CoveragePaymentBy {
26    fn default() -> Self {
27        Self {
28            r#id: Default::default(),
29            r#extension: Default::default(),
30            r#modifier_extension: Default::default(),
31            r#party: Box::new(super::super::types::Reference {
32                id: Some("$invalid".to_string()),
33                ..Default::default()
34            }),
35            r#responsibility: Default::default(),
36        }
37    }
38}
39#[doc = "A suite of underwriter specific classifiers."]
40#[derive(Debug, Clone, PartialEq)]
41pub struct CoverageClass {
42    #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
43    pub r#id: Option<std::string::String>,
44    #[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."]
45    pub r#extension: Vec<super::super::types::Extension>,
46    #[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)."]
47    pub r#modifier_extension: Vec<super::super::types::Extension>,
48    #[doc = "The type of classification for which an insurer-specific class label or number and optional name is provided.  For example, type may be used to identify a class of coverage or employer group, policy, or plan."]
49    pub r#type: Box<super::super::types::CodeableConcept>,
50    #[doc = "The alphanumeric identifier associated with the insurer issued label."]
51    pub r#value: Box<super::super::types::Identifier>,
52    #[doc = "A short description for the class."]
53    pub r#name: Option<super::super::types::String>,
54}
55#[allow(clippy::derivable_impls)]
56impl Default for CoverageClass {
57    fn default() -> Self {
58        Self {
59            r#id: Default::default(),
60            r#extension: Default::default(),
61            r#modifier_extension: Default::default(),
62            r#type: Box::new(super::super::types::CodeableConcept {
63                id: Some("$invalid".to_string()),
64                ..Default::default()
65            }),
66            r#value: Box::new(super::super::types::Identifier {
67                id: Some("$invalid".to_string()),
68                ..Default::default()
69            }),
70            r#name: Default::default(),
71        }
72    }
73}
74#[doc = "A suite of codes indicating exceptions or reductions to patient costs and their effective periods."]
75#[derive(Debug, Clone, PartialEq)]
76pub struct CoverageCostToBeneficiaryException {
77    #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
78    pub r#id: Option<std::string::String>,
79    #[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."]
80    pub r#extension: Vec<super::super::types::Extension>,
81    #[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)."]
82    pub r#modifier_extension: Vec<super::super::types::Extension>,
83    #[doc = "The code for the specific exception."]
84    pub r#type: Box<super::super::types::CodeableConcept>,
85    #[doc = "The timeframe the exception is in force."]
86    pub r#period: Option<Box<super::super::types::Period>>,
87}
88#[allow(clippy::derivable_impls)]
89impl Default for CoverageCostToBeneficiaryException {
90    fn default() -> Self {
91        Self {
92            r#id: Default::default(),
93            r#extension: Default::default(),
94            r#modifier_extension: Default::default(),
95            r#type: Box::new(super::super::types::CodeableConcept {
96                id: Some("$invalid".to_string()),
97                ..Default::default()
98            }),
99            r#period: Default::default(),
100        }
101    }
102}
103#[doc = "A suite of codes indicating the cost category and associated amount which have been detailed in the policy and may have been  included on the health card."]
104#[derive(Debug, Clone, PartialEq)]
105pub struct CoverageCostToBeneficiary {
106    #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
107    pub r#id: Option<std::string::String>,
108    #[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."]
109    pub r#extension: Vec<super::super::types::Extension>,
110    #[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)."]
111    pub r#modifier_extension: Vec<super::super::types::Extension>,
112    #[doc = "The category of patient centric costs associated with treatment."]
113    pub r#type: Option<Box<super::super::types::CodeableConcept>>,
114    #[doc = "Code to identify the general type of benefits under which products and services are provided."]
115    pub r#category: Option<Box<super::super::types::CodeableConcept>>,
116    #[doc = "Is a flag to indicate whether the benefits refer to in-network providers or out-of-network providers."]
117    pub r#network: Option<Box<super::super::types::CodeableConcept>>,
118    #[doc = "Indicates if the benefits apply to an individual or to the family."]
119    pub r#unit: Option<Box<super::super::types::CodeableConcept>>,
120    #[doc = "The term or period of the values such as 'maximum lifetime benefit' or 'maximum annual visits'."]
121    pub r#term: Option<Box<super::super::types::CodeableConcept>>,
122    #[doc = "The amount due from the patient for the cost category."]
123    pub r#value: Option<CoverageCostToBeneficiaryValue>,
124    #[doc = "A suite of codes indicating exceptions or reductions to patient costs and their effective periods."]
125    pub r#exception: Vec<CoverageCostToBeneficiaryException>,
126}
127#[allow(clippy::derivable_impls)]
128impl Default for CoverageCostToBeneficiary {
129    fn default() -> Self {
130        Self {
131            r#id: Default::default(),
132            r#extension: Default::default(),
133            r#modifier_extension: Default::default(),
134            r#type: Default::default(),
135            r#category: Default::default(),
136            r#network: Default::default(),
137            r#unit: Default::default(),
138            r#term: Default::default(),
139            r#value: Default::default(),
140            r#exception: Default::default(),
141        }
142    }
143}
144#[doc = "Financial instrument which may be used to reimburse or pay for health care products and services. Includes both insurance and self-payment.\n\nCoverage provides a link between covered parties (patients) and the payors of their healthcare costs (both insurance and self-pay)."]
145#[derive(Debug, Clone, PartialEq)]
146pub struct Coverage {
147    #[doc = "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes."]
148    pub r#id: Option<super::super::types::Id>,
149    #[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."]
150    pub r#meta: Option<Box<super::super::types::Meta>>,
151    #[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."]
152    pub r#implicit_rules: Option<super::super::types::Uri>,
153    #[doc = "The base language in which the resource is written."]
154    pub r#language: Option<super::super::types::Code>,
155    #[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."]
156    pub r#text: Option<Box<super::super::types::Narrative>>,
157    #[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."]
158    pub r#contained: Vec<super::super::Resource>,
159    #[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."]
160    pub r#extension: Vec<super::super::types::Extension>,
161    #[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)."]
162    pub r#modifier_extension: Vec<super::super::types::Extension>,
163    #[doc = "The identifier of the coverage as issued by the insurer."]
164    pub r#identifier: Vec<super::super::types::Identifier>,
165    #[doc = "The status of the resource instance."]
166    pub r#status: super::super::types::Code,
167    #[doc = "The nature of the coverage be it insurance, or cash payment such as self-pay."]
168    pub r#kind: super::super::types::Code,
169    #[doc = "Link to the paying party and optionally what specifically they will be responsible to pay."]
170    pub r#payment_by: Vec<CoveragePaymentBy>,
171    #[doc = "The type of coverage: social program, medical plan, accident coverage (workers compensation, auto), group health or payment by an individual or organization."]
172    pub r#type: Option<Box<super::super::types::CodeableConcept>>,
173    #[doc = "The party who 'owns' the insurance policy."]
174    pub r#policy_holder: Option<Box<super::super::types::Reference>>,
175    #[doc = "The party who has signed-up for or 'owns' the contractual relationship to the policy or to whom the benefit of the policy for services rendered to them or their family is due."]
176    pub r#subscriber: Option<Box<super::super::types::Reference>>,
177    #[doc = "The insurer assigned ID for the Subscriber."]
178    pub r#subscriber_id: Vec<super::super::types::Identifier>,
179    #[doc = "The party who benefits from the insurance coverage; the patient when products and/or services are provided."]
180    pub r#beneficiary: Box<super::super::types::Reference>,
181    #[doc = "A designator for a dependent under the coverage."]
182    pub r#dependent: Option<super::super::types::String>,
183    #[doc = "The relationship of beneficiary (patient) to the subscriber."]
184    pub r#relationship: Option<Box<super::super::types::CodeableConcept>>,
185    #[doc = "Time period during which the coverage is in force. A missing start date indicates the start date isn't known, a missing end date means the coverage is continuing to be in force."]
186    pub r#period: Option<Box<super::super::types::Period>>,
187    #[doc = "The program or plan underwriter, payor, insurance company."]
188    pub r#insurer: Option<Box<super::super::types::Reference>>,
189    #[doc = "A suite of underwriter specific classifiers."]
190    pub r#class: Vec<CoverageClass>,
191    #[doc = "The order of applicability of this coverage relative to other coverages which are currently in force. Note, there may be gaps in the numbering and this does not imply primary, secondary etc. as the specific positioning of coverages depends upon the episode of care. For example; a patient might have (0) auto insurance (1) their own health insurance and (2) spouse's health insurance. When claiming for treatments which were not the result of an auto accident then only coverages (1) and (2) above would be applicatble and would apply in the order specified in parenthesis."]
192    pub r#order: Option<super::super::types::PositiveInt>,
193    #[doc = "The insurer-specific identifier for the insurer-defined network of providers to which the beneficiary may seek treatment which will be covered at the 'in-network' rate, otherwise 'out of network' terms and conditions apply."]
194    pub r#network: Option<super::super::types::String>,
195    #[doc = "A suite of codes indicating the cost category and associated amount which have been detailed in the policy and may have been  included on the health card."]
196    pub r#cost_to_beneficiary: Vec<CoverageCostToBeneficiary>,
197    #[doc = "When 'subrogation=true' this insurance instance has been included not for adjudication but to provide insurers with the details to recover costs."]
198    pub r#subrogation: Option<super::super::types::Boolean>,
199    #[doc = "The policy(s) which constitute this insurance coverage."]
200    pub r#contract: Vec<super::super::types::Reference>,
201    #[doc = "The insurance plan details, benefits and costs, which constitute this insurance coverage."]
202    pub r#insurance_plan: Option<Box<super::super::types::Reference>>,
203}
204#[allow(clippy::derivable_impls)]
205impl Default for Coverage {
206    fn default() -> Self {
207        Self {
208            r#id: Default::default(),
209            r#meta: Default::default(),
210            r#implicit_rules: Default::default(),
211            r#language: Default::default(),
212            r#text: Default::default(),
213            r#contained: Default::default(),
214            r#extension: Default::default(),
215            r#modifier_extension: Default::default(),
216            r#identifier: Default::default(),
217            r#status: super::super::types::Code {
218                id: Some("$invalid".to_string()),
219                ..Default::default()
220            },
221            r#kind: super::super::types::Code {
222                id: Some("$invalid".to_string()),
223                ..Default::default()
224            },
225            r#payment_by: Default::default(),
226            r#type: Default::default(),
227            r#policy_holder: Default::default(),
228            r#subscriber: Default::default(),
229            r#subscriber_id: Default::default(),
230            r#beneficiary: Box::new(super::super::types::Reference {
231                id: Some("$invalid".to_string()),
232                ..Default::default()
233            }),
234            r#dependent: Default::default(),
235            r#relationship: Default::default(),
236            r#period: Default::default(),
237            r#insurer: Default::default(),
238            r#class: Default::default(),
239            r#order: Default::default(),
240            r#network: Default::default(),
241            r#cost_to_beneficiary: Default::default(),
242            r#subrogation: Default::default(),
243            r#contract: Default::default(),
244            r#insurance_plan: Default::default(),
245        }
246    }
247}