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

BMEMLOD1.m

Go to the documentation of this file.
  1. BMEMLOD1 ; IHS/PHXAO/TMJ - LOAD THE MEDICAID TAPE ;
  1. ;;1.0T1;MEDICAID ELIGIBILITY DOWNLOAD;;JUN 25, 2003
  1. ;
  1. ;This routine is a Main Driver (Currently NOT USED)
  1. ;The purpose was for User Interface and TaskMan Usage
  1. ;The program currently utilizes AZAMLOAD which simply runs AZAGMED,AZAMED,AZAMFALL
  1. ;
  1. MAIN ; -- this is the main program loop
  1. K S,T,T1,GET,TM
  1. D CTRM Q:S
  1. ;D CTM Q:TM
  1. D ^AZAMWRN
  1. D ASKB Q:'T1 Q:$D(DIRUT)
  1. D ASKA Q:'T Q:$D(DIRUT)
  1. D LOOP,END
  1. Q
  1. ;
  1. CTRM ; -- check the terminal to make sure it's not a LAT device
  1. S S=0
  1. ;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
  1. . W !!,"You are logged into a LAT device."
  1. . W !,"Please log into a UNIX device to run this!!"
  1. . H 2
  1. . S S=1
  1. Q
  1. ;
  1. CTM ; -- check to make sure this is after hours (after 4:00pm)
  1. S TM=0
  1. N % D NOW^%DTC S NW=$E($P(%,".",2),1,4)
  1. ;I NW<1600 D
  1. . W !!!,"This can only be started between the hours of 4pm and 12am!!"
  1. . S TM=1
  1. . H 2
  1. Q
  1. ASKA ; -- ask if they are sure
  1. W !,"The file is now ready to upload"
  1. W !,"Running this process will delete the old exception file",!
  1. N X,Y,DIR S DIR(0)="Y",DIR("A")="Are you sure wish to continue "
  1. S DIR("B")="Y" D ^DIR S T=Y Q:$D(DIRUT) K DIR
  1. Q
  1. ;
  1. ASKB ; -- ask about current medicaid file
  1. W !,"I will now get the most current file from the Area Office",!
  1. N X,Y,DIR S DIR(0)="Y",DIR("B")="Y"
  1. S DIR("A")="Do you wish to continue "
  1. D ^DIR S T1=Y Q:$D(DIRUT) K DIR
  1. I T1 D
  1. . S GET="/usr/spool/uucppublic/MED0606401.0299"
  1. . W !,"Getting the most current file from area now..."
  1. . W !,"This could take up to 5 minutes, please stand by..."
  1. . S X=$$TERMINAL^%HOSTCMD(GET)
  1. . W !,"The file is now here!!"
  1. Q
  1. ;
  1. LOOP ; -- this is the actual process
  1. W !,"Now loading the State of Arizona Medicaid File....."
  1. W !!,"This process could take up to 8 hours, please QUE to run after 6pm."
  1. K IO("Q")
  1. S ZTRTN="TASK^AZAMLOAD",ZTDESC="Load Medicaid Tape",ZTIO=""
  1. D ^%ZTLOAD K ZTSK
  1. ;D TASK^AZAMLOAD
  1. Q
  1. TASK ;
  1. ;S $ZT="^%ET" ;IHS/ANMC/FBD-2/3/98-DEBUG
  1. ;UNCOMMENT THE FOLLOWING ON DECEMBER 1, 1995
  1. D ^AZAGMED,^AZAMED
  1. ;D ^AZAMED
  1. Q
  1. ;
  1. ;D ^AZAGMED
  1. ;W !!,"Finished loading the State of Arizona Medicaid File"
  1. ;W !!,"Now uploading the State information into the RPMS database..."
  1. ;D ^AZAMED
  1. ;Q
  1. ;
  1. END ; -- write the final message
  1. ;W !!,"Finished, uploading the medicaid information into RPMS"
  1. ;W !!,"The new information is in the RPMS database"
  1. Q