Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Selection formula help please - Crystal XI 1

Status
Not open for further replies.

jpeters01

Technical User
Dec 5, 2007
109
US
I need a selection formula that selects all medications where:
{PatientMedication.ROUTE} does NOT equal "FNB" and {PatientMedication.COMPUTED_FREQUENCYSIG} is NOT like *AS*NEEDED* or *PRN*. Either one or both of these fields can be null.

The formula below works EXCEPT if the {PatientMedication.ROUTE} is null and the {PatientMedication.COMPUTED_FREQUENCYSIG} is PRN.

isnull ({PatientMedication.ROUTE}) or
{PatientMedication.ROUTE}<> "FNB" and
(isnull({PatientMedication.COMPUTED_FREQUENCYSIG}) or
({PatientMedication.COMPUTED_FREQUENCYSIG} = ' ')) or
not ({PatientMedication.COMPUTED_FREQUENCYSIG} like ["*AS*NEEDED*", "*PRN*"])

Your help would be very much appreciated!




 
(
(
isnull ({PatientMedication.ROUTE}) or
{PatientMedication.ROUTE} <> "FNB"
) and
(
isnull({PatientMedication.COMPUTED_FREQUENCYSIG}) or
trim({PatientMedication.COMPUTED_FREQUENCYSIG}) = '' or
not ({PatientMedication.COMPUTED_FREQUENCYSIG} like ["*AS*NEEDED*", "*PRN*"])
)
)

-LB
 
That worked perfectly!!! :) I really tried to figure this out but don't know if I will ever get where to put the parentheses, and's and or's. Will look at your solution in the morning when I am not so bleary eyed. Thank you!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top