ICDDRGX3 ;MKN - GROUPER PROCESS continued from ICDDRGX2;06/04/12 3:45pm
;;18.0;DRG Grouper;**64,82**;Oct 20, 2000;Build 21
;
VARIABLS ;Apply Variables for MDC 1-22
;
I $D(ICD10OR(80)) S ICDRG=$S(ICDMCC>0:707,1:708),ICDFI=1 G EXIT ;80=Major Male Pelvic
I ICDMDC=12,$D(ICD10OR(119)) S ICDRG=$S(ICDMCC>0:709,1:710),ICDFI=1 G EXIT ;119=Penis Procedures
I $D(ICD10OR(147)) S ICDRG=$S(ICDMCC>0:711,1:712),ICDFI=1 G EXIT ;147=Testes Procedures
I ICDMDC=12,$D(ICD10OR(153)) S ICDRG=$S(ICDMCC>0:713,1:714),ICDFI=1 G EXIT ;153=Transurethral Prostatectomy
I SEX="M",ICDMDC=12,$D(ICD10OR(108)) D ;108=Other Male Reproductive System O.R. Procedures
. I $D(ICD10PD(98)) S ICDRG=$S(ICDMCC>0:715,1:716),ICDFI=1 Q ;98=Malignancy
. S ICDRG=$S(ICDMCC>0:717,1:718),ICDFI=1 Q
G:ICDFI EXIT
I ICDMDC=12,SEX="M",$D(ICD10PD(98)) S ICDRG=$S(ICDMCC=2:722,ICDMCC=1:723,1:724),ICDFI=1 G EXIT
I SEX="F",$D(ICD10OR(235)) S ICDRG=$S(ICDMCC>0:734,1:735),ICDFI=1 G EXIT ;235=Pelvic Evisceration, Radical Hysterectomy and Radical Vulvectomy
I $D(ICD10OR(158)),$D(ICD10PD(143)) S ICDRG=$S(ICDMCC=2:739,ICDMCC=1:740,1:741),ICDFI=1 G EXIT ;158=Uterine and Adnexal Procedures 143=Non-ovarian/adnexal Malignancy
I $D(ICD10OR(158)),$D(ICD10PD(168)) S ICDRG=$S(ICDMCC=2:736,ICDMCC=1:737,1:738),ICDFI=1 G EXIT ;168=Ovarian or Adnexal Malignancy
I SEX="F" D
. I ICDMDC=13 D
. . I $D(ICD10OR(253)) S ICDRG=$S(ICDMCC>0:742,1:743),ICDFI=1 Q ;253=Uterine and Adnexal Procedures for Non-Malignancy
. . I $D(ICD10OR(208)) S ICDRG=$S(ICDMCC>0:744,1:745),ICDFI=1 Q ;208=D&C, Conization, Laparoscopy and Tubal Interruption
. Q:ICDFI
. I ICDMDC=14,$D(ICD10OR(181)) D ;181=Delivery procedures
. . I $D(ICD10OR(183)) S ICDRG=767,ICDFI=1 Q ;183=Sterilization and/or D&C
. . I $D(ICD10OR(182)) S ICDRG=768,ICDFI=1 Q ;182=Not Sterilization and/or D&C
G:ICDFI=1 EXIT
I $D(ICD10OR(254)) S ICDRG=$S(ICDMCC>0:746,1:747),ICDFI=1 G EXIT ;254=Vagina, Cervix and Vulva Procedures
I $D(ICD10OR(47)) S ICDRG=748,ICDFI=1 G EXIT ;47=Female Reproductive System Reconstructive Procedures
I SEX="F",$D(ICD10OR(104)) S ICDRG=$S(ICDMCC>0:749,1:750),ICDFI=1 G EXIT ;104=Other Female Reproductive System O.R. Procedures
I SEX="F",$D(ICD10PD(100)) S ICDRG=$S(ICDMCC=2:754,ICDMCC=1:755,1:756),ICDFI=1 G EXIT ;100=Malignancy, Female Reproductive System
I SEX="F",$D(ICD10PD(81)) S ICDRG=$S(ICDMCC=2:757,ICDMCC=1:758,1:759),ICDFI=1 G EXIT ;81=Infections, Female Reproductive System
I $D(ICD10PD(272)) S ICDRG=$S(ICDMCC>0:760,1:761),ICDFI=1,ICDFI=1 G EXIT ;272=Menstrual and Other Female Reproductive System Disorders
I $D(ICD10OR("c")) S ICDRG=$S(ICDMCC>0:765,1:766),ICDFI=1 G EXIT ;"c"=Cesarean Sec
I $D(ICD10OR(312)) S ICDRG=$S($D(ICD10OR(183)):767,1:768),ICDFI=1 G EXIT ;312=Vaginal Delivery 183=Sterilization and/or D&C
I $D(ICD10PD(294)),$D(ICD10OR) S ICDRG=769,ICDFI=1 G EXIT ;294=Postpartum and Post Abortion Diagnoses with O.R. Procedure
I $D(ICD10PD(294)),'$D(ICD10OR) S ICDRG=776,ICDFI=1 G EXIT
I $D(ICD10PD(227)) S ICDRG=779,ICDFI=1 G EXIT ;Abortion without D&C
I $D(ICD10OR(145)) S ICDRG=$S(ICDMCC=2:799,ICDMCC=1:800,1:801),ICDFI=1 G EXIT ;145=Splenectomy
I ICDMDC=16,$D(ICD10OR(231)) S ICDRG=$S(ICDMCC=2:802,ICDMCC=1:803,1:804),ICDFI=1 G EXIT ;231=Other O.R. Procedures of the Blood and Blood Forming Organs
I $D(ICD10PD(265)) S ICDRG=$S(ICDMCC=2:808,ICDMCC=1:809,1:810),ICDFI=1 G EXIT ;265=Major Hematological/Immunological Diagnoses Except Sickle Cell Crisis and Coagulation
I $D(ICD10PD(261)),$D(ICD10OR(81)) S ICDRG=$S(ICDMCC=2:820,ICDMCC=1:821,1:822),ICDFI=1 G EXIT ;261=Lymphoma and Leukemia with Major O.R. Procedure
I $D(ICD10PD(263)),$D(ICD10OR),'$D(ICD10OR(81)) S ICDRG=$S(ICDMCC=2:823,ICDMCC=1:824,1:825),ICDFI=1 G EXIT ;263=Lymphoma and Non-Acute Leukemia with Other O.R. Procedure
I $D(ICD10PD(231)),'$D(ICD10OR(81)) S ICDRG=$S(ICDMCC=2:834,ICDMCC=1:835,1:836),ICDFI=1 G EXIT ;231=Acute Leukemia without Major O.R. Procedure
I $D(ICD10PD(262)) S ICDRG=$S(ICDMCC=2:840,ICDMCC=1:841,1:842),ICDFI=1 G EXIT ;Lymphoma and Non-Acute Leukemia
I $D(ICD10PD(181)) S ICDRG=849,ICDFI=1 G EXIT ;Radiotherapy
I $D(ICD10PD(134)),'$D(ICD10PD(35)) D ;134=Myeloproliferative Disorders or Poorly Differentiated Neoplasms
. I $D(ICD10OR(81)) S ICDRG=$S(ICDMCC=2:826,ICDMCC=1:827,1:828),ICDFI=1 Q
. I $D(ICD10OR) S ICDRG=$S(ICDMCC>0:829,1:830),ICDFI=1 Q
I $D(ICD10OR(111)) S ICDRG=$S(ICDMCC=2:907,ICDMCC=1:908,1:909),ICDFI=1 G EXIT ;Other O.R. Procedures for Injuries
G:ICDFI EXIT
I ICDMDC=17,$D(ICD10PD(35)) D ;134=Myeloproliferative Disorders or Poorly Differentiated Neoplasms 35=Chemotherapy Implant
. I $D(ICD10SD(15)),ICDMCC=2 S ICDRG=837,ICDFI=1 Q ;15=SDX Acute Leukemia 56=High Dose Chemo Agent
. I $D(ICD10SD(15)),'$D(ICD10OR(56)) S ICDRGT=$S(ICDMCC=2:837,ICDMCC=1:838,ICDMCC=0:839,1:0) I ICDRGT>0 S ICDRG=ICDRGT,ICDFI=1 Q
. I '$D(ICD10SD(15)),$D(ICD10OR(56)),ICDMCC=2 S ICDRG=837,ICDFI=1 Q
. I '$D(ICD10SD(15)),$D(ICD10OR(56)),ICDMCC'=2 S ICDRG=838,ICDFI=1 Q
G:ICDFI EXIT
I $D(ICD10PD(288)) S ICDRG=$S(ICDMCC=2:843,ICDMCC=1:844,1:845),ICDFI=1 G EXIT ;288=Other Myeloproliferative Disorders or Poorly Differentiated Neoplasm Diagnoses
I $D(ICD10PD(240)) S ICDRG=$S(ICDMCC=2:846,ICDMCC=1:847,1:848),ICDFI=1 G EXIT ;240=Chemotherapy without Acute Leukemia as Secondary Diagnosis
I ICDMDC=18,$D(ICD10OR("O")) D ;82=infectious & Parasitic Diseases, Systemic or Unspecified Sites
. S ICDX=$$ICDXEXPT^ICDRGAPI(ICDDX(1),"^K68.11^N98.0^T80.22XA^T80.29XA^T81.4XXA^T88.0XXA^")
. I ICDX=0 S ICDRG=$S(ICDMCC=2:853,ICDMCC=1:854,1:855),ICDFI=1 Q
. I ICDX S ICDRG=$S(ICDMCC=2:856,ICDMCC=1:857,1:858),ICDFI=1 Q
I ICDMDC=18,'$D(ICD10OR("O")) D
. S ICDX=$$ICDXEXPT^ICDRGAPI(ICDDX(1),"^K68.11^T81.4XXA^")
. I ICDX S ICDRG=$S(ICDMCC=2:862,1:863),ICDFI=1 Q
G:ICDFI EXIT
;I $D(ICD10PD(175)),$D(ICD10OR("O")) S ICDRG=$S(ICDMCC=2:856,ICDMCC=1:857,1:858),ICDFI=1 G EXIT ;175=Postoperative or Post-Traumatic Infections with O.R. Procedure
I $D(ICD10PD(190))!($D(ICD10PD("W"))) D ;190=Septicemia or Severe Sepsis "W"=Severe Sepsis
. I $D(ICD10OR(225)) S ICDRG=870,ICDFI=1 Q
. S ICDRG=$S(ICDMCC=2:871,1:872),ICDFI=1 Q
G:ICDFI EXIT
I ICDMDC=19,$D(ICD10OR("O")) S ICDRG=876,ICDFI=1 G EXIT ;Mental Illness
I ICDMDC=20 D
. I ICDDMS=1 S ICDRG=894,ICDFI=1 Q ;Left against medical advice (AMA)
. I $D(ICD10PD(270)),$D(ICD10OR(132)) S ICDRG=895,ICDFI=1 Q ;270=MDC 20 Alcohol/Drug Use & Alcohol/Drug Induced Organic Mental Disorders 132=Rehabilitation Therapy
. I $D(ICD10PD(270)),'$D(ICD10OR(132)),'$D(ICD10OR("x")) S ICDRG=$S(ICDMCC=2:896,1:897),ICDFI=1 Q ;132=Rehabilitation Therapy
G:ICDFI EXIT
I $D(ICD10OR(166)),$D(ICD10OR("O")) S ICDRG=$S(ICDMCC=2:901,ICDMCC=1:902,1:903),ICDFI=1 G EXIT ;Wound Debridements for Injuries
I ICDMDC=21,$D(ICD10OR(139)) S ICDRG=$S(ICDMCC>0:904,1:905),ICDFI=1 G EXIT ;139=Skin Grafts for Injuries
I ICDMDC=21,$D(ICD10OR(52)) S ICDRG=906,ICDFI=1 G EXIT
I $D(ICD10PD(42)) S ICDRG=$S(ICDMCC=2:919,ICDMCC=1:920,1:921),ICDFI=1 G EXIT ;42=Complications of Treatment
I $D(ICD10PD("*"))!($D(ICD10PD("b"))&($D(ICD10OR(225)))) S ICDRG=$S($D(ICD10OR("k")):927,1:933),ICDFI=1 G EXIT ;*=Extensive Burns or b=Full Thickness Burns with 225=MV 96+Hours k=Skin Graft
I $D(ICD10PD("b")) D ;Full Thickness Burns
. I $D(ICD10OR("k"))!($D(ICD10SD("j"))) S ICDRG=$S(ICDMCC>0:928,1:929),ICDFI=1 Q ;k=Skin Graft j=Inhalation Injury
. S ICDRG=934,ICDFI=1 Q
G:ICDFI EXIT
I ICDMDC=22,$D(ICD10PD(141)) S ICDRG=935,ICDFI=1 G EXIT ;141=Non-extensive Burns
I ICDMDC=23,$D(ICD10OR("O")),$D(ICD10PD(119)) S ICDRG=$S(ICDMCC=2:939,ICDMCC=1:940,1:941),ICDFI=1 G EXIT ;O.R. Procedures with 119=Diagnosis of Other Contact with Health Services
I ICDMDC=23 D
.I $D(ICD10OR(131)) S ICDRG=$S(ICDMCC>0:945,1:946),ICDFI=1 ;131=Rehabilitation
.I $D(ICD10PD(299)) S ICDRG=$S(ICDMCC>0:947,1:948),ICDFI=1
.I $D(ICD10PD(20)) S ICDRG=$S(ICDMCC>0:949,1:950),ICDFI=1
EXIT ;
I $D(ICD10OR("y")) D
. I $D(ICD10OR),ICDREL=0 S ICDRG=$S(ICDMCC=2:984,ICDMCC=1:985,1:986),ICDFI=1 Q
I $D(ICD10OR("z")) D
. I $D(ICD10OR),ICDREL=0 S ICDRG=$S(ICDMCC=2:987,ICDMCC=1:988,1:989),ICDFI=1 Q
I ICDFI S ICDFOUND=1
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HICDDRGX3 8194 printed Nov 22, 2024@17:00:35 Page 2
ICDDRGX3 ;MKN - GROUPER PROCESS continued from ICDDRGX2;06/04/12 3:45pm
+1 ;;18.0;DRG Grouper;**64,82**;Oct 20, 2000;Build 21
+2 ;
VARIABLS ;Apply Variables for MDC 1-22
+1 ;
+2 ;80=Major Male Pelvic
IF $DATA(ICD10OR(80))
SET ICDRG=$SELECT(ICDMCC>0:707,1:708)
SET ICDFI=1
GOTO EXIT
+3 ;119=Penis Procedures
IF ICDMDC=12
IF $DATA(ICD10OR(119))
SET ICDRG=$SELECT(ICDMCC>0:709,1:710)
SET ICDFI=1
GOTO EXIT
+4 ;147=Testes Procedures
IF $DATA(ICD10OR(147))
SET ICDRG=$SELECT(ICDMCC>0:711,1:712)
SET ICDFI=1
GOTO EXIT
+5 ;153=Transurethral Prostatectomy
IF ICDMDC=12
IF $DATA(ICD10OR(153))
SET ICDRG=$SELECT(ICDMCC>0:713,1:714)
SET ICDFI=1
GOTO EXIT
+6 ;108=Other Male Reproductive System O.R. Procedures
IF SEX="M"
IF ICDMDC=12
IF $DATA(ICD10OR(108))
Begin DoDot:1
+7 ;98=Malignancy
IF $DATA(ICD10PD(98))
SET ICDRG=$SELECT(ICDMCC>0:715,1:716)
SET ICDFI=1
QUIT
+8 SET ICDRG=$SELECT(ICDMCC>0:717,1:718)
SET ICDFI=1
QUIT
End DoDot:1
+9 if ICDFI
GOTO EXIT
+10 IF ICDMDC=12
IF SEX="M"
IF $DATA(ICD10PD(98))
SET ICDRG=$SELECT(ICDMCC=2:722,ICDMCC=1:723,1:724)
SET ICDFI=1
GOTO EXIT
+11 ;235=Pelvic Evisceration, Radical Hysterectomy and Radical Vulvectomy
IF SEX="F"
IF $DATA(ICD10OR(235))
SET ICDRG=$SELECT(ICDMCC>0:734,1:735)
SET ICDFI=1
GOTO EXIT
+12 ;158=Uterine and Adnexal Procedures 143=Non-ovarian/adnexal Malignancy
IF $DATA(ICD10OR(158))
IF $DATA(ICD10PD(143))
SET ICDRG=$SELECT(ICDMCC=2:739,ICDMCC=1:740,1:741)
SET ICDFI=1
GOTO EXIT
+13 ;168=Ovarian or Adnexal Malignancy
IF $DATA(ICD10OR(158))
IF $DATA(ICD10PD(168))
SET ICDRG=$SELECT(ICDMCC=2:736,ICDMCC=1:737,1:738)
SET ICDFI=1
GOTO EXIT
+14 IF SEX="F"
Begin DoDot:1
+15 IF ICDMDC=13
Begin DoDot:2
+16 ;253=Uterine and Adnexal Procedures for Non-Malignancy
IF $DATA(ICD10OR(253))
SET ICDRG=$SELECT(ICDMCC>0:742,1:743)
SET ICDFI=1
QUIT
+17 ;208=D&C, Conization, Laparoscopy and Tubal Interruption
IF $DATA(ICD10OR(208))
SET ICDRG=$SELECT(ICDMCC>0:744,1:745)
SET ICDFI=1
QUIT
End DoDot:2
+18 if ICDFI
QUIT
+19 ;181=Delivery procedures
IF ICDMDC=14
IF $DATA(ICD10OR(181))
Begin DoDot:2
+20 ;183=Sterilization and/or D&C
IF $DATA(ICD10OR(183))
SET ICDRG=767
SET ICDFI=1
QUIT
+21 ;182=Not Sterilization and/or D&C
IF $DATA(ICD10OR(182))
SET ICDRG=768
SET ICDFI=1
QUIT
End DoDot:2
End DoDot:1
+22 if ICDFI=1
GOTO EXIT
+23 ;254=Vagina, Cervix and Vulva Procedures
IF $DATA(ICD10OR(254))
SET ICDRG=$SELECT(ICDMCC>0:746,1:747)
SET ICDFI=1
GOTO EXIT
+24 ;47=Female Reproductive System Reconstructive Procedures
IF $DATA(ICD10OR(47))
SET ICDRG=748
SET ICDFI=1
GOTO EXIT
+25 ;104=Other Female Reproductive System O.R. Procedures
IF SEX="F"
IF $DATA(ICD10OR(104))
SET ICDRG=$SELECT(ICDMCC>0:749,1:750)
SET ICDFI=1
GOTO EXIT
+26 ;100=Malignancy, Female Reproductive System
IF SEX="F"
IF $DATA(ICD10PD(100))
SET ICDRG=$SELECT(ICDMCC=2:754,ICDMCC=1:755,1:756)
SET ICDFI=1
GOTO EXIT
+27 ;81=Infections, Female Reproductive System
IF SEX="F"
IF $DATA(ICD10PD(81))
SET ICDRG=$SELECT(ICDMCC=2:757,ICDMCC=1:758,1:759)
SET ICDFI=1
GOTO EXIT
+28 ;272=Menstrual and Other Female Reproductive System Disorders
IF $DATA(ICD10PD(272))
SET ICDRG=$SELECT(ICDMCC>0:760,1:761)
SET ICDFI=1
SET ICDFI=1
GOTO EXIT
+29 ;"c"=Cesarean Sec
IF $DATA(ICD10OR("c"))
SET ICDRG=$SELECT(ICDMCC>0:765,1:766)
SET ICDFI=1
GOTO EXIT
+30 ;312=Vaginal Delivery 183=Sterilization and/or D&C
IF $DATA(ICD10OR(312))
SET ICDRG=$SELECT($DATA(ICD10OR(183)):767,1:768)
SET ICDFI=1
GOTO EXIT
+31 ;294=Postpartum and Post Abortion Diagnoses with O.R. Procedure
IF $DATA(ICD10PD(294))
IF $DATA(ICD10OR)
SET ICDRG=769
SET ICDFI=1
GOTO EXIT
+32 IF $DATA(ICD10PD(294))
IF '$DATA(ICD10OR)
SET ICDRG=776
SET ICDFI=1
GOTO EXIT
+33 ;Abortion without D&C
IF $DATA(ICD10PD(227))
SET ICDRG=779
SET ICDFI=1
GOTO EXIT
+34 ;145=Splenectomy
IF $DATA(ICD10OR(145))
SET ICDRG=$SELECT(ICDMCC=2:799,ICDMCC=1:800,1:801)
SET ICDFI=1
GOTO EXIT
+35 ;231=Other O.R. Procedures of the Blood and Blood Forming Organs
IF ICDMDC=16
IF $DATA(ICD10OR(231))
SET ICDRG=$SELECT(ICDMCC=2:802,ICDMCC=1:803,1:804)
SET ICDFI=1
GOTO EXIT
+36 ;265=Major Hematological/Immunological Diagnoses Except Sickle Cell Crisis and Coagulation
IF $DATA(ICD10PD(265))
SET ICDRG=$SELECT(ICDMCC=2:808,ICDMCC=1:809,1:810)
SET ICDFI=1
GOTO EXIT
+37 ;261=Lymphoma and Leukemia with Major O.R. Procedure
IF $DATA(ICD10PD(261))
IF $DATA(ICD10OR(81))
SET ICDRG=$SELECT(ICDMCC=2:820,ICDMCC=1:821,1:822)
SET ICDFI=1
GOTO EXIT
+38 ;263=Lymphoma and Non-Acute Leukemia with Other O.R. Procedure
IF $DATA(ICD10PD(263))
IF $DATA(ICD10OR)
IF '$DATA(ICD10OR(81))
SET ICDRG=$SELECT(ICDMCC=2:823,ICDMCC=1:824,1:825)
SET ICDFI=1
GOTO EXIT
+39 ;231=Acute Leukemia without Major O.R. Procedure
IF $DATA(ICD10PD(231))
IF '$DATA(ICD10OR(81))
SET ICDRG=$SELECT(ICDMCC=2:834,ICDMCC=1:835,1:836)
SET ICDFI=1
GOTO EXIT
+40 ;Lymphoma and Non-Acute Leukemia
IF $DATA(ICD10PD(262))
SET ICDRG=$SELECT(ICDMCC=2:840,ICDMCC=1:841,1:842)
SET ICDFI=1
GOTO EXIT
+41 ;Radiotherapy
IF $DATA(ICD10PD(181))
SET ICDRG=849
SET ICDFI=1
GOTO EXIT
+42 ;134=Myeloproliferative Disorders or Poorly Differentiated Neoplasms
IF $DATA(ICD10PD(134))
IF '$DATA(ICD10PD(35))
Begin DoDot:1
+43 IF $DATA(ICD10OR(81))
SET ICDRG=$SELECT(ICDMCC=2:826,ICDMCC=1:827,1:828)
SET ICDFI=1
QUIT
+44 IF $DATA(ICD10OR)
SET ICDRG=$SELECT(ICDMCC>0:829,1:830)
SET ICDFI=1
QUIT
End DoDot:1
+45 ;Other O.R. Procedures for Injuries
IF $DATA(ICD10OR(111))
SET ICDRG=$SELECT(ICDMCC=2:907,ICDMCC=1:908,1:909)
SET ICDFI=1
GOTO EXIT
+46 if ICDFI
GOTO EXIT
+47 ;134=Myeloproliferative Disorders or Poorly Differentiated Neoplasms 35=Chemotherapy Implant
IF ICDMDC=17
IF $DATA(ICD10PD(35))
Begin DoDot:1
+48 ;15=SDX Acute Leukemia 56=High Dose Chemo Agent
IF $DATA(ICD10SD(15))
IF ICDMCC=2
SET ICDRG=837
SET ICDFI=1
QUIT
+49 IF $DATA(ICD10SD(15))
IF '$DATA(ICD10OR(56))
SET ICDRGT=$SELECT(ICDMCC=2:837,ICDMCC=1:838,ICDMCC=0:839,1:0)
IF ICDRGT>0
SET ICDRG=ICDRGT
SET ICDFI=1
QUIT
+50 IF '$DATA(ICD10SD(15))
IF $DATA(ICD10OR(56))
IF ICDMCC=2
SET ICDRG=837
SET ICDFI=1
QUIT
+51 IF '$DATA(ICD10SD(15))
IF $DATA(ICD10OR(56))
IF ICDMCC'=2
SET ICDRG=838
SET ICDFI=1
QUIT
End DoDot:1
+52 if ICDFI
GOTO EXIT
+53 ;288=Other Myeloproliferative Disorders or Poorly Differentiated Neoplasm Diagnoses
IF $DATA(ICD10PD(288))
SET ICDRG=$SELECT(ICDMCC=2:843,ICDMCC=1:844,1:845)
SET ICDFI=1
GOTO EXIT
+54 ;240=Chemotherapy without Acute Leukemia as Secondary Diagnosis
IF $DATA(ICD10PD(240))
SET ICDRG=$SELECT(ICDMCC=2:846,ICDMCC=1:847,1:848)
SET ICDFI=1
GOTO EXIT
+55 ;82=infectious & Parasitic Diseases, Systemic or Unspecified Sites
IF ICDMDC=18
IF $DATA(ICD10OR("O"))
Begin DoDot:1
+56 SET ICDX=$$ICDXEXPT^ICDRGAPI(ICDDX(1),"^K68.11^N98.0^T80.22XA^T80.29XA^T81.4XXA^T88.0XXA^")
+57 IF ICDX=0
SET ICDRG=$SELECT(ICDMCC=2:853,ICDMCC=1:854,1:855)
SET ICDFI=1
QUIT
+58 IF ICDX
SET ICDRG=$SELECT(ICDMCC=2:856,ICDMCC=1:857,1:858)
SET ICDFI=1
QUIT
End DoDot:1
+59 IF ICDMDC=18
IF '$DATA(ICD10OR("O"))
Begin DoDot:1
+60 SET ICDX=$$ICDXEXPT^ICDRGAPI(ICDDX(1),"^K68.11^T81.4XXA^")
+61 IF ICDX
SET ICDRG=$SELECT(ICDMCC=2:862,1:863)
SET ICDFI=1
QUIT
End DoDot:1
+62 if ICDFI
GOTO EXIT
+63 ;I $D(ICD10PD(175)),$D(ICD10OR("O")) S ICDRG=$S(ICDMCC=2:856,ICDMCC=1:857,1:858),ICDFI=1 G EXIT ;175=Postoperative or Post-Traumatic Infections with O.R. Procedure
+64 ;190=Septicemia or Severe Sepsis "W"=Severe Sepsis
IF $DATA(ICD10PD(190))!($DATA(ICD10PD("W")))
Begin DoDot:1
+65 IF $DATA(ICD10OR(225))
SET ICDRG=870
SET ICDFI=1
QUIT
+66 SET ICDRG=$SELECT(ICDMCC=2:871,1:872)
SET ICDFI=1
QUIT
End DoDot:1
+67 if ICDFI
GOTO EXIT
+68 ;Mental Illness
IF ICDMDC=19
IF $DATA(ICD10OR("O"))
SET ICDRG=876
SET ICDFI=1
GOTO EXIT
+69 IF ICDMDC=20
Begin DoDot:1
+70 ;Left against medical advice (AMA)
IF ICDDMS=1
SET ICDRG=894
SET ICDFI=1
QUIT
+71 ;270=MDC 20 Alcohol/Drug Use & Alcohol/Drug Induced Organic Mental Disorders 132=Rehabilitation Therapy
IF $DATA(ICD10PD(270))
IF $DATA(ICD10OR(132))
SET ICDRG=895
SET ICDFI=1
QUIT
+72 ;132=Rehabilitation Therapy
IF $DATA(ICD10PD(270))
IF '$DATA(ICD10OR(132))
IF '$DATA(ICD10OR("x"))
SET ICDRG=$SELECT(ICDMCC=2:896,1:897)
SET ICDFI=1
QUIT
End DoDot:1
+73 if ICDFI
GOTO EXIT
+74 ;Wound Debridements for Injuries
IF $DATA(ICD10OR(166))
IF $DATA(ICD10OR("O"))
SET ICDRG=$SELECT(ICDMCC=2:901,ICDMCC=1:902,1:903)
SET ICDFI=1
GOTO EXIT
+75 ;139=Skin Grafts for Injuries
IF ICDMDC=21
IF $DATA(ICD10OR(139))
SET ICDRG=$SELECT(ICDMCC>0:904,1:905)
SET ICDFI=1
GOTO EXIT
+76 IF ICDMDC=21
IF $DATA(ICD10OR(52))
SET ICDRG=906
SET ICDFI=1
GOTO EXIT
+77 ;42=Complications of Treatment
IF $DATA(ICD10PD(42))
SET ICDRG=$SELECT(ICDMCC=2:919,ICDMCC=1:920,1:921)
SET ICDFI=1
GOTO EXIT
+78 ;*=Extensive Burns or b=Full Thickness Burns with 225=MV 96+Hours k=Skin Graft
IF $DATA(ICD10PD("*"))!($DATA(ICD10PD("b"))&($DATA(ICD10OR(225))))
SET ICDRG=$SELECT($DATA(ICD10OR("k")):927,1:933)
SET ICDFI=1
GOTO EXIT
+79 ;Full Thickness Burns
IF $DATA(ICD10PD("b"))
Begin DoDot:1
+80 ;k=Skin Graft j=Inhalation Injury
IF $DATA(ICD10OR("k"))!($DATA(ICD10SD("j")))
SET ICDRG=$SELECT(ICDMCC>0:928,1:929)
SET ICDFI=1
QUIT
+81 SET ICDRG=934
SET ICDFI=1
QUIT
End DoDot:1
+82 if ICDFI
GOTO EXIT
+83 ;141=Non-extensive Burns
IF ICDMDC=22
IF $DATA(ICD10PD(141))
SET ICDRG=935
SET ICDFI=1
GOTO EXIT
+84 ;O.R. Procedures with 119=Diagnosis of Other Contact with Health Services
IF ICDMDC=23
IF $DATA(ICD10OR("O"))
IF $DATA(ICD10PD(119))
SET ICDRG=$SELECT(ICDMCC=2:939,ICDMCC=1:940,1:941)
SET ICDFI=1
GOTO EXIT
+85 IF ICDMDC=23
Begin DoDot:1
+86 ;131=Rehabilitation
IF $DATA(ICD10OR(131))
SET ICDRG=$SELECT(ICDMCC>0:945,1:946)
SET ICDFI=1
+87 IF $DATA(ICD10PD(299))
SET ICDRG=$SELECT(ICDMCC>0:947,1:948)
SET ICDFI=1
+88 IF $DATA(ICD10PD(20))
SET ICDRG=$SELECT(ICDMCC>0:949,1:950)
SET ICDFI=1
End DoDot:1
EXIT ;
+1 IF $DATA(ICD10OR("y"))
Begin DoDot:1
+2 IF $DATA(ICD10OR)
IF ICDREL=0
SET ICDRG=$SELECT(ICDMCC=2:984,ICDMCC=1:985,1:986)
SET ICDFI=1
QUIT
End DoDot:1
+3 IF $DATA(ICD10OR("z"))
Begin DoDot:1
+4 IF $DATA(ICD10OR)
IF ICDREL=0
SET ICDRG=$SELECT(ICDMCC=2:987,ICDMCC=1:988,1:989)
SET ICDFI=1
QUIT
End DoDot:1
+5 IF ICDFI
SET ICDFOUND=1
+6 QUIT