Creating and Maintaining Measurement Ranges
Upon creating a CarePlan for a particular Patient (see Creating Care Plans), the CarePlan’s ServiceRequest resources inherit a copy of any measurement ranges defined in the PlanDefinition’s ActivityDefinition resources, see Managing Telemedicine Packages | Defining measurement ranges. It is expected that a Practitioner performs or considers Patient-specific adjustment of the measurement ranges in ServiceRequest resources beyond this point, possibly continuously going forward.
Please refer to the description of measurement ranges for details on how to define adjacent and possibly (but not typically) overlapping measurement ranges.
The following describes how to set up a measurement range on a single ServiceRequest. In case the CarePlan contains multiple ServiceRequest for the same activity code, copying changes to measurement ranges can be relevant. Multiple ServiceRequest in the same CarePlan or sub-CarePlan can refer to the same ActivityDefinition (through ServiceRequest.definition
) and/or each refer to an individual ActivityDefinition with the same ActivityDefinition.code
.
It is likely to be expected from a Telemedicine Solution used by an employee that it addresses copying of changes in measurement ranges to other ServiceRequest in the same CarePlan/sub-Careplan having the same activity code. As copying is not always the desired effect, prompting of user when to do that should be considered.
Preparing Details for Setting Measurement Ranges
In the descriptions below, measurement ranges can be expressed in the same measurement unit (system
, code
, and displayable unit
) as the measurement would be submitted with. The proper measurement unit in this case can be determined using the approach outlined in Interactions with the Terminology Service | Determining the proper code, system and unit for Quantity.
If the used measurement unit in existing measurement ranges expressed in the same measurement unit differs from what can be determined with the approach referenced above, the measurement unit of existing measurement ranges should be used. There is little sense in expressing, say, an absolute red alarm type (see below) measurement range in multiple measurement units.
Setting up Absolute Measurement Ranges
An absolute measurement range is set up by adding an ehealth-referenceRange structure to ServiceRequest.ehealth-referenceRange
where:
ehealth-referenceRange.type
is a Coding with:system
:http://ehealth.sundhed.dk/cs/reference-range-type
code
:RAL
orGAL
, for red alarm absolute measurement range and yellow alarm absolute measurement range, respectively.
ehealth-referenceRange.low
and/or.high
is a:a SimpleQuantity where:
value
: the integer or decimal value for the low/high boundaryunit
:<same unit as measured value is expressed with>
system
:<same system as measured value is expressed with>
code
:<same code as measured value is expressed with>
Setting up Component-based Measurement Ranges
For component-based measurements (e.g. systolic/diastolic blood pressure) it is necessary to specify which component a reference range belongs to. This is done by adding an additional Coding to ehealth-referenceRange.type
from https://ehealth.sundhed.dk/fhir/ValueSet-ehealth-observation-codes.html
Setting up Relative Measurement Ranges and a Reference Base
A relative measurement range is set up by adding an ehealth-referenceRange structure to ServiceRequest.ehealth-referenceRange
where:
ehealth-referenceRange.type
is a Coding with:system
:http://ehealth.sundhed.dk/cs/reference-range-type
code
:RELRAL
orRELGAL
, for red alarm relative measurement range and yellow alarm relative measurement range, respectively.
ehealth-referenceRange.low
and/or.high
is either of:a SimpleQuantity for a percentage change (stated as percent point change to measurement already expressed in percent) compared to the reference base where:
value
: the integer or decimal value for the low/high boundaryunit
:percent point
system
:http://ehealth.sundhed.dk/cs/ehealth-unit-code
code
:percentpoint
a SimpleQuantity for a percentage change (stated as percent change to measurement not already expressed in percent) compared to the reference base where:
value
: the integer or decimal value for the low/high boundaryunit
:percent
system
:http://unitsofmeasure.org
code
:%
a SimpleQuantity for a relative change compared to the reference base where:
value
: the integer or decimal value for the low/high boundaryunit
:<same unit as measured value is expressed with>
system
:<same system as measured value is expressed with>
code
:<same code as measured value is expressed with>
To add a designated reference base, create a FHIR Goal resource with:
status
:accepted
description
: A Coding with:code
:reference-value
system
:http://ehealth.sundhed.dk/cs/goal-description
subject
: Reference to PatientstartDate
: A datetime representing the starting point at which this reference base is applicable.target.measure
: Coding (the same ascode
in the ServiceRequest as the relative measurement range is defined in)target.detailQuantity
: A Quantity containing the reference base valueaddresses
: Reference to ServiceRequest (the same ServiceRequest as the relative measurement range is defined in)addresses
: Reference to the Observation from which the value intarget.detailQuantity
has been copied (if that is the case)
A reference to the Goal shall then be added to the CarePlan (same CarePlan that references the ServiceRequest) to:
CarePlan.goal
Over time, the relative measurement ranges can change and new Goal resources can be created and added to the CarePlan.
Expressing Exclusiveness of Measurement Range Boundaries
The Common workplace UI solution supports inclusive (>=, <=) and exclusive (<, >) range even though the underlying FHIR model only supports inclusive representation.
The exclusive ranges are handled by having seven decimals in the FHIR model. This is done by adding or subtracting 0,0000001 depending on <, > and sign (+, -).
As a result, the UI solutions must implement logic for transforming in both directions (read and write).
Algorithm
Read scenario:
If upper bound
and a positive number then add 0,0000001 if the seventh decimal is 9. Comparator type is < less than.
and a negative number then add 0,0000001 if the seventh decimal is 1. Comparator type is < less than.
if not matching the above scenarios then use the original value. Comparator type is <= less than Or Equal.
if lower bound
and a positive number then subtract 0,0000001 if the seventh decimal is 1. Comparator type is > larger than.
and a negative number then subtract 0,0000001 if the seventh decimal is 9. Comparator type is > larger than.
if not matching the above scenarios then use the original value. Comparator type is >= larger than Or Equal.
Write scenario:
if the comparator type is < less than, then subtract 0,0000001.
if the comparator type is > larger than, then add 0,0000001.