NURAED4 ;HIRMFO/MD/RM-DATA ENTRY FOR POSITION ;10/15/90
;;4.0;NURSING SERVICE;**2,7**;Apr 25, 1997
EDTADD ;
K NURSW D GETNOD I $D(^VA(200,ID,.11)),($P(^(.11),"^",1)!($P(^(.11),"^",2)'="")!($P(^(.11),"^",3)'="")!($P(^(.11),"^",4)'="")!($P(^(.11),"^",5)'="")!($P(^(.11),"^",6)'=""))
E S NURSW=1 Q
S NURSADD1=$P(^VA(200,ID,.11),"^",1),NURSADD2=$P(^(.11),"^",2),NURSADD3=$P(^(.11),"^",3),NURSCITY=$P(^(.11),"^",4),NURSZIP=$P(^(.11),"^",6),NURSTATE=$S($P(^(.11),"^",5)="":"",'$D(^DIC(5,$P(^VA(200,ID,.11),"^",5),0)):"",1:$P(^(0),"^",1))
W !,"STREET ADDRESS: ",NURSADD1 G PRT
EDTMAIL ;
K NURSW
I $D(^NURSF(210,DA,15)),($P(^(15),"^",1)'=""!($P(^(15),"^",2)'="")!($P(^(15),"^",3)'="")!($P(^(15),"^",4)'="")!($P(^(15),"^",5)'="")!($P(^(15),"^",6)'=""))
E S NURSW=1 Q
S NURSADD1=$P(^NURSF(210,DA,15),"^",1),NURSADD2=$P(^(15),"^",2),NURSADD3=$P(^(15),"^",3),NURSCITY=$P(^(15),"^",4),NURSZIP=$P(^(15),"^",6),NURSTATE=$S($P(^(15),"^",5)="":"",'$D(^DIC(5,$P(^NURSF(210,DA,15),"^",5),0)):"",1:$P(^(0),"^",1))
W !,"MAILING ADDRESS: ",NURSADD1
PRT W:NURSADD2'="" !,?18,NURSADD2 W:NURSADD3'="" !,?18,NURSADD3
W !,"CITY: ",NURSCITY,!,"STATE: ",NURSTATE,?20,"ZIP CODE: ",NURSZIP
K NURSADD1,NURSADD2,NURSADD3,NURSCITY,NURSTATE,NURSZIP,ID
Q
GETNOD ;OBTAIN POINTER TO VA(200
S ID=$P(^NURSF(210,+NURSDBA,0),"^")
Q
STST ; SET START DATE FOR POSITION DISPLAY
W !!,"Would you like to see this employee's (C)urrent or (P)ast",!,"positions: C// " R NURLS:DTIME I '$T!(NURLS?1"^".E) S NUROUT=1 Q
S NURLS=$S("Cc"[NURLS:"C","Pp"[NURLS:"P",1:NURLS)
S:NURLS?1L X=$C($A(NURLS)-32) I '(NURLS="C"!(NURLS="P")) W $C(7),!!?4,"ENTER A C TO SEE CURRENT POSITIONS,",!?12,"P TO SEE PAST POSITIONS" G STST
G:NURLS'="P" STDT
CPDS ; SELECT A DATE IF PAST SELECTED
S %DT("A")="From what date would you like to list the positions: "
I $D(^NURSF(210,+NURSDBA,0)),+$P(^(0),U,6) S (%DT(0),Y)=$P(^(0),U,6) D D^DIQ S:Y'="" %DT("B")=Y
;I X?1"?".E W $C(7),!!?4,"SELECT A DATE THAT PRECEEDS ALL POSITION START DATES IN THE DESIRED DISPLAY." G CPDS
S %DT="AE" D ^%DT K %DT I "^"[X S NUROUT=1 Q
I +Y'>0 W $C(7) G CPDS
STDT ; SET THE DATE
S NURSTDT=$S(NURLS="C":DT,1:Y)
Q
MORHELP ;
W $C(7)
I $O(NURSASS("")) S XQH="NURA-ASSIGNMENT SELECTION" D EN1^XQH K XQH S:$G(DIRUT) NUROUT=1
I '$O(NURSASS("")) W !!?5,"TO ADD NEW POSITIONS ENTER THE LETTER 'N'."
I 'NUROUT W !!,"Press return to continue or ""^"" to exit " R X:DTIME S:'$T X="^^" I X="^^"!(X=U) S NUROUT=1 Q
Q
NURAED4 ;HIRMFO/MD/RM-DATA ENTRY FOR POSITION ;10/15/90
+1 ;;4.0;NURSING SERVICE;**2,7**;Apr 25, 1997
EDTADD ;
+1 KILL NURSW
DO GETNOD
IF $DATA(^VA(200,ID,.11))
IF ($PIECE(^(.11),"^",1)!($PIECE(^(.11),"^",2)'="")!($PIECE(^(.11),"^",3)'="")!($PIECE(^(.11),"^",4)'="")!($PIECE(^(.11),"^",5)'="")!($PIECE(^(.11),"^",6)'=""))
+2 IF '$TEST
SET NURSW=1
QUIT
+3 SET NURSADD1=$PIECE(^VA(200,ID,.11),"^",1)
SET NURSADD2=$PIECE(^(.11),"^",2)
SET NURSADD3=$PIECE(^(.11),"^",3)
SET NURSCITY=$PIECE(^(.11),"^",4)
SET NURSZIP=$PIECE(^(.11),"^",6)
SET NURSTATE=$SELECT($PIECE(^(.11),"^",5)="":"",'$DATA(^DIC(5,$PIECE(^VA(200,ID,.11),"^",5),0)):"",1:$PIECE(^(0),"^",1))
+4 WRITE !,"STREET ADDRESS: ",NURSADD1
GOTO PRT
EDTMAIL ;
+1 KILL NURSW
+2 IF $DATA(^NURSF(210,DA,15))
IF ($PIECE(^(15),"^",1)'=""!($PIECE(^(15),"^",2)'="")!($PIECE(^(15),"^",3)'="")!($PIECE(^(15),"^",4)'="")!($PIECE(^(15),"^",5)'="")!($PIECE(^(15),"^",6)'=""))
+3 IF '$TEST
SET NURSW=1
QUIT
+4 SET NURSADD1=$PIECE(^NURSF(210,DA,15),"^",1)
SET NURSADD2=$PIECE(^(15),"^",2)
SET NURSADD3=$PIECE(^(15),"^",3)
SET NURSCITY=$PIECE(^(15),"^",4)
SET NURSZIP=$PIECE(^(15),"^",6)
SET NURSTATE=$SELECT($PIECE(^(15),"^",5)="":"",'$DATA(^DIC(5,$PIECE(^NURSF(210,DA,15),"^",5),0)):"",1:$PIECE(^(0),"^",1))
+5 WRITE !,"MAILING ADDRESS: ",NURSADD1
PRT IF NURSADD2'=""
WRITE !,?18,NURSADD2
IF NURSADD3'=""
WRITE !,?18,NURSADD3
+1 WRITE !,"CITY: ",NURSCITY,!,"STATE: ",NURSTATE,?20,"ZIP CODE: ",NURSZIP
+2 KILL NURSADD1,NURSADD2,NURSADD3,NURSCITY,NURSTATE,NURSZIP,ID
+3 QUIT
GETNOD ;OBTAIN POINTER TO VA(200
+1 SET ID=$PIECE(^NURSF(210,+NURSDBA,0),"^")
+2 QUIT
STST ; SET START DATE FOR POSITION DISPLAY
+1 WRITE !!,"Would you like to see this employee's (C)urrent or (P)ast",!,"positions: C// "
READ NURLS:DTIME
IF '$TEST!(NURLS?1"^".E)
SET NUROUT=1
QUIT
+2 SET NURLS=$SELECT("Cc"[NURLS:"C","Pp"[NURLS:"P",1:NURLS)
+3 IF NURLS?1L
SET X=$CHAR($ASCII(NURLS)-32)
IF '(NURLS="C"!(NURLS="P"))
WRITE $CHAR(7),!!?4,"ENTER A C TO SEE CURRENT POSITIONS,",!?12,"P TO SEE PAST POSITIONS"
GOTO STST
+4 IF NURLS'="P"
GOTO STDT
CPDS ; SELECT A DATE IF PAST SELECTED
+1 SET %DT("A")="From what date would you like to list the positions: "
+2 IF $DATA(^NURSF(210,+NURSDBA,0))
IF +$PIECE(^(0),U,6)
SET (%DT(0),Y)=$PIECE(^(0),U,6)
DO D^DIQ
IF Y'=""
SET %DT("B")=Y
+3 ;I X?1"?".E W $C(7),!!?4,"SELECT A DATE THAT PRECEEDS ALL POSITION START DATES IN THE DESIRED DISPLAY." G CPDS
+4 SET %DT="AE"
DO ^%DT
KILL %DT
IF "^"[X
SET NUROUT=1
QUIT
+5 IF +Y'>0
WRITE $CHAR(7)
GOTO CPDS
STDT ; SET THE DATE
+1 SET NURSTDT=$SELECT(NURLS="C":DT,1:Y)
+2 QUIT
MORHELP ;
+1 WRITE $CHAR(7)
+2 IF $ORDER(NURSASS(""))
SET XQH="NURA-ASSIGNMENT SELECTION"
DO EN1^XQH
KILL XQH
IF $GET(DIRUT)
SET NUROUT=1
+3 IF '$ORDER(NURSASS(""))
WRITE !!?5,"TO ADD NEW POSITIONS ENTER THE LETTER 'N'."
+4 IF 'NUROUT
WRITE !!,"Press return to continue or ""^"" to exit "
READ X:DTIME
IF '$TEST
SET X="^^"
IF X="^^"!(X=U)
SET NUROUT=1
QUIT
+5 QUIT