ehrcraft-form-api
Version:
API/SDK for EHR Craft Forms (this version adds support lab)
299 lines • 13.3 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.openEHR = void 0;
var openEHR;
(function (openEHR) {
let RM;
(function (RM) {
class DataValue {
ToString() {
return this._value + "";
}
}
RM.DataValue = DataValue;
let BasicPackage;
(function (BasicPackage) {
class DvBoolean extends DataValue {
}
BasicPackage.DvBoolean = DvBoolean;
class DvIdentifier extends DataValue {
ToString() {
return ("Issuer: " +
this.issuer +
", assigner: " +
this.assigner +
", id: " +
this.id +
", type: " +
this.type);
}
}
BasicPackage.DvIdentifier = DvIdentifier;
})(BasicPackage = RM.BasicPackage || (RM.BasicPackage = {}));
let Common;
(function (Common) {
class RmType {
}
Common.RmType = RmType;
let ArchetypedPackage;
(function (ArchetypedPackage) {
class Pathable {
}
ArchetypedPackage.Pathable = Pathable;
/**
* https://specifications.openehr.org/releases/RM/latest/common.html#_locatable_class
*/
class Locatable extends Pathable {
constructor(name, archetype_node_id, uid,
/**
* Links to other archetyped structures (data whose root object inherits from ARCHETYPED, such as ENTRY, SECTION and so on).
* Links may be to structures in other compositions.
**/
links) {
super();
this.name = name;
this.archetype_node_id = archetype_node_id;
this.uid = uid;
this.links = links;
}
}
ArchetypedPackage.Locatable = Locatable;
class Link extends RmType {
constructor(
/**
* Used to describe the relationship, usually in clinical terms, such as in response to (the relationship between test results and an order), follow-up to and so on.
* Such relationships can represent any clinically meaningful connection between pieces of information.
* Values for meaning include those described in Annex C, ENV 13606 pt 2 under the categories of generic , documenting and reporting , organisational , clinical , circumstancial , and view management .
*/
meaning,
/**
* The type attribute is used to indicate a clinical or domain-level meaning for the kind of link, for example problem or issue .
* If type values are designed appropriately, they can be used by the requestor of EHR extracts to categorise links which must be followed and which can be broken when the extract is created.
*/
type,
/**
* The logical to object in the link relation, as per the linguistic sense of the meaning attribute.
*/
target) {
super();
this.meaning = meaning;
this.type = type;
this.target = target;
}
}
ArchetypedPackage.Link = Link;
})(ArchetypedPackage = Common.ArchetypedPackage || (Common.ArchetypedPackage = {}));
})(Common = RM.Common || (RM.Common = {}));
let TextPackage;
(function (TextPackage) {
class DvText extends DataValue {
constructor(val) {
super();
this.val = val;
this.mappings = [];
this.value = val;
}
}
TextPackage.DvText = DvText;
class TerminologyMapping {
}
TextPackage.TerminologyMapping = TerminologyMapping;
let Match;
(function (Match) {
/**
* The mapping is to a broader term e.g. orginal text = “arbovirus infection”, target = “viral infection”
*/
Match[Match["IsBroader"] = 0] = "IsBroader";
/**
* The mapping is to a (supposedly) equivalent to the original item.
*/
Match[Match["IsEqual"] = 1] = "IsEqual";
/**
* The mapping is to a narrower term. e.g. original text = “diabetes”, mapping = “diabetes mellitus”.
*/
Match[Match["IsNarrower"] = 2] = "IsNarrower";
/**
* The kind of mapping is unknown.
*/
Match[Match["Unknown"] = 3] = "Unknown";
})(Match = TextPackage.Match || (TextPackage.Match = {}));
class DvCodedText extends DvText {
/**
*
* @param codeString "terminologyId::codeId|value|"
*/
static Parse(codeString) {
// return dummy value
return new DvCodedText(codeString);
}
constructor(theValue) {
super(theValue);
this.theValue = theValue;
this.definingCode = new DvCodePhrase();
}
}
TextPackage.DvCodedText = DvCodedText;
class DvCodePhrase {
/**
*
* @param termCode terminologyId::codeString
*/
static Parse(termCode) {
return new DvCodePhrase();
}
constructor(_codeString, _terminologyID) {
this.codeString = _codeString;
if (_terminologyID != null) {
this.terminologyId = new openEHR.RM.Support.IdentificationPackage.TerminologyId(_terminologyID);
}
}
}
TextPackage.DvCodePhrase = DvCodePhrase;
})(TextPackage = RM.TextPackage || (RM.TextPackage = {}));
let Support;
(function (Support) {
let IdentificationPackage;
(function (IdentificationPackage) {
class ObjectId {
constructor(val) {
this.value = val;
}
}
/**
* Abstract model of UID-based identifiers consisting of a root part and an optional extension; lexical form: root '::' extension.
*/
class UidBasedId extends ObjectId {
constructor(value) {
super(value);
}
}
IdentificationPackage.UidBasedId = UidBasedId;
class TerminologyId extends ObjectId {
constructor(terminologyId) {
super(terminologyId);
}
}
IdentificationPackage.TerminologyId = TerminologyId;
})(IdentificationPackage = Support.IdentificationPackage || (Support.IdentificationPackage = {}));
})(Support = RM.Support || (RM.Support = {}));
let QuantityPackage;
(function (QuantityPackage) {
class DvOrdered extends DataValue {
}
QuantityPackage.DvOrdered = DvOrdered;
class DvQuantified extends DvOrdered {
}
QuantityPackage.DvQuantified = DvQuantified;
class DvAmount extends DvQuantified {
}
QuantityPackage.DvAmount = DvAmount;
class DvAbsoluteQuantity extends DvQuantified {
}
QuantityPackage.DvAbsoluteQuantity = DvAbsoluteQuantity;
/**
* @see https://specifications.openehr.org/releases/RM/latest/data_types.html#_dv_interval_class
* @see https://specifications.openehr.org/releases/BASE/latest/foundation_types.html#_interval_class
*/
class DvInterval extends DataValue {
}
QuantityPackage.DvInterval = DvInterval;
class DvQuantity extends DvAmount {
}
QuantityPackage.DvQuantity = DvQuantity;
class DvOrdinal extends DvOrdered {
constructor(value) {
super();
this.value = value;
}
/**
*
* @param s 1|local::at0004|string_value|
* @returns
*/
static Parse(s) {
// return dummy value
return new DvOrdinal(1);
}
}
QuantityPackage.DvOrdinal = DvOrdinal;
class DvCount extends DvAmount {
constructor(magnitude) {
super();
this.magnitude = magnitude;
}
}
QuantityPackage.DvCount = DvCount;
class DvProportion extends DvAmount {
}
QuantityPackage.DvProportion = DvProportion;
let ProportionKind;
(function (ProportionKind) {
ProportionKind[ProportionKind["Ratio"] = 0] = "Ratio";
ProportionKind[ProportionKind["Unitary"] = 1] = "Unitary";
ProportionKind[ProportionKind["Percent"] = 2] = "Percent";
ProportionKind[ProportionKind["Fraction"] = 3] = "Fraction";
ProportionKind[ProportionKind["IntegerFraction"] = 4] = "IntegerFraction";
})(ProportionKind = QuantityPackage.ProportionKind || (QuantityPackage.ProportionKind = {}));
})(QuantityPackage = RM.QuantityPackage || (RM.QuantityPackage = {}));
let DateTimePackage;
(function (DateTimePackage) {
class DvTemporal extends openEHR.RM.QuantityPackage
.DvAbsoluteQuantity {
/**
* Since the openEHR C# library has constructor override - we have to make it a bit more specific here
* @param value the value for the subclass
*/
constructor(value) {
super();
}
}
class DvDuration extends openEHR.RM.QuantityPackage
.DvAmount {
}
DateTimePackage.DvDuration = DvDuration;
class DvDate extends DvTemporal {
}
DateTimePackage.DvDate = DvDate;
class DvDateTime extends DvTemporal {
//public value?: string;
constructor(value) {
super(value);
this.value = value;
}
}
DateTimePackage.DvDateTime = DvDateTime;
class DvTime extends DvTemporal {
}
DateTimePackage.DvTime = DvTime;
})(DateTimePackage = RM.DateTimePackage || (RM.DateTimePackage = {}));
let EncapsulatedPackage;
(function (EncapsulatedPackage) {
class DvEncapsulated extends DataValue {
}
class DvParsable extends DvEncapsulated {
}
EncapsulatedPackage.DvParsable = DvParsable;
class DvMultimedia extends DvEncapsulated {
}
EncapsulatedPackage.DvMultimedia = DvMultimedia;
})(EncapsulatedPackage = RM.EncapsulatedPackage || (RM.EncapsulatedPackage = {}));
let UriPackage;
(function (UriPackage) {
/**
* A reference to an object which structurally conforms to the Universal Resource Identifier (URI) RFC-3986 standard. The reference is contained in the value attribute, which is a String. So-called 'plain-text URIs' that contain RFC-3986 forbidden characters such as spaces etc, are allowed on the basis that they need to be RFC-3986 encoded prior to use in e.g. REST APIs or other contexts relying on machine-level conformance.
*/
class DvUri extends DataValue {
}
UriPackage.DvUri = DvUri;
class DvEhrUri extends DvUri {
}
UriPackage.DvEhrUri = DvEhrUri;
let DvEhrUriType;
(function (DvEhrUriType) {
DvEhrUriType[DvEhrUriType["Unknown"] = 0] = "Unknown";
DvEhrUriType[DvEhrUriType["RelativeCompositionUri"] = 1] = "RelativeCompositionUri";
})(DvEhrUriType = UriPackage.DvEhrUriType || (UriPackage.DvEhrUriType = {}));
})(UriPackage = RM.UriPackage || (RM.UriPackage = {}));
})(RM = openEHR.RM || (openEHR.RM = {}));
})(openEHR || (exports.openEHR = openEHR = {}));
//# sourceMappingURL=rm-model.js.map