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

[In-app Reporting] Add MeasureReport indicator value rounding and decimal precision conf… #2644

Merged
merged 8 commits into from
Aug 8, 2023

Conversation

roywanyaga
Copy link
Contributor

@roywanyaga roywanyaga commented Aug 4, 2023

  • Add the following Fields in the ReportConfiguration class:
    • roundingStrategy
      • This will enable the implementer to provide the mode to utilize for rounding the MeasureReport indicator values. these could be:
        • TRUNCATE - The value is rounded towards the next smaller absolute value
        • ROUND_UP - The value is rounded towards the next greater absolute value
        • ROUND_OFF - The value is rounded toward the nearest absolute value. values exactly on the 0.5 (half) mark are rounded up
      • The default has been set to ROUND_UP
    • roundingPrecision
      • This will enable the implementer to provide the number (Integer) of decimal points to allow for the MeasureReport indicator values.
      • The default has been set to 0 (no decimal points)

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

Fixes #2237

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

@roywanyaga roywanyaga changed the title [In-app Reporting] Aadd MeasureReport indicator value rounding and decimal precision conf… [In-app Reporting] Add MeasureReport indicator value rounding and decimal precision conf… Aug 4, 2023
@codecov
Copy link

codecov bot commented Aug 4, 2023

Codecov Report

Merging #2644 (0961499) into main (ad3a737) will increase coverage by 0.4%.
Report is 8 commits behind head on main.
The diff coverage is 67.9%.

Impacted file tree graph

@@            Coverage Diff            @@
##              main   #2644     +/-   ##
=========================================
+ Coverage     64.5%   64.9%   +0.4%     
- Complexity    1075    1082      +7     
=========================================
  Files          218     220      +2     
  Lines         9635    9672     +37     
  Branches      1897    1906      +9     
=========================================
+ Hits          6218    6285     +67     
+ Misses        2234    2174     -60     
- Partials      1183    1213     +30     
Flag Coverage Δ
engine 72.7% <70.0%> (-0.1%) ⬇️
geowidget 65.3% <20.0%> (+1.0%) ⬆️
quest 59.6% <69.4%> (+0.7%) ⬆️

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

Files Changed Coverage Δ
...rcore/engine/util/extension/BigDecimalExtension.kt 0.0% <0.0%> (ø)
...quest/ui/report/measure/MeasureReportMainScreen.kt 0.0% <0.0%> (ø)
...rt/measure/models/MeasureReportPopulationResult.kt 25.0% <0.0%> (-12.5%) ⬇️
...er/fhircore/geowidget/screens/GeoWidgetFragment.kt 36.6% <20.0%> (+2.4%) ⬆️
.../quest/ui/report/measure/MeasureReportViewModel.kt 54.7% <45.4%> (-0.8%) ⬇️
...re/components/MeasureReportPopulationResultView.kt 76.1% <50.0%> (+0.5%) ⬆️
...hircore/engine/util/extension/MeasureExtensions.kt 48.7% <57.1%> (+1.6%) ⬆️
.../report/measure/screens/MeasureReportListScreen.kt 53.8% <59.0%> (+53.8%) ⬆️
...er/fhircore/engine/data/local/DefaultRepository.kt 69.0% <60.0%> (-0.3%) ⬇️
...ter/fhircore/quest/ui/main/components/AppDrawer.kt 67.8% <67.8%> (-0.9%) ⬇️
... and 5 more

... and 2 files with indirect coverage changes

@roywanyaga roywanyaga marked this pull request as ready for review August 8, 2023 12:28
@roywanyaga roywanyaga removed the DNM DO NOT MERGE label Aug 8, 2023
@ellykits ellykits merged commit 4913104 into main Aug 8, 2023
@ellykits ellykits deleted the 2237-report-rounding-and-precision branch August 8, 2023 14:41
@roywanyaga roywanyaga added New Feature PR label for new feature/enhancement on release notes and removed New Feature PR label for new feature/enhancement on release notes labels Aug 10, 2023
@roywanyaga roywanyaga mentioned this pull request Aug 17, 2023
11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[In-App Reporting] Have values with decimal fractions represented to one decimal place
3 participants