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

Trunk-5220:Migrate PatientMergeAction #3090

Closed
wants to merge 1 commit into from

Conversation

gitcliff
Copy link
Contributor

link:https://issues.openmrs.org/browse/TRUNK-5220
Migrate PatientMergeAction

@coveralls
Copy link

coveralls commented Dec 19, 2019

Coverage Status

Coverage decreased (-0.007%) to 59.99% when pulling c792e9b on gitcliff:Trunk-5220 into bfbc32a on openmrs:master.

Copy link
Member

@PermissionError PermissionError left a 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) {
Copy link
Member

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);
}
}
Copy link
Member

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);
}
}
Copy link
Member

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);
Copy link
Member

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);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above, indentations

Copy link
Contributor Author

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 {
Copy link
Member

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?

@ibacher ibacher force-pushed the master branch 2 times, most recently from e8f7850 to 1877e06 Compare December 14, 2020 19:29
@gracepotma
Copy link

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

@github-actions
Copy link

github-actions bot commented Dec 1, 2021

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.
Please note that this is an automated message and we might very well be the reason why there has not been any activity lately. 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.

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 :)
If you would like to continue working on it or require help from us please remove the stale label and respond by commenting on the issue.

@github-actions github-actions bot added the Stale label Dec 1, 2021
@github-actions
Copy link

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 :)

@github-actions github-actions bot closed this Dec 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants