source: FOIAVistA/trunk/r/RADIOLOGY_NUCLEAR_MEDICINE-RA/RAWKL2.m@ 1582

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

initial load of FOIAVistA 6/30/08 version

File size: 4.9 KB
Line 
1RAWKL2 ;HISC/FPT-Workload Reports (cont.) ;12/27/00 11:29
2 ;;5.0;Radiology/Nuclear Medicine;**26**;Mar 16, 1998
3 ; print report
4 S PAGE=0,RADIV=""
5 F S RADIV=$O(^TMP($J,"RA",RADIV)) Q:RADIV=""!($D(RAEOS)) S RAITYPE="" F S RAITYPE=$O(^TMP($J,"RA",RADIV,RAITYPE)) Q:RAITYPE=""!($D(RAEOS)) S RAZ=^(RAITYPE) D START
6Q ; kill variables, close device
7 K ^TMP($J),A,A1,B,B1,BEGDATE,C,ENDDATE,I,IN,J,OUT,PAGE,POP,RA80DASH,RABEG,RACNI,RACPT,RACRT,RAD0,RADFN,RADIV,RADIVNME,RADTE,RADTI,RAEND,RAEOS,RAFILE,RAFL,RAFL1,RAFL3,RAFLD,RAFLDCNT,RAI,RAIN,RAINPUT,RAMIS,RAITCNT,RAITYPE
8 K RAMUL,RANUM,RAOR,RAOUT,RAP0,RAPCE,RAPIFN,RAPOP,RAPORT,RAPRC,RAPRI,RAQI,RAQUIT,RARUNDTE,RASUM,RATITLE,RATOT,RASTAT,RASV,RATCI,RAWT,RAWWU,RAXIT,RAZ,TOT
9 K %DT,DIROUT,DIRUT,DTOUT,DUOUT,RAMES,RACMLIST
10 K WWU,X,Y,Z,ZTDESC,ZTRTN,ZTSAVE,ZZ,ZZZ
11 K:$D(RAPSTX) RACCESS,RAPSTX
12 W ! D CLOSE^RAUTL K POP
13 Q
14START ;
15 D:$D(RAFL1) RAFLD Q:$D(RAEOS)
16 S RASUM="",Z=RAZ,ZZ=")",ZZZ="RAFLD"
17 D HD Q:$D(RAEOS)
18 D PRT Q:$D(RAEOS)
19 D TOT K RASUM Q:$D(RAEOS)
20 I $O(^TMP($J,"RA",RADIV,RAITYPE))="" D DIVTOT^RAWKL3
21 Q
22RAFLD S RAFLD="" F J=0:0 S RAFLD=$O(^TMP($J,"RA",RADIV,RAITYPE,RAFLD)) Q:RAFLD=""!($D(RAEOS)) S Z=^(RAFLD) D HD Q:$D(RAEOS) D RAMIS
23 Q
24RAMIS ;
25 S RAMIS=0
26 F S RAMIS=$O(^TMP($J,"RA",RADIV,RAITYPE,RAFLD,RAMIS)) D:RAMIS'>0 TOT Q:RAMIS'>0!($D(RAEOS)) S ZZ=",RAMIS,RAPRC)",ZZZ="RAPRC" D:RAMIS<25!(RAMIS=99)!(RAMIS=27) PRT
27 Q
28PRT ;
29 I ($Y+4)>IOSL D EOS Q:$D(RAEOS) D HD Q:$D(RAEOS)
30 S IN=$P(Z,"^"),OUT=$P(Z,"^",2),TOT=IN+OUT,WWU=$P(Z,"^",3),@ZZZ=""
31 F I=0:0 S @ZZZ=$O(@("^TMP($J,""RA"",RADIV,RAITYPE,RAFLD"_ZZ)) Q:@ZZZ=""!($D(RAEOS)) S Y=^(@ZZZ),RAIN=$P(Y,"^"),RAOUT=$P(Y,"^",2),RAWWU=$P(Y,"^",3),RATOT=RAIN+RAOUT D PRT1
32 Q
33TOT ;
34 W !,RA80DASH
35 I '$G(RACMLIST) W !!?2,$S($D(RASUM):"Imaging Type",1:RATITLE)," Total",?40,$J(IN,5),?47,$J(OUT,5),?54,$J(TOT,5) W:$D(RAFL) ?68,$J(WWU,5)
36 I $G(RACMLIST),'$D(RASUM) W !!?2,RATITLE," Total",?50,$J(IN,5),?57,$J(OUT,5),?64,$J(TOT,5)
37 I $G(RACMLIST),$D(RASUM) W !!?2,"Imaging Type"," Total",?40,$J(IN,5),?47,$J(OUT,5),?54,$J(TOT,5) W:$D(RAFL) ?68,$J(WWU,5)
38 I ($Y+4)>IOSL D EOS Q:$D(RAEOS) Q:'$D(RASUM) D HD Q:$D(RAEOS)
39 I $D(RASUM),'RAPCE D
40 .I TOT>0 D Q
41 ..W !!!?2,"NOTE: Since a procedure can be performed by more than one technologist,",!?8,"the total number of exams and weighted work units by division and",!?8,"imaging type is likely to be higher than the other workload reports."
42 ..Q
43 I $D(RASUM)&(RAPCE=12!(RAPCE=15)) D
44 .I TOT>0 D Q
45 ..W:RAPRIM=0 !!!?2,"NOTE: Since a procedure can be performed by more than one Interpreting ",!?8,$S(RAPCE=12:"Resident",1:"Staff"),", the total number of exams by division and imaging type"
46 ..W:RAPRIM=0 !?8,"is likely to be higher than the other workload reports."
47 ..W:RAPRIM=0 !?8,"Both Primary and Secondary Interpreting "_$P(RATITLE," ",2)_" are included in",!?8,"this report."
48 ..W:RAPRIM=1 !!?2,"NOTE: Only Primary Interpreting "_$S($P(RATITLE," ",2)="Resident":"Residents",1:"Staff")_" are included in this report."
49 ..Q
50 .Q
51 I ($Y+4)>IOSL D EOS Q:$D(RAEOS) D HD Q:$D(RAEOS)
52 I $D(RASUM),($P(RATITLE," ")'="Interpreting") W !!?3,"# of "_RATITLE_"s selected: "_$S(RAINPUT=1:"ALL",1:$G(RAFLDCNT))
53 I $D(RASUM),($P(RATITLE," ")="Interpreting") D
54 . W !!?3,"# of "_$S($G(RAPRIM)=1:"Primary ",1:"")_$S($P(RATITLE," ",2)="Resident":"Residents",1:"Staff")_" selected: "_$S(RAINPUT=1:"ALL",1:$G(RAFLDCNT))
55 . Q
56 I $D(RASUM),$O(^TMP($J,"RA",RADIV))="",RAITCNT(RADIV)=1 Q
57 D EOS
58 Q
59PRT1 ;
60 I ($Y+4)>IOSL D EOS Q:$D(RAEOS) D HD Q:$D(RAEOS)
61 W:'$G(RACMLIST) !,@ZZZ,?40,$J(RAIN,5),?47,$J(RAOUT,5),?54,$J(RATOT,5),?61,$J($S(TOT:(100*RATOT)/TOT,1:0),5,1) W:$D(RAFL) ?68,$J(RAWWU,5),?75,$J($S(WWU:(RAWWU*100)/WWU,1:0),5,1)
62 I $G(RACMLIST),'$D(RASUM) W !,@ZZZ,?50,$J(RAIN,5),?57,$J(RAOUT,5),?64,$J(RATOT,5),?71,$J($S(TOT:(100*RATOT)/TOT,1:0),5,1)
63 I $G(RACMLIST),$D(RASUM) W !,@ZZZ,?40,$J(RAIN,5),?47,$J(RAOUT,5),?54,$J(RATOT,5),?61,$J($S(TOT:(100*RATOT)/TOT,1:0),5,1)
64 Q
65HD ; header
66 W:$Y>0 @IOF W !?10,">>> ",RATITLE," Workload Report <<<" S PAGE=PAGE+1 W ?70,"Page: ",PAGE
67 W !!?4,"Division: ",$S($D(^DIC(4,+RADIV,0)):$P(^(0),U,1),1:"UNKNOWN"),!,"Imaging Type: ",$S($D(^RA(79.2,+$P(RAITYPE,"-",2),0)):$P(^(0),U,1),1:"UNKNOWN"),?52,"For period: ",?64,BEGDATE,?76,"to"
68 W !?4,"Run Date: ",RARUNDTE,?64,ENDDATE
69 W:'$G(RACMLIST) !!?45,"Examinations",?61,"Percent" W:$D(RAFL) ?73,"Percent"
70 I $G(RACMLIST),'$D(RASUM) W !!?55,"Examinations",?71,"Percent"
71 I $G(RACMLIST),$D(RASUM) W !!?45,"Examinations",?61,"Percent"
72 W:'$G(RACMLIST) !?2,$S('$D(RASUM):"Procedure (CPT)",1:RATITLE),?40," In",?47," Out",?54,"Total",?61," Exams" W:$D(RAFL) ?67," WWU",?73," WWU"
73 I $G(RACMLIST),'$D(RASUM) W !?2,"Procedure (CPT) (* : > 3 CPT mods)",?50," In",?57," Out",?64,"Total",?71," Exams"
74 I $G(RACMLIST),$D(RASUM) W !?2,RATITLE,?40," In",?47," Out",?54,"Total",?61," Exams"
75 W !,RA80DASH
76 W:'$D(RASUM) !?10,RATITLE,": ",RAFLD
77 W:$D(RASUM) !,?10,"(Imaging Type Summary)"
78 I $D(ZTQUEUED) D STOPCHK^RAUTL9 S:$G(ZTSTOP)=1 RAEOS=1
79 Q
80EOS ; end of screen
81 S X=$$EOS^RAUTL5()
82 S:X=1 RAEOS=""
83 Q
Note: See TracBrowser for help on using the repository browser.