fhirbuilder
Version:
Another FHIR Tool to build FHIR Resources
41 lines (40 loc) • 1.01 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.SimpleQuantity = void 0;
const base_1 = require("../base");
const builders_1 = require("../../builders");
const base_2 = require("../../../core/r4/validators/base");
class SimpleQuantity extends base_1.Element {
value;
unit;
system;
code;
_value;
_code;
_system;
_unit;
toJson() {
return JSON.parse(JSON.stringify(this));
}
toPrettyString() {
return JSON.stringify(this.toJson(), null, 2);
}
toString() {
return JSON.stringify(this.toJson());
}
constructor(args) {
super();
if (args)
Object.assign(this, args);
}
builderInstance() {
return new builders_1.SimpleQuantityBuilder();
}
serialize() {
return JSON.stringify(this.toJson());
}
validate() {
return (0, base_2.ConformanceValidator)('SimpleQuantity', this);
}
}
exports.SimpleQuantity = SimpleQuantity;