fhirbuilder
Version:
Another FHIR Tool to build FHIR Resources
48 lines (47 loc) • 1.11 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Attachment = void 0;
const builders_1 = require("../../builders");
const base_1 = require("../../../core/r4/validators/base");
const Element_1 = require("../base/Element");
class Attachment extends Element_1.Element {
contentType;
data;
language;
url;
size;
hash;
title;
creation;
_contentType;
_creation;
_data;
_hash;
_language;
_size;
_title;
_url;
toJson() {
return JSON.parse(JSON.stringify(this));
}
toPrettyString() {
return `Attachment${JSON.stringify(this.toJson(), null, 2)}`;
}
toString() {
return `Attachment${JSON.stringify(this.toJson())}`;
}
validate() {
return (0, base_1.ConformanceValidator)('Attachment', this);
}
constructor(args) {
super();
Object.assign(this, args);
}
builderInstance() {
return new builders_1.AttachmentBuilder();
}
serialize() {
return JSON.stringify(this.toJson());
}
}
exports.Attachment = Attachment;