source: WorldVistAEHR/trunk/r/PAID-PRS/PRSEPMD6.m@ 1361

Last change on this file since 1361 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 2.3 KB
RevLine 
[613]1PRSEPMD6 ;HISC/GLB-INCOMPLETE MANDATORY INSERVICE CLASS DATA PART 2 OF 2 ;2/17/94
2 ;;4.0;PAID;**20**;Sep 21, 1995
3 I $O(^TMP("PRSE",$J,"SORT1",""))="" D HDR W !,"NO DEFICIENCIES FOUND FOR THIS TIME PERIOD." W:$G(PSPC)]"" !,"SERVICE: ",PSPC W:$G(PRSECLS)]"" !,"CLASS: ",PRSECLS Q
4 S (PRSESER,DUEDT)="" F S PRSESER=$O(^TMP("PRSE",$J,"SORT1",PRSESER)) Q:PRSESER=""!(PRSEOUT) D
5 .S TMP=$G(^TMP("PRSE",$J,"%",PRSESER)),COMPLIAN=""
6 .S TOT=$P(TMP,U),DEF=$P(TMP,U,2)
7 .S COMPLIAN=$S(TOT:100-(100*DEF/TOT),1:"")
8 .I ($Y>(IOSL-8))!'(NSW1) D HDR W ! Q:PRSEOUT
9 .D SUBHDR
10 .S NSCT="" F S NSCT=$O(^TMP("PRSE",$J,"SORT1",PRSESER,NSCT)) Q:NSCT=""!(PRSEOUT) S HOLD=1 D S HOLD=1
11 ..S CLASSNUM=+$G(^TMP("PRSE",$J,"SORT1",PRSESER,NSCT)) Q:CLASSNUM'>0
12 ..S NAM="" F S NAM=$O(^TMP("PRSE",$J,"SORT2",CLASSNUM,NAM)) Q:NAM=""!(PRSEOUT) S HOLD2=1 D W ! S HOLD2=1
13 ...S CLASSTXT="" F S CLASSTXT=$O(^TMP("PRSE",$J,"SORT2",CLASSNUM,NAM,CLASSTXT)) Q:CLASSTXT=""!(PRSEOUT) S DUEDT=^(CLASSTXT) D
14 ....I ($Y>(IOSL-8))!'(NSW1) D HDR,SUBHDR W ! Q:PRSEOUT
15 ....I HOLD W $S(NSCT=" BLANK":" ",1:$S(PRSE132:$E(NSCT,1,32),1:$E(NSCT,1,25))),! S HOLD=0
16 ....I HOLD2 W ?10,$S(NAM=" BLANK":" ",1:$S(PRSE132:NAM,1:$E(NAM,1,25))) S HOLD2=0
17 ....W ?40,$$FMTE^XLFDT(DUEDT,2)
18 ....W ?$S(PRSE132:70,1:54),CLASSTXT,!
19 ....S DUEDT="" Q
20 ...Q
21 ..Q
22 .Q
23 Q
24HDR ; PRINT REPORT HEARDER
25 I NSW1,$E(IOST)="C" D ENDPG^PRSEUTL S PRSEOUT=+POUT Q:POUT
26 S COUNT=COUNT+1,(HOLD,NSW1)=1,NSW2=0
27 W:$E(IOST)="C"!(COUNT>1) @IOF W !,"SERVICE MANDATORY TRAINING DEFICIENCY REPORT FOR "_$S(TYP="C":"CY ",TYP="F":"FY ",1:" ")
28 W $S(TYP="C"!(TYP="F"):$G(PYR),1:$G(YRST(1))_" - "_$G(YREND(1)))
29 S Y=DT D:+Y D^DIQ
30 I PRSE132 D
31 .W ?101,Y,?121,"PAGE: ",COUNT
32 .W !!,"TITLE",!,?10,"NAME",?40,"DEFICIENT AS OF",?70,"CLASS"
33 E D
34 .W ?68,Y,!?68,"PAGE: ",COUNT
35 .W !!,"TITLE",?40,"DEFICIENT",!?10,"NAME",?40,"AS OF",?54,"CLASS"
36 S SE1="",$P(SE1,"-",$S(PRSE132:133,1:81))="" W !,SE1
37 Q
38SUBHDR ;
39 Q:PRSEOUT
40 W !,"Service: "_$S(PRSESER=" BLANK":" ",1:PRSESER)
41 ; %Compliance = 100% - ( ( # of deficient persons in the service /
42 ; # of persons in the service ) * 100% )
43 ;# or persons in service=$P(^TMP("PRSE",$J,%,PRSESERV),U)
44 ;# of persons deficient as of date report run("TODAY")=$P(^(PRSESERV),U,2)
45 W ?50,"% Compliance: ",$J(COMPLIAN,3,0) I COMPLIAN=100,$G(PRSECLS)]"" W ?$X+3,PRSECLS
46 W !!
47 Q
Note: See TracBrowser for help on using the repository browser.