Updates to the visit admission/discharge functionality
-
[OBSOLETE] ~~In the patient record, if the user clicks on the [Discharge Patient] button, they see a list of possible discharge reasons (from the discharge_type table). If this table is empty, the "Type of discharge" header should be omitted.~~
-
In the visits registry, we should add "Discharge" items under the action menu for patients who are currently admitted (or a "Admit" for those nut currently admitted. These could also be added to the patient registry.
-
In the Visits Registry, we should add a filter for patients who are currently admitted (not discharged yet)
-
[DEFER] Do we have a way to create/edit Discharge types from the Bhima interface? Not sure that this makes sense since these are translation tokens which are translated into the current language. Obviously we could add a create/edit function for the discharge_type table, but this would not address the corresponding language tokens. It seems to me that adding a database item for these types of translation items is inefficient. We should just have a data structure somewhere in the Bhima code that has the id, and label for each discharge type. Then adding a new item would be strictly done via a code change. Now we have to do a code change and a database update. This could all be done via database tables but would require different approach since table entries would be needed for each language.
Based on PR https://github.com/IMA-WorldHealth/bhima/pull/5275, we will update all sites with the default list of discharge types (see server/models/bhima.sql). So Item 1 is no longer needed.
Although item 4 would be nice (ability for end users to create new discharge types), it would require a significant refactor and should be deferred. For the foreseeable future, to add a new discharge type will continue to require an SQL update as well as adding new items to the i18n translation files.