ENSP3 ;(WCIOFO)/WDS@CHARLESTON,SAB-DISPLAY ROOM DATA (CONT'D) ;8/16/1999
;;7.0;ENGINEERING;**62**;Aug 17, 1993
;
;EXPECTS XY,DUZ(0)
;CALLED BY ENSP2
TOP ;D:'($D(ENLO)&$D(ENHI)) INIT^EN
D:'($D(IOINLOW)&$D(IOINHI)) ZIS^ENUTL
S DIC="^ENG(""SP"","
S:$D(J)=0 J=0
W ?28 D W("SINGLE ROOM DATA DISPLAY") W !
W ! D W(" 1) ") W "ROOM NO. : " D W(EN(1)) W ?39 D W(" 2) ") W "BUILDING #: " D W(EN(2))
W ! D W(" 3) ") W "WING : " D W(EN(3)) W ?39 D W(" 4) ") W "SERVICE : " D W(EN(4))
W ! D W(" 5) ") W "ROOM KEY : " D W(EN(5)) W ?39 D W(" 6) ") W "FUNCTION : " D W(EN(6))
TOP2 W ! D W(" 7) ") W "NO. OF BED: " D W(EN(10)) W ?39 D W(" 8) ") W "SPEC CHAR.: " D W(EN(11))
TOP4 W !
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))
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))
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)
LITE W !
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))
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))
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))
TOP15 W !
W ! D W("19) ") W "WINDOW QTY: " D W(EN(21)) W ?41 D W("20) ") W "WINDOW TYPE: " D W(EN(22))
W ! D W("21) ") W "DRAPE NO. : " D W(EN(23)) W ?41 D W("22) ") W "CUB. CTNS. : " D W(EN(24))
W ! D W("23) ") W "DOOR QTY : " D W(EN(25)) W ?41 D W("24) ") W "RCS 10-0141: " D W(EN(26))
W ! D W("25) ") W "UTILITIES : " D W(EN(27))
I J-1>27 F I=28:1:J-1 W ! D W(" * ") W "UTILITIES : " D W(EN(I)) D:I=29 MSG
W !
W ! D W("26) ") W "COMMENTS: "
WCO I $D(^ENG("SP",DA,3)) D
. S DIWL=15,DIWR=79,DIWF="" K ^UTILITY($J,"W")
. S ENNX=0 F S ENNX=$O(^ENG("SP",DA,3,ENNX)) Q:'ENNX I $D(^(ENNX,0))>0 S X=^(0) D ^DIWP
. I $O(^UTILITY($J,"W",DIWL,1)),IOSL'>30 D HOLD Q:$E(X)="^"
. 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)="^"
.. W IOINLOW D HOLD
.. W:$E(X)'="^" IOINHI
. W IOINLOW
SYN W !
W ! D W("27)") W " SYNONYM : " D W(EN("SYN"))
OKEY I $Y+3>IOSL D MSG
W ! D W("28)") W " OTHER KEYS: "
S I=0 F S I=$O(EN("OKEY",I)) Q:'I D
. W:I>1 ! W ?16 D W(EN("OKEY",I))
WAIT K EN,ENLTH,ENORD,I,J,K,ENNU,ENNX,X,DIWL,DIWR,DIWF
I $D(ZTQUEUED) S ZTREQ="@" W @IOF Q
I $D(A),A="...PRT..." W:IO'=IO(0) @IOF Q ;WDS/CHA 6.41
W !,"Choose " W $S($D(^XUSEC("ENROOM",DUZ)):"Item to Enter/Edit (2-28, ",1:"(") W "D(DISPLAY), P(PRINT)): EXIT// " R A:DTIME
REPEAT I A=""!(A="^") W !!,"Want to view another " S %=1 D YN^DICN G:%=1 ENT^ENSP2 K A Q
I A=""!(A="^") K A Q
I A="P" G PRT
I A="D" W @IOF G RPT
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
G WAIT
MSG I $E(IOST,1,2)="C-" W !,?10,"Press <RETURN> to continue. " R R:DTIME Q
Q
PRT ;PRINT SPACE SCREEN DATA
S ENLOW=IOINLOW,ENHI=IOINHI S IOINLOW="",IOINHI=""
S A="...PRT..." D DEV^ENLIB G:POP PRT1 G:'$D(IO("Q")) PRT0
K IO("Q") S ZTIO=ION,ZTRTN="START^ENSP2",ZTSAVE("EN*")="",ZTSAVE("DA")="",ZTSAVE("A")="",ZTDESC="Single Room Data Display" D ^%ZTLOAD K ZTSK
D ^%ZISC S IOINLOW=ENLOW,IOINHI=ENHI K ENLOW,ENHI,A G WAIT
PRT0 U IO D START^ENSP2 D:IO'=IO(0) ^%ZISC
PRT1 S IOINLOW=ENLOW,IOINHI=ENHI K ENLOW,ENHI,A
D HOME^%ZIS G WAIT
RPT G START^ENSP2
SDA S X=DIC_DA_")" L +@X:1 I $T=0 W !!,*7,"THIS ENTRY IS BEING EDITED BY ANOTHER USER. TRY LATER." G WAIT
TEST I '$D(^XUSEC("ENROOM",DUZ)) W !,"** Sorry, you seem to lack the appropriate Security Key (ENROOM) **",*7 G WAIT
ED D ^DIE L -@(DIC_DA_")") G WAIT
PDT S:X'="" X=$E(X,4,5)_"/"_$E(X,6,7)_"/"_$E(X,2,3) Q
;
HOLD S X="" I $E(IOST,1,2)="C-" D Q
. W !,"Press <RETURN> to continue, '^' to escape..."
. R X:DTIME
. S $Y=0
W @IOF
Q
;
W(ENDATA) ;Bold ENDATA
Q:$G(ENDATA)=""
N X
S X=$X W IOINHI S $X=X W ENDATA
S X=$X W IOINLOW S $X=X
Q
;ENSP3
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HENSP3 4188 printed Nov 22, 2024@17:05:49 Page 2
ENSP3 ;(WCIOFO)/WDS@CHARLESTON,SAB-DISPLAY ROOM DATA (CONT'D) ;8/16/1999
+1 ;;7.0;ENGINEERING;**62**;Aug 17, 1993
+2 ;
+3 ;EXPECTS XY,DUZ(0)
+4 ;CALLED BY ENSP2
TOP ;D:'($D(ENLO)&$D(ENHI)) INIT^EN
+1 if '($DATA(IOINLOW)&$DATA(IOINHI))
DO ZIS^ENUTL
+2 SET DIC="^ENG(""SP"","
+3 if $DATA(J)=0
SET J=0
+4 WRITE ?28
DO W("SINGLE ROOM DATA DISPLAY")
WRITE !
+5 WRITE !
DO W(" 1) ")
WRITE "ROOM NO. : "
DO W(EN(1))
WRITE ?39
DO W(" 2) ")
WRITE "BUILDING #: "
DO W(EN(2))
+6 WRITE !
DO W(" 3) ")
WRITE "WING : "
DO W(EN(3))
WRITE ?39
DO W(" 4) ")
WRITE "SERVICE : "
DO W(EN(4))
+7 WRITE !
DO W(" 5) ")
WRITE "ROOM KEY : "
DO W(EN(5))
WRITE ?39
DO W(" 6) ")
WRITE "FUNCTION : "
DO W(EN(6))
TOP2 WRITE !
DO W(" 7) ")
WRITE "NO. OF BED: "
DO W(EN(10))
WRITE ?39
DO W(" 8) ")
WRITE "SPEC CHAR.: "
DO W(EN(11))
TOP4 WRITE !
+1 WRITE !
DO W(" 9) ")
WRITE "LENGTH : "
DO W(EN(7))
WRITE ?27
DO W("10) ")
WRITE "WIDTH : "
DO W(EN(8))
WRITE ?54
DO W("11) ")
WRITE "NET SF : "
DO W(EN(9))
+2 WRITE !
DO W("12) ")
WRITE "WALL : "
DO W(EN(12))
WRITE ?27
DO W("13) ")
WRITE "FLOOR : "
DO W(EN(13))
WRITE ?54
DO W("14) ")
WRITE "CEILING:"
DO W(EN(14))
+3 WRITE !
DO W("15) ")
WRITE "REPL.DT: "
SET X=EN(15)
DO PDT
DO W(X)
WRITE ?27
DO W("16) ")
WRITE "REPL.DT: "
SET X=EN(16)
DO PDT
DO W(X)
WRITE ?54
DO W("17) ")
WRITE "REPL.DT:"
SET X=EN(17)
DO PDT
DO W(X)
LITE WRITE !
+1 WRITE !
DO W("18) ")
WRITE "LIGHTING : "
DO W(EN(18,1))
WRITE ?31,"QUANTITY : "
DO W(EN(18,2))
WRITE ?58,"WATTAGE : "
DO W(EN(18,3))
+2 IF $DATA(EN(19,1))
WRITE !,?16
DO W(EN(19,1))
WRITE ?43
DO W(EN(19,2))
WRITE ?70
DO W(EN(19,3))
+3 IF $DATA(EN(20,1))
WRITE !,?16
DO W(EN(20,1))
WRITE ?43
DO W(EN(20,2))
WRITE ?70
DO W(EN(20,3))
TOP15 WRITE !
+1 WRITE !
DO W("19) ")
WRITE "WINDOW QTY: "
DO W(EN(21))
WRITE ?41
DO W("20) ")
WRITE "WINDOW TYPE: "
DO W(EN(22))
+2 WRITE !
DO W("21) ")
WRITE "DRAPE NO. : "
DO W(EN(23))
WRITE ?41
DO W("22) ")
WRITE "CUB. CTNS. : "
DO W(EN(24))
+3 WRITE !
DO W("23) ")
WRITE "DOOR QTY : "
DO W(EN(25))
WRITE ?41
DO W("24) ")
WRITE "RCS 10-0141: "
DO W(EN(26))
+4 WRITE !
DO W("25) ")
WRITE "UTILITIES : "
DO W(EN(27))
+5 IF J-1>27
FOR I=28:1:J-1
WRITE !
DO W(" * ")
WRITE "UTILITIES : "
DO W(EN(I))
if I=29
DO MSG
+6 WRITE !
+7 WRITE !
DO W("26) ")
WRITE "COMMENTS: "
WCO IF $DATA(^ENG("SP",DA,3))
Begin DoDot:1
+1 SET DIWL=15
SET DIWR=79
SET DIWF=""
KILL ^UTILITY($JOB,"W")
+2 SET ENNX=0
FOR
SET ENNX=$ORDER(^ENG("SP",DA,3,ENNX))
if 'ENNX
QUIT
IF $DATA(^(ENNX,0))>0
SET X=^(0)
DO ^DIWP
+3 IF $ORDER(^UTILITY($JOB,"W",DIWL,1))
IF IOSL'>30
DO HOLD
if $EXTRACT(X)="^"
QUIT
+4 WRITE IOINHI
SET ENNX=0
FOR
SET ENNX=$ORDER(^UTILITY($JOB,"W",DIWL,ENNX))
if 'ENNX
QUIT
WRITE !,?DIWL,^(ENNX,0)
IF (IOSL-$Y)'>2
Begin DoDot:2
+5 WRITE IOINLOW
DO HOLD
+6 if $EXTRACT(X)'="^"
WRITE IOINHI
End DoDot:2
if $EXTRACT(X)="^"
QUIT
+7 WRITE IOINLOW
End DoDot:1
SYN WRITE !
+1 WRITE !
DO W("27)")
WRITE " SYNONYM : "
DO W(EN("SYN"))
OKEY IF $Y+3>IOSL
DO MSG
+1 WRITE !
DO W("28)")
WRITE " OTHER KEYS: "
+2 SET I=0
FOR
SET I=$ORDER(EN("OKEY",I))
if 'I
QUIT
Begin DoDot:1
+3 if I>1
WRITE !
WRITE ?16
DO W(EN("OKEY",I))
End DoDot:1
WAIT KILL EN,ENLTH,ENORD,I,J,K,ENNU,ENNX,X,DIWL,DIWR,DIWF
+1 IF $DATA(ZTQUEUED)
SET ZTREQ="@"
WRITE @IOF
QUIT
+2 ;WDS/CHA 6.41
IF $DATA(A)
IF A="...PRT..."
if IO'=IO(0)
WRITE @IOF
QUIT
+3 WRITE !,"Choose "
WRITE $SELECT($DATA(^XUSEC("ENROOM",DUZ)):"Item to Enter/Edit (2-28, ",1:"(")
WRITE "D(DISPLAY), P(PRINT)): EXIT// "
READ A:DTIME
REPEAT IF A=""!(A="^")
WRITE !!,"Want to view another "
SET %=1
DO YN^DICN
if %=1
GOTO ENT^ENSP2
KILL A
QUIT
+1 IF A=""!(A="^")
KILL A
QUIT
+2 IF A="P"
GOTO PRT
+3 IF A="D"
WRITE @IOF
GOTO RPT
+4 IF A<29
IF (A>1)
SET DR=$PIECE(".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)
GOTO SDA
+5 GOTO WAIT
MSG IF $EXTRACT(IOST,1,2)="C-"
WRITE !,?10,"Press <RETURN> to continue. "
READ R:DTIME
QUIT
+1 QUIT
PRT ;PRINT SPACE SCREEN DATA
+1 SET ENLOW=IOINLOW
SET ENHI=IOINHI
SET IOINLOW=""
SET IOINHI=""
+2 SET A="...PRT..."
DO DEV^ENLIB
if POP
GOTO PRT1
if '$DATA(IO("Q"))
GOTO PRT0
+3 KILL IO("Q")
SET ZTIO=ION
SET ZTRTN="START^ENSP2"
SET ZTSAVE("EN*")=""
SET ZTSAVE("DA")=""
SET ZTSAVE("A")=""
SET ZTDESC="Single Room Data Display"
DO ^%ZTLOAD
KILL ZTSK
+4 DO ^%ZISC
SET IOINLOW=ENLOW
SET IOINHI=ENHI
KILL ENLOW,ENHI,A
GOTO WAIT
PRT0 USE IO
DO START^ENSP2
if IO'=IO(0)
DO ^%ZISC
PRT1 SET IOINLOW=ENLOW
SET IOINHI=ENHI
KILL ENLOW,ENHI,A
+1 DO HOME^%ZIS
GOTO WAIT
RPT GOTO START^ENSP2
SDA SET X=DIC_DA_")"
LOCK +@X:1
IF $TEST=0
WRITE !!,*7,"THIS ENTRY IS BEING EDITED BY ANOTHER USER. TRY LATER."
GOTO WAIT
TEST IF '$DATA(^XUSEC("ENROOM",DUZ))
WRITE !,"** Sorry, you seem to lack the appropriate Security Key (ENROOM) **",*7
GOTO WAIT
ED DO ^DIE
LOCK -@(DIC_DA_")")
GOTO WAIT
PDT if X'=""
SET X=$EXTRACT(X,4,5)_"/"_$EXTRACT(X,6,7)_"/"_$EXTRACT(X,2,3)
QUIT
+1 ;
HOLD SET X=""
IF $EXTRACT(IOST,1,2)="C-"
Begin DoDot:1
+1 WRITE !,"Press <RETURN> to continue, '^' to escape..."
+2 READ X:DTIME
+3 SET $Y=0
End DoDot:1
QUIT
+4 WRITE @IOF
+5 QUIT
+6 ;
W(ENDATA) ;Bold ENDATA
+1 if $GET(ENDATA)=""
QUIT
+2 NEW X
+3 SET X=$X
WRITE IOINHI
SET $X=X
WRITE ENDATA
+4 SET X=$X
WRITE IOINLOW
SET $X=X
+5 QUIT
+6 ;ENSP3