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

BAH-2647 | Already active Visits not allowed to create again #564

Merged
merged 14 commits into from
Jul 31, 2023

Conversation

atish160384
Copy link
Contributor

  • If the visit of same patient at same location already exists then it is not allowed to create visit again.

@@ -87,6 +87,7 @@
"MESSAGE_DIALOG_OPTION_COPY" : "Copy Error",
"MESSAGE_DIALOG_OPTION_OKAY": "OK",
"NO_LOCATION_TAGGED_TO_VISIT_LOCATION": "No location tagged to Visit Location Found",
"VISIT OF THIS PATIENT AT SAME LOCATION EXISTS": "Vist of this patient at same location already exists",
Copy link
Contributor

Choose a reason for hiding this comment

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

Keys are having spaces! it will be good if spaces are replaced by underscore

@atish160384 atish160384 requested a review from gokultw May 12, 2023 06:56
@gsluthra
Copy link
Contributor

gsluthra commented May 16, 2023

This check has been added in the UI codebase, and not in the backend. I think this is incorrect. The UI codebase is just ONE browser client. Ideally this is domain/business logic, which should be in backend, so that once a visit is started by ANY client, no one else should be able to start a visit for the same visit location. I think this code should be in bahmni-core and not in bahmniapps.

Also, need to validate with @angshu. Locations can have hierarchy. E.g
Apollo Hospital -> OPD Department -> ClinicA, ClinicB, ClinicC
Apollo Hospital -> IPD Department

There is some expectation that one visit can only be started in one sub-tree. But another visit can be started in another sub-tree. For instance the same patient can have parallel visits in OPD and IPD, but only one visit at a time within OPD/IPD.

@gokultw
Copy link
Contributor

gokultw commented May 16, 2023

We have a different card for Backend fix. https://bahmni.atlassian.net/browse/BAH-1784
We had a discussion with Angshu and decided that we will not fix that. form openmrs it is the expected behaviour to have multiple visits in same location.

# Conflicts:
#	ui/app/i18n/registration/locale_es.json
#	ui/app/i18n/registration/locale_pt_BR.json
@atish160384 atish160384 requested a review from gsluthra May 30, 2023 11:07
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ atish3101
❌ atish160384
You have signed the CLA already but the status is still pending? Let us recheck it.

@rahu1ramesh rahu1ramesh merged commit a264d7f into master Jul 31, 2023
1 check passed
@rahu1ramesh rahu1ramesh deleted the BAH-2647 branch July 31, 2023 05:41
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.

6 participants