代码根据医保局本地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)
整理后