Skip to content

eCQM Specific Bulk Import

Sarah McDougall edited this page Nov 29, 2022 · 8 revisions

eCQM-Specific Bulk Data Import

Note: The bulk data work on this server is very much a work in progress, and may change as the specification evolves and is tested further.


Summary

eCQM-specific bulk import is a method of conducting a bulk import operation based on the data requirements of a FHIR Measure. With a standard bulk import request, data is filtered before import using the FHIR Parameters object passed in by the user. If the intention of importing data is to run a specific measure, creating a Parameters object that imports only the resources of interest for that measure can be cumbersome. By providing a data-collection FHIR MeasureReport resource which references a measure by canonical URL, eCQM-specific bulk import will calculate the data requirements for that measure and kick off a modified bulk import request that imports only the data that fulfills these data requirements

See the DEQM CI build for more information on the $bulk-submit-data operation.

Kickoff

eCQM-specific bulk import requests can be kicked off using the $bulk-submit-data endpoint. An eCQM-specific bulk import request differs from a standard $submit-data request in a few key places.

Request

Example eCQM-specific bulk import request

POST http://localhost:3000/4_0_1/Measure/<measure-id>/$bulk-submit-data

Example standard $submit-data request

POST http://localhost:3000/4_0_1/Measure/$submit-data

eCQM-specific bulk import requests SHALL:

  • Be of type POST
  • Be sent to the $bulk-submit-data endpoint
  • Specify a MeasureId in the URL which matches the id of the measure referenced by canonical url in the request body

Request Headers

$bulk-submit-data requests use a prefer header which SHALL be set to respond-async.

Example eCQM-specific bulk import request header:

"Content-Type": "application/fhir+json",
"prefer": "respond-async"

Example standard $submit-data request headers

"Content-Type": "application/fhir+json"

Body

As with standard $submit-data requests, the body of eCQM-specific bulk import requests SHALL be a FHIR parameters resource that contains exactly one MeasureReport resource and exactly one exportUrl parameter. Whereas a standard $submit-data must contain all resources slated for submission within the request body, an eCQM-specific bulk import request body SHALL contain a MeasureReport which references the desired measure by canonical URL. The Measure referenced by this MeasureReport SHALL be stored on the server prior to running an eCQM-specific bulk import. Additionally, the body of an eCQM-specific bulk import request SHALL contain exactly one parameter within the body of the following form:

{
  "name": "exportUrl",
  "valueUrl": "http://example.com/$export"
}

where the valueUrl field corresponds to the absolute URL of the bulk export endpoint of the desired bulk export server. Do not include any additional resources in the Parameters object in the request body. Doing so will cause the server to throw an error.

Example eCQM-specific bulk import request body

This request will import all the resources that fit the data requirements of the FHIR measure with the id testMeasure from the bulk export server with bulk export endpoint "http://example.com/$export"

{
  "resourceType": "Parameters",
  "parameter": [
    {
      "name": "exportUrl",
      "valueUrl": "http://example.com/$export" //Absolute URL of bulk export endpoint of desired bulk export server
    },
    {
      "name": "measureReport",
      "resource": {
        "resourceType": "MeasureReport",
        "id": "measurereport-testMeasure",
        "measure": "http://example.com/Measure/testMeasure" //Reference to a measure already stored on the server
      }
    }
  ]
}

Example standard $submit-data request body

{
  "resourceType": "Parameters",
  "parameter": [
    {
      "name": "measureReport",
      "resource": {
        "resourceType": "MeasureReport",
        "id": "measurereport-testMeasure",
        "measure": "http://example.com/Measure/testMeasure"
      }
    },
    {
      "name": "resource",
      "resource": {
        "resourceType": "Patient",
        "id": "Patient1"
      }
    } 
  ]
}

Request Responses and Polling

Expected responses and methods for checking the server's progress are identical for eCQM-specific bulk import and standard bulk import. Further information can be found in the Bulk Data Import section of the Wiki.

Architecture

The following diagram depicts the architecture used for eCQM-specific bulk import requests:

Bulk Import Architecture

Useful References