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

Fix issue with x-fhir-query answer expression failing #1949

Merged
merged 8 commits into from
Jan 26, 2023

Conversation

LZRS
Copy link
Contributor

@LZRS LZRS commented Jan 12, 2023

In the latest release of the sdc library, the app may crash when resolving an x-fhir-query in answer expression

Relates to google/android-fhir#1798 and #1917 (comment)

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

Fixes #[issue number]

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

@LZRS LZRS added the FHIR Core label Jan 12, 2023
@LZRS LZRS self-assigned this Jan 12, 2023
@codecov
Copy link

codecov bot commented Jan 12, 2023

Codecov Report

Merging #1949 (451fa17) into main (5008d29) will decrease coverage by 0.03%.
The diff coverage is 100.00%.

@@             Coverage Diff              @@
##               main    #1949      +/-   ##
============================================
- Coverage     56.27%   56.25%   -0.03%     
- Complexity      856      857       +1     
============================================
  Files           215      216       +1     
  Lines          8155     8158       +3     
  Branches       1524     1524              
============================================
  Hits           4589     4589              
- Misses         2697     2701       +4     
+ Partials        869      868       -1     
Flag Coverage Δ
engine 56.06% <ø> (ø)
geowidget 40.88% <ø> (ø)
quest 57.05% <100.00%> (-0.04%) ⬇️

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

Impacted Files Coverage Δ
...ter/fhircore/quest/data/QuestXFhirQueryResolver.kt 100.00% <100.00%> (ø)
...re/quest/ui/questionnaire/QuestionnaireActivity.kt 53.15% <0.00%> (-1.36%) ⬇️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@LZRS LZRS force-pushed the fix-resolving-xfhir-query-answer-expresssion branch from a4ca1e6 to d5f786e Compare January 12, 2023 13:15
@LZRS LZRS marked this pull request as ready for review January 26, 2023 07:11
@LZRS LZRS removed the Malawi CORE label Jan 26, 2023
@LZRS LZRS requested review from ndegwamartin and ellykits and removed request for ndegwamartin and ellykits January 26, 2023 07:17
ellykits
ellykits previously approved these changes Jan 26, 2023
@ellykits ellykits dismissed their stale review January 26, 2023 09:06

Requesting a change

import org.hl7.fhir.r4.model.Resource

@Singleton
class FhirXFhirQueryResolver @Inject constructor(val fhirEngine: FhirEngine) : XFhirQueryResolver {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we move this to the data package in quest application module. Looks like it is only used at the application level. Also rename the class to QuestXFhirQueryResolver

@LZRS LZRS force-pushed the fix-resolving-xfhir-query-answer-expresssion branch from 3166573 to 451fa17 Compare January 26, 2023 09:50
Copy link
Member

@pld pld left a comment

Choose a reason for hiding this comment

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

awesome work!

@pld pld dismissed ellykits’s stale review January 26, 2023 18:44

change addressed

@pld pld merged commit 3292896 into main Jan 26, 2023
@pld pld deleted the fix-resolving-xfhir-query-answer-expresssion branch January 26, 2023 18:44
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.

4 participants