UNPKG

fhirbuilder

Version:
61 lines (60 loc) 2 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.EncounterParticipantBuilder = 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 EncounterParticipant * @class EncounterParticipantBuilder * @extends {BackboneBuilder} * @implements {IEncounterParticipantBuilder} * @author Roberto Araneda Espinoza */ class EncounterParticipantBuilder extends base_1.BackboneBuilder { encounterParticipant; constructor() { super(); this.encounterParticipant = new models_1.EncounterParticipant(); } /** * @description Builds the model * @returns {EncounterParticipant} */ build() { return Object.assign(this.encounterParticipant, super.build()); } /** * @description Adds a value to the type array * @description Role of participant in encounter. * @param value - the value to add * @returns {this} */ addType(value) { this.encounterParticipant.type = this.encounterParticipant.type || []; this.encounterParticipant.type.push(value); return this; } /** * @description Sets the period value * @description The period of time that the specified participant participated in the encounter. These can overlap or be sub-sets of the overall encounter's period. * @param value - the value to set * @returns {this} */ setPeriod(value) { this.encounterParticipant.period = value; return this; } /** * @description Sets the individual value * @description Persons involved in the encounter other than the patient. * @param value - the value to set * @returns {this} */ setIndividual(value) { this.encounterParticipant.individual = value; return this; } } exports.EncounterParticipantBuilder = EncounterParticipantBuilder;