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

Comparison of a persons name in one field to name in another field 1

Status
Not open for further replies.

Jonathan212

IS-IT--Management
Oct 22, 2002
57
US
Our hospital policy requires that Attending Surgeon be in the Operating Room during a timeout (before the case starts) to make sure there is agreement on surgical site, laterality, etc. In case number 147,298 (see below) the Attending Surgeon was documented as being in the room during the timeout (column heading: “provider personnel in room”). In case number 148,160 the attending surgeon was not documented as being in the room during the timeout.

I would like to see only those instances when the Attending Surgeon was not documented as being in the room. The Attending Surgeon field is called “PCMSurgeon.surgeon” and the Provider Personnel in Room field is “ProvidersinRoom.Personnel”. Complicating matters, perhaps, is that data in the “Providersinroom.Personnel” field is always preceded by the word “Provider – “. Otherwise, the format is the same. So, somehow, I need to strip out or account for the extra “Provider –“during the comparison check.


Provider personnel in room Attending Surgeon Room Surgdate
Case # 147,298 AS 3 09/04/2007
Provider - MANTLE, SUZANNE DOE, JOHN
Provider - MAYS, SARAH DOE, JOHN
Provider - DOE, JOHN DOE, JOHN
Provider - CLEMENTE, JACQUES DOE, JOHN
Case # 148,160 OR 3 09/04/2007
Provider - ROBINSON, PIERRE CLEMENS, ROGER
Provider - AARON, DONNA CLEMENS, ROGER
Provider - POWELL, JAMES CLEMENS, ROGER

I am using CR10.
Any suggestions for a formula to do this?

Thanks in advance, Jonathan
 
Create a formula like this called {@match}:

if mid({ProvidersinRoom.Personnel},instr({ProvidersinRoom.Personnel},"-")+2) = {PCMSurgeon.surgeon} then 1

Then go to report->selection formula->GROUP and enter:

sum({@match},{table.case#}) = 0

This assumes you have a group on {table.case#}.

-LB

 
Wow. Incredible. Perfect. Superb.
Thanks LB !!!!!!!!!!!!!!!!!!!!!
 
LB,

Thanks for this! I've never worked with Group Selection before. Playing with it I notice if you do a regular Grand Total from a field in the detail section - it sums all records whether in the Group Selection or not, but a Running Total sums just the records that fall in the Group Selection.

Cool! Thanks again LB.

Andy
 
Andy, yes, that is the case--inserted summaries will pick up on non-group selected records, while running totals will only pick up those displayed. The interesting difference between using group selection instead of suppression is that running totals do not require conditional evaluation to eliminate the non-group selected records, while they do require conditional evaluation (via an evaluation formula) in order to ignore suppressed records.

I think of group-selected records as being "lifted" from the record pool, with the running totals running atop these lifted records, while I think of suppressed records as submerged beneath the observable pool, so that the running totals need to explicitly omit them.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top