Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 10 Next »

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 https://ehealth-dk.atlassian.net/wiki/spaces/EDTW/pages/1696137281/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 of 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 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 https://ehealth-dk.atlassian.net/wiki/spaces/EDTW/pages/2235432961/Interactions+with+the+Terminology+Service#Determining-the-proper-code%2C-system-and-unit-for-Quantity.

If the used measurement unit in existing measurement ranges expressed in the same measurement unit differ 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 a 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 or GAL, 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 boundary

      • unit: <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 Relative Measurement Ranges and a Reference Base

A relative measurement range is set up by adding a 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 or RELGAL, 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 boundary

      • unit: 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 boundary

      • unit: 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 boundary

      • unit: <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>

A relative measurement range states a change relative to some reference base. This way, a measured value can be compared to a reference base taking the relative measurement range into account.

There are several ways to find a reference base:

  • searching for a prior, measured value, say, the highest/lowest/most recent/oldest value in some given period of time

  • a derivate, say, an average of measured values in some given period of time

  • a designated value, either copied from and/or referencing a measured value

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 Patient

  • startDate: A datetime representing the starting point at which this reference base is applicable

  • target.measure: Coding (the same as code in the ServiceRequest as the relative measurement range is defined in)

  • target.detailQuantity: A Quantity containing the reference base value

  • addresses: Reference to ServiceRequest (the same ServiceRequest as the relative measurement range is defined in)

  • addresses: Reference to the Observation from which the value in target.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.

Example use of relative measurement range stated in percent point.

A measurement of oxygen saturation is submitted as an Observation where the Observation.valueQuantity is a Quantity with:

  • value: 88

  • unit: percent

  • system: http://unitsofmeasure.org

  • code: %

A red alarm relative measurement range given as zero to -5 percent point is stated as:

  • ehealth-referenceRange.type is a Coding with:

    • system: http://ehealth.sundhed.dk/cs/reference-range-type

    • code: RELRAL for red alarm relative measurement range type

  • ehealth-referenceRange.low is a SimpleQuantity with:

    • value: -5.0

    • unit: percent point

    • system: http://ehealth.sundhed.dk/cs/ehealth-unit-code

    • code: percentpoint

  • ehealth-referenceRange.high is a SimpleQuantity with:

    • value: -2.0

    • unit: percent point

    • system: http://ehealth.sundhed.dk/cs/ehealth-unit-code

    • code: percentpoint

A reference base could be defined as a Goal where Goal.target.detailQuantity is a Quantity with:

  • value: 92

  • unit: percent

  • system: http://unitsofmeasure.org

  • code: %

Because the measured value 88% is within a range of [-5; -2] percent point relative to the reference base value 92%, this would constitute a value which lies within the red alarm relative measurement range.

If the designated reference base was instead 95%, the measured value of 88% would not be within the red alarm relative measurement range.

Expressing Exclusiveness of Measurement Range Boundaries

The Common workplace UI solution supports inclusive (>=, <=) and exclusive (<, >) ranges 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).

The FHIR model only supports inclusive representation. To support exclusive it has been decided to use the seventh decimal for determining exclusiveness. Precision is supported up to 6 decimals as the seventh is used for comparator logic.

It is recommended for UI solutions to implement the same solution for consistency.

Algorithm

Read scenario:

  • If upper bound

    • and a positive number then add 0,0000001 if seventh decimal is 9. Comparator type is < less than.

    • and a negative number then add 0,0000001 if seventh decimal is 1. Comparator type is < less than.

    • if not matching above scenarios then use original value. Comparator type is <= less than Or Equal.

  • if lower bound

    • and a positive number then subtract 0,0000001 if seventh decimal is 1. Comparator type is > larger than.

    • and a negative number then subtract 0,0000001 if seventh decimal is 9. Comparator type is > larger than.

    • if not matching above scenarios then use original value. Comparator type is >= larger than Or Equal.

Write scenario:

  • if comparator type is < less than, then subtract 0,0000001.

  • if comparator type is > larger than, then add 0,0000001.

Algorithm example 1: Positive range

Range UI: > 1,4578 to < 2,7858

Write range:

lower bound: 1,4578 + 0,0000001 = 1,4578001 (when comparator type is > larger than, then add 0,0000001)

Upper bound: 2,7858 - 0,0000001 = 2,7857999 (when comparator type is < less than, then subtract 0,0000001)

Read range from FHIR:

lower bound: 1,4578001 - 0,0000001 = 1,4578 and comparator type > larger than. (When lower bound and a positive number then substract 0,0000001 if seventh decimal is 1)

Upper bound: 2,7857999 + 0,0000001 = 2,7858 and comparator type < less than. (When upper bound and a positive number then add 0,0000001 if seventh decimal is 9)

Algorithm example 2: Positive range

Range UI: >= 1,4578 to <= 2,7858

Write range:

lower bound: 1,4578 (when comparator type is not < less or > larger than, then use value as is)

Upper bound: 2,7858 (when comparator type is not < less or > larger than, then use value as is)

Read range from FHIR:

lower bound: 1,4578 and comparator type >= equal or larger than. (when not matching the two first scenarios for lower bound then use original value)

Upper bound: 2,7858 and comparator type <= equal or less than. (when not matching the two first scenarios for upper bound then use original value)

Algorithm example 3: Negative range

Range UI: > -7,4365 to < -3,4520

Write range:

lower bound: -7,4365 + 0,0000001 = -7,4364999 (when comparator type is > larger than, then add 0,0000001)

Upper bound: -3,4520 - 0,0000001 = -3,4520001 (when comparator type is < less than, then subtract 0,0000001)

Read range from FHIR:

lower bound: -7,4364999 - 0,0000001 = -7,4365 (When lower bound and a negative number then substract 0,0000001 if seventh decimal is 9)

Upper bound: -3,4520001 + 0,0000001 = -3,4520 (When upper bound and a negative number then add 0,0000001 if seventh decimal is 1)

  • No labels