DIP分组器核心c#源代码优化封版,三个城市DIP数据分析

 

 代码根据医保局本地DIP组获取分组数据。

改掉最初愚蠢设计,DIP_CODE与入组无关。

 else//DIP分组规则
            {
           string[] operationlisarray =new string[operationlist.Count];
                for (int i= 0; i < operationlist.Count;i++)
                {
                    operationlisarray[i] = operationlist[i].OPERATION_CODE;
                }
                string icdbeforei = string.Empty;
                List<Drgs_Model.Drg_Local_Weight> liscurrent = new List<Drgs_Model.Drg_Local_Weight>();
                Drgs_Model.Drg_Local_Weight localmax = new Drgs_Model.Drg_Local_Weight();
                Hashtable hsdipoperlist = new Hashtable();
                if (operationlist != null && operationlist.Count > 0)//有手术
                {
                    //string[] dipoperationlist = dipicdoperlist[1].Split('+');
                    for (int i = 5; i > 0; i--)
                    {
                        if (i == 4) continue;//前四位最末尾是小数点,这样的组不存在  例如 C90.0  主诊断前三位C90,前两位C9,一位C,前四位C90.不存在这样的组
                        icdbeforei = mainicdcode.Substring(0, i);
                        liscurrent = lsWeighList.Where(p => p.DIP_ICD == icdbeforei).ToList<Drgs_Model.Drg_Local_Weight>();
                        if (liscurrent.Count > 0)//先通过ICD前几位过滤出列表
                        {
                            // llocal = liscurrent[0];//如果诊断前 i 位在 dip 的列表中找到
                            foreach (Drgs_Model.Drg_Local_Weight diplocal in liscurrent)//保存为哈希表,value 为对应数量+1,最后获取value值最大的
                            {//通过手术列表进行判断
                                if (!string.IsNullOrEmpty(diplocal.DIP_OPERATION_LIST))
                                {
                                    string[] s2 = diplocal.DIP_OPERATION_LIST.Split('+');
                                    if (!hsdipoperlist.ContainsKey(diplocal.DRG_CODE))//计算
                                    {
                                        hsdipoperlist.Add(diplocal.DRG_CODE, 0);
                                    }
                                    foreach (string s22 in s2)
                                    {
                                        if (s22.Contains("/"))
                                        {
                                            string[] s23 = s22.Split('/');
                                            {
                                                foreach(string s233 in s23)
                                                {
                                                    if (operationlisarray.Contains(s233))
                                                    {
                                                        hsdipoperlist[diplocal.DRG_CODE] = Convert.ToInt32(hsdipoperlist[diplocal.DRG_CODE]) + 1;
                                                    }
                                                    else
                                                    {
                                                        hsdipoperlist[diplocal.DRG_CODE] = 0;
                                                    }
                                                }
                                            }
                                        }
                                        else
                                        {
                                            if (operationlisarray.Contains(s22))
                                            {
                                                hsdipoperlist[diplocal.DRG_CODE] = Convert.ToInt32(hsdipoperlist[diplocal.DRG_CODE]) + 1;
                                            }
                                            else
                                            {
                                                hsdipoperlist[diplocal.DRG_CODE] = 0;
                                            }
                                        }
                                    }
                                }
                            }
                            break;
                        }
                    }
                    int max = 0;
                    int iii = 0;
                    string dip_code = string.Empty;
                    foreach (DictionaryEntry fl in hsdipoperlist) //获取文件
                    {
                        if(iii==0)
                        {
                            max = Convert.ToInt32(fl.Value);
                        }
                        iii++;
                        string key = fl.Key.ToString();
                        int Value = Convert.ToInt32(fl.Value); //Value
                        if (Value > max )
                        {
                            dip_code = key;
                            max = Value;
                            localmax = lsWeighList.Where(p => p.DRG_CODE == dip_code).ToList<Drgs_Model.Drg_Local_Weight>()[0];
                        }
                    }
                   
                    if (localmax !=null && !string.IsNullOrEmpty(localmax.DRG_CODE))
                    {
                        Write(input, new OutputDrgGroup() { STATUS = "SUCCESS", MESSAGE = this.Err, DRGGOUP = localmax.DRG_CODE, Drg_Local_Weight = localmax });
                        return new OutputDrgGroup() { STATUS = "SUCCESS", MESSAGE = this.Err, DRGGOUP = localmax.DRG_CODE, Drg_Local_Weight = localmax };
                    }
                    else
                    {
                        for (int i = 5; i >= 0; i--)
                        {
                            icdbeforei = mainicdcode.Substring(0, i);
                            liscurrent = lsWeighList.Where(p => p.DIP_ICD == icdbeforei).ToList<Drgs_Model.Drg_Local_Weight>();
                            if (liscurrent.Count > 0)//从5位开始 4位3 位 2 位 1位 
                            {
                                Write(input, new OutputDrgGroup() { STATUS = "SUCCESS", MESSAGE = this.Err, DRGGOUP = liscurrent[0].DRG_CODE, Drg_Local_Weight = liscurrent[0] });
                                return new OutputDrgGroup() { STATUS = "SUCCESS", MESSAGE = this.Err, DRGGOUP = liscurrent[0].DRG_CODE, Drg_Local_Weight = liscurrent[0] };
                            }
                        }
                    }
            }

DIP分组及事前控制系统界面:

主界面:

分组预测,主诊断,主手术调整。

入组分析,诊断不一致入组、权重、费用不同,手术顺序修改不影响入组。

以下为三个城市数据对比,本地医保DIP组不尽相同。

DIP组命名规则:

       DIP组编码一般以诊断前5位,或前三位,或前两位,或前1位加冒号,然后连接手术,用“/”表示或的关系,用+表示与的关系。这种命名好处在于由名称可以看到诊断和手术列表。弊端:编码有时过长。

一、辽宁某一城市:除新病种外综合病种为如下:

        眼科,耳科主诊断都以H开头,用HE表示耳科,HY表示眼科,在不能入核心组时,会做入综合组判断。

        使用BSZL,SS,ZDXCZ,BSZL作为综合组命名,规则性比较强,利于分组。

二、海南某一城市DIP综合组如下:

完全按照DIP规则定义组名,入组非常容易。

以下入组无需只需要按照正常入组规则计算,算法:ABCD-ABC-A;

三、某省省一城市DIP组

       核心组,综合组命名不同于国家标准库。

       为了适应所有城市分组,在本地组列表增加诊断和手术列表两个字段,用于存储ICD编码前几位,及手术列表(格式:A+B/C+D)

整理后

  • 3
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

条形码D

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值