APCLAP9 ; IHS/CMI/LAB - visits by provider ;
;;2.0;IHS PCC SUITE;;MAY 14, 2009
;
START ;
S APCLJOB=$J,APCLBTH=$H
D INFORM
GETDATES ;
BD ;
S DIR(0)="D^::EP",DIR("A")="Enter Beginning Visit Date",DIR("?")="Enter the beginning visit date for the search." D ^DIR K DIR S:$D(DUOUT) DIRUT=1
G:$D(DIRUT) XIT
S APCLBD=Y
ED ;
S DIR(0)="DA^::EP",DIR("A")="Enter Ending Visit Date: " D ^DIR K DIR S:$D(DUOUT) DIRUT=1
G:$D(DIRUT) XIT
I Y<APCLBD W !,"Ending date must be greater than or equal to beginning date!" G ED
S APCLED=Y
S X1=APCLBD,X2=-1 D C^%DTC S APCLSD=X
LOC ;enter location
S APCLLOC=""
S DIR(0)="9000010,.06",DIR("A")="Include visits for which Facility" K DA D ^DIR K DIR
I $D(DIRUT) W !!,"No facilty entered." G BD
S APCLLOC=+Y
ZIS ;
DEMO ;
D DEMOCHK^APCLUTL(.APCLDEMO)
I APCLDEMO=-1 G LOC
S XBRP="^APCLAP9P",XBRC="^APCLAP91",XBRX="XIT^APCLAP9",XBNS="APCL"
D ^XBDBQUE
D XIT
Q
XIT ;
K APCLAPC,APCLBD,APCLBT,APCLBTH,APCLCLIN,APCLCLN,APCLED,APCLGRAN,APCLJOB,APCLLOC,APCLPG,APCLSC,APCLSD,APCLTYPE,APCLTOT,APCLVIEN,APCLX,APCLVREC
K DFN,C
K DA,D0,S,TS,X,Y,DIC,DR,H,M,POP,ZTSK
Q
;
INFORM ;
W:$D(IOF) @IOF
W !!,?10,"************** PCC DATA ANALYSIS REPORT **************",!!
W !,"This report will tally all visits processed in PCC and break them",!,"down by Type, Service Category and complete/incomplete."
W !!,"It will also, to the best of our ability, determine which of the visits",!,"would be excluded from the APC system.",!!
Q
;
APCLAP9 ; IHS/CMI/LAB - visits by provider ;
+1 ;;2.0;IHS PCC SUITE;;MAY 14, 2009
+2 ;
START ;
+1 SET APCLJOB=$JOB
SET APCLBTH=$HOROLOG
+2 DO INFORM
GETDATES ;
BD ;
+1 SET DIR(0)="D^::EP"
SET DIR("A")="Enter Beginning Visit Date"
SET DIR("?")="Enter the beginning visit date for the search."
DO ^DIR
KILL DIR
IF $DATA(DUOUT)
SET DIRUT=1
+2 IF $DATA(DIRUT)
GOTO XIT
+3 SET APCLBD=Y
ED ;
+1 SET DIR(0)="DA^::EP"
SET DIR("A")="Enter Ending Visit Date: "
DO ^DIR
KILL DIR
IF $DATA(DUOUT)
SET DIRUT=1
+2 IF $DATA(DIRUT)
GOTO XIT
+3 IF Y<APCLBD
WRITE !,"Ending date must be greater than or equal to beginning date!"
GOTO ED
+4 SET APCLED=Y
+5 SET X1=APCLBD
SET X2=-1
DO C^%DTC
SET APCLSD=X
LOC ;enter location
+1 SET APCLLOC=""
+2 SET DIR(0)="9000010,.06"
SET DIR("A")="Include visits for which Facility"
KILL DA
DO ^DIR
KILL DIR
+3 IF $DATA(DIRUT)
WRITE !!,"No facilty entered."
GOTO BD
+4 SET APCLLOC=+Y
ZIS ;
DEMO ;
+1 DO DEMOCHK^APCLUTL(.APCLDEMO)
+2 IF APCLDEMO=-1
GOTO LOC
+3 SET XBRP="^APCLAP9P"
SET XBRC="^APCLAP91"
SET XBRX="XIT^APCLAP9"
SET XBNS="APCL"
+4 DO ^XBDBQUE
+5 DO XIT
+6 QUIT
XIT ;
+1 KILL APCLAPC,APCLBD,APCLBT,APCLBTH,APCLCLIN,APCLCLN,APCLED,APCLGRAN,APCLJOB,APCLLOC,APCLPG,APCLSC,APCLSD,APCLTYPE,APCLTOT,APCLVIEN,APCLX,APCLVREC
+2 KILL DFN,C
+3 KILL DA,D0,S,TS,X,Y,DIC,DR,H,M,POP,ZTSK
+4 QUIT
+5 ;
INFORM ;
+1 IF $DATA(IOF)
WRITE @IOF
+2 WRITE !!,?10,"************** PCC DATA ANALYSIS REPORT **************",!!
+3 WRITE !,"This report will tally all visits processed in PCC and break them",!,"down by Type, Service Category and complete/incomplete."
+4 WRITE !!,"It will also, to the best of our ability, determine which of the visits",!,"would be excluded from the APC system.",!!
+5 QUIT
+6 ;