All messages should be posted in plain text.  HTML will be converted to
attachments.    The meditech-l web site is MTUsers.com
======================================

I sent a message earlier in the week regarding a challenging attribute.
I want to prohibit the use of "U" as part of the response to the query
for Dose.  "27 Units" is a valid response, but "27 U" is not.
Theoretically, a valid response could end in U.

The following will find a U anywhere in the string, but does not
distinguish whether or not it is "alone" or part of a word (i.e. "U" vs
"UNIT"):
     FCL1=L(@.response,"U")'=L(@.response)

The following checks the last character of the string for "U"
     FCL1=%Z.right(@.response,1)="U"

That would probably work for most cases, but isn't specifically checking
for the criteria we want to avoid.  For example, "IU" could be a valid
option, and this attribute would flag it.

This is what I have in "LIVE" now.  So far, it seems to "work as
desired":

FCL1=IF{L(@.response,"U") L(@.response,"U")^UPOS,
[EMAIL PROTECTED](UPOS-1)'?1A&(%Z.right(@.response,1)="U")}}
[EMAIL PROTECTED](D(34)_"U"_D(34)_" is not an approved abbreviation.")

By the way, I am using a second FCL statement that does the same for
"u".

Any suggestions for improvement are appreciated.

Brian Golden, RN
Southeast Missouri Hospital
1701 Lacey St.
Cape Girardeau, MO 63701


_______________________________________________
meditech-l mailing list
[email protected]
http://mtusers.com/mailman/listinfo/meditech-l

Reply via email to