-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Trunk-5220:Migrate PatientMergeAction #3090
Conversation
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.
Added few comments on formatting & mock testing. Also see our coding convention at https://wiki.openmrs.org/display/docs/Java+Conventions.
@@ -574,6 +577,13 @@ public void mergePatients(Patient preferred, Patient notPreferred) throws APIExc | |||
log.debug("Merge operation cancelled: Cannot merge user" + preferred.getPatientId() + " to self"); | |||
throw new APIException("Patient.merge.cancelled", new Object[] { preferred.getPatientId() }); | |||
} | |||
|
|||
if (patientMergeActions != null) { |
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 is this line indented one space further?
for (PatientMergeAction patientMergeAction : patientMergeActions) { | ||
patientMergeAction.beforeMergingPatients(preferred, notPreferred); | ||
} | ||
} |
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 you fix these lines so they have the same indentation has the rest of the file?
for (PatientMergeAction patientMergeAction : patientMergeActions) { | ||
patientMergeAction.afterMergingPatients(preferred, notPreferred); | ||
} | ||
} |
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.
Same as above, indentations
if (this.patientMergeActions == null) { | ||
this.patientMergeActions = new ArrayList<PatientMergeAction>(); | ||
} | ||
this.patientMergeActions.add(patientMergeAction); |
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.
Same as above, indentations
if (this.patientMergeActions == null) { | ||
this.patientMergeActions = new ArrayList<PatientMergeAction>(); | ||
} | ||
this.patientMergeActions.remove(patientMergeAction); |
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.
Same as above, indentations
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.
sure going to fix all the indentations
assertThat(patientserviceimpl.getPatientMergeActions().size(), is(0)); | ||
} | ||
|
||
private class DummyPatientMergeAction implements PatientMergeAction { |
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.
Cann't you use Mockito to mock PatientMergeAction
instead of creating a dummy class?
e8f7850
to
1877e06
Compare
@gitcliff it would be great to merge this and close it up. Can you address the feedback above and then request a final review from someone? |
tl;dr our action detected no activity on this PR and will close it in 30 days if the stale label is not removed. OpenMRS welcomes your contribution! It means a lot to us that you want to contribute to equity in healthcare! This PR has not seen any activity in the last 5 months. That is why we wanted to check whether you are still working on it or need assistance from our side. If you do not have time to continue the work or have moved on you don’t need to do anything. We will automatically close the PR in 30 days. We hope to see you back soon :) |
tl;dr closing this PR since it has not seen any activity in the last 6 months. OpenMRS welcomes your contribution! It means a lot to us that you want to contribute to equity in healthcare! We certainly do not want to discourage you from contributing. We do need to be honest in that OpenMRS has limited resources for reviewing PRs. Your PR has not seen any activity in the last 6 months. This is why we have decided to close this PR for now. This allows us OpenMRS reviewers to focus our limited time to review all other PRs in a timely and professional manner. Please feel free to reassign yourself to the issue you worked on in our JIRA when you have time to focus on it. After that reopen a new PR and we will be glad to work with you to get your contribution merged. Thank you very much for your help and understanding :) |
link:https://issues.openmrs.org/browse/TRUNK-5220
Migrate PatientMergeAction