lindagoodwin
IS-IT--Management
I'm using Crystal 8.0.1 for this report.
Information is being pulled from an Access surgery log. With the following formula we are trying to sum the total minutes for Anesthesia without showing Local, None, or IV sedation anes mins.
Not sure who wrote this formula but it does not eliminate the "Local, None, or IV sedation" minutes. Can someone tell em what's wrong with it? Thank you for any help!
if uppercase({SurgeryLog.InsCode}) = "MC INS" and uppercase({SurgeryLog.AnesthesType}) <> "LOCAL" + "NONE" + "IV SEDATION" then if DTSToTimeString(ToText({SurgeryLog.AnesEndTime})) > DTSToTimeString(ToText({SurgeryLog.AnesStartTime})) then ((ToNumber(DTSToTimeString(ToText({SurgeryLog.AnesEndTime})) [1 to 2]) * 60) + ToNumber(DTSToTimeString(ToText({SurgeryLog.AnesEndTime})) [4 to 5])) - (((ToNumber(DTSToTimeString(ToText({SurgeryLog.AnesStartTime})) [1 to 2]) * 60) + ToNumber(DTSToTimeString(ToText({SurgeryLog.AnesStartTime})) [4 to 5]))) else if {SurgeryLog.AnesStartTime}<>{SurgeryLog.AnesEndTime} then ((ToNumber(DTSToTimeString(ToText({SurgeryLog.AnesEndTime})) [1 to 2]) * 60 + 1440) + ToNumber(DTSToTimeString(ToText({SurgeryLog.AnesEndTime})) [4 to 5])) - (((ToNumber(DTSToTimeString(ToText({SurgeryLog.AnesStartTime})) [1 to 2]) * 60) + ToNumber(DTSToTimeString(ToText({SurgeryLog.AnesStartTime})) [4 to 5])))
Information is being pulled from an Access surgery log. With the following formula we are trying to sum the total minutes for Anesthesia without showing Local, None, or IV sedation anes mins.
Not sure who wrote this formula but it does not eliminate the "Local, None, or IV sedation" minutes. Can someone tell em what's wrong with it? Thank you for any help!
if uppercase({SurgeryLog.InsCode}) = "MC INS" and uppercase({SurgeryLog.AnesthesType}) <> "LOCAL" + "NONE" + "IV SEDATION" then if DTSToTimeString(ToText({SurgeryLog.AnesEndTime})) > DTSToTimeString(ToText({SurgeryLog.AnesStartTime})) then ((ToNumber(DTSToTimeString(ToText({SurgeryLog.AnesEndTime})) [1 to 2]) * 60) + ToNumber(DTSToTimeString(ToText({SurgeryLog.AnesEndTime})) [4 to 5])) - (((ToNumber(DTSToTimeString(ToText({SurgeryLog.AnesStartTime})) [1 to 2]) * 60) + ToNumber(DTSToTimeString(ToText({SurgeryLog.AnesStartTime})) [4 to 5]))) else if {SurgeryLog.AnesStartTime}<>{SurgeryLog.AnesEndTime} then ((ToNumber(DTSToTimeString(ToText({SurgeryLog.AnesEndTime})) [1 to 2]) * 60 + 1440) + ToNumber(DTSToTimeString(ToText({SurgeryLog.AnesEndTime})) [4 to 5])) - (((ToNumber(DTSToTimeString(ToText({SurgeryLog.AnesStartTime})) [1 to 2]) * 60) + ToNumber(DTSToTimeString(ToText({SurgeryLog.AnesStartTime})) [4 to 5])))