Is it possible to to write a text translation that is based on a word or phrased contained in an obsterm?
For example:
if OBSANY("PRIMARY MD") contains "name" then "new name" else "" endif
or
if patient.pcp islike "name" then "new name" else "" endif
Thanks in advance for your answers!
Rich
I think you want match(), for example
match("Dr. Smith","Smith") would return the position of "Smith" or 5. If the observation contained "Smith" then it would return a value greater than zero. If "Smith" is not contained, it would return 0.
Thanks for the quick reply!
So I could use it like this... whether the field = dr. smith, john smith, r. smith, or nurse smith
{
if match(obsany("PRIMARY MD","smith"))
then fmt("Robert Smith MD","")
else ""
endif
}
Fixed the parenthesis, and you need to add > 0 to show it found "smith" in obsany(X)
Also, I added tolower, to catch smith however it is formatted Smith,smith, ... etc
if match( tolower( obsany(“PRIMARY MD”) ), ”smith”) > 0 then ...
- Beverly
that is really great!
Thanks you both very much for the help!!