TRUNK-5466: Add support for visit locations to core domain model #5642
+210
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of what I changed
This PR moves visit-location support logic from the EMR API module into openmrs-core.
Key changes include:
supportsVisitsboolean field toLocation, defaulting to falsesupportsVisits = truefor locations tagged as "Visit Location"LocationService.getAllLocationsThatSupportVisitsVisitService.isSuitableVisit,isSuitableVisitIgnoringTimeVisitService.ensureActiveVisitandensureVisit, based on existing EMR API logicThis 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 packageright before creating this pull request.All new and existing tests passed.
My pull request is based on the latest changes of the master branch.