UNPKG

fhirbuilder

Version:
161 lines (160 loc) 4.94 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.QuestionnaireInitialBuilder = 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 QuestionnaireInitial * @class QuestionnaireInitialBuilder * @extends {BackboneBuilder} * @implements {IQuestionnaireInitialBuilder} * @author Roberto Araneda Espinoza */ class QuestionnaireInitialBuilder extends base_1.BackboneBuilder { questionnaireInitial; constructor() { super(); this.questionnaireInitial = new models_1.QuestionnaireInitial(); } /** * @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.questionnaireInitial[param] = extension; return this; } /** * @description Builds the model * @returns {QuestionnaireInitial} */ build() { return Object.assign(this.questionnaireInitial, super.build()); } /** * @description Sets the valueBoolean value * @description The actual value to for an initial answer. * @param value - the value to set * @returns {this} */ setValueBoolean(value) { this.questionnaireInitial.valueBoolean = value; return this; } /** * @description Sets the valueDecimal value * @description The actual value to for an initial answer. * @param value - the value to set * @returns {this} */ setValueDecimal(value) { this.questionnaireInitial.valueDecimal = value; return this; } /** * @description Sets the valueInteger value * @description The actual value to for an initial answer. * @param value - the value to set * @returns {this} */ setValueInteger(value) { this.questionnaireInitial.valueInteger = value; return this; } /** * @description Sets the valueDate value * @description The actual value to for an initial answer. * @param value - the value to set * @returns {this} */ setValueDate(value) { this.questionnaireInitial.valueDate = value; return this; } /** * @description Sets the valueDateTime value * @description The actual value to for an initial answer. * @param value - the value to set * @returns {this} */ setValueDateTime(value) { this.questionnaireInitial.valueDateTime = value; return this; } /** * @description Sets the valueTime value * @description The actual value to for an initial answer. * @param value - the value to set * @returns {this} */ setValueTime(value) { this.questionnaireInitial.valueTime = value; return this; } /** * @description Sets the valueString value * @description The actual value to for an initial answer. * @param value - the value to set * @returns {this} */ setValueString(value) { this.questionnaireInitial.valueString = value; return this; } /** * @description Sets the valueUri value * @description The actual value to for an initial answer. * @param value - the value to set * @returns {this} */ setValueUri(value) { this.questionnaireInitial.valueUri = value; return this; } /** * @description Sets the valueAttachment value * @description The actual value to for an initial answer. * @param value - the value to set * @returns {this} */ setValueAttachment(value) { this.questionnaireInitial.valueAttachment = value; return this; } /** * @description Sets the valueCoding value * @description The actual value to for an initial answer. * @param value - the value to set * @returns {this} */ setValueCoding(value) { this.questionnaireInitial.valueCoding = value; return this; } /** * @description Sets the valueQuantity value * @description The actual value to for an initial answer. * @param value - the value to set * @returns {this} */ setValueQuantity(value) { this.questionnaireInitial.valueQuantity = value; return this; } /** * @description Sets the valueReference value * @description The actual value to for an initial answer. * @param value - the value to set * @returns {this} */ setValueReference(value) { this.questionnaireInitial.valueReference = value; return this; } } exports.QuestionnaireInitialBuilder = QuestionnaireInitialBuilder;