- APCDFCT ; IHS/CMI/LAB - COUNT FORMS 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
- D INFORM
- 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: " S Y=APCDBD D DD^%DT S DIR("B")=Y,Y="" 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
- ;
- DEC ;
- S DIR(0)="YO",DIR("A")="Report on ALL Operators",DIR("?")="If you wish to include visits entered by ALL Operators answer Yes. If you wish to tabulate for only one operator enter NO." D ^DIR K DIR
- G:$D(DIRUT) BD
- I Y=1 S APCDDEC="ALL" G SORT
- DEC1 ;enter location
- S DIC("A")="Which Operator: ",DIC="^VA(200,",DIC(0)="AEMQ" D ^DIC K DIC,DA G:Y<0 DEC
- S APCDDEC=+Y
- SORT ;
- S DIR(0)="S^1:CLINIC TYPE;2:SERVICE CATEGORY;3:VISIT TYPE;4:INCLUDE ALL VISITS",DIR("A")="Count number of Forms Processed by",DIR("B")="4" D ^DIR K DIR
- I $D(DIRUT) G DEC
- S APCDPROC=+Y I APCDPROC=4 S APCDSRT="" G ZIS
- S APCDSRT=Y(0)
- ZIS ;
- S XBRC="^APCDFCT1",XBRP="^APCDFCTP",XBRX="XIT^APCDFCT",XBNS="APCD"
- D ^XBDBQUE
- D XIT
- Q
- XIT ;
- K DIC,%DT,IO("Q"),X,Y,POP,DIRUT,ZTSK,APCDH,APCDM,APCDS,APCDTS,ZTIO
- K APCD1,APCD2,APCD80S,APCDAP,APCDBD,APCDBDD,APCDBT,APCDDATE,APCDDEC,APCDDT,APCDED,APCDEDD,APCDET,APCDGOT,APCDFCT,APCDVDES,APCDTDES,APCDDESU,APCDX
- K APCDLENG,APCDODAT,APCDPG,APCDPROC,APCDPROV,APCDSD,APCDSITE,APCDSORT,APCDSRT,APCDSUB,APCDTOT,APCDVDFN,APCDVREC,APCDWDAT,APCDY,APCDC,APCDDFN,APCDAVG,APCDDEC
- Q
- ;
- INFORM ;
- W:$D(IOF) @IOF
- W !,"This report will generate a count of visits entered by a particular data entry",!,"operator or for ALL data entry operators for a date range that you specify.",!
- W !,"This report is operators who enter Tran Codes via the 2 options for",!,"entering tran codes on outpatient and in hospital visits.",!
- Q
- ;
- APCDFCT ; IHS/CMI/LAB - COUNT FORMS REPORT ;
- +1 ;;2.0;IHS PCC SUITE;;MAY 14, 2009
- +2 ;
- 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 DO INFORM
- 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: "
- SET Y=APCDBD
- DO DD^%DT
- SET DIR("B")=Y
- SET Y=""
- 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 ;
- DEC ;
- +1 SET DIR(0)="YO"
- SET DIR("A")="Report on ALL Operators"
- SET DIR("?")="If you wish to include visits entered by ALL Operators answer Yes. If you wish to tabulate for only one operator enter NO."
- DO ^DIR
- KILL DIR
- +2 IF $DATA(DIRUT)
- GOTO BD
- +3 IF Y=1
- SET APCDDEC="ALL"
- GOTO SORT
- DEC1 ;enter location
- +1 SET DIC("A")="Which Operator: "
- SET DIC="^VA(200,"
- SET DIC(0)="AEMQ"
- DO ^DIC
- KILL DIC,DA
- IF Y<0
- GOTO DEC
- +2 SET APCDDEC=+Y
- SORT ;
- +1 SET DIR(0)="S^1:CLINIC TYPE;2:SERVICE CATEGORY;3:VISIT TYPE;4:INCLUDE ALL VISITS"
- SET DIR("A")="Count number of Forms Processed by"
- SET DIR("B")="4"
- DO ^DIR
- KILL DIR
- +2 IF $DATA(DIRUT)
- GOTO DEC
- +3 SET APCDPROC=+Y
- IF APCDPROC=4
- SET APCDSRT=""
- GOTO ZIS
- +4 SET APCDSRT=Y(0)
- ZIS ;
- +1 SET XBRC="^APCDFCT1"
- SET XBRP="^APCDFCTP"
- SET XBRX="XIT^APCDFCT"
- SET XBNS="APCD"
- +2 DO ^XBDBQUE
- +3 DO XIT
- +4 QUIT
- XIT ;
- +1 KILL DIC,%DT,IO("Q"),X,Y,POP,DIRUT,ZTSK,APCDH,APCDM,APCDS,APCDTS,ZTIO
- +2 KILL APCD1,APCD2,APCD80S,APCDAP,APCDBD,APCDBDD,APCDBT,APCDDATE,APCDDEC,APCDDT,APCDED,APCDEDD,APCDET,APCDGOT,APCDFCT,APCDVDES,APCDTDES,APCDDESU,APCDX
- +3 KILL APCDLENG,APCDODAT,APCDPG,APCDPROC,APCDPROV,APCDSD,APCDSITE,APCDSORT,APCDSRT,APCDSUB,APCDTOT,APCDVDFN,APCDVREC,APCDWDAT,APCDY,APCDC,APCDDFN,APCDAVG,APCDDEC
- +4 QUIT
- +5 ;
- INFORM ;
- +1 IF $DATA(IOF)
- WRITE @IOF
- +2 WRITE !,"This report will generate a count of visits entered by a particular data entry",!,"operator or for ALL data entry operators for a date range that you specify.",!
- +3 WRITE !,"This report is operators who enter Tran Codes via the 2 options for",!,"entering tran codes on outpatient and in hospital visits.",!
- +4 QUIT
- +5 ;