Library Resources
- 1 Library Resources for Automated Processing-type Rules
- 1.1 The Fallback Library and Rule
- 1.2 The Null Library and Rule
- 1.3 Assessment of Absolute Reference Ranges Library and Rule
- 1.4 Assessment of Relative Reference Ranges Library and Rule
- 1.5 Library for Assessment of Questionnaire Response
- 1.6 Assessment of TeleCare Nord COPD Questionnaire
- 1.7 Library for Fact Finding Demonstration
- 2 Library Resources for Calculation-type Rules
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 ServiceRequest through its ActivityDefinition.
The Library has:
.typeset toautomated-processing.parameter.useset toinfor input.typeset toObservation
The Library rule sets up instructions that causes production of a:
a Task with:
.categoryset toMeasurementForAssessment(a Coding signifying a measurement should be assessed/evaluated).priorityset toroutine.descriptionset to “Måling til vurdering” which is Danish for measurement to be assessedfurther 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:
.typeset toautomated-processing.parameter.useset toinfor input.typeset toResource
Assessment of Absolute Reference Ranges Library and Rule
This Library contains a generic rule that performs assessment of an Observation based on absolute reference range(s) automatically copied from a ServiceRequest referencing an ActivityDefinition that references the Library. The rule in this Library is automatically performed as a reaction to submitting of the Observation. This Library can be referenced from an ActivityDefinition along with other Library, even the Relative Reference Ranges Library described below.
The Library has:
.typeset toautomated-processing.parameter.useset toinfor input.typeset toObservation
The Library rule sets up instructions that causes production of:
A ClinicalImpresssion:
.findingfor each.componentin the observation (e.g. systolic and diastolic blood pressure) or a single finding if the observation does not contain components.Each finding for observation will have one of the following alert levels:
http://snomed.info/sct, 442082004, fund ved måling inden for referenceinterval (green)
http://snomed.info/sct, 442096005, fund ved måling uden for referenceinterval (red, yellow)
If the finding is for a component, then it will contain an observation code identifying the component (e.g. systolic blood pressure).
.findingfor the overall assessment which is eithergreen,yelloworredbased on the worst severity from components or a single observation, seegreen,yellowandredin .https://ehealth.sundhed.dk/fhir/ValueSet-ehealth-clinicalimpression-finding-codes.html .A Task related to the ClinicalImpression with
prioritybased on the highest alert level found:asapif any values are found in “red alert” reference rangesurgentif any values are found in “yellow alert” reference ranges (and no “red alert” found)routineif no red or yellow alerts are found
The rule processes absolute reference ranges only, that is, Observation.referenceRange.type where the Coding has:
system:urn:oid:1.2.208.184.100.1code:RALorGAL, for red alarm absolute reference range and yellow alarm absolute reference range, respectively.
If no absolute reference range is found, the rule causes creation of 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, they must match.
Error handling for different situations which result in the rule setting up instructions for creation of one or two Task:
Situation | Generic Task | Possible Specific Task (Stating what was wrong) |
|---|---|---|
No absolute reference range found | Task (Stating that measurement needs manual assessment):
| No additional task. |
Unit mismatch between reference range and observation value | Task (Stating that measurement needs manual assessment as auto processing failed):
| Task:
|
Missing observation value | Task (Stating that measurement needs manual assessment as auto processing failed):
| Task:
|
Assessment of Relative Reference Ranges Library and Rule
This Library is similar to the Absolute Reference Range library (see above) in some aspects: Input and output are identical. The difference is the the type of reference ranges that the rule handles. Absolute and relative reference range libraries can co-exist and can both process the same Observation. They will each handle their corresponding type of reference ranges associated with the Observation.
The rule processes relative reference ranges only, that is, Observation.referenceRange.type where the Coding has:
system:http://ehealth.sundhed.dk/cs/reference-range-typecode:RELRALorRELGAL, for red alarm relative reference range and yellow alarm relative reference range, respectively.
A vital difference from the rule in the Absolute Reference Range Library is that Relative Reference Range Library rule must have a reference base to compare against.
A relative reference range can be stated:
in same unit as the Observation
as a percentage or, in case the Observation is already expressed with unit percentage (as is the case for oxygen saturation, for instance), as a percentage point.
Example relative reference range as -5 percentage point with reference base 90% for oxygen saturation measurement
The oxygen saturation measurement unit is expressed as percent (system=http://unitsofmeasure.org, code=%), the reference base likewise and in this case with a value of 90.
A red alarm relative reference range given as -5 percentage point would be given by a SimpleQuantity for the reference range’s low element with:
value=-5unit=percentage pointsystem=http://ehealth.sundhed.dk/cs/ehealth-unit-codecode=percentagepoint
Thus, the rule would treat an Observation with value 85% as a red alarm case for this relative reference range and current choice of reference base with value 90%.
The rule handles different situations which result in the rule setting up instructions for creation of one or two Task:
Situation | Generic Task | Possible Specific Task (Stating what was wrong) |
|---|---|---|
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 in relation to any answer significances defined in the corresponding Questionnaire.
During processing of the rule, each answer significance defined in the Questionnaire (see https://ehealth.sundhed.dk/fhir/StructureDefinition-ehealth-questionnaire.html#answer-significance ) 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
asapIn 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
urgentOtherwise, the priority is set to
routine
The Library has:
.typeset toautomated-processing.parameter.useset toinfor input.typeset toQuestionnaireResponse
.parameter.useset toinfor input.typeset toQuestionnaire
.parameter.useset toinfor input.typeset toServiceRequest
The Library rule sets up instructions that causes production of:
A ClinicalImpresssion:
.findingas follows:If the triggered red set is not empty, a
finding.itemwith a Coding:system=http://ehealth.sundhed.dk/cs/clinicalimpression-finding-codescode=reddisplay=Red overall assessment
If the triggered yellow set is not empty, a
finding.itemwith a Coding:system=http://ehealth.sundhed.dk/cs/clinicalimpression-finding-codescode=yellowdisplay=yellow overall assessment
If both triggered sets are empty, a
finding.itemwith a Coding:system=http://ehealth.sundhed.dk/cs/clinicalimpression-finding-codescode=greendisplay=Green overall assessment
If the Questionnaire does contain answer significance definitions but none have been triggered, a
finding.itemwith a Coding:system=http://ehealth.sundhed.dk/cs/clinicalimpression-finding-codescode=no-effective-answer-significancedisplay=Ingen triageringsindikator for spørgsmål/svar-kombination har fundet anvendelse
If the Questionnaire does not contain answer significance definitions, a
finding.itemwith a Coding:system=http://ehealth.sundhed.dk/cs/clinicalimpression-finding-codescode=no-answer-significance-defineddisplay=Ingen triageringsindikator defineret i spørgeskemaet
list of
.ehealth-questionnaireresponse-finding-basisfor each basis for the overall ClinicalImpression as follows:linkIdset to linkId for the Questionnaire item/QuestionnaireResponse item pair which triggered the finding basisvalueset to value of the answer which triggered the finding basisfindingset togreen-question-answer,yellow-question-answerorred-question-answerfromhttp://ehealth.sundhed.dk/vs/clinicalimpression-finding-codesbased onsignifianceon triggeredehealth-questionnaire-answerSignificanceehealth-questionnaire-answerSignificanceis the triggeredanswerSignificancewhich is gathered from Questionnaire item
A Task related to the ClinicalImpression with:
priorityset to the priority value determined above.
A difference between the finding in finding.item.code and the finding basis in ehealth-questionnaire-finding-basis is that the former is a conclusion or summary while the latter provides the details that led to the conclusion. In ehealth-questionnaire-finding-basis there may be multiple entries for the same question-answer pair and those entries may or may not have the same significance (color). That depends on the how the answer (or lack of answer) fits with answer significance definitions in the Questionnaire.
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
asapIn case the triggered red set is empty and the triggered yellow set contains at least one question/answer pair, the priority is set to
urgentOtherwise, the priority is set to
routine
The Library has:
.typeset toautomated-processing.parameter.useset toinfor input.typeset toQuestionnaireResponse
.parameter