AC-480 Patient model should extend Person#586
AC-480 Patient model should extend Person#586f4ww4z merged 1 commit intoopenmrs:masterfrom its-snorlax:patient-extend-person
Conversation
Codecov Report
@@ Coverage Diff @@
## master #586 +/- ##
=========================================
+ Coverage 14.16% 14.36% +0.2%
=========================================
Files 184 185 +1
Lines 8557 8575 +18
Branches 750 751 +1
=========================================
+ Hits 1212 1232 +20
+ Misses 7270 7266 -4
- Partials 75 77 +2
Continue to review full report at Codecov.
|
f4ww4z
left a comment
There was a problem hiding this comment.
@juniorjainsahab Thanks for the PR. There's no need to create PatientDetails and PatientDto class, as the Patient class contains all the necessary setters and getters to be used in other classes. Creating new classes would just increase the complexity. Please change that, and also refer to my other comments.
...ient/src/main/java/org/openmrs/mobile/activities/addeditpatient/AddEditPatientPresenter.java
Outdated
Show resolved
Hide resolved
openmrs-client/src/main/java/org/openmrs/mobile/models/Patient.java
Outdated
Show resolved
Hide resolved
|
Creating setters for multiple fields in a class can be dangerous sometimes, One may forget to set some fields which will result in the Regarding Let me know if you think otherwise and have a suggestion on those two points. Meanwhile, I'll be fixing the unused imports issue. |
|
@juniorjainsahab What you can do is make a constructor in I think that |
|
@f4ww4z all the changes are done. |
|
@f4ww4z |
f4ww4z
left a comment
There was a problem hiding this comment.
@juniorjainsahab I left additional comments.
openmrs-client/src/main/java/org/openmrs/mobile/models/Person.java
Outdated
Show resolved
Hide resolved
|
@f4ww4z , I think there has been some change regarding play store stuff and causing both of the build services to fail. As far as I know, this is not related to my changes. Could you please verify that? |
f4ww4z
left a comment
There was a problem hiding this comment.
@juniorjainsahab Yes, it's an unexpected bug when encrypting files. It should be fixed today, afterwards I'll notify you to re-trigger the ci build.
Did you see our PR tips? Make sure to follow all guidelines.
|
@f4ww4z I have squashed all the commits into one. Please let me know if something is required from my side. |
|
@juniorjainsahab The external CI error is now fixed - please pull the latest changes from master. |
removing unused imports remove patient detail add javadocs in patient DTO trying to retrigger appveyor Revert "trying to retrigger appveyor" This reverts commit c9bf0cd. updating java docs
|
@f4ww4z now both the ci builds are passing. So it is now ready for merge. |
Description of what I changed
PatientandPersontois arelationship instead ofhas arelationship.PatientDetailsobject.personkey. So we have exposed agetPersonmethod while making any network request.Issue I worked on
After this PR,
Patientmodel is extending Person. From now onwards, we have to get patient details from the Patient itself instead of from Person.Before
After
I have already run the unit test at my local machine and all are passing successfully and I also run the application on the device and it also works the expected way.
JIRA Issue: https://issues.openmrs.org/browse/AC-480
Checklist: I completed these to help reviewers :)
(the number above, next to the 'Commits' tab is 1).
existing code that was well tested you do not have to add tests)