finish invalid medicine query