-
Notifications
You must be signed in to change notification settings - Fork 324
Workflow Library: Implementing Library.evaluate and first androidTest suite #1326
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
Conversation
Generalization of FhirEngineRetrieveProvider
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). For more information, open the CLA check for this pull request. |
ktarasenko
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing, thanks for adding this!
...low/src/androidTest/java/com/google/android/fhir/workflow/FhirOperatorLibraryEvaluateTest.kt
Show resolved
Hide resolved
...low/src/androidTest/java/com/google/android/fhir/workflow/FhirOperatorLibraryEvaluateTest.kt
Outdated
Show resolved
Hide resolved
...low/src/androidTest/java/com/google/android/fhir/workflow/FhirOperatorLibraryEvaluateTest.kt
Outdated
Show resolved
Hide resolved
workflow/src/main/java/com/google/android/fhir/workflow/FhirEngineRetrieveProvider.kt
Show resolved
Hide resolved
...low/src/androidTest/java/com/google/android/fhir/workflow/FhirOperatorLibraryEvaluateTest.kt
Outdated
Show resolved
Hide resolved
workflow/src/main/java/com/google/android/fhir/workflow/FhirEngineRetrieveProvider.kt
Outdated
Show resolved
Hide resolved
workflow/src/main/java/com/google/android/fhir/workflow/FhirEngineRetrieveProvider.kt
Show resolved
Hide resolved
workflow/src/main/java/com/google/android/fhir/workflow/FhirEngineRetrieveProvider.kt
Show resolved
Hide resolved
workflow/src/main/java/com/google/android/fhir/workflow/FhirEngineRetrieveProvider.kt
Show resolved
Hide resolved
Codecov Report
@@ Coverage Diff @@
## master #1326 +/- ##
=========================================
Coverage 85.72% 85.72%
Complexity 716 716
=========================================
Files 149 149
Lines 10760 10760
Branches 858 858
=========================================
Hits 9224 9224
Misses 1095 1095
Partials 441 441 Continue to review full report at Codecov.
|
jingtang10
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks @vitorpamplona - around tests what i'm really concerned about is just that if the tests start failing, will someone be able to step in and debug the test. if the tests are super complex with a lot of artifacts, it'll be super hard. that's why i'm always pushing for minimum tests. thanks for making that change.
additionally, can you add a little more comment on where the cql lib came from and how that's generated etc in the code comment? i know you can't add comment in json, so adding explanatino in the test file is good enough.
otherwise looking good. just have another small nit.
happy to merge if these are addressed.
workflow/src/main/java/com/google/android/fhir/workflow/FhirOperator.kt
Outdated
Show resolved
Hide resolved
...low/src/androidTest/java/com/google/android/fhir/workflow/FhirOperatorLibraryEvaluateTest.kt
Show resolved
Hide resolved
I completely agree. Test structures for most of these CQL evaluation tasks are quite complex. I added PR #1395 to help understand this Test Case. It goes through the steps of Compiling CQL, generating the FHIR Library and making the bundle, which are necessary to call evaluate functions. As you can probably see, these are not really Unit tests. It's more of an integration test than anything else. I think moving forward, when the CQL compilation becomes available in the SDK, we can redesign these tests to go from reading CQL directly and running on it - masking all the intermediary processes and hopefully facilitating the understanding of what's happening. Once CQL compilation is available, we can also start breaking tests down to individual evaluation features. Right now it would be too much complexity and duplicated test resources to handle. |
…ng the CQLEvaluator steps being tested
| * and not exists(I.protocolApplied.seriesDoses.value) | ||
| * ``` | ||
| */ | ||
| @Test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jingtang10 see if this description for the LibraryEvaluate test makes it clear.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks this is helpful.
Head branch was pushed to by a user without write access
Head branch was pushed to by a user without write access
Description
Implemented FhirOperator.evaluateLibrary function
Connected the LibraryProcessor to the FhirEngine's local DB, matching evaluateMeasure
Generalized FhirEngineRetrieveProvider to work with any FHIR Model
Added the first androidTests with a simple COVID Immunization check
IMPORTANT: All PRs must be linked to an issue (except for extremely trivial and straightforward changes).
Fixes #[issue number]
Clear and concise code change description.
Alternative(s) considered
Have you considered any alternatives? And if so, why have you chosen the approach in this PR?
Type
Choose one: Feature
Screenshots (if applicable)
Checklist
./gradlew spotlessApplyand./gradlew spotlessCheckto check my code follows the style guide of this project../gradlew checkand./gradlew connectedCheckto test my changes locally.