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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Grouping multiple procedures together 1

Status
Not open for further replies.

CJP12711

MIS
Jul 23, 2001
116
US
I have a list of 4 procedures, with a code attached to each one.

Proc 1 = 123
Proc 2 = 456
Proc 3/2 = 789, 456

Proc 1 and 2 each have a single code attached to them. For proc 3, I want to find all cases that have both proc 3 and proc 2 in a case. So, if a case has only proc1, list proc one. If a case only has proc 3, ignore it. If a case has proc 3 and proc 2 in it, then list it.

Is there a simple way to do this? I have no problems listing all the procedures individually. I'm having trouble with the combination of the 2, while also listing the individual proc 1 and proc 2's. I'm using Crystal Reports 10

Thanks!!!
CJ
 
This is looking better. The details section is showing the appropriate data. The running total is still off, showing 0 for the combos...

The details section looks like this:

Case # Proc Billing Code
28570 Proc2 6791
28572 Proc2 6791
28580 Proc2 6791
28582 Proc2 6791
28588 Proc2 6791
28563 Proc1 6452
28569 Proc1 6452
28575 Proc1 6452
28584 Proc1 6452
28586 Proc1 6452
28570 Proc3 6445
28575 Proc4 7959
28578 Proc4 7959
28584 Proc4 7959

Formula of 1 and 3 is
//{@LHCandDEStent}:
if {BILLING_CODES_PROC.BILLING_CODE} in ["6445","6452"] then
{BILLING_CODES_PROC.BILLING_CODE} else
{@null}

Formula of 1 and 4 is:
//{@LHCandDEStent}:
if {BILLING_CODES_PROC.BILLING_CODE} in ["6452", "7959"] then
{BILLING_CODES_PROC.BILLING_CODE} else
{@null}

Running total for 1 and 3:
has distinctcount on caseID and a formula of:
distinctcount({@LHCandCStent},{CATH.CATHID}) >1

Running total for 1 and 4:
has distinctcount on caseID and a formula of:
distinctcount({@LHCandDEStent},{CATH.CATHID}) >1

The report footer shows the running totals correctly for proc 1 and 2, but 0 for 1 and 3 and 1 and 4...

Thanks for all your help - I really appreciate it!
 
What is the CathID? I thought you were grouping on case? The distinctcount in the running total should match the group field used in the evaluation formula.

-LB
 
I think you should recheck everything. I think this should work as is.

-LB
 
Do you see an error with my logic? I started over compeltely, but ended up with the same results.... I am grouping by case ID and putting these in the report footer, but the combo just isn't changing from 0...
 
Are you placing the formula in the evaluation section of the running total with reset = never?

Also, try placing the running total in the detail section and notice what values it is returning as it processes.

-LB
 
Thanks LB - this was all correct, but we ended up finding an issue with the DB. It was resolved, and it's working well now! There is a new requirement for this report that I will post under a new topic. Thanks so much for all your help!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top