source: WorldVistAEHR/trunk/r/RADIOLOGY_NUCLEAR_MEDICINE-RA/RAWKL3.m@ 1154

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

initial load of WorldVistAEHR

File size: 2.9 KB
Line 
1RAWKL3 ;HISC/FPT-Workload Reports (cont.) ;9/23/96 08:44
2 ;;5.0;Radiology/Nuclear Medicine;;Mar 16, 1998
3DIVTOT ; print division totals
4 Q:RAITCNT(RADIV)=1 ;quit if only one imaging type selected for division
5 K ^TMP($J,"RADIVFLD")
6 D DIVHDR Q:$D(RAEOS)
7 S RATMPNDE=^TMP($J,"RA",RADIV),RAITTEXM=$P(RATMPNDE,U,1)+$P(RATMPNDE,U,2),RAITTWWU=$P(RATMPNDE,U,3)
8 S RAITHLD="",(RADIN,RADOUT,RADTOT,RADWWU)=0
9 F S RAITHLD=$O(^TMP($J,"RA",RADIV,RAITHLD)) Q:RAITHLD="" S RAITFLD="" F S RAITFLD=$O(^TMP($J,"RA",RADIV,RAITHLD,RAITFLD)) Q:RAITFLD="" D
10 .S RAITIN=$P(^TMP($J,"RA",RADIV,RAITHLD,RAITFLD),U,1)
11 .S RAITOUT=$P(^TMP($J,"RA",RADIV,RAITHLD,RAITFLD),U,2)
12 .S RAITWWU=$P(^TMP($J,"RA",RADIV,RAITHLD,RAITFLD),U,3)
13 .S:'$D(^TMP($J,"RADIVFLD",RAITFLD)) ^TMP($J,"RADIVFLD",RAITFLD)="0^0^0"
14 .S $P(^TMP($J,"RADIVFLD",RAITFLD),U,1)=$P(^TMP($J,"RADIVFLD",RAITFLD),U,1)+RAITIN
15 .S $P(^TMP($J,"RADIVFLD",RAITFLD),U,2)=$P(^TMP($J,"RADIVFLD",RAITFLD),U,2)+RAITOUT
16 .S $P(^TMP($J,"RADIVFLD",RAITFLD),U,3)=$P(^TMP($J,"RADIVFLD",RAITFLD),U,3)+RAITWWU
17 .S RAITTOT=RAITIN+RAITOUT
18 .S RADIN=RADIN+RAITIN,RADOUT=RADOUT+RAITOUT,RADTOT=RADTOT+RAITTOT,RADWWU=RADWWU+RAITWWU
19 S RAITFLD=""
20 F S RAITFLD=$O(^TMP($J,"RADIVFLD",RAITFLD)) Q:RAITFLD=""!($D(RAEOS)) D
21 .S RAITIN=$P(^TMP($J,"RADIVFLD",RAITFLD),U,1)
22 .S RAITOUT=$P(^TMP($J,"RADIVFLD",RAITFLD),U,2)
23 .S RAITWWU=$P(^TMP($J,"RADIVFLD",RAITFLD),U,3)
24 .S RAITTOT=RAITIN+RAITOUT
25 .W !?2,RAITFLD,?40,$J(RAITIN,5),?47,$J(RAITOUT,5),?54,$J(RAITTOT,5),?61,$J($S(RAITTEXM:(RAITTOT*100)/RAITTEXM,1:0),5,1) W:$D(RAFL) ?68,$J(RAITWWU,5),?75,$J($S(RAITTWWU:(RAITWWU*100)/RAITTWWU,1:0),5,1)
26 .I ($Y+4)>IOSL D EOS^RAWKL2 Q:$D(RAEOS) D DIVHDR
27 Q:$D(RAEOS)
28 W !,RA80DASH,!!?2,"Division Total",?40,$J(RADIN,5),?47,$J(RADOUT,5),?54,$J(RADTOT,5) W:$D(RAFL) ?68,$J(RADWWU,5)
29 I ($Y+(RAITCNT(RADIV)\2)+3)>IOSL D EOS^RAWKL2 Q:$D(RAEOS) D DIVHDR
30 Q:$D(RAEOS) W !!?2,"Imaging Type(s): "
31 S RAITHLD=""
32 F S RAITHLD=$O(^TMP($J,"RA",RADIV,RAITHLD)) Q:RAITHLD=""!($D(RAEOS)) W:$X>(80-25) !?($X+$L("Imaging Type(s):")+3) D
33 .I ($Y+4)>IOSL D EOS^RAWKL2 Q:$D(RAEOS) D DIVHDR Q:$D(RAEOS) W !?19
34 .W $S($D(^RA(79.2,+$P(RAITHLD,"-",2),0)):$P(^(0),U,1),1:"UNKNOWN"),?($X+3)
35 Q:$D(RAEOS)
36 W !!?3,"# of "_RATITLE_"s selected: "_$S(RAINPUT=1:"ALL",1:$G(RAFLDCNT))
37 K ^TMP($J,"RADIVFLD"),RADIN,RADOUT,RADTOT,RADWWU,RAITFLD,RAITHLD,RAITIN,RAITOUT,RAITTEXM,RAITTOT,RAITWWU,RAITTWWU,RATMPNDE
38 I $O(^TMP($J,"RA",RADIV))]"" D EOS^RAWKL2
39 Q
40DIVHDR ; division totals header
41 W:$Y>0 @IOF W !?10,">>> ",RATITLE," Workload Report <<<" S PAGE=PAGE+1 W ?70,"Page: ",PAGE
42 W !!,?4,"Division: ",$S($D(^DIC(4,+RADIV,0)):$P(^(0),U,1),1:"UNKNOWN"),?52,"For period: ",?64,BEGDATE,?76,"to"
43 W !?4,"Run Date: ",RARUNDTE,?64,ENDDATE
44 W !!?45,"Examinations",?61,"Percent" W:$D(RAFL) ?73,"Percent"
45 W !?2,RATITLE,?40," In",?47," Out",?54,"Total",?61," Exams" W:$D(RAFL) ?67," WWU",?73," WWU"
46 W !,RA80DASH
47 W !?10,"(Division Summary)"
48 I $D(ZTQUEUED) D STOPCHK^RAUTL9 S:$G(ZTSTOP)=1 RAEOS=""
49 Q
Note: See TracBrowser for help on using the repository browser.