source: WorldVistAEHR/trunk/r/OCCURRENCE_SCREEN-QAO/QAOSPRS1.m@ 1076

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

initial load of WorldVistAEHR

File size: 3.7 KB
Line 
1QAOSPRS1 ;HISC/DAD,JCW-REVIEW SUMMARY REPORT ;11/23/92 15:45
2 ;;3.0;Occurrence Screen;;09/14/1993
3 S X="T",%DT="" D ^%DT X ^DD("DD") S QAOTODAY=Y,QAOSQUIT=0
4 K UNDL1,UNDL2 S $P(UNDL1,"-",133)="",$P(UNDL2,"=",133)=""
5 F QAOSTYPE(0)=1:1:$L(QAOSLIST) Q:QAOSQUIT S QAOSTYPE=$E(QAOSLIST,QAOSTYPE(0)) D LOOP,PAUSE:($E(IOST)="C")&('QAOSQUIT)
6 Q
7LOOP ;
8 S QAOSPAGE=1 D HEAD
9OCCR ;
10 S X="TOTAL NUMBER OF OCCURRENCES: "_QAOTOTAL("OCCR",QAOSTYPE)
11 W !!,X,!,$E(UNDL2,1,$L(X)),!
12 W !," 1 - TOTAL RECORDS",?67,$J(QAOTOTAL("RECR",QAOSTYPE),3,0)
13 W !," 2 - EXCEPTIONS",?67,$J(QAOTOTAL("EXCP",QAOSTYPE),3,0)
14 W !," 3 - DELETIONS",?67,$J(QAOTOTAL("DELT",QAOSTYPE),3,0)
15 S X="SEVERITY OF OUTCOME: "_QAOTOTAL("SEVR",QAOSTYPE)
16 W !!,X,!,$E(UNDL2,1,$L(X)),!
17 F QAOSSEVR=-1:0 S QAOSSEVR=$O(^TMP($J,QAOSTYPE,"SEVR",QAOSSEVR)) Q:QAOSSEVR=""!QAOSQUIT D
18 . S QAOSNUM=^TMP($J,QAOSTYPE,"SEVR",QAOSSEVR)
19 . S QAOSIEN=+$O(^QA(741.8,"B",QAOSSEVR,0))
20 . S QAOSTEXT=$P($G(^QA(741.8,QAOSIEN,0)),"^",2)
21 . W !,$J(QAOSSEVR,2)," - ",QAOSTEXT,?67,$J(QAOSNUM,3,0)
22 . I $Y>(IOSL-4) D PAUSE:$E(IOST)="C",HEAD:'QAOSQUIT
23 . Q
24 W !!,UNDL1
25CLIN ;
26 S X="CLINICAL REVIEWS: "_QAOTOTAL("CLIN",QAOSTYPE)
27 W !!,X,!,$E(UNDL2,1,$L(X)),!
28 F QAOSFIND=0:0 S QAOSFIND=$O(^TMP($J,QAOSTYPE,"CLIN",QAOSFIND)) Q:QAOSFIND'>0!QAOSQUIT D
29 . S QAOSIEN=+$O(^QA(741.6,"B",QAOSFIND,0))
30 . S QAOSTEXT=$P($G(^QA(741.6,QAOSIEN,0)),"^",2)
31 . S QAOSNUM=^TMP($J,QAOSTYPE,"CLIN",QAOSFIND)
32 . W !,$J(QAOSFIND,2)," - ",QAOSTEXT,?67,$J(QAOSNUM,3,0)
33 . I $Y>(IOSL-6) D PAUSE:$E(IOST)="C",HEAD:'QAOSQUIT
34 . Q
35 Q:QAOSQUIT W !!,UNDL1
36PEER ;
37 S X="PEER REVIEWS: "_QAOTOTAL("PEER",QAOSTYPE)
38 W !!,X,!,$E(UNDL2,1,$L(X)) D SRVHDR
39 F QAOSFIND=0:0 S QAOSFIND=$O(^TMP($J,QAOSTYPE,"PEER",QAOSFIND)) Q:QAOSFIND'>0!QAOSQUIT D
40 . S QAOSIEN=+$O(^QA(741.6,"B",QAOSFIND,0))
41 . S QAOSTEXT=$P($G(^QA(741.6,QAOSIEN,0)),"^",2)
42 . S QAOSNUM=^TMP($J,QAOSTYPE,"PEER",QAOSFIND)
43 . W !,$J(QAOSFIND,2)," - ",QAOSTEXT S TAB=67,TOT=0
44 . F QA=1:1:12 S X=$P(QAOSNUM,"^",QA) W ?TAB,$J(X,3,0) S TOT=TOT+X,TAB=TAB+5
45 . W ?TAB,$J(TOT,5,0)
46 . I $Y>(IOSL-6) D PAUSE:$E(IOST)="C",HEAD:'QAOSQUIT
47 . Q
48 Q:QAOSQUIT W !!,UNDL1
49MGMT ;
50 S X="MANAGEMENT REVIEWS: "_QAOTOTAL("MGMT",QAOSTYPE)
51 W !!,X,!,$E(UNDL2,1,$L(X)) D SRVHDR
52 F QAOSACTN=0:0 S QAOSACTN=$O(^TMP($J,QAOSTYPE,"MGMT",QAOSACTN)) Q:QAOSACTN'>0!QAOSQUIT D
53 . S QAOSIEN=+$O(^QA(741.7,"B",QAOSACTN,0))
54 . S QAOSTEXT=$P($G(^QA(741.7,QAOSIEN,0)),"^",3)
55 . S QAOSNUM=^TMP($J,QAOSTYPE,"MGMT",QAOSACTN)
56 . W !,$J(QAOSACTN,2)," - ",QAOSTEXT S TAB=67,TOT=0
57 . F QA=1:1:12 S X=$P(QAOSNUM,"^",QA) W ?TAB,$J(X,3,0) S TOT=TOT+X,TAB=TAB+5
58 . W ?TAB,$J(TOT,5,0)
59 . I $Y>(IOSL-6) D PAUSE:$E(IOST)="C",HEAD:'QAOSQUIT
60 . Q
61 Q:QAOSQUIT W !!,UNDL1
62CMTE ;
63 S X="COMMITTEE REVIEWS: "_QAOTOTAL("CMTE",QAOSTYPE)
64 W !!,X,!,$E(UNDL2,1,$L(X)),!
65 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)
66 F QAOSCONF=0:0 S QAOSCONF=$O(^TMP($J,QAOSTYPE,"CMTE",QAOSCONF)) Q:QAOSCONF'>0!QAOSQUIT D
67 . S QAOSNUM=^TMP($J,QAOSTYPE,"CMTE",QAOSCONF)
68 . W !,$J(QAOSCONF,2)," - ",QAOSDD(QAOSCONF),?67,$J(QAOSNUM,3,0)
69 . I $Y>(IOSL-6) D PAUSE:$E(IOST)="C",HEAD:'QAOSQUIT
70 . Q
71 W:'QAOSQUIT !!,UNDL2
72 Q
73HEAD ;
74 S X="OCCURRENCE SCREEN STATISTICAL REVIEW SUMMARY: "_$S(QAOSTYPE="N":"NATIONAL",QAOSTYPE="L":"LOCAL",1:"INACTIVE")_" SCREENS"
75 W:(QAOSPAGE>1)!($E(IOST)="C") @IOF
76 W !?(132-$L(X)/2),X,?120,QAOTODAY
77 W !?(132-$L(QAQ2HED)/2),QAQ2HED,?120,"PAGE: ",QAOSPAGE,!!,UNDL2
78 S QAOSPAGE=QAOSPAGE+1
79 Q
80SRVHDR ;
81 W ?66,"BLIND",?73,"DOM",?80,"MEDICINE",?92,"NHCU",?97,"NON",?102,"PSYCH",?113,"SCI",?121,"UNKNOWN"
82 W !?66,"REHAB",?75,"INTERMED",?85,"NEUROLOGY",?97,"COUNT",?105,"REHAB-MED",?116,"SURGERY",?127,"TOTAL"
83 Q
84PAUSE ;
85 K DIR S DIR(0)="E" D ^DIR S QAOSQUIT=$S(Y'>0:1,1:0)
86 Q
Note: See TracBrowser for help on using the repository browser.