fhirbuilder
Version:
Another FHIR Tool to build FHIR Resources
77 lines (76 loc) • 2.21 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Age = void 0;
const base_1 = require("../../../core/r4/validators/base");
class Age {
/**
* @description The value of the measured amount. The value includes an implicit precision in the presentation of the value.
*/
value;
/**
* @description How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is "<" , then the real value is < stated value.
* @description < | <= | >= | >
* @see <a href="https://hl7.org/fhir/R4/valueset-quantity-comparator.html">QuantityComparator</a>
*/
comparator;
/**
* @description A human-readable form of the unit.
*/
unit;
/**
* @description The identification of the system that provides the coded form of the unit.
*/
system;
/**
* @description A computer processable form of the unit in some unit representation system.
*/
code;
/**
* @description Extension for value
*/
_value;
/**
* @description Extension for comparator
*/
_comparator;
/**
* @description Extension for unit
*/
_unit;
/**
* @description Extension for system
*/
_system;
/**
* @description Extension for code
*/
_code;
toJson() {
return JSON.parse(JSON.stringify(this));
}
toPrettyString() {
return `Address${JSON.stringify(this.toJson(), null, 2)}`;
}
toString() {
return `Address${JSON.stringify(this.toJson())}`;
}
serialize() {
return JSON.stringify(this.toJson());
}
validate() {
return (0, base_1.ConformanceValidator)('Address', this);
}
constructor(age) {
this.value = age.value;
this.comparator = age.comparator;
this.unit = age.unit;
this.system = age.system;
this.code = age.code;
this._value = age._value;
this._comparator = age._comparator;
this._unit = age._unit;
this._system = age._system;
this._code = age._code;
}
}
exports.Age = Age;