fhirbuilder
Version:
Another FHIR Tool to build FHIR Resources
41 lines (40 loc) • 1.06 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.DurationBuilder = void 0;
const models_1 = require("../../models");
const ElementBuilder_1 = require("../base/ElementBuilder");
class DurationBuilder extends ElementBuilder_1.ElementBuilder {
duration;
constructor() {
super();
this.duration = new models_1.Duration();
}
addPrimitiveExtension(param, extension) {
this.duration[param] = extension;
return this;
}
build() {
return Object.assign(this.duration, super.build());
}
setCode(value) {
this.duration.code = value;
return this;
}
setSystem(value) {
this.duration.system = value;
return this;
}
setUnit(value) {
this.duration.unit = value;
return this;
}
setValue(value) {
this.duration.value = value;
return this;
}
setComparator(value) {
this.duration.comparator = value;
return this;
}
}
exports.DurationBuilder = DurationBuilder;