fix medical history db bugs