fhirbuilder
Version:
Another FHIR Tool to build FHIR Resources
57 lines (56 loc) • 1.5 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Annotation = void 0;
const Element_1 = require("../base/Element");
const base_1 = require("../../../core/r4/validators/base");
const AnnotationBuilder_1 = require("../../builders/datatypes/AnnotationBuilder");
class Annotation extends Element_1.Element {
builderInstance() {
return new AnnotationBuilder_1.AnnotationBuilder();
}
/**
* @description The individual responsible for the annotation.
*/
authorReference;
/**
* @description The individual responsible for the annotation.
*/
authorString;
/**
* @description Indicates when the annotation was made.
*/
time;
/**
* @description The annotation - text content (as markdown).
*/
text;
/**
* @description Extension for time.
*/
_time;
/**
* @description Extension for text
*/
_text;
toJson() {
return JSON.parse(JSON.stringify(this));
}
serialize() {
return JSON.stringify(this.toJson());
}
toPrettyString() {
return `Annotation${JSON.stringify(this.toJson(), null, 2)}`;
}
toString() {
return `Annotation${JSON.stringify(this.toJson())}`;
}
validate() {
return (0, base_1.ConformanceValidator)('Annotation', this);
}
constructor(args) {
super();
if (args)
Object.assign(this, args);
}
}
exports.Annotation = Annotation;