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

APCLAUD0.m

Go to the documentation of this file.
APCLAUD0 ; IHS/CMI/LAB - more audit report ;
 ;;2.0;IHS PCC SUITE;;MAY 14, 2009
 ;
PROV K APCLSLCT
PROV00 D PROV01 G PROV11
PROV01 S APCLMSG="PROVIDER Selection" W:$D(IOF) @IOF D APCLMSGO
PROV02 D ICDB1^APCLAUD
 I $D(APCLSLCT) W !
 S APCLPRV=0 F APCLI=0:0 S APCLPRV=$O(^XTMP("APCLAUD",APCLJOB,APCLBT,"PROV",APCLPRV)) Q:APCLPRV'=+APCLPRV  W !,"Provider: ",$S($P(^DD(9000010.06,.01,0),U,2)[200:$P(^VA(200,APCLPRV,0),U),1:$P(^DIC(16,$P(^DIC(6,APCLPRV,0),"^"),0),"^"))
 I $D(^XTMP("APCLAUD",APCLJOB,APCLBT,"PROV","NOSORT")) W !!,"No Primary Provider criteria selected."
 I $D(^XTMP("APCLAUD",APCLJOB,APCLBT,"PROV","ALL")) W !!,"ALL Providers Selected."
 Q
PROV11 I $D(APCLSLCT) G PROV1
 S DIR(0)="Y",DIR("A")="Do you want the Audit Search by Provider",DIR("B")="Y" D ^DIR K DIR S:$D(DUOUT) DIRUT=1
 I $D(DIRUT) S:APCLIRNG>1 APCLIRNG=APCLIRNG-1,APCLSLCT="" S APCLICDG=$S($D(APCLSLCT):"ICDE1^APCLAUD",1:"ICDB11^APCLAUD") G @APCLICDG
 I Y=1 G PROV111
 S ^XTMP("APCLAUD",APCLJOB,APCLBT,"PROV","NOSORT")="" G PROVN
PROV111 ;
 S DIR(0)="Y",DIR("A")="Do you want ALL Providers",DIR("B")="Y" D ^DIR K DIR S:$D(DUOUT) DIRUT=1
 G:$D(DIRUT) PROV11
 I Y=1 S ^XTMP("APCLAUD",APCLJOB,APCLBT,"PROV","ALL")="" G PROVN
 W !!,"The Audit Search will include only Visits for which the Primary Provider",!,"matches the one(s) you select."
PROV1 W ! I $P(^DD(9000010.06,.01,0),U,2)[6 S DIC="^DIC(6,",DIC("A")="Select Provider: ",DIC(0)="AEMQ" D ^DIC
 I $P(^DD(9000010.06,.01,0),U,2)[200 S DIC="^VA(200,",DIC("A")="Select Provider: ",DIC(0)="AEMQ",D="AK.PROVIDER" D MIX^DIC1
PROV2 G:X["^" PROV11 I Y=-1,$D(APCLSLCT) G PROVN
 I Y=-1 G PROV1
 S (^XTMP("APCLAUD",APCLJOB,APCLBT,"PROV",+Y),APCLSLCT)="" G PROV00
PROVN S APCLMSG="SEARCH Criteria" W:$D(IOF) @IOF D APCLMSGO
 D PROV02 W !!,"The Audit Search can report on all Visits that match the above criteria,",!,"or it can report on a randomized sampling of matching Visits."
 S DIR(0)="S^A:ALL Visits that match;R:Random sample of visits that match",DIR("A")="Which visit set",DIR("B")="A" D ^DIR K DIR S:$D(DUOUT) DIRUT=1
 I $D(DIRUT) G PROV111
 I Y="A" S ^XTMP("APCLAUD",APCLJOB,APCLBT,"RAND","ALL")="" G ZIS
 S DIR(0)="N^1:1000:0",DIR("A")="How many randomized visits do you want in the report" D ^DIR K DIR S:$D(DUOUT) DIRUT=1
 I $D(DIRUT) G PROVN
 S ^XTMP("APCLAUD",APCLJOB,APCLBT,"RAND",X)=""
 G ZIS
APCLMSGO W ?30,"*** Audit Search ***",!!
 W ?80-$L(APCLMSG)\2,APCLMSG,!! Q
ZIS ;
DEMO ;
 D DEMOCHK^APCLUTL(.APCLDEMO)
 I APCLDEMO=-1 G PROV
 K APCLSLCT
 S XBNS="APCL",XBNS("^XTMP(""APCLAUD"",APCLJOB,APCLBT,")="",XBRC="^APCLAUD1",XBRP="^APCLAUD2",XBRX="QUIT^APCLAUD0"
 D ^XBDBQUE
QUIT D ^%ZISC K DIC,%DT,ZTSK,ZTQUEUED,IO("Q"),I,J,K,Y,II,IJ,JJ
 K APCLSITE,APCLQ,APCL80D,APCLDT,APCLDTP,APCLEDY,APCLPG,APCLBDY,APCLSLCT,APCL1,APCL11,APCL1SV,APCLALLP,APCLALLR,APCLALLI,APCLDSP,APCLI,APCLICDD,APCLICDG,APCLIDFN,APCLINM,APCLINO,APCLIRNG,APCLMSG,APCLPDFN,APCLPNO,APCLPN0,APCLPNM,APCLJOB,APCLBT
 K APCL,APCLPNO1,APCLNOSP,APCLCNT,APCLCNTR,APCLGOT,APCLHRN,APCLICNO,APCLLIM,APCLPRV,APCLSKP,APCLCAR,APCLPPR,APCLPRNG,APCLPTNM,APCLVDFN,APCLVDT,APCLVNO,APCLVN0,APCL2,APCLED,APCLS,APCLBD,APCLHAG,APCLHAGE,APCLLAG,APCLLAGE,APCLPDYS
 K APCLPAT,DOB,APCLSC,APCLSCP,APCLTYPE,APCLTYPP,APCLCLN,APCLCLNP,APCLTABL,APCLSD,APCLLOC,APCLLOCP,APCLPOVD,APCLIJ,APCLPNUM
 Q