fhirbolt_model/generated/r4b/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 = "A suite of underwriter specific classifiers."]
11#[derive(Debug, Clone, PartialEq)]
12pub struct CoverageClass {
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 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."]
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 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)."]
18    pub r#modifier_extension: Vec<super::super::types::Extension>,
19    #[doc = "The type of classification for which an insurer-specific class label or number and optional name is provided, for example may be used to identify a class of coverage or employer group, Policy, Plan."]
20    pub r#type: Box<super::super::types::CodeableConcept>,
21    #[doc = "The alphanumeric string value associated with the insurer issued label."]
22    pub r#value: super::super::types::String,
23    #[doc = "A short description for the class."]
24    pub r#name: Option<super::super::types::String>,
25}
26#[allow(clippy::derivable_impls)]
27impl Default for CoverageClass {
28    fn default() -> Self {
29        Self {
30            r#id: Default::default(),
31            r#extension: Default::default(),
32            r#modifier_extension: Default::default(),
33            r#type: Box::new(super::super::types::CodeableConcept {
34                id: Some("$invalid".to_string()),
35                ..Default::default()
36            }),
37            r#value: super::super::types::String {
38                id: Some("$invalid".to_string()),
39                ..Default::default()
40            },
41            r#name: Default::default(),
42        }
43    }
44}
45#[doc = "A suite of codes indicating exceptions or reductions to patient costs and their effective periods."]
46#[derive(Debug, Clone, PartialEq)]
47pub struct CoverageCostToBeneficiaryException {
48    #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
49    pub r#id: Option<std::string::String>,
50    #[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."]
51    pub r#extension: Vec<super::super::types::Extension>,
52    #[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)."]
53    pub r#modifier_extension: Vec<super::super::types::Extension>,
54    #[doc = "The code for the specific exception."]
55    pub r#type: Box<super::super::types::CodeableConcept>,
56    #[doc = "The timeframe during when the exception is in force."]
57    pub r#period: Option<Box<super::super::types::Period>>,
58}
59#[allow(clippy::derivable_impls)]
60impl Default for CoverageCostToBeneficiaryException {
61    fn default() -> Self {
62        Self {
63            r#id: Default::default(),
64            r#extension: Default::default(),
65            r#modifier_extension: Default::default(),
66            r#type: Box::new(super::super::types::CodeableConcept {
67                id: Some("$invalid".to_string()),
68                ..Default::default()
69            }),
70            r#period: Default::default(),
71        }
72    }
73}
74#[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."]
75#[derive(Debug, Clone, PartialEq)]
76pub struct CoverageCostToBeneficiary {
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 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."]
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 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)."]
82    pub r#modifier_extension: Vec<super::super::types::Extension>,
83    #[doc = "The category of patient centric costs associated with treatment."]
84    pub r#type: Option<Box<super::super::types::CodeableConcept>>,
85    #[doc = "The amount due from the patient for the cost category."]
86    pub r#value: CoverageCostToBeneficiaryValue,
87    #[doc = "A suite of codes indicating exceptions or reductions to patient costs and their effective periods."]
88    pub r#exception: Vec<CoverageCostToBeneficiaryException>,
89}
90#[allow(clippy::derivable_impls)]
91impl Default for CoverageCostToBeneficiary {
92    fn default() -> Self {
93        Self {
94            r#id: Default::default(),
95            r#extension: Default::default(),
96            r#modifier_extension: Default::default(),
97            r#type: Default::default(),
98            r#value: Default::default(),
99            r#exception: Default::default(),
100        }
101    }
102}
103#[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)."]
104#[derive(Debug, Clone, PartialEq)]
105pub struct Coverage {
106    #[doc = "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes."]
107    pub r#id: Option<super::super::types::Id>,
108    #[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."]
109    pub r#meta: Option<Box<super::super::types::Meta>>,
110    #[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."]
111    pub r#implicit_rules: Option<super::super::types::Uri>,
112    #[doc = "The base language in which the resource is written."]
113    pub r#language: Option<super::super::types::Code>,
114    #[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."]
115    pub r#text: Option<Box<super::super::types::Narrative>>,
116    #[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."]
117    pub r#contained: Vec<super::super::Resource>,
118    #[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."]
119    pub r#extension: Vec<super::super::types::Extension>,
120    #[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)."]
121    pub r#modifier_extension: Vec<super::super::types::Extension>,
122    #[doc = "A unique identifier assigned to this coverage."]
123    pub r#identifier: Vec<super::super::types::Identifier>,
124    #[doc = "The status of the resource instance."]
125    pub r#status: super::super::types::Code,
126    #[doc = "The type of coverage: social program, medical plan, accident coverage (workers compensation, auto), group health or payment by an individual or organization."]
127    pub r#type: Option<Box<super::super::types::CodeableConcept>>,
128    #[doc = "The party who 'owns' the insurance policy."]
129    pub r#policy_holder: Option<Box<super::super::types::Reference>>,
130    #[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."]
131    pub r#subscriber: Option<Box<super::super::types::Reference>>,
132    #[doc = "The insurer assigned ID for the Subscriber."]
133    pub r#subscriber_id: Option<super::super::types::String>,
134    #[doc = "The party who benefits from the insurance coverage; the patient when products and/or services are provided."]
135    pub r#beneficiary: Box<super::super::types::Reference>,
136    #[doc = "A unique identifier for a dependent under the coverage."]
137    pub r#dependent: Option<super::super::types::String>,
138    #[doc = "The relationship of beneficiary (patient) to the subscriber."]
139    pub r#relationship: Option<Box<super::super::types::CodeableConcept>>,
140    #[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."]
141    pub r#period: Option<Box<super::super::types::Period>>,
142    #[doc = "The program or plan underwriter or payor including both insurance and non-insurance agreements, such as patient-pay agreements."]
143    pub r#payor: Vec<super::super::types::Reference>,
144    #[doc = "A suite of underwriter specific classifiers."]
145    pub r#class: Vec<CoverageClass>,
146    #[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."]
147    pub r#order: Option<super::super::types::PositiveInt>,
148    #[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."]
149    pub r#network: Option<super::super::types::String>,
150    #[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."]
151    pub r#cost_to_beneficiary: Vec<CoverageCostToBeneficiary>,
152    #[doc = "When 'subrogation=true' this insurance instance has been included not for adjudication but to provide insurers with the details to recover costs."]
153    pub r#subrogation: Option<super::super::types::Boolean>,
154    #[doc = "The policy(s) which constitute this insurance coverage."]
155    pub r#contract: Vec<super::super::types::Reference>,
156}
157#[allow(clippy::derivable_impls)]
158impl Default for Coverage {
159    fn default() -> Self {
160        Self {
161            r#id: Default::default(),
162            r#meta: Default::default(),
163            r#implicit_rules: Default::default(),
164            r#language: Default::default(),
165            r#text: Default::default(),
166            r#contained: Default::default(),
167            r#extension: Default::default(),
168            r#modifier_extension: Default::default(),
169            r#identifier: Default::default(),
170            r#status: super::super::types::Code {
171                id: Some("$invalid".to_string()),
172                ..Default::default()
173            },
174            r#type: Default::default(),
175            r#policy_holder: Default::default(),
176            r#subscriber: Default::default(),
177            r#subscriber_id: Default::default(),
178            r#beneficiary: Box::new(super::super::types::Reference {
179                id: Some("$invalid".to_string()),
180                ..Default::default()
181            }),
182            r#dependent: Default::default(),
183            r#relationship: Default::default(),
184            r#period: Default::default(),
185            r#payor: Default::default(),
186            r#class: Default::default(),
187            r#order: Default::default(),
188            r#network: Default::default(),
189            r#cost_to_beneficiary: Default::default(),
190            r#subrogation: Default::default(),
191            r#contract: Default::default(),
192        }
193    }
194}