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
270
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 0.0.32 to 0.0.33

10

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

@@ -24,6 +24,8 @@ "repository": {

"pdf-to-text": "0.0.6",
"xml2js": "~0.4.17",
"yamljs": "~0.2.8",
"rimraf": "^2.6.1"
"rimraf": "^2.6.1",
"xml2js": "~0.4.17"
},
"dependencies": {
"yamljs": "^0.2.8"
}
}

@@ -128,2 +128,10 @@ # qpp-measures-data

### Publish
To publish a new version, make sure you've bumped the `version` in `package.json`, then:
```
npm login # as cmsgov
npm publish
```
### Additional measures

@@ -130,0 +138,0 @@

// Libraries
var chai = require('chai');
var assert = chai.assert;
var expect = chai.expect;
var isObject = require('lodash/isObject');
// functions being tested

@@ -14,11 +12,11 @@ var main = require('./../../index');

it('should return an object', function() {
assert(isObject(getBenchmarksData()));
assert.isObject(getBenchmarksData());
});
it('should return an object keyed by performance year with array values', function() {
assert(Array.isArray(getBenchmarksData()[2017]));
assert.isArray(getBenchmarksData()[2017]);
});
it('should return undefined if benchmarks do not exist for that performance year', function(){
expect(getBenchmarksData()[2016]).to.equal(undefined);
assert.isUndefined(getBenchmarksData()[2016]);
});

@@ -29,5 +27,5 @@ });

it('should return a string', function() {
expect(typeof getBenchmarksSchema()).to.eql('object');
assert.isObject(getBenchmarksSchema());
});
});
});

101

test/util/format-benchmark-record-spec.js

@@ -1,4 +0,3 @@

// Libraries
var chai = require('chai');
var expect = chai.expect;
var chai = require('chai');
var assert = chai.assert;
// Utils

@@ -34,3 +33,3 @@ var formatBenchmarkRecord = require('./../../util/format-benchmark-record');

expect(benchmark).to.be.undefined;
assert.isUndefined(benchmark);
});

@@ -59,3 +58,3 @@ });

expect(benchmark).to.be.undefined;
assert.isUndefined(benchmark);
});

@@ -85,4 +84,4 @@ });

expect(benchmark1.benchmarkYear).to.equal(2002);
expect(benchmark2.benchmarkYear).to.equal(2004);
assert.equal(benchmark1.benchmarkYear, 2002);
assert.equal(benchmark2.benchmarkYear, 2004);
});

@@ -109,4 +108,4 @@ it('should have the correct performanceYear based on the options argument', function() {

expect(benchmark1.performanceYear).to.equal(2004);
expect(benchmark2.performanceYear).to.equal(2006);
assert.equal(benchmark1.performanceYear, 2004);
assert.equal(benchmark2.performanceYear, 2006);
});

@@ -135,8 +134,8 @@

it('should return the correct benchmark object', function() {
expect(benchmark).to.exist;
expect(benchmark.measureId, 'measureId').to.equal('130');
expect(benchmark.submissionMethod, 'submissionMethod').to.equal('electronicHealthRecord');
expect(benchmark.benchmarkYear, 'benchmarkYear').to.equal(2016);
expect(benchmark.performanceYear, 'performanceYear').to.equal(2018);
expect(benchmark.deciles).to.eql([0, 76.59, 87.89, 92.74, 95.36, 97.09, 98.28, 99.13, 99.76]);
assert.isDefined(benchmark);
assert.equal(benchmark.measureId, '130', 'measureId');
assert.equal(benchmark.submissionMethod, 'electronicHealthRecord', 'submissionMethod');
assert.equal(benchmark.benchmarkYear, 2016, 'benchmarkYear');
assert.equal(benchmark.performanceYear, 2018, 'performanceYear');
assert.deepEqual(benchmark.deciles, [0, 76.59, 87.89, 92.74, 95.36, 97.09, 98.28, 99.13, 99.76], 'deciles');
});

@@ -165,8 +164,8 @@ });

