AGNDX1 ; IHS/ASDS/EFG - PRINT A SELECTED PATIENT'S INDEX CARD ;
;;7.1;PATIENT REGISTRATION;;AUG 25,2005
D PTLK^AG
DFN ;EP - With Pre-defined DFN.
Q:'$D(DFN)
D ALIAS^AGNDXP
G END:$D(DTOUT)!$D(DFOUT)!$D(DUOUT)
DEV S %ZIS="OPQ" D ^%ZIS I POP S IOP=ION D ^%ZIS Q
G:'$D(IO("Q")) START K IO("Q") I $D(IO("S"))!($E(IOST)'="P") W *7,!,"Please queue to system printers." D ^%ZISC G DEV
X ^%ZOSF("UCI") S ZTRTN="START^AGNDX1",ZTUCI=Y,ZTDESC="Index Card for "_$P(^DPT(DFN,0),U)_"." S:$D(AGALIAS) G="AGALIAS",ZTSAVE(G)="" F G="DFN" S ZTSAVE(G)=""
D ^%ZTLOAD G:'$D(ZTSK) DEV K AG,AGALIAS,G,ZTDESC,ZTRTN,ZTSAVE,ZTSK,ZTUCI D ^%ZISC
Q
START ;EP - From TaskMan.
U IO D ^AGNDXP
END D ^%ZISC K AG,AGALIAS,I,AGLINE,IOP,AGTOT,X,Y D:$D(ZTQUEUED) KILL^%ZTLOAD
Q
AGNDX1 ; IHS/ASDS/EFG - PRINT A SELECTED PATIENT'S INDEX CARD ;
+1 ;;7.1;PATIENT REGISTRATION;;AUG 25,2005
+2 DO PTLK^AG
DFN ;EP - With Pre-defined DFN.
+1 IF '$DATA(DFN)
QUIT
+2 DO ALIAS^AGNDXP
+3 IF $DATA(DTOUT)!$DATA(DFOUT)!$DATA(DUOUT)
GOTO END
DEV SET %ZIS="OPQ"
DO ^%ZIS
IF POP
SET IOP=ION
DO ^%ZIS
QUIT
+1 IF '$DATA(IO("Q"))
GOTO START
KILL IO("Q")
IF $DATA(IO("S"))!($EXTRACT(IOST)'="P")
WRITE *7,!,"Please queue to system printers."
DO ^%ZISC
GOTO DEV
+2 XECUTE ^%ZOSF("UCI")
SET ZTRTN="START^AGNDX1"
SET ZTUCI=Y
SET ZTDESC="Index Card for "_$PIECE(^DPT(DFN,0),U)_"."
IF $DATA(AGALIAS)
SET G="AGALIAS"
SET ZTSAVE(G)=""
FOR G="DFN"
SET ZTSAVE(G)=""
+3 DO ^%ZTLOAD
IF '$DATA(ZTSK)
GOTO DEV
KILL AG,AGALIAS,G,ZTDESC,ZTRTN,ZTSAVE,ZTSK,ZTUCI
DO ^%ZISC
+4 QUIT
START ;EP - From TaskMan.
+1 USE IO
DO ^AGNDXP
END DO ^%ZISC
KILL AG,AGALIAS,I,AGLINE,IOP,AGTOT,X,Y
IF $DATA(ZTQUEUED)
DO KILL^%ZTLOAD
+1 QUIT