Auto Close Visits not working

OPD visits are not closed automatically. Scheduler entry close stale visit tasks works but visits not closed

does scheduling org.openmrs.scheduler.tasks.AutoCloseVisitsTask closes all visits including ipd enteries ?

Hi @ngoyat, Can you check these global properties : visits.autoCloseVisitType, emrapi.visitExpireHours Please refer to Bahmni WIKI for details around Close Stale Visits Task. All the configured visit types close automatically after being inactive for that specific time period. IPD Visit closes only after discharge after specific inactive time period. You can refer the below EMR-API Classes for logic around this.

i have two more queries.

  1. Can i remove compulsory last name entry from registration page? Some times patient only first name available at time of registration.
  2. Suppose if i enter fees at the time of registration then same can be edited multiple times on same day visit. Is it possible that once fees entered it can not be edited from same user and require user with higher privilege. I tried user roles but failed

No, right now openmrs mandates the family name. We understand that family name is not always mandatory. So there is request raised to remove the validation Please follow the discussion happened @ thread

I don’t think this is achieved with any of the possible configuration that system right now provides.

Hello @sravanthi17 @swathivarkala @ngoyat ,

I’m having issue on visit auto close

The “CloseStaleVisitTask” scheduler will not close any visit which has an Admit Disposition

it seems it is closing even if the visit has admit disposition. See the screenshot for disposition

@binduak @arjun @matirp235 ^

@mupagasi the patient need to be assigned to a bed, then only we can say patient is admitted. It’s nothing to do with adding disposition.

If the patient not admitted to any Bed , for system its an Open visit so schedule will close their visit

@matirp235 but in the documentation here and in the code comments here states it doesn’t close the visit if patient is admitted or waiting admission

Hello @dkayiwa @mksd @darius

do you have any idea on this? i’ve seen that you contributed on this java class.

@mupagasi what @matirp235 seems to suggest is that Bahmni does not actually set the EMR API ‘admitted’ disposition when you admit a patient in Bahmni. So the check that you pointed to in the code might just be bypassed, even if the patient is “admitted” (in Bahmni).

@mksd thanks for the clarification, any suggestion on how i can sort this out programmatically?

@mupagasi I looked around a little and it seems to be done here.

In short Bahmni sees the patient as admitted if his/her visit carries an attribute type ‘Admission Status’ set to "Admitted".

For everything to be consistent between EMR API and Bahmni Core you would need to modify setAdmissionStatus(Encounter, Visit) so that it also invokes EMR API’s api to set the admitted or discharged disposition accordingly at the same time as when it is done in Bahmni Core.

Cc @angshuonline

1 Like