source: FOIAVistA/trunk/r/DRG_GROUPER-ICD--ICPT/ICDDRG5.m@ 1458

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

initial load of FOIAVistA 6/30/08 version

File size: 4.6 KB
Line 
1ICDDRG5 ;ALB/GRR/EG/MRY/ADL - FIX SURGERY HIERARCHY ; 3/20/03 10:36am
2 ;;18.0;DRG Grouper;**2,5,7,10,20,22,31**;Oct 20, 2000;Build 7
3 Q:$O(ICDODRG(0))'>0 K ICDJ,ICDJJ F ICDJ=0:0 S ICDJ=$O(ICDODRG(ICDJ)) Q:ICDJ'>0 S ICDJJ(ICDJ)="" D
4 .I ICDDATE<3051001 D F Q
5 .E I ICDDATE<3071001 D FY2007 Q
6 .E D FY2008
7END S ICDJ=$O(ICDJ(0)) Q:ICDJ'>0 S ICDJ=ICDJ(ICDJ) K ICDODRG S ICDODRG(ICDJ)="" Q
8F I ICDJ=103 S ICDJ(1)=ICDJ Q
9 I ICDJ=525 S ICDJ(2)=ICDJ Q
10 I ICDJ=104 S ICDJ(3)=ICDJ Q
11 I ICDJ=535 S ICDJ(4)=ICDJ Q
12 I ICDJ=536 S ICDJ(5)=ICDJ Q
13 I ICDJ=515 S ICDJ(6)=ICDJ Q
14 I ICDJ=108 S ICDJ(7)=ICDJ Q
15 I ICDJ=106 S ICDJ(8)=ICDJ Q
16 I ICDJ=110 S ICDJ(9)=ICDJ Q
17 I ICDJ=111 S ICDJ(10)=ICDJ Q
18 I ICDJ=113 S ICDJ(11)=ICDJ Q
19 I ICDJ=115 S ICDJ(12)=ICDJ Q
20 I ICDJ=116 S ICDJ(13)=ICDJ Q
21 I ICDJ=526 S ICDJ(14)=ICDJ Q
22 I ICDJ=527 S ICDJ(15)=ICDJ Q
23 I ICDJ=516 S ICDJ(16)=ICDJ Q
24 I ICDJ=517 S ICDJ(17)=ICDJ Q
25 I ICDJ=518 S ICDJ(18)=ICDJ Q
26 I ICDJ=478 S ICDJ(19)=ICDJ Q
27 I ICDJ=479 S ICDJ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ICDJ(29)=ICDJ Q
65 I ICDJ=119 S ICDJ(30)=ICDJ Q
66 I ICDJ=120 S ICDJ(31)=ICDJ
67 Q
68FY2008 ;
69 I ICDJ=215 S ICDJ(1)=ICDJ Q
70 I ICDJ=221 S ICDJ(2)=ICDJ Q
71 I ICDJ=223 S ICDJ(3)=ICDJ Q
72 I ICDJ=225 S ICDJ(4)=ICDJ Q
73 I ICDJ=227 S ICDJ(5)=ICDJ Q
74 I ICDJ=230 S ICDJ(6)=ICDJ Q
75 I ICDJ=232 S ICDJ(7)=ICDJ Q
76 I ICDJ=234 S ICDJ(8)=ICDJ Q
77 I ICDJ=236 S ICDJ(9)=ICDJ Q
78 I ICDJ=238 S ICDJ(10)=ICDJ Q
79 I ICDJ=241 S ICDJ(11)=ICDJ Q
80 I ICDJ=244 S ICDJ(12)=ICDJ Q
81 I ICDJ=245 S ICDJ(13)=ICDJ Q
82 I ICDJ=247 S ICDJ(14)=ICDJ Q
83 I ICDJ=249 S ICDJ(15)=ICDJ Q
84 I ICDJ=251 S ICDJ(16)=ICDJ Q
85 I ICDJ=254 S ICDJ(17)=ICDJ Q
86 I ICDJ=257 S ICDJ(18)=ICDJ Q
87 I ICDJ=259 S ICDJ(19)=ICDJ Q
88 I ICDJ=262 S ICDJ(20)=ICDJ Q
89 I ICDJ=263 S ICDJ(21)=ICDJ Q
90 I ICDJ=264 S ICDJ(22)=ICDJ Q
91 Q
92EN1 S (ICDCC3,ICDCC2)=0
93 I $D(ICDOP(" 00.50")) S ICDCC3=1
94 I $D(ICDOP(" 00.52")) I $D(ICDOP(" 00.53")) S ICDCC3=1
95 I $D(ICDOP(" 37.70"))!($D(ICDOP(" 37.71")))!($D(ICDOP(" 37.73"))) D MORE Q
96 I $D(ICDOP(" 37.72")) I $D(ICDOP(" 37.80"))!($D(ICDOP(" 37.83"))) S ICDCC3=1 Q
97 I $D(ICDOP(" 37.74")) I $D(ICDOP(" 37.80"))!($D(ICDOP(" 37.81")))!($D(ICDOP(" 37.82")))!($D(ICDOP(" 37.83")))!($D(ICDOP(" 37.85")))!($D(ICDOP(" 37.86")))!($D(ICDOP(" 37.87"))) S ICDCC3=1 Q
98 I $D(ICDOP(" 37.76")) I $D(ICDOP(" 37.80"))!($D(ICDOP(" 37.85")))!($D(ICDOP(" 37.86")))!($D(ICDOP(" 37.87"))) S ICDCC3=1 Q
99 I $D(ICDOP(" 00.53")) I $D(ICDOP(" 37.70"))!($D(ICDOP(" 37.71")))!($D(ICDOP(" 37.72")))!($D(ICDOP(" 37.73")))!($D(ICDOP("37.74 ")))!($D(ICDOP(" 37.76"))) S ICDCC3=1
100 I $D(ICDOP(" 00.54"))!$D(ICDOP(" 37.95"))!$D(ICDOP(" 37.96"))!$D(ICDOP(" 37.97"))!$D(ICDOP(" 37.98"))!$D(ICDOP(" 00.52")) S ICDCC2=1
101 Q
102MORE I $D(ICDOP(" 37.80"))!($D(ICDOP(" 37.81")))!($D(ICDOP(" 37.82")))!($D(ICDOP(" 37.85")))!($D(ICDOP(" 37.86")))!($D(ICDOP(" 37.87"))) S ICDCC3=1 Q
103 Q
104VALV ;valve procedure
105 N ICDTMP
106 S (ICDCATH,ICDAJ)="" F ICDI=1:1 Q:'$D(ICDPRC(ICDI)) S ICDAJ=ICDPRC(ICDI),ICDTMP=$$ICDOP^ICDCODE(ICDAJ,$G(ICDDATE)),ICDY(0)=$S((ICDTMP>0&$P(ICDTMP,U,10)):$P(ICDTMP,U,2,99),1:0) I ICDY(0) D
107 . S ICDOP($P(ICDY(0),"^",1))="",ICDCATH=ICDCATH_$P(ICDY(0),"^",2)
108 S ICDE1=$S($D(ICDOP(37.95))&($D(ICDOP(37.96))):1,1:0),ICDE2=$S($D(ICDOP(37.97))&($D(ICDOP(37.98))):1,1:0)
109 Q
110 S:ICDCATH["H" ICDRG=$S(ICDCATH["N"&ICDE1:104,ICDCATH["N"&ICDE2:104,ICDCATH["O":104,1:ICDRG)
111 S:ICDCATH'["H" ICDRG=$S(ICDCATH["N"&ICDE1:105,ICDCATH["N"&ICDE2:105,ICDCATH["O":105,1:ICDRG)
112 K ICDCATH,ICDAJ,ICDE1,ICDE2,ICDI,ICDOP,ICDY Q
113VALV1 ;dx combo's for DRG120
114 S ICDE1=$S($D(ICDOP(" 37.95"))&($D(ICDOP(" 37.96"))):1,1:0),ICDE2=$S($D(ICDOP(" 37.97"))&($D(ICDOP(" 37.98"))):1,1:0)
115 S ICDRG=$S((ICDE1&(ICDOR["H")):104,(ICDE1&(ICDOR'["H")):105,(ICDE2&(ICDOR["H")):104,(ICDE2&(ICDOR'["H")):105,1:120)
116 K ICDE1,ICDE2
117 Q
Note: See TracBrowser for help on using the repository browser.