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

(fix):Filter Queue Entries to return count of those waiting for a ser… #62

Closed
wants to merge 1 commit into from

Conversation

makombe
Copy link
Contributor

@makombe makombe commented Mar 13, 2024

…vice

Essentially the queue metrics count should only those waiting for a particular service and not those who have finished with a particular service. The counts should also match what is displayed on the table.

Screenshot from 2024-03-13 17-18-07

@makombe makombe requested a review from mseaton March 13, 2024 14:25
// Filter queueEntries where ended_at is null. The count should be for those waiting for a service
List<QueueEntry> filteredQueueEntries = queueEntries.stream().filter(entry -> entry.getEndedAt() == null)
.collect(Collectors.toList());

Copy link
Member

Choose a reason for hiding this comment

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

@makombe thanks for this PR. This endpoint does not make any assumptions about the metric being requested, and its intentionally kept generic. As you can see, it will run a search based on the request parameters passed into it, and then return the relevant count of those search results.

I assume this is attempting to fix invalid metric data on the frontend, in which case the simple fix would be to pass an additional parameter in the frontend request of isEnded=false. You can see the possible search criteria parameters in the QueueEntrySearchCriteriaParser.java class.

I recommend that we close this PR and instead make this fix in the service-queues app within patient managment.

Copy link
Member

@mseaton mseaton left a comment

Choose a reason for hiding this comment

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

See inline comment.

@makombe
Copy link
Contributor Author

makombe commented Mar 13, 2024

@mseaton I think that is ok. I will close it and handle it on the frontend.

@makombe makombe closed this Mar 13, 2024
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