NURADMIN ;HIRMFO/JH/MD-GENERIC ADMINISTRATION PRINT SELECTION ROUTINE ;10/25/90
;;4.0;NURSING SERVICE;;Apr 25, 1997
EN ;
Q:'$D(^DIC(213.9,1,"OFF")) Q:$P(^DIC(213.9,1,"OFF"),"^",1)=1
S T=$T(DISPL+ANS1)
ASK S (AN,NURQUEUE,NUROUT,NNOUT)=0,(SEL,ANS2)="",ENTR="CAT;POS" D EN1^NURSAUTL G:NUROUT Q
I NURSZAP>6 D RNHN G:NNOUT Q
I NURSZAP'>6,ANS1'=7,ANS1'=9,ANS1'=11 D LOCSER G:NNOUT Q
W ! D A1 I NNOUT K NNOUT G Q
K NNOUT Q
A1 ;
S AN=ANS2+2 I $S(ANS1=2:1,ANS1=3:1,ANS1=4:1,1:0) S:SEL=2 AN=AN+2 S OPT="^NURA"_$P(T,";",AN) D @OPT G Q
I ANS1=7 D:NURSZAP'>6 LOSER Q:NNOUT S OPT=$S(SEL=1:"^NURA9G",1:"^NURA6G") D @OPT G Q
I ANS1=9 D:NURSZAP'>6 LOINSER Q:NNOUT S OPT=$S(SEL=1:"^NURA9I",SEL=2:"^NURA6I2",SEL=3:"^NURA6I1",1:"") D:OPT'="" @OPT G Q
I ANS1=11 D:NURSZAP'>6 LOINSER Q:NNOUT S OPT=$S(SEL=1:"^NURA9K",SEL=2:"^NURA6K2",SEL=3:"^NURA6K1",1:"") D:OPT'="" @OPT G Q
S OPT=$P(ENTR,";",ANS2)_"^NURA"_$P(T,";",SEL+2) D @OPT
Q ;
Q
LOINSER W !!,"By (1) Location (2) Service or (3) Individual: " R SEL:DTIME I '$T!("^"[SEL) S NNOUT=1 Q
I SEL'>0!(SEL>3) W !!,$C(7),"Select Sort Parameter by choosing '1','2' or '3'" G LOINSER
Q
LOSER W !!,"By (1) Location or (2) Service: " R SEL:DTIME I '$T!("^"[SEL) S NNOUT=1 Q
I SEL'=1&(SEL'=2) W !!,$C(7),"Select sort parameter by choosing '1' or '2'" G LOSER
Q
RNHN S SEL=1 Q:ANS1=7!(ANS1=9)!(ANS1=11) W !!,"Sort by: ",!!,"(1) Service Category or (2) Service Position: " R INX:DTIME I '$T!("^"[INX) S NNOUT=1 Q
I INX'=1&(INX'=2) W !!,$C(7),"Select sort parameter by entering '1' or '2' ." G RNHN
S ANS2=$S(INX=1:1,INX=2:2,1:"")
Q
LOCSER W !!,"Sort by: ",!!,?5,"1. Location and Service Category",!,?5,"2. Location and Service Position",!,?5,"3. Service and Service Category",!,?5,"4. Service and Service Position ",!!,"Choose a sort parameter set between 1 and 4: "
R INX:DTIME I '$T!("^"[INX) S NNOUT=1 Q
I INX'=+INX!(+INX'>0)!(+INX>4) W !!,$C(7),"Select sort parameters by choosing a number between '1' and '4'." G LOCSER
S SEL=$S(INX=1!(INX=2):1,INX=3!(INX=4):2,1:"")
S ANS2=$S(INX=1!(INX=3):1,INX=2!(INX=4):2,1:"")
Q
DISPL ;
;;9A1;6A1
;;9B1;9B2;6B1;6B2
;;9C1;9C2;6C1;6C2
;;9D1;9D2;6D1;6D2
;;9E1;6E1
;;9F1;6F1
;;9G;6G
;;9H1;6H1
;;9I;6I1;6I2
;;9J1;6J1
;;9K;6K2;6K1
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HNURADMIN 2280 printed Oct 16, 2024@18:19:55 Page 2
NURADMIN ;HIRMFO/JH/MD-GENERIC ADMINISTRATION PRINT SELECTION ROUTINE ;10/25/90
+1 ;;4.0;NURSING SERVICE;;Apr 25, 1997
EN ;
+1 if '$DATA(^DIC(213.9,1,"OFF"))
QUIT
if $PIECE(^DIC(213.9,1,"OFF"),"^",1)=1
QUIT
+2 SET T=$TEXT(DISPL+ANS1)
ASK SET (AN,NURQUEUE,NUROUT,NNOUT)=0
SET (SEL,ANS2)=""
SET ENTR="CAT;POS"
DO EN1^NURSAUTL
if NUROUT
GOTO Q
+1 IF NURSZAP>6
DO RNHN
if NNOUT
GOTO Q
+2 IF NURSZAP'>6
IF ANS1'=7
IF ANS1'=9
IF ANS1'=11
DO LOCSER
if NNOUT
GOTO Q
+3 WRITE !
DO A1
IF NNOUT
KILL NNOUT
GOTO Q
+4 KILL NNOUT
QUIT
A1 ;
+1 SET AN=ANS2+2
IF $SELECT(ANS1=2:1,ANS1=3:1,ANS1=4:1,1:0)
if SEL=2
SET AN=AN+2
SET OPT="^NURA"_$PIECE(T,";",AN)
DO @OPT
GOTO Q
+2 IF ANS1=7
if NURSZAP'>6
DO LOSER
if NNOUT
QUIT
SET OPT=$SELECT(SEL=1:"^NURA9G",1:"^NURA6G")
DO @OPT
GOTO Q
+3 IF ANS1=9
if NURSZAP'>6
DO LOINSER
if NNOUT
QUIT
SET OPT=$SELECT(SEL=1:"^NURA9I",SEL=2:"^NURA6I2",SEL=3:"^NURA6I1",1:"")
if OPT'=""
DO @OPT
GOTO Q
+4 IF ANS1=11
if NURSZAP'>6
DO LOINSER
if NNOUT
QUIT
SET OPT=$SELECT(SEL=1:"^NURA9K",SEL=2:"^NURA6K2",SEL=3:"^NURA6K1",1:"")
if OPT'=""
DO @OPT
GOTO Q
+5 SET OPT=$PIECE(ENTR,";",ANS2)_"^NURA"_$PIECE(T,";",SEL+2)
DO @OPT
Q ;
+1 QUIT
LOINSER WRITE !!,"By (1) Location (2) Service or (3) Individual: "
READ SEL:DTIME
IF '$TEST!("^"[SEL)
SET NNOUT=1
QUIT
+1 IF SEL'>0!(SEL>3)
WRITE !!,$CHAR(7),"Select Sort Parameter by choosing '1','2' or '3'"
GOTO LOINSER
+2 QUIT
LOSER WRITE !!,"By (1) Location or (2) Service: "
READ SEL:DTIME
IF '$TEST!("^"[SEL)
SET NNOUT=1
QUIT
+1 IF SEL'=1&(SEL'=2)
WRITE !!,$CHAR(7),"Select sort parameter by choosing '1' or '2'"
GOTO LOSER
+2 QUIT
RNHN SET SEL=1
if ANS1=7!(ANS1=9)!(ANS1=11)
QUIT
WRITE !!,"Sort by: ",!!,"(1) Service Category or (2) Service Position: "
READ INX:DTIME
IF '$TEST!("^"[INX)
SET NNOUT=1
QUIT
+1 IF INX'=1&(INX'=2)
WRITE !!,$CHAR(7),"Select sort parameter by entering '1' or '2' ."
GOTO RNHN
+2 SET ANS2=$SELECT(INX=1:1,INX=2:2,1:"")
+3 QUIT
LOCSER WRITE !!,"Sort by: ",!!,?5,"1. Location and Service Category",!,?5,"2. Location and Service Position",!,?5,"3. Service and Service Category",!,?5,"4. Service and Service Position ",!!,"Choose a sort parameter set between 1 and 4: "
+1 READ INX:DTIME
IF '$TEST!("^"[INX)
SET NNOUT=1
QUIT
+2 IF INX'=+INX!(+INX'>0)!(+INX>4)
WRITE !!,$CHAR(7),"Select sort parameters by choosing a number between '1' and '4'."
GOTO LOCSER
+3 SET SEL=$SELECT(INX=1!(INX=2):1,INX=3!(INX=4):2,1:"")
+4 SET ANS2=$SELECT(INX=1!(INX=3):1,INX=2!(INX=4):2,1:"")
+5 QUIT
DISPL ;
+1 ;;9A1;6A1
+2 ;;9B1;9B2;6B1;6B2
+3 ;;9C1;9C2;6C1;6C2
+4 ;;9D1;9D2;6D1;6D2
+5 ;;9E1;6E1
+6 ;;9F1;6F1
+7 ;;9G;6G
+8 ;;9H1;6H1
+9 ;;9I;6I1;6I2
+10 ;;9J1;6J1
+11 ;;9K;6K2;6K1