Skip to Content

Crystal Formula

I have a report where I am trying to only pull patients that have both of the orders below. The report keeps giving me all patients, I don't think it is reading the formula correctly. What is the correct way to write this ? Thanks in advance.

If
({ORDER_PROC.PROC_CODE} in ['LAB48','LAB178','LAB2074','LAB358','LAB359','LAB48'] and
{ORDER_PROC.PROC_CODE} in ['LAB99','LAB2119'])
then true

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Nov 21, 2016 at 09:27 PM

    Hi Curt,

    The formula is looking for any one with any of these codes. It's not looking at each set separately. So we need to separate them like:

    If {ORDER_PROC.PROC_CODE} in ['LAB48','LAB178','LAB2074','LAB358','LAB359','LAB48'] Then 
         If {ORDER_PROC.PROC_CODE} in ['LAB99','LAB2119'] Then 
              True 
         Else False 
    Else False; 
    

    Good luck,

    Brian

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 21, 2016 at 10:17 PM

    I tried the formula. I have a patient that has an order in both but it comes up 'false', it should be 'true'. Am I missing something ?

    Add comment
    10|10000 characters needed characters exceeded