[MEDITECH-L] Attribute to calculate days from admission to documentation

70 views
Skip to first unread message

Linda Bulger

unread,
Nov 6, 2007, 9:49:26 AM11/6/07
to medit...@mtusers.com
Can anyone offer us an attribute that calculates the number of days from
admission to the date the documentation is being recorded for?

This is for a PPS record for our swing bed screens. We have attributed the
field to calculate the days from admission to TODAY, and that works great.
But the therapists can't commit to documenting on the day they provide the
service, and once the attribute's there of course they can't go back and
edit the field. So -- if a therapist is documenting YESTERDAY'S service, is
it possible to calculate the days from admission to then?

We have very few swing bed patients and are doing all of this in NUR (Magic
5.5). I am open to suggestions about how to handle this. The obvious fix
is to insist that the documentation (which in this case consists of
completing ONE FIELD!) be done on the day the service is provided, but
that's not within my power to achieve, obviously. Any other suggestions?

Thanks!


Linda Bulger, System Analyst
Franklin Memorial Hospital
Farmington, ME 04938

Kenny Whiteside

unread,
Nov 7, 2007, 1:57:33 PM11/7/07
to Linda Bulger, medit...@mtusers.com
Hi Linda,

When documenting in NUR (and not if editing previously filed documentation), you can reference the occurred date as ANS#2S and the occurred time as ANS#3S. If you calculate your elapsed time from admit date to ANS#2S using the Z.elapsed.time program and then divide by 24, you'll have the number of days.

Let me know if you need more help with this.
Kenny Whiteside

Kenny Whiteside BSN, RN
Patient Care Information Systems
Catawba Valley Medical Center
810 Fairgrove Church Road
Hickory, NC 28602
kwhit...@catawbavalleymc.org

>>> Linda Bulger <lbu...@fchn.org> 11/06/2007 9:49 AM >>>

Thanks!


--
This message has been scanned for viruses and
dangerous content, and is
believed to be clean.


Catawba Valley Medical Center
810 Fairgrove Church Rd
Hickory NC 28602
828-326-3000

"This electronic message may contain information that is confidential and/or legally privileged. It is intended only for the use of the individual(s) and/or entity named as recipients in the message. Please notify the sender immediately and delete the material from your computer if you have received this message in error. Do not deliver, distribute, or copy this message, and do not disclose its contents or take any action as a result of the information it contains. Thank you."

--
This message has been scanned for viruses and
dangerous content, and is
believed to be clean.


Jeanette Ahrens

unread,
Nov 15, 2007, 1:49:06 PM11/15/07
to Kenny Whiteside, medit...@mtusers.com
Hello,

I have an NPR with %Z.elapsed.time from admit to dictate date and time
(thanks to Bill Mullins), but I would also like to calculate the days
from DC to DC summary dicatation.

What is the correct syntax to divide the Z.elapsed.time by 24 to yield
number of days?

Thanks,
Jeanette Ahrens, RN
MIS Clinical Support
DeSoto Memorial Hospital

>>> "Kenny Whiteside" <kwhit...@catawbavalleymc.org> 11/7/2007 1:57
PM >>>
Hi Linda,

Thanks!

"The information contained in this message may be privileged and/or
confidential and protected from disclosure. If the reader of this
message is not the intended recipient, you are hereby notified that any
dissemination, distribution or copying of this document is strictly
prohibited. If you have received this communication in error, please
notify us immediately by replying to this message and deleting the
material from any computer."


Bill Mullins

unread,
Nov 15, 2007, 2:50:14 PM11/15/07
to Jeanette Ahrens, Kenny Whiteside, medit...@mtusers.com
This is a default attribute syntax, but you can use similar syntax in a
npr VAL statement.

The following should do what you are asking and default the number of
days. You can modify it as needed for different purposes. Let me know
if you need any help!

