fhirbuilder
Version:
Another FHIR Tool to build FHIR Resources
70 lines (69 loc) • 1.94 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.PatientLink = 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 PatientLink BackboneElement
* @property {IReference} other
* @property {LinkTypeType} type
* @property {IElement} _type
* @author Roberto Araneda Espinoza
*/
class PatientLink extends base_1.BackboneElement {
/**
* @description The other patient resource that the link refers to.
*/
other;
/**
* @description The type of link between this patient resource and another patient resource.
*/
type;
/**
* @description Extensions for type
*/
_type;
/**
* @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 `PatientLink${JSON.stringify(this.toJson())}`;
}
/**
* @description Returns a pretty string representation of the model
* @returns {string}
*/
toPrettyString() {
return `PatientLink${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)('PatientLink', this);
}
constructor(args) {
super();
if (args)
Object.assign(this, args);
}
}
exports.PatientLink = PatientLink;