qpp-measures-data
Advanced tools
Comparing version 1.8.11 to 1.8.14
{ | ||
"name": "qpp-measures-data", | ||
"version": "1.8.11", | ||
"version": "1.8.14", | ||
"description": "Quality Payment Program Measures Data Repository", | ||
@@ -5,0 +5,0 @@ "repository": { |
const fs = require('fs'); | ||
const path = require('path'); | ||
const _ = require('lodash'); | ||
const parse = require('csv-parse/lib/sync'); | ||
@@ -22,2 +23,3 @@ const currentYear = 2018; | ||
mergeGeneratedEcqmData(measures); | ||
addQualityStrataNames(measures); | ||
addRequiredRegistrySubmissionMethod(measures); | ||
@@ -132,2 +134,25 @@ enrichClaimsRelatedMeasures(measures); | ||
/* | ||
* Uses numeratorUuid field as a common id to map each strata name (only in `enriched-measures-data-quality.json`) | ||
* to a particular strata (in `quality-strata.csv`) | ||
*/ | ||
function addQualityStrataNames(measures) { | ||
const qualityStrataCsv = parse(fs.readFileSync(path.join(__dirname, '../../../util/measures/2018/quality-strata.csv'), 'utf8')); | ||
qualityStrataCsv.forEach(function(strata, csvIndex) { | ||
const currentMeasureId = _.padStart(strata[0], 3, '0'); | ||
const currentNumeratorUuid = strata[6]; | ||
const currentStrataName = strata[1]; | ||
if (_.isEmpty(currentNumeratorUuid)) return; | ||
measures.forEach(function(qppItem, qppIndex) { | ||
if (qppItem.category !== 'quality' || _.isNull(qppItem.eMeasureId) || qppItem.measureId !== currentMeasureId) return; | ||
measures[qppIndex].strata.forEach(function(measureStrata, strataIndex) { | ||
if (_.get(measureStrata, 'eMeasureUuids.numeratorUuid') && | ||
measureStrata.eMeasureUuids.numeratorUuid === currentNumeratorUuid) { | ||
measures[qppIndex].strata[strataIndex].name = currentStrataName; | ||
} | ||
}); | ||
}); | ||
}); | ||
} | ||
function addRequiredRegistrySubmissionMethod(measures) { | ||
@@ -134,0 +159,0 @@ const eCQMeasures = measures.filter(m => m.eMeasureUuid !== undefined); |
@@ -100,2 +100,10 @@ const chai = require('chai'); | ||
}); | ||
describe('multi eCQM', function() { | ||
it('all eCQMs that are multiPerformanceRate should contain a strata name', function() { | ||
measuresData.filter(measure => measure.metricType === 'multiPerformanceRate') | ||
.forEach(measure => measure.strata.forEach(strata => | ||
assert.property(strata, 'name', `measure '${measure.measureId}' missing strata names`))); | ||
}); | ||
}); | ||
}); |
@@ -108,38 +108,4 @@ [ | ||
"metricType": "singlePerformanceRate", | ||
"eMeasureUuid": "40280382-5b4d-eebc-015b-8245e0fa06b7", | ||
"strata": [ | ||
{ | ||
"description": "Not occurrence A of Statin Active SBEMP ends before end of Measurement Period", | ||
"name": "notOccurrence", | ||
"eMeasureUuids": { | ||
"initialPopulationUuid": "B5249FB8-86D2-4633-BCF8-705EAAA35F04", | ||
"denominatorUuid": "CC35FC48-FA75-4E8C-8949-BC2B4D152F72", | ||
"numeratorUuid": "53656F0F-97C7-4537-907E-4C8D836A5853", | ||
"denominatorExceptionUuid": "F13A488B-6F7F-45E3-8216-1A7A679ADBFD", | ||
"denominatorExclusionUuid": "6C1F017F-F0C4-4346-B823-0BC24E3BFA9C" | ||
} | ||
}, | ||
{ | ||
"description": "Diagnosis: Hypercholesterolemia starts before end of Measurement Period", | ||
"name": "hypercholesterolemia", | ||
"eMeasureUuids": { | ||
"initialPopulationUuid": "F1948A70-E9EE-427F-9D1F-9489B902DFAB", | ||
"denominatorUuid": "C44EA250-22FE-4FF1-835B-BD718A9E71FA", | ||
"numeratorUuid": "632ECBD0-8C77-40E9-AE21-795891D5CD64", | ||
"denominatorExceptionUuid": "B55F6B97-ABF6-4F44-90C5-D02D99DE55DA", | ||
"denominatorExclusionUuid": "C5AA9EF4-FC68-4844-A45A-4985E81DA8A1" | ||
} | ||
}, | ||
{ | ||
"description": "Diagnosis: Diabetes starts before end of Measurement Period", | ||
"name": "diabetes", | ||
"eMeasureUuids": { | ||
"initialPopulationUuid": "E44CE0A2-A08E-48CC-B022-5B54F808FB61", | ||
"denominatorUuid": "01B3E154-5F42-4905-BDDD-E2A34B8C1DB2", | ||
"numeratorUuid": "5E64B1E4-1F1A-4B3B-B148-5044F6B30760", | ||
"denominatorExceptionUuid": "3D0BD8CB-CB77-407A-A367-080F53D880DD" | ||
} | ||
} | ||
] | ||
"eMeasureUuid": "40280382-5b4d-eebc-015b-8245e0fa06b7" | ||
} | ||
] |
Sorry, the diff of this file is too big to display
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
19806284
309946