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

AFSLLDO1.m

Go to the documentation of this file.
AFSLLDO1 ;IHS/OIRM/DSD/JDM - LOAD ODF FROM DOWNLOAD FILE;   [ 10/27/2004   4:21 PM ]
 ;;3.0t1;1166 APPROVALS FOR PAYMENT;**13**;
 ;;ACR*2.1*9   MODIFIED FOR CACHE' COMPLIANCE
 ;Module to display message, find the file and continue
INFO D ^XBCLS,CRTSETUP^AFSLCRTS S AFSLFFND=0 D NOW^%DTC S AFSLDT=$P(%,".",1) K %,%H,%I,X
 D SETTBL
 S DY=2,DX=20 X XY W @AFSLRVON,"IHS 1166 APPROVALS FOR PAYMENT SYSTEM",@AFSLRVOF
 S DY=3,DX=19 X XY W @AFSLRVON,"IMPORT H.A.S. OBLIGATIONS DOWNLOAD FILE",@AFSLRVOF
 S DY=4,DX=2 X XY W @AFSLRVON,"                                                                              ",@AFSLRVOF
 S DX=12
 S DY=6 X XY W "This import process will completely replace all data"
 S DY=7 X XY W "currently stored in your local obligations document"
 S DY=8 X XY W "file with the current obligations data on file in the"
 S DY=9 X XY W "Health Accounting System at Parklawn Computer Center."
 S DY=11 X XY W "There should have been NO payment data entered into"
 S DY=12 X XY W "the IHS 1166 APPROVALS FOR PAYMENT system since the"
 S DY=13 X XY W "last DHR Data Entry splitout & transmission to PCC."
 S DY=14 X XY W "Otherwise, that data must be re-entered after this"
 S DY=15 X XY W "import process is completed.  IT IS RECOMMENDED THAT"
 S DY=16 X XY W "YOU REQUEST YOUR ADP SITE MANAGER SAVE THE GLOBAL"
 S DY=17 X XY W "^AFSLODOC BEFORE YOU CONTINUE WITH THIS PROCESS."
 S DY=18,DX=2 X XY W @AFSLRVON,"                                                                              ",@AFSLRVOF
 ;S DY=23,DX=18 X XY R "CONTINUE (Y/N)  N//",AFSLCONT:300 ;ACR*2.1*13.02 IM13574
 ;I AFSLCONT'="Y"&(AFSLCONT'="y") D VKILL Q ;  ACR*2.1*13.02 IM13574
 D PAUSE^ACRFWARN                                 ;ACR*2.1*13.02 IM13574
 I ($G(ACRY)=0)!($D(ACRQUIT))!($D(ACROUT)) D VKILL Q  ;ACR*2.1*13.02 IM13574
 S AFSLCONT=$S(ACRY=1:"Y",1:"N")                  ;ACR*2.1*13.02 IM13574
SELECT ;
 D ^AFSLHASL
 I AFSLCONT'="Y"&(AFSLCONT'="y") D VKILL Q
 F I=19:1:23 S DY=I,DX=1 U IO(0) X XY W $J("",80)
 ;S DY=20,DX=12 X XY W @AFSLRVON,"LOOKING FOR FILE:",@AFSLRVOF," "_AFSLIDIR_"/",%FN  ;ACR*2.1*13.06 IM14144
 S DY=20,DX=12 X XY W @AFSLRVON,"LOOKING FOR FILE:",@AFSLRVOF," "_AFSLIDIR,%FN  ;ACR*2.1*13.06 IM14144
 ;
 N ARMSDIR                                  ;ACR*2.1*13.06 IM14144
 S ARMSDIR=$$ARMSDIR^ACRFSYS(1)             ;ACR*2.1*13.06 IM14144
 I ARMSDIR="" G SELECT                      ;ACR*2.1*13.06 IM14144
 ;S AFSLCMD="find "_AFSLIDIR_" -name "_%FN_" -print > /usr/spool/afsdata/tmpfl" D HOSTCMD^AFSLCKZC ;ACR*2.1*13.06 IM14144
 S AFSLCMD="find "_AFSLIDIR_" -name "_%FN_" -print > "_ARMSDIR_"tmpfl" D HOSTCMD^AFSLCKZC  ;ACR*2.1*13.06 IM14144
 ;
