IBDF2E ;ALB/CJM - ENCOUNTER FORM (prints a lines and text areas to the form);MAR 18,1993
;;3.0;AUTOMATED INFO COLLECTION SYS;;APR 24, 1997
PRNTLINE(LINE) ;prints a line ptd to by LINE
N NODE,XPOS,YPOS,LEN,TYPE,NUM,SPACING,CNT
S NODE=$G(^IBE(357.7,LINE,0)) Q:NODE=""
Q:$P(NODE,"^",6)'=IBBLK
S XPOS=+$P(NODE,"^",2),YPOS=+$P(NODE,"^",3),TYPE=$P(NODE,"^",4),LEN=+$P(NODE,"^",5)
I TYPE="H" D
.S NUM=$P(NODE,"^",7),SPACING=$P(NODE,"^",8)
.S:'NUM NUM=1 S SPACING=$S(SPACING="d":2,SPACING="t":3,1:1)
.F CNT=1:1:NUM D DRWSTR^IBDFU((YPOS+((CNT-1)*SPACING)),XPOS,"","U",LEN)
I TYPE="V" D DRWVLINE^IBDFU(YPOS,XPOS,LEN,"|")
Q
PRNTTEXT(TEXT) ;prints a line ptd to by LINE
N NODE,XPOS,YPOS,W,HT,LINE
S NODE=$G(^IBE(357.8,TEXT,0)) Q:NODE=""
Q:$P(NODE,"^",2)'=IBBLK
S XPOS=+$P(NODE,"^",3),YPOS=+$P(NODE,"^",4),W=+$P(NODE,"^",5),HT=+$P(NODE,"^",6)
S LINE=0 F S LINE=$O(^IBE(357.8,TEXT,1,LINE)) Q:'LINE!(LINE>HT) S NODE=$G(^(LINE,0)) D DRWSTR^IBDFU(YPOS+LINE-1,XPOS,$E(NODE,1,W))
Q
IBDF2E ;ALB/CJM - ENCOUNTER FORM (prints a lines and text areas to the form);MAR 18,1993
+1 ;;3.0;AUTOMATED INFO COLLECTION SYS;;APR 24, 1997
PRNTLINE(LINE) ;prints a line ptd to by LINE
+1 NEW NODE,XPOS,YPOS,LEN,TYPE,NUM,SPACING,CNT
+2 SET NODE=$GET(^IBE(357.7,LINE,0))
IF NODE=""
QUIT
+3 IF $PIECE(NODE,"^",6)'=IBBLK
QUIT
+4 SET XPOS=+$PIECE(NODE,"^",2)
SET YPOS=+$PIECE(NODE,"^",3)
SET TYPE=$PIECE(NODE,"^",4)
SET LEN=+$PIECE(NODE,"^",5)
+5 IF TYPE="H"
Begin DoDot:1
+6 SET NUM=$PIECE(NODE,"^",7)
SET SPACING=$PIECE(NODE,"^",8)
+7 IF 'NUM
SET NUM=1
SET SPACING=$SELECT(SPACING="d":2,SPACING="t":3,1:1)
+8 FOR CNT=1:1:NUM
DO DRWSTR^IBDFU((YPOS+((CNT-1)*SPACING)),XPOS,"","U",LEN)
End DoDot:1
+9 IF TYPE="V"
DO DRWVLINE^IBDFU(YPOS,XPOS,LEN,"|")
+10 QUIT
PRNTTEXT(TEXT) ;prints a line ptd to by LINE
+1 NEW NODE,XPOS,YPOS,W,HT,LINE
+2 SET NODE=$GET(^IBE(357.8,TEXT,0))
IF NODE=""
QUIT
+3 IF $PIECE(NODE,"^",2)'=IBBLK
QUIT
+4 SET XPOS=+$PIECE(NODE,"^",3)
SET YPOS=+$PIECE(NODE,"^",4)
SET W=+$PIECE(NODE,"^",5)
SET HT=+$PIECE(NODE,"^",6)
+5 SET LINE=0
FOR
SET LINE=$ORDER(^IBE(357.8,TEXT,1,LINE))
IF 'LINE!(LINE>HT)
QUIT
SET NODE=$GET(^(LINE,0))
DO DRWSTR^IBDFU(YPOS+LINE-1,XPOS,$EXTRACT(NODE,1,W))
+6 QUIT