cancel
Showing results for 
Search instead for 
Did you mean: 

Group Selection Filter after comparison of data

cwarner
Participant
0 Kudos

I have a Crystal Report where I need to include all patients with an office visit with the diagnosis code of 362.52.

However, that patient must also have at least one other visit where they had a procedure code of 67036.

The issue is that the diagnosis code of 362.52 and procedure code of 67036 would almost never occur at the same visit, so I would have to do some soft of group filtering.

Any help creating the correct formula field(s) and group selection formula would be appreciated!

Accepted Solutions (1)

Accepted Solutions (1)

abhilash_kumar
Active Contributor
0 Kudos

Hi Cheryl,

1. Create a formula (@Code1) with this code:

If {diag_code} = 362.52 then 1

2. Create a formula (@Code2) with this code:

If {procedure_code} = 67036 then 1

3. Add a group selection formula with this code:

Maximum({@Code1}, {PatientID}) = 1 AND

Maximum({@Code2}, {PatientID}) = 1

-Abhilash

Answers (1)

Answers (1)

cwarner
Participant
0 Kudos

Thank you!