Skip to content

Conversation

@vimla01
Copy link

@vimla01 vimla01 commented Jan 5, 2026

Description of what I changed

This PR moves visit-location support logic from the EMR API module into openmrs-core.

Key changes include:

  • Added a required supportsVisits boolean field to Location, defaulting to false
  • Added a Liquibase migration to backfill supportsVisits = true for locations tagged as "Visit Location"
  • Added LocationService.getAllLocationsThatSupportVisits
  • Added VisitService.isSuitableVisit, isSuitableVisitIgnoringTime
  • Added VisitService.ensureActiveVisit and ensureVisit, based on existing EMR API logic

This aligns core behavior with how visit locations are handled in Reference Application and Mirebalais.

Issue I worked on

see https://issues.openmrs.org/browse/TRUNK-5466

Checklist: I completed these to help reviewers :)

  • My IDE is configured to follow the code style of this project.

  • I have added tests to cover my changes.

  • I ran mvn clean package right before creating this pull request.

  • All new and existing tests passed.

  • My pull request is based on the latest changes of the master branch.

@vimla01
Copy link
Author

vimla01 commented Jan 5, 2026

@djazayeri
Hi! This PR is ready for review.
Please let me know if any changes are needed. Thanks!

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.

1 participant