Whist going through the docs I noticed that we needed an example of a Quantity with a ReferenceRange
message Quantity {
// For instance, NCIT subhierarchy, Unit of Measure (Code C25709), https://www.ebi.ac.uk/ols/ontologies/uo
OntologyClass unit_class = 1;
// the value of the quantity in the units e.g. 2.0 mg
double value = 2;
// Reference range for the quantity
// e.g. The normal range of platelets is 150,000 to 450,000 platelets/uL.
ReferenceRange reference_range = 3;
}
message ReferenceRange {
OntologyClass unit = 1;
double low = 2;
double high = 3;
}
Which is serialised to yaml like this
The following example shows a quantity for a platelet count per microliter, with a reference range.
.. code-block:: yaml
unit:
id: "UO:0000316"
label: "cells per microliter"
value: 300000.0
referenceRange:
unit:
id: "UO:0000316"
label: "cells per microliter"
low: 150000.0
high: 450000.0
From this it is clear that the unit is duplicated needlessly and it could be expressed like this:
This would mean making the ReferenceRange an inner class of Value so that it is no longer a completely independent entity or could simply become a Range (no unit).
Whist going through the docs I noticed that we needed an example of a Quantity with a ReferenceRange
Which is serialised to yaml like this
From this it is clear that the
unit
is duplicated needlessly and it could be expressed like this:This would mean making the
ReferenceRange
an inner class ofValue
so that it is no longer a completely independent entity or could simply become aRange
(no unit).