UNPKG

fhirbuilder

Version:
190 lines (187 loc) 5.69 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Patient = 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 Patient Resource * @property {string} resourceType * @property {IIdentifier[]} identifier * @property {boolean} active * @property {IElement} _active * @property {IHumanName[]} name * @property {IContactPoint[]} telecom * @property {AdministrativeGenderType} gender * @property {IElement} _gender * @property {string} birthDate * @property {IElement} _birthDate * @property {boolean} deceasedBoolean * @property {IElement} _deceasedBoolean * @property {string} deceasedDateTime * @property {IElement} _deceasedDateTime * @property {IAddress[]} address * @property {ICodeableConcept} maritalStatus * @property {boolean} multipleBirthBoolean * @property {IElement} _multipleBirthBoolean * @property {number} multipleBirthInteger * @property {IElement} _multipleBirthInteger * @property {IAttachment[]} photo * @property {IPatientContact[]} contact * @property {IPatientCommunication[]} communication * @property {IReference[]} generalPractitioner * @property {IReference} managingOrganization * @property {IPatientLink[]} link * @author Roberto Araneda Espinoza */ class Patient extends base_1.DomainResource { /** * @description The type of resource */ resourceType = 'Patient'; /** * @description An identifier for this patient. */ identifier; /** * @description Whether this patient record is in active use. Many systems use this property to mark as non-current patients, such as those that have not been seen for a period of time based on an organization's business rules. It is often used to filter patient lists to exclude inactive patients Deceased patients may also be marked as inactive for the same reasons, but may be active for some time after death. */ active; /** * @description Extensions for active */ _active; /** * @description A name associated with the individual. */ name; /** * @description A contact detail (e.g. a telephone number or an email address) by which the individual may be contacted. */ telecom; /** * @description Administrative Gender - the gender that the patient is considered to have for administration and record keeping purposes. */ gender; /** * @description Extensions for gender */ _gender; /** * @description The date of birth for the individual. */ birthDate; /** * @description Extensions for birthDate */ _birthDate; /** * @description Indicates if the individual is deceased or not. */ deceasedBoolean; /** * @description Extensions for deceasedBoolean */ _deceasedBoolean; /** * @description Indicates if the individual is deceased or not. */ deceasedDateTime; /** * @description Extensions for deceasedDateTime */ _deceasedDateTime; /** * @description An address for the individual. */ address; /** * @description This field contains a patient's most recent marital (civil) status. */ maritalStatus; /** * @description Indicates whether the patient is part of a multiple (boolean) or indicates the actual birth order (integer). */ multipleBirthBoolean; /** * @description Extensions for multipleBirthBoolean */ _multipleBirthBoolean; /** * @description Indicates whether the patient is part of a multiple (boolean) or indicates the actual birth order (integer). */ multipleBirthInteger; /** * @description Extensions for multipleBirthInteger */ _multipleBirthInteger; /** * @description Image of the patient. */ photo; /** * @description A contact party (e.g. guardian, partner, friend) for the patient. */ contact; /** * @description A language which may be used to communicate with the patient about his or her health. */ communication; /** * @description Patient's nominated care provider. */ generalPractitioner; /** * @description Organization that is the custodian of the patient record. */ managingOrganization; /** * @description Link to another patient resource that concerns the same actual patient. */ link; /** * @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 `Patient${JSON.stringify(this.toJson())}`; } /** * @description Returns a pretty string representation of the model * @returns {string} */ toPrettyString() { return `Patient${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)('Patient', this); } constructor(args) { super(); if (args) Object.assign(this, args); } } exports.Patient = Patient;