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

Refactor questionnaire implementation #2622

Merged
merged 36 commits into from
Aug 2, 2023
Merged

Conversation

ellykits
Copy link
Collaborator

@ellykits ellykits commented Jul 26, 2023

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

Fixes #2543
Fixes #2470
Fixes #2282

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

ellykits added 22 commits July 13, 2023 11:55
Signed-off-by: Elly Kitoto <junkmailstoelly@gmail.com>
Signed-off-by: Elly Kitoto <junkmailstoelly@gmail.com>
Signed-off-by: Elly Kitoto <junkmailstoelly@gmail.com>
Signed-off-by: Elly Kitoto <junkmailstoelly@gmail.com>
Signed-off-by: Elly Kitoto <junkmailstoelly@gmail.com>
Signed-off-by: Elly Kitoto <junkmailstoelly@gmail.com>
Signed-off-by: Elly Kitoto <junkmailstoelly@gmail.com>
Signed-off-by: Elly Kitoto <junkmailstoelly@gmail.com>
Signed-off-by: Elly Kitoto <junkmailstoelly@gmail.com>
Signed-off-by: Elly Kitoto <junkmailstoelly@gmail.com>
Signed-off-by: Elly Kitoto <junkmailstoelly@gmail.com>
Signed-off-by: Elly Kitoto <junkmailstoelly@gmail.com>
Signed-off-by: Elly Kitoto <junkmailstoelly@gmail.com>
Signed-off-by: Elly Kitoto <junkmailstoelly@gmail.com>
Signed-off-by: Elly Kitoto <junkmailstoelly@gmail.com>
Display alert dialog when launching/performing extraction

Signed-off-by: Elly Kitoto <junkmailstoelly@gmail.com>
@ellykits ellykits added DNM DO NOT MERGE Work In Progress Describes an items that is not complete. Mostly used for scoping issues of discussions labels Jul 26, 2023
@ellykits ellykits self-assigned this Jul 26, 2023
@ellykits
Copy link
Collaborator Author

ellykits commented Jul 26, 2023

To be fixed before removing the draft:

  • Test remove resource functionality via Questionnaire submission (test remove Group + Group members & Patient etc)
  • Fix issue with new resources getting created when Questionnaire is launched in Edit mode.
  • Fix tests
  • Clean up the refactored classes.

ellykits added 3 commits July 26, 2023 20:20
Signed-off-by: Elly Kitoto <junkmailstoelly@gmail.com>
Signed-off-by: Elly Kitoto <junkmailstoelly@gmail.com>
Signed-off-by: Elly Kitoto <junkmailstoelly@gmail.com>
Signed-off-by: Elly Kitoto <junkmailstoelly@gmail.com>
@codecov
Copy link

codecov bot commented Jul 26, 2023

Codecov Report

Merging #2622 (0c2916d) into main (d84c2c8) will decrease coverage by 0.8%.
Report is 34 commits behind head on main.
The diff coverage is 63.9%.

Impacted file tree graph

@@            Coverage Diff            @@
##              main   #2622     +/-   ##
=========================================
- Coverage     65.4%   64.6%   -0.8%     
+ Complexity    1101    1075     -26     
=========================================
  Files          213     217      +4     
  Lines         9385    9555    +170     
  Branches      1866    1885     +19     
=========================================
+ Hits          6140    6176     +36     
- Misses        2047    2206    +159     
+ Partials      1198    1173     -25     
Flag Coverage Δ
engine 72.9% <68.6%> (-0.2%) ⬇️
geowidget 64.3% <37.5%> (+1.0%) ⬆️
quest 58.9% <59.2%> (-1.5%) ⬇️

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

Files Changed Coverage Δ
...ter/fhircore/engine/configuration/Configuration.kt 25.0% <ø> (ø)
...ngine/configuration/event/EventTriggerCondition.kt 50.0% <0.0%> (ø)
...ircore/engine/configuration/event/EventWorkflow.kt 33.3% <0.0%> (ø)
...ngine/configuration/view/PersonalDataProperties.kt 0.0% <0.0%> (ø)
...hircore/engine/configuration/view/RowProperties.kt 0.0% <ø> (ø)
...ine/configuration/view/ViewPropertiesSerializer.kt 23.8% <0.0%> (ø)
...data/remote/fhir/resource/FhirResourceConverter.kt 100.0% <ø> (ø)
...e/data/remote/fhir/resource/FhirResourceService.kt 0.0% <0.0%> (ø)
...hircore/engine/domain/model/FhirResourceConfigs.kt 44.4% <0.0%> (ø)
...rtregister/fhircore/engine/sync/SyncBroadcaster.kt 33.3% <0.0%> (ø)
... and 132 more

... and 26 files with indirect coverage changes

