fhirbuilder
Version:
Another FHIR Tool to build FHIR Resources
135 lines (134 loc) • 3.83 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.RelatedPerson = 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 RelatedPerson Resource
* @property {string} resourceType
* @property {IIdentifier[]} identifier
* @property {boolean} active
* @property {IElement} _active
* @property {IReference} patient
* @property {ICodeableConcept[]} relationship
* @property {IHumanName[]} name
* @property {IContactPoint[]} telecom
* @property {string} gender
* @property {IElement} _gender
* @property {string} birthDate
* @property {IElement} _birthDate
* @property {IAddress[]} address
* @property {IAttachment[]} photo
* @property {IPeriod} period
* @property {IRelatedPersonCommunication[]} communication
* @author Roberto Araneda Espinoza
*/
class RelatedPerson extends base_1.DomainResource {
/**
* @description The type of resource
*/
resourceType = 'RelatedPerson';
/**
* @description Identifier for a person within a particular scope.
*/
identifier;
/**
* @description Whether this related person record is in active use.
*/
active;
/**
* @description Extensions for active
*/
_active;
/**
* @description The patient this person is related to.
*/
patient;
/**
* @description The nature of the relationship between a patient and the related person.
*/
relationship;
/**
* @description A name associated with the person.
*/
name;
/**
* @description A contact detail for the person, e.g. a telephone number or an email address.
*/
telecom;
/**
* @description Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes.
*/
gender;
/**
* @description Extensions for gender
*/
_gender;
/**
* @description The date on which the related person was born.
*/
birthDate;
/**
* @description Extensions for birthDate
*/
_birthDate;
/**
* @description Address where the related person can be contacted or visited.
*/
address;
/**
* @description Image of the person.
*/
photo;
/**
* @description The period of time during which this relationship is or was active. If there are no dates defined, then the interval is unknown.
*/
period;
/**
* @description A language which may be used to communicate with about the patient's health.
*/
communication;
/**
* @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 `RelatedPerson${JSON.stringify(this.toJson())}`;
}
/**
* @description Returns a pretty string representation of the model
* @returns {string}
*/
toPrettyString() {
return `RelatedPerson${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)('RelatedPerson', this);
}
constructor(args) {
super();
if (args)
Object.assign(this, args);
}
}
exports.RelatedPerson = RelatedPerson;