APCDFOS ; IHS/CMI/LAB - FORMS TRACKING SUMMARY REPORT ;
;;2.0;IHS PCC SUITE;;MAY 14, 2009
START ;
S APCDSITE="" S:$D(DUZ(2)) APCDSITE=DUZ(2)
I '$D(DUZ(2)) W $C(7),$C(7),!!,"SITE NOT SET IN DUZ(2) - NOTIFY SITE MANAGER!!",!! K APCDSITE Q
I 'DUZ(2) W $C(7),$C(7),!!,"SITE NOT SET IN DUZ(2) - NOTIFY SITE MANAGER",!! K APCDSITE Q
W:$D(IOF) @IOF
S APCDLHDR="SUMMARY COUNT OF VISITS PROCESSED BY DATA ENTRY"
W !?((80-$L(APCDLHDR))/2),APCDLHDR
W !!,"This report uses the Forms Tracking data to summarize the forms that have",!,"been processed by PCC Data Entry Operators.",!!
W "Enter the date range for which you would like the summary report.",!!
S APCDJOB=$J,APCDBT=$H
K ^XTMP("APCDFOS",APCDJOB,APCDBT)
GETDATES ;
BD ;get beginning date
W ! S DIR(0)="D^:DT:EP",DIR("A")="Enter Beginning POSTING Date" D ^DIR K DIR S:$D(DUOUT) DIRUT=1
I $D(DIRUT) G XIT
S APCDBD=Y
ED ;get ending date
W ! S DIR(0)="DA^"_APCDBD_":DT:EP",DIR("A")="Enter Ending POSTING Date: " D ^DIR K DIR S:$D(DUOUT) DIRUT=1
I $D(DIRUT) G BD
S APCDED=Y
S X1=APCDBD,X2=-1 D C^%DTC S APCDSD=X
;
ZIS ;
S XBRP="^APCDFOSP",XBRC="^APCDFOS1",XBRX="XIT^APCDFOS",XBNS="APCD"
D ^XBDBQUE
D XIT
Q
XIT ;
K APCDBD,APCDBDT,APCDBT,APCDC,APCDCAT,APCDCLN,APCDD,APCDDFN,APCDDT,APCDED,APCDEDT,APCDJ,APCDJOB,APCDLHDR,APCDLOC,APCDO,APCDODAT,APCDPATE,APCDQUIT,APCDR,APCDSD,APCDSITE,APCDTOT,APCDTYPE,APCDVDFN,DIR,DIRUT,DTOUT,DUOUT,F,G,I,L,N,O,P,R,V,X,X1,X2,Y
Q
APCDFOS ; IHS/CMI/LAB - FORMS TRACKING SUMMARY REPORT ;
+1 ;;2.0;IHS PCC SUITE;;MAY 14, 2009
START ;
+1 SET APCDSITE=""
IF $DATA(DUZ(2))
SET APCDSITE=DUZ(2)
+2 IF '$DATA(DUZ(2))
WRITE $CHAR(7),$CHAR(7),!!,"SITE NOT SET IN DUZ(2) - NOTIFY SITE MANAGER!!",!!
KILL APCDSITE
QUIT
+3 IF 'DUZ(2)
WRITE $CHAR(7),$CHAR(7),!!,"SITE NOT SET IN DUZ(2) - NOTIFY SITE MANAGER",!!
KILL APCDSITE
QUIT
+4 IF $DATA(IOF)
WRITE @IOF
+5 SET APCDLHDR="SUMMARY COUNT OF VISITS PROCESSED BY DATA ENTRY"
+6 WRITE !?((80-$LENGTH(APCDLHDR))/2),APCDLHDR
+7 WRITE !!,"This report uses the Forms Tracking data to summarize the forms that have",!,"been processed by PCC Data Entry Operators.",!!
+8 WRITE "Enter the date range for which you would like the summary report.",!!
+9 SET APCDJOB=$JOB
SET APCDBT=$HOROLOG
+10 KILL ^XTMP("APCDFOS",APCDJOB,APCDBT)
GETDATES ;
BD ;get beginning date
+1 WRITE !
SET DIR(0)="D^:DT:EP"
SET DIR("A")="Enter Beginning POSTING Date"
DO ^DIR
KILL DIR
IF $DATA(DUOUT)
SET DIRUT=1
+2 IF $DATA(DIRUT)
GOTO XIT
+3 SET APCDBD=Y
ED ;get ending date
+1 WRITE !
SET DIR(0)="DA^"_APCDBD_":DT:EP"
SET DIR("A")="Enter Ending POSTING Date: "
DO ^DIR
KILL DIR
IF $DATA(DUOUT)
SET DIRUT=1
+2 IF $DATA(DIRUT)
GOTO BD
+3 SET APCDED=Y
+4 SET X1=APCDBD
SET X2=-1
DO C^%DTC
SET APCDSD=X
+5 ;
ZIS ;
+1 SET XBRP="^APCDFOSP"
SET XBRC="^APCDFOS1"
SET XBRX="XIT^APCDFOS"
SET XBNS="APCD"
+2 DO ^XBDBQUE
+3 DO XIT
+4 QUIT
XIT ;
+1 KILL APCDBD,APCDBDT,APCDBT,APCDC,APCDCAT,APCDCLN,APCDD,APCDDFN,APCDDT,APCDED,APCDEDT,APCDJ,APCDJOB,APCDLHDR,APCDLOC,APCDO,APCDODAT,APCDPATE,APCDQUIT,APCDR,APCDSD,APCDSITE,APCDTOT,APCDTYPE,APCDVDFN,DIR,DIRUT,DTOUT,DUOUT,F,G,I,L,N,O,P,R,V,X,X1,X2
,Y
+2 QUIT