75 lines
2.6 KiB
Mathematica
75 lines
2.6 KiB
Mathematica
RAESR1 ;HISC/GJC-Exam Statistics Rpt ;1/20/95 09:36
|
|
;;5.0;Radiology/Nuclear Medicine;**48**;Mar 16, 1998
|
|
S (RAPGE,RATOT,RAXIT)=0,RARUNDT=$$FMTE^XLFDT($$DT^XLFDT(),1)
|
|
S $P(RALINE,"-",78)=""
|
|
I '$D(^TMP($J,"RASTAT","RALOC")) D G PURGE^RAESR2
|
|
. W @IOF,!!?5,"No exams registered for time period "
|
|
. W BEGDTX_" to "_ENDDTX_".",!
|
|
. Q
|
|
D @RARPT
|
|
I 'RAXIT D
|
|
. D DIVSYN^RAESR2
|
|
. Q
|
|
D PURGE^RAESR2
|
|
Q
|
|
1 ; Print Location Statistics
|
|
S RADNM=$O(^TMP($J,"RASTAT","RALOC",""))
|
|
S RAINM=$O(^TMP($J,"RASTAT","RALOC",RADNM,""))
|
|
S RALNM=$O(^TMP($J,"RASTAT","RALOC",RADNM,RAINM,""))
|
|
S T1=1 D HD^RAESR3 S RADNM=""
|
|
F S RADNM=$O(^TMP($J,"RASTAT","RALOC",RADNM)) Q:RADNM="" D Q:RAXIT
|
|
. S RAINM=""
|
|
. F S RAINM=$O(^TMP($J,"RASTAT","RALOC",RADNM,RAINM)) Q:RAINM="" D Q:RAXIT
|
|
.. S RALNM=""
|
|
.. F S RALNM=$O(^TMP($J,"RASTAT","RALOC",RADNM,RAINM,RALNM)) Q:RALNM="" D Q:RAXIT
|
|
... S RADAT=0
|
|
... F S RADAT=$O(^TMP($J,"RASTAT","RALOC",RADNM,RAINM,RALNM,RADAT)) Q:'RADAT D Q:RAXIT
|
|
.... S RASTAT=$G(^TMP($J,"RASTAT","RALOC",RADNM,RAINM,RALNM,RADAT))
|
|
.... S RADAT("X")=$$FMTE^XLFDT(RADAT,1) D PRT^RAESR3
|
|
.... Q
|
|
... D LOCCHK^RAESR2 Q:RAXIT
|
|
... Q
|
|
.. D IMGCHK^RAESR2 Q:RAXIT
|
|
.. Q
|
|
. D DIVCHK^RAESR2 Q:RAXIT
|
|
. Q
|
|
Q
|
|
2 ; Print Imaging Type Statistics
|
|
S RADNM=$O(^TMP($J,"RASTAT","RAIMG",""))
|
|
S RAINM=$O(^TMP($J,"RASTAT","RAIMG",RADNM,""))
|
|
S T1=2 D HD^RAESR3 S RADNM=""
|
|
F S RADNM=$O(^TMP($J,"RASTAT","RAIMG",RADNM)) Q:RADNM="" D Q:RAXIT
|
|
. S RAINM="" F S RAINM=$O(^TMP($J,"RASTAT","RAIMG",RADNM,RAINM)) Q:RAINM="" D Q:RAXIT
|
|
.. S RADAT=0 F S RADAT=$O(^TMP($J,"RASTAT","RAIMG",RADNM,RAINM,RADAT)) Q:'RADAT D Q:RAXIT
|
|
... S RASTAT=$G(^TMP($J,"RASTAT","RAIMG",RADNM,RAINM,RADAT))
|
|
... S RADAT("X")=$$FMTE^XLFDT(RADAT,1) D PRT^RAESR3
|
|
... Q
|
|
.. D IMGCHK^RAESR2 Q:RAXIT
|
|
.. Q
|
|
. D DIVCHK^RAESR2 Q:RAXIT
|
|
. Q
|
|
Q
|
|
3 ; Print Division Statistics
|
|
S RADNM=$O(^TMP($J,"RASTAT","RADIV","")),T1=3 D HD^RAESR3 S RADNM=""
|
|
F S RADNM=$O(^TMP($J,"RASTAT","RADIV",RADNM)) Q:RADNM="" D Q:RAXIT
|
|
. S RADAT=0
|
|
. F S RADAT=$O(^TMP($J,"RASTAT","RADIV",RADNM,RADAT)) Q:'RADAT D Q:RAXIT
|
|
.. S RASTAT=$G(^TMP($J,"RASTAT","RADIV",RADNM,RADAT))
|
|
.. S RADAT("X")=$$FMTE^XLFDT(RADAT,1) D PRT^RAESR3
|
|
.. Q
|
|
. I 'RAXIT D TOT^RAESR3 D
|
|
.. N RA1 S RA1=$O(^TMP($J,"RASTAT","RADIV",RADNM))
|
|
.. I RA1]"" N RADNM S RADNM=RA1,RAXIT=$$EOS^RAUTL5() D:'RAXIT HD^RAESR3
|
|
.. Q
|
|
. Q
|
|
Q
|
|
4 ; Print all Statistics
|
|
S RADAT=0,T1=4 D HD^RAESR3
|
|
F S RADAT=$O(^TMP($J,"RASTAT","RATOT",RADAT)) Q:'RADAT D Q:RAXIT
|
|
. S RASTAT=$G(^TMP($J,"RASTAT","RATOT",RADAT))
|
|
. S RADAT("X")=$$FMTE^XLFDT(RADAT,1) D PRT^RAESR3
|
|
. Q
|
|
I $Y>(IOSL-4) S RAXIT=$$EOS^RAUTL5() Q:RAXIT D HD^RAESR3
|
|
D TOT^RAESR3 ;Print total line
|
|
Q
|