clinical-reasoning icon indicating copy to clipboard operation
clinical-reasoning copied to clipboard

Invalid reference in MR generated from reportType=subject-list

Open rob-reynolds opened this issue 6 months ago • 3 comments

IS: Relative references in the List resources do not include the resource type. Example:

"item": {
    "reference": "nocoverageconcern-sedconcern-sigcomp"
}

SHOULD BE: Relative references in the List resources should include the resource type. Example:

"item": {
    "reference": "Patient/nocoverageconcern-sedconcern-sigcomp"
}

REPRO:

  1. Run $evaluate-measure with the reportType parameter set to subject-list. Example: http://localhost:8000/Measure/ColorectalCancerScreeningsFHIR/$evaluate-measure?reportType=subject-list&periodStart=2024-01-01&periodEnd=2024-12-31
  2. Note the List resources in the MR contain invalid relative references. Example:
{
    "resourceType": "List",
    "id": "56222060-b037-4388-a20c-3d2d744b443a",
    "entry": [
        {
            "item": {
                "reference": "nocoverageconcern-sedconcern-sigcomp"
            }
        }
    ]
}

See comments for files that will generate a repro although a simpler repro is any subject-list MR.

rob-reynolds avatar Dec 28 '23 05:12 rob-reynolds

Note: the local ("internal fragment") references in the MR are correct. Example: "reference": "#6d3637d3-f7a1-4c28-b717-554d90fa5398"

Testing should ensure the local references are still correct after the relative references are fixed.

rob-reynolds avatar Dec 28 '23 05:12 rob-reynolds

All the FHIR resources needed to repro this issue (requires access to a private repo):

  • https://github.com/alphora/demo-content-r4/blob/cpg-format/bundles/cc-cds-patient-data-bundle.json
  • https://github.com/alphora/demo-content-r4/blob/cpg-format/bundles/cc-cds-resources-bundle.json
  • https://github.com/alphora/demo-content-r4/blob/cpg-format/bundles/configuration-bundle.json

Once posted you can call the operation example above (http://localhost:8000/Measure/ColorectalCancerScreeningsFHIR/$evaluate-measure?reportType=subject-list&periodStart=2024-01-01&periodEnd=2024-12-31).

rob-reynolds avatar Dec 28 '23 05:12 rob-reynolds

@rob-reynolds per subject-list specification in r4 MeasureReport.

The current subject-list generates the incorrect subjectResults reference members. These should be a list of referenced MeasureReports per subject in each population per: https://www.hl7.org/fhir/R4/measurereport-definitions.html#MeasureReport.group.population.subjectResults

currently we are only doing subjectResults with a list of patients references, which is closer to r5's subjects https://hl7.org/fhir/R5/measurereport-definitions.html#MeasureReport.group.population.subjects , which is not supposed to be a List resource, but actually a Group.

So possibly two fixes needed here:

  1. BugFix: Update current subjectResult List to be MeasureReport not Patient resources
  2. Enhancement: Add r5 capability for subjects to show per population, referencing a Group resource with member resources = Patient with correct ResourceType identified

Capt-Mac avatar Jan 04 '24 21:01 Capt-Mac