BMENLOD1 ; IHS/PHXAO/TMJ - LOAD THE MEDICAID TAPE ; [ 06/11/03 3:37 PM ]
;1.0; MEDICAID UTILITIES;JUNE 21,1994
;
;This routine is a Main Driver (Currently NOT USED)
;The purpose was for User Interface and TaskMan Usage
;The program currently utilizes AZAMLOAD which simply runs AZAGMED,AZAMED,AZAMFALL
;
MAIN ; -- this is the main program loop
K S,T,T1,GET,TM
D CTRM Q:S
;D CTM Q:TM
D ^AZAMWRN
D ASKB Q:'T1 Q:$D(DIRUT)
D ASKA Q:'T Q:$D(DIRUT)
D LOOP,END
Q
;
CTRM ; -- check the terminal to make sure it's not a LAT device
S S=0
S I $V(2*$P+$V(5,-5),-3,2)/4+$V(272,-4)=$J,$ZB($V($V($P*4+$V(7,-5))+20,-3,4),10000000,1) D
. W !!,"You are logged into a LAT device."
. W !,"Please log into a UNIX device to run this!!"
. H 2
. S S=1
Q
;
CTM ; -- check to make sure this is after hours (after 4:00pm)
S TM=0
N % D NOW^%DTC S NW=$E($P(%,".",2),1,4)
;I NW<1600 D
. W !!!,"This can only be started between the hours of 4pm and 12am!!"
. S TM=1
. H 2
Q
ASKA ; -- ask if they are sure
W !,"The file is now ready to upload"
W !,"Running this process will delete the old exception file",!
N X,Y,DIR S DIR(0)="Y",DIR("A")="Are you sure wish to continue "
S DIR("B")="Y" D ^DIR S T=Y Q:$D(DIRUT) K DIR
Q
;
ASKB ; -- ask about current medicaid file
W !,"I will now get the most current file from the Area Office",!
N X,Y,DIR S DIR(0)="Y",DIR("B")="Y"
S DIR("A")="Do you wish to continue "
D ^DIR S T1=Y Q:$D(DIRUT) K DIR
I T1 D
. S GET="/usr/spool/uucppublic/MED0606401.0299"
. W !,"Getting the most current file from area now..."
. W !,"This could take up to 5 minutes, please stand by..."
. S X=$$TERMINAL^%HOSTCMD(GET)
. W !,"The file is now here!!"
Q
;
LOOP ; -- this is the actual process
W !,"Now loading the State of Arizona Medicaid File....."
W !!,"This process could take up to 8 hours, please QUE to run after 6pm."
K IO("Q")
S ZTRTN="TASK^AZAMLOAD",ZTDESC="Load Medicaid Tape",ZTIO=""
D ^%ZTLOAD K ZTSK
;D TASK^AZAMLOAD
Q
TASK ;
;S $ZT="^%ET" ;IHS/ANMC/FBD-2/3/98-DEBUG
;UNCOMMENT THE FOLLOWING ON DECEMBER 1, 1995
D ^AZAGMED,^AZAMED
;D ^AZAMED
Q
;
;D ^AZAGMED
;W !!,"Finished loading the State of Arizona Medicaid File"
;W !!,"Now uploading the State information into the RPMS database..."
;D ^AZAMED
;Q
;
END ; -- write the final message
;W !!,"Finished, uploading the medicaid information into RPMS"
;W !!,"The new information is in the RPMS database"
Q
BMENLOD1 ; IHS/PHXAO/TMJ - LOAD THE MEDICAID TAPE ; [ 06/11/03 3:37 PM ]
+1 ;1.0; MEDICAID UTILITIES;JUNE 21,1994
+2 ;
+3 ;This routine is a Main Driver (Currently NOT USED)
+4 ;The purpose was for User Interface and TaskMan Usage
+5 ;The program currently utilizes AZAMLOAD which simply runs AZAGMED,AZAMED,AZAMFALL
+6 ;
MAIN ; -- this is the main program loop
+1 KILL S,T,T1,GET,TM
+2 DO CTRM
IF S
QUIT
+3 ;D CTM Q:TM
+4 DO ^AZAMWRN
+5 DO ASKB
IF 'T1
QUIT
IF $DATA(DIRUT)
QUIT
+6 DO ASKA
IF 'T
QUIT
IF $DATA(DIRUT)
QUIT
+7 DO LOOP
DO END
+8 QUIT
+9 ;
CTRM ; -- check the terminal to make sure it's not a LAT device
+1 SET S=0
S IF $VIEW(2*$PRINCIPAL+$VIEW(5,-5),-3,2)/4+$VIEW(272,-4)=$JOB
IF $ZB($VIEW($VIEW($PRINCIPAL*4+$VIEW(7,-5))+20,-3,4),10000000,1)
Begin DoDot:1
+1 WRITE !!,"You are logged into a LAT device."
+2 WRITE !,"Please log into a UNIX device to run this!!"
+3 HANG 2
+4 SET S=1
End DoDot:1
+5 QUIT
+6 ;
CTM ; -- check to make sure this is after hours (after 4:00pm)
+1 SET TM=0
+2 NEW %
DO NOW^%DTC
SET NW=$EXTRACT($PIECE(%,".",2),1,4)
+3 ;I NW<1600 D
+4
*** ERROR ***
+5
*** ERROR ***
+6
*** ERROR ***
+7 QUIT
ASKA ; -- ask if they are sure
+1 WRITE !,"The file is now ready to upload"
+2 WRITE !,"Running this process will delete the old exception file",!
+3 NEW X,Y,DIR
SET DIR(0)="Y"
SET DIR("A")="Are you sure wish to continue "
+4 SET DIR("B")="Y"
DO ^DIR
SET T=Y
IF $DATA(DIRUT)
QUIT
KILL DIR
+5 QUIT
+6 ;
ASKB ; -- ask about current medicaid file
+1 WRITE !,"I will now get the most current file from the Area Office",!
+2 NEW X,Y,DIR
SET DIR(0)="Y"
SET DIR("B")="Y"
+3 SET DIR("A")="Do you wish to continue "
+4 DO ^DIR
SET T1=Y
IF $DATA(DIRUT)
QUIT
KILL DIR
+5 IF T1
Begin DoDot:1
+6 SET GET="/usr/spool/uucppublic/MED0606401.0299"
+7 WRITE !,"Getting the most current file from area now..."
+8 WRITE !,"This could take up to 5 minutes, please stand by..."
+9 SET X=$$TERMINAL^%HOSTCMD(GET)
+10 WRITE !,"The file is now here!!"
End DoDot:1
+11 QUIT
+12 ;
LOOP ; -- this is the actual process
+1 WRITE !,"Now loading the State of Arizona Medicaid File....."
+2 WRITE !!,"This process could take up to 8 hours, please QUE to run after 6pm."
+3 KILL IO("Q")
+4 SET ZTRTN="TASK^AZAMLOAD"
SET ZTDESC="Load Medicaid Tape"
SET ZTIO=""
+5 DO ^%ZTLOAD
KILL ZTSK
+6 ;D TASK^AZAMLOAD
+7 QUIT
TASK ;
+1 ;S $ZT="^%ET" ;IHS/ANMC/FBD-2/3/98-DEBUG
+2 ;UNCOMMENT THE FOLLOWING ON DECEMBER 1, 1995
+3 DO ^AZAGMED
DO ^AZAMED
+4 ;D ^AZAMED
+5 QUIT
+6 ;
+7 ;D ^AZAGMED
+8 ;W !!,"Finished loading the State of Arizona Medicaid File"
+9 ;W !!,"Now uploading the State information into the RPMS database..."
+10 ;D ^AZAMED
+11 ;Q
+12 ;
END ; -- write the final message
+1 ;W !!,"Finished, uploading the medicaid information into RPMS"
+2 ;W !!,"The new information is in the RPMS database"
+3 QUIT