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

RA-2036 - Provide a mechanism for modules to extend the merge visits … #224

Merged
merged 2 commits into from
May 1, 2024

Conversation

mseaton
Copy link
Member

@mseaton mseaton commented May 1, 2024

…functionality via actions

https://openmrs.atlassian.net/browse/RA-2036

@mseaton mseaton requested review from mogoodrich and dkayiwa May 1, 2024 15:50
Copy link
Member

@mogoodrich mogoodrich left a comment

Choose a reason for hiding this comment

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

LGTM, the only issue is that I can't find ticket RA-2306 in OpenMRS Jira, so either there's an issue with the search, or there was a typo in the ticket name. If so, can you correct when merging? Thanks!

@dkayiwa
Copy link
Member

dkayiwa commented May 1, 2024

@mseaton
Copy link
Member Author

mseaton commented May 1, 2024

@mogoodrich - I updated the description with a link to the ticket. I think this is right?


@Override
public void removeVisitMergeAction(VisitMergeAction visitMergeAction) {
if (this.visitMergeActions == null) {
Copy link
Member

Choose a reason for hiding this comment

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

Do we intentionally ignore cases where one tries to remove a visit merge action when we do not have any?

Copy link
Member Author

Choose a reason for hiding this comment

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

@dkayiwa I just followed exactly the same pattern as is already in place for the PatientMergeActions. I figured it was best to stay consistent.

@@ -121,6 +124,11 @@ public List<PatientMergeAction> getPatientMergeActions() {
return patientMergeActions;
}

// for testing
public List<VisitMergeAction> getVisitMergeActions() {
Copy link
Member

Choose a reason for hiding this comment

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

How about getting rid of this method and use reflection to access the property in the test?

Copy link
Member Author

Choose a reason for hiding this comment

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

Again, this is just copying the existing pattern in place. I've changed the method scope to be narrower, so it is no longer a public method. but I see no harm in this method being here...

@mseaton mseaton merged commit c3824e5 into master May 1, 2024
1 check passed
@mseaton mseaton deleted the RA-2036 branch May 1, 2024 16:54
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.

3 participants