-
Notifications
You must be signed in to change notification settings - Fork 62
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
Conversation
…nto 1345_anc_plan
@@ -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)*/) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why this change?
There was a problem hiding this comment.
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 @@ | |||
{ |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
...src/main/java/org/smartregister/fhircore/quest/ui/patient/profile/PatientProfileViewModel.kt
Outdated
Show resolved
Hide resolved
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 |
There was a problem hiding this comment.
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
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 -> |
There was a problem hiding this comment.
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 Report
@@ 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
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
* 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
IMPORTANT: Where possible all PRs must be linked to a Github issue
Fixes #1309
Checklist
strings.xml
file./gradlew spotlessApply
and./gradlew spotlessCheck
to check my code follows the project's style guide