qpp-measures-data
Advanced tools
Comparing version 1.0.0-alpha.10 to 1.0.0-alpha.11
@@ -3726,3 +3726,3 @@ [ | ||
{ | ||
"measureId": "DM-Composite", | ||
"measureId": "dmComposite", | ||
"benchmarkYear": 2015, | ||
@@ -3729,0 +3729,0 @@ "performanceYear": 2017, |
@@ -1928,5 +1928,4 @@ [ | ||
"measureIds": [ | ||
"005", | ||
"008", | ||
"130" | ||
"130", | ||
"005" | ||
] | ||
@@ -1945,5 +1944,4 @@ } | ||
"measureIds": [ | ||
"005", | ||
"008", | ||
"130" | ||
"130", | ||
"008" | ||
] | ||
@@ -1950,0 +1948,0 @@ } |
{ | ||
"name": "qpp-measures-data", | ||
"version": "1.0.0-alpha.10", | ||
"version": "1.0.0-alpha.11", | ||
"description": "Quality Payment Program Measures Data Repository", | ||
@@ -5,0 +5,0 @@ "repository": { |
@@ -47,4 +47,6 @@ /** | ||
{measureId: '418', optionals: ['024']}, | ||
{measureId: '005', optionals: ['008']}, | ||
{measureId: '006', optionals: ['118', '007']}, | ||
{measureId: '007', optionals: ['118', '006']}, | ||
{measureId: '008', optionals: ['005']}, | ||
{measureId: '118', optionals: ['007', '006']}, | ||
@@ -51,0 +53,0 @@ {measureId: '426', optionals: ['427']}, |
@@ -14,22 +14,3 @@ /** | ||
const _ = require('lodash'); | ||
const fs = require('fs'); | ||
const parse = require('csv-parse/lib/sync'); | ||
const path = require('path'); | ||
// Constants | ||
const BENCHMARK_CSV_COLUMNS = [ | ||
'measureName', | ||
'qualityId', | ||
'submissionMethod', | ||
'measureType', | ||
'benchmark', | ||
'decile3', | ||
'decile4', | ||
'decile5', | ||
'decile6', | ||
'decile7', | ||
'decile8', | ||
'decile9', | ||
'decile10', | ||
'isToppedOut' | ||
]; | ||
const CEHRT_ELIGABLE_IA_MEASURE_IDS = [ | ||
@@ -59,29 +40,7 @@ 'IA_AHE_2', | ||
]; | ||
// Utils | ||
const isInverseBenchmarkRecord = require('../../util/benchmarks/is-inverse-benchmark-record'); | ||
// Data | ||
const benchmarksData = fs.readFileSync(path.join(__dirname, '../../util/benchmarks/2015.csv'), 'utf8'); | ||
const benchmarkRecords = parse(benchmarksData, {columns: BENCHMARK_CSV_COLUMNS, from: 4}); | ||
// Commandline arguments | ||
const category = process.argv[2] || 'ia'; | ||
// Variables | ||
const measureIdToIsInverseMap = {}; | ||
let qpp = ''; | ||
benchmarkRecords.forEach(function(record) { | ||
// NOTE: a measureId is not unique per record. | ||
// A measureId and submissionMethod combination are unique. | ||
// Because quality ids are not unique we need to make sure that measures that | ||
// are inverse do not get reset to the default due to submission methods that | ||
// do not have decile data. For example, 378 EHR has decile data and can be | ||
// determined to be an inverse measure, but 378 Registry/QCDR does not have | ||
// decile data and would be determined to be a direct measure by default. | ||
// | ||
// A measure's benchmarks are all inverse or all direct, regardless of the | ||
// submission method. | ||
if (!measureIdToIsInverseMap[record.qualityId]) { | ||
measureIdToIsInverseMap[record.qualityId] = isInverseBenchmarkRecord(record); | ||
} | ||
}); | ||
process.stdin.setEncoding('utf8'); | ||
@@ -228,3 +187,3 @@ | ||
}); | ||
// Certain measures are ineligible for certain submission methods | ||
// Certain measures are ineligible for certain submission methods | ||
obj.submissionMethods = _.filter(unabbrieviatedMethods, (value) => { | ||
@@ -238,4 +197,2 @@ return !(_.includes(CMS_WEB_INTERFACE_INELIGIBLE_QUALITY_MEASURE_IDS, obj.measureId) && value === 'cmsWebInterface'); | ||
} else if (category === 'quality') { | ||
// isInverse defaults to false; | ||
obj.isInverse = measureIdToIsInverseMap[obj.measureId.replace(/^0*/, '')] || false; | ||
// metricType for quality defaults to singlePerformanceRate | ||
@@ -242,0 +199,0 @@ obj.metricType = 'singlePerformanceRate'; |
@@ -15,2 +15,3 @@ const fs = require('fs'); | ||
enrichAddMeasuresSpecification(measures); | ||
enrichInverseMeasures(measures); | ||
return JSON.stringify(measures, null, 2); | ||
@@ -75,1 +76,14 @@ }; | ||
}; | ||
/** | ||
* Add `isInverse` attribute to measures based on inverse-measures.json | ||
* The JSON document used to derive this is generated using get-inverse-measures-from-pdfs.js | ||
*/ | ||
function enrichInverseMeasures(measures) { | ||
let inverseMeasures = JSON.parse(fs.readFileSync(path.join(__dirname, '../../util/measures/inverse-measures.json'))); | ||
measures.forEach(measure => { | ||
if (inverseMeasures.hasOwnProperty(measure.measureId)) { | ||
measure.isInverse = inverseMeasures[measure.measureId]; | ||
} | ||
}); | ||
} |
@@ -20,3 +20,3 @@ [ | ||
{ | ||
"measureId": "DM-Composite", | ||
"measureId": "dmComposite", | ||
"benchmarkYear": 2015, | ||
@@ -23,0 +23,0 @@ "performanceYear": 2017, |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3224512
65
37608