source: FOIAVistA/tag/r/ENGINEERING-EN/ENJC2.m@ 1755

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

initial load of FOIAVistA 6/30/08 version

File size: 2.8 KB
Line 
1ENJC2 ;(WASH ISC)/JA-Fill Local Array (Screen Handler) ;5-11-92
2 ;;7.0;ENGINEERING;;Aug 17, 1993
3 S DJSW2=1
4S1 S DJ14=-1,DJ9=V,DJ8=DJN
5 S:'$D(DJST) DJST=1 I DJST=1 S ^TMP($J,"DJST",1,"DA")=W(DJ9),^TMP($J,"DJST",1,"SC")=DJN,^TMP($J,"DJST",1,"LOC")="",^TMP($J,"DJST",1,"DIC")=DIC,^TMP($J,"DJST",1,"DD")=DJDD,^TMP($J,"DJST",1,"GN")=""
6 F V=DJF-.01:0 S V=$O(DJJ(V)) Q:V'>0!(V>DJL) S DJ16=$P(DJJ(V),U,4) D:DJ16["M" M D:DJ16'["M" S
7 S V=DJ9,@$P(DJJ(V),U,2) K DJ3,DJ14,DJ5,DJ16,DJ7,DJ8,DJ9,Y,DJZ,DJS
8 Q
9S S DJ7=$P(DJJ(V),U,3) Q:DJ7=""!$P(DJJ(V),U,4)!(DJ7<0) I DJ7=.001 S V(V)=+Y G SQ
10 S:DJST=1 D0=DA D:DJST>1 COMP
11 I $P(DJJ(V),U,4)["C" S DJ16=$P(DJJ(V),U,4),@$P(DJJ(V),U,2) G SQ3
12 S DJ16=$P(^DD(DJDD,DJ7,0),U,4),DJ5=$P(DJ16,";",2),DJ16=$P(DJ16,";",1) G:DJ5=" " SQ
13 S:DJ14'=DJ16 DJ14=DJ16,DJ3=$S($D(@(DIC_"+W(DJ9),DJ16)")):^(DJ16),1:"") S @("V(V)=$"_$S(DJ5:"P",1:"E")_"(DJ3,"_$S(DJ5:"U,DJ5)",1:+$E(DJ5,2,9)_","_$P(DJ5,",",2)_")"))
14SQ Q:V(V)=""!'$D(DJJ(V)) S DJ16=$P(DJJ(V),U,4),@$P(DJJ(V),U,2)
15SQ1 I DJ16["D" S Y=V(V) D DT S V(V)=Y K DJ5 G E
16 I DJ16["P",$D(@("^"_$P(^DD(DJDD,DJ7,0),U,3)_"V(V),0)")) S V(V)=$P(^(0),U,1) D P G E
17SQ3 I DJ16["C" X $P(^DD(DJDD,DJ7,0),U,5,99) S V(V)=X G:DJ16["D" SQ1
18 I DJ16["S" S DJS=$P(^DD(DJDD,DJ7,0),U,3) F DJK=1:1 S DJZ=$P(DJS,";",DJK) Q:DJZ="" I $P(DJZ,":",1)=V(V) S V(V)=$P(DJZ,":",2)
19 ;I DJ16["W" S N=0 S A=DIC_DA_","_+DJ7_",0)" S N=$O(@A),V(V)=^(N,0)
20E X XY I V(V)'="" D O S V(V)=$E(V(V),1,+DJJ(V)) I DJSW2 W @DJHIN X XY W V(V),@DJLIN S $P(DJDB," ",DJJ(V)-$L(V(V)))=" " W:$D(DJDB) DJDB K DJDB
21 I DJ7=.01&(DJ16'["M") S ^TMP($J,"DJST",DJST,"TITLE")=$P(^DD(DJDD,.01,0),"^",1)_":"_V(V),^TMP($J,"DJST",DJST-1,"KEY")=V(V)
22 Q
23P ;
24 S DJZ=+$P($P(^DD(DJDD,DJ7,0),"^",2),"P",2) Q:$P(^DD(DJZ,.01,0),"^",2)'["P"
25P1 I $D(@("^"_$P(^DD(DJZ,.01,0),U,3)_"V(V),0)")) S V(V)=$P(^(0),U,1)
26 S DJZ=+$P($P(^DD(DJZ,.01,0),"^",2),"P",2) Q:$P(^DD(DJZ,.01,0),"^",2)'["P" G P1
27 ;
28M S @$P(DJJ(V),U,2),DJM1=$P($P(^DD(DJDD,$P(DJJ(V),U,3),0),U,4),";",1),DJQ1="""",DJM1=$S(DJM1'=+DJM1:DJQ1_DJM1_DJQ1,1:DJM1),DJM2=$S($D(@(DIC_+W(DJ9)_","_DJM1_")")):@(DIC_+W(DJ9)_","_DJM1_",0)"),1:"")
29 S DJDD1=+$P(DJJ(V),U,4) I DJM2="" S V(V)="",DJM3="" G QQ
30 S DJM3=$P(DJM2,U,3) S:DJM3>0 V(V)=$P(@(DIC_+W(DJ9)_","_DJM1_","_DJM3_",0)"),U,1) S:DJM3<1!(DJM3="") V(V)="" S DJ16=$P(^DD(DJDD1,.01,0),U,2)
31 S DJDDS=DJDD,DJDD=DJDD1
32 S DJ7=.01 D:DJM3>0 SQ1 S DJDD=DJDDS
33QQ S V(V,"DA")=DJM3,V(V,"GN")=$P(DJM1,";",1),V(V,"DD")=$P($P(DJJ(V),U,4),"M",1),Y=-1 K DJDD1,DJ7,DJM1,DJM2,DJM3,DJQ1,DJDDS Q
34COMP F DJK=0:1:DJST-2 S @("D"_DJK)=^TMP($J,"DJST",DJK+1,"DA")
35 S DJK=DJST-1,@("D"_DJK)=DA Q
36DT S:Y Y=$S($E(Y,4,5):$P("JAN^FEB^MAR^APR^MAY^JUN^JUL^AUG^SEP^OCT^NOV^DEC","^",+$E(Y,4,5))_" ",1:"")_$S($E(Y,6,7):+$E(Y,6,7)_",",1:"")_($E(Y,1,3)+1700)_$P("@"_$E(Y_0,9,10)_":"_$E(Y_"000",11,12),"^",Y[".")
37 Q
38O ;EX OUTPUT TRANSFORM
39 I $D(^DD(DJDD,DJ7,2)) S Y=V(V) X ^(2) S V(V)=Y Q
40 Q
41EN ;DO NOT PRINT V(V)
42 S DJSW2=0 G S1
Note: See TracBrowser for help on using the repository browser.