UNPKG

fhirbuilder

Version:
116 lines (115 loc) 3.41 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.QuestionnaireAnswerOption = void 0; const base_1 = require("../base"); const base_2 = require("../../../core/r4/validators/base"); /** * @version R4 (v4.0.1) * @summary FHIR® Specification by HL7® * @description Class for QuestionnaireAnswerOption BackboneElement undefined * @property {number} valueInteger * @property {IElement} _valueInteger * @property {string} valueDate * @property {IElement} _valueDate * @property {string} valueTime * @property {IElement} _valueTime * @property {string} valueString * @property {IElement} _valueString * @property {ICoding} valueCoding * @property {IReference} valueReference * @property {boolean} initialSelected * @property {IElement} _initialSelected * @author Roberto Araneda Espinoza */ class QuestionnaireAnswerOption extends base_1.BackboneElement { /** * @description A potential answer that's allowed as the answer to this question. */ valueInteger; /** * @description Extensions for valueInteger */ _valueInteger; /** * @description A potential answer that's allowed as the answer to this question. */ valueDate; /** * @description Extensions for valueDate */ _valueDate; /** * @description A potential answer that's allowed as the answer to this question. */ valueTime; /** * @description Extensions for valueTime */ _valueTime; /** * @description A potential answer that's allowed as the answer to this question. */ valueString; /** * @description Extensions for valueString */ _valueString; /** * @description A potential answer that's allowed as the answer to this question. */ valueCoding; /** * @description A potential answer that's allowed as the answer to this question. */ valueReference; /** * @description Indicates whether the answer value is selected when the list of possible answers is initially shown. */ initialSelected; /** * @description Extensions for initialSelected */ _initialSelected; /** * @description Returns a JSON representation of the model * @returns {Record<string, any>} */ toJson() { return JSON.parse(JSON.stringify(this)); } /** * @description Returns a string representation of the model * @returns {string} */ toString() { return `QuestionnaireAnswerOption${JSON.stringify(this.toJson())}`; } /** * @description Returns a pretty string representation of the model * @returns {string} */ toPrettyString() { return `QuestionnaireAnswerOption${JSON.stringify(this.toJson(), null, 2)}`; } /** * @description Returns a serialized string representation of the model * @returns {string} */ serialize() { return JSON.stringify(this.toJson()); } /** * @description Validates the model * @returns {isValid: boolean, operationOutcome: IOperationOutcome} */ validate() { return (0, base_2.ConformanceValidator)('QuestionnaireAnswerOption', this); } constructor(args) { super(); if (args) Object.assign(this, args); } } exports.QuestionnaireAnswerOption = QuestionnaireAnswerOption;