source: FOIAVistA/trunk/r/SCHEDULING-SD-SC/SDWLFUL.m@ 794

Last change on this file since 794 was 628, checked in by George Lilly, 15 years ago

initial load of FOIAVistA 6/30/08 version

File size: 1.8 KB
Line 
1SDWLFUL ;;IOFO BAY PINES/TEH - REPAIR/RE-CAL ENROLLE STATUS;06/12/2002 ; 20 Aug 20022:10 PM
2 ;;5.3;scheduling;**525**;AUG 13 1993;Build 47
3 ;
4 ;
5 ;
6 ;
7 ;
8 ;
9 ;=========================================================================================================
10 ;
11 ;Foreign file upload utility for KLF data.
12 ;
13 ;
14 ;
15 Q
16EN ;Initial variables
17 ;
18 I '$D(^XTMP("SDWLFULSTAT",$J,"1B")) W !,"You must run a BACK-UP before running this option." Q
19 I $D(^XTMP("SDWLFULSTAT",$J,2)) W !,"You have already run this option." D I 'Y Q
20 .S DIR(0)="Y",DIR("A")="Are you absolutely sure you want to continue",DIR("B")="N" D ^DIR D
21 ..I X["^" S Y=0 Q
22 ..I X["N"!(X["n") S Y=0 Q
23 S STIME=$H,SDWLCNT=0
24 S SDHAN="VSSCFILE",SDFILNM="FLAK9.CSV;1",SDPATH="USER$:[TEMP]",SDMOD="R"
25 S DIR("A")="PATH: ",DIR("B")=SDPATH,DIR(0)="F" D ^DIR
26 S SDPATH=Y
27 K ^XTMP("SDWLFUL")
28 D OPEN^%ZISH(SDHAN,SDPATH,SDFILNM,SDMOD)
29 Q:POP S L=0
30 F I=1:1 U IO R X:DTIME Q:X="" D EN0,DOT
31END S ETIME=$H
32 D CLOSE^%ZISH(SDHAN) S:$D(ZTQUEUED) ZTREQ="@" W !,"Transfer Complete"
33 K DIR,I,POP,SDFILNM,SDHAN,SDMOD,SDPATH,SDWLCNT,SDWLCTD,SDWLICN,SDWLINS
34 K SDWLLD,SDWLLDT,SDWLOD,SDWLODT,SDWLSSN,STIME,X,Y,ZTQUEUED,ZTREQ,ETIME,L
35 S ^XTMP("SDWLFULSTAT",$J,2)=""
36 Q
37EN0 ;
38 S SDWLICN=$P(X,",",1),SDWLODT=$P(X,",",2),SDWLLDT=$P(X,",",3),SDWLSSN=$P(X,",",4),SDWLINS=$P(X,",",5) D
39 .I '$D(^DPT("SSN",SDWLSSN)) Q
40 .S X=SDWLODT D ^%DT S SDWLOD=Y,X=SDWLLDT D ^%DT S SDWLLD=Y
41 .I '$D(^XTMP("SDWLFUL",$J,SDWLSSN,SDWLOD)) S ^XTMP("SDWLFUL",$J,SDWLSSN,SDWLOD)=SDWLLD_"^"_SDWLINS Q
42 .I $D(^XTMP("SDWLFUL",$J,SDWLSSN,SDWLOD)) I SDWLLD'>SDWLOD D
43 ..S SDWLCTD=$P($G(^XTMP("SDWLFUL",$J,SDWLSSN,SDWLOD)),U) D
44 ...I SDWLLD>SDWLCTD&(SDWLLD'>SDWLOD) S ^XTMP("SDWLFUL",$J,SDWLSSN,SDWLOD)=SDWLLD_"^"_SDWLINS
45 Q
46DOT S SDWLCNT=SDWLCNT+1 I SDWLCNT#10000=0 U $P W SDWLCNT,! U IO
47 Q
Note: See TracBrowser for help on using the repository browser.