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

QAOSPRS1.m

Go to the documentation of this file.
QAOSPRS1 ;HISC/DAD,JCW-REVIEW SUMMARY REPORT ;11/23/92  15:45
 ;;3.0;Occurrence Screen;;09/14/1993
 S X="T",%DT="" D ^%DT X ^DD("DD") S QAOTODAY=Y,QAOSQUIT=0
 K UNDL1,UNDL2 S $P(UNDL1,"-",133)="",$P(UNDL2,"=",133)=""
 F QAOSTYPE(0)=1:1:$L(QAOSLIST) Q:QAOSQUIT  S QAOSTYPE=$E(QAOSLIST,QAOSTYPE(0)) D LOOP,PAUSE:($E(IOST)="C")&('QAOSQUIT)
 Q
LOOP ;
 S QAOSPAGE=1 D HEAD
OCCR ;
 S X="TOTAL NUMBER OF OCCURRENCES: "_QAOTOTAL("OCCR",QAOSTYPE)
 W !!,X,!,$E(UNDL2,1,$L(X)),!
 W !," 1 - TOTAL RECORDS",?67,$J(QAOTOTAL("RECR",QAOSTYPE),3,0)
 W !," 2 - EXCEPTIONS",?67,$J(QAOTOTAL("EXCP",QAOSTYPE),3,0)
 W !," 3 - DELETIONS",?67,$J(QAOTOTAL("DELT",QAOSTYPE),3,0)
 S X="SEVERITY OF OUTCOME: "_QAOTOTAL("SEVR",QAOSTYPE)
 W !!,X,!,$E(UNDL2,1,$L(X)),!
 F QAOSSEVR=-1:0 S QAOSSEVR=$O(^TMP($J,QAOSTYPE,"SEVR",QAOSSEVR)) Q:QAOSSEVR=""!QAOSQUIT  D
 . S QAOSNUM=^TMP($J,QAOSTYPE,"SEVR",QAOSSEVR)
 . S QAOSIEN=+$O(^QA(741.8,"B",QAOSSEVR,0))
 . S QAOSTEXT=$P($G(^QA(741.8,QAOSIEN,0)),"^",2)
 . W !,$J(QAOSSEVR,2)," - ",QAOSTEXT,?67,$J(QAOSNUM,3,0)
 . I $Y>(IOSL-4) D PAUSE:$E(IOST)="C",HEAD:'QAOSQUIT
 . Q
 W !!,UNDL1
CLIN ;
 S X="CLINICAL REVIEWS: "_QAOTOTAL("CLIN",QAOSTYPE)
 W !!,X,!,$E(UNDL2,1,$L(X)),!
 F QAOSFIND=0:0 S QAOSFIND=$O(^TMP($J,QAOSTYPE,"CLIN",QAOSFIND)) Q:QAOSFIND'>0!QAOSQUIT  D
 . S QAOSIEN=+$O(^QA(741.6,"B",QAOSFIND,0))
 . S QAOSTEXT=$P($G(^QA(741.6,QAOSIEN,0)),"^",2)
 . S QAOSNUM=^TMP($J,QAOSTYPE,"CLIN",QAOSFIND)
 . W !,$J(QAOSFIND,2)," - ",QAOSTEXT,?67,$J(QAOSNUM,3,0)
 . I $Y>(IOSL-6) D PAUSE:$E(IOST)="C",HEAD:'QAOSQUIT
 . Q
 Q:QAOSQUIT  W !!,UNDL1
PEER ;
 S X="PEER REVIEWS: "_QAOTOTAL("PEER",QAOSTYPE)
 W !!,X,!,$E(UNDL2,1,$L(X)) D SRVHDR
 F QAOSFIND=0:0 S QAOSFIND=$O(^TMP($J,QAOSTYPE,"PEER",QAOSFIND)) Q:QAOSFIND'>0!QAOSQUIT  D
 . S QAOSIEN=+$O(^QA(741.6,"B",QAOSFIND,0))
 . S QAOSTEXT=$P($G(^QA(741.6,QAOSIEN,0)),"^",2)
 . S QAOSNUM=^TMP($J,QAOSTYPE,"PEER",QAOSFIND)
 . W !,$J(QAOSFIND,2)," - ",QAOSTEXT S TAB=67,TOT=0
 . F QA=1:1:12 S X=$P(QAOSNUM,"^",QA) W ?TAB,$J(X,3,0) S TOT=TOT+X,TAB=TAB+5
 . W ?TAB,$J(TOT,5,0)
 . I $Y>(IOSL-6) D PAUSE:$E(IOST)="C",HEAD:'QAOSQUIT
 . Q
 Q:QAOSQUIT  W !!,UNDL1
MGMT ;
 S X="MANAGEMENT REVIEWS: "_QAOTOTAL("MGMT",QAOSTYPE)
 W !!,X,!,$E(UNDL2,1,$L(X)) D SRVHDR
 F QAOSACTN=0:0 S QAOSACTN=$O(^TMP($J,QAOSTYPE,"MGMT",QAOSACTN)) Q:QAOSACTN'>0!QAOSQUIT  D
 . S QAOSIEN=+$O(^QA(741.7,"B",QAOSACTN,0))
 . S QAOSTEXT=$P($G(^QA(741.7,QAOSIEN,0)),"^",3)
 . S QAOSNUM=^TMP($J,QAOSTYPE,"MGMT",QAOSACTN)
 . W !,$J(QAOSACTN,2)," - ",QAOSTEXT S TAB=67,TOT=0
 . F QA=1:1:12 S X=$P(QAOSNUM,"^",QA) W ?TAB,$J(X,3,0) S TOT=TOT+X,TAB=TAB+5
 . W ?TAB,$J(TOT,5,0)
 . I $Y>(IOSL-6) D PAUSE:$E(IOST)="C",HEAD:'QAOSQUIT
 . Q
 Q:QAOSQUIT  W !!,UNDL1
CMTE ;
 S X="COMMITTEE REVIEWS: "_QAOTOTAL("CMTE",QAOSTYPE)
 W !!,X,!,$E(UNDL2,1,$L(X)),!
 S QAOSDD=$P(^DD(741.017,4,0),"^",3) F QA=1:1:$L(QAOSDD,";")-1 S X=$P(QAOSDD,";",QA),QAOSDD($P(X,":"))=$P(X,":",2)
 F QAOSCONF=0:0 S QAOSCONF=$O(^TMP($J,QAOSTYPE,"CMTE",QAOSCONF)) Q:QAOSCONF'>0!QAOSQUIT  D
 . S QAOSNUM=^TMP($J,QAOSTYPE,"CMTE",QAOSCONF)
 . W !,$J(QAOSCONF,2)," - ",QAOSDD(QAOSCONF),?67,$J(QAOSNUM,3,0)
 . I $Y>(IOSL-6) D PAUSE:$E(IOST)="C",HEAD:'QAOSQUIT
 . Q
 W:'QAOSQUIT !!,UNDL2
 Q
 S X="OCCURRENCE SCREEN STATISTICAL REVIEW SUMMARY: "_$S(QAOSTYPE="N":"NATIONAL",QAOSTYPE="L":"LOCAL",1:"INACTIVE")_" SCREENS"
 W:(QAOSPAGE>1)!($E(IOST)="C") @IOF
 W !?(132-$L(X)/2),X,?120,QAOTODAY
 W !?(132-$L(QAQ2HED)/2),QAQ2HED,?120,"PAGE: ",QAOSPAGE,!!,UNDL2
 S QAOSPAGE=QAOSPAGE+1
 Q
SRVHDR ;
 W ?66,"BLIND",?73,"DOM",?80,"MEDICINE",?92,"NHCU",?97,"NON",?102,"PSYCH",?113,"SCI",?121,"UNKNOWN"
 W !?66,"REHAB",?75,"INTERMED",?85,"NEUROLOGY",?97,"COUNT",?105,"REHAB-MED",?116,"SURGERY",?127,"TOTAL"
 Q
PAUSE ;
 K DIR S DIR(0)="E" D ^DIR S QAOSQUIT=$S(Y'>0:1,1:0)
 Q