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.1.0 to 1.1.1

scripts/measures/2018/merge-measures-data.js

2

package.json
{
"name": "qpp-measures-data",
"version": "1.1.0",
"version": "1.1.1",
"description": "Quality Payment Program Measures Data Repository",

@@ -5,0 +5,0 @@ "repository": {

@@ -35,5 +35,5 @@ # qpp-measures-data

$YEAR refers to the performance year. For measures data, providing a $YEAR is optional. If omitted, it defaults to 2018.
$YEAR refers to the performance year. For measures data, providing a $YEAR is optional. If omitted, it defaults to 2017.
Note that only quality measures data has been imported for 2018. Other measures are being added soon.
Note that only quality and PI (Promoting Interoperability, formerly ACI) measures data has been imported for 2018. IA measures are being added soon.

@@ -40,0 +40,0 @@ ### Importing the qpp-measures-data module

@@ -185,3 +185,3 @@ const parse = require('csv-parse/lib/sync');

// (there exist multiple csv rows of strata for each multiPerformanceRate measure)
const addMultiPerformanceRateStrata = function(measures, strataRows) {
function addMultiPerformanceRateStrata(measures, strataRows) {
_.each(strataRows, row => {

@@ -230,7 +230,7 @@ if (!row[0]) {

*/
const convertQualityStrataCsvsToMeasures = function(qualityCsvRows, strataCsvRows) {
function convertQualityStrataCsvsToMeasures(qualityCsvRows, strataCsvRows) {
const sourcedFields = QUALITY_CSV_CONFIG.sourced_fields;
const constantFields = QUALITY_CSV_CONFIG.constant_fields;
const measures = qualityCsvRows.map(function(row) {
const measures = qualityCsvRows.map((row) => {
const measure = {};

@@ -237,0 +237,0 @@ _.each(sourcedFields, (columnObject, measureKey) => {

const chai = require('chai');
const assert = chai.assert;
const _ = require('lodash');
const fs = require('fs');
const path = require('path');
const parse = require('csv-parse/lib/sync');
const year = 2018;
const mipsDataFormat = require('../../../index.js');
const actualMeasureSpecificationData = parse(fs.readFileSync(path.join(__dirname,
'../../../util/measures/' + year + '/measurePDF-Specification.csv'), 'utf8'));
const actualPiRelation = require('../../../util/measures/' + year + '/pi-measure-relations.json');

@@ -24,2 +20,42 @@ const measuresData = mipsDataFormat.getMeasuresData(year);

describe('PI measures', () => {
it('has PI_PHCDRR_1 in performanceBonus reporting category', () => {
const measure = measuresData.find(m => m.measureId === 'PI_PHCDRR_1');
assert.equal(measure.reportingCategory, 'performanceBonus');
});
it('has correct substitutes for PI_TRANS_PHCDRR_2', () => {
const measure = measuresData.find(m => m.measureId === 'PI_TRANS_PHCDRR_2');
assert.deepEqual(measure.substitutes, ['PI_PHCDRR_2']);
});
it('contains proper metadata', () => {
const generated = {};
measuresData
.filter(m => m.category === 'pi')
.forEach(m => {
generated[m.measureId] = {reportingCategory: m.reportingCategory, substitutes: m.substitutes};
});
assert.deepEqual(generated, actualPiRelation);
});
describe('with attestations', function() {
const measureIdsSet = new Set(measureIds);
const requiredAttestationIdsSet = new Set(['PI_INFBLO_1', 'PI_ONCDIR_1', 'PI_ONCACB_1', 'PI_IACEHRT_1']);
it('includes all the PI attestations', function() {
const intersection = new Set([...measureIdsSet]
.filter(x => requiredAttestationIdsSet.has(x)));
assert.equal(intersection.size, requiredAttestationIdsSet.size);
});
it('does not have substitutes', () => {
requiredAttestationIdsSet.forEach(measureId => {
const measure = measuresData.find(m => m.measureId === measureId);
assert.isTrue(_.isEmpty(measure.substitutes));
});
});
});
});
describe('quality measures', function() {

@@ -34,28 +70,2 @@ it('includes all quality measures with multi-performance strata', function() {

describe('Some measures have measureSpecification property', () => {
it('contains proper metadata on measures', () => {
const validMeasureIds = measuresData
.filter(m => m.measureSpecification !== undefined)
.map(m => m.measureId);
const actual = actualMeasureSpecificationData.reduce(function(acc, [submissionMethod, measureId, link]) {
if (validMeasureIds.includes(measureId)) {
acc[measureId] = acc[measureId] || {};
acc[measureId][submissionMethod] = link;
}
return acc;
}, {});
const generated = {};
measuresData
.filter(m => m.measureSpecification !== undefined)
.forEach(m => {
generated[m.measureId] = generated[m.measureId] || {};
const submissionMethods = Object.keys(m.measureSpecification);
submissionMethods.forEach((method) => {
generated[m.measureId][method] = m.measureSpecification[method];
});
});
assert.deepEqual(generated, actual);
});
});
describe('eCQMeasures', () => {

@@ -62,0 +72,0 @@ it('all eCQM measures permitting electronicHealthRecord submission method also permit registry submission method', () => {

@@ -113,3 +113,51 @@ [

]
},
{
"measureId": "PI_INFBLO_1",
"category": "pi",
"title": "Prevention of Information Blocking Attestation",
"description": "I have not knowingly and willfully take action to limit or restrict the interoperability of certified EHR technology.\nI have responded to requests to retrieve or exchange information—including requests from patients and other health care providers regardless of the requestor's affiliation or technology.\nI have implemented appropriate standards and processes to ensure that its certified EHR technology was connected in accordance with applicable law and standards, allowed patients timely access to their electronic health information; and supported exchange of electronic health information with other health care providers.",
"metricType": "boolean",
"firstPerformanceYear": 2017,
"lastPerformanceYear": null,
"weight": 0,
"isRequired": true,
"isBonus": false,
"measureSets": [],
"objective": null,
"reportingCategory": "attestation",
"substitutes": []
},
{
"measureId": "PI_ONCDIR_1",
"category": "pi",
"title": "ONC Direct Review Attestation",
"description": "I have (1) acknowledged the requirement to cooperate in good faith with ONC direct review health information technology certified under the ONC Health IT Certification Program if a request to assist in ONC direct review is received;\nAND (2) If requested, cooperated in good faith with ONC direct review of his or her health information technology certified under the ONC Health IT Certification Program as authorized by 45 CFR part 170, subpart E, to the extent that such technology meets (or can be used to meet) the definition of CEHRT, including by permitting timely access to such technology and demonstrating its capabilities as implemented and used by the MIPS eligible clinician in the field.",
"metricType": "boolean",
"firstPerformanceYear": 2017,
"lastPerformanceYear": null,
"weight": 0,
"isRequired": true,
"isBonus": false,
"measureSets": [],
"objective": null,
"reportingCategory": "attestation",
"substitutes": []
},
{
"measureId": "PI_ONCACB_1",
"category": "pi",
"title": "ONC-ACB Surveillance Attestation (Optional)",
"description": "I have (1) Acknowledged the option to cooperate in good faith with ONC–ACB surveillance of his or her health information technology certified under the ONC Health IT Certification Program if a request to assist in ONC–ACB surveillance is received; and (2) If requested, cooperated in good faith with ONC–ACB surveillance of his or her health information technology certified under the ONC Health IT Certification Program as authorized by 45 CFR part 170, subpart E, to the extent that such technology meets (or can be used to meet) the definition of CEHRT, including by permitting timely access to such technology and demonstrating its capabilities as implemented and used by the MIPS eligible clinician in the field.",
"metricType": "boolean",
"firstPerformanceYear": 2017,
"lastPerformanceYear": null,
"weight": 0,
"isRequired": false,
"isBonus": false,
"measureSets": [],
"objective": null,
"reportingCategory": "attestation",
"substitutes": []
}
]

@@ -7,2 +7,3 @@ // Libraries

const path = require('path');
const _ = require('lodash');

@@ -18,3 +19,3 @@ // Test data

// Expected new measures
const expectedMeasures = require('../' + year + '/fixtures/expected-measures.json');
const expectedMeasures = require('../' + year + '/fixtures/expected-quality-measures.json');

@@ -40,4 +41,4 @@ // Function which executes script and reads in output file to a JS object.

const measures = runTest(testQualityMeasuresCsv, testQualityStrataCsv);
expectedMeasures.forEach(function(expectedMeasure, measureIdx) {
Object.entries(expectedMeasure).forEach(function([measureKey, measureValue]) {
expectedMeasures.forEach((expectedMeasure, measureIdx) => {
_.each(expectedMeasure, (measureValue, measureKey) => {
assert.deepEqual(measures[measureIdx][measureKey], measureValue);

@@ -44,0 +45,0 @@ });

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 not supported yet

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