RDFLE ;   RDFLE REWRITTEN  ;ACR*2.1*13.02 IM13574 and ACR*2.1*13.06 IM14144 
 ;S AFSERMSG=""
 ;S %FN="/usr/spool/afsdata/tmpfl",%IN=1 D OPENHFS^AFSLCK1 S IO=%DEV
 ;I AFSERMSG="M10" W !!?25,*7,"NO FILES FOUND" D VKILL Q
 ;F AFSLI=1:1 U IO R X:60 Q:X=""  D ^AFSLCKZC Q:AFSLNZC=-1  S AFSLXFND(AFSLI)=X
 ;D ^%ZISC
 ;F I=1:1 Q:'$D(AFSLXFND(I))  I AFSLXFND(I)["reports/pccspc" S AFSLFFND=I Q
 ;I AFSLFFND'=0 S DY=21,DX=23 X XY W @AFSLRVON,"FOUND:",@AFSLRVOF," ",AFSLXFND(AFSLFFND) S AFSLOK="Y"
 ;I AFSLFFND=0 S DY=20,DX=62 F I=1:1:3 X XY W *7,@AFSLRVON,"NOT FOUND",@AFSLRVOF H 1 X XY W "NOT FOUND" H 1
 ;I AFSLFFND=0 S DY=22,DX=11 X XY W @AFSLRVON,"THE CONCATENATED DOWNLOADFILE MUST HAVE PATHNAME: "_AFSLIDIR_"/pccspc.nnn",@AFSLRVOF S AFSLOK="N"
 ;
 ;   RDFLE REWRITTEN  ;ACR*2.1*13.02 IM13574 and ACR*2.1*13.06 IM14144
 S AFSERMSG=""
 S %FN=ARMSDIR_"tmpfl"                         ;ACR*2.1*13.06 IM14144
 S %IN=1 D OPENHFS^AFSLCK1                     ;ACR*2.1*13.06 IM14144
 I AFSERMSG="M10" W !!?25,*7,"NO FILES FOUND" H 3 D VKILL Q
 F AFSLI=1:1 U IO R X:60 Q:X=""  D ^AFSLCKZC Q:AFSLNZC=-1  S AFSLXFND(AFSLI)=X
 D CLOSE^%ZISH("")                             ;ACR*2.1*13.02 IM13574
 F I=1:1 Q:'$D(AFSLXFND(I))  I AFSLXFND(I)["pccspc" S AFSLFFND=I Q  ;ACR*2.1*13.06 IM14144
 I AFSLFFND'=0 S DY=21,DX=23 X XY W @AFSLRVON,"FOUND:",@AFSLRVOF," ",AFSLXFND(AFSLFFND) S AFSLOK="Y"
 I AFSLFFND=0 S DY=20,DX=62 F I=1:1:3 X XY W *7,@AFSLRVON,"NOT FOUND",@AFSLRVOF H 1 X XY W "NOT FOUND" H 1
 I AFSLFFND=0 S DY=22,DX=11 X XY W @AFSLRVON," DOWNLOAD FILE MUST HAVE PATHNAME: "_AFSLIDIR_"pccspc.nnn",@AFSLRVOF S AFSLOK="N"
 ;
