qpp-measures-data
Advanced tools
Comparing version 1.0.0-alpha.21 to 1.0.0-alpha.22
{ | ||
"name": "qpp-measures-data", | ||
"version": "1.0.0-alpha.21", | ||
"version": "1.0.0-alpha.22", | ||
"description": "Quality Payment Program Measures Data Repository", | ||
@@ -5,0 +5,0 @@ "repository": { |
@@ -7,3 +7,5 @@ const fs = require('fs'); | ||
const cpcPlusGroups = require('../../util/measures/cpc+-measure-groups.json'); | ||
const stratifications = require('../../util/measures/additional-stratifications.json'); | ||
const QUALITY_CATEGORY = 'quality'; | ||
const measuresDataPath = process.argv[2]; | ||
@@ -19,2 +21,3 @@ const outputPath = process.argv[3]; | ||
enrichInverseMeasures(measures); | ||
enrichStratifications(measures); | ||
return JSON.stringify(measures, null, 2); | ||
@@ -51,3 +54,3 @@ }; | ||
measures | ||
.filter(measure => measure.category === 'quality') | ||
.filter(measure => measure.category === QUALITY_CATEGORY) | ||
.forEach(measure => { | ||
@@ -93,1 +96,22 @@ Object.keys(cpcPlusGroups).forEach((groupId) => { | ||
} | ||
/** | ||
* Adds in each SubPopulation's stratification UUIDs | ||
* This JSON document used to derive this is generated using get-stratifications.js | ||
*/ | ||
function enrichStratifications(measures) { | ||
measures | ||
.filter(measure => measure.category === QUALITY_CATEGORY) | ||
.forEach(measure => { | ||
const stratification = stratifications.find(stratum => stratum.eMeasureId === measure.eMeasureId); | ||
if (stratification) { | ||
measure.strata.forEach(subPopulation => { | ||
const mapping = stratification.mapping.find(map => | ||
map.numeratorUuid === subPopulation.eMeasureUuids.numeratorUuid); | ||
if (mapping) { | ||
subPopulation.eMeasureUuids.strata = mapping.strata; | ||
} | ||
}); | ||
} | ||
}); | ||
} |
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
6192445
88
89588
17