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

CQL combo 2.0.0 Upgrade - Full PD$apply implementation #1603

Merged
merged 87 commits into from
Oct 10, 2022

Conversation

vitorpamplona
Copy link
Collaborator

@vitorpamplona vitorpamplona commented Sep 12, 2022

Fixes #1403, #1423, #1407, #1365, #915, #656, #718
Unlocks: #1334, #1055, #1189
Depreciates: #1395

Description

This PR brings the full functionality of the $apply operator to Android.

  1. Migrates the CQL Translator, Engine, and Evaluator to version 2.0, which enables the on-device compilation of CQL as well as import/export of JSON and XML executable libraries, dependent libraries, FHIR objects, and ModelInfo.
  2. Upgrades HAPI to 6.0.1 and the project to Java 11 and min SDK 26. It removes desugaring to Java 1.8 (doubling compilation speed), reorganizes the dependency stack, and creates a new module to share workflow testing assets (code and data) between androidTest and test.
  3. FhirEngineRetrieveProvider now uses the existing XFhirQueryTranslator to automatically create filtering parameters based on previously-annotated context paths;
  4. Completes the FhirEngineRetrieveProvider and provides testing coverage for all types of filters:
    • filters by context
    • filters by code in codes
    • filters by code in ValueSets
    • filters by id in codes
    • filters by dates
  5. Completes the FhirEngineTerminologyProvider with a lookup function and reviews all other functions to behave in a similar way to a desktop version. Test cases were added to cover all desktop use cases
  6. The hard-coded active=true clause for FhirEngineRetrieveProvider searches involving Patients was deleted in favor of active=true clauses in the CQL files. CQL authors are supposed to filter active records in the CQL itself, not in the provider.
  7. Current test cases were reformatted to be property-order agnostic by using JSONAssert and XMLUnit libraries instead of hardcoding assertions in kotlin
  8. Additional test cases were pulled from Tests for Compiling CQL with Roboelectric #1395 and CQL-Evaluator's PlanDefinition module, transformed into a fluent design and included here.

Thanks to:

Alternative(s) considered
No

Type
Choose one: Feature

Checklist

  • I have read and acknowledged the Code of conduct.
  • I have read the Contributing page.
  • I have signed the Google Individual CLA, or I am covered by my company's Corporate CLA.
  • I have discussed my proposed solution with code owners in the linked issue(s) and we have agreed upon the general approach.
  • I have run ./gradlew spotlessApply and ./gradlew spotlessCheck to check my code follows the style guide of this project.
  • I have run ./gradlew check and ./gradlew connectedCheck to test my changes locally.
  • I have built and run the demo app(s) to verify my change fixes the issue and/or does not break the demo app(s).

@vitorpamplona vitorpamplona marked this pull request as ready for review September 15, 2022 23:58
@pld
Copy link
Collaborator

pld commented Oct 5, 2022

@Tarun-Bhardwaj can you give an update on this? since this is approved, and the failures seem to be network related, is it possible to go ahead and merge?

@vitorpamplona
Copy link
Collaborator Author

We also need more memory for the GitHub Actions machines. Either that or we need to stop running things in parallel with shared gradle deamon.

# Conflicts:
#	kokoro/gcp_ubuntu/kokoro_build.sh
#	workflow/build.gradle.kts
@vitorpamplona
Copy link
Collaborator Author

@jingtang10 now without the changes in the test environment (P->O), as requested.

# Conflicts:
#	catalog/build.gradle.kts
#	contrib/barcode/build.gradle.kts
#	datacapture/build.gradle.kts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Complete
Development

Successfully merging this pull request may close these issues.

Generating careplan using workflow library.
6 participants