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!

How to find only duplicated values

Status
Not open for further replies.

BigC72

MIS
Oct 15, 2004
69
US
I am using CR 11 to access data from a DB2 database. I have only one table in my report which displays various patient information. Each patient the see's a physician at our facility should have a unique chart number but in some cases that doesn't happen so we have different patients that end up with the same chart number assigne. How can I display only instances of a chart number that appears more than once in the Patient table? Thank you....
 
That's a little scary...

Insert a group on chart number and then go to report->edit selection formula->GROUP and enter:

distinctcount({table.name},{table.chartno}) > 1

-LB
 
Yes ma'am ;-)

Hence the need for this report to get it cleared up...

Thanks I'll give that a try...
 
It would be even better if you could some other identifying number like an SSN instead of name, as you could have two versions of the same name entered into the database, e.g., with mispellings, etc.

-LB
 
LB....

Another question along the lines of what you just mentioned. We have in a lot of cases situations of where the same individual has been put into the system two different ways for example:

Patient Name AccountID SSN
Travis Hanson 0123456 123-45-6789
Travis D. Hanson 01234567

And in both cases both instances are tied back to the same chart number. I've been asked to remove those cases and display only cases where two unique people are tied to the same chart number. I've pulled in the SSN field and have tried a suppression formula like this:

{PATIENT.NAME} = previous{PATIENT.NAME}

but that doesn't seem to work even in cases where the names are exactly identical. In a lot of cases also like is demonstrated above both instances do not have a SSN listed so this wouldn't work very well for that either.

Hoping you can offer some suggestions...thanks
 
It seems like the data cleanup should happen at the database, not the report, level, but anyway. You could use a formula to convert names to first and last:

left({table.name}, instr({table.name}," ")-1)+" "+
right(({table.name}, instr(strreverse({table.name})," ")-1)

You might also use birthdates, phone numbers, or street addresses to help determine uniqueness within a chart number.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top