This resource is responsible for managing clinical quality measure calculations. Creating a new query will kick off a new CQM calculation (if it hasn't already been calculated). You can determine the status of ongoing calculations, force recalculations and see results through this resource.

Supported Formats

json

GET /api/queries/:id
Retrieve clinical quality measure calculation

Gets a clinical quality measure calculation. If calculation is completed, the response will include the results.

Supported Formats

json

Examples

{"DENEX":0,"DENEXCEP":0,"DENOM":5,"IPP":5,"MSRPOPL":0,"NUMER":0,  "status":{"state":"completed", ...}, ...}

Params

Param name Description
id
required

The id of the quality measure calculation

Validations:

  • Must be a String


POST /api/queries
Start a clinical quality measure calculation

This action will create a clinical quality measure calculation. If the measure has already been calculated, it will return the results. If not, it will return the status of the calculation, which can be checked in the status property of the returned JSON. If it is calculating, then the results may be obtained by the GET action with the id.

Supported Formats

json

Examples

{"_id":"52fe409bb99cc8f818000001", "status":{"state":"queued", ...}, ...}

Params

Param name Description
measure_id
required

The HQMF id for the CQM to calculate

Validations:

  • Must be a String

sub_id
optional , nil allowed

The sub id for the CQM to calculate. This is popHealth specific.

Validations:

  • Must be a String

effective_date
required

Time in seconds since the epoch for the end date of the reporting period

effective_start_date
optional

Time in seconds since the epoch for the start date of the reporting period

providers
optional , nil allowed

An array of provider IDs to filter the query by

Validations:

  • Must be an array of any type


DELETE /api/queries/:id
Remove clinical quality measure calculation

Supported Formats

json

Params

Param name Description
id
required

The id of the quality measure calculation

Validations:

  • Must be a String


PUT /api/queries/:id/recalculate
Force a clinical quality measure to recalculate

Supported Formats

json

Params

Param name Description
id
required

The id of the quality measure calculation

Validations:

  • Must be a String


POST /api/queries/:id/filter
Apply a filter to an existing measure calculation

Supported Formats

json

Params

Param name Description
id
required

The id of the quality measure calculation

Validations:

  • Must be a String


POST /api/queries/:id/clearfilters
Clear all filters and recalculate

Supported Formats

json

Params

Param name Description
id
required

The id of the quality measure calculation

Validations:

  • Must be a String


GET /api/queries/:id/patient_results[?population=true|false]
Retrieve patients relevant to a clinical quality measure calculation

This action returns an array of patients that have results calculated for this clinical quality measure. The list can be restricted to specific populations, such as only patients that have made it into the numerator by passing in a query parameter for a particular population. Results are paginated.

Supported Formats

json

Examples

[{"_id":"52fe409ef78ba5bfd2c4127f","value":{"DENEX":0,"DENEXCEP":0,"DENOM":1,"IPP":1,"NUMER":1,"antinumerator":0,"birthdate":1276869600.0,"effective_date":1356998340.0,,"first":"Steve","gender":"M","last":"E","measure_id":"40280381-3D61-56A7-013E-6224E2AC25F3","medical_record_id":"ce83c561f62e245ad4e0ca648e9de0dd","nqf_id":"0038","patient_id":"52fbbf34b99cc8a728000068"}},...]

Params

Param name Description
id
required

The id of the quality measure calculation

Validations:

  • Must be a String

ipp
optional

Ensure patients meet the initial patient population for the measure

Validations:

  • Must match regular expression /true|false/.

denom
optional

Ensure patients meet the denominator for the measure

Validations:

  • Must match regular expression /true|false/.

numer
optional

Ensure patients meet the numerator for the measure

Validations:

  • Must match regular expression /true|false/.

denex
optional

Ensure patients meet the denominator exclusions for the measure

Validations:

  • Must match regular expression /true|false/.

denexcep
optional

Ensure patients meet the denominator exceptions for the measure

Validations:

  • Must match regular expression /true|false/.

msrpopl
optional

Ensure patients meet the measure population for the measure

Validations:

  • Must match regular expression /true|false/.

antinumerator
optional

Ensure patients are not in the numerator but are in the denominator for the measure

Validations:

  • Must match regular expression /true|false/.

page
optional

Validations:

  • Must match regular expression /\d+/.

per_page
optional

Validations:

  • Must match regular expression /\d+/.