Skip to content

Commit

Permalink
Merge pull request #786 from CMSgov/QPPA-8988
Browse files Browse the repository at this point in the history
QPPA-8988: Add Benchmarks Cost National Averages
  • Loading branch information
ckawell-sb committed Apr 16, 2024
2 parents edef470 + 3ed280e commit 04bb1bc
Show file tree
Hide file tree
Showing 32 changed files with 620 additions and 82 deletions.
4 changes: 4 additions & 0 deletions CONTRIBUTING.md
Expand Up @@ -84,6 +84,10 @@ Please verify the changes are as expected. (You can run `git diff`.)

Each performance year, we will receive a file named `mvp.csv` which contains the data for MVPs for that year. Place this file in the `mvp/$YEAR` directory for the performance year. First run `nvm use` to make sure you are using the correct versions of npm and Nodejs. Then run `npm run update:mvp $YEAR` which will create the `mvp-enriched.json` file populated with complete measure data. If we receive an updated `mvp.csv`, replace the file in the `mvp/$YEAR` directory and simply run `npm run update:mvp` again, which will replace the `mvp-enriched.json` file.

## Add/Update National Averages JSON

Add or update `cost-national-averages.csv` to `util/benchmarks/$YEAR/` and run `npm run build:benchmarks $YEAR`

## Testing

When making changes to measures-data, include tests in the tests directory and make sure existing tests still pass using:
Expand Down
2 changes: 2 additions & 0 deletions README.md
Expand Up @@ -30,6 +30,8 @@ const measuresSchema = qppMeasuresData.getMeasuresSchema($YEAR);
const benchmarksData = qppMeasuresData.getBenchmarksData();
const benchmarkData$YEAR = benchmarksData[$YEAR];
const benchmarksSchema = qppMeasuresData.getBenchmarksSchema();
const benchmarksCostNationalAveragesData = qppMeasuresData.getBenchmarksNationalAverages($YEAR);
const benchmarksCostNationalAveragesSchema = qppMeasuresData.getBenchmarksNationalAveragesSchema($YEAR);
// Note: for the following function, the mvpIds is an optional parameter (array of MVP IDs to filter by)
const mvpData = qppMeasuresData.getMVPData($YEAR, mvpIds);
const mvpSchema = qppMeasuresData.getMVPSchema($YEAR);
Expand Down
2 changes: 2 additions & 0 deletions __mocks__/fs-extra.ts
@@ -0,0 +1,2 @@
import { fs } from 'memfs';
module.exports = fs;
25 changes: 25 additions & 0 deletions benchmarks/2023/cost-national-averages-schema.yaml
@@ -0,0 +1,25 @@
$id: https://github.com/CMSgov/qpp-measures-data/versions/0.0.1/benchmarks-national-averages-schema.yaml
$schema: http://json-schema.org/schema#
type: array
items: { $ref: '#/definitions/benchmark' }

