AGTXTOT ; IHS/ASDS/EFG - REG EXPORT TOTALS ;
;;7.1;PATIENT REGISTRATION;;AUG 25,2005
MSG W !!?15,"DO YOU WANT A PAPER COPY OF THE TOTALS? (Y/N) Y// " D READ^AG S:'$D(DQOUT) Y=$E(Y_"Y") Q:$D(DUOUT)!$D(DTOUT)!$D(DFOUT)!("Nn"[Y) I $D(DQOUT)!("Yy"'[Y) D YN^AG G MSG
S %ZIS="OPQ" D ^%ZIS I POP D HOME^%ZIS Q
G:'$D(IO("Q")) HDR
K IO("Q") X ^%ZOSF("UCI") S ZTUCI=Y,ZTRTN="HDR^AGTXTOT",ZTDESC="TRANSACTION TOTALS - AGTXTRAN" F G="AG(""TOT"")","AGBAD16","AGBAD51" S ZTSAVE(G)=""
D ^%ZTLOAD K ZTSK G KILL
HDR ;EP - From TaskMan.
U IO D NOW^AG S AG("LOC")=$P(^DIC(4,DUZ(2),0),U)
W $$S^AGVDF("IOF"),!!,$P(^VA(200,DUZ,0),U),?80-$L(AG("LOC"))\2,AG("LOC"),!?26,"TRANSACTION TOTALS - AGTXTRAN"
X ^%ZOSF("UCI") W !?36,"UCI: ",$P(Y,",",1)
S AG("T")=0,AG("N")=0 F AG("T")=0:1 S AG("N")=$O(^AGCHDFN(AG("N"))) Q:AG("N")'>0
W !!?80-$L("as of "_AGTIME)\2,"as of ",AGTIME
W !!!!?10,"NUMBER OF PATIENTS BEING SENT = ",$J(AG("T"),5)
W !!?10,"NUMBER OF PATIENT RECORDS TO SEND = ",$J(AG("TOT"),5)
W !?10," TOTAL RECORDS TO SEND = ",$J(AG("T")+AG("TOT"),5)
W !!?10,"NUMBER OF BLANK ADDRESS RECORDS = ",$J(AGBAD16,5),!!?10,"NUMBER OF BLANK COMMUNITY = ",$J(AGBAD51,5)
KILL D ^%ZISC K AGTIME,AG("LOC") D:$D(ZTQUEUED) KILL^%ZTLOAD
Q
AGTXTOT ; IHS/ASDS/EFG - REG EXPORT TOTALS ;
+1 ;;7.1;PATIENT REGISTRATION;;AUG 25,2005
MSG WRITE !!?15,"DO YOU WANT A PAPER COPY OF THE TOTALS? (Y/N) Y// "
DO READ^AG
IF '$DATA(DQOUT)
SET Y=$EXTRACT(Y_"Y")
IF $DATA(DUOUT)!$DATA(DTOUT)!$DATA(DFOUT)!("Nn"[Y)
QUIT
IF $DATA(DQOUT)!("Yy"'[Y)
DO YN^AG
GOTO MSG
+1 SET %ZIS="OPQ"
DO ^%ZIS
IF POP
DO HOME^%ZIS
QUIT
+2 IF '$DATA(IO("Q"))
GOTO HDR
+3 KILL IO("Q")
XECUTE ^%ZOSF("UCI")
SET ZTUCI=Y
SET ZTRTN="HDR^AGTXTOT"
SET ZTDESC="TRANSACTION TOTALS - AGTXTRAN"
FOR G="AG(""TOT"")","AGBAD16","AGBAD51"
SET ZTSAVE(G)=""
+4 DO ^%ZTLOAD
KILL ZTSK
GOTO KILL
HDR ;EP - From TaskMan.
+1 USE IO
DO NOW^AG
SET AG("LOC")=$PIECE(^DIC(4,DUZ(2),0),U)
+2 WRITE $$S^AGVDF("IOF"),!!,$PIECE(^VA(200,DUZ,0),U),?80-$LENGTH(AG("LOC"))\2,AG("LOC"),!?26,"TRANSACTION TOTALS - AGTXTRAN"
+3 XECUTE ^%ZOSF("UCI")
WRITE !?36,"UCI: ",$PIECE(Y,",",1)
+4 SET AG("T")=0
SET AG("N")=0
FOR AG("T")=0:1
SET AG("N")=$ORDER(^AGCHDFN(AG("N")))
IF AG("N")'>0
QUIT
+5 WRITE !!?80-$LENGTH("as of "_AGTIME)\2,"as of ",AGTIME
+6 WRITE !!!!?10,"NUMBER OF PATIENTS BEING SENT = ",$JUSTIFY(AG("T"),5)
+7 WRITE !!?10,"NUMBER OF PATIENT RECORDS TO SEND = ",$JUSTIFY(AG("TOT"),5)
+8 WRITE !?10," TOTAL RECORDS TO SEND = ",$JUSTIFY(AG("T")+AG("TOT"),5)
+9 WRITE !!?10,"NUMBER OF BLANK ADDRESS RECORDS = ",$JUSTIFY(AGBAD16,5),!!?10,"NUMBER OF BLANK COMMUNITY = ",$JUSTIFY(AGBAD51,5)
KILL DO ^%ZISC
KILL AGTIME,AG("LOC")
IF $DATA(ZTQUEUED)
DO KILL^%ZTLOAD
+1 QUIT