...
Situation | Handling by setting up instructions causing creation of Task | |
---|---|---|
Neither reference base nor relative reference range(s) found | Task:
| No additional task. |
No reference base found | Task:
| |
No relative reference range found | Task:
|
Library for Assessment of
...
Questionnaire Response
This Library contains a generic rule that performs assessment of a QuestionnaireResponse which answers the Questionnaire TeleCare Nord COPD Questionnaire.
The rule contains two sets of question/answer value pairs:
A red trigger set of question/answer pairs
A yellow trigger set of question/answer pairs
in relation to any answer significances defined in the corresponding Questionnaire.
During processing of the rule, all questions and answers in the each answer significance defined in the Questionnaire (see https://docs.ehealth.sundhed.dk/latest-released/ig/StructureDefinition-ehealth-questionnaire.html#answer-significance) on questions and their linked answers in the QuestionnaireResponse are traversed and checked whether each particular question/answer pair is defined as a red and yellow trigger, respectively. the condition(s) of the answer significance is met by the linked answer. When this is the case, the question/answer pair a finding basis is added to internal bookkeeping in . Ultimately, the form of a triggered red set and triggered yellow set, respectively. Ultimately, the triggered sets determine a priority as followslist of finding basis determines the created ClinicalImpression finding and the priority of the created task:
In case the triggered red set list of finding basis contains at least one red question/answer pair, the priority is set to
asap
In case the triggered red set is empty and the triggered yellow set list of finding basis contains at least one yellow question/answer pair and no red question/answer pair , the priority is set to
urgent
Otherwise, the priority is set to
routine
...
A ClinicalImpresssion:
.finding
as follows:If the triggered red set is not empty, a
finding.item
with a Coding:system
=http://ehealth.sundhed.dk/cs/clinicalimpression-finding-codes
code
=red-question-answer
display
=Rød spørgsmål/svar-kombination fundet i spørgeskemabesvarelse
If the triggered yellow set is not empty, a
finding.item
with a Coding:system
=http://ehealth.sundhed.dk/cs/clinicalimpression-finding-codes
code
=yellow-question-answer
display
=Gul spørgsmål/svar-kombination fundet i spørgeskemabesvarelse
If both triggered sets are empty, a
finding.item
with a Coding:system
=http://ehealth.sundhed.dk/cs/clinicalimpression-finding-codes
code
=green-question-answer
display
=Grøn spørgsmål/svar-kombination fundet i spørgeskemabesvarelse. Når anført som opsummering for hel spørgeskemabesvarelse er der ikke fundet røde eller gule spørgsmål/svar-kombinationer
A Task related to the ClinicalImpression with:
priority
set to the priority value determined above.
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 tologic-library
.parameter[0]
.use
set toout
for output.type
set toCoding
.parameter[1]
.use
set toin
for input.type
set toObservation
.parameter[2]
.use set to
in
for input.type
set toServiceRequest
The input Observation must have
.code
: Coding for height (code=NPU03794, system=urn:oid:1.2.208.176.2.1)effectiveDateTime
basedOn
referencing a ServiceRequest
It is not necessary to provide the ServiceRequest 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 ServiceRequest 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 ServiceRequest.
...
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 ServiceRequest.
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 tologic-library
.parameter[0]
.use set to out for output
.type set to Quantity
.parameter[1]
.use
set toin
for input.type
set toObservation
.parameter[2]
.use set to
in
for input.type
set toServiceRequest
The library expects two observations as input:
The first Observation must be a weight observation (code=NPU03804, system=urn:oid:1.2.208.176.2.1)
The second Observation must be height observation (code=NPU03794, system=urn:oid:1.2.208.176.2.1)
It is not necessary to provide the ServiceRequest 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:
.code=kg/m2
.system=http://unitsofmeasure.org
.unit=kg/m2
.value=the calculated score as decimal value
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 tologic-library
.parameter[0]
.use set to out for output
.type set to Quantity
.parameter[1]
.use
set toin
for input.type
set toQuestionnaireResponse
.parameter[2]
.use set to
in
for input.type
set toQuestionnaire
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 questionnaire
reference in the QuestionnaireResponse.
Output is a Quantity containing the calculated CAT score:
.code=Number
.system=http://unitsofmeasure.org
.unit=Number
.value=the calculated CAT-score as decimal value
Library for Calculating MRC-score (Medical Research Council score)
...
If the Questionnaire does contain answer significance definitions but none have been triggered, a
finding.item
with a Coding:system
=http://ehealth.sundhed.dk/cs/clinicalimpression-finding-codes
code
=no-effective-answer-significance
display
=Ingen triageringsindikator for spørgsmål/svar-kombination har fundet anvendelse
If the Questionnaire does not contain answer significance definitions, a
finding.item
with a Coding:system
=http://ehealth.sundhed.dk/cs/clinicalimpression-finding-codes
code
=no-answer-significance-defined
display
=Ingen triageringsindikator defineret i spørgeskemaet
list of
.ehealth-questionnaireresponse-finding-basis
for each basis for the overall ClinicalImpression as follows:test
A Task related to the ClinicalImpression with:
priority
set to the priority value determined above.
Assessment of TeleCare Nord COPD Questionnaire
This Library contains a rule that performs assessment of a QuestionnaireResponse which answers the Questionnaire TeleCare Nord COPD Questionnaire.
The rule contains two sets of question/answer value pairs:
A red trigger set of question/answer pairs
A yellow trigger set of question/answer pairs
During processing of the rule, all questions and answers in the QuestionnaireResponse are traversed and checked whether each particular question/answer pair is defined as a red and yellow trigger, respectively. When this is the case, the question/answer pair is added to internal bookkeeping in the form of a triggered red set and triggered yellow set, respectively. Ultimately, the triggered sets determine a priority as follows:
In case the triggered red set contains at least one question/answer pair, the priority is set to
asap
In case the triggered red set is empty and the triggered yellow set contains at least one question/answer pair, the priority is set to
urgent
Otherwise, the priority is set to
routine
The Library has:
.type
set toautomated-processing
.parameter
.use
set toin
for input.type
set toQuestionnaireResponse
.parameter
.use
set toin
for input.type
set toQuestionnaire
.parameter
.use
set toin
for input.type
set toServiceRequest
The Library rule sets up instructions that causes production of:
A ClinicalImpresssion:
.finding
as follows:If the triggered red set is not empty, a
finding.item
with a Coding:system
=http://ehealth.sundhed.dk/cs/clinicalimpression-finding-codes
code
=red-question-answer
display
=Rød spørgsmål/svar-kombination fundet i spørgeskemabesvarelse
If the triggered yellow set is not empty, a
finding.item
with a Coding:system
=http://ehealth.sundhed.dk/cs/clinicalimpression-finding-codes
code
=yellow-question-answer
display
=Gul spørgsmål/svar-kombination fundet i spørgeskemabesvarelse
If both triggered sets are empty, a
finding.item
with a Coding:system
=http://ehealth.sundhed.dk/cs/clinicalimpression-finding-codes
code
=green-question-answer
display
=Grøn spørgsmål/svar-kombination fundet i spørgeskemabesvarelse. Når anført som opsummering for hel spørgeskemabesvarelse er der ikke fundet røde eller gule spørgsmål/svar-kombinationer
A Task related to the ClinicalImpression with:
priority
set to the priority value determined above.
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 tologic-library
.parameter[0]
.use
set toout
for output.type
set toCoding
.parameter[1]
.use
set toin
for input.type
set toObservation
.parameter[2]
.use set to
in
for input.type
set toServiceRequest
The input Observation must have
.code
: Coding for height (code=NPU03794, system=urn:oid:1.2.208.176.2.1)effectiveDateTime
basedOn
referencing a ServiceRequest
It is not necessary to provide the ServiceRequest 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 ServiceRequest does not contain |
code=N, system=http://hl7.org/fhir/v3/ObservationInterpretation, display=Normal | The height Observation has not exceeded the max age specified in |
code=L, system=http://hl7.org/fhir/v3/ObservationInterpretation, display=Low | The height Observation has exceeded the max age specified in |
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 MRC-score BMI Observation as specified in an ActivityDefinition and possibly associated with reference ranges. Given a QuestionnaireResponse for the MRC test as input parameteran Observation of height and an Observation of weight as parameters, the evaluate
operation returns a Quantity which can be set as the MRC-score BMI Observation’s Observation.valueQuantity
.
...
.type
set tologic-library
.parameter[0]
.use set to out for output
.type set to Quantity
.parameter[1]
.use
set toin
for input.type
set toQuestionnaireResponse
Observation
.parameter[2]
.use set to
in
for input.type
set toQuestionnaire
ServiceRequest
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 questionnaire
reference in the QuestionnaireResponse.
Output is a Quantity containing the calculated MRC-score:
.code=Number
.system=http://unitsofmeasure.org
.unit=Number
.value=the calculated MRC-score as decimal value
Library for Assessment of Questionnaire Response
This Library contains a generic rule that performs assessment of a QuestionnaireResponse in relation to answer significances defined on Questionnaires.
During processing of the rule, all answer significances on questions and their linked answers in the QuestionnaireResponse are traversed and checked whether the condition(s) of the answer significance is met by the linked answer. When this is the case, a finding basis is added to internal bookkeeping. Ultimately, the list of finding basis determines the created ClinicalImpression finding and the priority of the created task:
...
In case the list of finding basis contains at least one red question/answer pair, the priority is set to asap
...
In case the list of finding basis contains at least one yellow question/answer pair and no red question/answer pair , the priority is set to urgent
...
two observations as input:
The first Observation must be a weight observation (code=NPU03804, system=urn:oid:1.2.208.176.2.1)
The second Observation must be height observation (code=NPU03794, system=urn:oid:1.2.208.176.2.1)
It is not necessary to provide the ServiceRequest 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:
.code=kg/m2
.system=http://unitsofmeasure.org
.unit=kg/m2
.value=the calculated score as decimal value
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 toautomatedlogic-processinglibrary
.parameter[0]
.use set to
in
out for
inputoutput
.type set to
QuestionnaireResponse
Quantity
.parameter[1]
.use
set toin
for input.type
set toQuestionnaire
QuestionnaireResponse
.parameter[2]
A ClinicalImpresssion:
.use set to
in
for input
.finding
as follows:If the triggered red set is not empty, a
finding.item
with a Coding:system
=http://ehealth.sundhed.dk/cs/clinicalimpression-finding-codes
code
=red-question-answer
display
=Rød spørgsmål/svar-kombination fundet i spørgeskemabesvarelse
If the triggered yellow set is not empty, a
finding.item
with a Coding:.type
set toServiceRequest
The Library rule sets up instructions that causes production of:
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 questionnaire
reference in the QuestionnaireResponse.
Output is a Quantity containing the calculated CAT score:
.code=Number
.system=http://
ehealthsundhed.dk/cs/clinicalimpression-finding-codescode
=yellow-question-answer
display
=Gul spørgsmål/svar-kombination fundet i spørgeskemabesvarelse
If both triggered sets are empty, a
finding.item
with a Coding:system
=http://ehealth.sundhed.dk/cs/clinicalimpression-finding-codes
code
=green-question-answer
display
=Grøn spørgsmål/svar-kombination fundet i spørgeskemabesvarelse
If both triggered sets are empty, a
finding.item
with a Coding:system
=http://ehealth.sundhed.dk/cs/clinicalimpression-finding-codes
code
=no-effective-answer-significance
display
=Ingen triageringsindikator for spørgsmål/svar-kombination har fundet anvendelse
If both triggered sets are empty, a
finding.item
with a Coding:system
=http://ehealth.sundhed.dk/cs/clinicalimpression-finding-codes
code
=no-answer-significance-defined
display
=Ingen triageringsindikator defineret i spørgeskemaet
list of
.ehealth-questionnaireresponse-finding-basis
for each basis for the overall ClinicalImpression as follows:test
.unit=Number
.value=the calculated CAT-score as decimal value
A Task related to the ClinicalImpression with:
priority
set to the priority value determined above.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 tologic-library
.parameter[0]
.use set to out for output
.type set to Quantity
.parameter[1]
.use
set toin
for input.type
set toQuestionnaireResponse
.parameter[2]
.use set to
in
for input.type
set toQuestionnaire
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 questionnaire
reference in the QuestionnaireResponse.
Output is a Quantity containing the calculated MRC-score:
.code=Number
.system=http://unitsofmeasure.org
.unit=Number
.value=the calculated MRC-score as decimal value