definitions:
benchmark:
type: object
properties:
measureId:
description: measureId corresponds to a measure object's measureId.
type: string
performanceYear:
description: The performanceYear four digit integer corresponds to the time period of the performance data that was submitted for scoring.
type: number
benchmarkYear:
description: The benchmarkYear four digit integer corresponds to the time period of the performance data that was used to generate this benchmark. The submitted performance data will be compared against the benchmarkYear's results.
type: number
groupNationalAverage:
description: The measure's national average cost score for groups.
type: [number, 'null']
individualNationalAverage:
description: The measure's national average cost score for individuals.
type: [number, 'null']
required: [measureId, performanceYear, benchmarkYear]
177 changes: 177 additions & 0 deletions benchmarks/2023/cost-national-averages.json
@@ -0,0 +1,177 @@
[
{
"measureId": "COST_ACOPD_1",
"performanceYear": 2023,
"benchmarkYear": 2023,
"groupNationalAverage": 4702.26,
"individualNationalAverage": 4595.53
},
{
"measureId": "COST_AKID_1",
"performanceYear": 2023,
"benchmarkYear": 2023,
"groupNationalAverage": 39491.89,
"individualNationalAverage": 46136.03
},
{
"measureId": "COST_CCLI_1",
"performanceYear": 2023,
"benchmarkYear": 2023,
"groupNationalAverage": 23246.89,
"individualNationalAverage": 23518.7
},
{
"measureId": "COST_COPDE_1",
"performanceYear": 2023,
"benchmarkYear": 2023,
"groupNationalAverage": 14868.48,
"individualNationalAverage": 16221.28
},
{
"measureId": "COST_CRR_1",
"performanceYear": 2023,
"benchmarkYear": 2023,
"groupNationalAverage": 26455.9,
"individualNationalAverage": 26381.73
},
{
"measureId": "COST_D_1",
"performanceYear": 2023,
"benchmarkYear": 2023,
"groupNationalAverage": 6909.06,
"individualNationalAverage": 6395.23
},
{
"measureId": "COST_EOPCI_1",
"performanceYear": 2023,
"benchmarkYear": 2023,
"groupNationalAverage": 11657.56,
"individualNationalAverage": 11661.48
},
{
"measureId": "COST_FIHR_1",
"performanceYear": 2023,
"benchmarkYear": 2023,
"groupNationalAverage": 5002.1,
"individualNationalAverage": 5035.29
},
{
"measureId": "COST_HAC_1",
"performanceYear": 2023,
"benchmarkYear": 2023,
"groupNationalAverage": 6298.81,
"individualNationalAverage": 6312.07
},
{
"measureId": "COST_IHCI_1",
"performanceYear": 2023,
"benchmarkYear": 2023,
"groupNationalAverage": 25973.97,
"individualNationalAverage": 29930.56
},
{
"measureId": "COST_IOL_1",
"performanceYear": 2023,
"benchmarkYear": 2023,
"groupNationalAverage": 3149.02,
"individualNationalAverage": 3148.98
},
{
"measureId": "COST_KA_1",
"performanceYear": 2023,
"benchmarkYear": 2023,
"groupNationalAverage": 16704.99,
"individualNationalAverage": 16669.05
},
{
"measureId": "COST_LGH_1",
"performanceYear": 2023,
"benchmarkYear": 2023,
"groupNationalAverage": 12602.42,
"individualNationalAverage": 13793.53
},
{
"measureId": "COST_LPMSM_1",
"performanceYear": 2023,
"benchmarkYear": 2023,
"groupNationalAverage": 6617.88,
"individualNationalAverage": 6648.35
},
{
"measureId": "COST_LSFDD_1",
"performanceYear": 2023,
"benchmarkYear": 2023,
"groupNationalAverage": 37454.45,
"individualNationalAverage": 37513.24
},
{
"measureId": "COST_MR_1",
"performanceYear": 2023,
"benchmarkYear": 2023,
"groupNationalAverage": 1695.48,
"individualNationalAverage": 1720.86
},
{
"measureId": "COST_NECABG_1",
"performanceYear": 2023,
"benchmarkYear": 2023,
"groupNationalAverage": 46744.12,
"individualNationalAverage": 46697.18
},
{
"measureId": "COST_PHA_1",
"performanceYear": 2023,
"benchmarkYear": 2023,
"groupNationalAverage": 17394.53,
"individualNationalAverage": 17321.86
},
{
"measureId": "COST_RUSST_1",
"performanceYear": 2023,
"benchmarkYear": 2023,
"groupNationalAverage": 6350.31,
"individualNationalAverage": 6360.14
},
{
"measureId": "COST_SPH_1",
"performanceYear": 2023,
"benchmarkYear": 2023,
"groupNationalAverage": null,
"individualNationalAverage": null
},
{
"measureId": "COST_SSC_1",
"performanceYear": 2023,
"benchmarkYear": 2023,
"groupNationalAverage": 999.06,
"individualNationalAverage": 999.06
},
{
"measureId": "COST_STEMI_1",
"performanceYear": 2023,
"benchmarkYear": 2023,
"groupNationalAverage": 21729.56,
"individualNationalAverage": 23377.52
},
{
"measureId": "COST_S_1",
"performanceYear": 2023,
"benchmarkYear": 2023,
"groupNationalAverage": 22001.58,
"individualNationalAverage": 25064.42
},
{
"measureId": "MSPB_1",
"performanceYear": 2023,
"benchmarkYear": 2023,
"groupNationalAverage": 23772.66,
"individualNationalAverage": 23772.66
},
{
"measureId": "TPCC_1",
"performanceYear": 2023,
"benchmarkYear": 2023,
"groupNationalAverage": 1284.88,
"individualNationalAverage": 1284.88
}
]
25 changes: 25 additions & 0 deletions benchmarks/2024/cost-national-averages-schema.yaml
@@ -0,0 +1,25 @@
$id: https://github.com/CMSgov/qpp-measures-data/versions/0.0.1/benchmarks-national-averages-schema.yaml
$schema: http://json-schema.org/schema#
type: array
items: { $ref: '#/definitions/benchmark' }

definitions:
benchmark:
type: object
properties:
measureId:
description: measureId corresponds to a measure object's measureId.
type: string
performanceYear:
description: The performanceYear four digit integer corresponds to the time period of the performance data that was submitted for scoring.
type: number
benchmarkYear:
description: The benchmarkYear four digit integer corresponds to the time period of the performance data that was used to generate this benchmark. The submitted performance data will be compared against the benchmarkYear's results.
type: number
groupNationalAverage:
description: The measure's national average cost score for groups.
type: [number, 'null']
individualNationalAverage:
description: The measure's national average cost score for individuals.
type: [number, 'null']
required: [measureId, performanceYear, benchmarkYear]
15 changes: 15 additions & 0 deletions index.js
Expand Up @@ -110,6 +110,21 @@ exports.getBenchmarksExclusionReasons = function(performanceYear = Constants.cur
fs.readFileSync(path.join(__dirname, 'benchmarks', performanceYear.toString(), 'benchmark-exclusion-reasons.json')));
};

/**
* @return {Array<Any>}
*/
exports.getBenchmarksNationalAverages = function (performanceYear = Constants.currentPerformanceYear) {
return JSON.parse(
fs.readFileSync(path.join(__dirname, 'benchmarks', performanceYear.toString(), 'cost-national-averages.json')));
};

/**
* @return {{}} - Object representation of the National Averages Schema
*/
exports.getBenchmarksNationalAveragesSchema = function (performanceYear = Constants.currentPerformanceYear) {
return YAML.parse(fs.readFileSync(path.join(__dirname, 'benchmarks', performanceYear.toString(), 'cost-national-averages-schema.yaml'), 'utf8'));
};

/**
* @return {Array<Measure>}
*/
Expand Down

0 comments on commit 04bb1bc

Please sign in to comment.