UNPKG

fhirbuilder

Version:
96 lines (95 loc) 2.83 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.QuestionnaireResponseItem = 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 QuestionnaireResponseItem BackboneElement undefined * @property {string} linkId * @property {IElement} _linkId * @property {string} definition * @property {IElement} _definition * @property {string} text * @property {IElement} _text * @property {IQuestionnaireResponseAnswer[]} answer * @property {IQuestionnaireResponseItem[]} item * @author Roberto Araneda Espinoza */ class QuestionnaireResponseItem extends base_1.BackboneElement { /** * @description The item from the Questionnaire that corresponds to this item in the QuestionnaireResponse resource. */ linkId; /** * @description Extensions for linkId */ _linkId; /** * @description A reference to an [[[ElementDefinition]]] that provides the details for the item. */ definition; /** * @description Extensions for definition */ _definition; /** * @description Text that is displayed above the contents of the group or as the text of the question being answered. */ text; /** * @description Extensions for text */ _text; /** * @description The respondent's answer(s) to the question. */ answer; /** * @description Questions or sub-groups nested beneath a question or group. */ item; /** * @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 `QuestionnaireResponseItem${JSON.stringify(this.toJson())}`; } /** * @description Returns a pretty string representation of the model * @returns {string} */ toPrettyString() { return `QuestionnaireResponseItem${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)('QuestionnaireResponseItem', this); } constructor(args) { super(); if (args) Object.assign(this, args); } } exports.QuestionnaireResponseItem = QuestionnaireResponseItem;