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ICDJ Q
I ICDJ=56 S ICDJ(11)=ICDJ Q
I ICDJ=50 S ICDJ(12)=ICDJ Q
I ICDJ=51 S ICDJ(13)=ICDJ Q
I ICDJ=55 S ICDJ(14)=ICDJ Q
I ICDJ=59 S ICDJ(15)=ICDJ Q
I ICDJ=60 S ICDJ(16)=ICDJ Q
I ICDJ=63 S ICDJ(17)=ICDJ Q
Q
FY2008 ;MS-DRG
I ICDJ=130 S ICDJ(1)=ICDJ Q
I ICDJ=132 S ICDJ(2)=ICDJ Q
I ICDJ=134 S ICDJ(3)=ICDJ Q
I ICDJ=136 S ICDJ(4)=ICDJ Q
I ICDJ=138 S ICDJ(5)=ICDJ Q
I ICDJ=139 S ICDJ(6)=ICDJ Q
Q
EN1 ;
I $D(ICDOP(" 28.2"))!($D(ICDOP(" 28.3")))!($D(ICDOP(" 28.6"))) S ICDRG=$S(ICDOCNT>1:$S(AGE>17:57,1:58),1:ICDRG)
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HICDDRG3 1713 printed Dec 13, 2024@01:50:16 Page 2
ICDDRG3 ;ALB/GRR/EG - FIX SURGERY HIERARCHY ; 10/23/00 11:39am
+1 ;;18.0;DRG Grouper;**24,31**;Oct 20, 2000;Build 7
+2 if $ORDER(ICDODRG(0))'>0
QUIT
KILL ICDJ
FOR ICDJ=0:0
SET ICDJ=$ORDER(ICDODRG(ICDJ))
if ICDJ'>0
QUIT
Begin DoDot:1
+3 IF ICDDATE<3061001
DO F
QUIT
+4 IF '$TEST
IF ICDDATE<3071001
DO FY2007
QUIT
+5 IF '$TEST
DO FY2008
End DoDot:1
END SET ICDJ=$ORDER(ICDJ(0))
if ICDJ'>0
QUIT
SET ICDJ=ICDJ(ICDJ)
KILL ICDODRG
SET ICDODRG(ICDJ)=""
KILL ICDJ
QUIT
F IF ICDJ=49
SET ICDJ(1)=ICDJ
QUIT
+1 IF ICDJ=61
SET ICDJ(2)=ICDJ
QUIT
+2 IF ICDJ=62
SET ICD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