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

Upgrade FHIR SDK dependencies ⬆️ #3423

Merged
merged 43 commits into from
Sep 25, 2024
Merged

Upgrade FHIR SDK dependencies ⬆️ #3423

merged 43 commits into from
Sep 25, 2024

Conversation

ndegwamartin
Copy link
Contributor

@ndegwamartin ndegwamartin commented Jul 31, 2024

IMPORTANT: Where possible all PRs must be linked to a Github issue

Fixes #3421

Engineer Checklist

  • I have written Unit tests for any new feature(s) and edge cases for bug fixes
  • I have added any strings visible on UI components to the strings.xml file
  • I have updated the CHANGELOG.md file for any notable changes to the codebase
  • I have run ./gradlew spotlessApply and ./gradlew spotlessCheck to check my code follows the project's style guide
  • I have built and run the FHIRCore app to verify my change fixes the issue and/or does not break the app
  • I have checked that this PR does NOT introduce breaking changes that require an update to Content and/or Configs? If it does add a sample here or a link to exactly what changes need to be made to the content.

Code Reviewer Checklist

  • I have verified Unit tests have been written for any new feature(s) and edge cases
  • I have verified any strings visible on UI components are in the strings.xml file
  • I have verifed the CHANGELOG.md file has any notable changes to the codebase
  • I have verified the solution has been implemented in a configurable and generic way for reuseable components
  • I have built and run the FHIRCore app to verify the change fixes the issue and/or does not break the app

Copy link

codecov bot commented Jul 31, 2024

Codecov Report

Attention: Patch coverage is 22.00000% with 117 lines in your changes missing coverage. Please review.

Project coverage is 27.1%. Comparing base (2f8055b) to head (9e3ed9e).
Report is 9 commits behind head on main.

Files with missing lines Patch % Lines
.../quest/ui/report/measure/MeasureReportViewModel.kt 1.9% 50 Missing ⚠️
...est/data/report/measure/MeasureReportRepository.kt 0.0% 37 Missing ⚠️
...er/fhircore/engine/data/local/DefaultRepository.kt 50.0% 13 Missing and 4 partials ⚠️
...st/ui/report/measure/worker/MeasureReportWorker.kt 0.0% 9 Missing ⚠️
...hircore/quest/ui/appsetting/AppSettingViewModel.kt 0.0% 2 Missing ⚠️
...core/engine/configuration/ConfigurationRegistry.kt 83.3% 0 Missing and 1 partial ⚠️
...re/engine/data/remote/shared/TokenAuthenticator.kt 75.0% 0 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##              main   #3423     +/-   ##
=========================================
- Coverage     27.2%   27.1%   -0.1%     
- Complexity     749     752      +3     
=========================================
  Files          275     277      +2     
  Lines        13940   14181    +241     
  Branches      2532    2572     +40     
