fhirbuilder
Version:
Another FHIR Tool to build FHIR Resources
95 lines (94 loc) • 2.86 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.PatientContact = 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 PatientContact BackboneElement
* @property {ICodeableConcept[]} relationship
* @property {IHumanName} name
* @property {IContactPoint[]} telecom
* @property {IAddress} address
* @property {AdministrativeGenderType} gender
* @property {IElement} _gender
* @property {IReference} organization
* @property {IPeriod} period
* @author Roberto Araneda Espinoza
*/
class PatientContact extends base_1.BackboneElement {
/**
* @description The nature of the relationship between the patient and the contact person.
*/
relationship;
/**
* @description A name associated with the contact person.
*/
name;
/**
* @description A contact detail for the person, e.g. a telephone number or an email address.
*/
telecom;
/**
* @description Address for the contact person.
*/
address;
/**
* @description Administrative Gender - the gender that the contact person is considered to have for administration and record keeping purposes.
*/
gender;
/**
* @description Extensions for gender
*/
_gender;
/**
* @description Organization on behalf of which the contact is acting or for which the contact is working.
*/
organization;
/**
* @description The period during which this contact person or organization is valid to be contacted relating to this patient.
*/
period;
/**
* @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 `PatientContact${JSON.stringify(this.toJson())}`;
}
/**
* @description Returns a pretty string representation of the model
* @returns {string}
*/
toPrettyString() {
return `PatientContact${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)('PatientContact', this);
}
constructor(args) {
super();
if (args)
Object.assign(this, args);
}
}
exports.PatientContact = PatientContact;