Skip to content

Collect data#67

Merged
lmd59 merged 9 commits into
mainfrom
collect-data
Apr 21, 2026
Merged

Collect data#67
lmd59 merged 9 commits into
mainfrom
collect-data

Conversation

@lmd59

@lmd59 lmd59 commented Apr 1, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds support for a basic $collect-data according to the STU5 definition

New behavior

Supports $collect-data parameters periodStart, periodEnd, measureId, and subject. Does not support all STU5 parameters or alternative parameters/requirements in the latestBuild

Code changes

  • Update premadeBundle upload default
  • Add routes to app.js
  • Add main collectData endpoint handling and validation to export service
  • Create collectDataUtils for utilities: patient bundle and measure report creation, finding patient resources, creating typeFilters based on effective data requirements
  • Small update to exportToNDJson.js to increase robustness
  • Small updates to serviceUtils to handle gathering parameter input
  • Testing: Add and update fixtures and unit testing of $collect-data operation in export.service.test.js

Testing guidance

  • npm run check
  • Add ecqm-content-qicore-2025 bundles to your bulk-export-server directory (will be used instead of 2021 bundles)
  • npm run upload-bundles (should load new default 2025 bundles)
  • npm run start
  • Run POST (or GET w/ URL parameters) to http://localhost:3000/Measure/$collect-data with
{
  "resourceType": "Parameters",
  "parameter": [
    {"name": "periodStart",
		 "valueDate": "2025-01-01"
		},
    {"name": "periodEnd",
		 "valueDate": "2025-12-31"
		},
		{
      "name": "measureId",
			"valueId": "CMS125FHIRBreastCancerScreening"
    },
		{
      "name": "measureId",
			"valueId": "CMS133FHIRCataracts2040BCVAwithin90Days"
    },
    {
      "name": "subject",
      "valueString": "Patient/62ea0c3d-46da-48a1-87dd-d1927ed2df75"
    }
  ]
}
  • Experiment with other inputs, but see CollectDataBrainstorming document for caveats and potential follow-up actions (bottom of document) that would make this implementation more complete

@github-actions

github-actions Bot commented Apr 1, 2026

Copy link
Copy Markdown

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements
76.7% (+2.75% 🔼)
701/914
🟡 Branches
67.34% (+4.47% 🔼)
268/398
🟡 Functions
75.64% (+4.65% 🔼)
118/156
🟡 Lines
77.02% (+2.71% 🔼)
687/892
Show new covered files 🐣
St.
File Statements Branches Functions Lines
🟢
... / collectDataUtils.js
89.66% 77.78% 100% 90.38%

Test suite run success

103 tests passing in 8 suites.

Report generated by 🧪jest coverage report action from e0adbca

@elsaperelli elsaperelli self-requested a review April 6, 2026 14:19
@elsaperelli elsaperelli self-assigned this Apr 6, 2026
@lmd59 lmd59 marked this pull request as ready for review April 14, 2026 14:04

@elsaperelli elsaperelli left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Functionality is looking great!!! Some VERY minor comments :)

Comment thread src/util/collectDataUtils.js Outdated
Comment thread src/util/collectDataUtils.js Outdated
Comment thread src/util/collectDataUtils.js Outdated
Comment thread src/util/collectDataUtils.js Outdated
Comment thread src/util/collectDataUtils.js
Comment thread src/util/collectDataUtils.js
Comment thread src/util/collectDataUtils.js Outdated
Comment thread src/util/collectDataUtils.js Outdated
Comment thread src/util/collectDataUtils.js
Comment thread src/util/collectDataUtils.js Outdated
Comment thread src/util/collectDataUtils.js Outdated
Comment thread src/util/collectDataUtils.js Outdated
Comment thread src/util/collectDataUtils.js Outdated
Comment thread src/util/collectDataUtils.js Outdated
@lmd59 lmd59 requested a review from elsaperelli April 17, 2026 15:14

@elsaperelli elsaperelli left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One last comment about adding ecqm-content-qicore-2025 to some .ignore files but otherwise it's looking good!!!

Comment thread ecqm-content-qicore-2025 Outdated
@lmd59 lmd59 requested a review from elsaperelli April 21, 2026 17:24

@elsaperelli elsaperelli left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm!!

@lmd59 lmd59 merged commit 51795d8 into main Apr 21, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants