ANSES1 ;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 F D EN1 Q:$D(DTOUT)!$D(DUOUT)
K DTOUT,DUOUT
Q
EN1 S DIC="^ANSD(59.2,",DIC(0)="AQZEM",DIC("A")="Non-Direct Area.....: "
W !
D DIC^ANSDIC
I Y<1 S DUOUT="" Q
S ANSSTR=+Y
I $D(^ANS(ANSDA,"N",+ANSSTR,0)) S ANSSTR=+^(0) D SET Q
D SB1
Q:$D(DTOUT)!$D(DUOUT)
D SET
Q
SET S:'$D(^ANS(ANSDA,"N",0)) ^(0)="^9009053.1P^^"
I '$P(ANSSTR,U,2) D DEL Q
D SET2:$D(^ANS(ANSDA,"N",+ANSSTR)),SET1:'$D(^ANS(ANSDA,"N",+ANSSTR))
Q
SET1 S DIC="^ANS("_ANSDA_",""N"",",DIC(0)="L",DA(1)=ANSDA,(X,DINUM)=+ANSSTR
D FILE^ANSDIC
S DA=+Y
D SET2
Q
SET2 S DIE="^ANS("_ANSDA_",""N"",",DA=+ANSSTR,DA(1)=ANSDA,DR=".02////"_$P(ANSSTR,U,2)
D DIE^ANSDIC
Q
DEL S DA(1)=ANSDA,DA=+ANSSTR,DIK="^ANS("_ANSDA_",""N"","
D DIK^ANSDIC
Q
SB1 S DIR(0)="FO^^D SBCC^ANSES1",DIR("A")="Non-Direct Care Hrs." ;CSC 12-97
S:'$G(T) T=0 ;CSC 12-97
S DIR("B")=T ;CSC 12-97
S DIR("?",1)="Enter A Number From 0 to 999, Fractional Numbers (eg. 12.25)",DIR("?")="May Also Be Entered In Quarter Hours."
W !
D DIR^ANSDIC
Q:$D(DTOUT)!$D(DUOUT)
I 'Y S DUOUT=""
E S $P(ANSSTR,U,2)=+Y
Q
SBD W !!,"Currently Listed Non-Direct Care Areas",!
S (T,C,N)=0
F S N=$O(^ANS(ANSDA,"N",N)) Q:'N D
.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
.W:C ?40
.W " ",$E(X,1,20),?20
.W:C ?60
.W $J(Y,5)
.S C='C
.I $X>41 W !
Q
SBCC ;;CSC 12-97
Q:X?.N
Q:X?1".".2N
Q:X?2N1"."2N
K X
Q
ANSES1 ;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 FOR
DO EN1
IF $DATA(DTOUT)!$DATA(DUOUT)
QUIT
+1 KILL DTOUT,DUOUT
+2 QUIT
EN1 SET DIC="^ANSD(59.2,"
SET DIC(0)="AQZEM"
SET DIC("A")="Non-Direct Area.....: "
+1 WRITE !
+2 DO DIC^ANSDIC
+3 IF Y<1
SET DUOUT=""
QUIT
+4 SET ANSSTR=+Y
+5 IF $DATA(^ANS(ANSDA,"N",+ANSSTR,0))
SET ANSSTR=+^(0)
DO SET
QUIT
+6 DO SB1
+7 IF $DATA(DTOUT)!$DATA(DUOUT)
QUIT
+8 DO SET
+9 QUIT
SET IF '$DATA(^ANS(ANSDA,"N",0))
SET ^(0)="^9009053.1P^^"
+1 IF '$PIECE(ANSSTR,U,2)
DO DEL
QUIT
+2 IF $DATA(^ANS(ANSDA,"N",+ANSSTR))
DO SET2
IF '$DATA(^ANS(ANSDA,"N",+ANSSTR))
DO SET1
+3 QUIT
SET1 SET DIC="^ANS("_ANSDA_",""N"","
SET DIC(0)="L"
SET DA(1)=ANSDA
SET (X,DINUM)=+ANSSTR
+1 DO FILE^ANSDIC
+2 SET DA=+Y
+3 DO SET2
+4 QUIT
SET2 SET DIE="^ANS("_ANSDA_",""N"","
SET DA=+ANSSTR
SET DA(1)=ANSDA
SET DR=".02////"_$PIECE(ANSSTR,U,2)
+1 DO DIE^ANSDIC
+2 QUIT
DEL SET DA(1)=ANSDA
SET DA=+ANSSTR
SET DIK="^ANS("_ANSDA_",""N"","
+1 DO DIK^ANSDIC
+2 QUIT
SB1 ;CSC 12-97
SET DIR(0)="FO^^D SBCC^ANSES1"
SET DIR("A")="Non-Direct Care Hrs."
+1 ;CSC 12-97
IF '$GET(T)
SET T=0
+2 ;CSC 12-97
SET DIR("B")=T
+3 SET DIR("?",1)="Enter A Number From 0 to 999, Fractional Numbers (eg. 12.25)"
SET DIR("?")="May Also Be Entered In Quarter Hours."
+4 WRITE !
+5 DO DIR^ANSDIC
+6 IF $DATA(DTOUT)!$DATA(DUOUT)
QUIT
+7 IF 'Y
SET DUOUT=""
+8 IF '$TEST
SET $PIECE(ANSSTR,U,2)=+Y
+9 QUIT
SBD WRITE !!,"Currently Listed Non-Direct Care Areas",!
+1 SET (T,C,N)=0
+2 FOR
SET N=$ORDER(^ANS(ANSDA,"N",N))
IF 'N
QUIT
Begin DoDot:1
+3 SET X=^ANS(ANSDA,"N",N,0)
SET Y=$PIECE(X,U,2)
SET X=+X
+4 IF 'X
QUIT
+5 IF '$DATA(^ANSD(59.2,X,0))
QUIT
+6 SET X=$PIECE(^ANSD(59.2,X,0),U)
SET T=T+Y
+7 IF C
WRITE ?40
+8 WRITE " ",$EXTRACT(X,1,20),?20
+9 IF C
WRITE ?60
+10 WRITE $JUSTIFY(Y,5)
+11 SET C='C
+12 IF $X>41
WRITE !
End DoDot:1
+13 QUIT
SBCC ;;CSC 12-97
+1 IF X?.N
QUIT
+2 IF X?1".".2N
QUIT
+3 IF X?2N1"."2N
QUIT
+4 KILL X
+5 QUIT