it('should return the correct benchmark object', function() {
expect(benchmark).to.exist;
expect(benchmark.measureId, 'measureId').to.equal('099');
expect(benchmark.submissionMethod, 'submissionMethod').to.equal('claims');
expect(benchmark.benchmarkYear, 'benchmarkYear').to.equal(2016);
expect(benchmark.performanceYear, 'performanceYear').to.equal(2018);
expect(benchmark.deciles).to.eql([0, 0, 0, 0, 0, 0, 0, 0, 100]);
assert.isDefined(benchmark);
assert.equal(benchmark.measureId, '099', 'measureId');
assert.equal(benchmark.submissionMethod, 'claims', 'submissionMethod');
assert.equal(benchmark.benchmarkYear, 2016, 'benchmarkYear');
assert.equal(benchmark.performanceYear, 2018, 'performanceYear');
assert.deepEqual(benchmark.deciles, [0, 0, 0, 0, 0, 0, 0, 0, 100], 'deciles');
});

@@ -198,8 +197,8 @@ });

expect(benchmark).to.exist;
expect(benchmark.measureId, 'measureId').to.equal('001');
expect(benchmark.submissionMethod, 'submissionMethod').to.equal('electronicHealthRecord');
expect(benchmark.benchmarkYear, 'benchmarkYear').to.equal(2016);
expect(benchmark.performanceYear, 'performanceYear').to.equal(2018);
expect(benchmark.deciles).to.eql([100, 54.67, 35.90, 25.62, 19.33, 14.14, 9.09, 3.33, 0]);
assert.isDefined(benchmark);
assert.equal(benchmark.measureId, '001', 'measureId');
assert.equal(benchmark.submissionMethod, 'electronicHealthRecord', 'submissionMethod');
assert.equal(benchmark.benchmarkYear, 2016, 'benchmarkYear');
assert.equal(benchmark.performanceYear, 2018, 'performanceYear');
assert.deepEqual(benchmark.deciles, [100, 54.67, 35.90, 25.62, 19.33, 14.14, 9.09, 3.33, 0], 'deciles');
});

@@ -227,8 +226,8 @@ });

expect(benchmark).to.exist;
expect(benchmark.measureId, 'measureId').to.equal('001');
expect(benchmark.submissionMethod, 'submissionMethod').to.equal('claims');
expect(benchmark.benchmarkYear, 'benchmarkYear').to.equal(2016);
expect(benchmark.performanceYear, 'performanceYear').to.equal(2018);
expect(benchmark.deciles, 'deciles').to.eql([100, 35.00, 25.71, 20.31, 16.22, 13.04, 10.00, 7.41, 4.00]);
assert.isDefined(benchmark);
assert.equal(benchmark.measureId, '001', 'measureId');
assert.equal(benchmark.submissionMethod, 'claims', 'submissionMethod');
assert.equal(benchmark.benchmarkYear, 2016, 'benchmarkYear');
assert.equal(benchmark.performanceYear, 2018, 'performanceYear');
assert.deepEqual(benchmark.deciles, [100, 35.00, 25.71, 20.31, 16.22, 13.04, 10.00, 7.41, 4.00], 'deciles');
});

@@ -258,8 +257,8 @@ });

it('should return the correct benchmark object', function() {
expect(benchmark).to.exist;
expect(benchmark.measureId, 'measureId').to.equal('001');
expect(benchmark.submissionMethod, 'submissionMethod').to.equal('registry');
expect(benchmark.benchmarkYear, 'benchmarkYear').to.equal(2016);
expect(benchmark.performanceYear, 'performanceYear').to.equal(2018);
expect(benchmark.deciles).to.eql([0, 0, 0, 0, 0, 0, 0, 0, 0]);
assert.isDefined(benchmark);
assert.equal(benchmark.measureId, '001', 'measureId');
assert.equal(benchmark.submissionMethod, 'registry', 'submissionMethod');
assert.equal(benchmark.benchmarkYear, 2016, 'benchmarkYear');
assert.equal(benchmark.performanceYear, 2018, 'performanceYear');
assert.deepEqual(benchmark.deciles, [0, 0, 0, 0, 0, 0, 0, 0, 0], 'deciles');
});

@@ -288,8 +287,8 @@ });