ellykits added 7 commits July 27, 2023 18:02
Signed-off-by: Elly Kitoto <junkmailstoelly@gmail.com>
Signed-off-by: Elly Kitoto <junkmailstoelly@gmail.com>
Signed-off-by: Elly Kitoto <junkmailstoelly@gmail.com>
Signed-off-by: Elly Kitoto <junkmailstoelly@gmail.com>
Signed-off-by: Elly Kitoto <junkmailstoelly@gmail.com>
@ellykits ellykits removed the DNM DO NOT MERGE label Aug 1, 2023
Signed-off-by: Elly Kitoto <junkmailstoelly@gmail.com>
@ellykits ellykits marked this pull request as ready for review August 1, 2023 13:47
@pld pld merged commit e8fdc08 into main Aug 2, 2023
@pld pld deleted the refactor-questionnaire-implementation branch August 2, 2023 16:46
AbdulWahabMemon added a commit that referenced this pull request Aug 7, 2023
* main:
  Make SideMenu items scrollable (#2645)
  Add progress indicator for report generation (#2635)
  CHT measure report result screen (#2624)
  Provide missing QuestionnaireResponse in bundle param for FhirCarePlanGenerator#conditionallyUpdateResourceStatus (#2643)
  Fix resource closure failure after server sync (#2639)
  Fix build
  add more further reading (#2637)
  Refactor questionnaire implementation (#2622)
  Fix Unit Tests + Build 💚
  Fix Unit Tests ✅
  Clean up
  Fix Unit tests ✅
  Updating the login flow to save multiple practitioner details (#2623)
  Disable Dialog Dismiss Incase of Initial Sync Errors (#2608)
  Add the new ecbis production flavor
  Performance tests for loading register data (#2592)
  Fix back navigation for date selection page (#2628)
  Create github release file (#2611)
  Add form authoring consideration documentation (#2618)
qiarie pushed a commit that referenced this pull request Jan 15, 2025
* Implement QuestionnaireFragment and ViewModel

Signed-off-by: Elly Kitoto <junkmailstoelly@gmail.com>

* Implement logic for perfroming extraction

Signed-off-by: Elly Kitoto <junkmailstoelly@gmail.com>

* Fix extraction

Signed-off-by: Elly Kitoto <junkmailstoelly@gmail.com>

* Clean up code

Signed-off-by: Elly Kitoto <junkmailstoelly@gmail.com>

* Fix retrieval of subjectType

Signed-off-by: Elly Kitoto <junkmailstoelly@gmail.com>

* Register questionnaire fragment listner after rendering

Signed-off-by: Elly Kitoto <junkmailstoelly@gmail.com>

* Use SupervisorJob on coroutine

Signed-off-by: Elly Kitoto <junkmailstoelly@gmail.com>

* Register group member

Signed-off-by: Elly Kitoto <junkmailstoelly@gmail.com>

* Fix NoSuchElementException

Signed-off-by: Elly Kitoto <junkmailstoelly@gmail.com>

* Configure deletion of resources via Questionnaire submission

Signed-off-by: Elly Kitoto <junkmailstoelly@gmail.com>

* Launch refactored questionnaire activity

Signed-off-by: Elly Kitoto <junkmailstoelly@gmail.com>

* Disable dark mode on all activities

Signed-off-by: Elly Kitoto <junkmailstoelly@gmail.com>

* Implement functionality to populate resources

Signed-off-by: Elly Kitoto <junkmailstoelly@gmail.com>

* Populate Questionnaire with previous responses

Signed-off-by: Elly Kitoto <junkmailstoelly@gmail.com>

* Retrieve existing subject

Signed-off-by: Elly Kitoto <junkmailstoelly@gmail.com>

* Show progress indicators

Display alert dialog when launching/performing extraction

Signed-off-by: Elly Kitoto <junkmailstoelly@gmail.com>

* Refactor QuestionnaireActivity and QuestionnaireViewModel classes

Signed-off-by: Elly Kitoto <junkmailstoelly@gmail.com>

* Configure setting Barcode on Questionnaire

Signed-off-by: Elly Kitoto <junkmailstoelly@gmail.com>

* Reinstate code for setting inital expression

Signed-off-by: Elly Kitoto <junkmailstoelly@gmail.com>

* Delete unused xml layout

Signed-off-by: Elly Kitoto <junkmailstoelly@gmail.com>

* Fix setting subject

Signed-off-by: Elly Kitoto <junkmailstoelly@gmail.com>

* Fix updating resources

Signed-off-by: Elly Kitoto <junkmailstoelly@gmail.com>

* Refactor engine module failing tests

Signed-off-by: Elly Kitoto <junkmailstoelly@gmail.com>

* Refactor QuestionnaireViewModelTest

Signed-off-by: Elly Kitoto <junkmailstoelly@gmail.com>

* Write test for QuestionnaireViewModel#handleQuestionnaireSubmission

Signed-off-by: Elly Kitoto <junkmailstoelly@gmail.com>

* Write test for QuestionnaireActivity

Signed-off-by: Elly Kitoto <junkmailstoelly@gmail.com>

* Test QuestionnaireActivity#onBackPress

Signed-off-by: Elly Kitoto <junkmailstoelly@gmail.com>

---------

Signed-off-by: Elly Kitoto <junkmailstoelly@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Work In Progress Describes an items that is not complete. Mostly used for scoping issues of discussions
Projects
None yet
2 participants