VistA-WorldVistAEHR/r/NURSING_SERVICE-NUR/NURA6I1.m

33 lines
1.8 KiB
Mathematica

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
HEADER I 'NURQUEUE,$E(IOST)="C",NURSW1 D ENDPG^NURSUT1 S:NUROUT NURQUIT=+NUROUT Q:NURQUIT
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