it('should return the correct benchmark object', function() {
expect(benchmark).to.exist;
expect(benchmark.measureId, 'measureId').to.equal('012');
expect(benchmark.submissionMethod, 'submissionMethod').to.equal('claims');
expect(benchmark.benchmarkYear, 'benchmarkYear').to.equal(2016);
expect(benchmark.performanceYear, 'performanceYear').to.equal(2018);
expect(benchmark.deciles).to.eql([0, 99.01, 100, 100, 100, 100, 100, 100, 100]);
assert.isDefined(benchmark);
assert.equal(benchmark.measureId, '012', 'measureId');
assert.equal(benchmark.submissionMethod, 'claims', 'submissionMethod');
assert.equal(benchmark.benchmarkYear, 2016, 'benchmarkYear');
assert.equal(benchmark.performanceYear, 2018, 'performanceYear');
assert.deepEqual(benchmark.deciles, [0, 99.01, 100, 100, 100, 100, 100, 100, 100], 'deciles');
});

@@ -317,8 +316,8 @@ });

it('should return the correct benchmark object', function() {
expect(benchmark).to.exist;
expect(benchmark.measureId, 'measureId').to.equal('001');
expect(benchmark.submissionMethod, 'submissionMethod').to.equal('registry');
expect(benchmark.benchmarkYear, 'benchmarkYear').to.equal(2016);
expect(benchmark.performanceYear, 'performanceYear').to.equal(2018);
expect(benchmark.deciles).to.eql([100, 0.13, 0.12, 0.12, 0.12, 0, 0, 0, 0]);
assert.isDefined(benchmark);
assert.equal(benchmark.measureId, '001', 'measureId');
assert.equal(benchmark.submissionMethod, 'registry', 'submissionMethod');
assert.equal(benchmark.benchmarkYear, 2016, 'benchmarkYear');
assert.equal(benchmark.performanceYear, 2018, 'performanceYear');
assert.deepEqual(benchmark.deciles, [100, 0.13, 0.12, 0.12, 0.12, 0, 0, 0, 0], 'deciles');
});

@@ -325,0 +324,0 @@ });

// Libraries
var chai = require('chai');
var expect = chai.expect;
var assert = chai.assert;
// Utils

@@ -9,3 +9,3 @@ var isInverseBenchmarkRecord = require('./../../util/is-inverse-benchmark-record');

it('should default to false', function() {
expect(isInverseBenchmarkRecord({})).to.be.false;
assert.isFalse(isInverseBenchmarkRecord({}));
});

