UNPKG

ehrcraft-form-api

Version:

API/SDK for EHR Craft Forms (this version adds support lab)

316 lines (315 loc) 15.8 kB
export declare namespace openEHR { namespace RM { abstract class DataValue { private _value?; ToString(): string; } namespace BasicPackage { class DvBoolean extends DataValue { value?: boolean; } class DvIdentifier extends DataValue { issuer?: string; assigner?: string; id?: string; type?: string; ToString(): string; } } namespace Common { abstract class RmType { } namespace ArchetypedPackage { abstract class Pathable { } /** * https://specifications.openehr.org/releases/RM/latest/common.html#_locatable_class */ abstract class Locatable extends Pathable { name: openEHR.RM.TextPackage.DvText; archetype_node_id: string; uid?: openEHR.RM.Support.IdentificationPackage.UidBasedId | undefined; /** * 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?: openEHR.RM.Common.ArchetypedPackage.Link[] | undefined; constructor(name: openEHR.RM.TextPackage.DvText, archetype_node_id: string, uid?: openEHR.RM.Support.IdentificationPackage.UidBasedId | undefined, /** * 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?: openEHR.RM.Common.ArchetypedPackage.Link[] | undefined); } class Link extends RmType { /** * 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?: openEHR.RM.TextPackage.DvText | undefined; /** * 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?: openEHR.RM.TextPackage.DvText | undefined; /** * The logical to object in the link relation, as per the linguistic sense of the meaning attribute. */ target?: openEHR.RM.UriPackage.DvEhrUri | undefined; 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?: openEHR.RM.TextPackage.DvText | undefined, /** * 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?: openEHR.RM.TextPackage.DvText | undefined, /** * The logical to object in the link relation, as per the linguistic sense of the meaning attribute. */ target?: openEHR.RM.UriPackage.DvEhrUri | undefined); } } } namespace TextPackage { class DvText extends DataValue { private val?; constructor(val?: string | undefined); value?: string; mappings: TerminologyMapping[]; } class TerminologyMapping { target?: DvCodePhrase; match?: Match; purpose?: DvCodedText; } enum Match { /** * The mapping is to a broader term e.g. orginal text = “arbovirus infection”, target = “viral infection” */ IsBroader = 0, /** * The mapping is to a (supposedly) equivalent to the original item. */ IsEqual = 1, /** * The mapping is to a narrower term. e.g. original text = “diabetes”, mapping = “diabetes mellitus”. */ IsNarrower = 2, /** * The kind of mapping is unknown. */ Unknown = 3 } class DvCodedText extends DvText { private theValue?; definingCode: DvCodePhrase; /** * * @param codeString "terminologyId::codeId|value|" */ static Parse(codeString: string): DvCodedText; constructor(theValue?: string | undefined); } class DvCodePhrase { codeString?: string; terminologyId?: openEHR.RM.Support.IdentificationPackage.TerminologyId; /** * * @param termCode terminologyId::codeString */ static Parse(termCode: string): DvCodePhrase; constructor(_codeString?: string, _terminologyID?: string); } } namespace Support { namespace IdentificationPackage { abstract class ObjectId { /** * The value of the id in the form defined below. */ value?: string; constructor(val?: string); } /** * Abstract model of UID-based identifiers consisting of a root part and an optional extension; lexical form: root '::' extension. */ export abstract class UidBasedId extends ObjectId { constructor(value?: string); } export class TerminologyId extends ObjectId { constructor(terminologyId?: string); } export {}; } } namespace QuantityPackage { abstract class DvOrdered<T> extends DataValue { normalRange?: DvInterval<T>; normalStatus?: openEHR.RM.TextPackage.DvCodePhrase; } abstract class DvQuantified<T> extends DvOrdered<T> { /** Optional status of magnitude with values: • “=” : magnitude is a point value • “&lt;“ : value is &lt; magnitude • “>” : value is > magnitude • “&lt;=” : value is &lt;= magnitude • “>=” : value is >= magnitude • “~” : value is approximately magnitude If not present, meaning is “=”. */ magnitudeStatus?: string; } abstract class DvAmount<T> extends DvQuantified<T> { /** * Accuracy of measurement, expressed either as a half-range percent value (accuracy_is_percent = True) or a half-range quantity. * A value of 0 means that accuracy is 100%, i.e. no error. * A value of unknown_accuracy_value means that accuracy was not recorded. */ accuracy?: number; /** * If True, indicates that when this object was created, accuracy was recorded as a percent value; if False, as an absolute quantity value. */ isAccuracyPercent?: boolean; } abstract class DvAbsoluteQuantity<T, TA> extends DvQuantified<T> { /** * Accuracy of measurement, expressed as a half-range value of the diff type for this quantity (i.e. an accuracy of x means x). * A Void (i.e. null) value means accuracy not known. */ accuracy?: TA; } /** * @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<T> extends DataValue { lower?: T; upper?: T; } class DvQuantity extends DvAmount<DvOrdinal> { magnitude?: number; units?: string; precision?: number; /** * Optional field used to specify a units system from which codes in units are defined. Value is a URI identifying a terminology containing units concepts from the (HL7 FHIR terminologies list). * If not set, the UCUM standard (case-sensitive codes) is assumed as the units system. */ unitsSystem?: string; unitsDisplayName?: string; } class DvOrdinal extends DvOrdered<DvOrdinal> { value?: number | undefined; symbol?: openEHR.RM.TextPackage.DvCodedText; constructor(value?: number | undefined); /** * * @param s 1|local::at0004|string_value| * @returns */ static Parse(s: string): DvOrdinal; } class DvCount extends DvAmount<Number> { magnitude?: number | undefined; constructor(magnitude?: number | undefined); } class DvProportion extends DvAmount<DvProportion> { numerator?: number; denominator?: number; type?: ProportionKind; precision?: number; } enum ProportionKind { Ratio = 0, Unitary = 1, Percent = 2, Fraction = 3, IntegerFraction = 4 } } namespace DateTimePackage { abstract class DvTemporal<T, TA> extends openEHR.RM.QuantityPackage .DvAbsoluteQuantity<T, TA> { /** * 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?: any); } export class DvDuration extends openEHR.RM.QuantityPackage .DvAmount<DvDuration> { /** ISO8601 duration */ Value?: string; magnitude?: number; } export class DvDate extends DvTemporal<DvDate, DvDuration> { /** * ISO8601 date string */ value?: string; /** * Numeric value of the date as days since the calendar origin point 1/1/0000 */ private magnitude?; } export class DvDateTime extends DvTemporal<DvDateTime, DvDuration> { value?: (string | Date) | undefined; constructor(value?: (string | Date) | undefined); } export class DvTime extends DvTemporal<DvTime, DvDuration> { value?: string; } export {}; } namespace EncapsulatedPackage { abstract class DvEncapsulated extends DataValue { /** Name of character encoding scheme in which this value is encoded. Coded from openEHR Code Set “character sets”. Unicode is the default assumption in openEHR, with UTF-8 being the assumed encoding. This attribute allows for variations from these assumptions. */ charset?: openEHR.RM.TextPackage.DvCodePhrase; /** Optional indicator of the localised language in which the data is written, if relevant. Coded from openEHR Code Set “languages”. */ language?: openEHR.RM.TextPackage.DvCodePhrase; } export class DvParsable extends DvEncapsulated { value?: string; /** name of the formalism, e.g. “GLIF 1.0”, “proforma” etc. */ formalism?: string; } export class DvMultimedia extends DvEncapsulated { alternateText?: string; uri?: openEHR.RM.UriPackage.DvUri; /** The actual data found at uri, if supplied inline */ data?: any; /** Data media type coded from openEHR code set “media types” (interface for the IANA MIME types code set). */ mediaType?: openEHR.RM.TextPackage.DvCodePhrase; /** Compression type, a coded value from the openEHR “Integrity check” code set. Void means no compression. */ compressionAlgorithm?: openEHR.RM.TextPackage.DvCodePhrase; /** Binary cryptographic integrity checksum */ integrityCheckAlgorithm?: openEHR.RM.TextPackage.DvCodePhrase; thumbNail?: DvMultimedia; } export {}; } namespace 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 { /** * Value of URI as a String. 'Plain-text' URIs are allowed, enabling better readability, but must be RFC-3986 encoded in use. */ value?: string; } class DvEhrUri extends DvUri { } enum DvEhrUriType { Unknown = 0, RelativeCompositionUri = 1 } } } }