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

APCLFPC.m

Go to the documentation of this file.
APCLFPC ; IHS/CMI/LAB - TOP FPR PROCEDURES ; 10 Nov 2009  9:49 AM
 ;;2.0;IHS PCC SUITE;**2**;MAY 14, 2009
 ;
 W !!?20,"*****  FREQUENCY OF CPTS REPORT  *****",!!
 D EXIT
GETDATES ;
BD ;get beginning date
 K DIR
 W ! S DIR(0)="D^:DT:EP",DIR("A")="Enter beginning Visit Date" D ^DIR S:$D(DUOUT) DIRUT=1 K DIR S:$D(DUOUT) DIRUT=1
 I $D(DIRUT) G EXIT
 S APCLBD=Y
ED ;get ending date
 W ! S DIR(0)="DA^"_APCLBD_":DT:EP",DIR("A")="Enter ending Visit Date:  " S Y=APCLBD D DD^%DT S Y="" D ^DIR S:$D(DUOUT) DIRUT=1 K DIR S:$D(DUOUT) DIRUT=1
 I $D(DIRUT) G BD
 S APCLED=Y
 S X1=APCLBD,X2=-1 D C^%DTC S APCLSD=X
 I $D(DIRUT) G GETDATES
 S APCLNCAN=1 D ADD^APCLVL01 I $D(APCLQUIT) D DEL^APCLVL K APCLQUIT G GETDATES
 ;
LIMITCPT ;
 K APCLCPTM S APCLCPTT=""
 S DIR(0)="S^A:All CPTs;S:Selected set of CPTs, range of CPTs or taxonomy of CPTs",DIR("A")="List patients who are members of",DIR("B")="A" K DA D ^DIR K DIR
 I $D(DIRUT) G EXIT
 S APCLCPTT=Y
 I APCLCPTT="A" W !!,"ALL CPT codes will be included in the report.",! G NUM
 I APCLCPTT="O" D  G:'$D(APCLCPTM) LIMITCPT  G NUM
 .S Y="" F  D  Q:Y=-1
 ..S DIC="^ICPT(",DIC(0)="AEMQ",DIC("A")="Which CPT: " D ^DIC K DIC
 ..Q:Y=-1
 ..S APCLCPTM(+Y)=""
 S X="CPT CODE",DIC="^AMQQ(5,",DIC(0)="FMX",DIC("S")="I $P(^(0),U,14)",D="B" D MIX^DIC1 K DIC,DA I Y=-1 W "OOPS - QMAN NOT CURRENT - QUITTING" S APCLERR=1 D EXIT Q
 D PEP^AMQQGTX0(+Y,"APCLCPTM(")
 I '$D(APCLCPTM) G LIMITCPT
 I $D(APCLCPTM("*")) K APCLCPTM G LIMITCPT
NUM S DIR(0)="NO^5:100:0",DIR("A")="How many entries do you want in the list",DIR("B")="10",DIR("?")="" D ^DIR S:$D(DUOUT) DIRUT=1 K DIR
 S APCLLNO=Y
 S Y=APCLBD D DD^%DT S APCLBDD=Y S Y=APCLED D DD^%DT S APCLEDD=Y
 S APCLTCW=0,APCLPTVS="V",APCLTYPE="D",APCLCTYP="T"
 K ^APCLVRPT(APCLRPT,11) S APCLCNTL="S" D ^APCLVL4 K APCLCNTL I $D(APCLQUIT) D DEL^APCLVL G GETDATES
ZIS ;
DEMO ;
 D DEMOCHK^APCLUTL(.APCLDEMO)
 I APCLDEMO=-1 G NUM
 K APCLANS,APCLCNT,APCLCRIT,AMQQTAX,APCLCUT,APCLDISP,APCLHIGH,APCLI,APCLNCAN,APCLSEL,APCLSKIP,APCLTEXT,APCLVAR,APCLVIEN,APCLVREC
 S XBRC="^APCLFPC1",XBRP="^APCLFPCP",XBNS="APCL",XBRX="EXIT^APCLFPC"
 D ^XBDBQUE
 D EXIT
 Q
EXIT ;
 K APCLBD,APCLED,APCLDOB1,APCLDOB2,APCLSEX,X,Y,Z,%,APCLFAC,APCLJOB,APCLLNO,ZTQUEUED,APCLCLN,APCLTYPE,APCLSC,APCLC,APCLPREC,APCLSD,APCLA,APCLC,APCLF,APCLGTOT,APCLPRC,APCLTOT,APCLD,APCLPRCN,APCLET
 K APCLQUIT,APCLAPC,APCLDATE,APCLPOV,APCLVSIT,APCLNOCK,APCLTOT,APCLPROV,APCLVTOT,APCLLINO,L,I,APCLCMA,APCLPOVN,APCLV,APCLTYPP,APCLSCP,APCLPRIM,APCLALL,APCLSEAT
 K APCLANS,AMQQTAX,APCLBDD,APCLCNT,APCLCRIT,APCLCTYP,APCLCUT,APCLDISP,APCLEDD,APCLHIGH,APCLI,APCLNCAN,APCLPTVS,APCLRPT,APCLSEL,APCLSKIP,APCLTCW,APCLTEXT,APCLVAR,APCLVIEN,APCLVREC,DFN,APCLX,APCLY
 K APCLBT
 Q