=========================================
+ Hits          3794    3857     +63     
- Misses        9622    9786    +164     
- Partials       524     538     +14     
Flag Coverage Δ
engine 63.8% <62.7%> (-0.6%) ⬇️
geowidget 15.4% <ø> (+2.8%) ⬆️
quest 5.6% <1.0%> (+0.1%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...ster/fhircore/engine/p2p/dao/BaseP2PTransferDao.kt 71.9% <ø> (-0.5%) ⬇️
.../fhircore/engine/p2p/dao/P2PReceiverTransferDao.kt 89.4% <100.0%> (+1.2%) ⬆️
...er/fhircore/engine/p2p/dao/P2PSenderTransferDao.kt 72.4% <100.0%> (ø)
...gister/fhircore/engine/rulesengine/RulesFactory.kt 67.0% <100.0%> (+0.1%) ⬆️
...hircore/engine/util/extension/ResourceExtension.kt 67.6% <ø> (+<0.1%) ⬆️
...core/engine/configuration/ConfigurationRegistry.kt 68.3% <83.3%> (+0.7%) ⬆️
...re/engine/data/remote/shared/TokenAuthenticator.kt 75.0% <75.0%> (-1.2%) ⬇️
...hircore/quest/ui/appsetting/AppSettingViewModel.kt 2.2% <0.0%> (-0.1%) ⬇️
...st/ui/report/measure/worker/MeasureReportWorker.kt 0.0% <0.0%> (ø)
...er/fhircore/engine/data/local/DefaultRepository.kt 59.7% <50.0%> (-5.5%) ⬇️
... and 2 more

... and 8 files with indirect coverage changes

Copy link
Contributor

@f-odhiambo f-odhiambo left a comment

Choose a reason for hiding this comment

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

This PR works as expected for the use cases I have tested

Copy link
Contributor

@f-odhiambo f-odhiambo left a comment

Choose a reason for hiding this comment

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

CQL works in ZEIR but as Measure Reporting is broken

Exception thrown with measureUrl: https://fhir.labs.smartregister.org/fhir/Measure/ClinicAttendance   
java.lang.NullPointerException: id is required on all Elements of type: Measure.group.population

KM is looking for us to provide an ID as part of the params

  /** Loads resources from IGs listed in dependencies. */
  suspend fun loadResources(
    resourceType: String,
    url: String? = null,
    id: String? = null,
    name: String? = null,
    version: String? = null,
  ):

@f-odhiambo f-odhiambo added the DNM DO NOT MERGE label Aug 1, 2024
@f-odhiambo
Copy link
Contributor

f-odhiambo commented Aug 5, 2024

@dubdabasoduba @owais-vd Can we also test this on $apply ? Aug 5th
CC @ndegwamartin

NB. Canonical names to also use URL in the upcoming update on SDK

@FikriMilano FikriMilano mentioned this pull request Aug 6, 2024
11 tasks
Copy link
Collaborator

@FikriMilano FikriMilano left a comment

Choose a reason for hiding this comment

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

Works fine, no issues so far! with 1.1.0-preview13.1-SNAPSHOT

We can merge #3428 after this PR was merged

android/gradle/libs.versions.toml Outdated Show resolved Hide resolved
@ndegwamartin
Copy link
Contributor Author

CQL works in ZEIR but as Measure Reporting is broken

Exception thrown with measureUrl: https://fhir.labs.smartregister.org/fhir/Measure/ClinicAttendance   
java.lang.NullPointerException: id is required on all Elements of type: Measure.group.population

KM is looking for us to provide an ID as part of the params

  /** Loads resources from IGs listed in dependencies. */
  suspend fun loadResources(
    resourceType: String,
    url: String? = null,
    id: String? = null,
    name: String? = null,
    version: String? = null,
  ):

From my investigations it appears that the group population id is now mandatory so you will need to include it in your measure jsons - see this sample from the FHIR SDK

I could not find any HL7 FHIR documentation to back it as a required field but I did come across this extension in some IG which introduces it as an extension - https://build.fhir.org/ig/HL7/davinci-deqm/StructureDefinition-extension-populationReference.html

Not sure why the clinical reasoning library has made it mandatory.

@ellykits
Copy link
Collaborator

There are changes made to the FhirEngineImpl methods/functions. We will no longer need the IO dispatcher in the default repository class functions.

android/gradle/libs.versions.toml Outdated Show resolved Hide resolved
FikriMilano
FikriMilano previously approved these changes Sep 13, 2024
@ndegwamartin ndegwamartin force-pushed the migrate-deps branch 4 times, most recently from 8ee27c0 to 5ed582a Compare September 24, 2024 10:32
- Disable Failing Unit Test
Copy link
Contributor

@f-odhiambo f-odhiambo left a comment

Choose a reason for hiding this comment

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

LGTM

@ndegwamartin ndegwamartin added this pull request to the merge queue Sep 25, 2024
@ndegwamartin ndegwamartin removed this pull request from the merge queue due to a manual request Sep 25, 2024
@ndegwamartin ndegwamartin merged commit 53ca669 into main Sep 25, 2024
4 of 5 checks passed
@ndegwamartin ndegwamartin deleted the migrate-deps branch September 25, 2024 08:56
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.

Dependencies Upgrade + Migration
4 participants