source: WorldVistAEHR/trunk/r/ENGINEERING-EN/ENSP3.m@ 1800

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

initial load of WorldVistAEHR

File size: 4.0 KB
RevLine 
[613]1ENSP3 ;(WCIOFO)/WDS@CHARLESTON,SAB-DISPLAY ROOM DATA (CONT'D) ;8/16/1999
2 ;;7.0;ENGINEERING;**62**;Aug 17, 1993
3 ;
4 ;EXPECTS XY,DUZ(0)
5 ;CALLED BY ENSP2
6TOP ;D:'($D(ENLO)&$D(ENHI)) INIT^EN
7 D:'($D(IOINLOW)&$D(IOINHI)) ZIS^ENUTL
8 S DIC="^ENG(""SP"","
9 S:$D(J)=0 J=0
10 W ?28 D W("SINGLE ROOM DATA DISPLAY") W !
11 W ! D W(" 1) ") W "ROOM NO. : " D W(EN(1)) W ?39 D W(" 2) ") W "BUILDING #: " D W(EN(2))
12 W ! D W(" 3) ") W "WING : " D W(EN(3)) W ?39 D W(" 4) ") W "SERVICE : " D W(EN(4))
13 W ! D W(" 5) ") W "ROOM KEY : " D W(EN(5)) W ?39 D W(" 6) ") W "FUNCTION : " D W(EN(6))
14TOP2 W ! D W(" 7) ") W "NO. OF BED: " D W(EN(10)) W ?39 D W(" 8) ") W "SPEC CHAR.: " D W(EN(11))
15TOP4 W !
16 W ! D W(" 9) ") W "LENGTH : " D W(EN(7)) W ?27 D W("10) ") W "WIDTH : " D W(EN(8)) W ?54 D W("11) ") W "NET SF : " D W(EN(9))
17 W ! D W("12) ") W "WALL : " D W(EN(12)) W ?27 D W("13) ") W "FLOOR : " D W(EN(13)) W ?54 D W("14) ") W "CEILING:" D W(EN(14))
18 W ! D W("15) ") W "REPL.DT: " S X=EN(15) D PDT D W(X) W ?27 D W("16) ") W "REPL.DT: " S X=EN(16) D PDT D W(X) W ?54 D W("17) ") W "REPL.DT:" S X=EN(17) D PDT D W(X)
19LITE W !
20 W ! D W("18) ") W "LIGHTING : " D W(EN(18,1)) W ?31,"QUANTITY : " D W(EN(18,2)) W ?58,"WATTAGE : " D W(EN(18,3))
21 I $D(EN(19,1)) W !,?16 D W(EN(19,1)) W ?43 D W(EN(19,2)) W ?70 D W(EN(19,3))
22 I $D(EN(20,1)) W !,?16 D W(EN(20,1)) W ?43 D W(EN(20,2)) W ?70 D W(EN(20,3))
23TOP15 W !
24 W ! D W("19) ") W "WINDOW QTY: " D W(EN(21)) W ?41 D W("20) ") W "WINDOW TYPE: " D W(EN(22))
25 W ! D W("21) ") W "DRAPE NO. : " D W(EN(23)) W ?41 D W("22) ") W "CUB. CTNS. : " D W(EN(24))
26 W ! D W("23) ") W "DOOR QTY : " D W(EN(25)) W ?41 D W("24) ") W "RCS 10-0141: " D W(EN(26))
27 W ! D W("25) ") W "UTILITIES : " D W(EN(27))
28 I J-1>27 F I=28:1:J-1 W ! D W(" * ") W "UTILITIES : " D W(EN(I)) D:I=29 MSG
29 W !
30 W ! D W("26) ") W "COMMENTS: "
31WCO I $D(^ENG("SP",DA,3)) D
32 . S DIWL=15,DIWR=79,DIWF="" K ^UTILITY($J,"W")
33 . S ENNX=0 F S ENNX=$O(^ENG("SP",DA,3,ENNX)) Q:'ENNX I $D(^(ENNX,0))>0 S X=^(0) D ^DIWP
34 . I $O(^UTILITY($J,"W",DIWL,1)),IOSL'>30 D HOLD Q:$E(X)="^"
35 . W IOINHI S ENNX=0 F S ENNX=$O(^UTILITY($J,"W",DIWL,ENNX)) Q:'ENNX W !,?DIWL,^(ENNX,0) I (IOSL-$Y)'>2 D Q:$E(X)="^"
36 .. W IOINLOW D HOLD
37 .. W:$E(X)'="^" IOINHI
38 . W IOINLOW
39SYN W !
40 W ! D W("27)") W " SYNONYM : " D W(EN("SYN"))
41OKEY I $Y+3>IOSL D MSG
42 W ! D W("28)") W " OTHER KEYS: "
43 S I=0 F S I=$O(EN("OKEY",I)) Q:'I D
44 . W:I>1 ! W ?16 D W(EN("OKEY",I))
45WAIT K EN,ENLTH,ENORD,I,J,K,ENNU,ENNX,X,DIWL,DIWR,DIWF
46 I $D(ZTQUEUED) S ZTREQ="@" W @IOF Q
47 I $D(A),A="...PRT..." W:IO'=IO(0) @IOF Q ;WDS/CHA 6.41
48 W !,"Choose " W $S($D(^XUSEC("ENROOM",DUZ)):"Item to Enter/Edit (2-28, ",1:"(") W "D(DISPLAY), P(PRINT)): EXIT// " R A:DTIME
49REPEAT I A=""!(A="^") W !!,"Want to view another " S %=1 D YN^DICN G:%=1 ENT^ENSP2 K A Q
50 I A=""!(A="^") K A Q
51 I A="P" G PRT
52 I A="D" W @IOF G RPT
53 I A<29,(A>1) S DR=$P(".5^1^1.5^2^2.6^5^6^3^3.5^4.5^7^8^9^7.5^8.5^9.5^10^11^11.5^12^13^13.5^16^14^17^18^2.1","^",A-1) G SDA
54 G WAIT
55MSG I $E(IOST,1,2)="C-" W !,?10,"Press <RETURN> to continue. " R R:DTIME Q
56 Q
57PRT ;PRINT SPACE SCREEN DATA
58 S ENLOW=IOINLOW,ENHI=IOINHI S IOINLOW="",IOINHI=""
59 S A="...PRT..." D DEV^ENLIB G:POP PRT1 G:'$D(IO("Q")) PRT0
60 K IO("Q") S ZTIO=ION,ZTRTN="START^ENSP2",ZTSAVE("EN*")="",ZTSAVE("DA")="",ZTSAVE("A")="",ZTDESC="Single Room Data Display" D ^%ZTLOAD K ZTSK
61 D ^%ZISC S IOINLOW=ENLOW,IOINHI=ENHI K ENLOW,ENHI,A G WAIT
62PRT0 U IO D START^ENSP2 D:IO'=IO(0) ^%ZISC
63PRT1 S IOINLOW=ENLOW,IOINHI=ENHI K ENLOW,ENHI,A
64 D HOME^%ZIS G WAIT
65RPT G START^ENSP2
66SDA S X=DIC_DA_")" L +@X:1 I $T=0 W !!,*7,"THIS ENTRY IS BEING EDITED BY ANOTHER USER. TRY LATER." G WAIT
67TEST I '$D(^XUSEC("ENROOM",DUZ)) W !,"** Sorry, you seem to lack the appropriate Security Key (ENROOM) **",*7 G WAIT
68ED D ^DIE L -@(DIC_DA_")") G WAIT
69PDT S:X'="" X=$E(X,4,5)_"/"_$E(X,6,7)_"/"_$E(X,2,3) Q
70 ;
71HOLD S X="" I $E(IOST,1,2)="C-" D Q
72 . W !,"Press <RETURN> to continue, '^' to escape..."
73 . R X:DTIME
74 . S $Y=0
75 W @IOF
76 Q
77 ;
78W(ENDATA) ;Bold ENDATA
79 Q:$G(ENDATA)=""
80 N X
81 S X=$X W IOINHI S $X=X W ENDATA
82 S X=$X W IOINLOW S $X=X
83 Q
84 ;ENSP3
Note: See TracBrowser for help on using the repository browser.