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!

Time Calculation

Status
Not open for further replies.

Jonathan212

IS-IT--Management
Oct 22, 2002
57
US
I wish to calculate variance between “last patient out of an operating room” and the time the operating room is formally staffed to end(which is 19:00 hours). I want to show unused operating room time. There are situations, however, when an OR runs past 7 p.m.

I created a formula, let’s call it “endtime” for 19:00 hours which is:
time (19,0,0)

I then did another formula showing:
({@endtime} – {patient.patient leave room}) / 60

If the patient leaves the OR before 19:00 the results are displaying correctly.
For example, patient leave OR at 18:04 is showing correctly as 56.

However, if patient leaves OR at 20:28, I am getting 1352. I would like that result to show -88.

I am using CR10. Any suggestions would be much appreciated.

Jonathan
 
Try:

if {@endtime} >= {patient.patient leave room} then
({@endtime} – {patient.patient leave room}) / 60
else
-(({patient.patient leave room}-{@endtime}) / 60)

-k
 
You are an incredibly talented and helpful person. Thank you very much, yet again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top