Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

qpp-measures-data

Package Overview
Dependencies
Maintainers
1
Versions
271
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

qpp-measures-data - npm Package Compare versions

Comparing version 1.0.0-alpha.21 to 1.0.0-alpha.22

scripts/measures/archived/scripts/get-stratification.js

2

package.json
{
"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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc