ABPVHD ;SCREEN HEADING UTILITY; [ 07/15/91 8:50 PM ]
;;2.0;FACILITY PVT-INS TRACKING;*0*;IHS-OKC/KJR;AUGUST 7, 1991
;INPUT VARIABLES: ABPV("HD",X) = NARRATIVE TEXT < 76 CHARACTERS
; WHERE X IS SEQUENTIAL VARIABLE
; BEGINNING WITH 1
;
;OUTPUT VARIABLES: NONE
;
START S:$D(DUZ(2))'=1 DUZ(2)=$P(^AUTTSITE(1,0),"^")
S SITENAME=$P(^DIC(4,DUZ(2),0),"^",1),X=0
D:$D(XY)'=1 CURRENT^%ZIS
NXTX S X=$O(ABPV("HD",X)) G:+X=0 MOVE
S AU("MAX")=X G NXTX
MOVE F I=AU("MAX"):-1:1 S ABPV("HD",I+2)=ABPV("HD",I)
WRITE S ABPV("HD",1)=SITENAME,$P(AU("LINE"),"-",$L(SITENAME)+1)=""
S ABPV("HD",2)=AU("LINE"),AU("MAX")=AU("MAX")+2
D NOW^%DTC S Y=% X ^DD("DD") S YY=$P(Y,"@"),Y=$P(Y,"@",2)
S XX="",$P(XX,"*",80)="" W:IO=IO(0) @IOF,! D:IO'=IO(0) ^%AUCLS W XX
F I=1:1:AU("MAX")-1 D
.W !,"* " W:I=1 YY W:I=2 "User: ",ABPVUSER
.W ?40-(($L(ABPV("HD",I))/2)),ABPV("HD",I)
.S:I=2 Y="Device: "_ABPVDEV W:I<3 ?(77-$L(Y)),Y W ?78,"*"
W ! S DY=$Y ;S:IOST["QUME" DY=DY+1
W "*",?40-(($L(ABPV("HD",AU("MAX")))/2))
W @(ABPVRON),ABPV("HD",AU("MAX")),@(ABPVROFF)
S DX=78 ;I IOST["QUME" S DX=79
X XY W "*",!,XX
K X,Y,I,AU("MAX"),SITENAME,XX,ABPV("HD"),AU("LINE"),DX,DY
QUIT Q
ABPVHD ;SCREEN HEADING UTILITY; [ 07/15/91 8:50 PM ]
+1 ;;2.0;FACILITY PVT-INS TRACKING;*0*;IHS-OKC/KJR;AUGUST 7, 1991
+2 ;INPUT VARIABLES: ABPV("HD",X) = NARRATIVE TEXT < 76 CHARACTERS
+3 ; WHERE X IS SEQUENTIAL VARIABLE
+4 ; BEGINNING WITH 1
+5 ;
+6 ;OUTPUT VARIABLES: NONE
+7 ;
START IF $DATA(DUZ(2))'=1
SET DUZ(2)=$PIECE(^AUTTSITE(1,0),"^")
+1 SET SITENAME=$PIECE(^DIC(4,DUZ(2),0),"^",1)
SET X=0
+2 IF $DATA(XY)'=1
DO CURRENT^%ZIS
NXTX SET X=$ORDER(ABPV("HD",X))
IF +X=0
GOTO MOVE
+1 SET AU("MAX")=X
GOTO NXTX
MOVE FOR I=AU("MAX"):-1:1
SET ABPV("HD",I+2)=ABPV("HD",I)
WRITE SET ABPV("HD",1)=SITENAME
SET $PIECE(AU("LINE"),"-",$LENGTH(SITENAME)+1)=""
+1 SET ABPV("HD",2)=AU("LINE")
SET AU("MAX")=AU("MAX")+2
+2 DO NOW^%DTC
SET Y=%
XECUTE ^DD("DD")
SET YY=$PIECE(Y,"@")
SET Y=$PIECE(Y,"@",2)
+3 SET XX=""
SET $PIECE(XX,"*",80)=""
IF IO=IO(0)
WRITE @IOF,!
IF IO'=IO(0)
DO ^%AUCLS
WRITE XX
+4 FOR I=1:1:AU("MAX")-1
Begin DoDot:1
+5 WRITE !,"* "
IF I=1
WRITE YY
IF I=2
WRITE "User: ",ABPVUSER
+6 WRITE ?40-(($LENGTH(ABPV("HD",I))/2)),ABPV("HD",I)
+7 IF I=2
SET Y="Device: "_ABPVDEV
IF I<3
WRITE ?(77-$LENGTH(Y)),Y
WRITE ?78,"*"
End DoDot:1
+8 ;S:IOST["QUME" DY=DY+1
WRITE !
SET DY=$Y
+9 WRITE "*",?40-(($LENGTH(ABPV("HD",AU("MAX")))/2))
+10 WRITE @(ABPVRON),ABPV("HD",AU("MAX")),@(ABPVROFF)
+11 ;I IOST["QUME" S DX=79
SET DX=78
+12 XECUTE XY
WRITE "*",!,XX
+13 KILL X,Y,I,AU("MAX"),SITENAME,XX,ABPV("HD"),AU("LINE"),DX,DY
QUIT QUIT