UNPKG

fhirbuilder

Version:
47 lines (46 loc) 1.16 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Quantity = void 0; const builders_1 = require("../../builders"); const base_1 = require("../../../core/r4/validators/base"); const Element_1 = require("../base/Element"); class Quantity extends Element_1.Element { // Quantity Properties code; comparator; system; unit; value; // Quantity Extensions _code; _comparator; _system; _unit; _value; toJson() { return JSON.parse(JSON.stringify(this)); } toPrettyString() { return `Quantity${JSON.stringify(this.toJson(), null, 2)}`; } toString() { return `Quantity${JSON.stringify(this.toJson())}`; } validate() { return (0, base_1.ConformanceValidator)('Quantity', this); } static builder() { return new builders_1.QuantityBuilder(); } constructor(args) { super(); Object.assign(this, args); } builderInstance() { return new builders_1.QuantityBuilder(); } serialize() { return JSON.stringify(this.toJson()); } } exports.Quantity = Quantity;