ABPAHD ;SCREEN HEADING UTILITY; [ 07/18/91 7:05 PM ]
;;1.4;AO PVT-INS TRACKING;*0*;IHS-OKC/KJR;JULY 25, 1991
;INPUT VARIABLES: ABPA("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(ABPA("HD",X)) G:+X=0 MOVE
S AU("MAX")=X G NXTX
MOVE F I=AU("MAX"):-1:1 S ABPA("HD",I+2)=ABPA("HD",I)
WRITE S ABPA("HD",1)=SITENAME,$P(AU("LINE"),"-",$L(SITENAME)+1)=""
S ABPA("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: ",ABPAUSER
.W ?40-(($L(ABPA("HD",I))\2)),ABPA("HD",I)
.S:I=2 Y="Device: "_ABPADEV W:I<3 ?(77-$L(Y)),Y W ?78,"*"
W ! S DY=$Y W "*",?40-(($L(ABPA("HD",AU("MAX")))\2))
W @(ABPARON),ABPA("HD",AU("MAX")),@(ABPAROFF)
S DX=78 X XY W "*",!,XX
K X,Y,I,AU("MAX"),SITENAME,XX,ABPA("HD"),AU("LINE"),DX,DY
QUIT Q
ABPAHD ;SCREEN HEADING UTILITY; [ 07/18/91 7:05 PM ]
+1 ;;1.4;AO PVT-INS TRACKING;*0*;IHS-OKC/KJR;JULY 25, 1991
+2 ;INPUT VARIABLES: ABPA("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(ABPA("HD",X))
IF +X=0
GOTO MOVE
+1 SET AU("MAX")=X
GOTO NXTX
MOVE FOR I=AU("MAX"):-1:1
SET ABPA("HD",I+2)=ABPA("HD",I)
WRITE SET ABPA("HD",1)=SITENAME
SET $PIECE(AU("LINE"),"-",$LENGTH(SITENAME)+1)=""
+1 SET ABPA("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: ",ABPAUSER
+6 WRITE ?40-(($LENGTH(ABPA("HD",I))\2)),ABPA("HD",I)
+7 IF I=2
SET Y="Device: "_ABPADEV
IF I<3
WRITE ?(77-$LENGTH(Y)),Y
WRITE ?78,"*"
End DoDot:1
+8 WRITE !
SET DY=$Y
WRITE "*",?40-(($LENGTH(ABPA("HD",AU("MAX")))\2))
+9 WRITE @(ABPARON),ABPA("HD",AU("MAX")),@(ABPAROFF)
+10 SET DX=78
XECUTE XY
WRITE "*",!,XX
+11 KILL X,Y,I,AU("MAX"),SITENAME,XX,ABPA("HD"),AU("LINE"),DX,DY
QUIT QUIT