UNPKG

fhirbuilder

Version:
60 lines (59 loc) 1.8 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.CoverageExceptionBuilder = 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 CoverageException * @class CoverageExceptionBuilder * @extends {BackboneBuilder} * @implements {ICoverageExceptionBuilder} * @author Roberto Araneda Espinoza */ class CoverageExceptionBuilder extends base_1.BackboneBuilder { coverageException; constructor() { super(); this.coverageException = new models_1.CoverageException(); } /** * @description Sets the resource type to CoverageException * @param json - the json to parse * @returns {this} */ fromJSON(json) { const incomingData = typeof json === 'string' ? JSON.parse(json) : json; Object.assign(this.coverageException, incomingData); return this; } /** * @description Builds the model * @returns {CoverageException} */ build() { return Object.assign(this.coverageException, super.build()); } /** * @description Sets the type value * @description The code for the specific exception. * @param value - the value to set * @returns {this} */ setType(value) { this.coverageException.type = value; return this; } /** * @description Sets the period value * @description The timeframe during when the exception is in force. * @param value - the value to set * @returns {this} */ setPeriod(value) { this.coverageException.period = value; return this; } } exports.CoverageExceptionBuilder = CoverageExceptionBuilder;