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

1219 - Quest - Patient attributes and Address attributes #1224

Merged
merged 8 commits into from
May 16, 2022

Conversation

AbdulWahabMemon
Copy link
Contributor

@AbdulWahabMemon AbdulWahabMemon commented Apr 24, 2022

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

Fixes #1219

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

@codecov
Copy link

codecov bot commented Apr 24, 2022

Codecov Report

Merging #1224 (16bcdee) into main (cad25be) will decrease coverage by 0.02%.
The diff coverage is 66.66%.

@@             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     
Flag Coverage Δ
engine 75.09% <66.66%> (-0.03%) ⬇️

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

Impacted Files Coverage Δ
...fhircore/engine/util/extension/PatientExtension.kt 76.28% <66.66%> (-0.99%) ⬇️

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 cad25be...16bcdee. Read the comment docs.

@KhumboLihonga
Copy link

KhumboLihonga commented Apr 25, 2022

@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.

@ellykits
Copy link
Collaborator

Can we discuss how to include these attributes to the model that will be used in the single apk architecture?

@AbdulWahabMemon
Copy link
Contributor Author

@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.

@KhumboLihonga patient model attribute "telecom" also updated with list of strings

@AbdulWahabMemon
Copy link
Contributor Author

@dubdabasoduba for SAA refactoring and targeting with implement-generic-app-register, there is seperate PR #1239.

@AbdulWahabMemon AbdulWahabMemon marked this pull request as ready for review April 27, 2022 11:50
@@ -135,6 +135,36 @@ fun Patient.extractAddress(): String {
}
}

fun Patient.extractAddressDistrict(): String {
if (!hasAddress()) return ""
return with(addressFirstRep) { this.district ?: "" }
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 combine these 2 lines w/a ternary here and below?

return with(addressFirstRep) { this.district ?: "" } if (hasAddress()) else ""

Copy link
Contributor Author

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

* main:
  Automate app flavor release vi CI/CD (#1247)
  Fix/Refactor Quest release CI/CD configuration  (#1244)
* main:
  Migrate to latest FHIR SDK core library snapshots (#1179)
  Add test for BaseRegisterActivity (#1231)
@AbdulWahabMemon AbdulWahabMemon requested a review from pld May 16, 2022 12:35
@ellykits ellykits merged commit 8ac11e7 into main May 16, 2022
@ellykits ellykits deleted the 1219_patient_item_attributes branch May 16, 2022 13:21
AbdulWahabMemon added a commit that referenced this pull request May 17, 2022
…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
qiarie pushed a commit that referenced this pull request Jan 15, 2025
* 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
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.

Add and extract attributes to Patient model
4 participants