fhirbuilder
Version:
Another FHIR Tool to build FHIR Resources
176 lines (175 loc) • 5.8 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Coverage = void 0;
const base_1 = require("../base");
const base_2 = require("../../../core/r4/validators/base");
/**
* @version R4 (v4.0.1)
* @summary FHIR® Specification by HL7®
* @description Class for Coverage Resource
* @property {string} resourceType
* @property {IIdentifier[]} identifier
* @property {FinancialResourceStatusCodesType} status
* @property {IElement} _status
* @property {ICodeableConcept} type
* @property {IReference} policyHolder
* @property {IReference} subscriber
* @property {string} subscriberId
* @property {IElement} _subscriberId
* @property {IReference} beneficiary
* @property {string} dependent
* @property {IElement} _dependent
* @property {ICodeableConcept} relationship
* @property {IPeriod} period
* @property {IReference[]} payor
* @property {ICoverageClass[]} class
* @property {number} order
* @property {IElement} _order
* @property {string} network
* @property {IElement} _network
* @property {ICoverageCostToBeneficiary[]} costToBeneficiary
* @property {boolean} subrogation
* @property {IElement} _subrogation
* @property {IReference[]} contract
* @author Roberto Araneda Espinoza
*/
class Coverage extends base_1.DomainResource {
/**
* @description The type of resource
*/
resourceType = 'Coverage';
/**
* @description A unique identifier assigned to this coverage.
*/
identifier;
/**
* @description The status of the resource instance.
active | cancelled | draft | entered-in-error.
*/
status;
/**
* @description Extensions for status
*/
_status;
/**
* @description The type of coverage: social program, medical plan, accident coverage (workers compensation, auto), group health or payment by an individual or organization.
*/
type;
/**
* @description The party who 'owns' the insurance policy.
*/
policyHolder;
/**
* @description 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.
*/
subscriber;
/**
* @description The insurer assigned ID for the Subscriber.
*/
subscriberId;
/**
* @description Extensions for subscriberId
*/
_subscriberId;
/**
* @description The party who benefits from the insurance coverage; the patient when products and/or services are provided.
*/
beneficiary;
/**
* @description A unique identifier for a dependent under the coverage.
*/
dependent;
/**
* @description Extensions for dependent
*/
_dependent;
/**
* @description The relationship of beneficiary (patient) to the subscriber.
*/
relationship;
/**
* @description 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.
*/
period;
/**
* @description The program or plan underwriter or payor including both insurance and non-insurance agreements, such as patient-pay agreements.
*/
payor;
/**
* @description A suite of underwriter specific classifiers.
*/
class;
/**
* @description 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.
*/
order;
/**
* @description Extensions for order
*/
_order;
/**
* @description 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.
*/
network;
/**
* @description Extensions for network
*/
_network;
/**
* @description 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.
*/
costToBeneficiary;
/**
* @description When 'subrogation=true' this insurance instance has been included not for adjudication but to provide insurers with the details to recover costs.
*/
subrogation;
/**
* @description Extensions for subrogation
*/
_subrogation;
/**
* @description The policy(s) which constitute this insurance coverage.
*/
contract;
/**
* @description Returns a JSON representation of the model
* @returns {Record<string, any>}
*/
toJson() {
return JSON.parse(JSON.stringify(this));
}
/**
* @description Returns a string representation of the model
* @returns {string}
*/
toString() {
return `Coverage${JSON.stringify(this.toJson())}`;
}
/**
* @description Returns a pretty string representation of the model
* @returns {string}
*/
toPrettyString() {
return `Coverage${JSON.stringify(this.toJson(), null, 2)}`;
}
/**
* @description Returns a serialized string representation of the model
* @returns {string}
*/
serialize() {
return JSON.stringify(this.toJson());
}
/**
* @description Validates the model
* @returns {isValid: boolean, operationOutcome: IOperationOutcome}
*/
validate() {
return (0, base_2.ConformanceValidator)('Coverage', this);
}
constructor(args) {
super();
if (args)
Object.assign(this, args);
}
}
exports.Coverage = Coverage;