source: FOIAVistA/trunk/r/ENGINEERING-EN/ENJINJ1.m@ 1397

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

initial load of FOIAVistA 6/30/08 version

File size: 3.0 KB
Line 
1ENJINJ1 ;(WASH ISC)/JA-Data Insertion and Look-up ;3-24-92
2 ;;7.0;ENGINEERING;;Aug 17, 1993
3 G T1:'$D(DJDN) S DJXX=X,D="" G:DJ4["P" P G:X["^" ER S (DJDIC,DIE)=DIC,DA=DJDN S DR=DJ3_"///"_$S(X["/"!(X[";"):"^S X=DJXX",1:X) X DJCP W ! D ^DIE S DIC=DJDIC D KILL I $D(Y) S DJY=Y G Q1
4 I $D(ENXP) S V(V)=$E(X,1,DJJ(V)) D N^ENJINJ3 K ENXP
5 I DJ4["D" S (DJXX,Y)=X X ^DD("DD") S X=Y
6 I DJ4["S" S DJX=$P(DJ0,U,3),DJXX=X F DJK=1:1 I X=$P($P(DJX,";",DJK),":",1) S X=$P($P(DJX,";",DJK),":",2) Q
7 I '$D(DJY) S V(V)=$E(X,1,+DJJ(V)) D O S @$P(DJJ(V),U,2) X XY W @DJHIN X XY W V(V),@DJLIN S:DJ4["D"!(DJ4["S") X=DJXX X DJCP X:$D(^ENG(6910.9,DJN,1,$O(^ENG(6910.9,DJN,1,"A",V,0)),1)) ^(1) G NXT^ENJINJ
8P I DJ4["P" D P^ENJINQ S @$P(DJJ(V),U,2) X XY G NXT^ENJINJ:$D(Y)=0,TK^ENJINJ
9 S V(V)=$S(X="@":"",1:X) D O X DJCP I $D(^ENG(6910.9,DJN,1,$O(^ENG(6910.9,DJN,1,"A",V,0)),1)) X DJCP S:DJ4["D" X=DJXX X ^(1) S @$P(DJJ(V),U,2) X XY
10 G:DJAT=.01&(V(V)="") Q^ENJINJ G T4^ENJINJ
11Q1 S:'$D(X) X=DJXX D ^ENJINQ G TK^ENJINJ
12T1 I $D(^ENG(6910.9,DJN,1,$O(^ENG(6910.9,DJN,1,"A",V,0)),1)) X DJCP X ^(1) S @$P(DJJ(V),U,2) X XY
13 G:DJAT=.01&($D(DJDN)=0) K1
14 G:DJAT=.01&(DJP) K1
15 I V(V)'="",X="" G NXT^ENJINJ
16 I V(V)'="" S @$P(DJJ(V),U,2) X XY W @DJHIN X XY W V(V),@DJLIN G NXT^ENJINJ
17 I V(V)="" S @$P(DJJ(V),U,2) X XY W @DJLIN S $P(DJDB,".",DJJ(V))="." W DJDB K DJDB G NXT^ENJINJ
18 G LH^ENJINJ
19K1 G NXT^ENJINJ:X=""&($D(DJDN)),LST^ENJINJ:X=""&('$D(DJDN)) I $D(DJST),DJST=1 K ^TMP($J,"DJST"),DJST
20 ; D DCS^ENJ
21 S:X'=" " DIC(0)="LMEQZ" S:X=" " DIC(0)="Z" X DJCP W X S:$D(DJDICS) DIC("S")=DJDICS D ^DIC K DIC("S") S DIC(0)="LMEQZ"
22 R !,"Type <CR> to continue",X:DTIME S DJSV=V,DJFF=0 D N^ENJDPL S V=DJSV
23 I Y<0 S @$P(DJJ(V),U,2),X="" X XY G TK^ENJINJ
24 S (X,V(V))=$P(Y(0),U,1),(DA,W(V))=+Y,DJDNM=V(V) S:'$D(DJST) DJST=1,D0=DA
25C S:'DJP DJDN=+Y K Y,DJLK D ^ENJC2 X XY G NXT^ENJINJ
26ER K X W *7 G Q1
27WP ;PRINT WORD PROCESSOR FIELD
28 S DJDIC=DIC_DA_","_+$P(DJ0,"^",4)_"," S DJXX=X Q:'$D(@(DJDIC_"0)")) S DJZ1=0,DJX=0,DIWL=0,DIWR=79,DIWF="" K ^TMP($J,"W")
29 F DJK=1:1 S DJZ1=$O(@(DJDIC_DJZ1_")")) Q:DJZ1'?1N.N S X=@(DJDIC_DJZ1_",0)") D ^DIWP X DJCP
30 S DJZ1=0 F DJK=1:1 S DJZ1=$O(^TMP($J,"W",DIWL,DJZ1)) Q:DJZ1="" D:$Y>21 CONT Q:DJX[U W !,^(DJZ1,0)
31 D CONT K DJZ1,DJK,^TMP($J,"W",DIWL),DIWL,DIWR,DIWF S X=DJXX Q:DJX'[U
32 Q
33CONT W !,"Type <CR> to continue, uparrow to exit: " R DJX:DTIME X DJCP W ! Q
34R X DJCL W "Type <CR> to continue" R DJX:DTIME Q
35EN ;COMPUTE AND DISPLAY
36 S @$P(DJJ(DJVV),U,2) X XY S $P(DJDB," ",+DJJ(V))=" " W DJDB X XY W @DJHIN X XY W V(DJVV),@DJLIN K DJDB Q
37 ;
38KILL K DB,DC,DG,DH,DE,DI,DK,DL,DM,DP,DW,DR Q
39EN2 X DJCP W !!,"THIS IS NOT THE FIRST SCREEN",*7 R !,"Type <CR> to continue",X:DTIME S X="^" Q
40O ;EX OUTPUT TRANSFROM
41 I $D(^DD(DJDD,DJAT,2)) S Y=X X ^(2) S (V(V),X)=Y
42 Q
43EN3 ;ERROR ON DIE
44 G:'$D(Y) E X DJCP W !,"You have a bad default variable, please check with your",!,"Data Base administrator",*7
45 S @$P(DJJ(V),U,2),$P(DJDB,".",DJJ(V))="." X XY W @DJHIN X XY W DJDB,@DJLIN K DJDB X XY S V(V)="" Q
46E S $P(DJDB," ",DJJ(V)-$L(V(V)))=" " X XY W @DJHIN X XY W V(V),DJDB,@DJLIN K DJDB Q
Note: See TracBrowser for help on using the repository browser.