All messages should be posted in plain text.  HTML will be converted to
attachments.    The meditech-l web site is MTUsers.com
======================================

What I've done in cases like this is to go ahead and suppress the detail
line(s), but set up the calculations in the line check rather than in
variables.  Assuming you've established the key region for class, you
could do this on the detail line (and I'm making up some variable names
here):

LC=%Z.elapsed.time(@endday,@endtime,@startday,@starttime,"hh.hh")^ELT,
LC=ELT+ET^ET,ET+TET^TET,1+CT^CT,1+TCT^TCT,""

(Note that the line is suppressed with the "" at the end.)

Then, in the TK region you have computed variables (set as PINT and DEC2
type variables, respectively): CT for the count, and xx.avg.time
(VAL=ET:4D/CT) for the average.

You then do the following in the footnote to reset the values after each
TK:
AL AFTER.TK1 ""^CT^ET

In the TR region, you can use the TCT and TET to show the count and
average for the whole report:  xx.tot.avg (VAL=TET:4D/TCT)

Note the ":4D" -  That's to set the number of decimal places that will
compute.  Without it, you get integers.  (Meditech "magic" calculations,
you know...)

This will compute regardless of whether or not you suppress printing of
the detail line.

Douglas B. McGaw
Hospital Info Svcs Coordinator
Newman Regional Health
1201 W. 12th Ave.
Emporia, KS  66801
 
Voice:  620-343-6800 x 1130
Fax:  620-340-6133
Email: [EMAIL PROTECTED]

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Witt, Sharon L.
Sent: Tuesday, May 02, 2006 12:25 PM
To: [email protected]
Subject: [MEDITECH-L] Suppressing detail using computed fields
forcalculations

All messages should be posted in plain text.  HTML will be converted to
attachments.    The meditech-l web site is MTUsers.com
======================================

Hi,

 I am trying to write a report in OE.ORD that tells me 2 things.

# of patients that have been charged a particular Class for ER as well
as the average length of stay for that class.

I have it working as long as I print the patient detail. On the patient
detail line is a computed field for elapsed time.

Procedure is set up as a Key Header and trailer. On the trailer line is
a computed field for total time of visits for all the patients with that
class.
The next line (Key trailer again) is the calculation for Average LOS.


I want to suppress printing of the detail line (patient with their LOS)
as well as the total LOS for all patients in that class.

I read an old email that said that any calculations using a computed
field that is suppressed would need to be done in a macro.

Does anyone have an example that they would be willing to share that
does this type of calculation?

Any other suggestions that may be easier are welcome as well.

Here are my computed fields.

Elapsed time
DAT=DEC
FNC=LST
VAL=%Z.elapsed.time(@ADM.PAT.er.depart.date,@xx.er.depart.time,
[EMAIL PROTECTED],@ADM.PAT.service.time,"hh.hh")

Total elapsed time
DAT=DEC
FNC=TOT
[EMAIL PROTECTED]

Ave elapsed time
DAT=DEC
JFY=R
LEN=7
[EMAIL PROTECTED]/XXX

XXX is from another computed field. It represents the total # of
procedures counted.

Thanks
Sharon
_______________________________________________
meditech-l mailing list
[email protected]
http://mtusers.com/mailman/listinfo/meditech-l

_______________________________________________
meditech-l mailing list
[email protected]
http://mtusers.com/mailman/listinfo/meditech-l

Reply via email to