UNPKG

fhirbuilder

Version:
125 lines (124 loc) 4.22 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.QuestionnaireResponse = 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 QuestionnaireResponse Resource * @property {string} resourceType * @property {IIdentifier} identifier * @property {IReference[]} basedOn * @property {IReference[]} partOf * @property {string} questionnaire * @property {string} status * @property {IElement} _status * @property {IReference} subject * @property {IReference} encounter * @property {string} authored * @property {IElement} _authored * @property {IReference} author * @property {IReference} source * @property {IQuestionnaireResponseItem[]} item * @author Roberto Araneda Espinoza */ class QuestionnaireResponse extends base_1.DomainResource { /** * @description The type of resource */ resourceType = 'QuestionnaireResponse'; /** * @description A business identifier assigned to a particular completed (or partially completed) questionnaire. */ identifier; /** * @description The order, proposal or plan that is fulfilled in whole or in part by this QuestionnaireResponse. For example, a ServiceRequest seeking an intake assessment or a decision support recommendation to assess for post-partum depression. */ basedOn; /** * @description A procedure or observation that this questionnaire was performed as part of the execution of. For example, the surgery a checklist was executed as part of. */ partOf; /** * @description The Questionnaire that defines and organizes the questions for which answers are being provided. */ questionnaire; /** * @description The position of the questionnaire response within its overall lifecycle. */ status; /** * @description Extensions for status */ _status; /** * @description The subject of the questionnaire response. This could be a patient, organization, practitioner, device, etc. This is who/what the answers apply to, but is not necessarily the source of information. */ subject; /** * @description The Encounter during which this questionnaire response was created or to which the creation of this record is tightly associated. */ encounter; /** * @description The date and/or time that this set of answers were last changed. */ authored; /** * @description Extensions for authored */ _authored; /** * @description Person who received the answers to the questions in the QuestionnaireResponse and recorded them in the system. */ author; /** * @description The person who answered the questions about the subject. */ source; /** * @description A group or question item from the original questionnaire for which answers are provided. */ 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 `QuestionnaireResponse${JSON.stringify(this.toJson())}`; } /** * @description Returns a pretty string representation of the model * @returns {string} */ toPrettyString() { return `QuestionnaireResponse${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)('QuestionnaireResponse', this); } constructor(args) { super(); if (args) Object.assign(this, args); } } exports.QuestionnaireResponse = QuestionnaireResponse;