Third-Culture-Software / bhima

A hospital information management application for rural Congolese hospitals
https://docs.bhi.ma/
GNU General Public License v2.0
220 stars 105 forks source link

Updates to prevent marking a male patient pregnant during admission #7881

Closed jmcameron closed 6 days ago

jmcameron commented 1 week ago

Prevent marking a male patient as pregnant during admission.

This PR prevents the "Is pregnant" yes/no selection from being displayed for male patients during admission. It also:

Closes https://github.com/Third-Culture-Software/bhima/issues/7847

Note that I considered the comment in the issue:

"I'm not 100% sure if we should block this case, since it could be that the patient's sex was registered incorrectly and should be updated instead... but I'm willing to hear proposals for best practice around this. Ultimately, I assume it should be a fairly rare event."

I tried a "Danger" message, but had to close the new visit dialog for that to work, which was confusing. I also tried a secondary Modal popup with a warning message, but had other issues.

Hopefully this error is rare and the data entry person will realize the problem if a woman cannot be marked as pregnant. Perhaps one way to address this is to insert a line below the patient identifier line with patient sex, age, etc, when a patient is selected. That should make the problem a little clearer to the data entry person. That could be done as part of this PR or as a separate issue.

TESTING