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

RAESR1.m

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