Skip to content

$collect-data measureUrl#68

Merged
hossenlopp merged 4 commits into
mainfrom
collect-data_measureUrl
Apr 29, 2026
Merged

$collect-data measureUrl#68
hossenlopp merged 4 commits into
mainfrom
collect-data_measureUrl

Conversation

@hossenlopp

Copy link
Copy Markdown
Contributor

Summary

Replaces measureId parameter with canonical measureUrl parameter for $collect-data.

New behavior

measureUrl is now expected to be used to reference measures. Different versions of a measure with the same url can exist and must be specified with the version in the canonical.

Code changes

mongo.controller.js - Added findResourceByCanonical to search for resources by canonical.

Testing guidance

  • Run unit tests.
  • Test $collect-data by referencing measures by canonical url. Example parameter body using a canonical measureUrl.
    {
    "resourceType": "Parameters",
    "parameter": [
       {
       	"name": "periodStart",
       	"valueDate": "2023-01-01"
       },
       {
       	"name": "periodEnd",
       	"valueDate": "2023-12-31"
       },
       {
       	"name": "measureUrl",
       	"valueCanonical": "https://madie.cms.gov/Measure/CMS145FHIRCADBetaBlockerTherapyPriorMIorLVSD|0.4.000"
       },
       {
       	"name": "subject",
       	"valueString": "Patient/f6dafa7e-15a9-4fec-baea-59d43201caf8"
       }
      ]
    }
    
  • Clone a measure in the database changing the version for the clone. Ensure that not providing the version in the measureUrl results in an appropriate error.

@github-actions

github-actions Bot commented Apr 23, 2026

Copy link
Copy Markdown

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements
77.13% (+0.43% 🔼)
715/927
🟡 Branches
68.15% (+0.81% 🔼)
276/405
🟡 Functions 75.64% 118/156
🟡 Lines
77.46% (+0.44% 🔼)
701/905
Show files with reduced coverage 🔻
St.
File Statements Branches Functions Lines
🟢
... / export.service.js
88.83% (+0.9% 🔼)
82.46% (+1.55% 🔼)
96% (-0.15% 🔻)
88.56% (+0.93% 🔼)

Test suite run success

110 tests passing in 8 suites.

Report generated by 🧪jest coverage report action from 29cf066

@elsaperelli
elsaperelli self-requested a review April 24, 2026 14:19
@elsaperelli elsaperelli self-assigned this Apr 24, 2026
@elsaperelli
elsaperelli requested review from lmd59 and removed request for elsaperelli April 24, 2026 14:20
@elsaperelli elsaperelli assigned lmd59 and unassigned elsaperelli Apr 24, 2026

@lmd59 lmd59 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm having some trouble testing which seems unrelated to your code, but this is looking great! The one recommendation I have: it looks like this doesn't enforce the inclusion of at least one measureUrl parameter (cardinality 1..*), which we should probably include at this time.

Comment thread src/scripts/uploadPremadeBundles.js Outdated
try {
if (!searchPattern) {
searchPattern = /.json$/;
searchPattern = /-bundle.json$/;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Just since this wasn't described - looks like this change might have been updated to prevent group json (or any other non-measure, non-patient json files) from being identified?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yep... this was an accidental change as I was trying to get things to load. Will remove this.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Removed in 29cf066.

Comment thread src/server/app.js
// set bodyLimit to 50mb
function build(opts) {
const app = fastify({ ...opts, bodyLimit: 50 * 1024 * 1024 });
app.addContentTypeParser(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Great update here! 👍

@hossenlopp
hossenlopp requested a review from lmd59 April 28, 2026 21:17
@hossenlopp
hossenlopp merged commit b324105 into main Apr 29, 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.

3 participants