NURA6I1 ;HIRMFO/RM,JH,MD,FT-INDIVIDUAL NPSB REPORT ;8/8/96 13:34
;;4.0;NURSING SERVICE;;Apr 25, 1997
Q:'$D(^DIC(213.9,1,"OFF")) Q:$P(^DIC(213.9,1,"OFF"),"^",1)=1
S (NURQUEUE,NUROUT)=0
D EN1^NURSAUTL G QUIT:NUROUT
S DIC("S")="I +$$EN6^NURSUT3($G(Y)) S DA=+Y D EN2^NURSUT0 I ""^R^L^O^""[(U_NPSPOS(1)_U)"
D EN3^NURSAGP1 G QUIT:NUROUT
W ! S ZTDESC="Individual NPSB Report",ZTRTN="START^NURA6I1",NURS132=1 D EN7^NURSUT0 G:POP!($D(ZTSK)) QUIT
START ;
K ^TMP($J)
U IO S (NURPAGE,NUROUT,NURSW1,NURQUIT)=0 D HEADER,PRINT
QUIT K ^TMP($J) D CLOSE^NURSUT1,^NURAKILL
Q
; DETAIL LINE PRINT ROUTINE
PRINT I $D(^NURSF(210,N1,0)) I $D(^NURSF(210,N1,14)) D WRITE Q
E W !?5," NO RECORD FOUND FOR THIS EMPLOYEE " Q
WRITE I ($Y>(IOSL-7)) D HEADER Q:NURQUIT
S NURSW1=1,DA=N1 D EN3^NURSUT0 S NLO=$S($P($G(^NURSF(211.8,+NOD1,0)),U)'="":$P(^(0),U),1:" BLANK")
I N2'="",$P($G(^VA(200,N2,1)),U,9)'="" S NURSSN=$P(^(1),"^",9)
S NPWARD=NLO D EN7^NURSAUTL S NL1=NPWARD
F D1=0:0 S D1=$O(^NURSF(210,N1,14,D1)) Q:D1'>0 D W2
Q
W2 ;
W ! W:+N2 $E($P(^VA(200,N2,0),U),1,20) W:+NURSSN ?25,$E(NURSSN,1,3),"-",$E(NURSSN,4,5),"-",$E(NURSSN,6,9),?39,NL1,?51,$S($G(NPSPOS(1))="R"!($G(NPSPOS(1))="L"):$$CAT^NURSUT2(NPSPOS(1)),1:"")
S DATA=$G(^NURSF(210,N1,14,D1,0)) F I=4,5,6,3 I +$P(DATA,U,I) S Y=+$P(DATA,U,I) D D^DIQ S ZZ=$S(I=4:61,I=5:77,I=6:93,3:109) W ?ZZ,Y
Q
S NURPAGE=NURPAGE+1 W:$E(IOST)="C"!(NURPAGE>1) @IOF
W !,"NURSING SERVICE NPSB PROFILE" S X="T" D ^%DT D:+Y D^DIQ W ?91,Y,?109,"PAGE: ",NURPAGE
W !!,?93,"TENTATIVE",!,?51,"SERVICE",?61,"DATE WORK COPY",?77,"DATE RETURNED",?93,"DATE FOR",?109,"ACTUAL DATE",!,?2,"NAME",?25,"SSN",?39,"LOCATION",?51,"CATEGORY",?61,"IS SENT OUT",?77,"FOR TYPING",?93,"FOR BOARD ACT.",?109,"OF BOARD ACT."
W !,$$REPEAT^XLFSTR("-",132),!
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HNURA6I1 1892 printed Sep 15, 2024@21:42:28 Page 2
NURA6I1 ;HIRMFO/RM,JH,MD,FT-INDIVIDUAL NPSB REPORT ;8/8/96 13:34
+1 ;;4.0;NURSING SERVICE;;Apr 25, 1997
+2 if '$DATA(^DIC(213.9,1,"OFF"))
QUIT
if $PIECE(^DIC(213.9,1,"OFF"),"^",1)=1
QUIT
+3 SET (NURQUEUE,NUROUT)=0
+4 DO EN1^NURSAUTL
if NUROUT
GOTO QUIT
+5 SET DIC("S")="I +$$EN6^NURSUT3($G(Y)) S DA=+Y D EN2^NURSUT0 I ""^R^L^O^""[(U_NPSPOS(1)_U)"
+6 DO EN3^NURSAGP1
if NUROUT
GOTO QUIT
+7 WRITE !
SET ZTDESC="Individual NPSB Report"
SET ZTRTN="START^NURA6I1"
SET NURS132=1
DO EN7^NURSUT0
if POP!($DATA(ZTSK))
GOTO QUIT
START ;
+1 KILL ^TMP($JOB)
+2 USE IO
SET (NURPAGE,NUROUT,NURSW1,NURQUIT)=0
DO HEADER
DO PRINT
QUIT KILL ^TMP($JOB)
DO CLOSE^NURSUT1
DO ^NURAKILL
+1 QUIT
+2 ; DETAIL LINE PRINT ROUTINE
PRINT IF $DATA(^NURSF(210,N1,0))
IF $DATA(^NURSF(210,N1,14))
DO WRITE
QUIT
+1 IF '$TEST
WRITE !?5," NO RECORD FOUND FOR THIS EMPLOYEE "
QUIT
WRITE IF ($Y>(IOSL-7))
DO HEADER
if NURQUIT
QUIT
+1 SET NURSW1=1
SET DA=N1
DO EN3^NURSUT0
SET NLO=$SELECT($PIECE($GET(^NURSF(211.8,+NOD1,0)),U)'="":$PIECE(^(0),U),1:" BLANK")
+2 IF N2'=""
IF $PIECE($GET(^VA(200,N2,1)),U,9)'=""
SET NURSSN=$PIECE(^(1),"^",9)
+3 SET NPWARD=NLO
DO EN7^NURSAUTL
SET NL1=NPWARD
+4 FOR D1=0:0
SET D1=$ORDER(^NURSF(210,N1,14,D1))
if D1'>0
QUIT
DO W2
+5 QUIT
W2 ;
+1 WRITE !
if +N2
WRITE $EXTRACT($PIECE(^VA(200,N2,0),U),1,20)
if +NURSSN
WRITE ?25,$EXTRACT(NURSSN,1,3),"-",$EXTRACT(NURSSN,4,5),"-",$EXTRACT(NURSSN,6,9),?39,NL1,?51,$SELECT($GET(NPSPOS(1))="R"!($GET(NPSPOS(1))="L"):$$CAT^NURSUT2(NPSPOS(1)),1:"")
+2 SET DATA=$GET(^NURSF(210,N1,14,D1,0))
FOR I=4,5,6,3
IF +$PIECE(DATA,U,I)
SET Y=+$PIECE(DATA,U,I)
DO D^DIQ
SET ZZ=$SELECT(I=4:61,I=5:77,I=6:93,3:109)
WRITE ?ZZ,Y
+3 QUIT
IF $EXTRACT(IOST)="C"
IF NURSW1
DO ENDPG^NURSUT1
if NUROUT
SET NURQUIT=+NUROUT
if NURQUIT
QUIT
+1 SET NURPAGE=NURPAGE+1
if $EXTRACT(IOST)="C"!(NURPAGE>1)
WRITE @IOF
+2 WRITE !,"NURSING SERVICE NPSB PROFILE"
SET X="T"
DO ^%DT
if +Y
DO D^DIQ
WRITE ?91,Y,?109,"PAGE: ",NURPAGE
+3 WRITE !!,?93,"TENTATIVE",!,?51,"SERVICE",?61,"DATE WORK COPY",?77,"DATE RETURNED",?93,"DATE FOR",?109,"ACTUAL DATE",!,?2,"NAME",?25,"SSN",?39,"LOCATION",?51,"CATEGORY",?61,"IS SENT OUT",?77,"FOR TYPING",?93,"FOR BOARD ACT.",?109,"OF BOARD ACT."
+4 WRITE !,$$REPEAT^XLFSTR("-",132),!
+5 QUIT