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

Compare Statement

Status
Not open for further replies.

JonathanNYC

IS-IT--Management
Mar 29, 2003
111
US
I wish to develop a way to identify date(s) that a surgeon used the operating room on days that were NOT his/her block time. My thought is that I might be able to do this with some compare formula or some statement that yielded a True/False if a certain condition was met.

As an example, if John Doe had allocated block time only on April 2, 2007 (and that was his only block time) and he operated on April 3, 2007, I want to know that. I have a 100 different surgeons so the task becomes a bit laborious if I manually check this for each day for each surgeon.

The following are fields that I think I could use in a formula (formula called “COMPARE”, in this example) to identify surgeons operating outside their block time. I would then do a selection criteria on COMPARE = False or some other variation.

“vw_pcsAllBlocks.blockOwnerName” = name of the surgeon allocated block time (e.g., Doe, John)
“vw.pcsAllBlocks.blockstarttime” = date of block (e.g., Monday, April 2, 2007)

“pcmProcedure.mdName” = surgeon name (e.g., Doe, John)
“pcmCase.surgDate” = actual date of surgery

Any recommendations or an alternative way of accomplishing this?

I am using Crystal 10.5

Thanks, in advance.
 
To clarify, are you saying that the 'block time' can extend over several days? Also there might be several per surgeon?

One way is to do a subreport at detail-line level - which will cost a lot of machine-time, of course.
For each surgery, pass the subreport details of the surgeon and date. The subreport then checks if there is a 'block time' where the start date is not greater and the end date not less.
Use Shared Variables to return an value - or have the subreport show something.

If you can use SQL and Stored Procedures, that would be a more efficient solution. Still, machine-time is cheap nowadays.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
Madawc, yes a surgeon may have multiple dates for block time. For example:

Block Owner Name: Room Block Start: Block End:

Dr. Madawc OR 16 Monday, January 1, 2007 Monday, January 1, 2007

Dr. Madawc OR 7 Monday, January 1, 2007 Monday, January 1, 2007

Dr. Madawc OR 7 Monday, January 15, 2007 Monday, January 15, 2007

I am trying to report on when Dr. Madawc operated on January 2, 2007 - a date that was not Dr. Madawc's block time.

Is there another possible solution, to running the data using 1/2/07 and comparing to the data for that surgeon in the block time allocation tables or is a subreport my only possibility?
 
Sorry, I can't see another solution.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top