Stream: fhirpath
Topic: Measure to MeasureReport
Grey Faulkenberry (Sep 16 2021 at 16:54):
I'm trying to use a FHIRPath expression in a Measure to produce something more than just a calculation in a MeasureReport. How much of this is possible within the FHIR spec itself? For example:
"item.item.where(linkId.contains('/attention')).answer.valueCoding.extension.value.aggregate($this + $total, 0).iif($this >= 7, $this.toString() + ';high;Impairment', $this.toString() + ';low')"
This is just what I'm working with for now. So I have my QuestionnaireResponse, I evaluate it using the above expression, I should get something like
['9;high;Impairment']
I then have pre-defined rules on what to do with that response, and it creates part of a MeasureReport that looks kind of like this:
{
"stratum": [
{
"value": { "text": "Attention" },
"component": [
{
"code": {
"coding": [{ "code": "Impairment", "display": "Impairment" }]
},
"value": {
"coding": [
{
"system": "mayjuun.com/fhir/ValueSet/low_medium_high_risk",
"code": "high-risk",
"display": "high risk"
}
]
}
}
],
"measureScore": { "value": "9" }
}
]
}
But that whole pre-defined rules section isn't represented anywhere in FHIR. Is there a way to do something similar to what I'm trying to do?
Bryn Rhodes (Sep 17 2021 at 13:43):
Hi @Grey Faulkenberry , I'm not sure I understand the question? What do you mean by "pre-defined rules"? It looks like you are trying to do stratification of the results by risk level, is that right?
Grey Faulkenberry (Sep 17 2021 at 13:45):
Yes, exactly. But I'm also trying to pass in specific text along with it. Currently the results is a semi-colon delimited string, of the format:
score;risk-level;Any other text you want to display with the result
Grey Faulkenberry (Sep 17 2021 at 13:46):
For instance
22;low;22 still seems like a pretty high score to be considered low-risk
Grey Faulkenberry (Sep 17 2021 at 13:47):
I was trying to figure out if there was a way in FHIR, to specify that that string should be divided up to produce the stratum in a MeasureReport as above
Grey Faulkenberry (Sep 17 2021 at 13:48):
(also, to make sure that the stratum as I've displayed it makes sense)
Bryn Rhodes (Sep 17 2021 at 14:29):
You can use components to specify the stratifier, though I'm not 100% sure that's what you're after. I thought I was following until the bit about "Any other text you want to display". Would that text be expected to be different per score/risk-level combination?
Grey Faulkenberry (Sep 17 2021 at 17:30):
@Bryn Rhodes , yeah, I'm not explaining it very well.
Each stratum will have a score, so the measureScore is just a number, that's straight forward.
Each stratum will also have a low, medium, or high risk associated with it.
However, there will be other text associated that will differ depending on what score it is. So for one score that text may be "Impairment", another one may have text that says "More discussion is needed", and another says "Needs immediate Attention".
For end-user display purposes, my plan is to create a MeasureReport display with a different line for each stratum. The line will have the title (stratum.value.text), the score (stratum.measureScore.value), and then some display text that differs (stratum.component.code.coding[0].display). And they would be different colors based on the low, medium or high risk.
So to the end user they might see...
Attention: Score 3: No follow-up needed // green color
Hyperactivity: Score 25: Needs further assessment //red color
Overall Health: Score 15: Generally healthy but needs some followup //yellow color
Last updated: Apr 12 2022 at 19:14 UTC