update patch script

- update the patch script query that does test entry comparision
  to allow matching on words and not their ids