cqframework / cqf-ruler

FHIR Clinical Reasoning Module Server
Apache License 2.0
63 stars 49 forks source link

RA Approve operation implementation #669

Closed c-schuler closed 1 year ago

c-schuler commented 2 years ago

Resolution for #662

rob-reynolds commented 1 year ago

@c-schuler Per the result below, the operation cancelled a DI it shouldn't have. It should set status to final for the most recent DI, group by cc code (and set the others to cancelled). In this case it cancelled the most recent cc code 96. That should have been set to final. (However, it did the right thing for cc code 110). IOW, it doesn't look like it correctly did the group by cc code.

 {
            "fullUrl": "http://localhost:8080/fhir/DetectedIssue/ra-measurereport03-remediate",
            "resource": {
              "resourceType": "DetectedIssue",
              "id": "ra-measurereport03-remediate",
              "meta": {
                "versionId": "1",
                "lastUpdated": "2022-11-28T06:45:37.140-07:00",
                "source": "#0j179M7WsPgvYFoV",
                "profile": [
                  "http://hl7.org/fhir/us/davinci-ra/StructureDefinition/ra-coding-gap-clinical-evaluation-detectedissue"
                ]
              },
              "extension": [
                {
                  "url": "http://hl7.org/fhir/us/davinci-ra/StructureDefinition/ra-groupReference",
                  "valueString": "group-002"
                }
              ],
              "modifierExtension": [
                {
                  "url": "http://hl7.org/fhir/us/davinci-ra/StructureDefinition/ra-codingGapRequest",
                  "valueCodeableConcept": {
                    "coding": [
                      {
                        "system": "http://hl7.org/fhir/us/davinci-ra/CodeSystem/coding-gap-request",
                        "code": "closure-request"
                      }
                    ]
                  }
                }
              ],
              "status": "final",
              "code": {
                "coding": [
                  {
                    "system": "http://terminology.hl7.org/CodeSystem/cmshcc",
                    "version": "24",
                    "code": "110",
                    "display": "Cystic Fibrosis"
                  }
                ],
                "text": "HCC 110: Cystic Fibrosis"
              },
              "patient": {
                "reference": "Patient/ra-patient02"
              },
              "implicated": [
                {
                  "reference": "MeasureReport/ra-measurereport03"
                }
              ],
              "evidence": [
                {
                  "detail": [
                    {
                      "reference": "MeasureReport/ra-measurereport03"
                    }
                  ]
                },
                {
                  "detail": [
                    {
                      "reference": "Condition/ra-measurereport03-remediate"
                    }
                  ]
                },
                {
                  "detail": [
                    {
                      "reference": "Encounter/ra-measurereport03-remediate"
                    }
                  ]
                }
              ]
            }
          },
          {
            "fullUrl": "http://localhost:8080/fhir/DetectedIssue/ra-measurereport03-group-002",
            "resource": {
              "resourceType": "DetectedIssue",
              "id": "ra-measurereport03-group-002",
              "meta": {
                "lastUpdated": "2022-11-28T06:45:37.140-07:00",
                "profile": [
                  "http://hl7.org/fhir/us/davinci-ra/StructureDefinition/ra-coding-gap-original-detectedissue"
                ]
              },
              "extension": [
                {
                  "url": "http://hl7.org/fhir/us/davinci-ra/StructureDefinition/ra-groupReference",
                  "valueString": "group-002"
                }
              ],
              "status": "cancelled",
              "code": {
                "coding": [
                  {
                    "system": "http://terminology.hl7.org/CodeSystem/cmshcc",
                    "version": "24",
                    "code": "110",
                    "display": "Cystic Fibrosis"
                  }
                ],
                "text": "HCC 110: Cystic Fibrosis"
              },
              "patient": {
                "reference": "Patient/ra-patient02"
              },
              "implicated": [
                {
                  "reference": "MeasureReport/ra-measurereport03"
                }
              ],
              "evidence": [
                {
                  "detail": [
                    {
                      "reference": "Observation/ra-obs01pat02"
                    }
                  ]
                },
                {
                  "detail": [
                    {
                      "reference": "Patient/ra-patient02"
                    }
                  ]
                }
              ]
            }
          },
          {
            "fullUrl": "http://localhost:8080/fhir/DetectedIssue/ra-measurereport03-group-001",
            "resource": {
              "resourceType": "DetectedIssue",
              "id": "ra-measurereport03-group-001",
              "meta": {
                "lastUpdated": "2022-11-28T06:45:37.140-07:00",
                "profile": [
                  "http://hl7.org/fhir/us/davinci-ra/StructureDefinition/ra-coding-gap-original-detectedissue"
                ]
              },
              "extension": [
                {
                  "url": "http://hl7.org/fhir/us/davinci-ra/StructureDefinition/ra-groupReference",
                  "valueString": "group-001"
                }
              ],
              "status": "cancelled",
              "code": {
                "coding": [
                  {
                    "system": "http://terminology.hl7.org/CodeSystem/cmshcc",
                    "version": "24",
                    "code": "96",
                    "display": "Specified Heart.Arrhythmias"
                  }
                ],
                "text": "CMS HCC: 96, Specified Heart.Arrhythmias"
              },
              "patient": {
                "reference": "Patient/ra-patient02"
              },
              "implicated": [
                {
                  "reference": "MeasureReport/ra-measurereport03"
                }
              ],
              "evidence": [
                {
                  "detail": [
                    {
                      "reference": "Condition/ra-condition31pat02"
                    }
                  ]
                },
                {
                  "detail": [
                    {
                      "reference": "Encounter/ra-encounter31pat02"
                    }
                  ]
                },
                {
                  "detail": [
                    {
                      "reference": "Patient/ra-patient02"
                    }
                  ]
                }
              ]
            }
          },