Skip to content

Performing FHIR Clinical Quality Operations

Sarah McDougall edited this page Feb 8, 2022 · 6 revisions

After uploading a measure bundle to the server, several FHIR measure operations can be performed, including evaluate-measure, care-gaps, and data-requirements.

evaluate-measure

This operation calculates a measure for a given patient.

Required parameters include:

  • periodStart: start of the measurement period
  • periodEnd: end of the measurement period
  • subject: subject for which the measure will be calculated (unless a population reportType is specified)

The measure, practitioner, and lastReceivedOn parameters are not yet supported by the test server. The subject-list reportType is not supported by the test server - only individual and population reportTypes are supported at this time.

Sending a GET request to $evaluate-measure

As an example, let's retrieve an individual measure report for the patient with identifier numer-EXM130 in the EXM130 bundle, using the measure from the bundle with identifier measure-EXM130-7.3.000. The following request would be sent to the server:

GET http://localhost:3000/4_0_1/Measure/measure-EXM130-7.3.000/$evaluate-measure?subject=numer-EXM130&periodStart=2019-01-01&periodEnd=2019-12-31

The response should return a FHIR MeasureReport with measure score 1 since patient numer-EXM130 is in the numerator in the year 2019. The following is an example of the MeasureReport response (certain attributes omitted for readability):

{
  "id": "316b86e4-c640-4d98-93a4-f19424c84554",
  "resourceType": "MeasureReport",
  "period": {
    "start": "2019-01-01",
    "end": "2019-12-31"
  },
  "status": "complete",
  "type": "individual",
  "measure": "http://hl7.org/fhir/us/cqfmeasures/Measure/EXM130",
  "group": [{
    "id": "group-1",
    "population": [{
        "count": 1,
        "code": {
          "coding": [{
            "system": "http://terminology.hl7.org/CodeSystem/measure-population",
            "code": "initial-population",
            "display": "Initial Population"
          }]
        }
      },
      {
        "count": 1,
        "code": {
          "coding": [{
            "system": "http://terminology.hl7.org/CodeSystem/measure-population",
            "code": "numerator",
            "display": "Numerator"
          }]
        }
      },
      {
        "count": 1,
        "code": {
          "coding": [{
            "system": "http://terminology.hl7.org/CodeSystem/measure-population",
            "code": "denominator",
            "display": "Denominator"
          }]
        }
      },
      {
        "count": 0,
        "code": {
          "coding": [{
            "system": "http://terminology.hl7.org/CodeSystem/measure-population",
            "code": "denominator-exclusion",
            "display": "Denominator Exclusion"
          }]
        }
      }
    ],
    "measureScore": {
      "value": 1
    }
  }],
  "subject": {
    "reference": "Patient/numer-EXM130"
  }
}

Check out the $evaluate-measure operation spec for more information.

care-gaps

This operation calculates gaps in care for a given patient against the given measure.

Required parameters include:

  • periodStart: start of the measurement period
  • periodEnd: end of the measurement period
  • subject: subject for which the measure will be calculated
  • status: status of the care gap

The topic, practitioner, organization, and program parameters are not yet supported by the test server.

Sending a GET request to $care-gaps

Continuing with our example, let's look at the gaps in care for a patient in the EXM130 bundle. This time, we will examine the patient with id denom-EXM130. To do so, send the following request to the server:

GET http://localhost:3000/4_0_1/Measure/$care-gaps?measureId=measure-EXM130-7.3.000&subject=denom-EXM130&periodStart=2019-01-01&periodEnd=2019-12-31&status=open-gap

The following is an example of the response bundle, with two of the five Guidance Responses:

