Class Coverage.Builder
- java.lang.Object
-
- org.linuxforhealth.fhir.model.builder.AbstractBuilder<Resource>
-
- org.linuxforhealth.fhir.model.resource.Resource.Builder
-
- org.linuxforhealth.fhir.model.resource.DomainResource.Builder
-
- org.linuxforhealth.fhir.model.resource.Coverage.Builder
-
- Enclosing class:
- Coverage
public static class Coverage.Builder extends DomainResource.Builder
-
-
Field Summary
-
Fields inherited from class org.linuxforhealth.fhir.model.resource.DomainResource.Builder
contained, extension, modifierExtension, text
-
Fields inherited from class org.linuxforhealth.fhir.model.resource.Resource.Builder
id, implicitRules, language, meta
-
Fields inherited from class org.linuxforhealth.fhir.model.builder.AbstractBuilder
validating
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Coverage.Builder
beneficiary(Reference beneficiary)
The party who benefits from the insurance coverage; the patient when products and/or services are provided.Coverage
build()
Build theCoverage
Coverage.Builder
clazz(java.util.Collection<Coverage.Class> clazz)
A suite of underwriter specific classifiers.Coverage.Builder
clazz(Coverage.Class... clazz)
A suite of underwriter specific classifiers.Coverage.Builder
contained(java.util.Collection<Resource> contained)
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.Coverage.Builder
contained(Resource... contained)
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.Coverage.Builder
contract(java.util.Collection<Reference> contract)
The policy(s) which constitute this insurance coverage.Coverage.Builder
contract(Reference... contract)
The policy(s) which constitute this insurance coverage.Coverage.Builder
costToBeneficiary(java.util.Collection<Coverage.CostToBeneficiary> costToBeneficiary)
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.Coverage.Builder
costToBeneficiary(Coverage.CostToBeneficiary... costToBeneficiary)
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.Coverage.Builder
dependent(java.lang.String dependent)
Convenience method for settingdependent
.Coverage.Builder
dependent(String dependent)
A unique identifier for a dependent under the coverage.Coverage.Builder
extension(java.util.Collection<Extension> extension)
May be used to represent additional information that is not part of the basic definition of the resource.Coverage.Builder
extension(Extension... extension)
May be used to represent additional information that is not part of the basic definition of the resource.protected Coverage.Builder
from(Coverage coverage)
Coverage.Builder
id(java.lang.String id)
The logical id of the resource, as used in the URL for the resource.Coverage.Builder
identifier(java.util.Collection<Identifier> identifier)
A unique identifier assigned to this coverage.Coverage.Builder
identifier(Identifier... identifier)
A unique identifier assigned to this coverage.Coverage.Builder
implicitRules(Uri implicitRules)
A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content.Coverage.Builder
language(Code language)
The base language in which the resource is written.Coverage.Builder
meta(Meta meta)
The metadata about the resource.Coverage.Builder
modifierExtension(java.util.Collection<Extension> modifierExtension)
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.Coverage.Builder
modifierExtension(Extension... modifierExtension)
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.Coverage.Builder
network(java.lang.String network)
Convenience method for settingnetwork
.Coverage.Builder
network(String network)
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.Coverage.Builder
order(PositiveInt order)
The order of applicability of this coverage relative to other coverages which are currently in force.Coverage.Builder
payor(java.util.Collection<Reference> payor)
The program or plan underwriter or payor including both insurance and non-insurance agreements, such as patient-pay agreements.Coverage.Builder
payor(Reference... payor)
The program or plan underwriter or payor including both insurance and non-insurance agreements, such as patient-pay agreements.Coverage.Builder
period(Period period)
Time period during which the coverage is in force.Coverage.Builder
policyHolder(Reference policyHolder)
The party who 'owns' the insurance policy.Coverage.Builder
relationship(CodeableConcept relationship)
The relationship of beneficiary (patient) to the subscriber.Coverage.Builder
status(CoverageStatus status)
The status of the resource instance.Coverage.Builder
subrogation(java.lang.Boolean subrogation)
Convenience method for settingsubrogation
.Coverage.Builder
subrogation(Boolean subrogation)
When 'subrogation=true' this insurance instance has been included not for adjudication but to provide insurers with the details to recover costs.Coverage.Builder
subscriber(Reference subscriber)
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.Coverage.Builder
subscriberId(java.lang.String subscriberId)
Convenience method for settingsubscriberId
.Coverage.Builder
subscriberId(String subscriberId)
The insurer assigned ID for the Subscriber.Coverage.Builder
text(Narrative text)
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.Coverage.Builder
type(CodeableConcept type)
The type of coverage: social program, medical plan, accident coverage (workers compensation, auto), group health or payment by an individual or organization.protected void
validate(Coverage coverage)
-
Methods inherited from class org.linuxforhealth.fhir.model.resource.DomainResource.Builder
from, validate
-
Methods inherited from class org.linuxforhealth.fhir.model.resource.Resource.Builder
from, validate
-
Methods inherited from class org.linuxforhealth.fhir.model.builder.AbstractBuilder
isValidating, setValidating
-
-
-
-
Method Detail
-
id
public Coverage.Builder id(java.lang.String id)
The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.- Overrides:
id
in classDomainResource.Builder
- Parameters:
id
- Logical id of this artifact- Returns:
- A reference to this Builder instance
-
meta
public Coverage.Builder meta(Meta meta)
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.- Overrides:
meta
in classDomainResource.Builder
- Parameters:
meta
- Metadata about the resource- Returns:
- A reference to this Builder instance
-
implicitRules
public Coverage.Builder implicitRules(Uri implicitRules)
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.- Overrides:
implicitRules
in classDomainResource.Builder
- Parameters:
implicitRules
- A set of rules under which this content was created- Returns:
- A reference to this Builder instance
-
language
public Coverage.Builder language(Code language)
The base language in which the resource is written.- Overrides:
language
in classDomainResource.Builder
- Parameters:
language
- Language of the resource content- Returns:
- A reference to this Builder instance
-
text
public Coverage.Builder text(Narrative text)
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.- Overrides:
text
in classDomainResource.Builder
- Parameters:
text
- Text summary of the resource, for human interpretation- Returns:
- A reference to this Builder instance
-
contained
public Coverage.Builder contained(Resource... contained)
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.Adds new element(s) to the existing list. If any of the elements are null, calling
build()
will fail.- Overrides:
contained
in classDomainResource.Builder
- Parameters:
contained
- Contained, inline Resources- Returns:
- A reference to this Builder instance
-
contained
public Coverage.Builder contained(java.util.Collection<Resource> contained)
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.Replaces the existing list with a new one containing elements from the Collection. If any of the elements are null, calling
build()
will fail.- Overrides:
contained
in classDomainResource.Builder
- Parameters:
contained
- Contained, inline Resources- Returns:
- A reference to this Builder instance
- Throws:
java.lang.NullPointerException
- If the passed collection is null
-
extension
public Coverage.Builder extension(Extension... extension)
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.Adds new element(s) to the existing list. If any of the elements are null, calling
build()
will fail.- Overrides:
extension
in classDomainResource.Builder
- Parameters:
extension
- Additional content defined by implementations- Returns:
- A reference to this Builder instance
-
extension
public Coverage.Builder extension(java.util.Collection<Extension> extension)
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.Replaces the existing list with a new one containing elements from the Collection. If any of the elements are null, calling
build()
will fail.- Overrides:
extension
in classDomainResource.Builder
- Parameters:
extension
- Additional content defined by implementations- Returns:
- A reference to this Builder instance
- Throws:
java.lang.NullPointerException
- If the passed collection is null
-
modifierExtension
public Coverage.Builder modifierExtension(Extension... modifierExtension)
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.Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).
Adds new element(s) to the existing list. If any of the elements are null, calling
build()
will fail.- Overrides:
modifierExtension
in classDomainResource.Builder
- Parameters:
modifierExtension
- Extensions that cannot be ignored- Returns:
- A reference to this Builder instance
-
modifierExtension
public Coverage.Builder modifierExtension(java.util.Collection<Extension> modifierExtension)
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.Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).
Replaces the existing list with a new one containing elements from the Collection. If any of the elements are null, calling
build()
will fail.- Overrides:
modifierExtension
in classDomainResource.Builder
- Parameters:
modifierExtension
- Extensions that cannot be ignored- Returns:
- A reference to this Builder instance
- Throws:
java.lang.NullPointerException
- If the passed collection is null
-
identifier
public Coverage.Builder identifier(Identifier... identifier)
A unique identifier assigned to this coverage.Adds new element(s) to the existing list. If any of the elements are null, calling
build()
will fail.- Parameters:
identifier
- Business Identifier for the coverage- Returns:
- A reference to this Builder instance
-
identifier
public Coverage.Builder identifier(java.util.Collection<Identifier> identifier)
A unique identifier assigned to this coverage.Replaces the existing list with a new one containing elements from the Collection. If any of the elements are null, calling
build()
will fail.- Parameters:
identifier
- Business Identifier for the coverage- Returns:
- A reference to this Builder instance
- Throws:
java.lang.NullPointerException
- If the passed collection is null
-
status
public Coverage.Builder status(CoverageStatus status)
The status of the resource instance.This element is required.
- Parameters:
status
- active | cancelled | draft | entered-in-error- Returns:
- A reference to this Builder instance
-
type
public Coverage.Builder type(CodeableConcept type)
The type of coverage: social program, medical plan, accident coverage (workers compensation, auto), group health or payment by an individual or organization.- Parameters:
type
- Coverage category such as medical or accident- Returns:
- A reference to this Builder instance
-
policyHolder
public Coverage.Builder policyHolder(Reference policyHolder)
The party who 'owns' the insurance policy.Allowed resource types for this reference:
- Parameters:
policyHolder
- Owner of the policy- Returns:
- A reference to this Builder instance
-
subscriber
public Coverage.Builder subscriber(Reference subscriber)
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.Allowed resource types for this reference:
- Parameters:
subscriber
- Subscriber to the policy- Returns:
- A reference to this Builder instance
-
subscriberId
public Coverage.Builder subscriberId(java.lang.String subscriberId)
Convenience method for settingsubscriberId
.- Parameters:
subscriberId
- ID assigned to the subscriber- Returns:
- A reference to this Builder instance
- See Also:
subscriberId(org.linuxforhealth.fhir.model.type.String)
-
subscriberId
public Coverage.Builder subscriberId(String subscriberId)
The insurer assigned ID for the Subscriber.- Parameters:
subscriberId
- ID assigned to the subscriber- Returns:
- A reference to this Builder instance
-
beneficiary
public Coverage.Builder beneficiary(Reference beneficiary)
The party who benefits from the insurance coverage; the patient when products and/or services are provided.This element is required.
Allowed resource types for this reference:
- Parameters:
beneficiary
- Plan beneficiary- Returns:
- A reference to this Builder instance
-
dependent
public Coverage.Builder dependent(java.lang.String dependent)
Convenience method for settingdependent
.- Parameters:
dependent
- Dependent number- Returns:
- A reference to this Builder instance
- See Also:
dependent(org.linuxforhealth.fhir.model.type.String)
-
dependent
public Coverage.Builder dependent(String dependent)
A unique identifier for a dependent under the coverage.- Parameters:
dependent
- Dependent number- Returns:
- A reference to this Builder instance
-
relationship
public Coverage.Builder relationship(CodeableConcept relationship)
The relationship of beneficiary (patient) to the subscriber.- Parameters:
relationship
- Beneficiary relationship to the subscriber- Returns:
- A reference to this Builder instance
-
period
public Coverage.Builder period(Period period)
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.- Parameters:
period
- Coverage start and end dates- Returns:
- A reference to this Builder instance
-
payor
public Coverage.Builder payor(Reference... payor)
The program or plan underwriter or payor including both insurance and non-insurance agreements, such as patient-pay agreements.Adds new element(s) to the existing list. If any of the elements are null, calling
build()
will fail.This element is required.
Allowed resource types for the references:
- Parameters:
payor
- Issuer of the policy- Returns:
- A reference to this Builder instance
-
payor
public Coverage.Builder payor(java.util.Collection<Reference> payor)
The program or plan underwriter or payor including both insurance and non-insurance agreements, such as patient-pay agreements.Replaces the existing list with a new one containing elements from the Collection. If any of the elements are null, calling
build()
will fail.This element is required.
Allowed resource types for the references:
- Parameters:
payor
- Issuer of the policy- Returns:
- A reference to this Builder instance
- Throws:
java.lang.NullPointerException
- If the passed collection is null
-
clazz
public Coverage.Builder clazz(Coverage.Class... clazz)
A suite of underwriter specific classifiers.Adds new element(s) to the existing list. If any of the elements are null, calling
build()
will fail.- Parameters:
clazz
- Additional coverage classifications- Returns:
- A reference to this Builder instance
-
clazz
public Coverage.Builder clazz(java.util.Collection<Coverage.Class> clazz)
A suite of underwriter specific classifiers.Replaces the existing list with a new one containing elements from the Collection. If any of the elements are null, calling
build()
will fail.- Parameters:
clazz
- Additional coverage classifications- Returns:
- A reference to this Builder instance
- Throws:
java.lang.NullPointerException
- If the passed collection is null
-
order
public Coverage.Builder order(PositiveInt order)
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.- Parameters:
order
- Relative order of the coverage- Returns:
- A reference to this Builder instance
-
network
public Coverage.Builder network(java.lang.String network)
Convenience method for settingnetwork
.- Parameters:
network
- Insurer network- Returns:
- A reference to this Builder instance
- See Also:
network(org.linuxforhealth.fhir.model.type.String)
-
network
public Coverage.Builder network(String network)
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.- Parameters:
network
- Insurer network- Returns:
- A reference to this Builder instance
-
costToBeneficiary
public Coverage.Builder costToBeneficiary(Coverage.CostToBeneficiary... costToBeneficiary)
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.Adds new element(s) to the existing list. If any of the elements are null, calling
build()
will fail.- Parameters:
costToBeneficiary
- Patient payments for services/products- Returns:
- A reference to this Builder instance
-
costToBeneficiary
public Coverage.Builder costToBeneficiary(java.util.Collection<Coverage.CostToBeneficiary> costToBeneficiary)
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.Replaces the existing list with a new one containing elements from the Collection. If any of the elements are null, calling
build()
will fail.- Parameters:
costToBeneficiary
- Patient payments for services/products- Returns:
- A reference to this Builder instance
- Throws:
java.lang.NullPointerException
- If the passed collection is null
-
subrogation
public Coverage.Builder subrogation(java.lang.Boolean subrogation)
Convenience method for settingsubrogation
.- Parameters:
subrogation
- Reimbursement to insurer- Returns:
- A reference to this Builder instance
- See Also:
subrogation(org.linuxforhealth.fhir.model.type.Boolean)
-
subrogation
public Coverage.Builder subrogation(Boolean subrogation)
When 'subrogation=true' this insurance instance has been included not for adjudication but to provide insurers with the details to recover costs.- Parameters:
subrogation
- Reimbursement to insurer- Returns:
- A reference to this Builder instance
-
contract
public Coverage.Builder contract(Reference... contract)
The policy(s) which constitute this insurance coverage.Adds new element(s) to the existing list. If any of the elements are null, calling
build()
will fail.Allowed resource types for the references:
- Parameters:
contract
- Contract details- Returns:
- A reference to this Builder instance
-
contract
public Coverage.Builder contract(java.util.Collection<Reference> contract)
The policy(s) which constitute this insurance coverage.Replaces the existing list with a new one containing elements from the Collection. If any of the elements are null, calling
build()
will fail.Allowed resource types for the references:
- Parameters:
contract
- Contract details- Returns:
- A reference to this Builder instance
- Throws:
java.lang.NullPointerException
- If the passed collection is null
-
build
public Coverage build()
-
validate
protected void validate(Coverage coverage)
-
from
protected Coverage.Builder from(Coverage coverage)
-
-