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 8 Next »

Library Resources for Automated Processing-type Rules

The Library resources described in this section are either production-ready or slated for production (requiring approval for production use).

The Fallback Library and Rule

The Fallback Library contains a rule that ensures creation of a Task that draws attention to a measurement needing evaluation. It is intended for implicit use in case no other automated processing type Library has been set up for a given ProcedureRequest through its ActivityDefinition.

The Library has:

  • .type set to automated-processing

  • .parameter

    • .use set to in for input

    • .type set to Observation

The Library rule sets up instructions that causes production of a:

  • a Task with:

    • .category set to MeasurementForAssessment (a Coding signifying a measurement should be assessed/evaluated)

    • .priority set to routine

    • .description set to “Måling til vurdering” which is Danish for measurement to be assessed

    • further elements set as described in Output from automated processing

The Null Library and Rule

The Null Library contains a rule that causes no creation of Task, ClinicalImpression or Communication. It is intended for explicit use in cases where no Task, ClinicalImpression nor Communication is desired as a result of performing automated processing. It will not override other automated-processing type Library associated with an ActivityDefinition and is therefore expected to be used as the sole Library associated.

Example use: The Null Library can be associated with an ActivityDefinition specifying answering of Questionnaire intended for assessing some quality of a measurement (specified in a different ActivityDefinition). When answered, the QuestionnaireResponse is intended to be subjected to a logic-library type Library which determines a quality code based on the answers. Even when/if submitted, Practitioners might have little interest in the QuestionnaireResponse and in order not to get Task, ClinicalImpression nor Communication about it, this can be planned ahead and avoided by associating the Null Library.

The Library has:

  • .type set to automated-processing

  • .parameter

    • .use set to in for input

    • .type set to Resource

Assessment of absolute Reference Ranges Library and Rule

This Library contains a rule that performs assessment of Observations based on absolute reference ranges. The rule will be automatically activated for submitted Observations where the Library is referenced from the ActivityDefinition.

The Library has:

  • .type set to automated-processing

  • .parameter

    • .use set to in for input

    • .type set to Observation

The Library rule sets up instructions that causes production of:

  • A ClinicalImpresssion:

    • .finding for each .component in the observation (e.g. systolic and diastolic blood pressure) or a single finding if the observation does not contain components.

      • Each finding will have one of the following alert levels:

        • http://snomed.info/sct, 442082004, fund ved måling inden for referenceinterval

        • http://snomed.info/sct, 442096005, fund ved måling uden for referenceinterval

      • If the finding is for a component, then it will contain an observation code identifying the component (e.g. systolic blood pressure)

    • A Task related to the ClinicalImpression with priority based on the highest alert level found:

      • asap if any values are found in “red alert” reference ranges

      • urgent if any values are found in “yellow alert” reference ranges

      • routine if no red or yellow alerts are found

The rule will only process absolute reference ranges: System: urn:oid:1.2.208.184.100.1 code: RAL/GAL. Relative reference ranges are handled by another rule. If no absolute reference ranges are found then the rule will result in a single Task asking the clinician to assess the observation.

If an observation contains components, it is assumed that all values are contained in components.

The rule accepts observation values and reference ranges without units. However if both have a unit specified then they must match.

Assessment of relative Reference Ranges Library and Rule

This Library is similar to the Absolute Reference Range library (see above). Input and output are identical. The difference is the the type of reference ranges that the library handles.

The rule will only process relative reference ranges: System: http://ehealth.sundhed.dk/cs/reference-range-type code: RELRAL/RELGAL.

Absolute and relative reference range libraries can co-exist and can both process the same Observation. They will each handle the appropriate type of reference ranges associated with the Observation.

A relative reference range does not consist of an absolute range like 90-110kg but instead a range relative to a reference value speficied in a Goal. For example 100kg +/- 10kg or 100kg +/-10%

Library Resources for Calculation-type Rules

The Library resources described in this section are either production-ready or slated for production (requiring approval for production use).

Library for Calculating Quality of Height Observation for Use in BMI Calculation

The Library for calculating the quality of a height observation can be used to evaluate a height observation for intended use in a Body Mass Index (BMI) calculation. The older a height observation is, the less likely that it is still applicable and reflecting the current height. When evaluated to be too old (with code Low, see below), a client such as a citizen solution may request a fresh height measurement from the patient and use that in the BMI calculation.

