HLEMSU ;ALB/CJM,ALB/BRM - Utilities for building ListManager screens; 2/27/01 1:25pm
;;1.6;HEALTH LEVEL SEVEN;**109**;Oct 13,1995
;
;
SET(LINE,TEXT,COL,CNTRL) ; -- set display array
; Input:
; LINE - line# to put the TEXT
; TEXT - **optional** text to put in the array
; COL - **optional** column # to put the TEXT
; CNTRL - **optional** video display chracteristic - "H"= high, "B"-blinking
; Output:
; function returns the number of lines in the list
N X,ON,OFF
S:LINE>VALMCNT VALMCNT=LINE
S:'$L(TEXT) TEXT=" "
S X=$G(@IDX@(VALMCNT,0))
S @IDX@(VALMCNT,0)=$$SETSTR^VALM1(TEXT,X,COL,$L(TEXT))
I $G(CNTRL)["R" S ON=IORVON,OFF=IORVOFF
I $G(CNTRL)["B" S ON=$G(ON)_IOBON,OFF=$G(OFF)_IOBOFF
I $G(CNTRL)["H" S ON=$G(ON)_IOINHI,OFF=$G(IOINORM)
I $G(CNTRL)["U" S ON=$G(ON)_IOUON,OFF=$G(IOUOFF)
D:$L($G(ON)) CNTRL^VALM10(LINE,COL,$L(TEXT),ON,OFF)
Q VALMCNT
;
STATION(IEN) ;
;Description: Given an ien to the Institution file, returns as the function value the <facility name>^<station number>
;
N RETURN
Q:'$G(IEN) ""
Q:'$D(^DIC(4,IEN,0)) ""
Q $P($$NNT^XUAF4(IEN),"^",1,2)
;
CENTER(STRING) ;
Q $$CJ^XLFSTR(STRING,80)
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HHLEMSU 1178 printed Oct 16, 2024@17:58:24 Page 2
HLEMSU ;ALB/CJM,ALB/BRM - Utilities for building ListManager screens; 2/27/01 1:25pm
+1 ;;1.6;HEALTH LEVEL SEVEN;**109**;Oct 13,1995
+2 ;
+3 ;
SET(LINE,TEXT,COL,CNTRL) ; -- set display array
+1 ; Input:
+2 ; LINE - line# to put the TEXT
+3 ; TEXT - **optional** text to put in the array
+4 ; COL - **optional** column # to put the TEXT
+5 ; CNTRL - **optional** video display chracteristic - "H"= high, "B"-blinking
+6 ; Output:
+7 ; function returns the number of lines in the list
+8 NEW X,ON,OFF
+9 if LINE>VALMCNT
SET VALMCNT=LINE
+10 if '$LENGTH(TEXT)
SET TEXT=" "
+11 SET X=$GET(@IDX@(VALMCNT,0))
+12 SET @IDX@(VALMCNT,0)=$$SETSTR^VALM1(TEXT,X,COL,$LENGTH(TEXT))
+13 IF $GET(CNTRL)["R"
SET ON=IORVON
SET OFF=IORVOFF
+14 IF $GET(CNTRL)["B"
SET ON=$GET(ON)_IOBON
SET OFF=$GET(OFF)_IOBOFF
+15 IF $GET(CNTRL)["H"
SET ON=$GET(ON)_IOINHI
SET OFF=$GET(IOINORM)
+16 IF $GET(CNTRL)["U"
SET ON=$GET(ON)_IOUON
SET OFF=$GET(IOUOFF)
+17 if $LENGTH($GET(ON))
DO CNTRL^VALM10(LINE,COL,$LENGTH(TEXT),ON,OFF)
+18 QUIT VALMCNT
+19 ;
STATION(IEN) ;
+1 ;Description: Given an ien to the Institution file, returns as the function value the <facility name>^<station number>
+2 ;
+3 NEW RETURN
+4 if '$GET(IEN)
QUIT ""
+5 if '$DATA(^DIC(4,IEN,0))
QUIT ""
+6 QUIT $PIECE($$NNT^XUAF4(IEN),"^",1,2)
+7 ;
CENTER(STRING) ;
+1 QUIT $$CJ^XLFSTR(STRING,80)