ANSES ;IHS/OIRM/DSD/CSC - ENTER/EDIT STAFFING DATA; [ 02/25/98 10:32 AM ]
;;3.0;NURSING PATIENT ACUITY;;APR 01, 1996
;;ENTER/EDIT STAFFING DATA
EN N C,D,I,L,N,P,T,X,Y,Z
F D EN1 Q:$D(DTOUT)!$D(DUOUT)
EXIT K ANS,DTOUT,DUOUT,ANSDA,ANSDT,ANSP,ANSS,ANSSH,ANSSTR,ANSUN,ANT,ANSX
Q
EN1 D HEAD,^ANSUD
Q:$D(DTOUT)!$D(DUOUT)
I '$D(ANSDT)!'$D(ANSSH)!'$D(ANSUN) S DUOUT="" Q
F D EN2 Q:$D(DTOUT)!$D(DUOUT)
;K DTOUT,DUOUT ;CSC 10-97
Q
EN2 S ANSDA=$O(^ANS("AU",ANSDT,ANSUN,ANSSH,0))
I ANSDA,$D(^ANS(ANSDA,0)) S ANSSTR=^(0)
I 'ANSDA S ANSDR=".02////"_ANSSH_";.03////"_ANSUN,ANSDA="" D SET
Q:'ANSDA
D:ANSDA DISP
S DIR(0)="YO",DIR("A")="Edit this data"
W !
D DIR^ANSDIC
Q:$D(DTOUT)!$D(DUOUT)
I Y'=1 S DUOUT="" Q
S DA=ANSDA,DIE="^ANS(",DR=".04RN Hours............;.05Non-RN Hours........"
W !
D DIE^ANSDIC
D ^ANSES1
Q
SET S DIC="^ANS(",DIC(0)="L",X=ANSDT,DIC("DR")=ANSDR
D FILE^ANSDIC
S ANSDA=+Y,ANSSTR=^ANS(ANSDA,0)
Q
HEAD D ^ANSMENU
S ANSX="NURSE STAFFING DATA"
W !!,?80-$L(ANSX)/2,ANSX
Q
SUBH S Y=ANSDT
X ^DD("DD")
W !!,?6,Y
S Y="",ANSS=$P(ANSPAR,U,5)
I $D(ANSSH) S X=$T(@ANSS),Y=$P($P(X,";;",ANSSH+1),U,2) W ?30,Y," Shift"
I ANSUN,$D(^ANSD(59.1,ANSUN,0)) S Z=$P(^(0),U) W ?56,"Unit ",Z
Q
DISP D HEAD,SUBH
W !
D ^ANSESD
Q
2 ;;1^DAY;;2^NIGHT
3 ;;1^DAY;;2^EVENING;;3^NIGHT
ANSES ;IHS/OIRM/DSD/CSC - ENTER/EDIT STAFFING DATA; [ 02/25/98 10:32 AM ]
+1 ;;3.0;NURSING PATIENT ACUITY;;APR 01, 1996
+2 ;;ENTER/EDIT STAFFING DATA
EN NEW C,D,I,L,N,P,T,X,Y,Z
+1 FOR
DO EN1
IF $DATA(DTOUT)!$DATA(DUOUT)
QUIT
EXIT KILL ANS,DTOUT,DUOUT,ANSDA,ANSDT,ANSP,ANSS,ANSSH,ANSSTR,ANSUN,ANT,ANSX
+1 QUIT
EN1 DO HEAD
DO ^ANSUD
+1 IF $DATA(DTOUT)!$DATA(DUOUT)
QUIT
+2 IF '$DATA(ANSDT)!'$DATA(ANSSH)!'$DATA(ANSUN)
SET DUOUT=""
QUIT
+3 FOR
DO EN2
IF $DATA(DTOUT)!$DATA(DUOUT)
QUIT
+4 ;K DTOUT,DUOUT ;CSC 10-97
+5 QUIT
EN2 SET ANSDA=$ORDER(^ANS("AU",ANSDT,ANSUN,ANSSH,0))
+1 IF ANSDA
IF $DATA(^ANS(ANSDA,0))
SET ANSSTR=^(0)
+2 IF 'ANSDA
SET ANSDR=".02////"_ANSSH_";.03////"_ANSUN
SET ANSDA=""
DO SET
+3 IF 'ANSDA
QUIT
+4 IF ANSDA
DO DISP
+5 SET DIR(0)="YO"
SET DIR("A")="Edit this data"
+6 WRITE !
+7 DO DIR^ANSDIC
+8 IF $DATA(DTOUT)!$DATA(DUOUT)
QUIT
+9 IF Y'=1
SET DUOUT=""
QUIT
+10 SET DA=ANSDA
SET DIE="^ANS("
SET DR=".04RN Hours............;.05Non-RN Hours........"
+11 WRITE !
+12 DO DIE^ANSDIC
+13 DO ^ANSES1
+14 QUIT
SET SET DIC="^ANS("
SET DIC(0)="L"
SET X=ANSDT
SET DIC("DR")=ANSDR
+1 DO FILE^ANSDIC
+2 SET ANSDA=+Y
SET ANSSTR=^ANS(ANSDA,0)
+3 QUIT
HEAD DO ^ANSMENU
+1 SET ANSX="NURSE STAFFING DATA"
+2 WRITE !!,?80-$LENGTH(ANSX)/2,ANSX
+3 QUIT
SUBH SET Y=ANSDT
+1 XECUTE ^DD("DD")
+2 WRITE !!,?6,Y
+3 SET Y=""
SET ANSS=$PIECE(ANSPAR,U,5)
+4 IF $DATA(ANSSH)
SET X=$TEXT(@ANSS)
SET Y=$PIECE($PIECE(X,";;",ANSSH+1),U,2)
WRITE ?30,Y," Shift"
+5 IF ANSUN
IF $DATA(^ANSD(59.1,ANSUN,0))
SET Z=$PIECE(^(0),U)
WRITE ?56,"Unit ",Z
+6 QUIT
DISP DO HEAD
DO SUBH
+1 WRITE !
+2 DO ^ANSESD
+3 QUIT
2 ;;1^DAY;;2^NIGHT
3 ;;1^DAY;;2^EVENING;;3^NIGHT