ANSESD ;IHS/OIRM/DSD/CSC - DISPLAY STAFFING DATA; [ 02/25/98 10:32 AM ]
;;3.0;NURSING PATIENT ACUITY;;APR 01, 1996
;;DISPLAY STAFFING DATA
EN ;EP;
Q:'$G(ANSDA)
Q:'$D(^ANS(ANSDA,0))
S X=^ANS(ANSDA,0)
S (T,C)=0
W !!,"RN Hours.......: ",$P(X,U,4),!,"Non-RN Hours...: ",$P(X,U,5)
W !,"Non-Direct Care:"
S (N,ANT)=0
F I=4,5 S ANT=ANT+$P(X,U,I)
;S I=0
F S N=$O(^ANS(ANSDA,"N",N)) Q:'N D
.Q:'$D(^ANS(ANSDA,"N",N,0))
.S X=^ANS(ANSDA,"N",N,0),Y=$P(X,U,2),X=+X
.Q:'X
.Q:'$D(^ANSD(59.2,X,0))
.S X=$P(^ANSD(59.2,X,0),U),T=T+Y,I=I+1
.W:I>1 !
.W ?17,$E(X,1,20)
.W $J(Y,5)
A9 I I=0 W !," None Recorded"
E W !!,"Total Non-Direct Hours: ",$J(T,5)
W !!,"Total Staff Hours.....: ",$J(ANT,5)
I T D
.W !,"Less Non-Direct.......: ",$J(T,5),!,?24,"------"
.W !,"Net Hours.............: ",$J(ANT-T,5)
Q
ANSESD ;IHS/OIRM/DSD/CSC - DISPLAY STAFFING DATA; [ 02/25/98 10:32 AM ]
+1 ;;3.0;NURSING PATIENT ACUITY;;APR 01, 1996
+2 ;;DISPLAY STAFFING DATA
EN ;EP;
+1 IF '$GET(ANSDA)
QUIT
+2 IF '$DATA(^ANS(ANSDA,0))
QUIT
+3 SET X=^ANS(ANSDA,0)
+4 SET (T,C)=0
+5 WRITE !!,"RN Hours.......: ",$PIECE(X,U,4),!,"Non-RN Hours...: ",$PIECE(X,U,5)
+6 WRITE !,"Non-Direct Care:"
+7 SET (N,ANT)=0
+8 FOR I=4,5
SET ANT=ANT+$PIECE(X,U,I)
+9 ;S I=0
+10 FOR
SET N=$ORDER(^ANS(ANSDA,"N",N))
IF 'N
QUIT
Begin DoDot:1
+11 IF '$DATA(^ANS(ANSDA,"N",N,0))
QUIT
+12 SET X=^ANS(ANSDA,"N",N,0)
SET Y=$PIECE(X,U,2)
SET X=+X
+13 IF 'X
QUIT
+14 IF '$DATA(^ANSD(59.2,X,0))
QUIT
+15 SET X=$PIECE(^ANSD(59.2,X,0),U)
SET T=T+Y
SET I=I+1
+16 IF I>1
WRITE !
+17 WRITE ?17,$EXTRACT(X,1,20)
+18 WRITE $JUSTIFY(Y,5)
End DoDot:1
A9 IF I=0
WRITE !," None Recorded"
+1 IF '$TEST
WRITE !!,"Total Non-Direct Hours: ",$JUSTIFY(T,5)
+2 WRITE !!,"Total Staff Hours.....: ",$JUSTIFY(ANT,5)
+3 IF T
Begin DoDot:1
+4 WRITE !,"Less Non-Direct.......: ",$JUSTIFY(T,5),!,?24,"------"
+5 WRITE !,"Net Hours.............: ",$JUSTIFY(ANT-T,5)
End DoDot:1
+6 QUIT