Intracare Implementation Log Episode 45: Page number printout revisited.

2 views
Skip to first unread message

Ignacio Valdes

unread,
Mar 18, 2009, 3:55:11 PM3/18/09
to hardhats
Hi All,

We are still in the half-paper and half electronic transition. There
is a 10-13 pager admission nursing assessment printout that is in
desperate need of page numbering in the header/footer. This is
currently beyond my mumps capability. Can someone take some time to do
this soon? I get asked for this nearly every day by the staff and have
to start tap-dancing.

-- IV

kdtop

unread,
Mar 18, 2009, 4:51:08 PM3/18/09
to Hardhats
Are you saying that this is a note created in CPRS?
How are you printing the notes out?

There is two different methods of printing out TIU notes. One is
using a local windows printer from CPRS. The other is from servers
defined on the printer. The former might require a modification to
CPRS, while the latter is handled by the TIUPRPN* modules, if I
remember correctly.

I might be able to help you if you are using the latter method.

Kevin

I, Valdes

unread,
Mar 18, 2009, 5:03:54 PM3/18/09
to Hardhats
Yes, this would be for a note created in CPRS. Thanks! -- IV

kdtop

unread,
Mar 18, 2009, 9:28:31 PM3/18/09
to Hardhats
You didn't answer my question. Which way are you printing these notes
out? With a windows-defined printer? Or with a server-defined
printer?

Kevin

I, Valdes

unread,
Mar 18, 2009, 10:01:53 PM3/18/09
to Hardhats
With a windows defined printer. -- IV

I, Valdes

unread,
Mar 18, 2009, 10:07:09 PM3/18/09
to Hardhats
Until you just said that, I didn't think you could print from CPRS to
a non-Windows defined printer. So I checked CPRS and see the entries
in Print Setup. -- IV

On Mar 18, 8:28 pm, kdtop <kdt...@gmail.com> wrote:

kdtop

unread,
Mar 18, 2009, 10:55:28 PM3/18/09
to Hardhats
OK. Have you set up printers on the server-side? Can you print to
them?
I had to do some trickery to get mine working as I recall. Something
like printing to a file and then passing the file to lpr in linux.

Kevin

I, Valdes

unread,
Mar 19, 2009, 9:50:10 AM3/19/09
to Hardhats
I had not tried getting that working yet because it has not been
necessary so far. Do printers accessed through the VistA server print
page numbers in the header/footer? -- IV

JohnLeo Zimmer

unread,
Mar 19, 2009, 1:26:06 PM3/19/09
to Hard...@googlegroups.com
On Thu, Mar 19, 2009 at 8:50 AM, I, Valdes <iva...@hal-pc.org> wrote:
>
>  Do printers accessed through the VistA server print
> page numbers in the header/footer? -- IV
>
Yes, FileMan does, by default.

I, Valdes

unread,
Mar 19, 2009, 4:21:32 PM3/19/09
to Hardhats
I wonder why locally configured via Windows printers do get a header
and footer added but does not contain page numbering? -- IV

On Mar 19, 12:26 pm, JohnLeo Zimmer <johnleo...@gmail.com> wrote:

Steven McPhelan

unread,
Mar 19, 2009, 4:39:46 PM3/19/09
to Hard...@googlegroups.com
VistA printouts do not natively have headers, footers, or page numbering.  As John stated, a Fileman print request does include a header and page numbers.  Any other printout from VistA will all depend upon whether the specific application programmer for that specific report included headers and footers and page numbering.  There is no generic utility in VistA to format a page for anything that may print from VistA.

Aylesworth, Marc CTR USAF AFMC AFRL/RISE

unread,
Mar 19, 2009, 4:39:59 PM3/19/09
to Hard...@googlegroups.com
You could set up the printer to add page numbers to all printouts. The downside to this is that everything printed from the printer would have page numbers.
 
Marc Aylesworth
 
RRC C3I Group
525 Brooks Road
Rome, NY 13440
 
 


From: Steven McPhelan
Sent: Thu 3/19/2009 4:39 PM
To: Hard...@googlegroups.com
Subject: [Hardhats] Re: Intracare Implementation Log Episode 45: Page  number printout revisited.

I, Valdes

unread,
Mar 19, 2009, 4:50:42 PM3/19/09
to Hardhats
That would be desirable. The current windows native printer driver
does not seem to have that so how could this be added to CPRS notes?

-- IV

On Mar 19, 3:39 pm, "Aylesworth, Marc CTR USAF AFMC AFRL/RISE"
<Marc.Aylesworth....@rl.af.mil> wrote:
> You could set up the printer to add page numbers to all printouts. The downside to this is that everything printed from the printer would have page numbers.
>
> Marc Aylesworth
>
> RRC C3I Group
> 525 Brooks Road
> Rome, NY 13440
> PH: 315-330-2422
>
> From: Steven McPhelan
> Sent: Thu 3/19/2009 4:39 PM
> To: Hard...@googlegroups.com
> Subject: [Hardhats] Re: Intracare Implementation Log Episode 45: Page  number printout revisited.
>
> VistA printouts do not natively have headers, footers, or page numbering.  As John stated, a Fileman print request does include a header and page numbers.  Any other printout from VistA will all depend upon whether the specific application programmer for that specific report included headers and footers and page numbering.  There is no generic utility in VistA to format a page for anything that may print from VistA.
>

