AZANSTIL ; IHS/PHXAO/TMJ - Print STILL ELIGIBLE to Master List for a specific Log [ 02/03/03 11:54 AM ]
;;1.0;MEDICAID DOWNLOAD;;JUL 10, 2000
;
START ;Do INFORM THEN ASK
D INFORM
ASK ;Ask For Specific Log
S AZAMLOG=""
S AZAMALL=0
S AZAMBY=0
;
;S AZXASTBD="C",AZXASTED="O"
W ! S DIR(0)="Y0",DIR("A")="Would you like to INCLUDE ONLY a specific LOG Run for STILL ELIGIBLE's",DIR("B")="NO"
S DIR("?")="To RESTRICT to a particular LOG RUN - Answer Yes."
D ^DIR K DIR
G:$D(DIRUT) END
G:Y<0 END
G:$D(DIRUT) ASK
I 'Y G PRINT
;
LOG ;Select a Log Run
W !
S DIC=1180006,DIC(0)="AEMQ",DIC("A")="Enter Log Run Date or Number: "
D ^DIC K DIC
;
Q:$D(DIRUT)
G:Y=0 ASK
S AZAMLOG=+Y
G:+AZAMLOG<0 ASK
S AZAMALL=1
;
S LOGDT=$P(^AZAMEDLG(AZAMLOG,0),U,1)
S LOGDT=$P(LOGDT,".",1)
G:LOGDT="" ASK
S AZAMBY=1
PRINT ;PRINT CLOSED DISCLOSURES BY DATE
;W !
S AZAMBY=$S(AZAMBY=0:"[AZAM MASTER ELIGIBLE]",1:"@INTERNAL(#.04)")
S FLDS="[AZAM MASTER STILL]",BY=AZAMBY,DIC="^AZAMASTR(",L=0
I AZAMALL=1 S FR=LOGDT,TO=LOGDT
K DHIT,DIOEND,DIOBEG
D EN1^DIP
END ;
K AZAMBD,AZAMED,X,DD0,B,AZAMALL,AZAMBY,AZAMLOG Q
;
INFORM ;Report Description Introduction
W !,?7,"***This Report prints Patient Records from the RPMS MASTER File***",!!
W "The MASTER File contains each Patient's Historical Processing Dates, as follows:",!
W ?10,"(First Added, Last Update, Last Still Eligible, & Last Fall Off)",!
W !,"The User may print all STILL ELIGIBLE Records or choose a specific Monthly Log.",!
W " **Log Runs Only Display Records with the same Date as the Log Run**",!!
;
;
Q
AZANSTIL ; IHS/PHXAO/TMJ - Print STILL ELIGIBLE to Master List for a specific Log [ 02/03/03 11:54 AM ]
+1 ;;1.0;MEDICAID DOWNLOAD;;JUL 10, 2000
+2 ;
START ;Do INFORM THEN ASK
+1 DO INFORM
ASK ;Ask For Specific Log
+1 SET AZAMLOG=""
+2 SET AZAMALL=0
+3 SET AZAMBY=0
+4 ;
+5 ;S AZXASTBD="C",AZXASTED="O"
+6 WRITE !
SET DIR(0)="Y0"
SET DIR("A")="Would you like to INCLUDE ONLY a specific LOG Run for STILL ELIGIBLE's"
SET DIR("B")="NO"
+7 SET DIR("?")="To RESTRICT to a particular LOG RUN - Answer Yes."
+8 DO ^DIR
KILL DIR
+9 IF $DATA(DIRUT)
GOTO END
+10 IF Y<0
GOTO END
+11 IF $DATA(DIRUT)
GOTO ASK
+12 IF 'Y
GOTO PRINT
+13 ;
LOG ;Select a Log Run
+1 WRITE !
+2 SET DIC=1180006
SET DIC(0)="AEMQ"
SET DIC("A")="Enter Log Run Date or Number: "
+3 DO ^DIC
KILL DIC
+4 ;
+5 IF $DATA(DIRUT)
QUIT
+6 IF Y=0
GOTO ASK
+7 SET AZAMLOG=+Y
+8 IF +AZAMLOG<0
GOTO ASK
+9 SET AZAMALL=1
+10 ;
+11 SET LOGDT=$PIECE(^AZAMEDLG(AZAMLOG,0),U,1)
+12 SET LOGDT=$PIECE(LOGDT,".",1)
+13 IF LOGDT=""
GOTO ASK
+14 SET AZAMBY=1
PRINT ;PRINT CLOSED DISCLOSURES BY DATE
+1 ;W !
+2 SET AZAMBY=$SELECT(AZAMBY=0:"[AZAM MASTER ELIGIBLE]",1:"@INTERNAL(#.04)")
+3 SET FLDS="[AZAM MASTER STILL]"
SET BY=AZAMBY
SET DIC="^AZAMASTR("
SET L=0
+4 IF AZAMALL=1
SET FR=LOGDT
SET TO=LOGDT
+5 KILL DHIT,DIOEND,DIOBEG
+6 DO EN1^DIP
END ;
+1 KILL AZAMBD,AZAMED,X,DD0,B,AZAMALL,AZAMBY,AZAMLOG
QUIT
+2 ;
INFORM ;Report Description Introduction
+1 WRITE !,?7,"***This Report prints Patient Records from the RPMS MASTER File***",!!
+2 WRITE "The MASTER File contains each Patient's Historical Processing Dates, as follows:",!
+3 WRITE ?10,"(First Added, Last Update, Last Still Eligible, & Last Fall Off)",!
+4 WRITE !,"The User may print all STILL ELIGIBLE Records or choose a specific Monthly Log.",!
+5 WRITE " **Log Runs Only Display Records with the same Date as the Log Run**",!!
+6 ;
+7 ;
+8 QUIT