fhirbuilder
Version:
Another FHIR Tool to build FHIR Resources
81 lines (80 loc) • 2.76 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.CoverageCostToBeneficiaryBuilder = void 0;
const models_1 = require("../../models");
const base_1 = require("../base");
/**
* @version R4 (v4.0.1)
* @summary FHIR® Specification by HL7®
* @description Class for building a CoverageCostToBeneficiary
* @class CoverageCostToBeneficiaryBuilder
* @extends {BackboneBuilder}
* @implements {ICoverageCostToBeneficiaryBuilder}
* @author Roberto Araneda Espinoza
*/
class CoverageCostToBeneficiaryBuilder extends base_1.BackboneBuilder {
coverageCostToBeneficiary;
constructor() {
super();
this.coverageCostToBeneficiary = new models_1.CoverageCostToBeneficiary();
}
/**
* @description Sets the resource type to CoverageCostToBeneficiary
* @param json - the json to parse
* @returns {this}
*/
fromJSON(json) {
const incomingData = typeof json === 'string' ? JSON.parse(json) : json;
Object.assign(this.coverageCostToBeneficiary, incomingData);
return this;
}
/**
* @description Builds the model
* @returns {CoverageCostToBeneficiary}
*/
build() {
return Object.assign(this.coverageCostToBeneficiary, super.build());
}
/**
* @description Sets the type value
* @description The category of patient centric costs associated with treatment.
* @param value - the value to set
* @returns {this}
*/
setType(value) {
this.coverageCostToBeneficiary.type = value;
return this;
}
/**
* @description Sets the valueQuantity value
* @description The amount due from the patient for the cost category.
* @param value - the value to set
* @returns {this}
*/
setValueQuantity(value) {
this.coverageCostToBeneficiary.valueQuantity = value;
return this;
}
/**
* @description Sets the valueMoney value
* @description The amount due from the patient for the cost category.
* @param value - the value to set
* @returns {this}
*/
setValueMoney(value) {
this.coverageCostToBeneficiary.valueMoney = value;
return this;
}
/**
* @description Adds a value to the exception array
* @description A suite of codes indicating exceptions or reductions to patient costs and their effective periods.
* @param value - the value to add
* @returns {this}
*/
addException(value) {
this.coverageCostToBeneficiary.exception = this.coverageCostToBeneficiary.exception || [];
this.coverageCostToBeneficiary.exception.push(value);
return this;
}
}
exports.CoverageCostToBeneficiaryBuilder = CoverageCostToBeneficiaryBuilder;