fhirbuilder
Version:
Another FHIR Tool to build FHIR Resources
110 lines (109 loc) • 3.44 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Signature = void 0;
const base_1 = require("../base");
const base_2 = require("../../../core/r4/validators/base");
/**
* @version R4 (v4.0.1)
* @summary FHIR® Specification by HL7®
* @description Class for Signature Resource
* @property {ICoding[]} type
* @property {string} when
* @property {IElement} _when
* @property {IReference} who
* @property {IReference} onBehalfOf
* @property {string} targetFormat
* @property {IElement} _targetFormat
* @property {string} sigFormat
* @property {IElement} _sigFormat
* @property {string} data
* @property {IElement} _data
* @author Roberto Araneda Espinoza
*/
class Signature extends base_1.Element {
/**
* @description An indication of the reason that the entity signed this document. This may be explicitly included as part of the signature information and can be used when determining accountability for various actions concerning the document.
*/
type;
/**
* @description When the digital signature was signed.
*/
when;
/**
* @description Extensions for when
*/
_when;
/**
* @description A reference to an application-usable description of the identity that signed (e.g. the signature used their private key).
*/
who;
/**
* @description A reference to an application-usable description of the identity that is represented by the signature.
*/
onBehalfOf;
/**
* @description A mime type that indicates the technical format of the target resources signed by the signature.
*/
targetFormat;
/**
* @description Extensions for targetFormat
*/
_targetFormat;
/**
* @description A mime type that indicates the technical format of the signature. Important mime types are application/signature+xml for X ML DigSig, application/jose for JWS, and image/* for a graphical image of a signature, etc.
*/
sigFormat;
/**
* @description Extensions for sigFormat
*/
_sigFormat;
/**
* @description The base64 encoding of the Signature content. When signature is not recorded electronically this element would be empty.
*/
data;
/**
* @description Extensions for data
*/
_data;
/**
* @description Returns a JSON representation of the model
* @returns {Record<string, any>}
*/
toJson() {
return JSON.parse(JSON.stringify(this));
}
/**
* @description Returns a string representation of the model
* @returns {string}
*/
toString() {
return `Signature${JSON.stringify(this.toJson())}`;
}
/**
* @description Returns a pretty string representation of the model
* @returns {string}
*/
toPrettyString() {
return `Signature${JSON.stringify(this.toJson(), null, 2)}`;
}
/**
* @description Returns a serialized string representation of the model
* @returns {string}
*/
serialize() {
return JSON.stringify(this.toJson());
}
/**
* @description Validates the model
* @returns {isValid: boolean, operationOutcome: IOperationOutcome}
*/
validate() {
return (0, base_2.ConformanceValidator)('Signature', this);
}
constructor(args) {
super();
if (args)
Object.assign(this, args);
}
}
exports.Signature = Signature;