Skip to content

Commit

Permalink
Merge pull request #254 from projecttacoma/pull_cqm_models_4.1.2
Browse files Browse the repository at this point in the history
pull in cqm-models v4.1.2
  • Loading branch information
adongare authored Jun 30, 2023
2 parents 524b762 + 09f4bc0 commit 4e3ecf4
Show file tree
Hide file tree
Showing 7 changed files with 62,793 additions and 62,883 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:

strategy:
matrix:
node-version: [14.x, 16.x, 18.x]
node-version: [16.x, 18.x]

steps:
- uses: actions/checkout@v2
Expand Down
123,621 changes: 61,816 additions & 61,805 deletions dist/browser.js

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion lib/helpers/results_helpers.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable camelcase */
const _ = require('lodash');
const CqmModels = require('cqm-models');

Expand Down Expand Up @@ -462,7 +463,7 @@ module.exports = class ResultsHelpers {
prettyResult += `${currentIndentation}}`;
return prettyResult;
}
if (result) {
if (result || result === 0) {
return JSON.stringify(result, null, 2);
}
return 'null';
Expand Down
4 changes: 3 additions & 1 deletion lib/models/calculator.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ module.exports = class Calculator {
* @returns {patientId, results} results - mapping from patient to calculation results for each patient.
*/
static calculate(
measure, patients, valueSets,
measure,
patients,
valueSets,
// default values for the passed in options object
{
includeClauseResults = false, // whether or not to include the individual clause results (note - these can be large for some measures e.g. opioids)
Expand Down
15 changes: 9 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cqm-execution",
"version": "4.1.2",
"version": "4.1.3",
"description": "NPM module for calculating eCQMs (electronic clinical quality measures) written in CQL (clinical quality language).",
"main": "lib/index.js",
"scripts": {
Expand Down Expand Up @@ -44,17 +44,20 @@
"homepage": "https://github.com/projecttacoma/cqm-execution#readme",
"devDependencies": {
"browserify": "^16.2.3",
"eslint": "^7.0.0",
"eslint-config-airbnb-base": "^14.2.1",
"eslint-plugin-import": "^2.8.0",
"eslint": "^8.43.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-plugin-import": "^2.27.5",
"faker": "^4.1.0",
"jest": "^27.3.1",
"jest": "^29.5.0",
"jest-extended": "^1.1.0",
"require-directory": "^2.1.1"
},
"dependencies": {
"cqm-models": "4.1.1",
"cqm-models": "4.1.2",
"lodash": "^4.17.19",
"moment": "^2.29.4"
},
"resolutions": {
"semver": "^7.5.3"
}
}
11 changes: 11 additions & 0 deletions spec/helpers/results_helpers.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,17 @@ describe('ResultsHelpers', () => {
expect(ResultsHelpers.prettyResult(quantity)).toEqual('QUANTITY: 5');
});

it('should pretty print any number value', () => {
expect(ResultsHelpers.prettyResult(1)).toEqual('1');
expect(ResultsHelpers.prettyResult(0)).toEqual('0');
expect(ResultsHelpers.prettyResult(-1)).toEqual('-1');
});

it('should pretty print null or undefined', () => {
expect(ResultsHelpers.prettyResult(null)).toEqual('null');
expect(ResultsHelpers.prettyResult(undefined)).toEqual('null');
});

describe('pretty statement results when requested', () => {
xit('for CMS107v6 correctly', () => {
// TODO: Find another measure to use. PrincipalDiagnosis is no longer a QDM attribute and is used in this measure logic
Expand Down
Loading

0 comments on commit 4e3ecf4

Please sign in to comment.