Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ratio second IP missing episode based results and population referencing second IP has incorrect result #149

Closed
nmorasb opened this issue Oct 12, 2022 · 6 comments · Fixed by #160
Labels
bug Something isn't working calculation results Issues related to population results calculation

Comments

@nmorasb
Copy link

nmorasb commented Oct 12, 2022

For a non-boolean Ratio measure with two IPs, regardless of whether the criteriaExpression is the same or different for the second IP, we are not seeing the expected results in the episode results output.

In the CQL we define two ipps, both with the same condition.

define "ipp":
  ["Encounter"] E where E.period.start during "Measurement Period"
  
define "ipp2":
  ["Encounter"] E where E.period.start during "Measurement Period"
  
define "denom":
  "ipp"
  
define "num":
  "ipp2"

Expected behavior on execution:

  • second initial population would have a result of true for each episode
  • because ipp2 result was false, and num depends on ipp2, num result should be false
  • both IPs should appear in group populationResults

Actual behavior:

  • second initial population (criteriaExpression ipp2) has a result of false
  • num has a result of true
  • only a single IP appears in group populationResults

Group level population results:
image

Population results for one of the episodes:
image

Please see the attached test case json and measure bundle for reference.
ratio-bundle.zip

@mgramigna
Copy link
Contributor

As discussed, we will update fqm-execution to handle this, with the following assumptions:

  • If there are two IPs that have the same populationBasis (e.g. Encounter), then it will be fine to just define the populationBasis at the group level only, without worrying about overrides
  • If the two IPs differ in populationBasis (e.g. one is Encounter, one is Procedure), then the measure must specify each populationBasis at the individual population level, and this will override whatever is specified at either the group or the Measure level.

@p9g
Copy link

p9g commented Nov 3, 2022

Should Measure.meta.profile have http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/ratio-measure-cqfm ?

ratio-bundle.zip is missing some things from Measure, such as

http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-aggregateMethod extension.

For comparison see http://build.fhir.org/ig/HL7/cqf-measures/Measure-measure-ratio-exm.json where the population[3] and [4] have the http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-criteriaReference and code is http://terminology.hl7.org/CodeSystem/measure-population#measure-observation and criteria.expression point to a CQL function.

You talk about expected result of true (which would be for patient-based boolean measure, but your CQL definitions return a list of Encounters which is consistent with your initial description of a non-boolean ratio measure.

@nmorasb
Copy link
Author

nmorasb commented Nov 3, 2022

We aren't setting the scoring at the measure level, but instead at the group level.
If you see the the first group in the array, it has the extension for http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-scoring set to Ratio.

It is my understanding that measure observations for Ratio are not required, but are optional. For this specific measure, no observations were included, which is why they are not included in the populations on the group.
Aggregate method is an extension that would be provided on the measure observation population, if there was one. Same for criteria reference - that would contain the ID of the population the observation was for.

As for the expected result of true, yes that is correct. Regardless of whether the population basis is boolean or non-boolean, fqm-execution always returns a boolean result. For non-boolean (episode based), there is an array of episodeResults where each episode has a populationResults array. Each item in the array has a result field that holds a boolean value.

@JSRankins
Copy link

Correct @nmorasb. Per spec,

Ratio measures may also include continuous variable calculations for the numerator and denominator (continuous variable ratio measures) but the diagrams do not depict the continuous variable ratio measures.

That's under section 3.4.4.1 regarding Ratio measure scoring.

@p9g , we should probably make the spec clearer here regarding measure observation for Ratio measure score. Also, in the case where there are two groups that have different scores (obviously, not this exact example), Measure.meta.profile would not be able to contain a URL for one of the measure score profiles. For export, a rollup could probably be performed to see if only group or all groups have same measure score, then output Measure.meta.profile, but that would cause an inconsistency between measures (explainable but might cause some confusion). We might consider the possibility of having a group specify a meta profile URL, if possible, and then allow the meta profile either at the measure or group level. I don't think specification addresses this, but I believe it is possible. Something we should probably discuss in a CQI workgroup meeting.

@p9g
Copy link

p9g commented Nov 3, 2022

Created https://jira.hl7.org/browse/FHIR-39376 to discuss clarifying the QMIG.

@mgramigna mgramigna added bug Something isn't working calculation results Issues related to population results calculation and removed bug Something isn't working labels Feb 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working calculation results Issues related to population results calculation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants