ANSUDW ;IHS/OIRM/DSD/CSC - DISPLAY CARE AREA DESCRIPTIONS; [ 02/25/98 10:32 AM ]
;;3.0;NURSING PATIENT ACUITY;;APR 01, 1996
;;DISPLAY CARE AREA DESCRIPTIONS
Z Q:'$D(^ANSD(59,+$G(ANC),0))
S A=^ANSD(59,ANC,0),N=$P(A,U,2),ANW=78
W !,$P(A,U)," (",N," levels)."
F I=1:1:N S S="D"_I D SB1
Q
XSB1 ;EP;
S:'$D(ANW) ANW=0
I ANW<20!(ANW>78) S ANW=40
XALL F I=1:1:10 S ANC=I,S=$P(ANSCL,U,I) I S D
.W !
.I $D(^ANSD(59,ANC,0)) W $P(^(0),U)," ",S S S="D"_S D SB1
Q
SB1 S X=$G(^ANSD(59,ANC,S))
W !,?2,$E(S,2),?4
S M=$L(X," ")+1
F J=1:1:M D
.W $P(X," ",J)," "
.Q:$P(X," ",J+1)=""
.W:$X+$L($P(X," ",J+1))>75 !,?4
Q
ANSUDW ;IHS/OIRM/DSD/CSC - DISPLAY CARE AREA DESCRIPTIONS; [ 02/25/98 10:32 AM ]
+1 ;;3.0;NURSING PATIENT ACUITY;;APR 01, 1996
+2 ;;DISPLAY CARE AREA DESCRIPTIONS
Z IF '$DATA(^ANSD(59,+$GET(ANC),0))
QUIT
+1 SET A=^ANSD(59,ANC,0)
SET N=$PIECE(A,U,2)
SET ANW=78
+2 WRITE !,$PIECE(A,U)," (",N," levels)."
+3 FOR I=1:1:N
SET S="D"_I
DO SB1
+4 QUIT
XSB1 ;EP;
+1 IF '$DATA(ANW)
SET ANW=0
+2 IF ANW<20!(ANW>78)
SET ANW=40
XALL FOR I=1:1:10
SET ANC=I
SET S=$PIECE(ANSCL,U,I)
IF S
Begin DoDot:1
+1 WRITE !
+2 IF $DATA(^ANSD(59,ANC,0))
WRITE $PIECE(^(0),U)," ",S
SET S="D"_S
DO SB1
End DoDot:1
+3 QUIT
SB1 SET X=$GET(^ANSD(59,ANC,S))
+1 WRITE !,?2,$EXTRACT(S,2),?4
+2 SET M=$LENGTH(X," ")+1
+3 FOR J=1:1:M
Begin DoDot:1
+4 WRITE $PIECE(X," ",J)," "
+5 IF $PIECE(X," ",J+1)=""
QUIT
+6 IF $X+$LENGTH($PIECE(X," ",J+1))>75
WRITE !,?4
End DoDot:1
+7 QUIT