android-fhir icon indicating copy to clipboard operation
android-fhir copied to clipboard

Tests for Compiling CQL with Roboelectric

Open vitorpamplona opened this issue 2 years ago • 5 comments

IMPORTANT: All PRs must be linked to an issue (except for extremely trivial and straightforward changes).

Starts to fix #1365

Description Adds short tests to compile CQL into ELM, assemble ELM into a FHIR Library and making a FHIR Bundle from it.

Alternative(s) considered No

Type Testing

Screenshots (if applicable)

Checklist

  • [x] I have read and acknowledged the Code of conduct.
  • [x] I have read the Contributing page.
  • [x] I have signed the Google Individual CLA, or I am covered by my company's Corporate CLA.
  • [x] I have discussed my proposed solution with code owners in the linked issue(s) and we have agreed upon the general approach.
  • [x] I have run ./gradlew spotlessApply and ./gradlew spotlessCheck to check my code follows the style guide of this project.
  • [x] I have run ./gradlew check and ./gradlew connectedCheck to test my changes locally.
  • [x] 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 avatar May 17 '22 17:05 vitorpamplona

Codecov Report

Merging #1395 (06ff1b8) into master (aeb5259) will increase coverage by 0.15%. The diff coverage is 83.91%.

:exclamation: Current head 06ff1b8 differs from pull request most recent head 191c116. Consider uploading reports for the commit 191c116 to get more accurate results

@@             Coverage Diff              @@
##             master    #1395      +/-   ##
============================================
+ Coverage     76.53%   76.68%   +0.15%     
- Complexity      815      841      +26     
============================================
  Files           141      144       +3     
  Lines          4663     4779     +116     
  Branches        850      863      +13     
============================================
+ Hits           3569     3665      +96     
- Misses          623      635      +12     
- Partials        471      479       +8     
Impacted Files Coverage Δ
...e/views/QuestionnaireItemGroupViewHolderFactory.kt 64.70% <ø> (ø)
...gle/android/fhir/datacapture/MoreQuestionnaires.kt 72.22% <50.00%> (-2.78%) :arrow_down:
...hir/datacapture/MoreQuestionnaireItemComponents.kt 83.15% <66.66%> (-0.72%) :arrow_down:
...d/fhir/datacapture/fhirpath/ExpressionEvaluator.kt 78.65% <78.65%> (ø)
...datacapture/fhirpath/FHIRPathEngineHostServices.kt 90.00% <90.00%> (ø)
...r/datacapture/views/QuestionnaireItemHeaderView.kt 95.45% <92.85%> (+4.54%) :arrow_up:
...android/fhir/datacapture/QuestionnaireViewModel.kt 81.81% <100.00%> (+0.67%) :arrow_up:
...acapture/views/QuestionnaireGroupTypeHeaderView.kt 100.00% <100.00%> (ø)
.../fhir/workflow/FhirEngineLibraryContentProvider.kt 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

codecov[bot] avatar May 17 '22 19:05 codecov[bot]

@jingtang10 @ktarasenko I added a bunch of little improvements on documentation and code readability. I hope it helps.

vitorpamplona avatar May 18 '22 15:05 vitorpamplona

is there anything blocking this from getting merged? we're going to add some test cases on top if this pr

pld avatar Jun 21 '22 13:06 pld

hum... let me fix these conflicts.

vitorpamplona avatar Jun 21 '22 14:06 vitorpamplona

Thanks Jing!

I agree with the need to turn some of this into documentation, which frankly was what triggered this PR in the first place: people not knowing how to use the evaluator to compile and build CQL-based FHIR Libraries manually. Generating FHIRLibraries should be solved by appropriate tooling, but meanwhile, our documentation can fill the gap.

I also see good use of the testing platform to make sure the documentation is accurate and up-to-date.

vitorpamplona avatar Jul 07 '22 16:07 vitorpamplona

@vitorpamplona , since the PR has been approved, when do we intend to merge these changes?

Tarun-Bhardwaj avatar Aug 22 '22 08:08 Tarun-Bhardwaj

@vitorpamplona , since the PR has been approved, when do we intend to merge these changes?

@vitorpamplona , since the PR is approved, when can the changes get merged? CC: @jingtang10

Tarun-Bhardwaj avatar Aug 25 '22 05:08 Tarun-Bhardwaj

Superseded by https://github.com/google/android-fhir/pull/1603

vitorpamplona avatar Oct 10 '22 15:10 vitorpamplona