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

Household members by age and gender measure #1383

Merged
merged 19 commits into from
Jun 29, 2022
Merged

Household members by age and gender measure #1383

merged 19 commits into from
Jun 29, 2022

Conversation

maimoonak
Copy link
Contributor

@maimoonak maimoonak commented Jun 28, 2022

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

Fixes #1309

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

@maimoonak maimoonak marked this pull request as ready for review June 28, 2022 14:35
@pld pld self-assigned this Jun 28, 2022
@@ -137,7 +137,7 @@ suspend fun FhirEngine.loadCqlLibraryBundle(
if (entry.resource.resourceType == ResourceType.Library) {
fhirOperator.loadLib(entry.resource as Library)
} else {
if (!savedResources!!.contains(resourcesBundlePath)) {
if (true /*!savedResources!!.contains(resourcesBundlePath)*/) {
Copy link
Member

Choose a reason for hiding this comment

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

why this change?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

reverted

@@ -0,0 +1,125 @@
{
Copy link
Member

Choose a reason for hiding this comment

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

is this here for testing? but loaded from remote when built?

Copy link
Member

Choose a reason for hiding this comment

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

if not do we have an issues for this? moving this and the other asset file to be loaded

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done for HH bundle. ANC is used somewhere else as well. Can not make it work from database. We can remove the ANC reports and do it gradually with each indicator added down the road

val numerator = stratum.findPopulation(NUMERATOR)?.count ?: 0
val denominator = reportGroup.findPopulation(NUMERATOR)?.count ?: 0
val percentage =
numerator.toDouble().div(if (denominator == 0) 1 else denominator) * 100.0
Copy link
Member

Choose a reason for hiding this comment

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

If the denominator is 0, can we display the percentage as "N/A"? Or does this have to be a number? Something like below but load N/A from translation, if it has to be a number we can us 0 when the denominator is 0

Suggested change
numerator.toDouble().div(if (denominator == 0) 1 else denominator) * 100.0
"N/A" if (denominator == 0) else numerator.toDouble().div(denominator) * 100

I think 100 should be fine since the first operand is a double already

@@ -155,6 +155,14 @@ constructor(
clientIdentifier = event.patientId,
questionnaireType = QuestionnaireType.DEFAULT
)
R.id.record_sick_child ->
Copy link
Member

Choose a reason for hiding this comment

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

Can we add a // TODO here with a link to an issue (or the issue if it already exists) about refactoring this to use the config when that's done

@codecov
Copy link

codecov bot commented Jun 28, 2022

Codecov Report

Merging #1383 (116c6d5) into main (23fd372) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##               main    #1383   +/-   ##
=========================================
  Coverage     62.15%   62.15%           
  Complexity      739      739           
=========================================
  Files           136      136           
  Lines          4838     4838           
  Branches        765      765           
=========================================
  Hits           3007     3007           
  Misses         1399     1399           
  Partials        432      432           
Flag Coverage Δ
engine 62.15% <ø> (ø)

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


Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 23fd372...116c6d5. Read the comment docs.

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.

lgtm!

@maimoonak maimoonak merged commit 1e31375 into main Jun 29, 2022
@maimoonak maimoonak deleted the 1309_hh_meas_rpt branch June 29, 2022 17:41
qiarie pushed a commit that referenced this pull request Jan 15, 2025
* Sick child visit

* Referral flow | Unit tests

* Unit test fixes | Structure map fixes

* ANC visit plan

* Unit test fixes

* ANC careplan completion and testing

* Update sdk versions

* Move hardcoded condition to regex | ReAdd support v4

* Fix failing tests

* Ignore test passing local failing CI

* Fix failing test

* Household members by age and gender

* Use group members for count instead of all poatients

* Spotless fix

* Load measure and lib data from database | allow assets as well
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.

[Quest/eCBIS] - Configure Quest app to view measure report for Indicator 1 - Household reporting
2 participants