NURSUT4 ;HIRMFO/RM-UTILITIES FOR FILE 213.9 ;5/17/93
;;4.0;NURSING SERVICE;**20,22**;Apr 25, 1997
EN1 ; ENTRY FROM INPUT TRANSFORM FROM FIELDS 10.4 AND 10.5 ON FILE 213.9
K:$L(X)>6!($L(X)<1)!'(X?1"T"!(X?1"N")!(X?1"T+"1.4N)!(X?1"T-"1.4N)!(X?1"N+"1.4N)!(X?1"N-"1.4N)) X
Q
EN2 ; EXECUTABLE HELP FROM OPTION NURAAM-ACU GRADE/STEP CODE LOAD
N DA,Y,X I $G(^NURSF(211.1,0))="" W !,$C(7),"NURS PAY SCALE FILE IS NOT RESIDENT CANNOT CONTINUE!!"
K NUROUT,^TMP("NURCD",$J)
D DISP
W !!,"Enter Grade/Step Code",!,"examples: ",!,"R/E1/5 = Registered Nurse,ENTRY1,Step 5",!,"N/4/7 = Nursing Assistant,GS4,Step 7",!
QUIT K NURTAB,NURS,NURAQ,NUREND,NURP,NSCD,I,NURMAX,NCTR,NURI,NURMI
Q
DISP ;
K NURTAB,NSCD S NCTR=1,NSCD="",NURMAX=0
F I=0:0 S NSCD=$O(^NURSF(211.1,"B",NSCD)) Q:NSCD="" F DA=0:0 S DA=$O(^NURSF(211.1,"B",NSCD,DA)) Q:DA'>0 D
. S NURMAX=NURMAX+1,NSCD(NURMAX)=DA_"^"_NSCD
. Q
S NURSTRT=1,(NUROUT,NURDONE)=0
F D DSP I $G(NURDONE)!$G(NUROUT) Q
Q
DSP ;
W @IOF S NURAQ=$Y
F NURS=NURSTRT:3:NURMAX S NURI=NURS D I $Y>(IOSL+NURAQ-10),NURS'=NURMAX S NURSTRT=NURS+3 Q
. Q:$D(NSCD(NURI))[0
. S NURI(0)=NURI+1,NURI(1)=NURI+2
. W ! W:$G(NSCD(NURI))'="" ?1,$J(NURI,2),". ",$P($G(NSCD(NURI)),U,2) W:$G(NSCD(NURI(0)))'="" ?26,$J(NURI(0),2),". ",$P($G(NSCD(NURI(0))),U,2) W:$G(NSCD(NURI(1)))'="" ?52,$J(NURI(1),2),". ",$P($G(NSCD(NURI(1))),U,2)
. Q
S NURDONE=(NURS=NURMAX)!(NURS+2=NURMAX)
I 'NURDONE W !,"<<More>>"
W !,"Press the return key to continue or '^' to exit: " R NURX:DTIME I NURX="^" S NUROUT=1 Q
G:NURDONE QUIT
S:NURX["?" NURSTRT=1 G DSP:NURX["?"
Q
EN3 ;INPUT TRANSFORM FOR FIELD 8 FILE 211.82
K X W $C(7),!,"*** NOT YET IMPLEMENTED ***"
Q
COMPDAT(D0) ; EXTRINSIC FUNCTION TO RETURN COMPUTED SERVICE COMPUTATION DATE
; FROM THE EMPLOYEE(#450) FILE
N X,Y,NURY,NURX,NURZ
S (NURCOMP,PRSPCDA)=0,NURX=+$G(^NURSF(210,+D0,0)),NURY=$P($G(^VA(200,+NURX,1)),U,9) S:NURY'="" PRSPCDA=$O(^PRSPC("SSN",NURY,0))
S Y=$S(+PRSPCDA:$P($G(^PRSPC(PRSPCDA,0)),U,31),1:"")
;I +Y>0 S %DT="" D DD^%DT S NURCOMP=Y
I +Y>0 S NURCOMP=Y
S:NURCOMP=0 NURCOMP="" K PRSPCDA
Q NURCOMP
VALENT ;
S NURSBAD=0 F NURS1=1:1 S NURS2=$P(NURSX,",",NURS1) Q:NURS2="" D VAL0 Q:NURSBAD
Q
VAL0 I +NURS2>NURSMAX!(+NURS2<1) S NURSBAD=1
I NURS2["-",$P(NURS2,"-")'?.N!($P(NURS2,"-",2)'?.N)!(+$P(NURS2,"-",2)>NURSMAX)!(+$P(NURS2,"-",2)<1)!(+NURS2>NURSMAX)!(+NURS2<1) S NURSBAD=1
I NURS2'["-",NURS2'?.N!(+NURS2>NURSMAX)!(+NURS2<1) S NURSBAD=1
I (NURSX["?"!(NURSBAD)) D Q
. W:NURSX'?2"?" !!,?5,$C(7),"Make a selection from the screen display, a range of numbers can be",!,?5,"selected by using a HYPHEN, multiple selections can be made by"
. W !,?5,"separating them by COMMAS, ",$S($G(NURSNALL)'>0:"select ALL ",1:""),"or '^' to exit."
. W:NURSX'?2"?" !,?15,"E.G. 1 1-2 1,3 1-2,4-5 1,3-4"
. W:$G(NURSNALL)'>0 " ALL"
. W !,?22,"Are examples of valid selections" S:NURSX?2."?" NURSSTRT=1
. Q
Q
COMPDISP ; SERVICE COMP DATE DISPLAY
N X,Y
S Y=$$COMPDAT^NURSUT4(D0) D D^DIQ I Y'="" W ?$X+1,Y,?$X+1," (NO EDITING)"
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HNURSUT4 3093 printed Oct 16, 2024@18:23:10 Page 2
NURSUT4 ;HIRMFO/RM-UTILITIES FOR FILE 213.9 ;5/17/93
+1 ;;4.0;NURSING SERVICE;**20,22**;Apr 25, 1997
EN1 ; ENTRY FROM INPUT TRANSFORM FROM FIELDS 10.4 AND 10.5 ON FILE 213.9
+1 if $LENGTH(X)>6!($LENGTH(X)<1)!'(X?1"T"!(X?1"N")!(X?1"T+"1.4N)!(X?1"T-"1.4N)!(X?1"N+"1.4N)!(X?1"N-"1.4N))
KILL X
+2 QUIT
EN2 ; EXECUTABLE HELP FROM OPTION NURAAM-ACU GRADE/STEP CODE LOAD
+1 NEW DA,Y,X
IF $GET(^NURSF(211.1,0))=""
WRITE !,$CHAR(7),"NURS PAY SCALE FILE IS NOT RESIDENT CANNOT CONTINUE!!"
+2 KILL NUROUT,^TMP("NURCD",$JOB)
+3 DO DISP
+4 WRITE !!,"Enter Grade/Step Code",!,"examples: ",!,"R/E1/5 = Registered Nurse,ENTRY1,Step 5",!,"N/4/7 = Nursing Assistant,GS4,Step 7",!
QUIT KILL NURTAB,NURS,NURAQ,NUREND,NURP,NSCD,I,NURMAX,NCTR,NURI,NURMI
+1 QUIT
DISP ;
+1 KILL NURTAB,NSCD
SET NCTR=1
SET NSCD=""
SET NURMAX=0
+2 FOR I=0:0
SET NSCD=$ORDER(^NURSF(211.1,"B",NSCD))
if NSCD=""
QUIT
FOR DA=0:0
SET DA=$ORDER(^NURSF(211.1,"B",NSCD,DA))
if DA'>0
QUIT
Begin DoDot:1
+3 SET NURMAX=NURMAX+1
SET NSCD(NURMAX)=DA_"^"_NSCD
+4 QUIT
End DoDot:1
+5 SET NURSTRT=1
SET (NUROUT,NURDONE)=0
+6 FOR
DO DSP
IF $GET(NURDONE)!$GET(NUROUT)
QUIT
+7 QUIT
DSP ;
+1 WRITE @IOF
SET NURAQ=$Y
+2 FOR NURS=NURSTRT:3:NURMAX
SET NURI=NURS
Begin DoDot:1
+3 if $DATA(NSCD(NURI))[0
QUIT
+4 SET NURI(0)=NURI+1
SET NURI(1)=NURI+2
+5 WRITE !
if $GET(NSCD(NURI))'=""
WRITE ?1,$JUSTIFY(NURI,2),". ",$PIECE($GET(NSCD(NURI)),U,2)
if $GET(NSCD(NURI(0)))'=""
WRITE ?26,$JUSTIFY(NURI(0),2),". ",$PIECE($GET(NSCD(NURI(0))),U,2)
if $GET(NSCD(NURI(1)))'=""
WRITE ?52,$JUSTIFY(NURI(1),2),". ",$PIECE($GET(NSCD(NURI(1))),U,2)
+6 QUIT
End DoDot:1
IF $Y>(IOSL+NURAQ-10)
IF NURS'=NURMAX
SET NURSTRT=NURS+3
QUIT
+7 SET NURDONE=(NURS=NURMAX)!(NURS+2=NURMAX)
+8 IF 'NURDONE
WRITE !,"<<More>>"
+9 WRITE !,"Press the return key to continue or '^' to exit: "
READ NURX:DTIME
IF NURX="^"
SET NUROUT=1
QUIT
+10 if NURDONE
GOTO QUIT
+11 if NURX["?"
SET NURSTRT=1
if NURX["?"
GOTO DSP
+12 QUIT
EN3 ;INPUT TRANSFORM FOR FIELD 8 FILE 211.82
+1 KILL X
WRITE $CHAR(7),!,"*** NOT YET IMPLEMENTED ***"
+2 QUIT
COMPDAT(D0) ; EXTRINSIC FUNCTION TO RETURN COMPUTED SERVICE COMPUTATION DATE
+1 ; FROM THE EMPLOYEE(#450) FILE
+2 NEW X,Y,NURY,NURX,NURZ
+3 SET (NURCOMP,PRSPCDA)=0
SET NURX=+$GET(^NURSF(210,+D0,0))
SET NURY=$PIECE($GET(^VA(200,+NURX,1)),U,9)
if NURY'=""
SET PRSPCDA=$ORDER(^PRSPC("SSN",NURY,0))
+4 SET Y=$SELECT(+PRSPCDA:$PIECE($GET(^PRSPC(PRSPCDA,0)),U,31),1:"")
+5 ;I +Y>0 S %DT="" D DD^%DT S NURCOMP=Y
+6 IF +Y>0
SET NURCOMP=Y
+7 if NURCOMP=0
SET NURCOMP=""
KILL PRSPCDA
+8 QUIT NURCOMP
VALENT ;
+1 SET NURSBAD=0
FOR NURS1=1:1
SET NURS2=$PIECE(NURSX,",",NURS1)
if NURS2=""
QUIT
DO VAL0
if NURSBAD
QUIT
+2 QUIT
VAL0 IF +NURS2>NURSMAX!(+NURS2<1)
SET NURSBAD=1
+1 IF NURS2["-"
IF $PIECE(NURS2,"-")'?.N!($PIECE(NURS2,"-",2)'?.N)!(+$PIECE(NURS2,"-",2)>NURSMAX)!(+$PIECE(NURS2,"-",2)<1)!(+NURS2>NURSMAX)!(+NURS2<1)
SET NURSBAD=1
+2 IF NURS2'["-"
IF NURS2'?.N!(+NURS2>NURSMAX)!(+NURS2<1)
SET NURSBAD=1
+3 IF (NURSX["?"!(NURSBAD))
Begin DoDot:1
+4 if NURSX'?2"?"
WRITE !!,?5,$CHAR(7),"Make a selection from the screen display, a range of numbers can be",!,?5,"selected by using a HYPHEN, multiple selections can be made by"
+5 WRITE !,?5,"separating them by COMMAS, ",$SELECT($GET(NURSNALL)'>0:"select ALL ",1:""),"or '^' to exit."
+6 if NURSX'?2"?"
WRITE !,?15,"E.G. 1 1-2 1,3 1-2,4-5 1,3-4"
+7 if $GET(NURSNALL)'>0
WRITE " ALL"
+8 WRITE !,?22,"Are examples of valid selections"
if NURSX?2."?"
SET NURSSTRT=1
+9 QUIT
End DoDot:1
QUIT
+10 QUIT
COMPDISP ; SERVICE COMP DATE DISPLAY
+1 NEW X,Y
+2 SET Y=$$COMPDAT^NURSUT4(D0)
DO D^DIQ
IF Y'=""
WRITE ?$X+1,Y,?$X+1," (NO EDITING)"
+3 QUIT