Patient management feature in user management module; deleting patients causes NullPointerException