Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: NURA6K1

NURA6K1.m

Go to the documentation of this file.
NURA6K1 ;HIRMFO/RM,JH,MD,FT-INDIVIDUAL PROFICIENCY REPORT ;8/8/96  13:14
 ;;4.0;NURSING SERVICE;;Apr 25, 1997
 Q:'$D(^DIC(213.9,1,"OFF"))  Q:$P(^DIC(213.9,1,"OFF"),"^",1)=1
 S (NURQUIT,NURQUEUE,NUROUT)=0
 D EN1^NURSAUTL G QUIT:NUROUT
 S DIC("S")="I +$$EN6^NURSUT3($G(Y)) S DA=+Y D EN2^NURSUT0 I NPSPOS(1)=""R"""
 ;S DIC("S")=DIC("S")_" S DA=+Y I NURSZORT D EN2^NURSUT0 I $S(NPSPOS(0)="""":0,'$D(^NURSF(211.3,NPSPOS(0),0)):0,$P(^(0),U,5)=""R"":1,1:0)"
 D EN3^NURSAGP1 G QUIT:NUROUT
 W ! S ZTDESC="Individual Proficiency Report",ZTRTN="START^NURA6K1",NURS132=1 D EN7^NURSUT0 G:POP!($D(ZTSK)) QUIT
START ;
 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))&($D(^NURSF(210,N1,14))) D WRITE Q
 E  W !?5," NO RECORD FOUND FOR THIS EMPLOYEE " Q
 Q
WRITE ;
 S NURSW1=1 W:N2'="" !,$E($P(^VA(200,N2,0),"^",1),1,20)
 I N2'="",$D(^VA(200,N2,1)) S M=$S($P(^(1),"^",9)'="":$P(^(1),"^",9),1:"") W:M'="" ?23,$E(M,1,3),"-",$E(M,4,5),"-",$E(M,6,9)
 S DA=N1 S NOD1=$P($G(^NURSF(211.8,NOD1,0)),U),NPWARD=$S(+NOD1:$O(^NURSF(211.4,"B",NOD1,0)),1:"  BLANK") D WRITE1 Q:NURQUIT
 Q
WRITE1 Q:NURQUIT  D EN6^NURSAUTL S NL1=$E(NPWARD,1,10) W ?40,NL1
 F NN=0:0 S NN=$O(^NURSF(210,N1,14,NN)) Q:NN'>0  I $D(^NURSF(210,N1,14,0)) D NGO Q:NURQUIT
 Q
NGO I ($Y>(IOSL-6)) D HEADER Q:NURQUIT
 I $D(^NURSF(210,N1,14,NN,0)) S:$P(^(0),"^")'="" (Y,NDD)=$P(^(0),"^") D:+Y D^DIQ W:$D(Y) ?51,Y
 I  S NIE=$S($P(^NURSF(210,N1,14,NN,0),"^",2)'="":$P(^VA(200,$P(^(0),"^",2),0),"^"),1:"") W:$D(NIE) ?65,NIE
 S DATA=$G(^NURSF(210,N1,14,NN,0)) F I=4,5 I +$P(DATA,U,I) S Y=$P(DATA,U,I) D D^DIQ S ZZ=$S(I=4:91,1:105) W ?ZZ,Y
 W ! Q
 S NURPAGE=NURPAGE+1 W:$E(IOST)="C"!(NURPAGE>1) @IOF
 W !,"INDIVIDUAL PROFICIENCY PROFILE" S X="T" D ^%DT D:+Y D^DIQ W ?90,Y,?105,"PAGE: ",NURPAGE
 W !!,?51,"DATE",?91,"WORK COPY",?105,"COPY RET'D",!,"NAME",?23,"SSN",?40,"LOCATION",?51,"DUE",?65,"EVALUATOR",?91,"SENT OUT",?105,"FOR TYPING"
 W !,$$REPEAT^XLFSTR("-",132),!
 Q