bhima icon indicating copy to clipboard operation
bhima copied to clipboard

Updates to the visit admission/discharge functionality

Open jmcameron opened this issue 5 years ago • 1 comments

  1. [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.~~

  2. 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.

  3. In the Visits Registry, we should add a filter for patients who are currently admitted (not discharged yet)

  4. [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.

jmcameron avatar Dec 10 '20 23:12 jmcameron

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.

jmcameron avatar Jan 11 '21 15:01 jmcameron