Skip to content

Evaluate Measure Against Patient Bundles #2

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

Merged
merged 20 commits into from
Jan 11, 2023
Merged

Conversation

radamson
Copy link
Contributor

@radamson radamson commented Nov 22, 2022

Summary

Incredibly basic functionality demonstrating execution of Measure against a patient bundle using fqm-execution against possible. This implementation will need to evolve as we integrate it with the bulk-data client.

Details

Adds src/fqm.ts which provides 3 new methods:

  • loadBundleFromFile - loads a FHIR Bundle from a json file.
  • calculateMeasureReports - evaluates Measure against a patient bundle.

There are a few other changes included related to testing:

  • Added a jest.config.js to enable ts-jest.
    • the testMatch attribute is only included so that tests in the build directory are not picked up. We could remove this because tests are no longer included in the build.
  • Added a test:coverage script to package.json to collect test coverage metrics
  • Updated tsconfig to exclude test files in the build. We could put our tests in another directory instead (this is matter of opinion/taste, but jest getting started docs include tests alongside code. 🤷)

Copy link
Contributor

@sarahmcdougall sarahmcdougall left a comment

Choose a reason for hiding this comment

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

In regard to the testing setup, I’m used to having a separate directory for test files, but I think it makes sense to keep the tests alongside our code since we aren’t working with many files in src right now - we can always restructure things if it becomes unruly to have the tests alongside code. For now, though, the current approach looks good.

Something that warrants a larger discussion is the inclusion of ValueSets in the CMS122 measure bundle. There are licensing/legal issues behind checking in expanded ValueSets to Github, so I’m unsure about whether it’s plausible to have a measures directory with the measures we want to test against (this sounds a little hypocritical since fqm-execution currently has measure bundles checked in but we have it on the list of to-do’s to get rid of them - I actually just became aware of this licensing issue a few months ago). Even though the ecqm-content repositories include the measure bundles with ValueSets included, their licensing is likely different from ours. Maybe we should reach out to Sam to see if he has any insight on this since I do not know the specifics of ValueSet licensing in relation to ONC. If it turns out that we shouldn’t be committing the full CMS122 measure bundle, we can make a simplified test case for now to use with unit tests.

@radamson radamson changed the title Evaluate CMS122 Against Patient Bundle Evaluate Measure Against Patient Bundles Jan 10, 2023
@radamson radamson mentioned this pull request Jan 11, 2023
Copy link
Contributor

@sarahmcdougall sarahmcdougall left a comment

Choose a reason for hiding this comment

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

The added fixtures and updated functions/unit tests look good 👍 Good call on updating the README to node version 17 for now. The package.lock on this branch lists fqm-execution 1.0.2. Version 1.0.3 has been released so we should update the package-lock soon, but we can do that in one of the other open PRs so that this one gets merged and so that we have time to rebase all other branches before the Connectathon

@sarahmcdougall sarahmcdougall merged commit a33fcb4 into main Jan 11, 2023
@sarahmcdougall sarahmcdougall deleted the eval-measure branch January 11, 2023 19:39
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