{
  "resourceType": "Bundle",
  "type": "document",
  "entry": [{
    "resource": {
      "resourceType": "DetectedIssue",
      "id": "c0a9b97c-03e8-4845-9ae8-96a49659ecf3",
      "status": "final",
      "code": {
        "coding": [{
          "system": "http://terminology.hl7.org/CodeSystem/detectedissue-category",
          "code": "care-gap",
          "display": "Gap in Care Detected"
        }]
      },
      "contained": [{
          "resourceType": "GuidanceResponse",
          "id": "c8e3fc13-593e-4622-b84a-2553b552e095",
          "dataRequirement": [{
            "type": "Procedure",
            "codeFilter": [{
                "path": "code",
                "valueSet": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.108.12.1020"
              },
              {
                "path": "status",
                "code": [{
                  "code": "completed",
                  "system": "http://hl7.org/fhir/event-status"
                }]
              }
            ],
            "dateFilter": [{
              "path": "performed.end",
              "valuePeriod": {
                "start": "2009-12-31T00:00:00.000Z",
                "end": "2019-12-31T00:00:00.000Z"
              }
            }]
          }],
          "reasonCode": [{
            "coding": [{
              "system": "CareGapReasonCodeSystem",
              "code": "DateOutOfRange",
              "display": "Key date was not in the expected range",
              "extension": [{
                "url": "ReasonDetail",
                "extension": [{
                    "url": "reference",
                    "valueReference": {
                      "reference": "Procedure/denom-EXM130-2"
                    }
                  },
                  {
                    "url": "path",
                    "valueString": "performed.end"
                  }
                ]
              }]
            }]
          }],
          "status": "data-required",
          "moduleUri": "http://hl7.org/fhir/us/cqfmeasures/Measure/EXM130"
        },
        {
          "resourceType": "GuidanceResponse",
          "id": "2784d904-718e-4b8d-ace0-0a2991e4eec1",
          "dataRequirement": [{
            "type": "Observation",
            "codeFilter": [{
                "path": "code",
                "valueSet": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.198.12.1011"
              },
              {
                "path": "status",
                "code": [{
                    "code": "final",
                    "system": "http://hl7.org/fhir/observation-status"
                  },
                  {
                    "code": "amended",
                    "system": "http://hl7.org/fhir/observation-status"
                  },
                  {
                    "code": "corrected",
                    "system": "http://hl7.org/fhir/observation-status"
                  },
                  {
                    "code": "preliminary",
                    "system": "http://hl7.org/fhir/observation-status"
                  }
                ]
              }
            ],
            "extension": [{
              "url": "http://example.com/dr-value",
              "extension": [{
                  "url": "dr-value-attribute",
                  "valueString": "value"
                },
                {
                  "url": "dr-value-filter",
                  "valueString": "not null"
                }
              ]
            }],
            "dateFilter": [{
              "path": "effective",
              "valuePeriod": {
                "start": "2019-01-01T00:00:00.000Z",
                "end": "2019-12-31T00:00:00.000Z"
              }
            }]
          }],
          "reasonCode": [{
            "coding": [{
              "system": "CareGapReasonCodeSystem",
              "code": "Missing",
              "display": "No Data Element found from Value Set"
            }]
          }],
          "status": "data-required",
          "moduleUri": "http://hl7.org/fhir/us/cqfmeasures/Measure/EXM130"
        }
      ]
    }
  }]
}

Check out the $care-gaps operation spec for more information.

data-requirements

This operation retrieves all the data requirements for a given measure as a FHIR library.

Required parameters include:

  • periodStart: start of the measurement period
  • periodEnd: end of the measurement period

Sending a GET request to $data-requirements

We will now retrieve the data requirements for the EXM130 measure. We will send the following request:

GET http://localhost:3000/4_0_1/Measure/measure-EXM130-7.3.000/$data-requirements?periodStart=2019-01-01&periodEnd=2019-12-31

The following is an example of the response Library resource (with some dataRequirement entries omitted for readability):

{
  "resourceType": "Library",
  "type": {
    "coding": [{
      "code": "module-definition",
      "system": "http://terminology.hl7.org/CodeSystem/library-type"
    }]
  },
  "status": "unknown",
  "dataRequirement": [{
      "type": "Coverage",
      "codeFilter": [{
        "path": "type",
        "valueSet": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591"
      }]
    },
    {
      "type": "Procedure",
      "codeFilter": [{
        "path": "code",
        "valueSet": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.198.12.1010"
      }]
    },
    {
      "type": "Procedure",
      "codeFilter": [{
        "path": "code",
        "valueSet": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.108.12.1038"
      }]
    }
  ]
}

Check out the $data-requirements operation spec for more information.