Nancy Anthracite

unread,
Mar 19, 2009, 5:41:45 PM3/19/09
to Hard...@googlegroups.com
Is this done using PCL? Is it sent as a DOS command to the printer?

On Thursday 19 March 2009, Aylesworth, Marc CTR USAF AFMC AFRL/RISE wrote:
> You could set up the printer to add page numbers to all printouts. The
> downside to this is that everything printed from the printer would have
> page numbers.
>
> Marc Aylesworth
>
> RRC C3I Group
> 525 Brooks Road
> Rome, NY 13440
> PH: 315-330-2422
>
>
>
>
>
> From: Steven McPhelan
> Sent: Thu 3/19/2009 4:39 PM
> To: Hard...@googlegroups.com
> Subject: [Hardhats] Re: Intracare Implementation Log Episode 45: Page
> number printout revisited.
>
>
> VistA printouts do not natively have headers, footers, or page numbering.
> As John stated, a Fileman print request does include a header and page
> numbers. Any other printout from VistA will all depend upon whether the
> specific application programmer for that specific report included headers
> and footers and page numbering. There is no generic utility in VistA to
> format a page for anything that may print from VistA.
>
>
> On Thu, Mar 19, 2009 at 4:21 PM, I, Valdes <iva...@hal-pc.org> wrote:
>
>
> I wonder why locally configured via Windows printers do get a header
> and footer added but does not contain page numbering? -- IV
>
> On Mar 19, 12:26 pm, JohnLeo Zimmer <johnleo...@gmail.com> wrote:
> > On Thu, Mar 19, 2009 at 8:50 AM, I, Valdes <ival...@hal-pc.org> wrote:
> > > Do printers accessed through the VistA server print
> > > page numbers in the header/footer? -- IV
> >
> > Yes, FileMan does, by default.
>
>


--
Nancy Anthracite

kdtop

unread,
Mar 19, 2009, 10:43:40 PM3/19/09
to Hardhats
I don't think they do. There is code that defines the headers and
footers.
For my site, I modified this code to make the header and footer look
like what I wanted.
But then someone else later posted that there was a "proper" way to do
this, i.e. to make a custom footer for TIU printouts. Does anyone
remember how to do this?

Kevin

kdtop

unread,
Mar 19, 2009, 10:44:41 PM3/19/09
to Hardhats
It has to do with the difference between having Delphi code to
assemble a printout vs some server code creating the printout. The
two bits of code seemed to have diverged.

Kevin

kdtop

unread,
Mar 19, 2009, 10:45:29 PM3/19/09
to Hardhats
I don't think it can when printing from Windows printers, without
modifying the CPRS code.

Kevin

kdtop

unread,
Mar 19, 2009, 10:46:29 PM3/19/09
to Hardhats
No. Delphi has functionality for creating printed output. I think it
involves writing onto a canvas, and then passing that canvas to the
printout-output for passing to the printer. It is not text based.

Kevin

On Mar 19, 5:41 pm, Nancy Anthracite <nanthrac...@verizon.net> wrote:
> Is this done using PCL?  Is it sent as a DOS command to the printer?  
>
> On Thursday 19 March 2009, Aylesworth, Marc CTR USAF AFMC AFRL/RISE wrote:
>
>
>
> > You could set up the printer to add page numbers to all printouts. The
> > downside to this is that everything printed from the printer would have
> > page numbers.
>
> > Marc Aylesworth
>
> > RRC C3I Group
> > 525 Brooks Road
> > Rome, NY 13440
> > PH: 315-330-2422
>
> > From: Steven McPhelan
> > Sent: Thu 3/19/2009 4:39 PM
> > To: Hard...@googlegroups.com
> > Subject: [Hardhats] Re: Intracare Implementation Log Episode 45: Page
> > number printout revisited.
>
> > VistA printouts do not natively have headers, footers, or page numbering.
> > As John stated, a Fileman print request does include a header and page
> > numbers.  Any other printout from VistA will all depend upon whether the
> > specific application programmer for that specific report included headers
> > and footers and page numbering.  There is no generic utility in VistA to
> > format a page for anything that may print from VistA.
>

Nancy Anthracite

unread,
Mar 19, 2009, 11:07:21 PM3/19/09
to Hard...@googlegroups.com
I think it might be under the Clincal Coordinator's Menu, CPRS Configuration,
Print Format menu, but I am not sure.
--
Nancy Anthracite

I, Valdes

unread,
Mar 19, 2009, 11:54:16 PM3/19/09
to Hardhats
There where some hints in the discussion on Intracare Implementation
Log Episode 27: Suppressing WORK COPY -- NOT FOR MEDICAL RECORD :
http://groups.google.com/group/Hardhats/browse_frm/thread/899769c63c19c828/ab203b7306124c34?hl=en&lnk=gst&q=intracare+implementation+medical+record+#ab203b7306124c34

