improved jquery for handling multi patient id select case