Skip to content

Conversation

@lukedegruchy
Copy link
Contributor

@lukedegruchy lukedegruchy commented Feb 10, 2025

  • Support loading Measures, Libraries, and CQL included Libraries from NPM packages instead of repositories
  • Support cross-package loading functionality
  • Introduce explicit mechanism with NpmNamespaceManager to map package IDs to package URLs within a list of NamespaceInfos passed to the NamespaceManager before CQL compile, including a hard-coded version
  • Introduce R4NpmPackageLoader interface with lots of default functionality but requiring implementors to maintain loaded NPM packages as well as mechanisms to load info from measure URL, library URL and namespace infos
  • Introduce an in-memory version of the R4NpmPackageLoader for testing.
  • New tests including sample packages to capture various scenarios.
  • New REST API: $evaluate-measure-url to provide a canonical measure URL, as $evaluate-measure, which requires a measure ID as an IDType, is incompatible with this input.

@github-actions
Copy link

github-actions bot commented Feb 10, 2025

Formatting check succeeded!

@codecov
Copy link

codecov bot commented Feb 10, 2025

Codecov Report

Attention: Patch coverage is 77.55682% with 79 lines in your changes missing coverage. Please review.

Project coverage is 72.20%. Comparing base (e0987a9) to head (62bd9ac).

Files with missing lines Patch % Lines
...ds/cqf/fhir/utility/npm/NpmResourceInfoForCql.java 61.44% 29 Missing and 3 partials ⚠️
...cqf/fhir/utility/npm/NpmPackageLoaderInMemory.java 80.90% 11 Missing and 10 partials ⚠️
...opencds/cqf/fhir/cr/hapi/config/r4/CrR4Config.java 0.00% 7 Missing ⚠️
...opencds/cqf/fhir/cql/npm/NpmModelInfoProvider.java 66.66% 6 Missing ⚠️
.../cr/hapi/r4/measure/MeasureOperationsProvider.java 0.00% 6 Missing ⚠️
.../fhir/utility/npm/NpmNamespaceManagerFromList.java 0.00% 4 Missing ⚠️
...org/opencds/cqf/fhir/cql/VersionedIdentifiers.java 75.00% 0 Missing and 1 partial ⚠️
...cds/cqf/fhir/cr/measure/r4/R4MeasureProcessor.java 94.44% 0 Missing and 1 partial ⚠️
...opencds/cqf/fhir/utility/npm/NpmPackageLoader.java 94.44% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master     #628      +/-   ##
============================================
+ Coverage     72.14%   72.20%   +0.05%     
  Complexity      123      123              
============================================
  Files           469      476       +7     
  Lines         21958    22253     +295     
  Branches       2849     2873      +24     
============================================
+ Hits          15842    16067     +225     
- Misses         4705     4764      +59     
- Partials       1411     1422      +11     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

…e and associated Libraries. Add a canonical URL parameter to $evaluate-measure and use that. Start writing a test.
…ieval. Checkstyle. Rollback some old changes. Spotless. Change conditional logic to match Library with Versioned and Model identifiers. Ensure we pass down NpmResourceHolderGetter everywhere it's required.
…is passed from the downstream app. Set up new evaluate measure with URL API in clinical-reasoning.
…to its own static class: EnginesNpmLibraryHandler. Get rid of singleton and add default implementation to NpmResourceHolderGetter interface.
…m getter instead of the built Holder object and then converting the VersionedIdentifier and ModelIdentifier.
…e holder class and interface. Make clear each is just for R4.
…ure. Add direct tests in clinical-reasoning.
… loader and an InMemoryRepository. Move code to utilities so the CQL and cr packages can make use of it.
…ces configured to use NPM at the REST layer. Add TODO.
…NPM queries for Libraries and Measures and extract them to a new class: R4FhirOrNpmResourceProvider with a factory: R4FhirOrNpmResourceProviderFactory. Ensure all client code uses this new code correctly and eliminates any now redundant dependencies.
…Add convenience method to R4FhirOrNpmResourceProvider. Slightly improve error handling.
…ke use of CQL. Cleanup some dead code and TODOS. Add new TODOs.
…hough stubbing it with the no-op version in some places. Test this fully with the R4CqlExecutionService, including with a new NPM package. Start enforcing explicitly passing in the NpmPackageLoader in Engines. Start implementing namespace resolution for direct evaluation of libraries without an NPM package cache.
…lso, change the NpmPackageLoader to return an NpmNamespaceManager.
@sonarqubecloud
Copy link

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