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, Fomula to use for

Status
Not open for further replies.

Jonathan212

IS-IT--Management
Oct 22, 2002
57
US
I would like to see (for various completed surgery dates) whether a surgeon used the pre-allocated operating room time given to them or not.

I have a table called “psallblocks” which has a field called “blockownername” (which is the name of the MD) and “scheduledstart” (which is the applicable calendar date associated with the awarded block time). As an example, this indicates that Dr. Ben Casey was awarded block time on October 17, 2007. This table also includes fields for start and end times of the block (e.g., 8 a.m. to 7 p.m.) and room number – but I don’t need that for now.

I have another table called “pcmcase” which has a field called “surgdate” (which is the actual date of surgery).

I have another table called “pcmprocedure” which has a field called “mdname” (which is the name of the MD that did the procedure).

I am able to link all these tables.

The pcmcase table has a status field which I will select as 3 (for completed cases).
I would like to use the “surgdate” field in the “pcmcase” table to select a range of calendar dates.

I wish to determine whether a surgeon used their block time on their allocated “scheduledstart” date or not. I do not need to know how much time they used, just whether they did any case on their “scheduledstart” date.

Example of Output (for calendar date 10/17/07):

Dr. Ben Casey Yes (they used their allocated time)
Dr. Jon Doe Yes
Dr. Josh Beckett No (i.e., they had block time on 10/17/07 but did no cases)

I am using CR10.

Jonathan




 
This is a good example to use Range Data Types on.

Look in your help file, in the index, for Range Data Types.

You link everything, as you describe.

Then group by the doctor.

Then you build a formula that resembles this:
Code:
if surgdate in blocktimestart to blocktimeend
then "Yes"
else "No"
Then put that next to the surgeon's name in the report.

I believe you are going to want to group by block time as well and so the output would be closer to

Ben Casey 10/25/2007 7:00a-10:00a Yes
Ben Casey 10/29/2007 10:00a-11:00a No
Ben Casey 10/31/2007 10:00a-11:00a No

If that isn't 100% right then this might be enough information for you to solve the problem anyway.


 
Many many thanks smcnulty. You have given me the clue and answer to how I should do it. Much appreciated :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top