[Feature request] Alert before losing unsaved obs data

Hi, When the user moves from recording data for a patient to another patient without saving it, the data is lost. They system should alert the user that she might lose the data and if she would like to save the data before moving on to other patient. Switching patients is the most common usecase but in general this should be handled wherever possible.

Can this be done?

1 Like

I would have imagined that this is something users would have asked right away when they started using Bahmni. The fact that we have heard so less about it in last 1.5 years is leaving me undecided about the priority of this. But since this has to do with patient data, it is better to err on the side of being conservative and implement this anyway.

In terms of solution, some people in the team have suggested that, why don’t we implement auto-save. Everyone who has computers is getting increasingly used to not having to press save. Again since this has to do with patient data, may be it makes sense to let the user only decide what they want to do.

At the same time our users are too busy dealing with patients and if they are less annoyed it would be better for them. It is a hard decision to make as far as auto-save is concerned. I personally am lean towards letting the user decide.

I also think it’s problematic to auto-save real patient data. The ideal solution would be to auto-save in a “draft encounter transaction”, but this would require a lot of work under the hood (including in the OpenMRS API) so I’d think of it as a solution for the future.

I would vote for the simple fix of alerting if the user tries a navigation that will discard form data.

I also vote for alerting the user when they try navigating away before saving. I do exactly the same with the xforms module.

This feature is available from release 0.81