UNPKG

fhirbuilder

Version:
71 lines (70 loc) 2.38 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.CareTeamParticipantBuilder = 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 CareTeamParticipant * @class CareTeamParticipantBuilder * @extends {BackboneBuilder} * @implements {ICareTeamParticipantBuilder} * @author Roberto Araneda Espinoza */ class CareTeamParticipantBuilder extends base_1.BackboneBuilder { careTeamParticipant; constructor() { super(); this.careTeamParticipant = new models_1.CareTeamParticipant(); } /** * @description Builds the model * @returns {CareTeamParticipant} */ build() { return Object.assign(this.careTeamParticipant, super.build()); } /** * @description Adds a value to the role array * @description Indicates specific responsibility of an individual within the care team, such as "Primary care physician", "Trained social worker counselor", "Caregiver", etc. * @param value - the value to add * @returns {this} */ addRole(value) { this.careTeamParticipant.role = this.careTeamParticipant.role || []; this.careTeamParticipant.role.push(value); return this; } /** * @description Sets the member value * @description The specific person or organization who is participating/expected to participate in the care team. * @param value - the value to set * @returns {this} */ setMember(value) { this.careTeamParticipant.member = value; return this; } /** * @description Sets the onBehalfOf value * @description The organization of the practitioner. * @param value - the value to set * @returns {this} */ setOnBehalfOf(value) { this.careTeamParticipant.onBehalfOf = value; return this; } /** * @description Sets the period value * @description Indicates when the specific member or organization did (or is intended to) come into effect and end. * @param value - the value to set * @returns {this} */ setPeriod(value) { this.careTeamParticipant.period = value; return this; } } exports.CareTeamParticipantBuilder = CareTeamParticipantBuilder;