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

EA-208: Change Inpatient Admission and Inaptient Request endpoints to… #251

Merged
merged 2 commits into from
Nov 2, 2024

Conversation

chibongho
Copy link
Contributor

@chibongho chibongho commented Oct 31, 2024

… support searching by patient and visits

Ticket: https://openmrs.atlassian.net/browse/EA-208

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.

I'm not really sure about this @chibongho . The patientIds and visitIds is there because we were supporting existing downstream functionality to stay backwards compatible I believe. We can't change this without doing another major release potentially. We might have to deprecate and add additional methods to support uuids in parallel.

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.

Yeah, I agree with @mseaton ... and I think it should just be as simple as mapping the incoming patients and visits to their underlying ids (available via getId()) and passing them into the existing criteria?

Thanks @chibongho !

) {
RequestContext context = RestUtil.getRequestContext(request, response, Representation.DEFAULT);
InpatientRequestSearchCriteria criteria = new InpatientRequestSearchCriteria();
criteria.setVisitLocation(visitLocation);
criteria.setDispositionLocations(dispositionLocations);
criteria.setDispositionTypes(dispositionTypes);
criteria.setPatients(patients);
Copy link
Member

Choose a reason for hiding this comment

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

Can't we just map patients (and visits) to their ids here and keep the criteria the same?

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, thanks @chibongho !

@chibongho chibongho merged commit 097e9b2 into master Nov 2, 2024
1 check 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.

3 participants