CONT ;
 ;S DY=23,DX=18 X XY R "CONTINUE (Y/N)  N//",AFSLCONT:300 ;ACR*2.1*13.02 IM13574
 ;I (AFSLCONT["Y"!(AFSLCONT["y"))&(AFSLOK="N") W "  ",@AFSLRVON,"CANNOT IMPORT FILE AT THIS TIME",@AFSLRVOF H 3 G VKILL ;ACR*2.1*13.02 IM13574
 ;I (AFSLCONT["Y"!(AFSLCONT["y"))&(AFSLOK="Y") S DY=24 X XY W @AFSLRVON,"ARE YOU SURE? (Y/N) N//" R AFSLCONT:300 W @AFSLRVOF ;ACR*2.1*13.02 IM13574
 ;W !,"AFSLCONT=",AFSLCONT ;ACR*2.1*13.02 IM13574
 ;I AFSLCONT="Y"!(AFSLCONT="y") S AFSEXFN=AFSLXFND(AFSLFFND) D ^%ZISC D ^AFSLLDO2,LOGIT G VKILL ;ACR*2.1*13.02 IM13574
 I AFSLOK="N" D  G VKILL                         ;ACR*2.1*13.02 IM13574
 .W @AFSLRVON," CANNOT IMPORT FILE AT THIS TIME",@AFSLRVOF H 3
 D PAUSE^ACRFWARN                                ;ACR*2.1*13.02 IM13574
 S AFSLCONT=$S(ACRY=1:"Y",1:"N")                 ;ACR*2.1*13.02 IM13574
 I AFSLCONT="N" G VKILL                          ;ACR*2.1*13.02 IM13574
 I AFSLOK="Y" D                                  ;ACR*2.1*13.02 IM13574
 .S DY=24 X XY W @AFSLRVON
 .S DIR(0)="Y"
 .S DIR("A")="ARE YOU SURE? (Y/N)",DIR("B")="N"
 .D DIR^ACRFDIC
 .S AFSLCONT=$S(ACRY=1:"Y",1:"N")
 .W @AFSLRVOF
 I AFSLCONT="N" G VKILL                         ;ACR*2.1*13.02 IM13574
 I AFSLCONT="Y" D  G VKILL                      ;ACR*2.1*13.02 IM13574
 .S AFSEXFN=AFSLXFND(AFSLFFND)
 .D CLOSE^%ZISH("")                             ;ACR*2.1*13.02 IM13574
 .D ^AFSLLDO2,LOGIT
LOGIT ;
 I '$D(AFSLLOGX) L -AFSLXLOC Q
 S X=$P(^AFSLHASL(0),U,4)+1,$P(^AFSLHASL(0),U,3)=X,$P(^AFSLHASL(0),U,4)=X,^AFSLHASL(X,0)=AFSLLOGX S DIK="^AFSLHASL(" D IXALL^DIK
 K X
 L -AFSLXLOC
 Q
VKILL ;
 K %DEV,%FN,%FO,%IN,%ZA,AFSLFOK,AFSLSAD,AFSLXAST,AFSLXLOC,AFSLAPIN,AFSLCMD,AFSLCONT,AFSLDT,AFSLE,AFSLFFND,AFSLI,AFSLOK,AFSLXFND,AFSLXZ3,AFSLRVON,AFSLRVOF,DIC,DX,DY,I,X
 K AFSLACRL,AFSLAPN,AFSLCRDT,AFSLCOMP,AFSLDSBT,AFSLDVC,AFSLFNM,AFSLIMN,AFSLINC,AFSLLADT,AFSLNZA,AFSLNZC,AFSLOBDT,AFSLOFLN,AFSLRED,AFSLTBL,AFSLTLFG,AFSLTLNM,AFSLX,K,XY,ZX,ZY
 Q
SETTBL ;EP
 S AFSLTBL(0)="+^0"
 S AFSLTBL("A")="+^1",AFSLTBL("B")="+^2",AFSLTBL("C")="+^3",AFSLTBL("D")="+^4",AFSLTBL("E")="+^5",AFSLTBL("F")="+^6",AFSLTBL("G")="+^7",AFSLTBL("H")="+^8",AFSLTBL("I")="+^9"
 S AFSLTBL("J")="-^1",AFSLTBL("K")="-^2",AFSLTBL("L")="-^3",AFSLTBL("M")="-^4",AFSLTBL("N")="-^5",AFSLTBL("O")="-^6",AFSLTBL("P")="-^7",AFSLTBL("Q")="-^8",AFSLTBL("R")="-^9"
 Q