fhirbuilder
Version:
Another FHIR Tool to build FHIR Resources
76 lines (75 loc) • 2.37 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.EncounterDiagnosis = 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 EncounterDiagnosis BackboneElement
undefined
* @property {IReference} condition
* @property {ICodeableConcept} use
* @property {number} rank
* @property {IElement} _rank
* @author Roberto Araneda Espinoza
*/
class EncounterDiagnosis extends base_1.BackboneElement {
/**
* @description Reason the encounter takes place, as specified using information from another resource. For admissions, this is the admission diagnosis. The indication will typically be a Condition (with other resources referenced in the evidence.detail), or a Procedure.
*/
condition;
/**
* @description Role that this diagnosis has within the encounter (e.g. admission, billing, discharge …).
*/
use;
/**
* @description Ranking of the diagnosis (for each role type).
*/
rank;
/**
* @description Extensions for rank
*/
_rank;
/**
* @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 `EncounterDiagnosis${JSON.stringify(this.toJson())}`;
}
/**
* @description Returns a pretty string representation of the model
* @returns {string}
*/
toPrettyString() {
return `EncounterDiagnosis${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)('EncounterDiagnosis', this);
}
constructor(args) {
super();
if (args)
Object.assign(this, args);
}
}
exports.EncounterDiagnosis = EncounterDiagnosis;