@@ -15,3 +15,3 @@ it('should return false when decile 10 is equal to 100', function() {

expect(isInverse).to.be.false;
assert.isFalse(isInverse);

@@ -29,3 +29,3 @@ var isInverse2 = isInverseBenchmarkRecord({

expect(isInverse2).to.be.false;
assert.isFalse(isInverse2);
});

@@ -35,3 +35,3 @@ it('should return true when decile 10 is equal to 0', function() {

expect(isInverse).to.be.true;
assert.isTrue(isInverse);

@@ -49,3 +49,3 @@ var isInverse2 = isInverseBenchmarkRecord({

expect(isInverse2).to.be.true;
assert.isTrue(isInverse2);

@@ -69,3 +69,3 @@ var isInverse3 = isInverseBenchmarkRecord({

expect(isInverse3).to.be.true;
assert.isTrue(isInverse3);
});

@@ -75,3 +75,3 @@ it('should return true when decile 10 is <= x', function() {

expect(isInverse, 'case1').to.be.true;
assert.isTrue(isInverse, 'case1');

@@ -95,3 +95,3 @@ var isInverse2 = isInverseBenchmarkRecord({

expect(isInverse2).to.be.true;
assert.isTrue(isInverse2);
});

@@ -101,3 +101,3 @@ it('should return false when decile 10 is >= x', function() {

expect(isInverse).to.be.false;
assert.isFalse(isInverse);

@@ -116,50 +116,50 @@

expect(isInverse2).to.be.false;
assert.isFalse(isInverse2);
});
it('should return true when a decreasing range is given for any of the deciles', function() {
expect(isInverseBenchmarkRecord({decile1: '54.67 - 35.91'}), 'decile1').to.be.true;
expect(isInverseBenchmarkRecord({decile2: '54.67 - 35.91'}), 'decile2').to.be.true;
expect(isInverseBenchmarkRecord({decile3: '54.67 - 35.91'}), 'decile3').to.be.true;
expect(isInverseBenchmarkRecord({decile4: '54.67 - 35.91'}), 'decile4').to.be.true;
expect(isInverseBenchmarkRecord({decile5: '54.67 - 35.91'}), 'decile5').to.be.true;
expect(isInverseBenchmarkRecord({decile6: '54.67 - 35.91'}), 'decile6').to.be.true;
expect(isInverseBenchmarkRecord({decile7: '54.67 - 35.91'}), 'decile7').to.be.true;
expect(isInverseBenchmarkRecord({decile8: '54.67 - 35.91'}), 'decile8').to.be.true;
expect(isInverseBenchmarkRecord({decile9: '54.67 - 35.91'}), 'decile9').to.be.true;
expect(isInverseBenchmarkRecord({decile10: '54.67 - 35.91'}), 'decile10').to.be.true;
assert.isTrue(isInverseBenchmarkRecord({decile1: '54.67 - 35.91'}), 'decile1');
assert.isTrue(isInverseBenchmarkRecord({decile2: '54.67 - 35.91'}), 'decile2');
assert.isTrue(isInverseBenchmarkRecord({decile3: '54.67 - 35.91'}), 'decile3');
assert.isTrue(isInverseBenchmarkRecord({decile4: '54.67 - 35.91'}), 'decile4');
assert.isTrue(isInverseBenchmarkRecord({decile5: '54.67 - 35.91'}), 'decile5');
assert.isTrue(isInverseBenchmarkRecord({decile6: '54.67 - 35.91'}), 'decile6');
assert.isTrue(isInverseBenchmarkRecord({decile7: '54.67 - 35.91'}), 'decile7');
assert.isTrue(isInverseBenchmarkRecord({decile8: '54.67 - 35.91'}), 'decile8');
assert.isTrue(isInverseBenchmarkRecord({decile9: '54.67 - 35.91'}), 'decile9');
assert.isTrue(isInverseBenchmarkRecord({decile10: '54.67 - 35.91'}), 'decile10');
});
it('should return false when an increasing range is given for any of the deciles', function() {
expect(isInverseBenchmarkRecord({decile1: '53.73 - 75.75'}), 'decile1').to.be.false;
expect(isInverseBenchmarkRecord({decile2: '53.73 - 75.75'}), 'decile2').to.be.false;
expect(isInverseBenchmarkRecord({decile3: '53.73 - 75.75'}), 'decile3').to.be.false;
expect(isInverseBenchmarkRecord({decile4: '53.73 - 75.75'}), 'decile4').to.be.false;
expect(isInverseBenchmarkRecord({decile5: '53.73 - 75.75'}), 'decile5').to.be.false;
expect(isInverseBenchmarkRecord({decile6: '53.73 - 75.75'}), 'decile6').to.be.false;
expect(isInverseBenchmarkRecord({decile7: '53.73 - 75.75'}), 'decile7').to.be.false;
expect(isInverseBenchmarkRecord({decile8: '53.73 - 75.75'}), 'decile8').to.be.false;
expect(isInverseBenchmarkRecord({decile9: '53.73 - 75.75'}), 'decile9').to.be.false;
expect(isInverseBenchmarkRecord({decile10: '53.73 - 75.75'}), 'decile10').to.be.false;
assert.isFalse(isInverseBenchmarkRecord({decile1: '53.73 - 75.75'}), 'decile1');
assert.isFalse(isInverseBenchmarkRecord({decile2: '53.73 - 75.75'}), 'decile2');
assert.isFalse(isInverseBenchmarkRecord({decile3: '53.73 - 75.75'}), 'decile3');
assert.isFalse(isInverseBenchmarkRecord({decile4: '53.73 - 75.75'}), 'decile4');
assert.isFalse(isInverseBenchmarkRecord({decile5: '53.73 - 75.75'}), 'decile5');
assert.isFalse(isInverseBenchmarkRecord({decile6: '53.73 - 75.75'}), 'decile6');
assert.isFalse(isInverseBenchmarkRecord({decile7: '53.73 - 75.75'}), 'decile7');
assert.isFalse(isInverseBenchmarkRecord({decile8: '53.73 - 75.75'}), 'decile8');
assert.isFalse(isInverseBenchmarkRecord({decile9: '53.73 - 75.75'}), 'decile9');
assert.isFalse(isInverseBenchmarkRecord({decile10: '53.73 - 75.75'}), 'decile10');
});
it('should return true when any decile below 10 is >= x', function() {
expect(isInverseBenchmarkRecord({decile1: '>= 4.00'}), 'decile1').to.be.true;
expect(isInverseBenchmarkRecord({decile2: '>= 4.00'}), 'decile2').to.be.true;
expect(isInverseBenchmarkRecord({decile3: '>= 4.00'}), 'decile3').to.be.true;
expect(isInverseBenchmarkRecord({decile4: '>= 4.00'}), 'decile4').to.be.true;
expect(isInverseBenchmarkRecord({decile5: '>= 4.00'}), 'decile5').to.be.true;
expect(isInverseBenchmarkRecord({decile6: '>= 4.00'}), 'decile6').to.be.true;
expect(isInverseBenchmarkRecord({decile7: '>= 4.00'}), 'decile7').to.be.true;
expect(isInverseBenchmarkRecord({decile8: '>= 4.00'}), 'decile8').to.be.true;
expect(isInverseBenchmarkRecord({decile9: '>= 4.00'}), 'decile9').to.be.true;
assert.isTrue(isInverseBenchmarkRecord({decile1: '>= 4.00'}), 'decile1');
assert.isTrue(isInverseBenchmarkRecord({decile2: '>= 4.00'}), 'decile2');
assert.isTrue(isInverseBenchmarkRecord({decile3: '>= 4.00'}), 'decile3');
assert.isTrue(isInverseBenchmarkRecord({decile4: '>= 4.00'}), 'decile4');
assert.isTrue(isInverseBenchmarkRecord({decile5: '>= 4.00'}), 'decile5');
assert.isTrue(isInverseBenchmarkRecord({decile6: '>= 4.00'}), 'decile6');
assert.isTrue(isInverseBenchmarkRecord({decile7: '>= 4.00'}), 'decile7');
assert.isTrue(isInverseBenchmarkRecord({decile8: '>= 4.00'}), 'decile8');
assert.isTrue(isInverseBenchmarkRecord({decile9: '>= 4.00'}), 'decile9');
});
it('should return false when any decile below 10 is <= x', function() {
expect(isInverseBenchmarkRecord({decile1: '<= 4.00'}), 'decile1').to.be.false;
expect(isInverseBenchmarkRecord({decile2: '<= 4.00'}), 'decile2').to.be.false;
expect(isInverseBenchmarkRecord({decile3: '<= 4.00'}), 'decile3').to.be.false;
expect(isInverseBenchmarkRecord({decile4: '<= 4.00'}), 'decile4').to.be.false;
expect(isInverseBenchmarkRecord({decile5: '<= 4.00'}), 'decile5').to.be.false;
expect(isInverseBenchmarkRecord({decile6: '<= 4.00'}), 'decile6').to.be.false;
expect(isInverseBenchmarkRecord({decile7: '<= 4.00'}), 'decile7').to.be.false;
expect(isInverseBenchmarkRecord({decile8: '<= 4.00'}), 'decile8').to.be.false;
expect(isInverseBenchmarkRecord({decile9: '<= 4.00'}), 'decile9').to.be.false;
assert.isFalse(isInverseBenchmarkRecord({decile1: '<= 4.00'}), 'decile1');
assert.isFalse(isInverseBenchmarkRecord({decile2: '<= 4.00'}), 'decile2');
assert.isFalse(isInverseBenchmarkRecord({decile3: '<= 4.00'}), 'decile3');
assert.isFalse(isInverseBenchmarkRecord({decile4: '<= 4.00'}), 'decile4');
assert.isFalse(isInverseBenchmarkRecord({decile5: '<= 4.00'}), 'decile5');
assert.isFalse(isInverseBenchmarkRecord({decile6: '<= 4.00'}), 'decile6');
assert.isFalse(isInverseBenchmarkRecord({decile7: '<= 4.00'}), 'decile7');
assert.isFalse(isInverseBenchmarkRecord({decile8: '<= 4.00'}), 'decile8');
assert.isFalse(isInverseBenchmarkRecord({decile9: '<= 4.00'}), 'decile9');
});
});
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