The Library has:

  • .type set to logic-library

  • .parameter[0]

    • .use set to out for output

    • .type set to Coding

  • .parameter[1]

    • .use set to in for input

    • .type set to Observation

  • .parameter[2]

    • .use set to in for input

    • .type set to ProcedureRequest

The input Observation must have

It is not necessary to provide the ProcedureRequest as input. The Libary$evaluate operation will retrieve it by resolving the basedOn reference in the Observation.

Output will be a code from the http://hl7.org/fhir/v3/ObservationInterpretation CodeSystem:

Output Coding

Evaluation

code=IND, system=http://hl7.org/fhir/v3/ObservationInterpretation, display=Indeterminate

The referenced ProcedureRequest does not contain ehealth-reuseCriteria specifying a max age of the height Observation. This max age, although stated for reuse, is used for the height Observation use in an BMI calculation also.

code=N, system=http://hl7.org/fhir/v3/ObservationInterpretation, display=Normal

The height Observation has not exceeded the max age specified in ehealth-reuseCriteria in the referenced ProcedureRequest.

code=L, system=http://hl7.org/fhir/v3/ObservationInterpretation, display=Low

The height Observation has exceeded the max age specified in ehealth-reuseCriteria in the referenced ProcedureRequest.

Library for Calculating Body Mass Index

The Library for calculating the Body Mass Index (BMI) is intended for providing a value to be submitted as a BMI Observation as specified in an ActivityDefinition and possibly associated with reference ranges. Given an Observation of height and an Observation of weight as parameters, the evaluate operation returns a Quantity which can be set as the BMI Observation’s Observation.valueQuantity.

The Library has:

  • .type set to logic-library

  • .parameter[0]

    • .use set to out for output

    • .type set to Quantity

  • .parameter[1]

    • .use set to in for input

    • .type set to Observation

  • .parameter[2]

    • .use set to in for input

    • .type set to ProcedureRequest

The library expects two observations as input:

It is not necessary to provide the ProcedureRequest as input. The Libary$evaluate operation will retrieve it by resolving the basedOn reference in the weight Observation.

Output is a Quantity containing the calculated BMI:

Library for Calculating CAT-score (COPD Assessment Test)

The Library for calculating the CAT-score is intended for providing a value to be submitted as a CAT-score Observation as specified in an ActivityDefinition and possibly associated with reference ranges. Given a QuestionnaireResponse for the COPD Assessment test as input parameter, the evaluate operation returns a Quantity which can be set as the CAT-score Observation’s Observation.valueQuantity.

The Library has:

  • .type set to logic-library

  • .parameter[0]

    • .use set to out for output

    • .type set to Quantity

  • .parameter[1]

    • .use set to in for input

    • .type set to QuestionnaireResponse

  • .parameter[2]

    • .use set to in for input

    • .type set to Questionnaire

The library expects a QuestionnaireRespone as input:

  • The QuestionnaireResponse must reference a Questionnaire containing all 8 questions that are part of the COPD Assessment Test

  • The QuestionnaireResponse must contain valid answers for all 8 questions that are part of the COPD Assessment Test

It is not necessary to provide the Questionnaire as input. The Libary$evaluate operation will retrieve it by resolving the questionnairereference in the QuestionnaireResponse.

Output is a Quantity containing the calculated CAT score:

Library for Calculating MRC-score (Medical Research Council score)

The Library for calculating the MRC-score is intended for providing a value to be submitted as a MRC-score Observation as specified in an ActivityDefinition and possibly associated with reference ranges. Given a QuestionnaireResponse for the MRC test as input parameter, the evaluate operation returns a Quantity which can be set as the MRC-score Observation’s Observation.valueQuantity.

The Library has:

  • .type set to logic-library

  • .parameter[0]

    • .use set to out for output

    • .type set to Quantity

  • .parameter[1]

    • .use set to in for input

    • .type set to QuestionnaireResponse

  • .parameter[2]

    • .use set to in for input

    • .type set to Questionnaire

The library expects a QuestionnaireRespone as input:

  • The QuestionnaireResponse must reference a Questionnaire containing the question that constitutes the MRC Test

  • The QuestionnaireResponse must contain a valid answer for the question that constitutes the MRC Test

It is not necessary to provide the Questionnaire as input. The Libary$evaluate operation will retrieve it by resolving the questionnairereference in the QuestionnaireResponse.

Output is a Quantity containing the calculated MRC-score:

  • No labels