source: WorldVistAEHR/trunk/r/SURGERY-SR/SROQ1.m@ 1259

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

initial load of WorldVistAEHR

File size: 6.5 KB
RevLine 
[613]1SROQ1 ;BIR/ADM - QUARTERLY REPORT (CONTINUED) ;07/18/07
2 ;;3.0; Surgery ;**38,62,70,50,95,123,126,129,153,163**;24 Jun 93;Build 2
3 ;** NOTICE: This routine is part of an implementation of a nationally
4 ;** controlled procedure. Local modifications to this routine
5 ;** are prohibited.
6 ;
7 Q:SRSOUT U IO S (SRHDR,SRPAGE)=0 D HDR^SROQ0 Q:SRSOUT
8TOT W !!,?35,"Total Cases",?55,"% of Total",!,?35,"-----------",?55,"----------"
9 W !,?5,"Surgical Cases",?37,$J(SRCASES,6) W:SRCASES ?57,"100.0" S SRALL=SRCASES I 'SRALL S SRALL=1
10 W !,?5,"Major Procedures",?37,$J(SRMAJOR,6),?57,$J(((SRMAJOR/SRALL)*100),5,1) S SRMAJ=SRMAJOR I 'SRMAJOR S SRMAJ=1
11ASA F I=1:1:6 W !,?9,"ASA Class ("_I_")",?37,$J(SRASA(I),6),?57,$J(((SRASA(I)/SRMAJ)*100),5,1)
12 I SRASA(7) W !,?9,"ASA Class (Not Entered)",?37,$J(SRASA(7),6),?57,$J(((SRASA(7)/SRMAJ)*100),5,1)
13 W !,?5,"Postoperative Deaths",?37,$J(SRMORT,6),?57,$J(((SRMORT/SRALL)*100),5,1),!,?9,"Ambulatory: "_SROPD
14 W !,?5,"Postoperative Occurrences",?37,$J(SRCOMP,6),?57,$J(((SRCOMP/SRALL)*100),5,1)
15 W !,?5,"Ambulatory Procedures",?37,$J((SRCASES-SRINPAT),6),?57,$J((((SRCASES-SRINPAT)/SRALL)*100),5,1)
16 W !,?9,"Admitted Within 14 Days: "_SRADMT
17 W !,?9,"Invasive Diagnostic: "_SRINV("O")
18 W !,?5,"Inpatient Procedures",?37,$J(SRINPAT,6),?57,$J(((SRINPAT/SRALL)*100),5,1)
19 W !,?5,"Emergency Procedures",?37,$J(SREMERG,6),?57,$J(((SREMERG/SRALL)*100),5,1)
20 W !,?5,"Age>60 Years",?37,$J(SR60,6),?57,$J(((SR60/SRALL)*100),5,1)
21SP D:$E(IOST,1,2)="C-" HDR^SROQ0 Q:SRSOUT W:$E(IOST,1,2)'="C-" !
22 W !!,?30,"SPECIALTY PROCEDURES",!,?30,"--------------------",!,?66,"---DEATHS---"
23 W !,?27,"PATIENTS CASES MAJOR MINOR TOTAL %"
24 W !,?27,"-------- ----- ----- ----- ----- ----"
25SRSS ; print data for each specialty
26 S SRPTF=48,SRSP="CARDIAC SURGERY" D SPOUT
27 S SRPTF=49,SRSP="TRANSPLANTATION" D SPOUT
28 S SRPTF=50,SRSP="GENERAL SURGERY" D SPOUT
29 S SRPTF=51,SRSP="OB/GYN" D SPOUT
30 S SRPTF=52,SRSP="NEUROSURGERY" D SPOUT
31 S SRPTF=53,SRSP="OPHTHALMOLOGY" D SPOUT
32 S SRPTF=54,SRSP="ORTHOPEDICS" D SPOUT
33 S SRPTF=55,SRSP="EAR, NOSE, THROAT (ENT)" D SPOUT
34 S SRPTF=56,SRSP="PLASTIC SURGERY" D SPOUT
35 S SRPTF=57,SRSP="PROCTOLOGY" D SPOUT
36 S SRPTF=58,SRSP="THORACIC SURGERY" D SPOUT
37 S SRPTF=59,SRSP="UROLOGY" D SPOUT
38 S SRPTF=60,SRSP="ORAL SURGERY" D SPOUT
39 S SRPTF=61,SRSP="PODIATRY" D SPOUT
40 S SRPTF=62,SRSP="PERIPHERAL VASCULAR" D SPOUT
41 S SRPTF=78,SRSP="ANESTHESIOLOGY" D SPOUT
42 I +^TMP("SRSS",$J,"ZZ") S SRPTF="ZZ",SRSP="SPECIALTY NOT ENTERED" D SPOUT
43RES ; resident supervision
44 I $E(IOST,1,2)="C-" D HDR^SROQ0 Q:SRSOUT
45 W !!!,?24,"LEVEL OF RESIDENT SUPERVISION (%)",!,?24,"---------------------------------",!,?42,"MAJOR MINOR"
46 S SRIX=SRCASES-SRMAJOR,SRMAJ=SRMAJOR S:'SRIX SRIX=1 S:'SRMAJ SRMAJ=1
47 S I=0 F S I=$O(SRATT("J",I)) Q:'I D
48 .S SRL=$S(I=9:"A",I=10:"B",I=11:"C",I=12:"D",I=13:"E",I=14:"F",I=1:"0 (Old)",I=2:"1 (Old)",I=3:"2 (Old)",I=4:"3 (Old)",I=5:"0",I=6:"1",I=7:"2",I=8:"3",1:"Not Entered")
49 .W !,?24,"Level ",SRL,?42,$J(((SRATT("J",I)/SRMAJ)*100),5,1),?52,$J(((SRATT("N",I)/SRIX)*100),5,1)
50NDEX ; print data for index procedures
51 D HDR^SROQ0 Q:SRSOUT
52 W !!,?32,"INDEX PROCEDURES",!,?32,"----------------"
53 W !,?54,"CASES WITH",!,?30,"CASES DEATHS OCCURRENCES"
54 W !,?30,"----- ------- -----------"
55 F J=1:1:12 D IX
56 D ^SROQ1A
57ENSURE ; ensuring correct surgery compliance
58 D HDR^SROQ0 Q:SRSOUT
59 W !!,?17,"ENSURING CORRECT SURGERY - COMPLIANCE SUMMARY",!,?17,"---------------------------------------------"
60 W !!,?42,"CASES % OF TOTAL",!,?42,"----- ----------"
61 W !,?18,"TOTAL CASES PERFORMED:"_$J(SRCASES,6) W:SRCASES ?53,"100.0"
62 W !!,?22,"TIME OUT VERIFIED",!,?36,"YES:"_$J(SRTOV,6) W:SRCASES ?53,$J(((SRTOV/SRCASES)*100),5,1)
63 W !,?37,"NO:"_$J(SRTONO,6) W:SRCASES ?53,$J(((SRTONO/SRCASES)*100),5,1)
64 W !,?28,"NOT ENTERED:"_$J(SRTONE,6) W:SRCASES ?53,$J(((SRTONE/SRCASES)*100),5,1)
65 W !!,?9,"PREOPERATIVE IMAGING CONFIRMED",!,?36,"YES:"_$J(SRICY,6) W:SRCASES ?53,$J(((SRICY/SRCASES)*100),5,1)
66 W !,?19,"IMAGING NOT REQUIRED:"_$J(SRICNR,6) W:SRCASES ?53,$J(((SRICNR/SRCASES)*100),5,1)
67 W !,?37,"NO:"_$J(SRICNO,6) W:SRCASES ?53,$J(((SRICNO/SRCASES)*100),5,1)
68 W !,?28,"NOT ENTERED:"_$J(SRICNE,6) W:SRCASES ?53,$J(((SRICNE/SRCASES)*100),5,1)
69 I $E(IOST,1,2)="C-" D HDR^SROQ0 Q:SRSOUT W !,?17,"ENSURING CORRECT SURGERY - COMPLIANCE SUMMARY (Continued)"
70 W !!,?8,"MARK ON SURGICAL SITE CONFIRMED",!,?36,"YES:"_$J(SRSCY,6) W:SRCASES ?53,$J(((SRSCY/SRCASES)*100),5,1)
71 W !,?19,"MARKING NOT REQUIRED:"_$J(SRSCNR,6) W:SRCASES ?53,$J(((SRSCNR/SRCASES)*100),5,1)
72 W !,?37,"NO:"_$J(SRSCNO,6) W:SRCASES ?53,$J(((SRSCNO/SRCASES)*100),5,1)
73 W !,?28,"NOT ENTERED:"_$J(SRSCNE,6) W:SRCASES ?53,$J(((SRSCNE/SRCASES)*100),5,1)
74 W !!,?20,"OVERALL COMPLIANCE FOR THIS DATE RANGE",!,?20,"--------------------------------------"
75 W !,?34,"TIME OUT VERIFIED: " W:SRCASES $J(((SRTOV/SRCASES)*100),5,1),"%"
76 W !,?21,"PREOPERATIVE IMAGING CONFIRMED: " W:SRCASES $J((((SRICY+SRICNR)/SRCASES)*100),5,1),"%"
77 W !,?20,"MARK ON SURGICAL SITE CONFIRMED: " W:SRCASES $J((((SRSCY+SRSCNR)/SRCASES)*100),5,1),"%"
78HAIR ; print hair removal methods
79 D:$E(IOST,1,2)="C-" HDR^SROQ0 Q:SRSOUT W:$E(IOST,1,2)'="C-" !
80 W !!,?19,"PREOPERATIVE HAIR REMOVAL METHODS SUMMARY",!,?19,"-----------------------------------------"
81 W !!,?42,"CASES % OF TOTAL",!,?42,"----- ----------"
82 W !,?18,"TOTAL CASES PERFORMED:"_$J(SRCASES,6) W:SRCASES ?53,"100.0"
83 W !!,?32,"CLIPPER:"_$J(SRHAIR("C"),6) W:SRCASES ?53,$J(((SRHAIR("C")/SRCASES)*100),5,1)
84 W !,?29,"DEPILATORY:"_$J(SRHAIR("D"),6) W:SRCASES ?53,$J(((SRHAIR("D")/SRCASES)*100),5,1)
85 W !,?24,"NO HAIR REMOVED:"_$J(SRHAIR("N"),6) W:SRCASES ?53,$J(((SRHAIR("N")/SRCASES)*100),5,1)
86 W !,?15,"PATIENT REMOVED OWN HAIR:"_$J(SRHAIR("P"),6) W:SRCASES ?53,$J(((SRHAIR("P")/SRCASES)*100),5,1)
87 W !,?32,"SHAVING:"_$J(SRHAIR("S"),6) W:SRCASES ?53,$J(((SRHAIR("S")/SRCASES)*100),5,1)
88 N SRNDOC S SRNDOC=SRHAIR("U")+SRHAIR("ZZ")
89 W !,?25,"NOT DOCUMENTED:"_$J(SRNDOC,6) W:SRCASES ?53,$J(((SRNDOC/SRCASES)*100),5,1)
90 W !,?34,"OTHER:"_$J(SRHAIR("O"),6) W:SRCASES ?53,$J(((SRHAIR("O")/SRCASES)*100),5,1)
91 Q
92IX ; break out index procedure data from ^TMP
93 F K=1:1:3 S SRP(K)=$P(^TMP("SRPROC",$J,J),"^",K)
94 D IXOUT^SROQ0A D
95 .I SROP["," W:J=7 !,?5,$P(SROP,",") S SROP=$P(SROP,",",2)
96 .W !,?5,SROP,?29,$J(SRP(1),6),?42,$J(SRP(3),6),?55,$J(SRP(2),6)
97 Q
98SPOUT ; break out data for each specialty from ^TMP
99 F K=1:1:5 S SRP(K)=$P(^TMP("SRSS",$J,SRPTF),"^",K)
100 I SRPTF="ZZ" S SRPTF=""
101 W !,$J(SRPTF,2),?4,SRSP,?27,$J(SRP(1),6),?37,$J(SRP(2),6),?46,$J(SRP(3),6),?55,$J(SRP(4),6),?64,$J(SRP(5),6),?73,$J(((SRP(5)/$S(SRP(2):SRP(2),1:1))*100),5,1)
102 Q
Note: See TracBrowser for help on using the repository browser.