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

ISSUE-21: Fix specifying count on queries via the global properties #22

Merged
merged 1 commit into from
Jan 9, 2025

Conversation

reagan-meant
Copy link
Collaborator

@samuelmale This PR has two major changes

  1. I am removing the preferredPageSize method because it is redundant. The size is being set in the constructor. See the super class here and how it sets size with the size of the patient list.

  2. I am setting the count param with the GP value seeing that different servers default to different values i.e 10. This is related to point 1 above that we never get chance to specify the count.

The rest of the changes are mainly formatting changes

Comment on lines -20 to -25
public Integer preferredPageSize() {
if (size() == null) {
setSize(globalPropertyService.getGlobalProperty(FhirConstants.OPENMRS_FHIR_DEFAULT_PAGE_SIZE, 10));
}
return size();
}
Copy link
Member

Choose a reason for hiding this comment

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

So from what you gathered, you mean this is never invoked?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@samuelmale This is invoked but never has an impact since the size will always be set via the superclass. So I am fixing this by adding the count param earlier before the query is made. See here

@samuelmale samuelmale merged commit 8597e59 into openmrs:main Jan 9, 2025
2 checks passed
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.

2 participants