The discussion then seems remarkably similar to this one. -- IV

Aylesworth, Marc CTR USAF AFMC AFRL/RISE

unread,
Mar 20, 2009, 8:40:20 AM3/20/09
to Hard...@googlegroups.com
In most HP printers anyways in the menu system for the printer there is an option to have the page number put on all printed pages.
 
Marc Aylesworth
 
RRC C3I Group
525 Brooks Road
Rome, NY 13440
 
 


From: Nancy Anthracite
Sent: Thu 3/19/2009 5:41 PM

fred trotter

unread,
Mar 22, 2009, 7:46:04 PM3/22/09
to Hard...@googlegroups.com
Could someone concisely explain why page numbers seems to be left to
the outside printing engine?

Is it not possible to control what prints on what page on these
reports, and if so, why can it not also support page breaks?

I know enough about printing to know that page breaks are more complex
than they seem, I was just wondering if someone could explain the
decision (I am sure there is a good reason here and it would help
novices like me to understand why...)

-FT


--
Fred Trotter
http://www.fredtrotter.com

I, Valdes

unread,
Mar 25, 2009, 12:32:18 AM3/25/09
to Hardhats
Well, the day has finally come that I'm mutating into a mumps
programmer.

I have hacked TIUPRPN1.m and TIUPRPN2.m to include page numbering in
the header via a variable I created called ZTIUPAGE. ZTIUPAGE is
initialized to 1, passed in to HEADER and is supposed to be
incremented by 1 each time this is called. 'Medical Record Page 1'
comes out on the header okay but it is never incremented on subsequent
pages, I get my null value of 'IVTest instead. The code is below, any
ideas as to why ZTIUPAGE is not incrementing?

