Bug in auto management fixed

Fixed bug in updatePatientData function