fhirbuilder
Version:
Another FHIR Tool to build FHIR Resources
70 lines (69 loc) • 2.27 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.PatientCommunication = 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 PatientCommunication BackboneElement
* @property {ICodeableConcept} language
* @property {boolean} preferred
* @property {IElement} _preferred
* @author Roberto Araneda Espinoza
*/
class PatientCommunication extends base_1.BackboneElement {
/**
* @description The ISO-639-1 alpha 2 code in lower case for the language, optionally followed by a hyphen and the ISO-3166-1 alpha 2 code for the region in upper case; e.g. "en" for English, or "en-US" for American English versus "en-EN" for England English.
*/
language;
/**
* @description Indicates whether or not the patient prefers this language (over other languages he masters up a certain level).
*/
preferred;
/**
* @description Extensions for preferred
*/
_preferred;
/**
* @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 `PatientCommunication${JSON.stringify(this.toJson())}`;
}
/**
* @description Returns a pretty string representation of the model
* @returns {string}
*/
toPrettyString() {
return `PatientCommunication${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)('PatientCommunication', this);
}
constructor(args) {
super();
if (args)
Object.assign(this, args);
}
}
exports.PatientCommunication = PatientCommunication;