source: FOIAVistA/trunk/r/ENGINEERING-EN/ENSP2.m@ 1582

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

initial load of FOIAVistA 6/30/08 version

File size: 2.3 KB
Line 
1ENSP2 ;(WCIOFO)/WDS@CHARLESTON,SAB-DISPLAY ROOM DATA ;7/8/1999
2 ;;7.0;ENGINEERING;**62**;Aug 17, 1993
3 ;
4HDR W @IOF,!,?15,"ENGINEERING SPACE INVENTORY REPORT MENU",!!
5 Q
6ENT ;DISPLAY ROOM/SPACE DATA
7 S DIC="^ENG(""SP"",",DIE=DIC,DIC(0)="AEQM",J=0
8 D ^DIC S DA=+Y G:DA<1 EXIT W @IOF
9START F X=1:1:28 S EN(X)=""
10 S (EN(18,1),EN(18,2),EN(18,3))=""
11 S EN("SYN")=""
12 K EN("OKEY")
13 ;
14FDAT I $D(^ENG("SP",DA,0))>0 S EN(1)=$P(^(0),"^",1),EN(2)=$P(^(0),"^",2),EN(3)=$P(^(0),"^",3),EN(4)=$P(^(0),"^",4),EN(5)=$P(^(0),"^",5),EN(6)=$P(^(0),"^",6),EN(7)=$P(^(0),"^",7),EN(8)=$P(^(0),"^",8),EN(9)=$P(^(0),"^",9) D SSER D:EN(5)'="" SKEY
15FDAT1 I $D(^ENG("SP",DA,0))>0 S EN(15)=$P(^(0),"^",11),EN(16)=$P(^(0),"^",12),EN(17)=$P(^(0),"^",13),EN(22)=$P(^(0),"^",16),EN(25)=$P(^(0),"^",18)
16FDAT2 I $D(^ENG("SP",DA,2))>0 S EN(10)=$P(^(2),"^",2),EN(11)=$P(^(2),"^",3),EN(12)=$P(^(2),"^",4),EN(13)=$P(^(2),"^",5),EN(14)=$P(^(2),"^",6),EN(21)=$P(^(2),"^",8),EN(23)=$P(^(2),"^",9),EN(24)=$P(^(2),"^",10)
17FDAT21 I $D(^ENG("SP",DA,2))>0 S EN(26)=$P(^(2),"^",13)
18MLITE I $D(^ENG("SP",DA,6,0)) S ENXT=0 D MLITE1
19 ;
20MUTL I $D(^ENG("SP",DA,1,0)) S J=27,ENTNX=0 D MUTIL
21 ;
22SYN I $D(^ENG("SP",DA,8,0)) D
23 . F I=0:0 S I=$O(^ENG("SP",DA,8,I)) Q:I'>0 D
24 .. S:EN("SYN")]"" EN("SYN")=EN("SYN")_"; "
25 .. S EN("SYN")=EN("SYN")_$P(^ENG("SP",DA,8,I,0),U)
26OKEY ;get other keys (I = ien of other key, ENJ = last output line # used)
27 ; loop thru other keys multiple
28 S (I,ENJ)=0 F S I=$O(^ENG("SP",DA,5,I)) Q:'I D
29 . N ENX
30 . S ENX=$P($G(^ENG("SP",DA,5,I,0)),U) Q:ENX=""
31 . ; if no values stored yet then initialize first line
32 . I ENJ=0 S ENJ=1,EN("OKEY",ENJ)=""
33 . ; if value won't fit on this line then add another line
34 . I $L(EN("OKEY",ENJ))+$L(ENX)>60 D
35 . . S EN("OKEY",ENJ)=EN("OKEY",ENJ)_";"
36 . . S ENJ=ENJ+1,EN("OKEY",ENJ)=""
37 . ; add value to line
38 . S EN("OKEY",ENJ)=EN("OKEY",ENJ)_$S(EN("OKEY",ENJ)]"":"; ",1:"")_ENX
39 ;
40 G ^ENSP3
41SSER I EN(4)'="" S:$D(^DIC(49,EN(4),0))>0 EN(4)=$P(^DIC(49,EN(4),0),"^",1)
42 Q
43SKEY I $D(^ENG("LK",EN(5),0))>0 S EN(5)=$P(^ENG("LK",EN(5),0),"^",1)
44 Q
45 ;
46MUTIL S ENTNX=$O(^ENG("SP",DA,1,ENTNX)) Q:ENTNX="" S ENTEMP=$P(^ENG("SP",DA,1,ENTNX,0),"^",1),EN(J)=^ENG(6928.2,ENTEMP,0),J=J+1 G MUTIL
47MLITE1 F J=18:1:20 S ENXT=$O(^ENG("SP",DA,6,ENXT)) Q:ENXT="" F ENML=1:1:3 S EN(J,ENML)=$P(^ENG("SP",DA,6,ENXT,0),"^",ENML)
48 Q
49EXIT K DIC,DIE,ENML,ENTEMP,ENXT,ENTNX,I,J,K,O,S,X,Y Q
50 ;ENSP2
Note: See TracBrowser for help on using the repository browser.