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

Retrieve ServiceStatus from a list of Tasks #2715

Merged
merged 7 commits into from
Aug 6, 2024
Merged

Conversation

AbdulWahabMemon
Copy link
Contributor

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

Fixes #[issue number] or Closes #[issue number]

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

Sorry, something went wrong.

# Conflicts:
#	android/engine/src/test/java/org/smartregister/fhircore/engine/rulesengine/RulesEngineServiceTest.kt
@AbdulWahabMemon AbdulWahabMemon requested a review from ageryck May 13, 2024 12:59
@AbdulWahabMemon
Copy link
Contributor Author

@ageryck
this PR is updated with main,
raised for generatingTaskList from list of Task,
use case : showing member tasks status for household item

Copy link

codecov bot commented May 13, 2024

Codecov Report

Attention: Patch coverage is 60.00000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 27.1%. Comparing base (490c294) to head (a207e74).

Files Patch % Lines
...gister/fhircore/engine/rulesengine/RulesFactory.kt 60.0% 1 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##              main   #2715   +/-   ##
=======================================
  Coverage     27.0%   27.1%           
  Complexity     720     720           
=======================================
  Files          269     269           
  Lines        13517   13522    +5     
  Branches      2433    2434    +1     
=======================================
+ Hits          3662    3665    +3     
- Misses        9373    9374    +1     
- Partials       482     483    +1     
Flag Coverage Δ
engine 64.6% <60.0%> (-0.1%) ⬇️
geowidget 11.4% <ø> (ø)

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

Files Coverage Δ
...gister/fhircore/engine/rulesengine/RulesFactory.kt 66.9% <60.0%> (-0.2%) ⬇️

@ageryck ageryck marked this pull request as ready for review May 13, 2024 18:02
@ageryck ageryck requested a review from ellykits May 13, 2024 18:03
@ellykits ellykits changed the title taskList status for Household item in hh-register, from 0.2.5 Retrieve ServiceStatus from a list of Tasks Aug 6, 2024
@ellykits
Copy link
Collaborator

ellykits commented Aug 6, 2024

Sample

 {
        "name": "serviceStatus",
        "condition": "true",
        "priority": 2,
        "actions": [
          "data.put('serviceStatus', service.taskServiceStatusExist(availableTasks, 'OVERDUE') == true ? 'OVERDUE': service.taskServiceStatusExist(availableTasks, 'DUE') == true ? 'DUE' : 'DUE')"
        ]
      }

Where,tasks refers to the List of Tasks loaded via FhirResourceConfig. E.g.

 {
            "id": "tasks",
            "resource": "Task",
            "searchParameter": "subject"
 },

@ellykits ellykits enabled auto-merge August 6, 2024 14:29
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

@f-odhiambo f-odhiambo disabled auto-merge August 6, 2024 17:45
@f-odhiambo f-odhiambo merged commit 8711045 into main Aug 6, 2024
4 of 5 checks passed
@f-odhiambo f-odhiambo deleted the hh-task-list-status branch August 6, 2024 17:45
qiarie pushed a commit that referenced this pull request Jan 15, 2025
* taskList status for Household item in hh-register, from 0.2.5

* Refactor getting status from list of Tasks

Signed-off-by: Elly Kitoto <[email protected]>

* Format code

Signed-off-by: Elly Kitoto <[email protected]>

---------

Signed-off-by: Elly Kitoto <[email protected]>
Co-authored-by: Ager Wasongah <[email protected]>
Co-authored-by: Elly Kitoto <[email protected]>
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.

None yet

4 participants