TIUPRPN1: ;SLC/JER - Print SF 509-Progress Notes ;11/23/07
;;1.0;TEXT INTEGRATION
UTILITIES;**45,52,87,100,162,182,211,222,234**;Jun 20, 1997;Build 6
; DBIA 908 ^SC(D0,0)
PRINT(TIUFLAG,TIUSPG) ; Print Document
; ^TMP("TIUPR",$J) is array of records to be printed
; TIUFLAG=1 --> Chart Copy TIUSPG=1 --> Contiguous
; TIUFLAG=0 --> Work Copy TIUSPG=0 --> Fresh Page- each
note
; TIUCONT=1 --> Continue printing
; TIUCONT1=1 --> Write "Continue to next/from previous-page"
msgs
; TIUPFNBR ---> Print Form # like vice 509
; TIUMISC=TIUFLAG_U_TIUPFNBR_U_TIUDA
N
CONT,TIUASK,TIUI,TIUJ,TIUKID,TIUFOOT,TIUK,TIUDA,TIUCONT,TIUPGRP,TIUTYP
N TIUPFHDR,TIUPFNBR,TIUMISC,TIUCONT1,TIUIDONE,TMP
S ZTIUPAGE=1
S TIUFLAG=+$G(TIUFLAG),TIUSPG=+$G(TIUSPG)
S (CONT,TIUCONT)=1,(TIUASK,TIUCONT1)=0
S TIUI=0 F S TIUI=$O(^TMP("TIUPR",$J,TIUI)) Q:TIUI="" D
Q:'TIUCONT
. N DFN,TIU
. ; -- P182 TIUI has form PGRP$PFHDR;DFN with PGRP possibly 0,
and
. ; PFHDR possibly null (see TIURA):
. S TIUPGRP=+$P(TIUI,"$"),TIUPFHDR=$P($P(TIUI,";"),"$",2)
. I TIUPFHDR']"" S TIUPFHDR="Progress Notes"
. S DFN=$P(TIUI,";",2)
. I $G(TIUPGRP)>2 S TIUSPG=0
. D PATPN^TIULV(.TIUFOOT,DFN)
. I +$G(TIUSPG) D HEADER^TIUPRPN2
(.TIUFOOT,TIUFLAG,.TIUPFHDR,TIUCONT1,.S15967,.ZTIUPAGE) S ZTIUPAGE=$G
(ZTIUPAGE)+1
. ; Use TIUJ="" (not TIUJ=0), to print "complete" notes w/o sigdt:
. S TIUJ="" F S TIUJ=$O(^TMP("TIUPR",$J,TIUI,TIUJ)) Q:TIUJ="" D
Q:'TIUCONT
. . S TIUK=0 F S TIUK=$O(^TMP("TIUPR",$J,TIUI,TIUJ,TIUK)) Q:'TIUK
D Q:'TIUCONT
. . . S TIUCONT1=0 S TIUPFNBR=^TMP("TIUPR",$J,TIUI,TIUJ,TIUK)
. . . ; Note: TIUPFNBR may be null
. . . ;P182 Set TIUMISC BEFORE quitting if deleted
. . . S TIUDA=TIUK,TIUMISC=TIUFLAG_U_TIUPFNBR_U_TIUDA
. . . ; Quit docmt if deleted:
. . . I '$D(^TIU(8925,+TIUDA,0)) D Q
. . . . S TIUCONT=$$SETCONT(.TIUFOOT,TIUMISC,TIUCONT1,0,$G(TIUROOT))
Q:'TIUCONT
. . . . W !!,"NOTE DATED:",!,"Document #",TIUDA," for ",$G(TIUFOOT
("PNMP")),!,"no longer exists in the TIU DOCUMENT file.",!!!
. . . . S TIUCONT=$$SETCONT(.TIUFOOT,TIUMISC,TIUCONT1,0,$G(TIUROOT))
. . . N TIUROOT
. . . I '+$G(TIUSPG) D HEADER^TIUPRPN2
(.TIUFOOT,TIUFLAG,.TIUPFHDR,TIUCONT1,.S15967,.ZTIUPAGE) S ZTIUPAGE=$G
(ZTIUPAGE)+1
. . . K ^TMP("TIULQ",$J)
. . . D EXTRACT^TIULQ(+TIUDA,"^TMP(""TIULQ"",$J)",.TIUERR,"","",1)
. . . I +$G(TIUERR) W !,$P(TIUERR,U,2) Q
. . . Q:'$D(^TMP("TIULQ",$J))
. . . S TIUROOT="^TMP(""TIULQ"",$J,"_TIUDA_")"
. . . D REPORT(TIUROOT,.TIUFOOT,TIUMISC,.TIUCONT) Q:'TIUCONT
. . . D IDKIDS(TIUROOT,.TIUFOOT,TIUMISC,TIUCONT1,.TIUCONT) Q:'TIUCONT
. . . I '+$G(TIUKID),'+$G(TIUSPG) S TIUCONT1=0 S TIUCONT=$$SETCONT
(.TIUFOOT,TIUMISC,TIUCONT1,1,$G(TIUROOT))
. Q:'TIUCONT
. I $E(IOST,1,2)="C-" S TIUCONT=$$STOP^TIUPRPN2() Q:'TIUCONT
. I '+$G(TIUKID),+$G(TIUSPG),$E(IOST,1,2)'="C-" S TIUCONT1=0 S
TIUCONT=$$SETCONT(.TIUFOOT,TIUMISC,TIUCONT1,1,$G(TIUROOT))
Q
;
REPORT(TIUROOT,TIUFOOT,TIUMISC,TIUCONT,TIUIDEND) ; Report Text
; Requires array TIUFOOT, vars TIUMISC, TIUCONT
; Requires TIUROOT =
; ^TMP("TIULQ",$J,NOTEIFN) for parent/stand-alone note, or
; ^TMP("TIULQ",$J,NOTEIFN,"ZADD",ADDMIFN) for addendum, or
; ^TMP("TIULQ",$J,NOTEIFN,"ZZID",KIDSEQ#,IDKIDIFN) for ID kid, or
; ^TMP("TIULQ",$J,NOTEIFN,"ZZID",KIDSEQ#,IDKIDIFN,"ZADD",KIDADDMIFN)
; for ID kid addm.
N DIW,DIWF,DIWL,DIWR,DIWT,TIUERR,TIU,TIUI,X,Z,LOC
N REFDT,TITLE,LOINCNM,ADT,HLOC,SUBJ
N TIUDA,TIUCONT1,HASIDKID,HASIDDAD
S TIUDA=$P(TIUMISC,U,3),TIUCONT1=0
S TIUCONT=$$SETCONT(.TIUFOOT,TIUMISC,TIUCONT1,0,$G(TIUROOT))
Q:'TIUCONT
S HASIDKID=$G(^TMP("TIULQ",$J,TIUDA,"ZZID",0)) ;how many ID kids
S HASIDDAD=$S(TIUROOT["ZZID":1,1:0)
I HASIDKID W "<< Interdisciplinary Note - Begin >>",!
I HASIDDAD W "<< Interdisciplinary Note - Cont. >>",!
W $S('HASIDKID&'HASIDDAD:"NOTE DATED: ",1:"ENTRY DATED: ")
S REFDT=@TIUROOT@(1301,"I")
W $$DATE^TIULS(REFDT,"MM/DD/CCYY HR:MIN")
S TITLE=@TIUROOT@(.01,"E"),LOINCNM=@TIUROOT@(89261,"E")
W !,"LOCAL TITLE: ",$$UP^XLFSTR(TITLE),!
I $L(LOINCNM)>1 W "STANDARD TITLE: ",$$UP^XLFSTR(LOINCNM),!
S LOC=$G(@TIUROOT@(1205,"I"))
I +LOC D
. W $S($P(^SC(LOC,0),U,3)="W":"ADMITTED: ",1:"VISIT: ")
. S ADT=$G(@TIUROOT@(.07,"I"))
. W $$DATE^TIULS(ADT,"MM/DD/CCYY HR:MIN")
. S HLOC=$G(@TIUROOT@(1205,"E"))
. W " ",HLOC
S SUBJ=$G(@TIUROOT@(1701,"E"))
I SUBJ]"" W !,"SUBJECT: ",^("E"),! ; @TIUROOT@(1701,"E")
S TIUCONT1=1
I $D(@TIUROOT@("PROBLEM")) D Q:'TIUCONT
. S TIUCONT=$$SETCONT(.TIUFOOT,TIUMISC,TIUCONT1,0,$G(TIUROOT))
Q:'TIUCONT
. W !,"ASSOCIATED PROBLEMS:"
. N TIUI S TIUI=0
. F S TIUI=$O(@TIUROOT@("PROBLEM",TIUI)) Q:'TIUI D Q:'TIUCONT
..W !,^(TIUI,0) ; @TIUROOT@("PROBLEM",TIUI,0)
..S TIUCONT=$$SETCONT(.TIUFOOT,TIUMISC,TIUCONT1,0,$G(TIUROOT))
Q:'TIUCONT
W !
S TIUI=0,DIWF="WN",DIWL=1,DIWR=79 K ^UTILITY($J,"W")
F S TIUI=$O(@TIUROOT@("TEXT",TIUI)) Q:TIUI'>0 D Q:'TIUCONT ; D
^DIWW
. S TIUCONT=$$SETCONT(.TIUFOOT,TIUMISC,TIUCONT1,0,$G(TIUROOT))
Q:'TIUCONT
. S X=@TIUROOT@("TEXT",TIUI,0) S:X="" X=" " D ^DIWP
D ^DIWW K ^UTILITY($J,"W")
Q:'TIUCONT
D GETSIG(TIUROOT,.TIUSIG)
S TIUCONT=$$SETCONT(.TIUFOOT,TIUMISC,TIUCONT1,0,$G(TIUROOT))
Q:'TIUCONT
W !
D SIGBLK^TIUPRPN8(.TIUFOOT,TIUMISC,TIUCONT1,.TIUCONT,.TIUSIG,TIUROOT)
Q:'TIUCONT
ADDENDA ; Fall through and do Addenda of docmt TIUDA
N DIW,DIWF,DIWL,DIWR,DIWT,X,Z,TIUI,TIUADD,ADDMRDT
S TIUADD=0,DIWF="WN",DIWL=1,DIWR=79 K ^UTILITY($J,"W")
F S TIUADD=$O(@TIUROOT@("ZADD",TIUADD)) Q:TIUADD'>0 D Q:'TIUCONT
. S TIUCONT=$$SETCONT(.TIUFOOT,TIUMISC,TIUCONT1,0,$G(TIUROOT))
Q:'TIUCONT
. S ADDMRDT=@TIUROOT@("ZADD",TIUADD,1301,"I")
. W !!,$$DATE^TIULS(ADDMRDT,"MM/DD/CCYY HR:MIN"),?21,"ADDENDUM"
. W ?39,"STATUS: ",@TIUROOT@("ZADD",TIUADD,.05,"E") ;P162
. S TIUI=0
. F S TIUI=$O(@TIUROOT@("ZADD",TIUADD,"TEXT",TIUI)) Q:TIUI'>0 D
Q:'TIUCONT
. . S TIUCONT=$$SETCONT(.TIUFOOT,TIUMISC,TIUCONT1,0,$G(TIUROOT))
Q:'TIUCONT
. . S X=@TIUROOT@("ZADD",TIUADD,"TEXT",TIUI,0) S:X="" X=" " D ^DIWP
. D ^DIWW
. Q:'TIUCONT
. N TIUADRT
. S TIUADRT=$P(TIUROOT,")")_",""ZADD"","_TIUADD_")"
. D GETSIG(TIUADRT,.TIUSIG)
. D SIGBLK^TIUPRPN8
(.TIUFOOT,TIUMISC,TIUCONT1,.TIUCONT,.TIUSIG,TIUADRT)
; Need ! in front for amended notes:
I $G(TIUIDEND) W !,"<< Interdisciplinary Note - End >>",!
K ^UTILITY($J,"W")
; Write 2 linefeeds between records
S:$E(IOST,1,2)="C-" TIUCONT=$$STOP^TIUFLP1,TIUASK=1
W:TIUCONT !!
Q
;
IDKIDS(TIUROOT,TIUFOOT,TIUMISC,TIUCONT1,TIUCONT) ; Print ID kids
;of docmt TIUDA (each kid does its own addenda)
N TIUL,KIDDA,TIUDA,TIUSORT,TIUIDRT,TIUIDEND
S TIUDA=$P(TIUMISC,U,3),TIUIDEND=0
S TIUL=0
F S TIUL=$O(^TMP("TIULQ",$J,TIUDA,"ZZID",TIUL)) Q:'TIUL D
Q:'TIUCONT
. S KIDDA=$O(^TMP("TIULQ",$J,TIUDA,"ZZID",TIUL,0))
. I +$$MEMBEROF^TIUPR222(+$G(^TIU(8925,+KIDDA,0)),"FORM LETTERS") D
Q ; hand off to TIUFLP1 (Form Letter Print)
. . I '+$G(TIUKID),'+$G(TIUSPG) S TIUCONT1=0 S TIUCONT=$$SETCONT
(.TIUFOOT,TIUMISC,TIUCONT1,1,$G(TIUROOT))
. . I 'TIUCONT!'CONT Q
. . I $E(IOST,1,2)="C-",'+TIUASK S CONT=$$STOP^TIUFLP1,TIUCONT=CONT
Q:'+CONT
. . S TIUASK=0,TIUKID=1 D IDKID^TIUFLP1(TIUDA,KIDDA)
. S TIUMISC=TIUFLAG_U_TIUPFNBR_U_KIDDA
. S TIUIDRT="^TMP(""TIULQ"",
$J,"_TIUDA_",""ZZID"","_TIUL_","_KIDDA_")"
. I '$O(^TMP("TIULQ",$J,TIUDA,"ZZID",TIUL)) S TIUIDEND=1
. D REPORT(TIUIDRT,.TIUFOOT,TIUMISC,.TIUCONT,TIUIDEND)
Q
;
GETSIG(TIUROOT,TIUSIG) ; Get signature info from TIULQ global;
; Set info into TIUSIG array **100**
; Requires array name TIUROOT; passes back array TIUSIG
; TIUROOT = ^TMP("TIULQ",$J,NOTEIFN) for parent note, or
; ^TMP("TIULQ",$J,NOTEIFN,"ZADD",ADDMIFN) for addendum, or
; ^TMP("TIULQ",$J,NOTEIFN,"ZZID",IDKIDIFN) for ID kid.
; Signature should be on bottom of form, Addenda on Subsequent pages
N TIULINE S $P(TIULINE,"-",81)=""
S TIUSIG("AUTHOR")=$G(@TIUROOT@(1202,"I"))_";"_$G(^("E"))
S TIUSIG("EXPSIGNR")=$G(@TIUROOT@(1204,"I"))_";"_$G(^("E"))
S TIUSIG("EXPCOSNR")=$G(@TIUROOT@(1208,"I"))_";"_$G(^("E"))
S TIUSIG("SIGNDATE")=$G(@TIUROOT@(1501,"I"))
S TIUSIG("SIGNEDBY")=$G(@TIUROOT@(1502,"I"))_";"_$G(^("E"))
S TIUSIG("SIGNNAME")=$G(@TIUROOT@(1503,"E"))
S TIUSIG("SIGTITL")=$G(@TIUROOT@(1504,"E"))
S TIUSIG("SIGNMODE")=$G(@TIUROOT@(1505,"I"))_";"_$G(^("E"))
S TIUSIG("COSGDATE")=$G(@TIUROOT@(1507,"I"))
S TIUSIG("COSGEDBY")=$G(@TIUROOT@(1508,"I"))_";"_$G(^("E"))
S TIUSIG("COSGNAME")=$G(@TIUROOT@(1509,"E"))
S TIUSIG("COSGTITL")=$G(@TIUROOT@(1510,"E"))
S TIUSIG("COSGMODE")=$G(@TIUROOT@(1511,"I"))_";"_$G(^("E"))
S TIUSIG("SIGCHRT")=$G(@TIUROOT@(1512,"I"))_";"_$G(^("E"))
S TIUSIG("COSCHRT")=$G(@TIUROOT@(1513,"I"))_";"_$G(^("E"))
; -- P182 Set Admin Clos Date:
S TIUSIG("ADMINCDT")=$G(@TIUROOT@(1606,"I"))_";"_$G(^("E"))
Q
;
SETCONT(TIUFOOT,TIUMISC,TIUCONT1,TIUHEAD,TIUROOT) ;Does footer
;and returns TIUCONT
; Requires array TIUFOOT, vars TIUMISC,TIUCONT1; optional TIUHEAD
; Optional TIUROOT
Q $$FOOTER^TIUPRPN2(.TIUFOOT,TIUMISC,TIUCONT1,TIUHEAD,$G(TIUROOT))




TIUPRPN2 ;SLC/MJC - Header/Footer for Progress Notes ;25-JAN-2001
08:50:35
;;1.0;TEXT INTEGRATION UTILITIES;**44,45,52,100,222**;Jun 20, 1997
FOOTER(TIUFOOT,TIUMISC,TIUCONT1,TIUHDR,TIUROOT) ; Function returns
TIUCONT
; Also controls Pagination position, writes footer when appropriate.
; Requires array TIUFOOT, vars TIUMISC,TIUCONT1. Optional TIUHDR.
; IF TIUHDR=1, HEADER WILL NOT BE PRINTED
N TIUCONT,TIUFLAG,TIUPFNBR,TIUDA
S TIUCONT=1
S TIUFLAG=$P(TIUMISC,U),TIUPFNBR=$P(TIUMISC,U,2),TIUDA=$P(TIUMISC,U,
3)
I $E(IOST)="C" G FOOTX:$Y+3<IOSL S TIUCONT=$$STOP G FOOTW
G FTR:+$G(TIUHDR)
G:$Y+7<IOSL FOOTX
FTR I (IOT'="HFS")!(IOSL<250) F Q:$Y+6'<IOSL W ! ;moves ftr to pg
bottom
N TIUFNUM,TIULINE,LOC,DIV,TIUDIV,TIUDIVI,TIUPRTDT,TIUPRTNM
S $P(TIULINE,"-",81)=""
W ?21,$S(+$G(TIUCONT1):"** THIS NOTE CONTINUED ON NEXT PAGE **",
1:""),!
I '+$G(TIUFLAG) W "WORK COPY ========== UNOFFICIAL "
I W "- NOT FOR MEDICAL RECORD =========== DO NOT FILE"
E W TIULINE
W !,TIUFOOT("PNMP")
S LOC=$S($L(TIUROOT):$G(@TIUROOT@(1205,"I")),1:"") ; **100**
I LOC D
. S DIV=+$P($G(^SC(LOC,0)),U,15)
. S TIUDIV=+$O(^TIU(8925.94,"B",DIV,0))
I $G(TIUDIV),$P($G(^TIU(8925.94,TIUDIV,0)),U,2)]"" S TIUDIVI=$P(^
(0),U,2)
S TIUPRTNM=$S($G(TIUDIVI)]"":TIUDIVI,$G(TIUFOOT("INTNM"))]"":TIUFOOT
("INTNM"),1:TIUFOOT("SITE"))
S TIUPRTDT="Printed:"_$$DATE^TIULS($$NOW^TIULC,"MM/DD/CCYY HR:MIN")
I $L(TIUPRTNM)<36 D
. W ?(80-$L(TIUPRTNM)\2),TIUPRTNM,?56,TIUPRTDT
ELSE D
. W ?58,TIUPRTDT,!?(80-$L(TIUPRTNM)\2),TIUPRTNM
I +$G(TIUFLAG) W !,TIUFOOT("SSN")," ",TIUFOOT("DOB"),?(80-$L(TIUFOOT
("LOCP"))\2),TIUFOOT("LOCP") ; *222 only print if NOT WORKCOPY
I '+$G(TIUFLAG) W !,?(80-$L(TIUFOOT("LOCP"))\2),TIUFOOT("LOCP")
I +$G(TIUFLAG) W ?(80-$L(TIUPFNBR)),TIUPFNBR
I '+$G(TIUFLAG) W ?(80-$L(TIUFOOT("PH#"))),TIUFOOT("PH#")
I +$G(TIUFLAG) W !,TIULINE
E W !,"=========================== CONFIDENTIAL INFORMATION
==========================="
W @IOF
FOOTW I '+$G(TIUHDR),+$G(TIUCONT) D HEADER
(.TIUFOOT,TIUFLAG,.TIUPFHDR,TIUCONT1,$G(TIUROOT))
FOOTX ;
Q TIUCONT
HEADER(TIUFOOT,TIUFLAG,TIUPFHDR,TIUCONT1,TIUROOT,ZTIUPAGE) ; Header
; Requires array TIUFOOT, vars TIUFLAG,TIUPFHDR,TIUCONT1
N TIULINE S $P(TIULINE,"-",81)=""
I $E(IOST)="C" D
.W @IOF,$C(13),TIULINE,!,TIUFOOT("PNMP")_" "_$G(ZTIUPAGE,"IVTest")
_" "_TIUFOOT("SSN")
.W ?(78-$L(TIUPFHDR)),TIUPFHDR,!,TIULINE,!
.I +$G(TIUCONT1) W $$DATE^TIULS(@TIUROOT@(1301,"I"),"MM/DD/CCYY
HR:MIN"),?21,"** CONTINUED FROM PREVIOUS SCREEN **",!
E D
.W !,TIULINE,!,$S('+$G(TIUFLAG):"** WORK COPY - NOT FOR ",1:"")
.W "MEDICAL RECORD Page "_$G(ZTIUPAGE,"IVTest") W:'+$G(TIUFLAG) "
**" W ?(80-$L(TIUPFHDR)),TIUPFHDR
.W !,TIULINE,!
.I +$G(TIUCONT1) W $$DATE^TIULS(@TIUROOT@(1301,"I"),"MM/DD/CCYY
HR:MIN"),?21,"** CONTINUED FROM PREVIOUS PAGE **",!!
S ZTIUPAGE=$G(ZTIUPAGE)+1
Q
STOP() ;on screen paging check
; quits TIUCONT=1 if cont. ELSE quits TIUCONT=0
N DIR,Y,TIUCONT
S DIR(0)="E" W:+$G(TIUKID) ! D ^DIR
S TIUCONT=Y
Q TIUCONT

John McCormack

unread,
Mar 25, 2009, 1:42:08 AM3/25/09
to Hard...@googlegroups.com
Your passing the variable by value, not by reference therefore each time
it's passed as a parameter it's has a value of 1. Passing by value
effectively "NEWs" the variable in the "HEADER" block and doesn't change
the variable outside of your call..

P.S. Naming your variable starting with "ZT" effectively puts in the
Kernel namespace. The VA convention would be TIUZPAGE (package
namespace_Z_...).

I, Valdes

unread,
Mar 25, 2009, 9:41:43 AM3/25/09
to Hardhats
It turns out that HEADER was being called somehow from somewhere else.
Thanks!

-- IV
> ...
>
> read more »

Bhaskar, KS

unread,
Mar 25, 2009, 9:52:58 AM3/25/09
to Hard...@googlegroups.com

I'm traveling with very limited & intermittent access to e-mail, so excuse me if this response is off base - I have not followed the thread.

Rather than formatting the page yourself, shouldn't you just pipe the output to a command (e.g., lpr) that knows how to format & print pages and spool to printers?

Regards
-- Bhaskar
--------------------------
Sent from my BlackBerry Wireless Handheld




----- Original Message -----
From: Hard...@googlegroups.com <Hard...@googlegroups.com>
To: Hardhats <Hard...@googlegroups.com>
Sent: Tue Mar 24 23:32:18 2009
Subject: [Hardhats] Re: Intracare Implementation Log Episode 45: Page number printout  revisited.


        S TIUSIG("COSGEDBY")=$G(@TIUROOT@(1508,"I"))_";"_$G(^("E"))


        S TIUSIG("COSGNAME")=$G(@TIUROOT@(1509,"E"))
        S TIUSIG("COSGTITL")=$G(@TIUROOT@(1510,"E"))

        S TIUSIG("COSGMODE")=$G(@TIUROOT@(1511,"I"))_";"_$G(^("E"))
        S TIUSIG("SIGCHRT")=$G(@TIUROOT@(1512,"I"))_";"_$G(^("E"))
        S TIUSIG("COSCHRT")=$G(@TIUROOT@(1513,"I"))_";"_$G(^("E"))


        ; -- P182 Set Admin Clos Date:

        S TIUSIG("ADMINCDT")=$G(@TIUROOT@(1606,"I"))_";"_$G(^("E"))

 N TIULINE S $P(TIULINE,"-",81)=""

 I $E(IOST)="C" D
 .W @IOF,$C(13),TIULINE,!,TIUFOOT("PNMP")_"  "_$G(ZTIUPAGE,"IVTest")
_"  "_TIUFOOT("SSN")
 .W ?(78-$L(TIUPFHDR)),TIUPFHDR,!,TIULINE,!
 .I +$G(TIUCONT1) W $$DATE^TIULS(@TIUROOT@(1301,"I"),"MM/DD/CCYY
HR:MIN"),?21,"** CONTINUED FROM PREVIOUS SCREEN **",!
 E  D
 .W !,TIULINE,!,$S('+$G(TIUFLAG):"** WORK COPY - NOT FOR ",1:"")
 .W "MEDICAL RECORD     Page "_$G(ZTIUPAGE,"IVTest") W:'+$G(TIUFLAG) "
**" W ?(80-$L(TIUPFHDR)),TIUPFHDR
 .W !,TIULINE,!
 .I +$G(TIUCONT1) W $$DATE^TIULS(@TIUROOT@(1301,"I"),"MM/DD/CCYY
HR:MIN"),?21,"** CONTINUED FROM PREVIOUS PAGE **",!!
 S ZTIUPAGE=$G(ZTIUPAGE)+1
 Q
STOP() ;on screen paging check
 ; quits TIUCONT=1 if cont. ELSE quits TIUCONT=0
 N DIR,Y,TIUCONT
 S DIR(0)="E" W:+$G(TIUKID) ! D ^DIR
 S TIUCONT=Y
 Q TIUCONT


_____________

The information contained in this message is proprietary and/or confidential. If you are not the
intended recipient, please: (i) delete the message and all copies; (ii) do not disclose,
distribute or use the message in any manner; and (iii) notify the sender immediately. In addition,
please be aware that any message addressed to our domain is subject to archiving and review by
persons other than the intended recipient. Thank you.
_____________

David Whitten

unread,
Mar 25, 2009, 9:59:50 AM3/25/09
to Hard...@googlegroups.com
On Wed, Mar 25, 2009 at 8:52 AM, Bhaskar, KS <KS.Bh...@fnis.com> wrote:

I'm traveling with very limited & intermittent access to e-mail, so excuse me if this response is off base - I have not followed the thread.

Rather than formatting the page yourself, shouldn't you just pipe the output to a command (e.g., lpr) that knows how to format & print pages and spool to printers?

Regards
-- Bhaskar


The complexity is that he is already sending it to a pipe (network connection)
back to the CPRS client who then sends it to the actual printer.

In general, I agree that having reports deal with pagination issues is a very
server specific method, but since VistA Kernel is a virtual operating system,
it already has facilities to know terminal type, device characteristics etc.

A good abstraction might be to have the header and footer code as callbacks,
and the main code as a driver of the content between the header and footer.
To my knowledge, that is not currently done in any VistA applications.
Of course, as big as VistA is, there is no guarantee of that.

By the way, I agree with John, the variable ZTIUPAGE should be called TIUZPAGE.
I can only confess that when Ignacio asked me, that I was tired.

Dave
 

I, Valdes

unread,
Mar 25, 2009, 12:25:01 PM3/25/09
to Hardhats
Problem solved, see Intracare Implementation Log Episode 46: A (Very)
brief Programming VistA with MUMPS page numbering example.

I guess my mumpster transformation has begun.

-- IV

On Mar 25, 8:59 am, David Whitten <whit...@worldvista.org> wrote:
> ...
>
> read more »
Reply all
Reply to author
Forward
0 new messages