cancel
Showing results for 
Search instead for 
Did you mean: 

Formula Question

cothmer
Participant
0 Kudos

Hello - I am trying to write a formula where a certain medication and route will not show on the report. This is my formula but when I add it to the report it removes all patients that had a route of 'Oral'. I only want to not show where they had 'Morphine' and a route of 'Oral'. These are 2 separate fields on the report.

not({Command.DISPLAY_NAME} like "*morphine*") and not({Command.ROUTE_NAME} like "*oral*")

Accepted Solutions (0)

Answers (1)

Answers (1)

DellSC
Active Contributor
0 Kudos

1. See this blog for information about the right way to filter data in a command (and general command info) - don't use the Select Expert with a command.

2. In the Where clause of the query, try something like this:

not(table.DISPLAY_NAME like '%morphine%' and table.ROUTE like '%oral%')

-Dell

cothmer
Participant

Thanks Christy, that worked. Did not know that about the select expert and command reports, good to know.