Quantity Package
Overview
The data_types.quantity package is illustrated below. Dates and Times are found in the next section.
Requirements
Scores and Scales
Medicine is a domain in which symbols representing relative magnitudes are commonly used, without exact values being used. The main purpose is usually to classify patients into groups for which different decisions might be made. Such classifications are typically known as scores or scales. For example the characterisation of pain as 'mild', 'medium', 'severe', or the reflex response to tendon percussion as "-", "+/-", "+", "++", "+++", "++++". Many scores such as the Apgar Score, Glasgow Coma Scale (GCS), and Barthel Index are globally known and used.
In some cases, there may be no way (or need) to precisely quantify such values because they reflect a subjective experience of the patient or informal judgment by the clinician. However, they are understood as being ordered, e.g. pass: [++] is arithmetically greater than `+`.
Similarly, even though the symbolic values for haemolysed blood in a urinalysis have approximate ranges stated for them, as shown below, these 'values' are not usable in the same way as true quantities.
-
"neg","trace"(10 cells/μl) -
"small"(<25 cells/μl) -
"moderate"(<80 cells/μl) -
"large"(>200 cells/μl)
A second requirement for score and scale values is that in many cases there is a need to associate numeric values values with the symbols, in order to facilitate ordered comparison, and also to enable longitudinal comparison across results of the same kind (e.g. pain, protein). The majority of scores and scales are limited to Integer values, but some use Real numbers interspersed with Integers e.g. the Borg CR 10 scale for perceived exertion. In both cases, values may be negative, zero or positive.
| an argument sometimes put forward for recording all ordinals in a more precise way is that comparisons might want to be made between the values quoted by two laboratories for the same symbol (e.g. 'moderate'). There are a number of counter-arguments. Firstly, such comparisons are a poor attempt at normalisation, an activity which is the business of pathologists, not EHR users. Secondly, the symbolic values are often arrived at by the tester making a judgement of colour on a strip, which while an adequate (and cost-effective) approach for classifying, is not a valid means of quantifying a value. Lastly, in most cases, if a quantified point value or range is desired, or available, then it will be used - meaning that the appropriate quantitative data type can be used, rather than an the ordinal type. |
Countable Things
A common kind of data value in medicine is the dimensionless countable quantity, e.g.
-
number of doses: 2;
-
number of previous pregnancies: 1;
-
number of tablets: 3.
Values of this type are always integral. Countable values need to be convertible to real numbers for statistical purposes, for example for a study of average number of pregnancies per couple.
Some countable entities such as tablets are divisible into major fractions, typically halves and occasionally quarters.
Dimensioned Quantities
The most common kind of quantity is a measured, dimensioned quantity. Anything which is measurable (rather than countable) involves a number of data aspects, namely:
-
a magnitude whose value is a real number;
-
the physical property being measured, with the appropriate units;
-
a concept of precision, i.e. to what number of decimal places the value is recorded;
-
a concept of accuracy, i.e. the known or assumed error in the measurement due to instrumentation or human judgement.
Examples of dimensioned quantities include:
-
systolic BP: 110 mmHg
-
height: 178 cm
-
rate of asthma attacks: 7 /week
-
weight loss: 2.5 kg
Ratios and Proportions
A common quantitative type in science and medicine is the proportion, or ratio, which is used in situations like the following:
-
1:128 (a titer);
-
Na:K concentration ratio (unitary denominator);
-
albumin:creatinine ratio;
-
% e.g. red cell distribution width (RDW) which is the width of a distribution of RBC widths.
In general ratios have real number values, even if many examples appear to be integer ratios. Proportions with unitary denominator and % (denominator = 100) are common.
Formulations
A concept superficially similar to proportions and ratios is formulations of materials, such as a solid in a liquid e.g.:
-
250 mg / 500 ml (solute/solvent)
Although a single solute/single solvent formulation appears to have the same form as a ratio, the general form is for any number of substances to be mixed together, usually according to a particular procedure. Formulations are therefore not candidates for direct modelling as fine-grained quantities, but instead are constructed by archetyping a higher-level structure, each leaf element of which contains the required kind of Quantity.
Quantity Ranges
Quantity ranges are ubiquitous in science and medicine, and may be defined for any kind of measured phenomenon. Examples include:
-
healthy weight range, e.g. 48kg - 60kg
-
normal range for urinalysis in pregnancy - protein, e.g. "nil" - "trace"
Reference Ranges
A reference range is a quantity range attached to a measured value, and is common for laboratory result values. The typical form of a reference range found in a pathology result indicates what is considered the 'normal' range for a measured value. Examples of reference ranges:
-
normal range for serum Na is 135 - 145 mmol/L.
-
desirable total cholesterol: < 5.5 mmol/L (strictly this probably should be 2.0 - 5.5 mmol/L, but is not usually quoted this way as low cholesterol is not considered a problem.)
Ranges can also be quoted for drug administrations, in which case they are usually thought of as the 'therapeutic' range. For example, the anticonvulsant drug Carbamazepine has a therapeutic range of 20 - 40 μMol/L. In some cases, there are multiple ranges associated with a drug, for example, Salicylate has a therapeutic range of 1.0 - 2.5 mmol/L and a toxic range > 3.6 mmol/L
Various examples occur in which multiple ranges may be stated, including the following.
-
The administration recomendations for drugs which depend on the particular patient state. For example, the therapeutic range of Cyclosporin (an immunosuppresant) is a function of time post-transplant for the affected organ, e.g. kidney: < 6 months: 250 - 350 μg/L, > 6 months: 100 - 200 μg/L.
-
Normal ranges for blood IgG, IgA, IgM which vary significantly with the age in months from birth.
-
Progesterone and pituitary hormones have ranges which are different for different phases of the menstrual cycle and for menopause. This may result in 4 or 5 ranges given for one result. Only one will apply to any particular patient - but the exact phase of the cycle may be unknown - so the ranges may need to be associated with the value with no 'normal' range.
Where there are multiple ranges, the important question is: which range information is relevant to the actual data being recorded for the patient? In theory, only the range corresponding to the particular patient situation should be used, i.e. the range which applies after taking into account sex, age, smoking status, "professional athlete", organ transplanted, etc. In most cases, this is a single "normal" range, or a pair of ranges, typically "therapeutic" and "critical". However, practical factors complicate things. Firstly, data is sometimes supplied from pathology labs along with some or all of the applicable reference ranges, even though only some could possibly apply. This is particularly the case if the laboratory has no other data on the patient, and cannot evaluate which range applies. The requirement for faithfulness of recording might be extended to reference data supplied by laboratories, regardless of how irrelevant or arbitrarily chosen the reference data is, meaning that such data has to be stored in the record anyway. Secondly, there may be circumstances in which physicians want a number of reference ranges, even while knowing that only one range is applicable to the datum. Ranges above and below the relevant one might be useful to a physician wishing to determine how far out of range the datum is.
Normal Range and Status in Laboratory data
It is quite common for laboratories to include a normal range with each measured value, and/or a normal 'status', which indicates where the value lies with respect to the normal range. The latter will commonly take the form of markers like "HHH" (critically high), HH (abnormally high), H (borderline high), L, LL, LLL in HL7v2 messaging, although other schemes are undoubtedly used.
Design
Basic Semantics
In order to make sense of the requirements in a systematic way, a proper typology for quantities is needed. The most basic characteristic of all values typically called 'quantities' is that they are ordered, meaning that the operator "<" (less-than) is defined between any two values in the domain. An ancestor class for all quantities called DV_ORDERED is accordingly defined. This type is subtyped into ordinals, scales and true quantities, represented by the classes DV_ORDINAL, DV_SCALE and DV_QUANTIFIED respectively.
DV_ORDINAL and DV_SCALE are used for scores and scales as described in the requirements above. DV_ORDINAL represents data values whose values are Integers, and which have symbolic or text names instead, such as "+", "++", "+++", or "mild", "medium", "severe". Each symbol can be assigned any Integer value, providing a basis for computable comparison. Typical uses for DV_ORDINAL include representing values from the Apgar and Glasgow Coma Scales, e.g. 0|heart rate absent|, 4|withdraws from pain|. DV_SCALE is similar to DV_ORDINAL, and was introduced to support scales / scores containing Real values as well as Integers.
In contrast to DV_ORDINAL and DV_SCALE, instances of DV_QUANTIFIED and all its subtypes have precise numeric magnitudes. Accordingly, DV_QUANTIFIED introduces the properties magnitude and magnitude_status. The magnitude attribute is guaranteed to be available on any DV_QUANTIFIED, carrying the effective value, regardless of the particular subtype. The optional magnitude_status attribute can be used to provide a non-quantified indication of accuracy, and takes the following values:
-
"=": magnitude is a point value -
"<": value is < magnitude -
">": value is > magnitude -
"<=": value is <= magnitude -
">=": value is >= magnitude -
"~": value is approximately magnitude
If not present, the meaning is "=".
Logically, an accuracy attribute should also be included in DV_QUANTIFIED, but as its modelling is different in the subtypes in a way that does not easily lend itself to a common ancestor, it is only included in the subtypes.
The DV_QUANTIFIED class has two subtypes: DV_AMOUNT and DV_ABSOLUTE_QUANTITY. The former corresponds to relative 'amounts' of something, either a physical property (such as mass) or items (e.g. cigarettes). Mathematically, the + and - operators (as well as * and /) are defined in the same way as for the real numbers (or any other mathematical 'field'), with the semantics that adding two relative quantities measuring the same thing (i.e. with the same units) produces another relative quantity of the same kind; while the semantics of subtraction are that one relative quantity subtracted from another generates a third.
The second subtype of DV_QUANTIFIED, DV_ABSOLUTE_QUANTITY, models quantities whose values are absolute along a line having a defined origin. The main example of absolute quantities are the temporal concepts date, time and date/time. These are distinguished from relative quantities in that the normal addition and subtraction operations don’t apply. Instead, the semantics of such operators are based on the idea of the difference between absolute values being a relative amount. For example, two dates can be subtracted, but the result is a duration, not another date. For this reason, the operations add, subtract and diff are defined rather than + or -. Date/time types, as well as the relative concept duration, are defined in [_date_time_package].
Subtypes of DV_AMOUNT are DV_PROPORTION, DV_QUANTITY, DV_COUNT, and DV_DURATION (see date_time package). The type DV_COUNT has an integer magnitude and is used to record naturally countable things such as number of previous pregnancies, number of steps taken by a recovering stroke victim and so on. There are no units or precision in a DV_COUNT. Countable quantities can be used to create instances of DV_QUANTITY, such as during a statistical study which average tobacco
consumption over a time period. Such a computation might cause the creation of DV_QUANTITY objects representing values like {magnitude = 5.85, units = '/ week'}
DV_QUANTITY is used to represent amounts of measurable things, and has a real number magnitude, precision, units and accuracy. The units attribute contains the scientific unit in a parsable form defined by default by the Unified Code for Units of Measure (UCUM) (case-sensitive form), or by another system or terminology specified in the units_system attribute. In some cases, such as metric units, the UCUM code and the display form are the same, e.g. 'kg'. However this is not the general case, and many common units have different display and code forms, e.g. degrees Celcius: '°C' and 'Cel'. In general the unit display name should be looked up if it is not known in context that the code is directly displayable. The units_display_name attribute may be used if the displayable form of the units is required in the data, and/or terminology lookup is not available or desirable. Unit names may be language dependent, particularly older units.
A valid units string always implies a measured property, such as force or pressure. If unit strings are compared in the application environment to determine if they measure the same property (e.g. "bar" and "kPa" are both units of 'pressure'), which enables the is_strictly_comparable_to() function defined on DV_ORDERED to be properly specified on DV_QUANTITY.
while these semantics will allow comparison of e.g. two pressures recorded in mbar and mmHg, or even two accelerations whose units are `"m.s^-2" and "m/s^2", they provide no guarantee that this is a sensible thing to do in terms of domain semantics: comparing a blood pressure to an atmospheric pressure for example may or may not make any sense. It is not within the scope of the quantity package to express such semantics - this is up to application software which uses Quantities found in specific places in the data.
|
Accuracy and Uncertainty
Theoretically it might be argued that accuracy should not be included in a model for quantified values, because it is an artifact of a measuring process and/or device, not of a quantity itself. For example, a weight of "82 kg ±5%" can be represented in two parts. The "82 kg" is represented as a DV_QUANTITY, while the "±5%" could be included in the protocol description of the weighing instrument, since this is where the error comes from. For practical purposes however, (in)accuracy in a measured quantity corresponds to a range of possible values. In realistic computing in health, it is quite likely that the accuracy will be required in computations on quantities, especially for statistical population queries in which measurement error must be disambiguated from true correlation.
Accuracy is therefore introduced as the abstract feature accuracy of the DV_QUANTIFIED class. It is defined concretely in the two descendants, DV_AMOUNT, where it is of type Real, and DV_ABSOLUTE_QUANTITY, where it is of a differential type defined by subtypes. A value of 0 in either case indicates 100% accuracy, i.e. no error in measurement. Where accuracy is not recorded in a quantity, it is represented by a special value. In DV_AMOUNT, a value of -1 for the accuracy attribute
is used for this purpose, and the constant unknown_accuracy_value = -1 is provided within the class to give a symbolic name for the special value. In the DV_ABSOLUTE_QUANTITY class, accuracy_unknown is represented by a Void (i.e. null) value for the accuracy attribute. An abstract Boolean feature accuracy_unknown is defined in the parent class DV_QUANTIFIED to provide a logical test of accuracy being absent, and is implemented in the respective descendants by concrete functions that check for the special values.
In addition, the class DV_AMOUNT, provides a feature accuracy_is_percent: Boolean to indicate if accuracy value is to be understood as a percentage, or an absolute value.
When two compatible quantities are added or subtracted using the + or - operators (DV_AMOUNT descendants) or add and substract (DV_ABSOLUTE_QUANTITY class), accuracy behaves in the following way:
-
if accuracies are present in both quantities, they are added in the result, for both addition and subtraction operations;
-
if either or both quantities has an unknown accuracy, the accuracy of the result is also unknown;
-
if two
DV_AMOUNTdescendants are added or subtracted, and only one hasaccuracy_is_percent= True, accuracy is expressed in the result in the form used in the larger of the two quantities.
The related notion of 'uncertainty' is understood as a subjective judgement made by the clinician, indicating that he/she is not certain of a particular statement. It is not the same as accuracy: uncertainty may apply to non-quantified values, such as subjective statements, and it is not an aspect of objective measurement processes, but of human confidence. Where the uncertainty is due to subjective memory e.g. "I think my grandfather was 56 when he died", the uncertainty is simply recorded as another value, along with the main data item being recorded. Uncertainty is therefore not directly modelled in the openEHR data types, but appears instead in particular archetypes.
Quantity Ranges
Ranges are modelled by the generic type DV_INTERVAL<T:DV_ORDERED> which enables a range of any of the other quantity types (except ratio) to be constructed. This allows any subtype of DV_ORDERED to occur as a range as well.
Proportions
The DV_PROPORTION type is provided for representing true ratios, i.e. relative values, and consists of numerator and denominator Real values, and a magnitude function which is computed as the result of the numerator/denominator division. The type attribute is used to indicate the logical type of the proportion. Supported types include:
-
percent: denominator is 100; usual presentation is "numerator %"
-
unitary: denominator is 1; usual presentation is "numerator"
-
fraction: numerator and denominator are both integer values; usual presentation is n/d, e.g. such as ½ or ¾, 1/2, 3/4 etc;
-
integer_fraction: numerator and denominator are both integer values; usual presentation is n/d; if numerator > denominator, display as "a b/c", i.e. the integer part followed by the remaining fraction part, e.g. 1½; this is the most likely form for expressing a number of tablets;
-
ratio: numerator and denominator can take any value; usual presentation is "numerator: denominator"
Lastly, the is_integral function indicates that the numerator and denominator are both integer values; this is used for fractions (the fraction and integer_fraction types above) and other commonly occurring ratios where both parts are always integer values.
Normal and Reference Ranges
Normal range for any of the quantity types (i.e. any instance of a subtype of DV_ORDERED) can be included via the attribute DV_ORDERED.normal_range, of type REFERENCE_RANGE. Other reference ranges (e.g. sub-critical, critical etc) can be included via the attribute DV_ORDERED.other_reference_ranges. The separation of normal and other reference range attributes is used because the former constitute the vast majority of ranges quoted for quantitative data.
Normal status can be included via the attribute DV_ORDERED.normal_status, which takes the form of a DV_ORDINAL, whose symbol attribute is coded according to the openEHR terminology group "normal status", and takes values "HHH" (critically high), "HH" (abnormally high), "H" (borderline high)", "N" (normal), "L" … "LLL".
Recording Time
Time can be recorded in two ways. Absolute times in the social time domain, such as dates and time of day are recorded using the types in the date_time package. Fine-grained 'time', which is a duration rather than a time, is recorded using a DV_QUANTITY with units = 's' or another temporal unit ('h', 'ms', 'ns' etc).
Class Descriptions
DV_ORDERED Class
-
Definition
-
Effective
-
BMM
-
UML
Class |
DV_ORDERED (abstract) |
|
|---|---|---|
Description |
Abstract class defining the concept of ordered values, which includes ordinals as well as true quantities. It defines the functions Data value types which are to be used as limits in the |
|
Inherit |
||
Attributes |
Signature |
Meaning |
0..1 |
normal_status: |
Optional normal status indicator of value with respect to normal range for this value. Often included by lab, even if the normal range itself is not included. Coded by ordinals in series HHH, HH, H, (nothing), L, LL, LLL; see openEHR terminology group |
0..1 |
normal_range: |
Optional normal range. |
0..1 |
other_reference_ranges: |
Optional tagged other reference ranges for this value in its particular measurement context. |
Functions |
Signature |
Meaning |
1..1 |
is_strictly_comparable_to ( |
Test if two instances are strictly comparable. Effected in descendants. |
1..1 |
is_simple (): |
True if this quantity has no reference ranges. |
1..1 |
is_normal (): |
Value is in the normal range, determined by comparison of the value to |
1..1 |
less_than alias "<" ( |
True if this Ordered object is less than |
Invariants |
Other_reference_ranges_validity: |
|
Is_simple_validity: |
||
Normal_status_validity: |
||
Normal_range_and_status_consistency: |
||
| DV_ORDERED (abstract) | |||
|---|---|---|---|
Abstract class defining the concept of ordered values, which includes ordinals as well as true quantities. It defines the functions Data value types which are to be used as limits in the |
|||
Inherits: BASIC_DEFINITIONS, OPENEHR_DEFINITIONS, Any, DATA_VALUE, Ordered |
|||
Constants |
|||
BASIC_DEFINITIONS.CR: |
Carriage return character. |
||
BASIC_DEFINITIONS.LF: |
Line feed character. |
||
BASIC_DEFINITIONS.Any_type_name: |
|||
BASIC_DEFINITIONS.Regex_any_pattern: |
|||
BASIC_DEFINITIONS.Default_encoding: |
|||
BASIC_DEFINITIONS.None_type_name: |
|||
OPENEHR_DEFINITIONS.Local_terminology_id: |
Predefined terminology identifier to indicate it is local to the knowledge resource in which it occurs, e.g. an archetype |
||
Attributes |
|||
normal_status: |
Optional normal status indicator of value with respect to normal range for this value. Often included by lab, even if the normal range itself is not included. Coded by ordinals in series HHH, HH, H, (nothing), L, LL, LLL; see openEHR terminology group |
||
normal_range: |
Optional normal range. |
||
other_reference_ranges: |
Optional tagged other reference ranges for this value in its particular measurement context. |
||
Functions |
|||
Value equality: return True if Parameters
|
|||
Reference equality for reference types, value equality for value types. Parameters
|
|||
Create new instance of a type. |
|||
Type name of an object as a string. May include generic parameters, as in |
|||
Any.not_equal alias "!=", "≠" ( |
True if current object not equal to |
||
(abstract) less_than alias "<" ( |
True if this Ordered object is less than |
||
Ordered.less_than_or_equal alias "⇐", "≤" ( |
True if current object less than or equal to |
||
Ordered.greater_than alias ">" ( |
True if current object greater than |
||
Ordered.greater_than_or_equal alias ">=", "≥" ( |
True if current object greater than or equal to |
||
(abstract) is_strictly_comparable_to ( |
Test if two instances are strictly comparable. Effected in descendants. |
||
is_simple (): |
True if this quantity has no reference ranges. |
||
is_normal (): |
Value is in the normal range, determined by comparison of the value to |
||
Invariants |
|||
Other_reference_ranges_validity: |
|||
Is_simple_validity: |
|||
Normal_status_validity: |
|||
Normal_range_and_status_consistency: |
|||
{
"name": "DV_ORDERED",
"documentation": "Abstract class defining the concept of ordered values, which includes ordinals as well as true quantities. It defines the functions `<` and `_is_strictly_comparable_to()_`, the latter of which must evaluate to `True` for instances being compared with the `<` function, or used as limits in the `DV_INTERVAL<T>` class. \n\nData value types which are to be used as limits in the `DV_INTERVAL<T>` class must inherit from this class, and implement the function `_is_strictly_comparable_to()_` to ensure that instances compare meaningfully. For example, instances of `DV_QUANTITY` can only be compared if they measure the same kind of physical quantity. \n",
"is_abstract": true,
"ancestors": [
"DATA_VALUE",
"Ordered"
],
"properties": {
"normal_status": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "normal_status",
"documentation": "Optional normal status indicator of value with respect to normal range for this value. Often included by lab, even if the normal range itself is not included. Coded by ordinals in series HHH, HH, H, (nothing), L, LL, LLL; see openEHR terminology group `normal_status`. ",
"type": "CODE_PHRASE"
},
"normal_range": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "normal_range",
"documentation": "Optional normal range. ",
"type": "DV_INTERVAL"
},
"other_reference_ranges": {
"_type": "P_BMM_CONTAINER_PROPERTY",
"name": "other_reference_ranges",
"documentation": "Optional tagged other reference ranges for this value in its particular measurement context.",
"type_def": {
"container_type": "List",
"type_def": {
"_type": "P_BMM_GENERIC_TYPE",
"root_type": "REFERENCE_RANGE",
"generic_parameters": [
"DV_ORDERED"
]
}
},
"cardinality": {
"lower": 0,
"upper_unbounded": true
}
}
},
"functions": {
"is_strictly_comparable_to": {
"name": "is_strictly_comparable_to",
"documentation": "Test if two instances are strictly comparable. Effected in descendants.",
"is_abstract": true,
"parameters": {
"other": {
"_type": "P_BMM_SINGLE_FUNCTION_PARAMETER",
"name": "other",
"type": "DV_ORDERED"
}
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
},
"is_simple": {
"name": "is_simple",
"documentation": "True if this quantity has no reference ranges.",
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
},
"is_normal": {
"name": "is_normal",
"documentation": "Value is in the normal range, determined by comparison of the value to `_normal_range_` if present, or by the `_normal_status_` marker if present. \n",
"pre_conditions": {
"Pre": "normal_range /= Void or normal_status /= Void"
},
"post_conditions": {
"Post_range": "normal_range /= Void implies Result = normal_range.has (self)",
"Post_status": "normal_status /= Void implies normal_status.code_string.is_equal (“N”)"
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
},
"less_than": {
"name": "less_than",
"aliases": [
"<"
],
"documentation": "True if this Ordered object is less than `_other_`. Redefined in descendants.",
"is_abstract": true,
"parameters": {
"other": {
"_type": "P_BMM_SINGLE_FUNCTION_PARAMETER",
"name": "other",
"type": "DV_ORDERED"
}
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
}
},
"invariants": {
"Other_reference_ranges_validity": "other_reference_ranges /= Void implies not other_reference_ranges.is_empty",
"Is_simple_validity": "(normal_range = Void and other_reference_ranges = Void) implies is_simple",
"Normal_status_validity": "normal_status /= Void implies code_set (Code_set_id_normal_statuses).has_code (normal_status)",
"Normal_range_and_status_consistency": "(normal_range /= Void and normal_status /= Void) implies (normal_status.code_string.is_equal (“N”) xor not normal_range.has (self))"
}
}
DV_INTERVAL Class
-
Definition
-
Effective
-
BMM
-
UML
Class |
DV_INTERVAL<T> |
|
|---|---|---|
Description |
Generic class defining an interval (i.e. range) of a comparable type. An interval is a contiguous subrange of a comparable base type. Used to define intervals of dates, times, quantities (whose units match) and so on. The type parameter, Without the The basic semantics are derived from the class |
|
Inherit |
||
Invariants |
Limits_consistent: |
|
| DV_INTERVAL<T> | |||
|---|---|---|---|
Generic class defining an interval (i.e. range) of a comparable type. An interval is a contiguous subrange of a comparable base type. Used to define intervals of dates, times, quantities (whose units match) and so on. The type parameter, Without the The basic semantics are derived from the class |
|||
Inherits: BASIC_DEFINITIONS, OPENEHR_DEFINITIONS, Any, DATA_VALUE, Interval |
|||
Constants |
|||
BASIC_DEFINITIONS.CR: |
Carriage return character. |
||
BASIC_DEFINITIONS.LF: |
Line feed character. |
||
BASIC_DEFINITIONS.Any_type_name: |
|||
BASIC_DEFINITIONS.Regex_any_pattern: |
|||
BASIC_DEFINITIONS.Default_encoding: |
|||
BASIC_DEFINITIONS.None_type_name: |
|||
OPENEHR_DEFINITIONS.Local_terminology_id: |
Predefined terminology identifier to indicate it is local to the knowledge resource in which it occurs, e.g. an archetype |
||
Attributes |
|||
Interval.lower: |
Lower bound. |
||
Interval.upper: |
Upper bound. |
||
True if |
|||
True if |
|||
True if |
|||
True if |
|||
Functions |
|||
(abstract) Interval.is_equal ( |
True if current object’s interval is semantically same as |
||
Reference equality for reference types, value equality for value types. Parameters
|
|||
Create new instance of a type. |
|||
Type name of an object as a string. May include generic parameters, as in |
|||
Any.not_equal alias "!=", "≠" ( |
True if current object not equal to |
||
(abstract) Interval.has ( |
True if the value |
||
(abstract) Interval.intersects ( |
True if there is any overlap between intervals represented by Current and |
||
(abstract) Interval.contains ( |
True if current interval properly contains |
||
Invariants |
|||
Interval.Lower_included_valid: |
|||
Interval.Upper_included_valid: |
|||
Limits_consistent: |
|||
Interval.Limits_comparable: |
|||
{
"name": "DV_INTERVAL",
"documentation": "Generic class defining an interval (i.e. range) of a comparable type. An interval is a contiguous subrange of a comparable base type. Used to define intervals of dates, times, quantities (whose units match) and so on. The type parameter, `T`, must be a descendant of the type `DV_ORDERED`, which is necessary (but not sufficient) for instances to be compared (`_strictly_comparable_` is also needed). \n\nWithout the `DV_INTERVAL` class, quite a few more `DV_` classes would be needed to express logical intervals, namely interval versions of all the date/time classes, and of quantity classes. Further, it allows the semantics of intervals to be stated in one place unequivocally, including the conditions for strict comparison. \n\nThe basic semantics are derived from the class `Interval<T>`, described in the support RM. ",
"ancestors": [
"DATA_VALUE",
"Interval"
],
"generic_parameter_defs": {
"T": {
"name": "T",
"conforms_to_type": "DV_ORDERED"
}
},
"invariants": {
"Limits_consistent": "(not upper_unbounded and not lower_unbounded) implies (lower.is_strictly_comparable_to(upper) and lower <= upper)"
}
}
REFERENCE_RANGE Class
-
Definition
-
Effective
-
BMM
-
UML
Class |
REFERENCE_RANGE<T> |
|
|---|---|---|
Description |
Defines a named range to be associated with any |
|
Attributes |
Signature |
Meaning |
1..1 |
meaning: |
Term whose value indicates the meaning of this range, e.g. normal, critical, therapeutic etc. |
1..1 |
range: |
The data range for this meaning, e.g. critical etc. |
Functions |
Signature |
Meaning |
1..1 |
is_in_range ( |
Indicates if the value |
Invariants |
Range_is_simple: |
|
| REFERENCE_RANGE<T> | |
|---|---|
Defines a named range to be associated with any |
|
Attributes |
|
meaning: |
Term whose value indicates the meaning of this range, e.g. normal, critical, therapeutic etc. |
range: |
The data range for this meaning, e.g. critical etc. |
Functions |
|
is_in_range ( |
Indicates if the value |
Invariants |
|
Range_is_simple: |
|
{
"name": "REFERENCE_RANGE",
"documentation": "Defines a named range to be associated with any `DV_ORDERED` datum. Each such range is particular to the patient and context, e.g. sex, age, and any other factor which affects ranges. May be used to represent normal, therapeutic, dangerous, critical etc ranges.",
"generic_parameter_defs": {
"T": {
"name": "T",
"conforms_to_type": "DV_ORDERED"
}
},
"properties": {
"meaning": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "meaning",
"documentation": "Term whose value indicates the meaning of this range, e.g. normal, critical, therapeutic etc.",
"is_mandatory": true,
"type": "DV_TEXT"
},
"range": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "range",
"documentation": "The data range for this meaning, e.g. critical etc.",
"is_mandatory": true,
"type": "DV_INTERVAL"
}
},
"functions": {
"is_in_range": {
"name": "is_in_range",
"documentation": "Indicates if the value `_v_` is inside the range.\n",
"parameters": {
"v": {
"_type": "P_BMM_SINGLE_FUNCTION_PARAMETER",
"name": "v",
"type": "DV_ORDERED"
}
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
}
},
"invariants": {
"Range_is_simple": "(range.lower_unbounded or else range.lower.is_simple) and (range.upper_unbounded or else range.upper.is_simple)"
}
}
DV_ORDINAL Class
-
Definition
-
Effective
-
BMM
-
UML
Class |
DV_ORDINAL |
|
|---|---|---|
Description |
A data type that represents integral score values, e.g. pain, Apgar values, etc, where there is: a) implied ordering, b) no implication that the distance between each value is constant, and c) the total number of values is finite; d) integer values only. Note that although the term 'ordinal' in mathematics means natural numbers only, here any integer is allowed, since negative and zero values are often used by medical professionals for values around a neutral point. Examples of sets of ordinal values:
This class is used for recording any clinical datum which is customarily recorded using symbolic values. Example: the results on a urinalysis strip, e.g. For scores or scales that include Real numbers (or might in the future, i.e. not fixed for all time, such as Apgar), use |
|
Inherit |
||
Attributes |
Signature |
Meaning |
1..1 |
symbol: |
Coded textual representation of this value in the enumeration, which may be strings made from + symbols, or other enumerations of terms such as |
1..1 |
value: |
Value in ordered enumeration of values. Any integer value can be used. |
Functions |
Signature |
Meaning |
1..1 |
less_than alias "<" ( |
True if this Ordinal value is less than |
1..1 |
is_strictly_comparable_to ( |
Test if this Ordinal is strictly comparable to |
| DV_ORDINAL | |||
|---|---|---|---|
A data type that represents integral score values, e.g. pain, Apgar values, etc, where there is: a) implied ordering, b) no implication that the distance between each value is constant, and c) the total number of values is finite; d) integer values only. Note that although the term 'ordinal' in mathematics means natural numbers only, here any integer is allowed, since negative and zero values are often used by medical professionals for values around a neutral point. Examples of sets of ordinal values:
This class is used for recording any clinical datum which is customarily recorded using symbolic values. Example: the results on a urinalysis strip, e.g. For scores or scales that include Real numbers (or might in the future, i.e. not fixed for all time, such as Apgar), use |
|||
Inherits: BASIC_DEFINITIONS, OPENEHR_DEFINITIONS, Any, DATA_VALUE, Ordered, DV_ORDERED |
|||
Constants |
|||
BASIC_DEFINITIONS.CR: |
Carriage return character. |
||
BASIC_DEFINITIONS.LF: |
Line feed character. |
||
BASIC_DEFINITIONS.Any_type_name: |
|||
BASIC_DEFINITIONS.Regex_any_pattern: |
|||
BASIC_DEFINITIONS.Default_encoding: |
|||
BASIC_DEFINITIONS.None_type_name: |
|||
OPENEHR_DEFINITIONS.Local_terminology_id: |
Predefined terminology identifier to indicate it is local to the knowledge resource in which it occurs, e.g. an archetype |
||
Attributes |
|||
DV_ORDERED.normal_status: |
Optional normal status indicator of value with respect to normal range for this value. Often included by lab, even if the normal range itself is not included. Coded by ordinals in series HHH, HH, H, (nothing), L, LL, LLL; see openEHR terminology group |
||
DV_ORDERED.normal_range: |
Optional normal range. |
||
DV_ORDERED.other_reference_ranges: |
Optional tagged other reference ranges for this value in its particular measurement context. |
||
symbol: |
Coded textual representation of this value in the enumeration, which may be strings made from + symbols, or other enumerations of terms such as |
||
value: |
Value in ordered enumeration of values. Any integer value can be used. |
||
Functions |
|||
Value equality: return True if Parameters
|
|||
Reference equality for reference types, value equality for value types. Parameters
|
|||
Create new instance of a type. |
|||
Type name of an object as a string. May include generic parameters, as in |
|||
Any.not_equal alias "!=", "≠" ( |
True if current object not equal to |
||
less_than alias "<" ( |
True if this Ordinal value is less than |
||
Ordered.less_than_or_equal alias "⇐", "≤" ( |
True if current object less than or equal to |
||
Ordered.greater_than alias ">" ( |
True if current object greater than |
||
Ordered.greater_than_or_equal alias ">=", "≥" ( |
True if current object greater than or equal to |
||
is_strictly_comparable_to ( |
Test if this Ordinal is strictly comparable to |
||
DV_ORDERED.is_simple (): |
True if this quantity has no reference ranges. |
||
DV_ORDERED.is_normal (): |
Value is in the normal range, determined by comparison of the value to |
||
Invariants |
|||
DV_ORDERED.Other_reference_ranges_validity: |
|||
DV_ORDERED.Is_simple_validity: |
|||
DV_ORDERED.Normal_status_validity: |
|||
DV_ORDERED.Normal_range_and_status_consistency: |
|||
{
"name": "DV_ORDINAL",
"documentation": "A data type that represents integral score values, e.g. pain, Apgar values, etc, where there is:\n\na) implied ordering, \nb) no implication that the distance between each value is constant, and \nc) the total number of values is finite;\nd) integer values only.\n\nNote that although the term 'ordinal' in mathematics means natural numbers only, here any integer is allowed, since negative and zero values are often used by medical professionals for values around a neutral point. Examples of sets of ordinal values: \n\n* -3, -2, -1, 0, 1, 2, 3 -- reflex response values \n* 0, 1, 2 -- Apgar values \n\nThis class is used for recording any clinical datum which is customarily recorded using symbolic values. Example: the results on a urinalysis strip, e.g. `{neg, trace, +, ++, +++}` are used for leucocytes, protein, nitrites etc; for non-haemolysed blood `{neg, trace, moderate}`; for haemolysed blood `{small, moderate, large}`.\n\nFor scores or scales that include Real numbers (or might in the future, i.e. not fixed for all time, such as Apgar), use `DV_SCALE`. `DV_SCALE` may also be used in future for representing purely Integer-based scales, however, the `DV_ORDINAL` type should continue to be supported in software implementations in order to accommodate existing data that are instances of this type.",
"ancestors": [
"DV_ORDERED"
],
"properties": {
"symbol": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "symbol",
"documentation": "Coded textual representation of this value in the enumeration, which may be strings made from + symbols, or other enumerations of terms such as `mild`, `moderate`, `severe`, or even the same number series as the values, e.g. 1, 2, 3.",
"is_mandatory": true,
"type": "DV_CODED_TEXT"
},
"value": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "value",
"documentation": "Value in ordered enumeration of values. Any integer value can be used. \n",
"is_mandatory": true,
"type": "Integer"
}
},
"functions": {
"less_than": {
"name": "less_than",
"aliases": [
"<"
],
"documentation": "True if this Ordinal value is less than `_other_`.",
"parameters": {
"other": {
"_type": "P_BMM_SINGLE_FUNCTION_PARAMETER",
"name": "other",
"type": "DV_ORDINAL"
}
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
},
"is_strictly_comparable_to": {
"name": "is_strictly_comparable_to",
"documentation": "Test if this Ordinal is strictly comparable to `_other_`.",
"parameters": {
"other": {
"_type": "P_BMM_SINGLE_FUNCTION_PARAMETER",
"name": "other",
"type": "DV_ORDINAL"
}
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
}
}
}
DV_SCALE Class
-
Definition
-
Effective
-
BMM
-
UML
Class |
DV_SCALE |
|
|---|---|---|
Description |
A data type that represents scale values, where there is: a) implied ordering, b) no implication that the distance between each value is constant, and c) the total number of values is finite; d) non-integer values are allowed. Example: Borg CR 10 Scale 0 No Breathlessness at all 0.5 Very Very Slight (Just Noticeable) 1 Very Slight 2 Slight Breathlessness 3 Moderate ... etc For scores that include only Integers, |
|
Inherit |
||
Attributes |
Signature |
Meaning |
1..1 |
symbol: |
Coded textual representation of this value in the scale range, which may be strings made from symbols or other enumerations of terms such as In some cases, a scale may include values that have no code/symbol. In this case, the symbol will be a |
1..1 |
value: |
Real number value of Scale item. |
Functions |
Signature |
Meaning |
1..1 |
Test if this Scale value is strictly comparable to |
|
1..1 |
True if this Scale value is less than |
|
| DV_SCALE | |||
|---|---|---|---|
A data type that represents scale values, where there is: a) implied ordering, b) no implication that the distance between each value is constant, and c) the total number of values is finite; d) non-integer values are allowed. Example: Borg CR 10 Scale 0 No Breathlessness at all 0.5 Very Very Slight (Just Noticeable) 1 Very Slight 2 Slight Breathlessness 3 Moderate ... etc For scores that include only Integers, |
|||
Inherits: BASIC_DEFINITIONS, OPENEHR_DEFINITIONS, Any, DATA_VALUE, Ordered, DV_ORDERED |
|||
Constants |
|||
BASIC_DEFINITIONS.CR: |
Carriage return character. |
||
BASIC_DEFINITIONS.LF: |
Line feed character. |
||
BASIC_DEFINITIONS.Any_type_name: |
|||
BASIC_DEFINITIONS.Regex_any_pattern: |
|||
BASIC_DEFINITIONS.Default_encoding: |
|||
BASIC_DEFINITIONS.None_type_name: |
|||
OPENEHR_DEFINITIONS.Local_terminology_id: |
Predefined terminology identifier to indicate it is local to the knowledge resource in which it occurs, e.g. an archetype |
||
Attributes |
|||
DV_ORDERED.normal_status: |
Optional normal status indicator of value with respect to normal range for this value. Often included by lab, even if the normal range itself is not included. Coded by ordinals in series HHH, HH, H, (nothing), L, LL, LLL; see openEHR terminology group |
||
DV_ORDERED.normal_range: |
Optional normal range. |
||
DV_ORDERED.other_reference_ranges: |
Optional tagged other reference ranges for this value in its particular measurement context. |
||
symbol: |
Coded textual representation of this value in the scale range, which may be strings made from symbols or other enumerations of terms such as In some cases, a scale may include values that have no code/symbol. In this case, the symbol will be a |
||
value: |
Real number value of Scale item. |
||
Functions |
|||
Value equality: return True if Parameters
|
|||
Reference equality for reference types, value equality for value types. Parameters
|
|||
Create new instance of a type. |
|||
Type name of an object as a string. May include generic parameters, as in |
|||
Any.not_equal alias "!=", "≠" ( |
True if current object not equal to |
||
True if this Scale value is less than |
|||
Ordered.less_than_or_equal alias "⇐", "≤" ( |
True if current object less than or equal to |
||
Ordered.greater_than alias ">" ( |
True if current object greater than |
||
Ordered.greater_than_or_equal alias ">=", "≥" ( |
True if current object greater than or equal to |
||
is_strictly_comparable_to ( |
Test if this Scale value is strictly comparable to |
||
DV_ORDERED.is_simple (): |
True if this quantity has no reference ranges. |
||
DV_ORDERED.is_normal (): |
Value is in the normal range, determined by comparison of the value to |
||
Invariants |
|||
DV_ORDERED.Other_reference_ranges_validity: |
|||
DV_ORDERED.Is_simple_validity: |
|||
DV_ORDERED.Normal_status_validity: |
|||
DV_ORDERED.Normal_range_and_status_consistency: |
|||
{
"name": "DV_SCALE",
"documentation": "A data type that represents scale values, where there is:\n\na) implied ordering, \nb) no implication that the distance between each value is constant, and \nc) the total number of values is finite;\nd) non-integer values are allowed.\n\nExample:\n\n----\nBorg CR 10 Scale\n\n0 No Breathlessness at all\n0.5 Very Very Slight (Just Noticeable)\n1 Very Slight\n2 Slight Breathlessness\n3 Moderate\n... etc\n----\n\nFor scores that include only Integers, `DV_SCALE` may also be used, but `DV_ORDINAL` should be supported to accommodate existing data instances of that type.",
"ancestors": [
"DV_ORDERED"
],
"properties": {
"symbol": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "symbol",
"documentation": "Coded textual representation of this value in the scale range, which may be strings made from symbols or other enumerations of terms such as `no breathlessness`, `very very slight`, `slight breathlessness`. Codes come from archetypes.\n\nIn some cases, a scale may include values that have no code/symbol. In this case, the symbol will be a `DV-CODED_TEXT` including the `_terminology_id_` and a blank String value for `_code_string_`.",
"is_mandatory": true,
"type": "DV_CODED_TEXT"
},
"value": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "value",
"documentation": "Real number value of Scale item.\n",
"is_mandatory": true,
"type": "Real"
}
},
"functions": {
"is_strictly_comparable_to": {
"name": "is_strictly_comparable_to",
"documentation": "Test if this Scale value is strictly comparable to `_other_`.",
"parameters": {
"other": {
"_type": "P_BMM_SINGLE_FUNCTION_PARAMETER",
"name": "other",
"type": "DV_SCALE"
}
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
},
"less_than": {
"name": "less_than",
"aliases": [
"<"
],
"documentation": "True if this Scale value is less than `_other_`.",
"parameters": {
"other": {
"_type": "P_BMM_SINGLE_FUNCTION_PARAMETER",
"name": "other",
"type": "DV_SCALE"
}
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
}
}
}
DV_QUANTIFIED Class
-
Definition
-
Effective
-
BMM
-
UML
Class |
DV_QUANTIFIED (abstract) |
|
|---|---|---|
Description |
Abstract class defining the concept of true quantified values, i.e. values which are not only ordered, but which have a precise magnitude. |
|
Inherit |
||
Attributes |
Signature |
Meaning |
0..1 |
magnitude_status: |
Optional status of magnitude with values:
If not present, assumed meaning is |
0..1 |
accuracy: |
Accuracy of measurement. Exact form of expression determined in descendants. |
Functions |
Signature |
Meaning |
1..1 |
valid_magnitude_status (): |
Test whether a string value is one of the valid values for the magnitude_status attribute. |
1..1 |
magnitude (): |
|
1..1 |
accuracy_unknown (): |
True if accuracy is not known, e.g. due to not being recorded or discernable. |
1..1 |
is_equal ( |
Return True if this |
1..1 |
less_than alias "<" ( |
True if this Quantified object is less than |
Invariants |
Magnitude_status_valid: |
|
| DV_QUANTIFIED (abstract) | |||
|---|---|---|---|
Abstract class defining the concept of true quantified values, i.e. values which are not only ordered, but which have a precise magnitude. |
|||
Inherits: BASIC_DEFINITIONS, OPENEHR_DEFINITIONS, Any, DATA_VALUE, Ordered, DV_ORDERED |
|||
Constants |
|||
BASIC_DEFINITIONS.CR: |
Carriage return character. |
||
BASIC_DEFINITIONS.LF: |
Line feed character. |
||
BASIC_DEFINITIONS.Any_type_name: |
|||
BASIC_DEFINITIONS.Regex_any_pattern: |
|||
BASIC_DEFINITIONS.Default_encoding: |
|||
BASIC_DEFINITIONS.None_type_name: |
|||
OPENEHR_DEFINITIONS.Local_terminology_id: |
Predefined terminology identifier to indicate it is local to the knowledge resource in which it occurs, e.g. an archetype |
||
Attributes |
|||
DV_ORDERED.normal_status: |
Optional normal status indicator of value with respect to normal range for this value. Often included by lab, even if the normal range itself is not included. Coded by ordinals in series HHH, HH, H, (nothing), L, LL, LLL; see openEHR terminology group |
||
DV_ORDERED.normal_range: |
Optional normal range. |
||
DV_ORDERED.other_reference_ranges: |
Optional tagged other reference ranges for this value in its particular measurement context. |
||
magnitude_status: |
Optional status of magnitude with values:
If not present, assumed meaning is |
||
accuracy: |
Accuracy of measurement. Exact form of expression determined in descendants. |
||
Functions |
|||
(abstract) is_equal ( |
Return True if this |
||
Reference equality for reference types, value equality for value types. Parameters
|
|||
Create new instance of a type. |
|||
Type name of an object as a string. May include generic parameters, as in |
|||
Any.not_equal alias "!=", "≠" ( |
True if current object not equal to |
||
less_than alias "<" ( |
True if this Quantified object is less than |
||
Ordered.less_than_or_equal alias "⇐", "≤" ( |
True if current object less than or equal to |
||
Ordered.greater_than alias ">" ( |
True if current object greater than |
||
Ordered.greater_than_or_equal alias ">=", "≥" ( |
True if current object greater than or equal to |
||
(abstract) DV_ORDERED.is_strictly_comparable_to ( |
Test if two instances are strictly comparable. Effected in descendants. |
||
DV_ORDERED.is_simple (): |
True if this quantity has no reference ranges. |
||
DV_ORDERED.is_normal (): |
Value is in the normal range, determined by comparison of the value to |
||
valid_magnitude_status (): |
Test whether a string value is one of the valid values for the magnitude_status attribute. |
||
(abstract) magnitude (): |
|||
accuracy_unknown (): |
True if accuracy is not known, e.g. due to not being recorded or discernable. |
||
Invariants |
|||
DV_ORDERED.Other_reference_ranges_validity: |
|||
DV_ORDERED.Is_simple_validity: |
|||
DV_ORDERED.Normal_status_validity: |
|||
DV_ORDERED.Normal_range_and_status_consistency: |
|||
Magnitude_status_valid: |
|||
{
"name": "DV_QUANTIFIED",
"documentation": "Abstract class defining the concept of true quantified values, i.e. values which are not only ordered, but which have a precise magnitude.",
"is_abstract": true,
"ancestors": [
"DV_ORDERED"
],
"properties": {
"magnitude_status": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "magnitude_status",
"documentation": "Optional status of magnitude with values: \n\n* `\"=\"` : magnitude is a point value \n* `\"<\"` : value is < magnitude \n* `\">\"` : value is > magnitude \n* `\"<=\"` : value is <= magnitude \n* `\">=\"` : value is >= magnitude \n* `\"~\"` : value is approximately magnitude \n\nIf not present, assumed meaning is `\"=\"` . \n",
"type": "String"
},
"accuracy": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "accuracy",
"documentation": "Accuracy of measurement. Exact form of expression determined in descendants.",
"type": "Any"
}
},
"functions": {
"valid_magnitude_status": {
"name": "valid_magnitude_status",
"documentation": "Test whether a string value is one of the valid values for the magnitude_status attribute. ",
"post_conditions": {
"Post": "Result = s in {\"=\", \"<\", \">\", \"<=\", \">=\", \"~\"}"
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
},
"magnitude": {
"name": "magnitude",
"is_abstract": true,
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Ordered_Numeric"
}
},
"accuracy_unknown": {
"name": "accuracy_unknown",
"documentation": "True if accuracy is not known, e.g. due to not being recorded or discernable.",
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
},
"is_equal": {
"name": "is_equal",
"documentation": "Return True if this `DV_QUANTIFIED` is considered equal to `_other_`.",
"is_abstract": true,
"parameters": {
"other": {
"_type": "P_BMM_SINGLE_FUNCTION_PARAMETER",
"name": "other",
"type": "DV_QUANTIFIED"
}
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
},
"less_than": {
"name": "less_than",
"aliases": [
"<"
],
"documentation": "True if this Quantified object is less than `_other_`, based on comparison of `_magnitude_`.",
"parameters": {
"other": {
"_type": "P_BMM_SINGLE_FUNCTION_PARAMETER",
"name": "other",
"type": "DV_QUANTIFIED"
}
},
"pre_conditions": {
"Pre_comparable": "is_strictly_comparable()"
},
"post_conditions": {
"Post_result": "Result = magnitude < other.magnitude"
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
}
},
"invariants": {
"Magnitude_status_valid": "magnitude_status /= Void implies valid_magnitude_status (magnitude_status)"
}
}
DV_AMOUNT Class
-
Definition
-
Effective
-
BMM
-
UML
Class |
DV_AMOUNT (abstract) |
|
|---|---|---|
Description |
Abstract class defining the concept of relative quantified 'amounts'. For relative quantities, the |
|
Inherit |
||
Attributes |
Signature |
Meaning |
0..1 |
accuracy_is_percent: |
If |
0..1 |
accuracy: |
Accuracy of measurement, expressed either as a half-range percent value ( A value of |
Functions |
Signature |
Meaning |
1..1 |
valid_percentage ( |
Test whether a number is a valid percentage, i.e. between 0 and 100. |
1..1 |
add alias "+" ( |
Sum of this amount and another. The value of accuracy in the result is either:
If the accuracy value is a percentage in one operand and not in the other, the form in the result is that of the larger operand. |
1..1 |
Difference of this amount and another. The value of
If the |
|
1..1 |
Return True if this |
|
1..1 |
Product of this Amount and |
|
1..1 |
negative alias "-" (): |
Negated version of current object, such as used for representing a difference, e.g. a weight loss. |
1..1 |
less_than alias "<" ( |
True if this object is less than |
Invariants |
Accuracy_is_percent_validity: |
|
Accuracy_validity: |
||
| DV_AMOUNT (abstract) | |||
|---|---|---|---|
Abstract class defining the concept of relative quantified 'amounts'. For relative quantities, the |
|||
Inherits: BASIC_DEFINITIONS, OPENEHR_DEFINITIONS, Any, DATA_VALUE, Ordered, DV_ORDERED, DV_QUANTIFIED |
|||
Constants |
|||
BASIC_DEFINITIONS.CR: |
Carriage return character. |
||
BASIC_DEFINITIONS.LF: |
Line feed character. |
||
BASIC_DEFINITIONS.Any_type_name: |
|||
BASIC_DEFINITIONS.Regex_any_pattern: |
|||
BASIC_DEFINITIONS.Default_encoding: |
|||
BASIC_DEFINITIONS.None_type_name: |
|||
OPENEHR_DEFINITIONS.Local_terminology_id: |
Predefined terminology identifier to indicate it is local to the knowledge resource in which it occurs, e.g. an archetype |
||
Attributes |
|||
DV_ORDERED.normal_status: |
Optional normal status indicator of value with respect to normal range for this value. Often included by lab, even if the normal range itself is not included. Coded by ordinals in series HHH, HH, H, (nothing), L, LL, LLL; see openEHR terminology group |
||
DV_ORDERED.normal_range: |
Optional normal range. |
||
DV_ORDERED.other_reference_ranges: |
Optional tagged other reference ranges for this value in its particular measurement context. |
||
DV_QUANTIFIED.magnitude_status: |
Optional status of magnitude with values:
If not present, assumed meaning is |
||
accuracy: |
Accuracy of measurement, expressed either as a half-range percent value ( A value of |
||
accuracy_is_percent: |
If |
||
Functions |
|||
Return True if this |
|||
Reference equality for reference types, value equality for value types. Parameters
|
|||
Create new instance of a type. |
|||
Type name of an object as a string. May include generic parameters, as in |
|||
Any.not_equal alias "!=", "≠" ( |
True if current object not equal to |
||
less_than alias "<" ( |
True if this object is less than |
||
Ordered.less_than_or_equal alias "⇐", "≤" ( |
True if current object less than or equal to |
||
Ordered.greater_than alias ">" ( |
True if current object greater than |
||
Ordered.greater_than_or_equal alias ">=", "≥" ( |
True if current object greater than or equal to |
||
(abstract) DV_ORDERED.is_strictly_comparable_to ( |
Test if two instances are strictly comparable. Effected in descendants. |
||
DV_ORDERED.is_simple (): |
True if this quantity has no reference ranges. |
||
DV_ORDERED.is_normal (): |
Value is in the normal range, determined by comparison of the value to |
||
DV_QUANTIFIED.valid_magnitude_status (): |
Test whether a string value is one of the valid values for the magnitude_status attribute. |
||
(abstract) DV_QUANTIFIED.magnitude (): |
|||
DV_QUANTIFIED.accuracy_unknown (): |
True if accuracy is not known, e.g. due to not being recorded or discernable. |
||
valid_percentage ( |
Test whether a number is a valid percentage, i.e. between 0 and 100. |
||
add alias "+" ( |
Sum of this amount and another. The value of accuracy in the result is either:
If the accuracy value is a percentage in one operand and not in the other, the form in the result is that of the larger operand. |
||
subtract alias "-" ( |
Difference of this amount and another. The value of
If the |
||
Product of this Amount and |
|||
negative alias "-" (): |
Negated version of current object, such as used for representing a difference, e.g. a weight loss. |
||
Invariants |
|||
DV_ORDERED.Other_reference_ranges_validity: |
|||
DV_ORDERED.Is_simple_validity: |
|||
DV_ORDERED.Normal_status_validity: |
|||
DV_ORDERED.Normal_range_and_status_consistency: |
|||
DV_QUANTIFIED.Magnitude_status_valid: |
|||
Accuracy_is_percent_validity: |
|||
Accuracy_validity: |
|||
{
"name": "DV_AMOUNT",
"documentation": "Abstract class defining the concept of relative quantified 'amounts'. For relative quantities, the `+` and `-` operators are defined (unlike descendants of `DV_ABSOLUTE_QUANTITY`, such as the date/time types). \n",
"is_abstract": true,
"ancestors": [
"DV_QUANTIFIED"
],
"properties": {
"accuracy_is_percent": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "accuracy_is_percent",
"documentation": "If `True`, indicates that when this object was created, `_accuracy_` was recorded as a percent value; if `False`, as an absolute quantity value.",
"type": "Boolean"
},
"accuracy": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "accuracy",
"documentation": "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.\n\nA value of `_unknown_accuracy_value_` means that accuracy was not recorded.",
"type": "Real"
}
},
"functions": {
"valid_percentage": {
"name": "valid_percentage",
"documentation": "Test whether a number is a valid percentage, i.e. between 0 and 100. ",
"parameters": {
"number": {
"_type": "P_BMM_SINGLE_FUNCTION_PARAMETER",
"name": "number",
"type": "Ordered_Numeric"
}
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
},
"add": {
"name": "add",
"aliases": [
"+"
],
"documentation": "Sum of this amount and another. The value of accuracy in the result is either:\n\n* the sum of the accuracies of the operands, if both present, or;\n* both operand accuracies are unknown_accuracy_value.\n\nIf the accuracy value is a percentage in one operand and not in the other, the form in the result is that of the larger operand.",
"parameters": {
"other": {
"_type": "P_BMM_SINGLE_FUNCTION_PARAMETER",
"name": "other",
"type": "DV_AMOUNT"
}
},
"pre_conditions": {
"Pre_comparable": "is_strictly_comparable_to (other)"
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "DV_AMOUNT"
}
},
"subtract": {
"name": "subtract",
"aliases": [
"-"
],
"documentation": "Difference of this amount and another. The value of `_accuracy_` in the result is either:\n\n* the sum of the accuracies of the operands, if both present, or;\n* unknown, if either or both operand accuracies are unknown.\n\nIf the `_accuracy_` value is a percentage in one operand and not in the other, the form in the result is that of the larger operand.",
"parameters": {
"other": {
"_type": "P_BMM_SINGLE_FUNCTION_PARAMETER",
"name": "other",
"type": "DV_AMOUNT"
}
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "DV_AMOUNT"
}
},
"is_equal": {
"name": "is_equal",
"documentation": "Return True if this `DV_AMOUNT` is considered equal to `_other_`.",
"is_abstract": true,
"parameters": {
"other": {
"_type": "P_BMM_SINGLE_FUNCTION_PARAMETER",
"name": "other",
"type": "DV_AMOUNT"
}
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
},
"multiply": {
"name": "multiply",
"aliases": [
"*"
],
"documentation": "Product of this Amount and `_factor_`.",
"parameters": {
"factor": {
"_type": "P_BMM_SINGLE_FUNCTION_PARAMETER",
"name": "factor",
"type": "Real"
}
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "DV_AMOUNT"
}
},
"negative": {
"name": "negative",
"aliases": [
"-"
],
"documentation": "Negated version of current object, such as used for representing a difference, e.g. a weight loss.",
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "DV_AMOUNT"
}
},
"less_than": {
"name": "less_than",
"aliases": [
"<"
],
"documentation": "True if this object is less than `_other_`. Based on comparison of `_magnitude_`.",
"parameters": {
"other": {
"_type": "P_BMM_SINGLE_FUNCTION_PARAMETER",
"name": "other",
"type": "DV_AMOUNT"
}
},
"pre_conditions": {
"Pre_comparable": "is_strictly_comparable()"
},
"post_conditions": {
"Post_result": "Result = magnitude < other.magnitude"
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
}
},
"invariants": {
"Accuracy_is_percent_validity": "accuracy = 0 implies not accuracy_is_percent",
"Accuracy_validity": "accuracy_is_percent implies valid_percentage (accuracy)"
}
}
DV_QUANTITY Class
-
Definition
-
Effective
-
BMM
-
UML
Class |
DV_QUANTITY |
|||
|---|---|---|---|---|
Description |
Quantitified type representing scientific quantities, i.e. quantities expressed as a magnitude and units. Units are expressed in the UCUM syntax (Unified Code for Units of Measure (UCUM), by Gunther Schadow and Clement J. McDonald of The Regenstrief Institute) (case-sensitive form) by default, or another system if Can also be used for time durations, where it is more convenient to treat these as simply a number of seconds rather than days, months, years (in the latter case, |
|||
Inherit |
||||
Attributes |
Signature |
Meaning |
||
1..1 |
magnitude: |
Numeric magnitude of the quantity. |
||
0..1 |
precision: |
Precision to which the value of the quantity is expressed, in terms of number of decimal places. The value 0 implies an integral quantity. The value -1 implies no limit, i.e. any number of decimal places. |
||
1..1 |
units: |
Quantity units, expressed as a code or syntax string from either UCUM (the default) or the units system specified in In either case, the value is the code or syntax - normally formed of standard ASCII - which is in principal not the same as the display string, although in simple cases such as 'm' (for meters) it will be. If the Example values from UCUM: "kg/m^2", “mm[Hg]", "ms-1", "km/h". |
||
0..1 |
normal_range: |
Optional normal range. |
||
0..1 |
other_reference_ranges: |
Optional tagged other reference ranges for this value in its particular measurement context. |
||
0..1 |
units_system: |
Optional field used to specify a units system from which codes in If not set, the UCUM standard (case-sensitive codes) is assumed as the units system. |
||
0..1 |
units_display_name: |
Optional field containing the displayable form of the If not set, the application environment needs to determine the displayable form.
|
||
Functions |
Signature |
Meaning |
||
1..1 |
add alias "+" ( |
Sum of this |
||
1..1 |
subtract alias "-" ( |
Difference of this |
||
1..1 |
multiply alias "*" ( |
Product of this |
||
1..1 |
less_than alias "<" ( |
True if this Quantity object is less than |
||
1..1 |
is_integral (): |
True if |
||
1..1 |
is_strictly_comparable_to ( |
True if this quantity and |
||
| DV_QUANTITY | |||
|---|---|---|---|
Quantitified type representing scientific quantities, i.e. quantities expressed as a magnitude and units. Units are expressed in the UCUM syntax (Unified Code for Units of Measure (UCUM), by Gunther Schadow and Clement J. McDonald of The Regenstrief Institute) (case-sensitive form) by default, or another system if Can also be used for time durations, where it is more convenient to treat these as simply a number of seconds rather than days, months, years (in the latter case, |
|||
Inherits: BASIC_DEFINITIONS, OPENEHR_DEFINITIONS, Any, DATA_VALUE, Ordered, DV_ORDERED, DV_QUANTIFIED, DV_AMOUNT |
|||
Constants |
|||
BASIC_DEFINITIONS.CR: |
Carriage return character. |
||
BASIC_DEFINITIONS.LF: |
Line feed character. |
||
BASIC_DEFINITIONS.Any_type_name: |
|||
BASIC_DEFINITIONS.Regex_any_pattern: |
|||
BASIC_DEFINITIONS.Default_encoding: |
|||
BASIC_DEFINITIONS.None_type_name: |
|||
OPENEHR_DEFINITIONS.Local_terminology_id: |
Predefined terminology identifier to indicate it is local to the knowledge resource in which it occurs, e.g. an archetype |
||
Attributes |
|||
DV_ORDERED.normal_status: |
Optional normal status indicator of value with respect to normal range for this value. Often included by lab, even if the normal range itself is not included. Coded by ordinals in series HHH, HH, H, (nothing), L, LL, LLL; see openEHR terminology group |
||
normal_range: |
Optional normal range. |
||
other_reference_ranges: |
Optional tagged other reference ranges for this value in its particular measurement context. |
||
DV_QUANTIFIED.magnitude_status: |
Optional status of magnitude with values:
If not present, assumed meaning is |
||
Accuracy of measurement, expressed either as a half-range percent value ( A value of |
|||
If |
|||
magnitude: |
Numeric magnitude of the quantity. |
||
precision: |
Precision to which the value of the quantity is expressed, in terms of number of decimal places. The value 0 implies an integral quantity. The value -1 implies no limit, i.e. any number of decimal places. |
||
units: |
Quantity units, expressed as a code or syntax string from either UCUM (the default) or the units system specified in In either case, the value is the code or syntax - normally formed of standard ASCII - which is in principal not the same as the display string, although in simple cases such as 'm' (for meters) it will be. If the Example values from UCUM: "kg/m^2", “mm[Hg]", "ms-1", "km/h". |
||
units_system: |
Optional field used to specify a units system from which codes in If not set, the UCUM standard (case-sensitive codes) is assumed as the units system. |
||
units_display_name: |
Optional field containing the displayable form of the If not set, the application environment needs to determine the displayable form.
|
||
Functions |
|||
(abstract) DV_AMOUNT.is_equal ( |
Return True if this |
||
Reference equality for reference types, value equality for value types. Parameters
|
|||
Create new instance of a type. |
|||
Type name of an object as a string. May include generic parameters, as in |
|||
Any.not_equal alias "!=", "≠" ( |
True if current object not equal to |
||
less_than alias "<" ( |
True if this Quantity object is less than |
||
Ordered.less_than_or_equal alias "⇐", "≤" ( |
True if current object less than or equal to |
||
Ordered.greater_than alias ">" ( |
True if current object greater than |
||
Ordered.greater_than_or_equal alias ">=", "≥" ( |
True if current object greater than or equal to |
||
is_strictly_comparable_to ( |
True if this quantity and |
||
DV_ORDERED.is_simple (): |
True if this quantity has no reference ranges. |
||
DV_ORDERED.is_normal (): |
Value is in the normal range, determined by comparison of the value to |
||
DV_QUANTIFIED.valid_magnitude_status (): |
Test whether a string value is one of the valid values for the magnitude_status attribute. |
||
(abstract) DV_QUANTIFIED.magnitude (): |
|||
DV_QUANTIFIED.accuracy_unknown (): |
True if accuracy is not known, e.g. due to not being recorded or discernable. |
||
DV_AMOUNT.valid_percentage ( |
Test whether a number is a valid percentage, i.e. between 0 and 100. |
||
add alias "+" ( |
Sum of this |
||
subtract alias "-" ( |
Difference of this |
||
multiply alias "*" ( |
Product of this |
||
Negated version of current object, such as used for representing a difference, e.g. a weight loss. |
|||
is_integral (): |
True if |
||
Invariants |
|||
DV_ORDERED.Other_reference_ranges_validity: |
|||
DV_ORDERED.Is_simple_validity: |
|||
DV_ORDERED.Normal_status_validity: |
|||
DV_ORDERED.Normal_range_and_status_consistency: |
|||
DV_QUANTIFIED.Magnitude_status_valid: |
|||
DV_AMOUNT.Accuracy_is_percent_validity: |
|||
DV_AMOUNT.Accuracy_validity: |
|||
{
"name": "DV_QUANTITY",
"documentation": "Quantitified type representing scientific quantities, i.e. quantities expressed as a magnitude and units. Units are expressed in the UCUM syntax (http://unitsofmeasure.org/ucum.html[Unified Code for Units of Measure (UCUM)], by Gunther Schadow and Clement J. McDonald of The Regenstrief Institute) (case-sensitive form) by default, or another system if `_units_system_` is set. \n\nCan also be used for time durations, where it is more convenient to treat these as simply a number of seconds rather than days, months, years (in the latter case, `DV_DURATION` may be used).",
"ancestors": [
"DV_AMOUNT"
],
"properties": {
"magnitude": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "magnitude",
"documentation": "Numeric magnitude of the quantity.",
"is_mandatory": true,
"type": "Real"
},
"precision": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "precision",
"documentation": "Precision to which the value of the quantity is expressed, in terms of number of decimal places. The value 0 implies an integral quantity.\nThe value -1 implies no limit, i.e. any number of decimal places.",
"type": "Integer"
},
"units": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "units",
"documentation": "Quantity units, expressed as a code or syntax string from either UCUM (the default) or the units system specified in `_units_system_`, when set.\n\nIn either case, the value is the code or syntax - normally formed of standard ASCII - which is in principal not the same as the display string, although in simple cases such as 'm' (for meters) it will be.\n\nIf the `_units_display_name_` field is set, this may be used for display. If not, the implementations must effect the resolution of the `_units_` value to a display form locally, e.g. by lookup of reference tables, request to a terminology service etc.\n\nExample values from UCUM: \"kg/m^2\", “mm[Hg]\", \"ms-1\", \"km/h\".",
"is_mandatory": true,
"type": "String"
},
"normal_range": {
"_type": "P_BMM_GENERIC_PROPERTY",
"name": "normal_range",
"documentation": "Optional normal range. ",
"type_def": {
"root_type": "DV_INTERVAL",
"generic_parameters": [
"DV_QUANTITY"
]
}
},
"other_reference_ranges": {
"_type": "P_BMM_CONTAINER_PROPERTY",
"name": "other_reference_ranges",
"documentation": "Optional tagged other reference ranges for this value in its particular measurement context.",
"type_def": {
"container_type": "List",
"type_def": {
"_type": "P_BMM_GENERIC_TYPE",
"root_type": "REFERENCE_RANGE",
"generic_parameters": [
"DV_QUANTITY"
]
}
},
"cardinality": {
"lower": 0,
"upper_unbounded": true
}
},
"units_system": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "units_system",
"documentation": "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 (https://www.hl7.org/fhir/terminologies-systems.html[HL7 FHIR terminologies list]).\n\nIf not set, the UCUM standard (case-sensitive codes) is assumed as the units system.",
"type": "String"
},
"units_display_name": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "units_display_name",
"documentation": "Optional field containing the displayable form of the `_units_` field, e.g. `'°C'`.\n\nIf not set, the application environment needs to determine the displayable form.\n\nNOTE: The display name may be language-dependent for various older and non-systematic units. For this reason, it is not recommended to add unit display names to archetypes, only to templates (for localisation purposes).",
"type": "String"
}
},
"functions": {
"add": {
"name": "add",
"aliases": [
"+"
],
"documentation": "Sum of this `DV_QUANTITY` and `_other_`.",
"parameters": {
"other": {
"_type": "P_BMM_SINGLE_FUNCTION_PARAMETER",
"name": "other",
"type": "DV_QUANTITY"
}
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "DV_QUANTITY"
}
},
"subtract": {
"name": "subtract",
"aliases": [
"-"
],
"documentation": "Difference of this `DV_QUANTITY` and `_other_`.",
"parameters": {
"other": {
"_type": "P_BMM_SINGLE_FUNCTION_PARAMETER",
"name": "other",
"type": "DV_QUANTITY"
}
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "DV_QUANTITY"
}
},
"multiply": {
"name": "multiply",
"aliases": [
"*"
],
"documentation": "Product of this `DV_QUANTITY` and `_factor_`.",
"parameters": {
"factor": {
"_type": "P_BMM_SINGLE_FUNCTION_PARAMETER",
"name": "factor",
"type": "Real"
}
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "DV_QUANTITY"
}
},
"less_than": {
"name": "less_than",
"aliases": [
"<"
],
"documentation": "True if this Quantity object is less than `_other_`, based on comparison of `_magnitude_`. Only valid if `_is_strictly_comparable_to()_` is True.",
"parameters": {
"other": {
"_type": "P_BMM_SINGLE_FUNCTION_PARAMETER",
"name": "other",
"type": "DV_QUANTITY"
}
},
"pre_conditions": {
"Pre_comparable": "is_strictly_comparable()"
},
"post_conditions": {
"Post_result": "Result = magnitude < other.magnitude"
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
},
"is_integral": {
"name": "is_integral",
"documentation": "True if `_precision_` = 0, meaning that the `_magnitude_` is a whole number.",
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
},
"is_strictly_comparable_to": {
"name": "is_strictly_comparable_to",
"documentation": "True if this quantity and `_other_` have the same `_units_` and also `_units_system_` if it exists.",
"parameters": {
"other": {
"_type": "P_BMM_SINGLE_FUNCTION_PARAMETER",
"name": "other",
"type": "DV_ORDERED"
}
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
}
}
}
DV_COUNT Class
-
Definition
-
Effective
-
BMM
-
UML
Class |
DV_COUNT |
|
|---|---|---|
Description |
Countable quantities. Used for countable types such as pregnancies and steps (taken by a physiotherapy patient), number of cigarettes smoked in a day. Misuse: Not to be used for amounts of physical entities (which all have units). |
|
Inherit |
||
Attributes |
Signature |
Meaning |
1..1 |
magnitude: |
|
0..1 |
normal_range: |
Optional normal range. |
0..1 |
other_reference_ranges: |
Optional tagged other reference ranges for this value in its particular measurement context. |
Functions |
Signature |
Meaning |
1..1 |
Sum of this |
|
1..1 |
Difference of this |
|
1..1 |
Product of this |
|
1..1 |
less_than alias "<" ( |
True if this Quantified object is less than |
1..1 |
is_strictly_comparable_to ( |
Return True. |
| DV_COUNT | |||
|---|---|---|---|
Countable quantities. Used for countable types such as pregnancies and steps (taken by a physiotherapy patient), number of cigarettes smoked in a day. Misuse: Not to be used for amounts of physical entities (which all have units). |
|||
Inherits: BASIC_DEFINITIONS, OPENEHR_DEFINITIONS, Any, DATA_VALUE, Ordered, DV_ORDERED, DV_QUANTIFIED, DV_AMOUNT |
|||
Constants |
|||
BASIC_DEFINITIONS.CR: |
Carriage return character. |
||
BASIC_DEFINITIONS.LF: |
Line feed character. |
||
BASIC_DEFINITIONS.Any_type_name: |
|||
BASIC_DEFINITIONS.Regex_any_pattern: |
|||
BASIC_DEFINITIONS.Default_encoding: |
|||
BASIC_DEFINITIONS.None_type_name: |
|||
OPENEHR_DEFINITIONS.Local_terminology_id: |
Predefined terminology identifier to indicate it is local to the knowledge resource in which it occurs, e.g. an archetype |
||
Attributes |
|||
DV_ORDERED.normal_status: |
Optional normal status indicator of value with respect to normal range for this value. Often included by lab, even if the normal range itself is not included. Coded by ordinals in series HHH, HH, H, (nothing), L, LL, LLL; see openEHR terminology group |
||
normal_range: |
Optional normal range. |
||
other_reference_ranges: |
Optional tagged other reference ranges for this value in its particular measurement context. |
||
DV_QUANTIFIED.magnitude_status: |
Optional status of magnitude with values:
If not present, assumed meaning is |
||
Accuracy of measurement, expressed either as a half-range percent value ( A value of |
|||
If |
|||
magnitude: |
|||
Functions |
|||
(abstract) DV_AMOUNT.is_equal ( |
Return True if this |
||
Reference equality for reference types, value equality for value types. Parameters
|
|||
Create new instance of a type. |
|||
Type name of an object as a string. May include generic parameters, as in |
|||
Any.not_equal alias "!=", "≠" ( |
True if current object not equal to |
||
less_than alias "<" ( |
True if this Quantified object is less than |
||
Ordered.less_than_or_equal alias "⇐", "≤" ( |
True if current object less than or equal to |
||
Ordered.greater_than alias ">" ( |
True if current object greater than |
||
Ordered.greater_than_or_equal alias ">=", "≥" ( |
True if current object greater than or equal to |
||
is_strictly_comparable_to ( |
Return True. |
||
DV_ORDERED.is_simple (): |
True if this quantity has no reference ranges. |
||
DV_ORDERED.is_normal (): |
Value is in the normal range, determined by comparison of the value to |
||
DV_QUANTIFIED.valid_magnitude_status (): |
Test whether a string value is one of the valid values for the magnitude_status attribute. |
||
(abstract) DV_QUANTIFIED.magnitude (): |
|||
DV_QUANTIFIED.accuracy_unknown (): |
True if accuracy is not known, e.g. due to not being recorded or discernable. |
||
DV_AMOUNT.valid_percentage ( |
Test whether a number is a valid percentage, i.e. between 0 and 100. |
||
Sum of this |
|||
Difference of this |
|||
Product of this |
|||
Negated version of current object, such as used for representing a difference, e.g. a weight loss. |
|||
Invariants |
|||
DV_ORDERED.Other_reference_ranges_validity: |
|||
DV_ORDERED.Is_simple_validity: |
|||
DV_ORDERED.Normal_status_validity: |
|||
DV_ORDERED.Normal_range_and_status_consistency: |
|||
DV_QUANTIFIED.Magnitude_status_valid: |
|||
DV_AMOUNT.Accuracy_is_percent_validity: |
|||
DV_AMOUNT.Accuracy_validity: |
|||
{
"name": "DV_COUNT",
"documentation": "Countable quantities. Used for countable types such as pregnancies and steps (taken by a physiotherapy patient), number of cigarettes smoked in a day. \n\nMisuse: Not to be used for amounts of physical entities (which all have units).",
"ancestors": [
"DV_AMOUNT"
],
"properties": {
"magnitude": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "magnitude",
"is_mandatory": true,
"type": "Integer64"
},
"normal_range": {
"_type": "P_BMM_GENERIC_PROPERTY",
"name": "normal_range",
"documentation": "Optional normal range. ",
"type_def": {
"root_type": "DV_INTERVAL",
"generic_parameters": [
"DV_COUNT"
]
}
},
"other_reference_ranges": {
"_type": "P_BMM_CONTAINER_PROPERTY",
"name": "other_reference_ranges",
"documentation": "Optional tagged other reference ranges for this value in its particular measurement context.",
"type_def": {
"container_type": "List",
"type_def": {
"_type": "P_BMM_GENERIC_TYPE",
"root_type": "REFERENCE_RANGE",
"generic_parameters": [
"DV_COUNT"
]
}
},
"cardinality": {
"lower": 0,
"upper_unbounded": true
}
}
},
"functions": {
"add": {
"name": "add",
"aliases": [
"+"
],
"documentation": "Sum of this `DV_COUNT` and `_other_`.",
"parameters": {
"other": {
"_type": "P_BMM_SINGLE_FUNCTION_PARAMETER",
"name": "other",
"type": "DV_COUNT"
}
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "DV_COUNT"
}
},
"subtract": {
"name": "subtract",
"aliases": [
"-"
],
"documentation": "Difference of this `DV_COUNT` and `_other_`.",
"parameters": {
"other": {
"_type": "P_BMM_SINGLE_FUNCTION_PARAMETER",
"name": "other",
"type": "DV_COUNT"
}
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "DV_COUNT"
}
},
"multiply": {
"name": "multiply",
"aliases": [
"*"
],
"documentation": "Product of this `DV_COUNT` and `_factor_`.",
"parameters": {
"factor": {
"_type": "P_BMM_SINGLE_FUNCTION_PARAMETER",
"name": "factor",
"type": "Real"
}
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "DV_COUNT"
}
},
"less_than": {
"name": "less_than",
"aliases": [
"<"
],
"documentation": "True if this Quantified object is less than `_other_`, based on comparison of `_magnitude_`.",
"parameters": {
"other": {
"_type": "P_BMM_SINGLE_FUNCTION_PARAMETER",
"name": "other",
"type": "DV_COUNT"
}
},
"pre_conditions": {
"Pre_comparable": "is_strictly_comparable()"
},
"post_conditions": {
"Post_result": "Result = magnitude < other.magnitude"
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
},
"is_strictly_comparable_to": {
"name": "is_strictly_comparable_to",
"documentation": "Return True.",
"parameters": {
"other": {
"_type": "P_BMM_SINGLE_FUNCTION_PARAMETER",
"name": "other",
"type": "DV_ORDERED"
}
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
}
}
}
DV_PROPORTION Class
-
Definition
-
Effective
-
BMM
-
UML
Class |
DV_PROPORTION |
|
|---|---|---|
Description |
Models a ratio of values, i.e. where the numerator and denominator are both pure numbers. The Used for recording titers (e.g. 1:128), concentration ratios, e.g. Na:K (unitary denominator), albumin:creatinine ratio, and percentages, e.g. red cell distirbution width (RDW). Misuse: Should not be used to represent things like blood pressure which are often written using a '/' character, giving the misleading impression that the item is a ratio, when in fact it is a structured value. Similarly, visual acuity, often written as (e.g.) "6/24" in clinical notes is not a ratio but an ordinal (which includes non-numeric symbols like CF = count fingers etc). Should not be used for formulations. |
|
Inherit |
||
Attributes |
Signature |
Meaning |
1..1 |
numerator: |
Numerator of ratio |
1..1 |
denominator: |
Denominator of ratio. |
1..1 |
type: |
Indicates semantic type of proportion, including percent, unitary etc. |
0..1 |
precision: |
Precision to which the |
0..1 |
normal_range: |
Optional normal range. |
0..1 |
other_reference_ranges: |
Optional tagged other reference ranges for this value in its particular measurement context. |
Functions |
Signature |
Meaning |
1..1 |
magnitude (): |
Effective magnitude represented by ratio. |
1..1 |
is_integral (): |
True if the |
1..1 |
add alias "+" ( |
Sum of two strictly comparable proportions. |
1..1 |
subtract alias "-" ( |
Difference between two strictly comparable proportions. |
1..1 |
is_equal ( |
Return True if this |
1..1 |
multiply alias "*" ( |
Product of this Proportion and |
1..1 |
less_than alias "<" ( |
True if this Proportion is less than |
1..1 |
is_strictly_comparable_to ( |
Return True if the |
Invariants |
Type_validity: |
|
Precision_validity: |
||
Is_integral_validity: |
||
Fraction_validity: |
||
Unitary_validity: |
||
Percent_validity: |
||
Valid_denominator: |
||
| DV_PROPORTION | |||
|---|---|---|---|
Models a ratio of values, i.e. where the numerator and denominator are both pure numbers. The Used for recording titers (e.g. 1:128), concentration ratios, e.g. Na:K (unitary denominator), albumin:creatinine ratio, and percentages, e.g. red cell distirbution width (RDW). Misuse: Should not be used to represent things like blood pressure which are often written using a '/' character, giving the misleading impression that the item is a ratio, when in fact it is a structured value. Similarly, visual acuity, often written as (e.g.) "6/24" in clinical notes is not a ratio but an ordinal (which includes non-numeric symbols like CF = count fingers etc). Should not be used for formulations. |
|||
Inherits: Any, Any, Ordered, Numeric, Ordered_Numeric, Integer, BASIC_DEFINITIONS, OPENEHR_DEFINITIONS, Any, DATA_VALUE, Ordered, DV_ORDERED, DV_QUANTIFIED, PROPORTION_KIND, DV_AMOUNT |
|||
Constants |
|||
BASIC_DEFINITIONS.CR: |
Carriage return character. |
||
BASIC_DEFINITIONS.LF: |
Line feed character. |
||
BASIC_DEFINITIONS.Any_type_name: |
|||
BASIC_DEFINITIONS.Regex_any_pattern: |
|||
BASIC_DEFINITIONS.Default_encoding: |
|||
BASIC_DEFINITIONS.None_type_name: |
|||
OPENEHR_DEFINITIONS.Local_terminology_id: |
Predefined terminology identifier to indicate it is local to the knowledge resource in which it occurs, e.g. an archetype |
||
Attributes |
|||
DV_ORDERED.normal_status: |
Optional normal status indicator of value with respect to normal range for this value. Often included by lab, even if the normal range itself is not included. Coded by ordinals in series HHH, HH, H, (nothing), L, LL, LLL; see openEHR terminology group |
||
normal_range: |
Optional normal range. |
||
other_reference_ranges: |
Optional tagged other reference ranges for this value in its particular measurement context. |
||
DV_QUANTIFIED.magnitude_status: |
Optional status of magnitude with values:
If not present, assumed meaning is |
||
Accuracy of measurement, expressed either as a half-range percent value ( A value of |
|||
If |
|||
numerator: |
Numerator of ratio |
||
denominator: |
Denominator of ratio. |
||
type: |
Indicates semantic type of proportion, including percent, unitary etc. |
||
precision: |
Precision to which the |
||
Functions |
|||
is_equal ( |
Return True if this |
||
Reference equality for reference types, value equality for value types. Parameters
|
|||
Create new instance of a type. |
|||
Type name of an object as a string. May include generic parameters, as in |
|||
Any.not_equal alias "!=", "≠" ( |
True if current object not equal to |
||
less_than alias "<" ( |
True if this Proportion is less than |
||
Ordered.less_than_or_equal alias "⇐", "≤" ( |
True if current object less than or equal to |
||
Ordered.greater_than alias ">" ( |
True if current object greater than |
||
Ordered.greater_than_or_equal alias ">=", "≥" ( |
True if current object greater than or equal to |
||
add alias "+" ( |
Sum of two strictly comparable proportions. |
||
subtract alias "-" ( |
Difference between two strictly comparable proportions. |
||
multiply alias "*" ( |
Product of this Proportion and |
||
Integer.divide alias "/" ( |
Integer division. |
||
Integer.exponent alias "^" ( |
Integer exponentiation. |
||
Negated version of current object, such as used for representing a difference, e.g. a weight loss. |
|||
Integer.modulo alias "mod", "\\" ( |
Return self modulo other. |
||
PROPORTION_KIND.valid_proportion_kind ( |
True if n is one of the defined types. |
||
is_strictly_comparable_to ( |
Return True if the |
||
DV_ORDERED.is_simple (): |
True if this quantity has no reference ranges. |
||
DV_ORDERED.is_normal (): |
Value is in the normal range, determined by comparison of the value to |
||
DV_QUANTIFIED.valid_magnitude_status (): |
Test whether a string value is one of the valid values for the magnitude_status attribute. |
||
magnitude (): |
Effective magnitude represented by ratio. |
||
DV_QUANTIFIED.accuracy_unknown (): |
True if accuracy is not known, e.g. due to not being recorded or discernable. |
||
DV_AMOUNT.valid_percentage ( |
Test whether a number is a valid percentage, i.e. between 0 and 100. |
||
is_integral (): |
True if the |
||
Invariants |
|||
DV_ORDERED.Other_reference_ranges_validity: |
|||
DV_ORDERED.Is_simple_validity: |
|||
DV_ORDERED.Normal_status_validity: |
|||
DV_ORDERED.Normal_range_and_status_consistency: |
|||
DV_QUANTIFIED.Magnitude_status_valid: |
|||
DV_AMOUNT.Accuracy_is_percent_validity: |
|||
DV_AMOUNT.Accuracy_validity: |
|||
Type_validity: |
|||
Precision_validity: |
|||
Is_integral_validity: |
|||
Fraction_validity: |
|||
Unitary_validity: |
|||
Percent_validity: |
|||
Valid_denominator: |
|||
{
"name": "DV_PROPORTION",
"documentation": "Models a ratio of values, i.e. where the numerator and denominator are both pure numbers. The `_valid_proportion_kind_` property of the `PROPORTION_KIND` class is used to control the type attribute to be one of a defined set.\n\nUsed for recording titers (e.g. 1:128), concentration ratios, e.g. Na:K (unitary denominator), albumin:creatinine ratio, and percentages, e.g. red cell distirbution width (RDW). \n \nMisuse: Should not be used to represent things like blood pressure which are often written using a '/' character, giving the misleading impression that the item is a ratio, when in fact it is a structured value. Similarly, visual acuity, often written as (e.g.) \"6/24\" in clinical notes is not a ratio but an ordinal (which includes non-numeric symbols like CF = count fingers etc). Should not be used for formulations. ",
"ancestors": [
"PROPORTION_KIND",
"DV_AMOUNT"
],
"properties": {
"numerator": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "numerator",
"documentation": "Numerator of ratio",
"is_mandatory": true,
"type": "Real"
},
"denominator": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "denominator",
"documentation": "Denominator of ratio.",
"is_mandatory": true,
"type": "Real"
},
"type": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "type",
"documentation": "Indicates semantic type of proportion, including percent, unitary etc.",
"is_mandatory": true,
"type": "Integer"
},
"precision": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "precision",
"documentation": "Precision to which the `_numerator_` and `_denominator_` values of the proportion are expressed, in terms of number of decimal places. The value 0 implies an integral quantity. The value -1 implies no limit, i.e. any number of decimal places. ",
"type": "Integer"
},
"normal_range": {
"_type": "P_BMM_GENERIC_PROPERTY",
"name": "normal_range",
"documentation": "Optional normal range. ",
"type_def": {
"root_type": "DV_INTERVAL",
"generic_parameters": [
"DV_PROPORTION"
]
}
},
"other_reference_ranges": {
"_type": "P_BMM_CONTAINER_PROPERTY",
"name": "other_reference_ranges",
"documentation": "Optional tagged other reference ranges for this value in its particular measurement context.",
"type_def": {
"container_type": "List",
"type_def": {
"_type": "P_BMM_GENERIC_TYPE",
"root_type": "REFERENCE_RANGE",
"generic_parameters": [
"DV_PROPORTION"
]
}
},
"cardinality": {
"lower": 0,
"upper_unbounded": true
}
}
},
"functions": {
"magnitude": {
"name": "magnitude",
"documentation": "Effective magnitude represented by ratio.",
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Real"
}
},
"is_integral": {
"name": "is_integral",
"documentation": "True if the `_numerator_` and `_denominator_` values are integers, i.e. if `_precision_` is 0.",
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
},
"add": {
"name": "add",
"aliases": [
"+"
],
"documentation": "Sum of two strictly comparable proportions.",
"parameters": {
"other": {
"_type": "P_BMM_SINGLE_FUNCTION_PARAMETER",
"name": "other",
"type": "DV_PROPORTION"
}
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "DV_PROPORTION"
}
},
"subtract": {
"name": "subtract",
"aliases": [
"-"
],
"documentation": "Difference between two strictly comparable proportions.",
"parameters": {
"other": {
"_type": "P_BMM_SINGLE_FUNCTION_PARAMETER",
"name": "other",
"type": "DV_PROPORTION"
}
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "DV_PROPORTION"
}
},
"is_equal": {
"name": "is_equal",
"documentation": "Return True if this `DV_AMOUNT` is considered equal to `_other_`.",
"parameters": {
"other": {
"_type": "P_BMM_SINGLE_FUNCTION_PARAMETER",
"name": "other",
"type": "DV_PROPORTION"
}
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
},
"multiply": {
"name": "multiply",
"aliases": [
"*"
],
"documentation": "Product of this Proportion and `_factor_`.",
"parameters": {
"factor": {
"_type": "P_BMM_SINGLE_FUNCTION_PARAMETER",
"name": "factor",
"type": "Real"
}
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "DV_PROPORTION"
}
},
"less_than": {
"name": "less_than",
"aliases": [
"<"
],
"documentation": "True if this Proportion is less than `_other_`. Only valid if `_is_strictly_comparable_to()_` is True.",
"parameters": {
"other": {
"_type": "P_BMM_SINGLE_FUNCTION_PARAMETER",
"name": "other",
"type": "DV_PROPORTION"
}
},
"pre_conditions": {
"Pre_comparable": "is_strictly_comparable()"
},
"post_conditions": {
"Post_result": "Result = magnitude < other.magnitude"
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
},
"is_strictly_comparable_to": {
"name": "is_strictly_comparable_to",
"documentation": "Return True if the `_type_` of this proportion is the same as the `_type_` of `_other_`.",
"parameters": {
"other": {
"_type": "P_BMM_SINGLE_FUNCTION_PARAMETER",
"name": "other",
"type": "DV_ORDERED"
}
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
}
},
"invariants": {
"Type_validity": "valid_proportion_kind (type)",
"Precision_validity": "precision = 0 implies is_integral",
"Is_integral_validity": "is_integral implies (numerator.floor = numerator and denominator.floor = denominator)",
"Fraction_validity": "(type = pk_fraction or type = pk_integer_fraction) implies is_integral",
"Unitary_validity": "type = pk_unitary implies denominator = 1",
"Percent_validity": "type = pk_percent implies denominator = 100",
"Valid_denominator": "denominator /= 0.0"
}
}
PROPORTION_KIND Enumeration
-
Definition
-
Effective
-
BMM
-
UML
Enumeration |
PROPORTION_KIND |
|
|---|---|---|
Description |
Class of enumeration constants defining types of proportion for the |
|
Constants |
Signature |
Meaning |
pk_ratio: |
Ratio type. Numerator and denominator may be any value. |
|
pk_unitary: |
Denominator must be 1. |
|
pk_percent: |
Denominator is 100, numerator is understood as a percentage value. |
|
pk_fraction: |
Numerator and denominator are integral, and the presentation method uses a slash, e.g. 1/2 . |
|
pk_integer_fraction: |
Numerator and denominator are integral, and the presentation method uses a slash, e.g. 1/2 ; if the numerator is greater than the denominator, e.g. n=3, d=2, the presentation is 1 1/2 . |
|
Functions |
Signature |
Meaning |
1..1 |
True if n is one of the defined types. |
|
| PROPORTION_KIND | |
|---|---|
Class of enumeration constants defining types of proportion for the |
|
Inherits: Any, Any, Ordered, Numeric, Ordered_Numeric, Integer |
|
Constants |
|
pk_ratio: |
Ratio type. Numerator and denominator may be any value. |
pk_unitary: |
Denominator must be 1. |
pk_percent: |
Denominator is 100, numerator is understood as a percentage value. |
pk_fraction: |
Numerator and denominator are integral, and the presentation method uses a slash, e.g. 1/2 . |
pk_integer_fraction: |
Numerator and denominator are integral, and the presentation method uses a slash, e.g. 1/2 ; if the numerator is greater than the denominator, e.g. n=3, d=2, the presentation is 1 1/2 . |
Functions |
|
Value equality: return True if |
|
Integer.equal alias "=", "==" ( |
Reference equality for reference types, value equality for value types. |
Create new instance of a type. |
|
Type name of an object as a string. May include generic parameters, as in |
|
Any.not_equal alias "!=", "≠" ( |
True if current object not equal to |
Integer.less_than alias "<" ( |
Returns True if current Integer is less than |
Ordered.less_than_or_equal alias "⇐", "≤" ( |
True if current object less than or equal to |
Ordered.greater_than alias ">" ( |
True if current object greater than |
Ordered.greater_than_or_equal alias ">=", "≥" ( |
True if current object greater than or equal to |
Integer addition. |
|
Integer.subtract alias "-" ( |
Integer subtraction. |
Integer.multiply alias "*" ( |
Integer multiplication. |
Integer.divide alias "/" ( |
Integer division. |
Integer.exponent alias "^" ( |
Integer exponentiation. |
Generate negative of current Integer value. |
|
Integer.modulo alias "mod", "\\" ( |
Return self modulo other. |
True if n is one of the defined types. |
|
{
"_type": "P_BMM_ENUMERATION_INTEGER",
"name": "PROPORTION_KIND",
"documentation": "Class of enumeration constants defining types of proportion for the `DV_PROPORTION` class. ",
"ancestors": [
"Integer"
],
"item_names": [
"pk_ratio",
"pk_unitary",
"pk_percent",
"pk_fraction",
"pk_integer_fraction"
],
"item_values": [
0,
1,
2,
3,
4
],
"item_documentations": [
"Ratio type. Numerator and denominator may be any value.\n",
"Denominator must be 1.",
"Denominator is 100, numerator is understood as a percentage value.",
"Numerator and denominator are integral, and the presentation method uses a slash, e.g. 1/2 . \n",
"Numerator and denominator are integral, and the presentation method uses a slash, e.g. 1/2 ; if the numerator is greater than the denominator, e.g. n=3, d=2, the presentation is 1 1/2 ."
],
"functions": {
"valid_proportion_kind": {
"name": "valid_proportion_kind",
"documentation": "True if n is one of the defined types. ",
"parameters": {
"nq": {
"_type": "P_BMM_SINGLE_FUNCTION_PARAMETER",
"name": "nq",
"type": "Integer"
}
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
}
}
}
DV_ABSOLUTE_QUANTITY Class
-
Definition
-
Effective
-
BMM
-
UML
Class |
DV_ABSOLUTE_QUANTITY (abstract) |
|
|---|---|---|
Description |
Abstract class defining the concept of quantified entities whose values are absolute with respect to an origin. Dates and Times are the main example. |
|
Inherit |
||
Attributes |
Signature |
Meaning |
0..1 |
accuracy: |
|
Functions |
Signature |
Meaning |
1..1 |
add alias "+" ( |
Addition of a differential amount to this quantity. The value of accuracy in the result is either:
|
1..1 |
subtract alias "-" ( |
Result of subtracting a differential amount from this quantity. The value of
|
1..1 |
diff alias "-" ( |
Difference of two quantities. The value of accuracy in the result is either:
|
| DV_ABSOLUTE_QUANTITY (abstract) | |||
|---|---|---|---|
Abstract class defining the concept of quantified entities whose values are absolute with respect to an origin. Dates and Times are the main example. |
|||
Inherits: BASIC_DEFINITIONS, OPENEHR_DEFINITIONS, Any, DATA_VALUE, Ordered, DV_ORDERED, DV_QUANTIFIED |
|||
Constants |
|||
BASIC_DEFINITIONS.CR: |
Carriage return character. |
||
BASIC_DEFINITIONS.LF: |
Line feed character. |
||
BASIC_DEFINITIONS.Any_type_name: |
|||
BASIC_DEFINITIONS.Regex_any_pattern: |
|||
BASIC_DEFINITIONS.Default_encoding: |
|||
BASIC_DEFINITIONS.None_type_name: |
|||
OPENEHR_DEFINITIONS.Local_terminology_id: |
Predefined terminology identifier to indicate it is local to the knowledge resource in which it occurs, e.g. an archetype |
||
Attributes |
|||
DV_ORDERED.normal_status: |
Optional normal status indicator of value with respect to normal range for this value. Often included by lab, even if the normal range itself is not included. Coded by ordinals in series HHH, HH, H, (nothing), L, LL, LLL; see openEHR terminology group |
||
DV_ORDERED.normal_range: |
Optional normal range. |
||
DV_ORDERED.other_reference_ranges: |
Optional tagged other reference ranges for this value in its particular measurement context. |
||
DV_QUANTIFIED.magnitude_status: |
Optional status of magnitude with values:
If not present, assumed meaning is |
||
accuracy: |
|||
Functions |
|||
(abstract) DV_QUANTIFIED.is_equal ( |
Return True if this |
||
Reference equality for reference types, value equality for value types. Parameters
|
|||
Create new instance of a type. |
|||
Type name of an object as a string. May include generic parameters, as in |
|||
Any.not_equal alias "!=", "≠" ( |
True if current object not equal to |
||
DV_QUANTIFIED.less_than alias "<" ( |
True if this Quantified object is less than |
||
Ordered.less_than_or_equal alias "⇐", "≤" ( |
True if current object less than or equal to |
||
Ordered.greater_than alias ">" ( |
True if current object greater than |
||
Ordered.greater_than_or_equal alias ">=", "≥" ( |
True if current object greater than or equal to |
||
(abstract) DV_ORDERED.is_strictly_comparable_to ( |
Test if two instances are strictly comparable. Effected in descendants. |
||
DV_ORDERED.is_simple (): |
True if this quantity has no reference ranges. |
||
DV_ORDERED.is_normal (): |
Value is in the normal range, determined by comparison of the value to |
||
DV_QUANTIFIED.valid_magnitude_status (): |
Test whether a string value is one of the valid values for the magnitude_status attribute. |
||
(abstract) DV_QUANTIFIED.magnitude (): |
|||
DV_QUANTIFIED.accuracy_unknown (): |
True if accuracy is not known, e.g. due to not being recorded or discernable. |
||
(abstract) add alias "+" ( |
Addition of a differential amount to this quantity. The value of accuracy in the result is either:
|
||
(abstract) subtract alias "-" ( |
Result of subtracting a differential amount from this quantity. The value of
|
||
(abstract) diff alias "-" ( |
Difference of two quantities. The value of accuracy in the result is either:
|
||
Invariants |
|||
DV_ORDERED.Other_reference_ranges_validity: |
|||
DV_ORDERED.Is_simple_validity: |
|||
DV_ORDERED.Normal_status_validity: |
|||
DV_ORDERED.Normal_range_and_status_consistency: |
|||
DV_QUANTIFIED.Magnitude_status_valid: |
|||
{
"name": "DV_ABSOLUTE_QUANTITY",
"documentation": "Abstract class defining the concept of quantified entities whose values are absolute with respect to an origin. Dates and Times are the main example.",
"is_abstract": true,
"ancestors": [
"DV_QUANTIFIED"
],
"properties": {
"accuracy": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "accuracy",
"type": "DV_AMOUNT"
}
},
"functions": {
"add": {
"name": "add",
"aliases": [
"+"
],
"documentation": "Addition of a differential amount to this quantity. \n\nThe value of accuracy in the result is either:\n\n* the sum of the accuracies of the operands, if both present, or;\n* unknown, if either or both operand accuracies are unknown.",
"is_abstract": true,
"parameters": {
"a_diff": {
"_type": "P_BMM_SINGLE_FUNCTION_PARAMETER",
"name": "a_diff",
"type": "DV_AMOUNT"
}
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "DV_ABSOLUTE_QUANTITY"
}
},
"subtract": {
"name": "subtract",
"aliases": [
"-"
],
"documentation": "Result of subtracting a differential amount from this quantity.\n\nThe value of `_accuracy_` in the result is either:\n\n* the sum of the accuracies of the operands, if both present, or;\n* unknown, if either or both operand accuracies are unknown.",
"is_abstract": true,
"parameters": {
"a_diff": {
"_type": "P_BMM_SINGLE_FUNCTION_PARAMETER",
"name": "a_diff",
"type": "DV_AMOUNT"
}
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "DV_ABSOLUTE_QUANTITY"
}
},
"diff": {
"name": "diff",
"aliases": [
"-"
],
"documentation": "Difference of two quantities.\n\nThe value of accuracy in the result is either:\n\n* the sum of the accuracies of the operands, if both present, or;\n* unknown, if either or both operand accuracies are unknown.",
"is_abstract": true,
"parameters": {
"other": {
"_type": "P_BMM_SINGLE_FUNCTION_PARAMETER",
"name": "other",
"type": "DV_ABSOLUTE_QUANTITY"
}
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "DV_AMOUNT"
}
}
}
}
Syntaxes
Units Syntax
The BNF syntax specification of the units string, adapted from UCUM (case-sensitive form) is as follows:
units = '/' exp_units | units '.' exp_units | units '/' exp_units | exp_units ;
exp_units = unit_group exponent | unit_group ;
unit_group = PREFIX annot_unit | annot_unit | '(' exp_units ')' | factor ;
annot_unit = unit_name [ '{' ANNOTATION '}' ] | '{' ANNOTATION '}' ;
factor = Integer ;
exponent = [ SIGN ] Integer ;
PREFIX = 'Y' |'Z' | 'E' | 'P' | 'T' | 'G' | 'M' | 'k' | 'h' | 'da' | 'd' | 'c' | 'm' | 'μ' | 'n' | 'p' | 'f' | 'a' | 'z' | 'y' ;
UNIT_NAME = ? [a-zA-Z_%]+ ?; (* replace regex with values from unit tables *)
ANNOTATION = ? [a-zA-Z'.]+ ?; (* replace regex with values from unit tables *)
SUFFIX = ? [a-zA-Z0-9'_]+ ?; (* replace regex with values from unit tables *)
SIGN = '+' | '-' ;
Integer = ? [0-9]+ ?; (* regex *)
This proposal is comprehensive, covering all useful unit systems, including SI, various imperial, customary mesaures, and some obscure measures, as well as clinically specific additions. Metric prefixes, meaning-changing textual suffixes (e.g. "[Hg]" in "mm[Hg]") and non-meaning-changing annotations (e.g. "kg {total}") are recognised. With this syntax, units can be simply expressed in strings such as:
"kg/m^2", "m.s^-1", "km/h", "mm[Hg]"
and so on.