ANSEAL ;IHS/OIRM/DSD/CSC - ENTER/EDIT ACUITY LEVELS; [ 02/25/98 10:32 AM ]
;;3.0;NURSING PATIENT ACUITY;;APR 01, 1996
;;ENTER/EDIT ACUITY LEVELS
I ANSCL="" D XB1 Q
EN S DIR(0)="YO",DIR("A")="Edit All Categories",DIR("B")="YES"
S DIR("?",1)="You May Select Individual Care Categories To Edit Or"
S DIR("?")="Have The Computer 'Loop' Thru Each One Automatically."
W !
D DIR^ANSDIC
Q:$D(DTOUT)!$D(DUOUT)
I Y=1 D XB1 Q
F D A2 Q:$D(DTOUT)!$D(DUOUT)
K DUOUT
Q
A2 W !
K DIC
S DIC("A")="Edit Category: "
S DIC="^ANSD(59,",DIC(0)="AEMQZ"
W !
D DIC^ANSDIC
I +Y<1 S DUOUT="" Q
S ANSP=+Y,ANSA=$P(Y,U,2),ANSL=$P(Y(0),U,2)
D SB1
Q
XB1 ;EP;EDIT ALL CATEGORIES
S ANSP=0
F S ANSP=$O(^ANSD(59,ANSP)) Q:'ANSP!$D(DTOUT)!$D(DUOUT) I $D(^ANSD(59,ANSP,0)) S ANSA=$P(^(0),U),ANSL=$P(^(0),U,2) D
.W !!,ANSA
.D SB1
.I $D(DUOUT) Q:ANSP=1 S ANSP=ANSP-2
Q
SB1 ;EDIT CARE LEVEL FOR SPECIFIED CATEGORY
S L=$P(ANSCL,U,ANSP)
S DIR(0)="N^1:"_ANSL,DIR("?")="^D S1Q^ANSEAL",DIR("A")="Care Level"
S:L]"" DIR("B")=L
D DIR^ANSDIC
Q:$D(DTOUT)!$D(DUOUT)
S:Y'>ANSL $P(ANSCL,U,ANSP)=Y
Q
S1Q ;EP;TO DISPLAY CARE LEVEL DESCRIPTIONS FOR CATEGORY
W !," Enter A Number From 1 to ",$G(ANSL)," to Indicate The Care Required",!," In This Category Given The Following Descriptions:",!
S ANC=$G(ANSP)
D ^ANSUDW
W !!,ANSA
Q
ANSEAL ;IHS/OIRM/DSD/CSC - ENTER/EDIT ACUITY LEVELS; [ 02/25/98 10:32 AM ]
+1 ;;3.0;NURSING PATIENT ACUITY;;APR 01, 1996
+2 ;;ENTER/EDIT ACUITY LEVELS
+3 IF ANSCL=""
DO XB1
QUIT
EN SET DIR(0)="YO"
SET DIR("A")="Edit All Categories"
SET DIR("B")="YES"
+1 SET DIR("?",1)="You May Select Individual Care Categories To Edit Or"
+2 SET DIR("?")="Have The Computer 'Loop' Thru Each One Automatically."
+3 WRITE !
+4 DO DIR^ANSDIC
+5 IF $DATA(DTOUT)!$DATA(DUOUT)
QUIT
+6 IF Y=1
DO XB1
QUIT
+7 FOR
DO A2
IF $DATA(DTOUT)!$DATA(DUOUT)
QUIT
+8 KILL DUOUT
+9 QUIT
A2 WRITE !
+1 KILL DIC
+2 SET DIC("A")="Edit Category: "
+3 SET DIC="^ANSD(59,"
SET DIC(0)="AEMQZ"
+4 WRITE !
+5 DO DIC^ANSDIC
+6 IF +Y<1
SET DUOUT=""
QUIT
+7 SET ANSP=+Y
SET ANSA=$PIECE(Y,U,2)
SET ANSL=$PIECE(Y(0),U,2)
+8 DO SB1
+9 QUIT
XB1 ;EP;EDIT ALL CATEGORIES
+1 SET ANSP=0
+2 FOR
SET ANSP=$ORDER(^ANSD(59,ANSP))
IF 'ANSP!$DATA(DTOUT)!$DATA(DUOUT)
QUIT
IF $DATA(^ANSD(59,ANSP,0))
SET ANSA=$PIECE(^(0),U)
SET ANSL=$PIECE(^(0),U,2)
Begin DoDot:1
+3 WRITE !!,ANSA
+4 DO SB1
+5 IF $DATA(DUOUT)
IF ANSP=1
QUIT
SET ANSP=ANSP-2
End DoDot:1
+6 QUIT
SB1 ;EDIT CARE LEVEL FOR SPECIFIED CATEGORY
+1 SET L=$PIECE(ANSCL,U,ANSP)
+2 SET DIR(0)="N^1:"_ANSL
SET DIR("?")="^D S1Q^ANSEAL"
SET DIR("A")="Care Level"
+3 IF L]""
SET DIR("B")=L
+4 DO DIR^ANSDIC
+5 IF $DATA(DTOUT)!$DATA(DUOUT)
QUIT
+6 IF Y'>ANSL
SET $PIECE(ANSCL,U,ANSP)=Y
+7 QUIT
S1Q ;EP;TO DISPLAY CARE LEVEL DESCRIPTIONS FOR CATEGORY
+1 WRITE !," Enter A Number From 1 to ",$GET(ANSL)," to Indicate The Care Required",!," In This Category Given The Following Descriptions:",!
+2 SET ANC=$GET(ANSP)
+3 DO ^ANSUDW
+4 WRITE !!,ANSA
+5 QUIT