UNPKG

fhirbuilder

Version:
61 lines (60 loc) 2.04 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.EpisodeOfCareStatusHistoryBuilder = 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 EpisodeOfCareStatusHistory * @class EpisodeOfCareStatusHistoryBuilder * @extends {BackboneBuilder} * @implements {IEpisodeOfCareStatusHistoryBuilder} * @author Roberto Araneda Espinoza */ class EpisodeOfCareStatusHistoryBuilder extends base_1.BackboneBuilder { episodeOfCareStatusHistory; constructor() { super(); this.episodeOfCareStatusHistory = new models_1.EpisodeOfCareStatusHistory(); } /** * @description Adds a primitive extension to the element * @param param - the field to add the extension to * @param extension - the extension to add * @returns {this} * @example addPrimitiveExtension('_value', { value: 'test' }) */ addPrimitiveExtension(param, extension) { this.episodeOfCareStatusHistory[param] = extension; return this; } /** * @description Builds the model * @returns {EpisodeOfCareStatusHistory} */ build() { return Object.assign(this.episodeOfCareStatusHistory, super.build()); } /** * @description Sets the status value * @description planned | waitlist | active | onhold | finished | cancelled. * @param value - the value to set * @returns {this} */ setStatus(value) { this.episodeOfCareStatusHistory.status = value; return this; } /** * @description Sets the period value * @description The period during this EpisodeOfCare that the specific status applied. * @param value - the value to set * @returns {this} */ setPeriod(value) { this.episodeOfCareStatusHistory.period = value; return this; } } exports.EpisodeOfCareStatusHistoryBuilder = EpisodeOfCareStatusHistoryBuilder;