1 | ICDTLB2A ;ALB/EG - GROUPER UTILITY FUNCTIONS FY 2005; 9/19/03 1:09pm ; 11/19/04 10:13am
|
---|
2 | ;;18.0;DRG Grouper;**14**;Oct 20, 2000
|
---|
3 | DRG95 S ICDRG=$S(ICDCC:94,1:95) Q
|
---|
4 | DRG96 S ICDRG=$S(AGE<18:98,ICDCC:96,1:97) I AGE="" S ICDRG=470,ICDRTC=3
|
---|
5 | Q
|
---|
6 | DRG97 S ICDRG=$S(AGE<18:98,ICDCC:96,1:97) I AGE="" S ICDRG=470,ICDRTC=3
|
---|
7 | Q
|
---|
8 | DRG98 S ICDRG=$S(AGE<18:98,ICDCC:96,1:97) I AGE="" S ICDRG=470,ICDRTC=3
|
---|
9 | Q
|
---|
10 | DRG99 S ICDRG=$S(ICDCC!($D(ICDSDRG(99))):99,1:100) Q
|
---|
11 | DRG100 S ICDRG=$S(ICDCC:99,1:100) Q
|
---|
12 | DRG101 S ICDRG=$S(ICDCC:101,1:102) Q
|
---|
13 | DRG102 S ICDRG=$S(ICDCC:101,1:102) Q
|
---|
14 | DRG104 ;valve procedure
|
---|
15 | N ICDE1,ICDE2
|
---|
16 | 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)
|
---|
17 | I ICDOR'["P",'ICDE1&'ICDE2&($D(ICDOP(" 37.95"))!$D(ICDOP(" 37.96"))!$D(ICDOP(" 37.97"))!$D(ICDOP(" 37.98"))) S ICDRG=116 Q
|
---|
18 | S:ICDOR["H" ICDRG=$S(ICDOR["N"&ICDE1:104,ICDOR["N"&ICDE2:104,ICDOR["O":104,1:ICDRG)
|
---|
19 | S:ICDOR'["H" ICDRG=$S(ICDOR["N"&ICDE1:105,ICDOR["N"&ICDE2:105,ICDOR["O":105,1:ICDRG)
|
---|
20 | I ICDOR["P"&(ICDE1+ICDE2=0) S ICDRG=$S(ICDOR["H":104,1:105)
|
---|
21 | Q
|
---|
22 | DRG105 D DRG104 Q
|
---|
23 | ; NOIS ANN-0801-41869 ignore 37.26 which has "HN1" for identifier
|
---|
24 | DRG106 ;S ICDRG=$S(ICDOR["b"&(ICDOR["6")&(ICDOR["1"):106,ICDOR["6"&(ICDOR'["1")&(ICDOR["H"):107,ICDOR["6"&(ICDOR'["1")&(ICDOR'["H"):109,1:470) I "106^107^109"'[ICDRG D
|
---|
25 | S ICDRG=470
|
---|
26 | I ICDOR["b"&(ICDOR["6") S ICDRG=109
|
---|
27 | I ICDOR["b"&(ICDOR["6") I $D(ICDOP(" 35.96"))!($D(ICDOP(" 36.01")))!($D(ICDOP(" 36.02")))!($D(ICDOP(" 36.05"))) S ICDRG=106 Q
|
---|
28 | I ICDOR["b"&(ICDOR["6") I $D(ICDOP(" 37.21"))!($D(ICDOP(" 37.22")))!($D(ICDOP(" 37.23"))) S ICDRG=107
|
---|
29 | I ICDOR["b"&(ICDOR["6") I $D(ICDOP(" 88.52"))!($D(ICDOP(" 88.53")))!($D(ICDOP(" 88.54")))!($D(ICDOP(" 88.55")))!($D(ICDOP(" 88.56")))!($D(ICDOP(" 88.57")))!($D(ICDOP(" 88.58"))) S ICDRG=107
|
---|
30 | I ICDRG'=106&(ICDRG'=107)&(ICDRG'=109) S ICDRG=470 D
|
---|
31 | .;I ICDCC D DRG110 Q
|
---|
32 | .;I ICDOR'["b" D DRG112 I +ICDRG>0&(+ICDRG<470) Q
|
---|
33 | .;I ICDOR'["b" D DRG516^ICDTLB6A I +ICDRG>0 Q
|
---|
34 | .I ICDCC D DRG110 Q
|
---|
35 | .D DRG111
|
---|
36 | Q
|
---|
37 | DRG107 D DRG106 Q
|
---|
38 | DRG108 S ICDRG=$S(ICDOR["Oo":108,$D(ICDOP(" 38.44"))&$D(ICDOP(" 38.45")):108,ICDCC:110,1:111) Q
|
---|
39 | DRG109 D DRG106 Q
|
---|
40 | DRG110 D DRG111 Q
|
---|
41 | DRG111 S ICDRG=$S(ICDOR["Oo":108,ICDCC&(ICDOR[7):110,ICDOR[7:111,1:ICDRG)
|
---|
42 | I "108^110^111"[ICDRG Q
|
---|
43 | I $D(ICDJJ(478))&('$D(ICDJJ(110))&'($D(ICDJJ(111)))) D DRG478^ICDTLB6A
|
---|
44 | D DRG113 I ICDRG=113 Q
|
---|
45 | I ICDOR["p" D DRG115
|
---|
46 | I ICDOR["1" D DRG516^ICDTLB6A
|
---|
47 | Q
|
---|
48 | DRG112 S ICDRG=$S(ICDOR["Oo":108,(ICDOR["1")&($D(ICDOP(" 36.06"))):116,ICDOR["1":112,1:470) I ICDRG=470 D
|
---|
49 | .I ICDPD["A" D DRG115 Q
|
---|
50 | .I ICDOR["p" D DRG117 Q
|
---|
51 | .D DRG111
|
---|
52 | Q
|
---|
53 | DRG113 S ICDRG=$S($D(ICDJJ(113)):113,1:ICDRG) Q
|
---|
54 | DRG115 D EN1^ICDDRG5 S ICDRG=$S($D(ICDOP(" 37.99"))&$D(ICDOP(" 37.98")):111,ICDPD["A"&(ICDCC3=1):115,ICDCC2:115,ICDCC3=1:116,ICDPD'["I"&(ICDCC3=0):127,1:"") Q
|
---|
55 | DRG116 D EN1^ICDDRG5 S ICDRG=$S(ICDPD["A"&(ICDCC3=1):115,ICDCC3=1:116,1:"") D:ICDOR["p" DRG117 K:ICDRG="" ICDODRG(HICDRG) Q
|
---|
56 | DRG117 D EN1^ICDDRG5 Q:ICDOR'["7"&('ICDCC3) S ICDRG=$S(ICDPD["A"&(ICDCC3):115,ICDCC3:116,1:117) Q
|
---|
57 | DRG118 D EN1^ICDDRG5 S ICDRG=$S(ICDPD["A"&(ICDCC3):115,ICDCC3:116,1:118) Q
|
---|
58 | DRG120 ;dx combo's for DRG120
|
---|
59 | N ICDE1,ICDE2
|
---|
60 | 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)
|
---|
61 | S ICDRG=$S((ICDE1&(ICDOR["H")):104,(ICDE1&(ICDOR'["H")):105,(ICDE2&(ICDOR["H")):104,(ICDE2&(ICDOR'["H")):105,1:120)
|
---|
62 | Q
|
---|
63 | DRG121 S ICDRG=$S(ICDSD["CV":121,ICDEXP=0:122,ICDEXP=1:123,1:470) I ICDRG=470 S ICDRTC=5
|
---|
64 | Q
|
---|
65 | DRG122 S ICDRG=$S(ICDSD["CV":121,ICDEXP=0:122,ICDEXP=1:123,1:470) I ICDRG=470 S ICDRTC=5
|
---|
66 | Q
|
---|
67 | DRG123 S ICDRG=$S(ICDSD["CV":121,ICDEXP=0:122,ICDEXP=1:123,1:470) I ICDRG=470 S ICDRTC=5
|
---|
68 | Q
|
---|
69 | DRG124 S ICDRG=$S(ICDPD["X"!(ICDSD["X"):124,1:125) Q
|
---|
70 | DRG125 S ICDRG=$S(ICDPD["X"!(ICDSD["X"):124,1:125) Q
|
---|
71 | DRG130 S ICDRG=$S(ICDCC:130,1:131) Q
|
---|
72 | DRG131 S ICDRG=$S(ICDCC!($D(ICDSDRG(130))):130,1:131) Q
|
---|
73 | DRG132 S ICDRG=$S(ICDCC:132,1:133) Q
|
---|
74 | DRG133 S ICDRG=$S(ICDCC:132,1:133) Q
|
---|
75 | DRG135 S ICDRG=$S(AGE<18:137,ICDCC:135,1:136) I AGE="" S ICDRG=470,ICDRTC=3
|
---|
76 | Q
|
---|
77 | DRG136 S ICDRG=$S(AGE<18:137,ICDCC:135,1:136) I AGE="" S ICDRG=470,ICDRTC=3
|
---|
78 | Q
|
---|
79 | DRG137 S ICDRG=$S(AGE<18:137,ICDCC:135,1:136) I AGE="" S ICDRG=470,ICDRTC=3
|
---|
80 | Q
|
---|
81 | DRG138 S ICDRG=$S(ICDCC:138,1:139) Q
|
---|
82 | DRG139 S ICDRG=$S(ICDCC:138,1:139) Q
|
---|
83 | DRG140 S ICDRG=$S(ICDOR["H":124,ICDNOR["H":124,1:140) Q
|
---|
84 | DRG141 S ICDRG=$S(ICDCC:141,1:142) Q
|
---|
85 | DRG142 S ICDRG=$S(ICDCC:141,1:142) Q
|
---|
86 | DRG144 S ICDRG=$S(ICDCC:144,1:145) Q
|
---|
87 | DRG145 S ICDRG=$S(ICDCC:144,1:145) Q
|
---|
88 | DRG146 S ICDRG=$S(ICDCC:146,1:147) Q
|
---|
89 | DRG147 S ICDRG=$S(ICDCC:146,1:147) Q
|
---|
90 | DRG148 S ICDRG=$S(ICDCC:148,1:149) Q
|
---|
91 | DRG149 S ICDRG=$S(ICDCC:148,1:149) Q
|
---|
92 | DRG150 S ICDRG=$S(ICDCC:150,1:151) Q
|
---|
93 | DRG151 S ICDRG=$S(ICDCC:150,1:151) Q
|
---|
94 | DRG152 S ICDRG=$S(ICDCC:152,1:153) Q
|
---|
95 | DRG153 S ICDRG=$S(ICDCC:152,1:153) Q
|
---|
96 | DRG154 S ICDRG=$S(AGE<18:156,ICDCC:154,1:155) I AGE="" S ICDRG=470,ICDRTC=3
|
---|
97 | Q
|
---|
98 | DRG155 S ICDRG=$S(AGE<18:156,ICDCC:154,1:155) I AGE="" S ICDRG=470,ICDRTC=3
|
---|
99 | Q
|
---|
100 | DRG156 S ICDRG=$S(AGE<18:156,ICDCC:154,1:155) I AGE="" S ICDRG=470,ICDRTC=3
|
---|
101 | Q
|
---|
102 | DRG157 S ICDRG=$S(ICDCC:157,1:158) Q
|
---|
103 | DRG158 S ICDRG=$S(ICDCC:157,1:158) Q
|
---|
104 | DRG159 S ICDRG=$S(AGE<18:163,ICDCC:159,1:160) I AGE="" S ICDRG=470,ICDRTC=3
|
---|
105 | Q
|
---|
106 | DRG160 S ICDRG=$S(AGE<18:163,ICDCC:159,1:160) I AGE="" S ICDRG=470,ICDRTC=3
|
---|
107 | Q
|
---|
108 | DRG161 S ICDRG=$S(AGE<18:163,ICDCC:161,ICDSD["J":161,1:162) I AGE="" S ICDRG=470,ICDRTC=3
|
---|
109 | Q
|
---|
110 | DRG162 S ICDRG=$S(AGE<18:163,ICDCC:161,1:162) I AGE="" S ICDRG=470,ICDRTC=3
|
---|
111 | Q
|
---|