-
Notifications
You must be signed in to change notification settings - Fork 60
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
1219 - Quest - Patient attributes and Address attributes #1224
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1224 +/- ##
============================================
- Coverage 75.11% 75.09% -0.03%
Complexity 589 589
============================================
Files 100 100
Lines 3548 3557 +9
Branches 566 572 +6
============================================
+ Hits 2665 2671 +6
Misses 511 511
- Partials 372 375 +3
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
@AbdulWahabMemon This looks great. Just a quick comment, telecom should be a List of strings as a CHW should be able to save multiple phone numbers for a patient. |
Can we discuss how to include these attributes to the model that will be used in the single apk architecture? |
@KhumboLihonga patient model attribute "telecom" also updated with list of strings |
@dubdabasoduba for SAA refactoring and targeting with implement-generic-app-register, there is seperate PR #1239. |
@@ -135,6 +135,36 @@ fun Patient.extractAddress(): String { | |||
} | |||
} | |||
|
|||
fun Patient.extractAddressDistrict(): String { | |||
if (!hasAddress()) return "" | |||
return with(addressFirstRep) { this.district ?: "" } |
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 combine these 2 lines w/a ternary here and below?
return with(addressFirstRep) { this.district ?: "" } if (hasAddress()) else ""
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.
updated the return without if statement
…tion * implement-generic-app-register: Fix failing tests; Ignore failing to be deleted test Add patient address attributes (#1224) # Conflicts: # android/engine/src/main/java/org/smartregister/fhircore/engine/util/extension/PatientExtension.kt # android/engine/src/test/java/org/smartregister/fhircore/engine/util/extension/PatientExtensionTest.kt # android/quest/src/main/java/org/smartregister/fhircore/quest/ui/patient/register/PatientItemMapper.kt # android/quest/src/test/java/org/smartregister/fhircore/quest/ui/patient/register/PatientMapperTest.kt
* 1219 - Quest - Patient attributes and Address attributes * update PatientItem telecom as list of string * revert some changes to fix failing tests * update as per reviewer comments, and fixes for coverage
IMPORTANT: Where possible all PRs must be linked to a Github issue
Fixes #1219
Checklist
strings.xml
file./gradlew spotlessApply
and./gradlew spotlessCheck
to check my code follows the project's style guide