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

Formula for First Two (2) cases in a room

Status
Not open for further replies.

JonathanNYC

IS-IT--Management
Mar 29, 2003
111
US
I need to generate output that identifies total number of instrument trays (by instrument tray name) required for the first two cases only in all of our operating rooms. There can sometimes be as many as eight cases in an operating room each day. On some days, there may be only one case in an operating room (a complicated spine case, for example).

As an example, we have a total of 25 operating rooms. I need to identify the names of the various instrument trays and the quantity required for each tray. Again, my maximum (for purposes of this report) cases would be 2 cases per room times 25 operating rooms.

I am able to identify the names of the trays and calculate total quanity required (but at this point I can only do this for all cases, not just the first two cases).

I need help with a formula that will restrict my search to the first two cases only in every operating room. Several of you had helped me, previously, with a formula for first cases only in a room. I am hoping I can tweak that formula, but don't know how as yet.

Here was the formula for first case in a room only (note: the "sortorder" in the expression below is the name of the operating room):

{pcmOpTime.timePatientInRoom} = minimum ({pcmOpTime.timePatientInRoom},
{pcxSchedulableResources.sortOrder})

I am using Crystal Reports 10.0 and PSSolutions (a operating room scheduling and documentation system).

Thanks in advance for your input.
 
Do a running total for the group. Suppress detail lines when the count is greater than two.

Right-click on a field and choose Insert to get a choice of Running Total or Summary. Or else use the Field Explorer, the icon that is a grid-like box, to add running totals.

Right-click on the section and choose Format Section. Then choose the formula icon (x+2 and a pencil) for suppression.


[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
Thanks Madawc, you continue to be a wonderful resource.

I have created a running total ("RTotal1") that is a distinct count of "patient in room" times for each patient in an Operating Room (e.g., OR1, OR2, etc.). I then reset on changes on Group (OR Name). Running totals per OR are displaying perfectly.

When I go to Format Section (X2 with pencil), I have the following formula:
{#RTotal1} > 2

That formula suppresses the data to the first two cases in the room - which is exactly what i want. I can't understand why I am getting the first two cases (which I want, so I certnaily shouldn't quibble) because the formula (they way I am interpreting it) seems to ask for running totals greater than two.

In any event, I've done this on my home PC (which has Crystal 8.5) and will do this on my work PC (which has Crystal 10) over the weekend.

I think this will work. Thanks very much.


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top