Skip to Content
0

Formula not working correctly

4 days ago

23

avatar image

I am using the formula below. The report is still pulling patients that have the codes in bold below. Not sure what I need to do to fix it. Is there a fix ?

if ({GROUPER_RECORDS_Op.GROUPER_ID} = '100667' and {CL_ICD_PX.REF_BILL_CODE} in {GROUPER_RECORDS.GROUPER_REC_LIST})

and

({CLARITY_EDG_FinalDX.CURRENT_ICD10_LIST} in ["D78.21","D78.22","E89.810","E89.811","G97.51","G97.61","G97.52","H59.311","H59.312","H59.313","H59.319","H59.321","H59,322","H59.323","H59.329","H95.41","H95.42","I97.610","I97.611","I97.618","I97.62","J95.830","J95.831","K91.840","K91.841","L76.21","L76,22","M96.830","M96.831","N99.820","N99.821"] and {HSP_ACCT_DX_LIST.LINE} <> 1)

or

({GROUPER_RECORDS.GROUPER_ID} = '100669' and {CL_ICD_PX.REF_BILL_CODE} in {GROUPER_RECORDS.GROUPER_REC_LIST})

and

not ({CLARITY_EDG_FinalDX.CURRENT_ICD10_LIST} in ["D47.3", "D65", "D66", "D67", "D68.0", "D68.1", "D68.2", "D68.311", "D68.312", "D68.318", "D68.32", "D68.4", "D68.8", "D68.9", "D69.1", "D69.3", "D69.41", "D69.42", "D69.49", "D69.51", "D69.6", "D69.8", "D69.9"]) then true

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Dell Stinnett-Christy 4 days ago
0

Also, if this is in your selection criteria (Select Expert), get rid of the If statements. So it might look something like this:

({GROUPER_RECORDS_Op.GROUPER_ID} = '100667' and {CL_ICD_PX.REF_BILL_CODE} in {GROUPER_RECORDS.GROUPER_REC_LIST})

and

({CLARITY_EDG_FinalDX.CURRENT_ICD10_LIST} in ["D78.21","D78.22","E89.810","E89.811","G97.51","G97.61","G97.52","H59.311","H59.312","H59.313","H59.319","H59.321","H59,322","H59.323","H59.329","H95.41","H95.42","I97.610","I97.611","I97.618","I97.62","J95.830","J95.831","K91.840","K91.841","L76.21","L76,22","M96.830","M96.831","N99.820","N99.821"] and {HSP_ACCT_DX_LIST.LINE} <> 1)

or

(

({GROUPER_RECORDS.GROUPER_ID} = '100669' and {CL_ICD_PX.REF_BILL_CODE} in {GROUPER_RECORDS.GROUPER_REC_LIST})

and

not ({CLARITY_EDG_FinalDX.CURRENT_ICD10_LIST} in ["D47.3", "D65", "D66", "D67", "D68.0", "D68.1", "D68.2", "D68.311", "D68.312", "D68.318", "D68.32", "D68.4", "D68.8", "D68.9", "D69.1", "D69.3", "D69.41", "D69.42", "D69.49", "D69.51", "D69.6", "D69.8", "D69.9"])

)

When you use "If" statements in the Select Expert, there's a good chance that Crystal will process it in memory after pulling over all of the unfiltered data from the database, significantly slowing down the report. Since each of the statements themselves evaluate to True or False, you don't need "If .... Then true".

-Dell

Share
10 |10000 characters needed characters left characters exceeded
Vitaly Izmaylov
4 days ago
0

If you have "or" and "and" in selection formula then separate statements with brackets to better understand the logic.

Share
10 |10000 characters needed characters left characters exceeded