Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: APCDFCT

APCDFCT.m

Go to the documentation of this file.
  1. APCDFCT ; IHS/CMI/LAB - COUNT FORMS REPORT ;
  1. ;;2.0;IHS PCC SUITE;;MAY 14, 2009
  1. ;
  1. START ;
  1. S APCDSITE="" S:$D(DUZ(2)) APCDSITE=DUZ(2)
  1. I '$D(DUZ(2)) W $C(7),$C(7),!!,"SITE NOT SET IN DUZ(2) - NOTIFY SITE MANAGER!!",!! K APCDSITE Q
  1. I 'DUZ(2) W $C(7),$C(7),!!,"SITE NOT SET IN DUZ(2) - NOTIFY SITE MANAGER",!! K APCDSITE Q
  1. D INFORM
  1. GETDATES ;
  1. BD ;get beginning date
  1. W ! S DIR(0)="D^:DT:EP",DIR("A")="Enter beginning Posting Date" D ^DIR K DIR S:$D(DUOUT) DIRUT=1
  1. I $D(DIRUT) G XIT
  1. S APCDBD=Y
  1. ED ;get ending date
  1. 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
  1. I $D(DIRUT) G BD
  1. S APCDED=Y
  1. S X1=APCDBD,X2=-1 D C^%DTC S APCDSD=X
  1. ;
  1. DEC ;
  1. 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
  1. G:$D(DIRUT) BD
  1. I Y=1 S APCDDEC="ALL" G SORT
  1. DEC1 ;enter location
  1. S DIC("A")="Which Operator: ",DIC="^VA(200,",DIC(0)="AEMQ" D ^DIC K DIC,DA G:Y<0 DEC
  1. S APCDDEC=+Y
  1. SORT ;
  1. 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
  1. I $D(DIRUT) G DEC
  1. S APCDPROC=+Y I APCDPROC=4 S APCDSRT="" G ZIS
  1. S APCDSRT=Y(0)
  1. ZIS ;
  1. S XBRC="^APCDFCT1",XBRP="^APCDFCTP",XBRX="XIT^APCDFCT",XBNS="APCD"
  1. D ^XBDBQUE
  1. D XIT
  1. Q
  1. XIT ;
  1. K DIC,%DT,IO("Q"),X,Y,POP,DIRUT,ZTSK,APCDH,APCDM,APCDS,APCDTS,ZTIO
  1. K APCD1,APCD2,APCD80S,APCDAP,APCDBD,APCDBDD,APCDBT,APCDDATE,APCDDEC,APCDDT,APCDED,APCDEDD,APCDET,APCDGOT,APCDFCT,APCDVDES,APCDTDES,APCDDESU,APCDX
  1. K APCDLENG,APCDODAT,APCDPG,APCDPROC,APCDPROV,APCDSD,APCDSITE,APCDSORT,APCDSRT,APCDSUB,APCDTOT,APCDVDFN,APCDVREC,APCDWDAT,APCDY,APCDC,APCDDFN,APCDAVG,APCDDEC
  1. Q
  1. ;
  1. INFORM ;
  1. W:$D(IOF) @IOF
  1. 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.",!
  1. W !,"This report is operators who enter Tran Codes via the 2 options for",!,"entering tran codes on outpatient and in hospital visits.",!
  1. Q
  1. ;