DFT=IF{@.today^XXX %Z.elapsed.time(XXX,
DFT=@.now,@p.ADM.PAT.ccdqr.response[,"DATEQUERY"],
DFT=@.now,"hh.mm")^XXX,
DFT=(XXX#"0:"/24)_" D"^XXX}

-Simply replace the "DATEQUERY" with the mnemonic for the date query.
-To prevent the "D" from defaulting with the number, remove the D and
the space within the quotations in the last line.
-To make the first day 1 (instead of 0) add +1 after 24 on the last
line.

Or

The following attribute will default in information from ADM (ie. the
patient admit date, time, and discharge date and time) and will use the
default information (or information entered) to calculate the patient's
elapsed time in the hospital in a format such as : 2 D, 4 H, 32 M.
NOTE: The atrributes are associated to 5 seperate queries.

DFT=%Z.date.out(@p.ADM.PAT.admit.date)

DFT=%Z.date.out(@p.ADM.PAT.admit.time)

DFT=%Z.date.out(@p.ADM.PAT.discharge.date)

DFT=@p.ADM.PAT.discharge.time

DFT=IF{@p.ADM.PAT.discharge.date^XXX %Z.elapsed.time(XXX,
DFT=@p.ADM.PAT.discharge.time,@p.ADM.PAT.admit.date,
DFT=@p.ADM.PAT.admit.time,"hh.mm")^XXX,
DFT=(XXX#"0:"/24)_" D, "_(XXX#"0:"\24)_" H, "_(XXX#"1:")_" M"^XXX}
-------------------------------------------------------------------
Or use Z.date.sub for subtracting 2 dates (most recent date,older date)

This is an attribute that uses Z.date.sub

IFE=IF{%Z.date.sub(@.today,%Z.date.in([ANS,"OELAST"]|0))<365
IFE= @W.err("LESS THAN ONE YEAR")}

or
Enter/Edit Attributes: OENBNHRS

IFE=IF{(%Z.date.sub(IF{@.today},
IFE=@p.ADM.PAT.admit.date)*24)^/[ANS%0,"OENBNHRS"]|0^ZLOS,
IFE=P(R,S,ZLOS)^#,""}
-----------------------------------------------------------------


When documenting in NUR (and not if editing previously filed
documentation), you can reference the occurred date as ANS#2S and the

occurred time as ANS#3S.If you calculate your elapsed time from admit


date to ANS#2S using the Z.elapsed.time program and then divide by 24,
you'll have the number of days.

-----------------------------------------------------------------
I think the following should work:

Hi Linda,

I think the following should take care of it:

%Z.time.lapse(%Z.elapsed.time(ENDDATE,ENDTIME,STARTDATE,STARTTIME,"hh:mm
"))/60

Z.elapsed.time will return the time in hh:mm format. Z.time.lapse will
return the number of seconds from that time. Dividing that result by 60
will return the number of minutes.

AGE IN YEARS CALCULATION USING Z.date.sub

%Z.date.sub(@.today,@computed.birthdate)*1.0000/365.25^YEARS
------------------------------------------------------------------

Jeanette Ahrens

unread,
Nov 15, 2007, 3:31:44 PM11/15/07
to Kenny Whiteside, medit...@mtusers.com, Mark Blount, Bill Mullins
Thanks for the replies! I was able to use Bill's first example below
and just add from the ^XXX on the 3rd line to the end to the VAL
statement. I haven't applied it to the Discharge Summary yet, but I
tried it on elapsed time from admission to dictation since I knew that
one works.

VAL={%Z.elapsed.time(@dict.date,@dict.time,@xx.admit.date,@xx.admit.time,
VAL="hh.mm")^XXX,(XXX#"0:"/24)_""^XXX}

>>> "Bill Mullins" <bmul...@wmed.org> 11/15/2007 2:50 PM >>>

Jeanette Ahrens

unread,
Nov 15, 2007, 3:38:37 PM11/15/07
to Kenny Whiteside, medit...@mtusers.com, Bill Mullins
Sorry, I sent the wrong statement: I am getting the number of days from

VAL=%Z.date.sub(@dict.date,/R.FRAG.VAL["DIS.DATE"])

>>> "Bill Mullins" <bmul...@wmed.org> 11/15/2007 2:50 PM >>>

Jeanette Ahrens

unread,
Nov 15, 2007, 5:50:30 PM11/15/07
to medit...@mtusers.com, Bill Mullins
Hi Bill,
It must not be as accurate as calculation of hours and minutes/24, but
our policy is for Discharge Summary to be dictated within 10 days of DC,
so yes, VAL=%Z.date.sub(@dict.date,/R.FRAG.VAL["DIS.DATE"])
is calculating the days from DC to dictation.

I had both statements on the report and thought I had the hh.mm/24
working but that only applied to the admit date/time to dict date/time.
When I tried to apply it to the dis.date/dis.time I ran into problems
because I can't pull the dis.time with the ABS frag, therefore the
minutes aren't calculating. I guess I would have to pull that from
ADM.

But it was very exciting to get the admit date/time to dict date/time
elapsed time to divide by 24. Only problem was that it wasn't the figure
I need ;) Is it accurate to use hh.hh or hh.mm?

DAT=SMONEY
VAL=%Z.elapsed.time(@dict.date,@dict.time,@xx.admit.date,@xx.admit.time,
VAL="hh.hh")/24

Thanks!
Jeanette

>>> "Bill Mullins" <bmul...@wmed.org> 11/15/2007 3:55 PM >>>
So this is the statement your using now that is working?

Reply all
Reply to author
Forward
0 new messages