Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update fqmexec 1.3.1 #139

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
connectathon
ecqm-content-r4-2021
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:

strategy:
matrix:
node-version: [16.x]
node-version: [16.x, 18.x]
mongodb-version: ['5.0']

steps:
Expand Down Expand Up @@ -47,7 +47,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
node-version: [16.x, 18.x]
mongodb-version: ['5.0']
steps:
- uses: actions/checkout@v2
Expand Down
76 changes: 19 additions & 57 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"cql-exec-fhir-mongo": "git+https://[email protected]/projecttacoma/cql-exec-fhir-mongo",
"dotenv": "^10.0.0",
"express": "^4.17.1",
"fqm-execution": "^1.0.5",
"fqm-execution": "^1.3.1",
"lodash": "^4.17.21",
"mongodb": "^4.1.3",
"uuid": "^8.3.2",
Expand Down
3 changes: 2 additions & 1 deletion src/queue/execQueue.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ class ScaledCalculation {

// Prepare the fqm-execution measure report builder
try {
this._mrBuilder = new MeasureReportBuilder(this._measureBundle, {
const measure_entry = this._measureBundle.entry?.find(e => e.resource?.resourceType === 'Measure');
this._mrBuilder = new MeasureReportBuilder(measure_entry.resource, {
measurementPeriodStart: this._periodStart,
measurementPeriodEnd: this._periodEnd,
reportType: 'summary'
Expand Down
2 changes: 1 addition & 1 deletion src/services/measure.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ const evaluateMeasure = async (args, { req }) => {
const { reportType, subject } = req.query;

// If reportType is not specified, default to 'subject', but
// only if the 'subject' parameter is also specificed
// only if the 'subject' parameter is also specified
if (reportType === 'subject' || (reportType == null && subject != null)) {
logger.debug('Evaluating measure for individual');
return evaluateMeasureForIndividual(args, { req });
Expand Down
5 changes: 3 additions & 2 deletions test/services/base.service.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,9 @@ describe('base.service', () => {
url: expect.stringMatching(/\/4_0_1\/Patient\?page=1$/)
}
]);
expect(response.body.entry[0].resource.id).toEqual(testPatient.id);
expect(response.body.entry[0].resource.resourceType).toEqual('Patient');
const testPatientEntry = response.body.entry.find(e => e.resource.id === testPatient.id);
expect(testPatientEntry).toBeDefined();
expect(testPatientEntry.resource.resourceType).toEqual('Patient');
});
});

Expand Down
Loading