Browse Source

add:新增新版事前事中

zhanfei 3 days ago
parent
commit
4546420215

+ 477 - 0
Business/HisMainBusiness.cs

@@ -1972,6 +1972,19 @@ namespace PTMedicalInsurance.Business
                         jaFeeDetail[i]["medins_list_codg"] = jaFeeDetail[i]["med_list_codg"].ToString();//耗材院内医疗机构编码传医保目录27位
                         jaFeeDetail[i]["med_list_codg"] = jaFeeDetail[i]["med_list_codg"].ToString().Substring(0, 15);//耗材医保目录传15位
                     }
+
+
+                    string hospApprFlag = jaFeeDetail[i]["hosp_appr_flag"]?.ToString();
+                    JObject expContent = jaFeeDetail[i]["exp_content"] as JObject ?? new JObject();
+                    // 如果审批标志为 "2",添加 medcType 字段
+                    if (hospApprFlag == "2")
+                    {
+                        expContent["medcType"] = "4"; // 1:保留字段2:保留字段3:保留字段4:抢救自费。(带有此代码将按照全自费计算)907:特定药品强行按普通乙类执行
+                    }
+                    // 确保 exp_content 被写回(即使原本不存在)
+                    jaFeeDetail[i]["exp_content"] = expContent;
+
+
                     if (jaFeeDetail[i]["validFlag"].ToString() == "N") continue;
                     jaTmp.Add(jaFeeDetail[i]);
                     if (((i + 1) % singleCount == 0) || ((i + 1) == jaFeeDetail.Count))
@@ -2212,6 +2225,7 @@ namespace PTMedicalInsurance.Business
                         Global.pat.insuplc_admdvs = "";
                         Global.Set.minpacunt_drug_trac_cnt = JsonHelper.getDestValue(joInparam, "insuAdmObj.minpacunt_drug_trac_cnt");
                         Global.Set.mcs_trac_cnt = JsonHelper.getDestValue(joInparam, "insuAdmObj.mcs_trac_cnt");
+                        Global.operationType = JsonHelper.getDestValue(joInparam, "operationType");
                         break;
                     }
                 case "M5C"://门诊结算撤销
@@ -2732,6 +2746,13 @@ namespace PTMedicalInsurance.Business
                 return -1;
             }
             JObject joSumFee = JObject.Parse(outPar);
+
+            #region 住院预结算之前调用3102
+            if (PreOrInprocessAnalysis("IPPreSetTrigScen", "3102", out outPar) != 0)
+            {
+                return -1;
+            }
+            #endregion
             //从云医保平台获取患者详细的医保登记信息
             int type;
             if (funNO == "2206")
@@ -2968,6 +2989,7 @@ namespace PTMedicalInsurance.Business
             }
         }
 
+        /**
         #region【事前事中服务】
         /// <summary>
         /// 事前分析
@@ -3139,5 +3161,460 @@ namespace PTMedicalInsurance.Business
             }
         }
         #endregion
+        **/
+
+        #region 事前事中 新版
+
+        public void getPreAndInProcessConfingure()
+        {
+            IniFile ini = new IniFile(Global.curEvt.path + @"\INSUConfigure.ini");
+            Global.curEvt.ext.isOpenAnalysis = (ini.ReadValue("PreAndInProcessAnalysis", "isOpenAnalysis") == "1");
+            Global.pat.preAndInPro.OPRegTrigScen = ini.ReadValue("PreAndInProcessAnalysis", "OPRegrigTrigScen"); //
+            Global.pat.preAndInPro.OPChargeRegistrationTrigScen = ini.ReadValue("PreAndInProcessAnalysis", "OPChargeRegistrationTrigScen");
+
+            Global.pat.preAndInPro.OPPreSetTrigScen = ini.ReadValue("PreAndInProcessAnalysis", "OPPreSetTrigScen");
+            Global.pat.preAndInPro.OPSetTrigScen = ini.ReadValue("PreAndInProcessAnalysis", "OPSetTrigScen");
+            Global.pat.preAndInPro.IPRegTrigScen = ini.ReadValue("PreAndInProcessAnalysis", "IPRegTrigScen");
+            Global.pat.preAndInPro.IPChargeRegistrationTrigScen = ini.ReadValue("PreAndInProcessAnalysis", "IPChargeRegistrationTrigScen");
+            Global.pat.preAndInPro.IPPreSetTrigScen = ini.ReadValue("PreAndInProcessAnalysis", "IPPreSetTrigScen");
+            Global.pat.preAndInPro.IPSetTrigScen = ini.ReadValue("PreAndInProcessAnalysis", "IPSetTrigScen");
+            Global.pat.preAndInPro.OPOrderTrigScen = ini.ReadValue("PreAndInProcessAnalysis", "OPOrderTrigScen");
+            Global.pat.preAndInPro.IPOrderTrigScen = ini.ReadValue("PreAndInProcessAnalysis", "IPOrderTrigScen");
+            Global.pat.preAndInPro.MedInsLevel = ini.ReadValue("PreAndInProcessAnalysis", "MedInsLevel");
+            Global.pat.preAndInPro.MedInsType = ini.ReadValue("PreAndInProcessAnalysis", "MedInsType");
+            Global.pat.preAndInPro.OPMedType = ini.ReadValue("PreAndInProcessAnalysis", "OPMedType");
+            Global.pat.preAndInPro.IPMedType = ini.ReadValue("PreAndInProcessAnalysis", "IPMedType");
+        }
+
+        public bool ShouldExecutePreAndInProcess(string scen)
+        {
+            bool result = false; // 用于在 finally 中记录返回值
+
+            try
+            {
+                Global.writeLog($"Global.curEvt.ext.isOpenAnalysis:{Global.curEvt.ext.isOpenAnalysis}");
+                if (!Global.curEvt.ext.isOpenAnalysis)
+                {
+                    result = false;
+                    return result;
+                }
+
+                switch (scen)
+                {
+                    case "OPRegTrigScen":
+                        if ((!string.IsNullOrEmpty(Global.pat.preAndInPro.OPRegTrigScen))
+                            && Global.pat.preAndInPro.OPRegTrigScen != "0")
+                        {
+                            result = true;
+                        }
+                        else
+                        {
+                            result = false;
+                        }
+                        return result;
+
+                    case "OPChargeRegistrationTrigScen":
+                        if ((!string.IsNullOrEmpty(Global.pat.preAndInPro.OPChargeRegistrationTrigScen))
+                            && Global.pat.preAndInPro.OPChargeRegistrationTrigScen != "0")
+                        {
+                            result = true;
+                        }
+                        else
+                        {
+                            result = false;
+                        }
+                        return result;
+
+                    case "IPRegTrigScen":
+                        if ((!string.IsNullOrEmpty(Global.pat.preAndInPro.IPRegTrigScen))
+                            && Global.pat.preAndInPro.IPRegTrigScen != "0")
+                        {
+                            result = true;
+                        }
+                        else
+                        {
+                            result = false;
+                        }
+                        return result;
+
+                    case "IPChargeRegistrationTrigScen":
+                        if ((!string.IsNullOrEmpty(Global.pat.preAndInPro.IPChargeRegistrationTrigScen))
+                            && Global.pat.preAndInPro.IPChargeRegistrationTrigScen != "0")
+                        {
+                            result = true;
+                        }
+                        else
+                        {
+                            result = false;
+                        }
+                        return result;
+
+                    case "IPOrderTrigScen":
+                        if ((!string.IsNullOrEmpty(Global.pat.preAndInPro.IPOrderTrigScen))
+                            && Global.pat.preAndInPro.IPOrderTrigScen != "0")
+                        {
+                            result = true;
+                        }
+                        else
+                        {
+                            result = false;
+                        }
+                        return result;
+
+                    case "OPSetTrigScen":
+                        if ((!string.IsNullOrEmpty(Global.pat.preAndInPro.OPSetTrigScen))
+                            && Global.pat.preAndInPro.OPSetTrigScen != "0")
+                        {
+                            result = true;
+                        }
+                        else
+                        {
+                            result = false;
+                        }
+                        return result;
+
+                    case "OPPreSetTrigScen":
+                        if ((!string.IsNullOrEmpty(Global.pat.preAndInPro.OPPreSetTrigScen))
+                            && Global.pat.preAndInPro.OPPreSetTrigScen != "0")
+                        {
+                            result = true;
+                        }
+                        else
+                        {
+                            result = false;
+                        }
+                        return result;
+
+                    case "IPSetTrigScen":
+                        if ((!string.IsNullOrEmpty(Global.pat.preAndInPro.IPSetTrigScen))
+                            && Global.pat.preAndInPro.IPSetTrigScen != "0")
+                        {
+                            result = true;
+                        }
+                        else
+                        {
+                            result = false;
+                        }
+                        return result;
+
+                    case "IPPreSetTrigScen":
+                        if ((!string.IsNullOrEmpty(Global.pat.preAndInPro.IPPreSetTrigScen))
+                            && Global.pat.preAndInPro.IPPreSetTrigScen != "0")
+                        {
+                            result = true;
+                        }
+                        else
+                        {
+                            result = false;
+                        }
+                        return result;
+
+                    default:
+                        result = false;
+                        return result;
+                }
+            }
+            catch (Exception ex)
+            {
+                throw;
+            }
+            finally
+            {
+                Global.writeLog($"scen:{scen}, shouldExecutePreAndInProcess:{result}");
+            }
+        }
+
+        /// <summary>
+        /// 事前分析
+        /// </summary>
+        /// <param name="outparam"></param>
+        /// <returns></returns>
+        public int PreAnalysis(string trig_scen, string inparam, out string outparam)
+        {
+            outparam = "";
+            try
+            {
+                ////先签到
+                //JObject jo9001Rtn = new JObject();
+                //cBus.signIn(out jo9001Rtn);
+
+                //获取HIS返回的内容
+                if (hIS.PreAnalysis(out outparam) != 0)
+                {
+                    return -1;
+                }
+
+
+                PreAndInProcessAnalysis preAnalysis = new PreAndInProcessAnalysis(outparam);
+                if (preAnalysis.setPatientByHisBaseInfo(out outparam) != 0)
+                {
+                    return -1;
+                }
+                JObject joInput = new JObject(); ;
+                if (preAnalysis.Get3101Inpar(trig_scen, Global.pat, out joInput, out outparam) != 0)
+                {
+                    return -1;
+                }
+
+                JObject joRtn = invoker.invokeCenterService("3101", JsonHelper.setCenterInpar("3101", joInput));
+                if (JsonHelper.parseCenterRtnValue(joRtn, out outparam) != 0)
+                {
+                    return -1;
+                }
+                else
+                {
+                    JArray jaResult = JArray.Parse(JsonHelper.getDestValue(joRtn, "output.result"));
+                    if (jaResult.HasValues)
+                    {
+                        PreAndInProcessAnalysisForm paipaForm = new PreAndInProcessAnalysisForm(joRtn);
+                        //if (paipaForm.ShowDialog() == DialogResult.OK)
+                        //{
+                        //    //【3103】事前事中服务反馈服务
+                        //    if (PreAnalysisFeedBack("3101", paipaForm.JrID, out outparam) != 0)
+                        //    {
+                        //        outparam = "【3103】事前事中服务反馈服务" + outparam;
+                        //        return -1;
+                        //    }
+                        //    else
+                        //    {
+                        //        return 0;
+                        //    }
+                        //}
+                        //else
+                        //{
+                        //    outparam = "事前事中审核不通过,操作员取消!";
+                        //    return -1;
+                        //}
+                        if (tools.ShowAppDiaglog(paipaForm) == DialogResult.OK)
+                        {
+                            JObject joData = new JObject();
+                            JObject joTmp = new JObject();
+                            joTmp.Add("warn_type", 1);
+                            joTmp.Add("warns", paipaForm.jaWarns);
+                            joData.Add("data", joTmp);
+                            joRtn = invoker.invokeCenterService("3103", JsonHelper.setCenterInpar("3103", joData));
+
+
+                            if (JsonHelper.parseCenterRtnValue(joRtn, out outparam) != 0)
+                            {
+                                return -1;
+                            }
+                            else
+                            {
+                                return 0;
+                            }
+                        }
+                        else
+                        {
+                            outparam = "事前事中审核不通过,操作员取消!";
+                            return -1;
+                        }
+                    }
+                    else
+                        return 0;
+                }
+
+
+            }
+            catch (Exception ex)
+            {
+                outparam = ex.Message;
+                return -1;
+            }
+        }
+
+
+        /// <summary>
+        /// 事中分析
+        /// </summary>
+        /// <param name="outparam"></param>
+        /// <returns></returns>
+        public int InProcessAnalysis(string trig_scen, out string outparam)
+        {
+            outparam = "";
+            try
+            {
+                //获取HIS返回的内容
+                if (hIS.PreAnalysis(out outparam) != 0)
+                {
+                    return -1;
+                }
+
+                PreAndInProcessAnalysis preAnalysis = new PreAndInProcessAnalysis(outparam);
+                if (preAnalysis.setPatientByHisBaseInfo(out outparam) != 0)
+                {
+                    return -1;
+                }
+                //JObject joInput = preAnalysis.Get3101Inpar("5", Global.pat);
+                JObject joInput = new JObject(); ;
+                if (preAnalysis.Get3101Inpar(trig_scen, Global.pat, out joInput, out outparam) != 0)
+                {
+                    return -1;
+                }
+                JObject joRtn = invoker.invokeCenterService("3102", JsonHelper.setCenterInpar("3102", joInput));
+                if (JsonHelper.parseCenterRtnValue(joRtn, out outparam) != 0)
+                {
+                    return -1;
+                }
+                else
+                {
+                    JArray jaResult = JArray.Parse(JsonHelper.getDestValue(joRtn, "output.result"));
+                    if (jaResult.HasValues)
+                    {
+                        PreAndInProcessAnalysisForm paipaForm = new PreAndInProcessAnalysisForm(joRtn);
+                        if (tools.ShowAppDiaglog(paipaForm) == DialogResult.OK)
+                        {
+                            JObject joData = new JObject();
+                            JObject joTmp = new JObject();
+                            joTmp.Add("warn_type", 1);
+                            joTmp.Add("warns", paipaForm.jaWarns);
+                            joData.Add("data", joTmp);
+                            joRtn = invoker.invokeCenterService("3103", JsonHelper.setCenterInpar("3103", joData));
+
+
+                            if (JsonHelper.parseCenterRtnValue(joRtn, out outparam) != 0)
+                            {
+                                return -1;
+                            }
+                            else
+                            {
+                                return 0;
+                            }
+                        }
+                        else
+                        {
+                            outparam = "事前事中审核不通过,操作员取消!";
+                            return -1;
+                        }
+                    }
+                    else
+                        return 0;
+                }
+            }
+            catch (Exception ex)
+            {
+                outparam = ex.Message;
+                return -1;
+            }
+            finally
+            {
+                Global.writeLog("InProcessAnalysis", "", outparam);
+            }
+        }
+
+        public string GetPreAndInProcessFieldValue(string fieldName)
+        {
+            var instance = Global.pat.preAndInPro;
+            var field = typeof(PreAndInProcessAnalysises).GetField(fieldName);
+            if (field == null)
+                return "未获取到对应的场景类型!";
+            return (field.GetValue(instance) ?? "为获取到对应的场景值!").ToString();
+        }
+        public int PreOrInprocessAnalysis(string trig_scen, string funNO, out string outparam)
+        {
+            outparam = "";
+            int iResult;
+            if (ShouldExecutePreAndInProcess(trig_scen))
+            {
+                if (funNO == "3102")
+                {
+                    iResult = InProcessAnalysis(GetPreAndInProcessFieldValue(trig_scen), out outparam);
+                }
+                else
+                {
+                    iResult = PreAnalysis(GetPreAndInProcessFieldValue(trig_scen), "", out outparam);
+                }
+
+                if (iResult != 0)
+                {
+                    if (MessageBox.Show($"【{funNO}】医保明细审核事中分析服务调用失败!是否继续结算?", "警告", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
+                    {
+                        return 0;
+                    }
+                    else
+                    {
+                        return -1;
+                    }
+                }
+
+                return 0;
+            }
+            else
+                return 0;
+        }
+
+        public int PreAnalysisFeedBack(string funNo, string jrId, out string outparam)
+        {
+            outparam = "";
+            try
+            {
+                outparam = "";
+                string WarnType = "";
+                //【3103】事前事中服务反馈服务
+                if (funNo == "3101")
+                    WarnType = "1";
+                else
+                if (funNo == "3102")
+                    WarnType = "2";
+
+                JObject joInput3103Warns = new JObject();
+                joInput3103Warns.Add("warn_rslt_id", jrId);
+                joInput3103Warns.Add("dspo_way", Global.Set.dspoWay);
+                joInput3103Warns.Add("dspo_way_rea", Global.Set.dspoWayRea);
+
+                JArray ja3103Warns = new JArray();
+                ja3103Warns.Add(joInput3103Warns);
+
+                JObject joInput3103 = new JObject();
+                joInput3103.Add("warn_type", WarnType); //反馈类型 1.事前 2.事中
+                joInput3103.Add("warns", ja3103Warns);
+
+                JObject joInput = new JObject();
+                joInput.Add("data", joInput3103);
+
+                JObject jo3103Rtn = invoker.invokeCenterService("3103", JsonHelper.setCenterInpar("3103", joInput.ToString()));
+                if (JsonHelper.parseCenterRtnValue(jo3103Rtn, out string errMsg) != 0)
+                {
+                    outparam = JsonHelper.setExceptionJson(-1, "【3103】事前事中服务反馈服务调用失败:", errMsg).ToString();
+                    return -1;
+                }
+
+                return 0;
+            }
+            catch (Exception ex)
+            {
+                outparam = ex.Message;
+                return -1;
+            }
+            finally
+            {
+                Global.writeLog("PreAnalysisFeedBack", "", outparam);
+            }
+        }
+        public void GetAgentFunHisInfo(string businessType, JObject joInparam, out Patients pat)
+        {
+            pat = new Patients();
+            switch (businessType)
+            {
+                case "PreAndInProcessAnalysis"://事前事中
+                    {
+                        pat.adm_Dr = int.Parse(JsonHelper.getDestValue(joInparam, "insuAdmObj.admID"));
+                        pat.psn_no = JsonHelper.getDestValue(joInparam, "insuAdmObj.psn_no");
+                        pat.mdtrtID = JsonHelper.getDestValue(joInparam, "insuAdmObj.mdtrt_id");
+                        pat.insuplc_admdvs = JsonHelper.getDestValue(joInparam, "insuAdmObj.insuplc_admdvs");
+                        pat.name = JsonHelper.getDestValue(joInparam, "insuAdmObj.psn_name");
+                        pat.billID = JsonHelper.getDestValue(joInparam, "params[0].billID");
+                        Global.pat.insuType = JsonHelper.getDestValue(joInparam, "insuAdmObj.insutype");
+                        break;
+                    }
+                default:
+                    {
+                        break;
+                    }
+
+            }
+
+        }
+        #endregion
     }
 }

+ 38 - 0
Business/IrisServices.cs

@@ -1728,6 +1728,44 @@ namespace PTMedicalInsurance.Business
             }
         }
 
+        /// <summary>
+        /// 查询登记信息
+        /// </summary>
+        /// <param name="type"></param>
+        /// <param name="outParam"></param>
+        /// <returns></returns>
+        public int queryRegisterInfo(List<int> type, out string outParam)
+        {
+            JObject joTmp = new JObject();
+            string errMsg = "";
+            try
+            {
+                joTmp.Add("HospitalDr", Global.inf.hospitalDr);
+                joTmp.Add("InterfaceDr", Global.inf.interfaceDr);
+                joTmp.Add("admID", Global.pat.adm_Dr);
+                joTmp.Add("mdtrt_id", Global.pat.mdtrtID);
+                joTmp.Add("type", string.Join(",", type));
+
+                JObject joRtn = invoker.invokeInsuService(JsonHelper.setIrisInpar("09010050", joTmp).ToString(), "查询云平台患者登记信息");
+
+                if (JsonHelper.parseIrisRtnValue(joRtn, out errMsg) != 0)
+                {
+                    outParam = errMsg;
+                    return -1;
+                }
+                else
+                {
+                    outParam = joRtn.ToString();
+                    return 0;
+                }
+            }
+            catch (Exception ex)
+            {
+                outParam = "查询云平台患者登记信息:" + ex.Message;
+                return -1;
+            }
+        }
+
         /// <summary>
         /// 插入患者该次就诊参保信息
         /// </summary>

+ 399 - 107
Business/PreAndInProcessAnalysis.cs

@@ -1,15 +1,14 @@
 using Newtonsoft.Json.Linq;
+using PTMedicalInsurance.Common;
 using PTMedicalInsurance.Helper;
 using PTMedicalInsurance.Variables;
 using System;
 using System.Collections.Generic;
-using System.Globalization;
 using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
 using System.Windows.Forms;
 
-
 namespace PTMedicalInsurance.Business
 {
     class PreAndInProcessAnalysis
@@ -30,6 +29,7 @@ namespace PTMedicalInsurance.Business
                 JObject jo = JObject.Parse(inpar);
                 JObject joResult = JObject.FromObject(jo["result"]);
                 patient_dtos = JArray.FromObject(joResult["patient_dtos"]);
+
                 fsi_encounter_dtos = JArray.FromObject(patient_dtos[0]["fsi_encounter_dtos"]);
                 fsi_diagnose_dtos = JArray.FromObject(fsi_encounter_dtos[0]["fsi_diagnose_dtos"]);
                 fsi_order_dtos = JArray.FromObject(fsi_encounter_dtos[0]["fsi_order_dtos"]);
@@ -72,35 +72,100 @@ namespace PTMedicalInsurance.Business
 
         #endregion
 
-        public JObject Get3101Inpar(string trig_scen,Patients p)
+        //public JObject Get3101Inpar(string trig_scen,Patients p)
+        //{
+        //    try
+        //    {
+        //        JObject joInpar = new JObject();
+        //        joInpar.Add("syscode", "YBJK");
+        //        joInpar.Add("patient_dtos", GetPatient_dtos(trig_scen, p));
+        //        joInpar.Add("rule_ids", "");
+        //        joInpar.Add("task_id", GetMsgID());
+        //        joInpar.Add("trig_scen", trig_scen);
+        //        JObject joData = new JObject();
+        //        joData.Add("data",joInpar);
+        //        return joData;
+        //    }
+        //    catch (Exception ex)
+        //    {
+        //        MessageBox.Show("Get3101Inpar:" + ex.Message);
+        //        return null;
+        //    }
+        //}
+
+        public int Get3101Inpar(string trig_scen, Patients p, out JObject joData, out string errMsg)
         {
+            joData = new JObject();
+            errMsg = "";
             try
             {
-                JArray ruleIds = new JArray();
                 JObject joInpar = new JObject();
-                joInpar.Add("syscode", "ims");
-                joInpar.Add("patient_dtos", GetPatient_dtos(trig_scen, p));
-                joInpar.Add("rule_ids", ruleIds);
+                joInpar.Add("syscode", "YBJK");
+                JArray jaPatientDtos = new JArray();
+
+                if (GetPatient_dtos(trig_scen, p, out jaPatientDtos, out errMsg) != 0)
+                {
+                    return -1;
+                }
+                joInpar.Add("patient_dtos", jaPatientDtos);
+                joInpar.Add("rule_ids", new JArray());
                 joInpar.Add("task_id", GetMsgID());
                 joInpar.Add("trig_scen", trig_scen);
-                JObject joData = new JObject();
-                joData.Add("data",joInpar);
-                return joData;
+                joData.Add("data", joInpar);
+
+                return 0;
             }
             catch (Exception ex)
             {
-                MessageBox.Show("Get3101Inpar:" + ex.Message);
-                return null;
+                errMsg = ex.Message;
+                return -1;
             }
         }
 
+        
+
         private string GetMsgID()
         {
             return Global.inf.hospitalNO + DateTime.Now.ToString("yyyyMMddHHmmssffff");
         }
 
-        public JArray GetPatient_dtos(string trig_scen, Patients p)
+        //public JArray GetPatient_dtos(string trig_scen, Patients p)
+        //{
+        //    try
+        //    {
+        //        string curr_mdtrt_id = p.mdtrtID;
+        //        if (string.IsNullOrEmpty(curr_mdtrt_id))
+        //        {
+        //            curr_mdtrt_id = Global.pat.adm_Dr.ToString();
+        //        }
+        //        JObject joInpar = new JObject();
+        //        joInpar.Add("patn_id", p.psn_no);
+        //        joInpar.Add("patn_name", p.name);
+        //        string gend = p.gend;
+        //        if (gend == "男") gend = "1";
+        //        if (gend == "女") gend = "2";
+        //        joInpar.Add("gend",gend);
+        //        joInpar.Add("brdy", p.brdy);
+        //        if (p.insuplc_admdvs == "") p.insuplc_admdvs = Global.pat.insuplc_admdvs;
+        //        joInpar.Add("poolarea", p.insuplc_admdvs);
+        //        joInpar.Add("curr_mdtrt_id", curr_mdtrt_id);
+        //        joInpar.Add("fsi_encounter_dtos", GetFsi_encounter_dtos(trig_scen,p));
+        //        joInpar.Add("fsi_his_data_dto", new JArray());
+        //        JArray ja = new JArray();
+        //        ja.Add(joInpar);
+        //        return ja;
+        //    }
+        //    catch (Exception ex)
+        //    {
+        //        MessageBox.Show("GetPatient_dtos:" + ex.Message);
+        //        return null;
+        //    }
+        //}
+
+        public int GetPatient_dtos(string trig_scen, Patients p,out JArray ja, out string errMsg)
         {
+            ja = new JArray();
+            errMsg = "";
             try
             {
                 string curr_mdtrt_id = p.mdtrtID;
@@ -116,24 +181,108 @@ namespace PTMedicalInsurance.Business
                 if (gend == "女") gend = "2";
                 joInpar.Add("gend", gend);
                 joInpar.Add("brdy", p.brdy);
-                if (string.IsNullOrEmpty(p.insuplc_admdvs)) p.insuplc_admdvs = Global.pat.insuplc_admdvs;
+                if (p.insuplc_admdvs == "") p.insuplc_admdvs = Global.pat.insuplc_admdvs;
                 joInpar.Add("poolarea", p.insuplc_admdvs);
                 joInpar.Add("curr_mdtrt_id", curr_mdtrt_id);
-                joInpar.Add("fsi_encounter_dtos", GetFsi_encounter_dtos(trig_scen, p));
+                JArray jaFsiEncounterDtos = new JArray();
+                if (GetFsi_encounter_dtos(trig_scen, p, out jaFsiEncounterDtos, out errMsg) != 0)
+                {
+                    return -1;
+                }
+                joInpar.Add("fsi_encounter_dtos", jaFsiEncounterDtos);
                 joInpar.Add("fsi_his_data_dto", new JArray());
-                JArray ja = new JArray();
+                
                 ja.Add(joInpar);
-                return ja;
+                return 0;
             }
             catch (Exception ex)
             {
-                MessageBox.Show("GetPatient_dtos:" + ex.Message);
-                return null;
+                errMsg = "GetPatient_dtos:" + ex.Message;
+                return -1;
             }
         }
 
-        public JArray GetFsi_encounter_dtos(string trig_scen, Patients p)
+        //public JArray GetFsi_encounter_dtos(string trig_scen, Patients p,out string errMsg)
+        //{
+        //    try
+        //    {
+        //        JObject jofsi_encounter_dtos = JObject.FromObject(fsi_encounter_dtos[0]);
+        //        JObject joInpar = new JObject(); 
+        //        string mdtrtID = p.mdtrtID;
+        //        if (string.IsNullOrEmpty(mdtrtID)) mdtrtID = Global.pat.adm_Dr.ToString();
+        //        joInpar.Add("mdtrt_id", mdtrtID);  //就诊标识
+        //        joInpar.Add("medins_id", Global.inf.hospitalNO);  //医疗服务机构标识
+        //        joInpar.Add("medins_name", Global.inf.hospitalName);  //医疗机构名称
+        //        joInpar.Add("medins_admdvs", Global.inf.areaCode);  //医疗机构行政区划编码
+        //        joInpar.Add("medins_type", "A");  //医疗服务机构类型
+        //        joInpar.Add("medins_lv", "04");  //医疗机构等级
+        //        joInpar.Add("wardarea_codg", JsonHelper.getDestValue(jofsi_encounter_dtos, "wardarea_codg"));  //病区标识
+        //        joInpar.Add("wardno", JsonHelper.getDestValue(jofsi_encounter_dtos, "wardno"));  //病房号
+        //        joInpar.Add("bedno", JsonHelper.getDestValue(jofsi_encounter_dtos, "bedno"));  //病床号
+        //        joInpar.Add("adm_date", JsonHelper.getDestValue(jofsi_encounter_dtos, "adm_date"));  //入院日期
+        //        joInpar.Add("dscg_date", JsonHelper.getDestValue(jofsi_encounter_dtos, "dscg_date"));  //出院日期
+        //        joInpar.Add("dscg_main_dise_codg", JsonHelper.getDestValue(jofsi_encounter_dtos, "dscg_main_dise_codg"));  //主诊断编码
+        //        joInpar.Add("dscg_main_dise_name", JsonHelper.getDestValue(jofsi_encounter_dtos, "dscg_main_dise_name"));  //主诊断名称
+        //        joInpar.Add("fsi_diagnose_dtos", GetFsi_diagnose__dtos(trig_scen, p));  //诊断信息DTO
+        //        joInpar.Add("dr_codg", JsonHelper.getDestValue(jofsi_encounter_dtos, "dr_codg"));  //医师标识
+        //        joInpar.Add("adm_dept_codg", JsonHelper.getDestValue(jofsi_encounter_dtos, "adm_dept_codg"));  //入院科室标识
+        //        joInpar.Add("adm_dept_name", JsonHelper.getDestValue(jofsi_encounter_dtos, "adm_dept_name"));  //入院科室名称
+        //        joInpar.Add("dscg_dept_codg", JsonHelper.getDestValue(jofsi_encounter_dtos, "dscg_dept_codg"));  //出院科室标识
+        //        joInpar.Add("dscg_dept_name", JsonHelper.getDestValue(jofsi_encounter_dtos, "dscg_dept_name"));  //出院科室名称
+        //        joInpar.Add("med_mdtrt_type", JsonHelper.getDestValue(jofsi_encounter_dtos, "med_mdtrt_type"));  //就诊类型
+        //        string med_type = JsonHelper.getDestValue(jofsi_encounter_dtos, "med_type");
+        //        joInpar.Add("med_type", med_type);  //医疗类别
+
+        //        JArray jaFsiOrderDtos = GetFsi__order_dtos(trig_scen, p,out errMsg);
+        //        if (jaFsiOrderDtos == null)
+        //        {
+        //            return null;
+        //        }
+        //        joInpar.Add("fsi_order_dtos",jaFsiOrderDtos);  //处方(医嘱)信息
+        //        string matn_stas = JsonHelper.getDestValue(jofsi_encounter_dtos, "matn_stas");
+        //        if (string.IsNullOrEmpty(matn_stas)) matn_stas = "0";
+        //        joInpar.Add("matn_stas",matn_stas );  //生育状态
+        //        joInpar.Add("medfee_sumamt", JsonHelper.getDestValue(jofsi_encounter_dtos, "medfee_sumamt"));  //总费用
+        //        joInpar.Add("ownpay_amt", JsonHelper.getDestValue(jofsi_encounter_dtos, "ownpay_amt"));  //自费金额
+        //        joInpar.Add("selfpay_amt", JsonHelper.getDestValue(jofsi_encounter_dtos, "selfpay_amt"));  //自付金额
+        //        joInpar.Add("acct_payamt", JsonHelper.getDestValue(jofsi_encounter_dtos, "acct_payamt"));  //个人账户支付金额
+        //        joInpar.Add("ma_amt", JsonHelper.getDestValue(jofsi_encounter_dtos, "ma_amt"));  //救助金支付金额
+        //        joInpar.Add("hifp_payamt", JsonHelper.getDestValue(jofsi_encounter_dtos, "hifp_payamt"));  //统筹金支付金额
+        //        joInpar.Add("setl_totlnum", JsonHelper.getDestValue(jofsi_encounter_dtos, "setl_totlnum"));  //结算总次数
+        //        string insutype = JsonHelper.getDestValue(jofsi_encounter_dtos, "insutype");
+        //        if (insutype =="") insutype = Global.pat.insuType;
+        //        joInpar.Add("insutype", insutype);  //险种
+        //        string reimFlag = JsonHelper.getDestValue(jofsi_encounter_dtos, "reim_flag");
+        //        // 报销标志(必填)
+        //        if (string.IsNullOrEmpty(reimFlag))
+        //        {
+        //            reimFlag = "1";
+        //        }
+        //        joInpar.Add("reim_flag", reimFlag);
+        //        // 异地结算标志(必填)
+        //        string outSetlFlag = JsonHelper.getDestValue(jofsi_encounter_dtos, "out_setl_flag");
+        //        if (string.IsNullOrEmpty(outSetlFlag))
+        //        {
+        //            outSetlFlag = Utils.isOtherCity()?"1":"0";
+        //        }
+        //        joInpar.Add("out_setl_flag", outSetlFlag);
+        //        joInpar.Add("fsi_operation_dtos", GetFsi__operation__dtos(trig_scen,p));  //手术操作集合
+
+        //        JArray ja = new JArray();
+        //        ja.Add(joInpar);
+        //        return ja; 
+        //    }
+        //    catch (Exception ex)
+        //    {
+        //        MessageBox.Show("GetPatient_dtos:" + ex.Message);
+        //        return null;
+        //    }
+        //}
+
+        public int GetFsi_encounter_dtos(string trig_scen, Patients p, out JArray ja, out string errMsg)
         {
+            ja = new JArray();
+            errMsg = "";
             try
             {
                 JObject jofsi_encounter_dtos = JObject.FromObject(fsi_encounter_dtos[0]);
@@ -144,8 +293,8 @@ namespace PTMedicalInsurance.Business
                 joInpar.Add("medins_id", Global.inf.hospitalNO);  //医疗服务机构标识
                 joInpar.Add("medins_name", Global.inf.hospitalName);  //医疗机构名称
                 joInpar.Add("medins_admdvs", Global.inf.areaCode);  //医疗机构行政区划编码
-                joInpar.Add("medins_type", "A");  //医疗服务机构类型
-                joInpar.Add("medins_lv", "03");  //医疗机构等级
+                joInpar.Add("medins_type", Global.pat.preAndInPro.MedInsType);  //医疗服务机构类型
+                joInpar.Add("medins_lv", Global.pat.preAndInPro.MedInsLevel);  //医疗机构等级
                 joInpar.Add("wardarea_codg", JsonHelper.getDestValue(jofsi_encounter_dtos, "wardarea_codg"));  //病区标识
                 joInpar.Add("wardno", JsonHelper.getDestValue(jofsi_encounter_dtos, "wardno"));  //病房号
                 joInpar.Add("bedno", JsonHelper.getDestValue(jofsi_encounter_dtos, "bedno"));  //病床号
@@ -153,16 +302,28 @@ namespace PTMedicalInsurance.Business
                 joInpar.Add("dscg_date", JsonHelper.getDestValue(jofsi_encounter_dtos, "dscg_date"));  //出院日期
                 joInpar.Add("dscg_main_dise_codg", JsonHelper.getDestValue(jofsi_encounter_dtos, "dscg_main_dise_codg"));  //主诊断编码
                 joInpar.Add("dscg_main_dise_name", JsonHelper.getDestValue(jofsi_encounter_dtos, "dscg_main_dise_name"));  //主诊断名称
-                joInpar.Add("fsi_diagnose_dtos", GetFsi_diagnose_dtos(trig_scen, p));  //诊断信息DTO
+                joInpar.Add("fsi_diagnose_dtos", GetFsi_diagnose__dtos(trig_scen, p));  //诊断信息DTO
                 joInpar.Add("dr_codg", JsonHelper.getDestValue(jofsi_encounter_dtos, "dr_codg"));  //医师标识
                 joInpar.Add("adm_dept_codg", JsonHelper.getDestValue(jofsi_encounter_dtos, "adm_dept_codg"));  //入院科室标识
                 joInpar.Add("adm_dept_name", JsonHelper.getDestValue(jofsi_encounter_dtos, "adm_dept_name"));  //入院科室名称
                 joInpar.Add("dscg_dept_codg", JsonHelper.getDestValue(jofsi_encounter_dtos, "dscg_dept_codg"));  //出院科室标识
                 joInpar.Add("dscg_dept_name", JsonHelper.getDestValue(jofsi_encounter_dtos, "dscg_dept_name"));  //出院科室名称
                 joInpar.Add("med_mdtrt_type", JsonHelper.getDestValue(jofsi_encounter_dtos, "med_mdtrt_type"));  //就诊类型
-                string med_type = JsonHelper.getDestValue(jofsi_encounter_dtos, "med_type");
-                joInpar.Add("med_type", med_type);  //医疗类别
-                joInpar.Add("fsi_order_dtos", GetFsi_order_dtos(trig_scen, p));  //处方(医嘱)信息
+                //med_type  传过来的可能与实际不符,比如挂号的12,但是医生站调用是未结算之前的,从配置文件走
+                //string med_type = JsonHelper.getDestValue(jofsi_encounter_dtos, "med_type");
+                //if (string.IsNullOrEmpty(med_type))
+                //{
+                //    med_type = Global.pat.medType;
+
+                //}
+                joInpar.Add("med_type", Global.pat.medType);  //医疗类别
+
+                JArray jaFsiOrderDtos = new JArray();
+                if (GetFsi__order_dtos(trig_scen, p, out jaFsiOrderDtos, out errMsg) != 0)
+                {
+                    return -1;
+                }
+                joInpar.Add("fsi_order_dtos", jaFsiOrderDtos);  //处方(医嘱)信息
                 string matn_stas = JsonHelper.getDestValue(jofsi_encounter_dtos, "matn_stas");
                 if (string.IsNullOrEmpty(matn_stas)) matn_stas = "0";
                 joInpar.Add("matn_stas", matn_stas);  //生育状态
@@ -187,72 +348,28 @@ namespace PTMedicalInsurance.Business
                 string outSetlFlag = JsonHelper.getDestValue(jofsi_encounter_dtos, "out_setl_flag");
                 if (string.IsNullOrEmpty(outSetlFlag))
                 {
-                    outSetlFlag = isOtherCity() ? "1" : "0";
+                    outSetlFlag = Utils.isOtherCity() ? "1" : "0";
                 }
                 joInpar.Add("out_setl_flag", outSetlFlag);
                 joInpar.Add("fsi_operation_dtos", GetFsi__operation__dtos(trig_scen, p));  //手术操作集合
 
-                JArray ja = new JArray();
                 ja.Add(joInpar);
-                return ja;
+                return 0;
             }
             catch (Exception ex)
             {
-                MessageBox.Show("GetPatient_dtos:" + ex.Message);
-                return null;
+                errMsg = "GetFsi_encounter_dtos:" + ex.Message;
+                return -1;
             }
         }
 
-        public static bool isOtherCity()
-        {
-            return isOtherCity(getAreaCode());
-        }
-        /// <summary>
-        /// 省内异地
-        /// </summary>
-        /// <returns></returns>
-        public static bool isOtherCity(string areaCode)
-        {
-            if (!string.IsNullOrEmpty(areaCode) && areaCode.Length > 4 && areaCode.Substring(0, 4) != Global.inf.areaCode.Substring(0, 4))
-            {
-                return true;
-            }
-            return false;
-        }
 
-        private static string getAreaCode()
-        {
-            string areaCode = Global.pat.insuplc_admdvs ?? Global.inf.areaCode;
-            if (Global.pat.OtherProv == 1)
-            {
-                areaCode = Global.pat.card.SearchAdmCode;
-            }
-            return areaCode;
-        }
 
-        public JArray GetFsi_diagnose_dtos(string trig_scen, Patients p)
+        public JArray GetFsi_diagnose__dtos(string trig_scen, Patients p)
         {
             try
             {
-                //JArray ja = new JArray();
-                for (int i = 0; i < fsi_diagnose_dtos.Count; i++)
-                {
-                    //JObject jo = new JObject();
-                    //jo.Add("dise_id", fsi_diagnose_dtos[i]["dise_id"].ToString());
-                    //jo.Add("inout_dise_type", fsi_diagnose_dtos[i]["inout_dise_type"].ToString());
-                    //jo.Add("maindise_flag", fsi_diagnose_dtos[i]["maindise_flag"].ToString());
-                    //jo.Add("dias_srt_no", fsi_diagnose_dtos[i]["dias_srt_no"].ToString());
-                    //jo.Add("dise_codg", fsi_diagnose_dtos[i]["dise_codg"].ToString());
-                    //jo.Add("dise_name", fsi_diagnose_dtos[i]["dise_name"].ToString());
-                    //jo.Add("dise_date", fsi_diagnose_dtos[i]["dise_date"].ToString());
-                    //ja.Add(jo);
-
-                    fsi_diagnose_dtos[i]["inout_dise_type"] = fsi_diagnose_dtos[i]["inout_dise_type"].ToString();
-                    fsi_diagnose_dtos[i]["maindise_flag"] = fsi_diagnose_dtos[i]["maindise_flag"].ToString();
-                    fsi_diagnose_dtos[i]["dias_srt_no"] = fsi_diagnose_dtos[i]["dias_srt_no"].ToString();                    
-                }
-
-                    return fsi_diagnose_dtos;
+                return fsi_diagnose_dtos;
             }
             catch (Exception ex)
             {
@@ -275,10 +392,136 @@ namespace PTMedicalInsurance.Business
             }
         }
 
+        //#region 组织入参
+        //public JArray GetFsi__order_dtos(string trig_scen, Patients p)
+        //{
+        //    string errMsg = "";
+        //    try
+        //    {
+        //        for (int i = 0; i < fsi_order_dtos.Count; i++)
+        //        {
+        //            decimal pric = decimal.Parse(fsi_order_dtos[i]["pric"].ToString());
+        //            fsi_order_dtos[i]["pric"] = pric.ToString("#0.00");
+        //            fsi_order_dtos[i]["hilist_pric"] = pric.ToString("#0.00");
+        //        }
+        //        //调用医保平台进行转换
+        //        if (mis.convertFsiOrderDtos(fsi_order_dtos, out errMsg) != 0)
+        //        {
+        //            return null;
+        //        }
+        //        else
+        //        {
+        //            JObject joRtn = JObject.Parse(errMsg);
+        //            return JArray.FromObject(joRtn["data"]);
+        //        }
+
+        //    }
+        //    catch (Exception ex)
+        //    {
+        //        MessageBox.Show("GetFsi__order_dtos:" + ex.Message);
+        //        return null;
+        //    }
+        //}
+        //#endregion
+
         #region 组织入参
-        public JArray GetFsi_order_dtos(string trig_scen, Patients p)
+        //public JArray GetFsi__order_dtos(string trig_scen, Patients p,out string errMsg)
+        //{
+        //    errMsg = "";
+        //    try
+        //    {
+        //        for (int i = 0; i < fsi_order_dtos.Count; i++)
+        //        {
+        //            decimal pric = decimal.Parse(fsi_order_dtos[i]["pric"].ToString());
+        //            fsi_order_dtos[i]["pric"] = pric.ToString("#0.00");
+        //            fsi_order_dtos[i]["hilist_pric"] = pric.ToString("#0.00");
+        //            if (string.IsNullOrEmpty(Convert.ToString(fsi_order_dtos[i]["spec"])))
+        //            {
+        //                fsi_order_dtos[i]["spec"] = fsi_order_dtos[i]["spec_unt"];
+        //            }
+        //            /*if (fsi_order_dtos[i]["hilist_code"].ToString().Substring(0, 1) == "C")
+        //            {
+        //                fsi_order_dtos[i]["chrg_type"] = "08";
+        //            }else if (fsi_order_dtos[i]["hilist_code"].ToString().Substring(0, 1) == "X")
+        //            {
+        //                fsi_order_dtos[i]["chrg_type"] = "09";
+        //            }
+        //            else if (fsi_order_dtos[i]["hilist_code"].ToString().Substring(0, 1) == "Z")
+        //            {
+        //                fsi_order_dtos[i]["chrg_type"] = "11";
+        //            }else
+        //            {
+        //                fsi_order_dtos[i]["chrg_type"] = "14";
+        //            }*/
+        //            fsi_order_dtos[i]["chrg_type"] = "14";//HIS未传收费类别,临时全部默认位其他费
+        //        }
+        //        //调用医保平台进行转换
+        //        if (mis.convertFsiOrderDtos(fsi_order_dtos, out errMsg) != 0)
+        //        {
+        //            //throw new Exception(errMsg);
+        //            return null;
+        //        }
+        //        else
+        //        {
+        //            JObject joRtn = JObject.Parse(errMsg);
+        //            JArray jarry = JArray.FromObject(joRtn["data"]);
+        //            string name = "";
+        //            for (int m = 0; m < jarry.Count; m++)
+        //            {
+        //                jarry[m]["drord_dr_profttl"] = "2";
+        //                if (string.IsNullOrEmpty(Convert.ToString(jarry[m]["hilist_lv"]))||Convert.ToString(jarry[m]["hilist_lv"]).ToString()==" ")
+        //                {
+        //                    name = name + "和" + Convert.ToString(jarry[m]["hosplist_code"])+":"+Convert.ToString(jarry[m]["hosplist_name"]);
+        //                    jarry[m]["hilist_lv"] = "02";
+        //                }
+        //                if (string.IsNullOrEmpty(Convert.ToString(jarry[m]["hilist_code"]))) continue;
+
+        //                if (jarry[m]["hilist_code"].ToString().Substring(0, 1) == "C")
+        //                {
+        //                    jarry[m]["chrg_type"] = "08";
+        //                    jarry[m]["hilist_type"] = "301";
+        //                }
+        //                else if (jarry[m]["hilist_code"].ToString().Substring(0, 1) == "X")
+        //                {
+        //                    jarry[m]["chrg_type"] = "09";
+        //                    jarry[m]["hilist_type"] = "101";
+        //                }
+        //                else if (jarry[m]["hilist_code"].ToString().Substring(0, 1) == "Z")
+        //                {
+        //                    jarry[m]["chrg_type"] = "11";
+        //                    jarry[m]["hilist_type"] = "101";
+        //                }
+        //                else
+        //                {
+        //                    jarry[m]["chrg_type"] = "14";
+        //                    jarry[m]["hilist_type"] = "201";
+        //                }
+        //                if (string.IsNullOrEmpty(Convert.ToString(jarry[m]["spec"].ToString())))
+        //                {
+        //                    jarry[m]["spec"] = jarry[m]["spec_unt"];
+        //                }
+        //            }
+        //            if (!string.IsNullOrEmpty(name))
+        //            {
+        //                MessageBox.Show("以下项目甲乙丙医保大类需要更新:" + name);
+        //            }
+
+        //            //return JArray.FromObject(joRtn["data"]);
+        //            return jarry;
+        //        }
+        //    }
+        //    catch (Exception ex)
+        //    {
+        //        MessageBox.Show("GetFsi__order_dtos:" + ex.Message);
+        //        return null;
+        //    }
+        //}
+
+
+        public int GetFsi__order_dtos(string trig_scen, Patients p, out JArray jarry, out string errMsg)
         {
-            string errMsg = "";
+            errMsg = "";
+            jarry = new JArray();
             try
             {
                 for (int i = 0; i < fsi_order_dtos.Count; i++)
@@ -286,51 +529,100 @@ namespace PTMedicalInsurance.Business
                     decimal pric = decimal.Parse(fsi_order_dtos[i]["pric"].ToString());
                     fsi_order_dtos[i]["pric"] = pric.ToString("#0.00");
                     fsi_order_dtos[i]["hilist_pric"] = pric.ToString("#0.00");
+                    if (string.IsNullOrEmpty(Convert.ToString(fsi_order_dtos[i]["spec"])))
+                    {
+                        fsi_order_dtos[i]["spec"] = fsi_order_dtos[i]["spec_unt"];
+                    }
+                    /*if (fsi_order_dtos[i]["hilist_code"].ToString().Substring(0, 1) == "C")
+                    {
+                        fsi_order_dtos[i]["chrg_type"] = "08";
+                    }else if (fsi_order_dtos[i]["hilist_code"].ToString().Substring(0, 1) == "X")
+                    {
+                        fsi_order_dtos[i]["chrg_type"] = "09";
+                    }
+                    else if (fsi_order_dtos[i]["hilist_code"].ToString().Substring(0, 1) == "Z")
+                    {
+                        fsi_order_dtos[i]["chrg_type"] = "11";
+                    }else
+                    {
+                        fsi_order_dtos[i]["chrg_type"] = "14";
+                    }*/
+                    fsi_order_dtos[i]["chrg_type"] = "14";//HIS未传收费类别,临时全部默认位其他费
+                    Global.writeLog($"fsi_order_dtos[{i}]:{fsi_order_dtos[i]}");
+                    if (fsi_order_dtos[i]["extend_order_map"] != null)
+                    {
+                        Global.writeLog($"{i}:存在extend_order_map");
 
-                    if (fsi_order_dtos[i]["drord_bhvr"].ToString() == "2")
-                        fsi_order_dtos[i]["drord_bhvr"] = "0";
-                    else
-                        fsi_order_dtos[i]["drord_bhvr"] = fsi_order_dtos[i]["drord_bhvr"].ToString(); //转成字符串类型
-
-                    string dateStr = fsi_order_dtos[i]["drord_begn_date"].ToString();
-                    if (DateTime.TryParseExact(dateStr, "yyyy-MM-dd", CultureInfo.InvariantCulture, DateTimeStyles.None, out DateTime date))
-                        fsi_order_dtos[i]["drord_begn_date"] = date.ToString("yyyy-MM-dd HH:mm:ss");
-
-                    if (fsi_order_dtos[i]["drord_dr_profttl"].ToString() == "231") //主任医师
-                        fsi_order_dtos[i]["drord_dr_profttl"] = "5";
-                    else if (fsi_order_dtos[i]["drord_dr_profttl"].ToString() == "232") //副主任医师
-                        fsi_order_dtos[i]["drord_dr_profttl"] = "4";
-                    else if (fsi_order_dtos[i]["drord_dr_profttl"].ToString() == "233") //主诊医师
-                        fsi_order_dtos[i]["drord_dr_profttl"] = "3";
-                    else if (fsi_order_dtos[i]["drord_dr_profttl"].ToString() == "234") //医师
-                        fsi_order_dtos[i]["drord_dr_profttl"] = "2";
-                    else if (fsi_order_dtos[i]["drord_dr_profttl"].ToString() == "235") //医士
-                        fsi_order_dtos[i]["drord_dr_profttl"] = "1";
-
-                    //fsi_order_dtos[i]["validFlag"].Remove();
+                        string extend_order_map = fsi_order_dtos[i]["extend_order_map"].ToString();
+                        if (extend_order_map != "")
+                        {
+                            fsi_order_dtos[i]["extend_order_map"] = JObject.Parse(extend_order_map);
+                        }
+                    }
                 }
-
-                //MessageBox.Show(fsi_order_dtos.ToString());
-
+                Global.writeLog($"fsi_order_dtos:{fsi_order_dtos}");
                 //调用医保平台进行转换
                 if (mis.convertFsiOrderDtos(fsi_order_dtos, out errMsg) != 0)
                 {
-                    MessageBox.Show(errMsg);
-                    return null;
+                    return -1;
                 }
                 else
                 {
                     JObject joRtn = JObject.Parse(errMsg);
-                    return JArray.FromObject(joRtn["data"]);
-                }
+                    jarry = JArray.FromObject(joRtn["data"]);
+                    string name = "";
+                    for (int m = 0; m < jarry.Count; m++)
+                    {
+                        //jarry[m]["drord_dr_profttl"] = "2";
+                        if (string.IsNullOrEmpty(Convert.ToString(jarry[m]["hilist_lv"])) || Convert.ToString(jarry[m]["hilist_lv"]).ToString() == " ")
+                        {
+                            name = name + "和" + Convert.ToString(jarry[m]["hosplist_code"]) + ":" + Convert.ToString(jarry[m]["hosplist_name"]);
+                            jarry[m]["hilist_lv"] = "02";
+                        }
+                        if (string.IsNullOrEmpty(Convert.ToString(jarry[m]["hilist_code"]))) continue;
 
+                        if (jarry[m]["hilist_code"].ToString().Substring(0, 1) == "C")
+                        {
+                            jarry[m]["chrg_type"] = "08";
+                            jarry[m]["hilist_type"] = "301";
+                        }
+                        else if (jarry[m]["hilist_code"].ToString().Substring(0, 1) == "X")
+                        {
+                            jarry[m]["chrg_type"] = "09";
+                            jarry[m]["hilist_type"] = "101";
+                        }
+                        else if (jarry[m]["hilist_code"].ToString().Substring(0, 1) == "Z")
+                        {
+                            jarry[m]["chrg_type"] = "11";
+                            jarry[m]["hilist_type"] = "101";
+                        }
+                        else
+                        {
+                            jarry[m]["chrg_type"] = "14";
+                            jarry[m]["hilist_type"] = "201";
+                        }
+                        if (string.IsNullOrEmpty(Convert.ToString(jarry[m]["spec"].ToString())))
+                        {
+                            jarry[m]["spec"] = jarry[m]["spec_unt"];
+                        }
+                    }
+                    if (!string.IsNullOrEmpty(name))
+                    {
+                        MessageBox.Show("以下项目甲乙丙医保大类需要更新:" + name);
+                    }
+
+                    //return JArray.FromObject(joRtn["data"]);
+                    return 0;
+                }
             }
             catch (Exception ex)
             {
                 MessageBox.Show("GetFsi__order_dtos:" + ex.Message);
-                return null;
+                errMsg = "GetFsi__order_dtos:" + ex.Message;
+                return -1;
             }
         }
+
         #endregion
     }
 

+ 3 - 3
CCunMI.csproj

@@ -357,10 +357,10 @@
     <Compile Include="Forms\JsonMappingForm.Designer.cs">
       <DependentUpon>JsonMappingForm.cs</DependentUpon>
     </Compile>
-    <Compile Include="Forms\PreAndInProcessAnalysisForm.cs">
+    <Compile Include="Forms\PreAndInProcessAnalysis\PreAndInProcessAnalysisForm.cs">
       <SubType>Form</SubType>
     </Compile>
-    <Compile Include="Forms\PreAndInProcessAnalysisForm.designer.cs">
+    <Compile Include="Forms\PreAndInProcessAnalysis\PreAndInProcessAnalysisForm.Designer.cs">
       <DependentUpon>PreAndInProcessAnalysisForm.cs</DependentUpon>
     </Compile>
     <Compile Include="Forms\PrescriptionCirculation\GridViewSetter.cs" />
@@ -564,7 +564,7 @@
     <EmbeddedResource Include="Forms\JsonMappingForm.resx">
       <DependentUpon>JsonMappingForm.cs</DependentUpon>
     </EmbeddedResource>
-    <EmbeddedResource Include="Forms\PreAndInProcessAnalysisForm.resx">
+    <EmbeddedResource Include="Forms\PreAndInProcessAnalysis\PreAndInProcessAnalysisForm.resx">
       <DependentUpon>PreAndInProcessAnalysisForm.cs</DependentUpon>
     </EmbeddedResource>
     <EmbeddedResource Include="Forms\PrescriptionCirculation\PrescriptionCirculation.resx">

+ 0 - 716
Forms/PreAndInProcessAnalysisForm.Designer.cs

@@ -1,716 +0,0 @@
-namespace PTMedicalInsurance.Forms
-{
-    partial class PreAndInProcessAnalysisForm
-    {
-        /// <summary>
-        /// Required designer variable.
-        /// </summary>
-        private System.ComponentModel.IContainer components = null;
-
-        /// <summary>
-        /// Clean up any resources being used.
-        /// </summary>
-        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
-        protected override void Dispose(bool disposing)
-        {
-            if (disposing && (components != null))
-            {
-                components.Dispose();
-            }
-            base.Dispose(disposing);
-        }
-
-        #region Windows Form Designer generated code
-
-        /// <summary>
-        /// Required method for Designer support - do not modify
-        /// the contents of this method with the code editor.
-        /// </summary>
-        private void InitializeComponent()
-        {
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle();
-            this.uiPanel1 = new Sunny.UI.UIPanel();
-            this.btnModify = new Sunny.UI.UIButton();
-            this.btn_Continue = new Sunny.UI.UIButton();
-            this.btnCancle = new Sunny.UI.UIButton();
-            this.uiPanel2 = new Sunny.UI.UIPanel();
-            this.uiGroupBox5 = new Sunny.UI.UIGroupBox();
-            this.rtb_DspoWayRea = new Sunny.UI.UIRichTextBox();
-            this.uiGroupBox2 = new Sunny.UI.UIGroupBox();
-            this.dgvVolaDetailDtos = new Sunny.UI.UIDataGridView();
-            this.uiGroupBox1 = new Sunny.UI.UIGroupBox();
-            this.tbRuleName = new Sunny.UI.UITextBox();
-            this.tbVolaEvid = new Sunny.UI.UITextBox();
-            this.tbVolaBhvrType = new Sunny.UI.UITextBox();
-            this.tbSevDeg = new Sunny.UI.UITextBox();
-            this.tbVolaAmtStas = new Sunny.UI.UITextBox();
-            this.tbVolaAmt = new Sunny.UI.UITextBox();
-            this.tbMdtrdID = new Sunny.UI.UITextBox();
-            this.tbPatID = new Sunny.UI.UITextBox();
-            this.tbRuleID = new Sunny.UI.UITextBox();
-            this.tbJrID = new Sunny.UI.UITextBox();
-            this.uiLabel6 = new Sunny.UI.UILabel();
-            this.uiLabel7 = new Sunny.UI.UILabel();
-            this.uiLabel8 = new Sunny.UI.UILabel();
-            this.uiLabel9 = new Sunny.UI.UILabel();
-            this.uiLabel10 = new Sunny.UI.UILabel();
-            this.uiLabel5 = new Sunny.UI.UILabel();
-            this.uiLabel4 = new Sunny.UI.UILabel();
-            this.uiLabel3 = new Sunny.UI.UILabel();
-            this.uiLabel2 = new Sunny.UI.UILabel();
-            this.uiLabel1 = new Sunny.UI.UILabel();
-            this.uiGroupBox4 = new Sunny.UI.UIGroupBox();
-            this.rbtVolaContent = new Sunny.UI.UIRichTextBox();
-            this.uiGroupBox3 = new Sunny.UI.UIGroupBox();
-            this.dgvVolaItems = new Sunny.UI.UIDataGridView();
-            this.uiPanel1.SuspendLayout();
-            this.uiPanel2.SuspendLayout();
-            this.uiGroupBox5.SuspendLayout();
-            this.uiGroupBox2.SuspendLayout();
-            ((System.ComponentModel.ISupportInitialize)(this.dgvVolaDetailDtos)).BeginInit();
-            this.uiGroupBox1.SuspendLayout();
-            this.uiGroupBox4.SuspendLayout();
-            this.uiGroupBox3.SuspendLayout();
-            ((System.ComponentModel.ISupportInitialize)(this.dgvVolaItems)).BeginInit();
-            this.SuspendLayout();
-            // 
-            // uiPanel1
-            // 
-            this.uiPanel1.Controls.Add(this.btnModify);
-            this.uiPanel1.Controls.Add(this.btn_Continue);
-            this.uiPanel1.Controls.Add(this.btnCancle);
-            this.uiPanel1.Dock = System.Windows.Forms.DockStyle.Bottom;
-            this.uiPanel1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.uiPanel1.Location = new System.Drawing.Point(0, 676);
-            this.uiPanel1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
-            this.uiPanel1.MinimumSize = new System.Drawing.Size(1, 1);
-            this.uiPanel1.Name = "uiPanel1";
-            this.uiPanel1.Size = new System.Drawing.Size(1258, 65);
-            this.uiPanel1.TabIndex = 0;
-            this.uiPanel1.Text = null;
-            this.uiPanel1.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
-            this.uiPanel1.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
-            // 
-            // btnModify
-            // 
-            this.btnModify.Cursor = System.Windows.Forms.Cursors.Hand;
-            this.btnModify.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.btnModify.Location = new System.Drawing.Point(1137, 6);
-            this.btnModify.MinimumSize = new System.Drawing.Size(1, 1);
-            this.btnModify.Name = "btnModify";
-            this.btnModify.Size = new System.Drawing.Size(114, 53);
-            this.btnModify.TabIndex = 3;
-            this.btnModify.Text = "修改医嘱";
-            this.btnModify.TipsFont = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.btnModify.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
-            this.btnModify.Click += new System.EventHandler(this.btnModify_Click);
-            // 
-            // btn_Continue
-            // 
-            this.btn_Continue.Cursor = System.Windows.Forms.Cursors.Hand;
-            this.btn_Continue.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.btn_Continue.Location = new System.Drawing.Point(1013, 6);
-            this.btn_Continue.MinimumSize = new System.Drawing.Size(1, 1);
-            this.btn_Continue.Name = "btn_Continue";
-            this.btn_Continue.Size = new System.Drawing.Size(114, 53);
-            this.btn_Continue.TabIndex = 2;
-            this.btn_Continue.Text = "继续执行";
-            this.btn_Continue.TipsFont = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.btn_Continue.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
-            this.btn_Continue.Click += new System.EventHandler(this.btn_Continue_Click);
-            // 
-            // btnCancle
-            // 
-            this.btnCancle.Cursor = System.Windows.Forms.Cursors.Hand;
-            this.btnCancle.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.btnCancle.Location = new System.Drawing.Point(8, 6);
-            this.btnCancle.MinimumSize = new System.Drawing.Size(1, 1);
-            this.btnCancle.Name = "btnCancle";
-            this.btnCancle.Size = new System.Drawing.Size(114, 53);
-            this.btnCancle.TabIndex = 1;
-            this.btnCancle.Text = "取消";
-            this.btnCancle.TipsFont = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.btnCancle.Visible = false;
-            this.btnCancle.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
-            this.btnCancle.Click += new System.EventHandler(this.btnCancle_Click);
-            // 
-            // uiPanel2
-            // 
-            this.uiPanel2.Controls.Add(this.uiGroupBox5);
-            this.uiPanel2.Controls.Add(this.uiGroupBox2);
-            this.uiPanel2.Controls.Add(this.uiGroupBox1);
-            this.uiPanel2.Dock = System.Windows.Forms.DockStyle.Fill;
-            this.uiPanel2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.uiPanel2.Location = new System.Drawing.Point(270, 0);
-            this.uiPanel2.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
-            this.uiPanel2.MinimumSize = new System.Drawing.Size(1, 1);
-            this.uiPanel2.Name = "uiPanel2";
-            this.uiPanel2.Size = new System.Drawing.Size(988, 676);
-            this.uiPanel2.TabIndex = 1;
-            this.uiPanel2.Text = null;
-            this.uiPanel2.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
-            this.uiPanel2.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
-            // 
-            // uiGroupBox5
-            // 
-            this.uiGroupBox5.Controls.Add(this.rtb_DspoWayRea);
-            this.uiGroupBox5.Dock = System.Windows.Forms.DockStyle.Fill;
-            this.uiGroupBox5.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.uiGroupBox5.Location = new System.Drawing.Point(0, 569);
-            this.uiGroupBox5.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
-            this.uiGroupBox5.MinimumSize = new System.Drawing.Size(1, 1);
-            this.uiGroupBox5.Name = "uiGroupBox5";
-            this.uiGroupBox5.Padding = new System.Windows.Forms.Padding(0, 24, 0, 0);
-            this.uiGroupBox5.Size = new System.Drawing.Size(988, 107);
-            this.uiGroupBox5.TabIndex = 24;
-            this.uiGroupBox5.Text = "处理原因";
-            this.uiGroupBox5.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
-            this.uiGroupBox5.TitleInterval = 0;
-            this.uiGroupBox5.TitleTop = 8;
-            this.uiGroupBox5.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
-            // 
-            // rtb_DspoWayRea
-            // 
-            this.rtb_DspoWayRea.Dock = System.Windows.Forms.DockStyle.Fill;
-            this.rtb_DspoWayRea.FillColor = System.Drawing.Color.White;
-            this.rtb_DspoWayRea.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.rtb_DspoWayRea.Location = new System.Drawing.Point(0, 24);
-            this.rtb_DspoWayRea.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
-            this.rtb_DspoWayRea.MinimumSize = new System.Drawing.Size(1, 1);
-            this.rtb_DspoWayRea.Name = "rtb_DspoWayRea";
-            this.rtb_DspoWayRea.Padding = new System.Windows.Forms.Padding(2);
-            this.rtb_DspoWayRea.ShowText = false;
-            this.rtb_DspoWayRea.Size = new System.Drawing.Size(988, 83);
-            this.rtb_DspoWayRea.TabIndex = 0;
-            this.rtb_DspoWayRea.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
-            this.rtb_DspoWayRea.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
-            // 
-            // uiGroupBox2
-            // 
-            this.uiGroupBox2.Controls.Add(this.dgvVolaDetailDtos);
-            this.uiGroupBox2.Dock = System.Windows.Forms.DockStyle.Top;
-            this.uiGroupBox2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.uiGroupBox2.Location = new System.Drawing.Point(0, 389);
-            this.uiGroupBox2.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
-            this.uiGroupBox2.MinimumSize = new System.Drawing.Size(1, 1);
-            this.uiGroupBox2.Name = "uiGroupBox2";
-            this.uiGroupBox2.Padding = new System.Windows.Forms.Padding(0, 24, 0, 0);
-            this.uiGroupBox2.Size = new System.Drawing.Size(988, 180);
-            this.uiGroupBox2.TabIndex = 23;
-            this.uiGroupBox2.Text = "违规明细";
-            this.uiGroupBox2.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
-            this.uiGroupBox2.TitleInterval = 0;
-            this.uiGroupBox2.TitleTop = 8;
-            this.uiGroupBox2.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
-            // 
-            // dgvVolaDetailDtos
-            // 
-            this.dgvVolaDetailDtos.AllowUserToAddRows = false;
-            dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(243)))), ((int)(((byte)(249)))), ((int)(((byte)(255)))));
-            this.dgvVolaDetailDtos.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
-            this.dgvVolaDetailDtos.BackgroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(243)))), ((int)(((byte)(249)))), ((int)(((byte)(255)))));
-            this.dgvVolaDetailDtos.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single;
-            dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
-            dataGridViewCellStyle2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
-            dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            dataGridViewCellStyle2.ForeColor = System.Drawing.Color.White;
-            dataGridViewCellStyle2.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
-            dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
-            dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
-            this.dgvVolaDetailDtos.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
-            this.dgvVolaDetailDtos.ColumnHeadersHeight = 32;
-            this.dgvVolaDetailDtos.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
-            dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
-            dataGridViewCellStyle3.BackColor = System.Drawing.Color.White;
-            dataGridViewCellStyle3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            dataGridViewCellStyle3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
-            dataGridViewCellStyle3.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(236)))), ((int)(((byte)(255)))));
-            dataGridViewCellStyle3.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
-            dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
-            this.dgvVolaDetailDtos.DefaultCellStyle = dataGridViewCellStyle3;
-            this.dgvVolaDetailDtos.Dock = System.Windows.Forms.DockStyle.Fill;
-            this.dgvVolaDetailDtos.EnableHeadersVisualStyles = false;
-            this.dgvVolaDetailDtos.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.dgvVolaDetailDtos.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(104)))), ((int)(((byte)(173)))), ((int)(((byte)(255)))));
-            this.dgvVolaDetailDtos.Location = new System.Drawing.Point(0, 24);
-            this.dgvVolaDetailDtos.Name = "dgvVolaDetailDtos";
-            dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
-            dataGridViewCellStyle4.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(243)))), ((int)(((byte)(249)))), ((int)(((byte)(255)))));
-            dataGridViewCellStyle4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            dataGridViewCellStyle4.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
-            dataGridViewCellStyle4.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
-            dataGridViewCellStyle4.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
-            dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
-            this.dgvVolaDetailDtos.RowHeadersDefaultCellStyle = dataGridViewCellStyle4;
-            dataGridViewCellStyle5.BackColor = System.Drawing.Color.White;
-            dataGridViewCellStyle5.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            dataGridViewCellStyle5.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
-            dataGridViewCellStyle5.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(236)))), ((int)(((byte)(255)))));
-            dataGridViewCellStyle5.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
-            this.dgvVolaDetailDtos.RowsDefaultCellStyle = dataGridViewCellStyle5;
-            this.dgvVolaDetailDtos.RowTemplate.Height = 23;
-            this.dgvVolaDetailDtos.SelectedIndex = -1;
-            this.dgvVolaDetailDtos.Size = new System.Drawing.Size(988, 156);
-            this.dgvVolaDetailDtos.TabIndex = 1;
-            this.dgvVolaDetailDtos.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
-            // 
-            // uiGroupBox1
-            // 
-            this.uiGroupBox1.Controls.Add(this.tbRuleName);
-            this.uiGroupBox1.Controls.Add(this.tbVolaEvid);
-            this.uiGroupBox1.Controls.Add(this.tbVolaBhvrType);
-            this.uiGroupBox1.Controls.Add(this.tbSevDeg);
-            this.uiGroupBox1.Controls.Add(this.tbVolaAmtStas);
-            this.uiGroupBox1.Controls.Add(this.tbVolaAmt);
-            this.uiGroupBox1.Controls.Add(this.tbMdtrdID);
-            this.uiGroupBox1.Controls.Add(this.tbPatID);
-            this.uiGroupBox1.Controls.Add(this.tbRuleID);
-            this.uiGroupBox1.Controls.Add(this.tbJrID);
-            this.uiGroupBox1.Controls.Add(this.uiLabel6);
-            this.uiGroupBox1.Controls.Add(this.uiLabel7);
-            this.uiGroupBox1.Controls.Add(this.uiLabel8);
-            this.uiGroupBox1.Controls.Add(this.uiLabel9);
-            this.uiGroupBox1.Controls.Add(this.uiLabel10);
-            this.uiGroupBox1.Controls.Add(this.uiLabel5);
-            this.uiGroupBox1.Controls.Add(this.uiLabel4);
-            this.uiGroupBox1.Controls.Add(this.uiLabel3);
-            this.uiGroupBox1.Controls.Add(this.uiLabel2);
-            this.uiGroupBox1.Controls.Add(this.uiLabel1);
-            this.uiGroupBox1.Controls.Add(this.uiGroupBox4);
-            this.uiGroupBox1.Dock = System.Windows.Forms.DockStyle.Top;
-            this.uiGroupBox1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.uiGroupBox1.Location = new System.Drawing.Point(0, 0);
-            this.uiGroupBox1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
-            this.uiGroupBox1.MinimumSize = new System.Drawing.Size(1, 1);
-            this.uiGroupBox1.Name = "uiGroupBox1";
-            this.uiGroupBox1.Padding = new System.Windows.Forms.Padding(0, 32, 0, 0);
-            this.uiGroupBox1.Size = new System.Drawing.Size(988, 389);
-            this.uiGroupBox1.TabIndex = 22;
-            this.uiGroupBox1.Text = "违规信息";
-            this.uiGroupBox1.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
-            this.uiGroupBox1.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
-            // 
-            // tbRuleName
-            // 
-            this.tbRuleName.Cursor = System.Windows.Forms.Cursors.IBeam;
-            this.tbRuleName.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.tbRuleName.Location = new System.Drawing.Point(164, 345);
-            this.tbRuleName.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
-            this.tbRuleName.MinimumSize = new System.Drawing.Size(1, 16);
-            this.tbRuleName.Name = "tbRuleName";
-            this.tbRuleName.ShowText = false;
-            this.tbRuleName.Size = new System.Drawing.Size(1123, 24);
-            this.tbRuleName.TabIndex = 41;
-            this.tbRuleName.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
-            this.tbRuleName.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
-            // 
-            // tbVolaEvid
-            // 
-            this.tbVolaEvid.Cursor = System.Windows.Forms.Cursors.IBeam;
-            this.tbVolaEvid.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.tbVolaEvid.Location = new System.Drawing.Point(164, 310);
-            this.tbVolaEvid.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
-            this.tbVolaEvid.MinimumSize = new System.Drawing.Size(1, 16);
-            this.tbVolaEvid.Name = "tbVolaEvid";
-            this.tbVolaEvid.ShowText = false;
-            this.tbVolaEvid.Size = new System.Drawing.Size(1123, 24);
-            this.tbVolaEvid.TabIndex = 38;
-            this.tbVolaEvid.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
-            this.tbVolaEvid.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
-            // 
-            // tbVolaBhvrType
-            // 
-            this.tbVolaBhvrType.Cursor = System.Windows.Forms.Cursors.IBeam;
-            this.tbVolaBhvrType.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.tbVolaBhvrType.Location = new System.Drawing.Point(164, 275);
-            this.tbVolaBhvrType.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
-            this.tbVolaBhvrType.MinimumSize = new System.Drawing.Size(1, 16);
-            this.tbVolaBhvrType.Name = "tbVolaBhvrType";
-            this.tbVolaBhvrType.ShowText = false;
-            this.tbVolaBhvrType.Size = new System.Drawing.Size(321, 24);
-            this.tbVolaBhvrType.TabIndex = 40;
-            this.tbVolaBhvrType.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
-            this.tbVolaBhvrType.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
-            // 
-            // tbSevDeg
-            // 
-            this.tbSevDeg.Cursor = System.Windows.Forms.Cursors.IBeam;
-            this.tbSevDeg.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.tbSevDeg.Location = new System.Drawing.Point(164, 240);
-            this.tbSevDeg.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
-            this.tbSevDeg.MinimumSize = new System.Drawing.Size(1, 16);
-            this.tbSevDeg.Name = "tbSevDeg";
-            this.tbSevDeg.ShowText = false;
-            this.tbSevDeg.Size = new System.Drawing.Size(321, 24);
-            this.tbSevDeg.TabIndex = 39;
-            this.tbSevDeg.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
-            this.tbSevDeg.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
-            // 
-            // tbVolaAmtStas
-            // 
-            this.tbVolaAmtStas.Cursor = System.Windows.Forms.Cursors.IBeam;
-            this.tbVolaAmtStas.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.tbVolaAmtStas.Location = new System.Drawing.Point(164, 205);
-            this.tbVolaAmtStas.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
-            this.tbVolaAmtStas.MinimumSize = new System.Drawing.Size(1, 16);
-            this.tbVolaAmtStas.Name = "tbVolaAmtStas";
-            this.tbVolaAmtStas.ShowText = false;
-            this.tbVolaAmtStas.Size = new System.Drawing.Size(321, 24);
-            this.tbVolaAmtStas.TabIndex = 37;
-            this.tbVolaAmtStas.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
-            this.tbVolaAmtStas.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
-            // 
-            // tbVolaAmt
-            // 
-            this.tbVolaAmt.Cursor = System.Windows.Forms.Cursors.IBeam;
-            this.tbVolaAmt.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.tbVolaAmt.Location = new System.Drawing.Point(164, 170);
-            this.tbVolaAmt.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
-            this.tbVolaAmt.MinimumSize = new System.Drawing.Size(1, 16);
-            this.tbVolaAmt.Name = "tbVolaAmt";
-            this.tbVolaAmt.ShowText = false;
-            this.tbVolaAmt.Size = new System.Drawing.Size(321, 24);
-            this.tbVolaAmt.TabIndex = 36;
-            this.tbVolaAmt.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
-            this.tbVolaAmt.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
-            // 
-            // tbMdtrdID
-            // 
-            this.tbMdtrdID.Cursor = System.Windows.Forms.Cursors.IBeam;
-            this.tbMdtrdID.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.tbMdtrdID.Location = new System.Drawing.Point(164, 135);
-            this.tbMdtrdID.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
-            this.tbMdtrdID.MinimumSize = new System.Drawing.Size(1, 16);
-            this.tbMdtrdID.Name = "tbMdtrdID";
-            this.tbMdtrdID.ShowText = false;
-            this.tbMdtrdID.Size = new System.Drawing.Size(321, 24);
-            this.tbMdtrdID.TabIndex = 34;
-            this.tbMdtrdID.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
-            this.tbMdtrdID.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
-            // 
-            // tbPatID
-            // 
-            this.tbPatID.Cursor = System.Windows.Forms.Cursors.IBeam;
-            this.tbPatID.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.tbPatID.Location = new System.Drawing.Point(164, 100);
-            this.tbPatID.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
-            this.tbPatID.MinimumSize = new System.Drawing.Size(1, 16);
-            this.tbPatID.Name = "tbPatID";
-            this.tbPatID.ShowText = false;
-            this.tbPatID.Size = new System.Drawing.Size(321, 24);
-            this.tbPatID.TabIndex = 35;
-            this.tbPatID.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
-            this.tbPatID.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
-            // 
-            // tbRuleID
-            // 
-            this.tbRuleID.Cursor = System.Windows.Forms.Cursors.IBeam;
-            this.tbRuleID.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.tbRuleID.Location = new System.Drawing.Point(164, 65);
-            this.tbRuleID.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
-            this.tbRuleID.MinimumSize = new System.Drawing.Size(1, 16);
-            this.tbRuleID.Name = "tbRuleID";
-            this.tbRuleID.ShowText = false;
-            this.tbRuleID.Size = new System.Drawing.Size(321, 24);
-            this.tbRuleID.TabIndex = 33;
-            this.tbRuleID.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
-            this.tbRuleID.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
-            // 
-            // tbJrID
-            // 
-            this.tbJrID.Cursor = System.Windows.Forms.Cursors.IBeam;
-            this.tbJrID.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.tbJrID.Location = new System.Drawing.Point(164, 30);
-            this.tbJrID.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
-            this.tbJrID.MinimumSize = new System.Drawing.Size(1, 16);
-            this.tbJrID.Name = "tbJrID";
-            this.tbJrID.ShowText = false;
-            this.tbJrID.Size = new System.Drawing.Size(321, 24);
-            this.tbJrID.TabIndex = 32;
-            this.tbJrID.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
-            this.tbJrID.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
-            // 
-            // uiLabel6
-            // 
-            this.uiLabel6.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.uiLabel6.Location = new System.Drawing.Point(54, 345);
-            this.uiLabel6.Name = "uiLabel6";
-            this.uiLabel6.Size = new System.Drawing.Size(90, 20);
-            this.uiLabel6.TabIndex = 31;
-            this.uiLabel6.Text = "规则名称";
-            this.uiLabel6.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
-            this.uiLabel6.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
-            // 
-            // uiLabel7
-            // 
-            this.uiLabel7.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.uiLabel7.Location = new System.Drawing.Point(54, 310);
-            this.uiLabel7.Name = "uiLabel7";
-            this.uiLabel7.Size = new System.Drawing.Size(90, 20);
-            this.uiLabel7.TabIndex = 30;
-            this.uiLabel7.Text = "违规依据";
-            this.uiLabel7.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
-            this.uiLabel7.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
-            // 
-            // uiLabel8
-            // 
-            this.uiLabel8.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.uiLabel8.Location = new System.Drawing.Point(9, 275);
-            this.uiLabel8.Name = "uiLabel8";
-            this.uiLabel8.Size = new System.Drawing.Size(135, 20);
-            this.uiLabel8.TabIndex = 29;
-            this.uiLabel8.Text = "违规行为分类";
-            this.uiLabel8.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
-            this.uiLabel8.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
-            // 
-            // uiLabel9
-            // 
-            this.uiLabel9.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.uiLabel9.Location = new System.Drawing.Point(54, 240);
-            this.uiLabel9.Name = "uiLabel9";
-            this.uiLabel9.Size = new System.Drawing.Size(90, 20);
-            this.uiLabel9.TabIndex = 28;
-            this.uiLabel9.Text = "严重程度";
-            this.uiLabel9.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
-            this.uiLabel9.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
-            // 
-            // uiLabel10
-            // 
-            this.uiLabel10.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.uiLabel10.Location = new System.Drawing.Point(5, 205);
-            this.uiLabel10.Name = "uiLabel10";
-            this.uiLabel10.Size = new System.Drawing.Size(139, 20);
-            this.uiLabel10.TabIndex = 27;
-            this.uiLabel10.Text = "违规金额计算状态";
-            this.uiLabel10.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
-            this.uiLabel10.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
-            // 
-            // uiLabel5
-            // 
-            this.uiLabel5.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.uiLabel5.Location = new System.Drawing.Point(54, 170);
-            this.uiLabel5.Name = "uiLabel5";
-            this.uiLabel5.Size = new System.Drawing.Size(90, 20);
-            this.uiLabel5.TabIndex = 26;
-            this.uiLabel5.Text = "违规金额";
-            this.uiLabel5.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
-            this.uiLabel5.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
-            // 
-            // uiLabel4
-            // 
-            this.uiLabel4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.uiLabel4.Location = new System.Drawing.Point(54, 135);
-            this.uiLabel4.Name = "uiLabel4";
-            this.uiLabel4.Size = new System.Drawing.Size(90, 20);
-            this.uiLabel4.TabIndex = 25;
-            this.uiLabel4.Text = "就诊ID";
-            this.uiLabel4.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
-            this.uiLabel4.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
-            // 
-            // uiLabel3
-            // 
-            this.uiLabel3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.uiLabel3.Location = new System.Drawing.Point(54, 100);
-            this.uiLabel3.Name = "uiLabel3";
-            this.uiLabel3.Size = new System.Drawing.Size(90, 20);
-            this.uiLabel3.TabIndex = 24;
-            this.uiLabel3.Text = "参保人ID";
-            this.uiLabel3.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
-            this.uiLabel3.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
-            // 
-            // uiLabel2
-            // 
-            this.uiLabel2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.uiLabel2.Location = new System.Drawing.Point(54, 65);
-            this.uiLabel2.Name = "uiLabel2";
-            this.uiLabel2.Size = new System.Drawing.Size(90, 20);
-            this.uiLabel2.TabIndex = 23;
-            this.uiLabel2.Text = "规则ID";
-            this.uiLabel2.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
-            this.uiLabel2.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
-            // 
-            // uiLabel1
-            // 
-            this.uiLabel1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.uiLabel1.Location = new System.Drawing.Point(54, 30);
-            this.uiLabel1.Name = "uiLabel1";
-            this.uiLabel1.Size = new System.Drawing.Size(90, 20);
-            this.uiLabel1.TabIndex = 22;
-            this.uiLabel1.Text = "违规标识";
-            this.uiLabel1.TextAlign = System.Drawing.ContentAlignment.TopRight;
-            this.uiLabel1.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
-            // 
-            // uiGroupBox4
-            // 
-            this.uiGroupBox4.Controls.Add(this.rbtVolaContent);
-            this.uiGroupBox4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.uiGroupBox4.Location = new System.Drawing.Point(524, 26);
-            this.uiGroupBox4.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
-            this.uiGroupBox4.MinimumSize = new System.Drawing.Size(1, 1);
-            this.uiGroupBox4.Name = "uiGroupBox4";
-            this.uiGroupBox4.Padding = new System.Windows.Forms.Padding(0, 24, 0, 0);
-            this.uiGroupBox4.Size = new System.Drawing.Size(763, 273);
-            this.uiGroupBox4.TabIndex = 21;
-            this.uiGroupBox4.Text = "违规内容";
-            this.uiGroupBox4.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
-            this.uiGroupBox4.TitleInterval = 0;
-            this.uiGroupBox4.TitleTop = 8;
-            this.uiGroupBox4.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
-            // 
-            // rbtVolaContent
-            // 
-            this.rbtVolaContent.Dock = System.Windows.Forms.DockStyle.Fill;
-            this.rbtVolaContent.FillColor = System.Drawing.Color.White;
-            this.rbtVolaContent.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.rbtVolaContent.Location = new System.Drawing.Point(0, 24);
-            this.rbtVolaContent.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
-            this.rbtVolaContent.MinimumSize = new System.Drawing.Size(1, 1);
-            this.rbtVolaContent.Name = "rbtVolaContent";
-            this.rbtVolaContent.Padding = new System.Windows.Forms.Padding(2);
-            this.rbtVolaContent.ShowText = false;
-            this.rbtVolaContent.Size = new System.Drawing.Size(763, 249);
-            this.rbtVolaContent.TabIndex = 0;
-            this.rbtVolaContent.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
-            this.rbtVolaContent.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
-            // 
-            // uiGroupBox3
-            // 
-            this.uiGroupBox3.Controls.Add(this.dgvVolaItems);
-            this.uiGroupBox3.Dock = System.Windows.Forms.DockStyle.Left;
-            this.uiGroupBox3.Font = new System.Drawing.Font("微软雅黑", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.uiGroupBox3.Location = new System.Drawing.Point(0, 0);
-            this.uiGroupBox3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.uiGroupBox3.MinimumSize = new System.Drawing.Size(1, 1);
-            this.uiGroupBox3.Name = "uiGroupBox3";
-            this.uiGroupBox3.Padding = new System.Windows.Forms.Padding(0, 26, 0, 0);
-            this.uiGroupBox3.Size = new System.Drawing.Size(270, 676);
-            this.uiGroupBox3.TabIndex = 2;
-            this.uiGroupBox3.Text = "违规项目";
-            this.uiGroupBox3.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
-            this.uiGroupBox3.TitleInterval = 6;
-            this.uiGroupBox3.TitleTop = 10;
-            this.uiGroupBox3.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
-            // 
-            // dgvVolaItems
-            // 
-            this.dgvVolaItems.AllowUserToAddRows = false;
-            dataGridViewCellStyle6.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(243)))), ((int)(((byte)(249)))), ((int)(((byte)(255)))));
-            this.dgvVolaItems.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle6;
-            this.dgvVolaItems.BackgroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(243)))), ((int)(((byte)(249)))), ((int)(((byte)(255)))));
-            this.dgvVolaItems.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single;
-            dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
-            dataGridViewCellStyle7.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
-            dataGridViewCellStyle7.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            dataGridViewCellStyle7.ForeColor = System.Drawing.Color.White;
-            dataGridViewCellStyle7.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
-            dataGridViewCellStyle7.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
-            dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
-            this.dgvVolaItems.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle7;
-            this.dgvVolaItems.ColumnHeadersHeight = 32;
-            this.dgvVolaItems.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
-            dataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
-            dataGridViewCellStyle8.BackColor = System.Drawing.Color.White;
-            dataGridViewCellStyle8.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            dataGridViewCellStyle8.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
-            dataGridViewCellStyle8.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(236)))), ((int)(((byte)(255)))));
-            dataGridViewCellStyle8.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
-            dataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
-            this.dgvVolaItems.DefaultCellStyle = dataGridViewCellStyle8;
-            this.dgvVolaItems.Dock = System.Windows.Forms.DockStyle.Fill;
-            this.dgvVolaItems.EnableHeadersVisualStyles = false;
-            this.dgvVolaItems.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.dgvVolaItems.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(104)))), ((int)(((byte)(173)))), ((int)(((byte)(255)))));
-            this.dgvVolaItems.Location = new System.Drawing.Point(0, 26);
-            this.dgvVolaItems.Name = "dgvVolaItems";
-            dataGridViewCellStyle9.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
-            dataGridViewCellStyle9.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(243)))), ((int)(((byte)(249)))), ((int)(((byte)(255)))));
-            dataGridViewCellStyle9.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            dataGridViewCellStyle9.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
-            dataGridViewCellStyle9.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
-            dataGridViewCellStyle9.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
-            dataGridViewCellStyle9.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
-            this.dgvVolaItems.RowHeadersDefaultCellStyle = dataGridViewCellStyle9;
-            dataGridViewCellStyle10.BackColor = System.Drawing.Color.White;
-            dataGridViewCellStyle10.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            dataGridViewCellStyle10.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
-            dataGridViewCellStyle10.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(236)))), ((int)(((byte)(255)))));
-            dataGridViewCellStyle10.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
-            this.dgvVolaItems.RowsDefaultCellStyle = dataGridViewCellStyle10;
-            this.dgvVolaItems.RowTemplate.Height = 23;
-            this.dgvVolaItems.SelectedIndex = -1;
-            this.dgvVolaItems.Size = new System.Drawing.Size(270, 650);
-            this.dgvVolaItems.TabIndex = 0;
-            this.dgvVolaItems.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
-            this.dgvVolaItems.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvVolaItems_CellContentClick);
-            this.dgvVolaItems.SelectionChanged += new System.EventHandler(this.dgvVolaItems_SelectionChanged);
-            // 
-            // PreAndInProcessAnalysisForm
-            // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
-            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(1258, 741);
-            this.Controls.Add(this.uiPanel2);
-            this.Controls.Add(this.uiGroupBox3);
-            this.Controls.Add(this.uiPanel1);
-            this.Name = "PreAndInProcessAnalysisForm";
-            this.Text = "事前事中智能审核";
-            this.uiPanel1.ResumeLayout(false);
-            this.uiPanel2.ResumeLayout(false);
-            this.uiGroupBox5.ResumeLayout(false);
-            this.uiGroupBox2.ResumeLayout(false);
-            ((System.ComponentModel.ISupportInitialize)(this.dgvVolaDetailDtos)).EndInit();
-            this.uiGroupBox1.ResumeLayout(false);
-            this.uiGroupBox4.ResumeLayout(false);
-            this.uiGroupBox3.ResumeLayout(false);
-            ((System.ComponentModel.ISupportInitialize)(this.dgvVolaItems)).EndInit();
-            this.ResumeLayout(false);
-
-        }
-
-        #endregion
-
-        private Sunny.UI.UIPanel uiPanel1;
-        private Sunny.UI.UIPanel uiPanel2;
-        private Sunny.UI.UIButton btnCancle;
-        private Sunny.UI.UIGroupBox uiGroupBox3;
-        private Sunny.UI.UIDataGridView dgvVolaItems;
-        private Sunny.UI.UIGroupBox uiGroupBox5;
-        private Sunny.UI.UIRichTextBox rtb_DspoWayRea;
-        private Sunny.UI.UIGroupBox uiGroupBox2;
-        private Sunny.UI.UIDataGridView dgvVolaDetailDtos;
-        private Sunny.UI.UIGroupBox uiGroupBox1;
-        private Sunny.UI.UITextBox tbRuleName;
-        private Sunny.UI.UITextBox tbVolaEvid;
-        private Sunny.UI.UITextBox tbVolaBhvrType;
-        private Sunny.UI.UITextBox tbSevDeg;
-        private Sunny.UI.UITextBox tbVolaAmtStas;
-        private Sunny.UI.UITextBox tbVolaAmt;
-        private Sunny.UI.UITextBox tbMdtrdID;
-        private Sunny.UI.UITextBox tbPatID;
-        private Sunny.UI.UITextBox tbRuleID;
-        private Sunny.UI.UITextBox tbJrID;
-        private Sunny.UI.UILabel uiLabel6;
-        private Sunny.UI.UILabel uiLabel7;
-        private Sunny.UI.UILabel uiLabel8;
-        private Sunny.UI.UILabel uiLabel9;
-        private Sunny.UI.UILabel uiLabel10;
-        private Sunny.UI.UILabel uiLabel5;
-        private Sunny.UI.UILabel uiLabel4;
-        private Sunny.UI.UILabel uiLabel3;
-        private Sunny.UI.UILabel uiLabel2;
-        private Sunny.UI.UILabel uiLabel1;
-        private Sunny.UI.UIGroupBox uiGroupBox4;
-        private Sunny.UI.UIRichTextBox rbtVolaContent;
-        private Sunny.UI.UIButton btnModify;
-        private Sunny.UI.UIButton btn_Continue;
-    }
-}

+ 0 - 123
Forms/PreAndInProcessAnalysisForm.cs

@@ -1,123 +0,0 @@
-using Newtonsoft.Json.Linq;
-using PTMedicalInsurance.FormSetter;
-using PTMedicalInsurance.Helper;
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Data;
-using System.Drawing;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows.Forms;
-using PTMedicalInsurance.Variables;
-
-namespace PTMedicalInsurance.Forms
-{
-    public partial class PreAndInProcessAnalysisForm : Form
-    {
-        private DataTable dtVolaItems;
-        private DataTable dtVolaDetail;
-
-        private GridViewSetter grdSetter = new GridViewSetter();
-        private JArray jaVolaItems;
-        public string JrID = "";
-
-        public PreAndInProcessAnalysisForm()
-        {
-            InitializeComponent();
-        }
-
-        public PreAndInProcessAnalysisForm(JObject jo)
-        {
-            InitializeComponent();
-            jaVolaItems = JArray.Parse(JsonHelper.getDestValue(jo, "output.result"));
-            dtVolaItems = (DataTable)jo["output"]["result"].ToObject(typeof(DataTable));
-            dgvVolaItems.DataSource = dtVolaItems;
-            grdSetter.SetHeaderTextOfPAIPAVolaItem(dgvVolaItems);
-
-            //tbJrID.Text = JsonHelper.getDestValue(jo, "output.result[0].jr_id");
-            //tbRuleID.Text = JsonHelper.getDestValue(jo, "output.result[0].rule_id");
-            //tbPatID.Text = JsonHelper.getDestValue(jo, "output.result[0].patn_id");
-            //tbMdtrdID.Text = JsonHelper.getDestValue(jo, "output.result[0].mdtrt_id");
-            //tbVolaAmt.Text = JsonHelper.getDestValue(jo, "output.result[0].vola_amt");
-            //tbVolaAmtStas.Text = JsonHelper.getDestValue(jo, "output.result[0].vola_amt_stas");
-            //tbSevDeg.Text = JsonHelper.getDestValue(jo, "output.result[0].sev_deg");
-            //tbVolaBhvrType.Text = JsonHelper.getDestValue(jo, "output.result[0].vola_bhvr_type");
-            //tbVolaEvid.Text = JsonHelper.getDestValue(jo, "output.result[0].vola_evid");
-            //tbRuleName.Text = JsonHelper.getDestValue(jo, "output.result[0].rule_name");
-            //rbtVolaContent.Text = JsonHelper.getDestValue(jo, "output.result[0].vola_cont");            
-        }
-
-        private void showVolaItemContent(JObject jo)
-        {
-            tbJrID.Text = JsonHelper.getDestValue(jo, "jr_id");
-            JrID = tbJrID.Text;
-            tbRuleID.Text = JsonHelper.getDestValue(jo, "rule_id");
-            tbPatID.Text = JsonHelper.getDestValue(jo, "patn_id");
-            tbMdtrdID.Text = JsonHelper.getDestValue(jo, "mdtrt_id");
-            tbVolaAmt.Text = JsonHelper.getDestValue(jo, "vola_amt");
-            tbVolaAmtStas.Text = JsonHelper.getDestValue(jo, "vola_amt_stas");
-            tbSevDeg.Text = JsonHelper.getDestValue(jo, "sev_deg");
-            tbVolaBhvrType.Text = JsonHelper.getDestValue(jo, "vola_bhvr_type");
-            tbVolaEvid.Text = JsonHelper.getDestValue(jo, "vola_evid");
-            tbRuleName.Text = JsonHelper.getDestValue(jo, "rule_name");
-            rbtVolaContent.Text = JsonHelper.getDestValue(jo, "vola_cont");
-            dtVolaDetail = (DataTable)jo["judge_result_detail_dtos"].ToObject(typeof(DataTable));
-            dgvVolaDetailDtos.DataSource = dtVolaDetail;
-            grdSetter.SetHeaderTextOfPAIPAVolaDetailDtos(dgvVolaDetailDtos);
-        }
-
-        private void btnOK_Click(object sender, EventArgs e)
-        {
-            DialogResult = DialogResult.OK;
-        }
-
-        private void btnCancle_Click(object sender, EventArgs e)
-        {
-            DialogResult = DialogResult.Cancel;
-        }
-
-        private void dgvVolaItems_SelectionChanged(object sender, EventArgs e)
-        {
-            int i = dgvVolaItems.CurrentRow.Index;
-            showVolaItemContent((JObject)jaVolaItems[i]);
-        }
-
-        private void dgvVolaItems_CellContentClick(object sender, DataGridViewCellEventArgs e)
-        {
-
-        }
-
-        private void uiRichTextBox1_TextChanged(object sender, EventArgs e)
-        {
-
-        }
-
-        private void uiDataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
-        {
-
-        }
-
-        private void btnModify_Click(object sender, EventArgs e)
-        {
-            if (rtb_DspoWayRea.Text == "")
-            {
-                MessageBox.Show("处理方式为修改医嘱时,处理原因必填!");
-                return;
-            }
-
-            Global.Set.dspoWayRea = rtb_DspoWayRea.Text;
-
-            Global.Set.dspoWay = "2";
-            DialogResult = DialogResult.OK;
-        }
-
-        private void btn_Continue_Click(object sender, EventArgs e)
-        {
-            Global.Set.dspoWayRea = "继续执行医嘱";
-            Global.Set.dspoWay = "1";
-            DialogResult = DialogResult.OK;
-        }
-    }
-}

+ 0 - 120
Forms/PreAndInProcessAnalysisForm.resx

@@ -1,120 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<root>
-  <!-- 
-    Microsoft ResX Schema 
-    
-    Version 2.0
-    
-    The primary goals of this format is to allow a simple XML format 
-    that is mostly human readable. The generation and parsing of the 
-    various data types are done through the TypeConverter classes 
-    associated with the data types.
-    
-    Example:
-    
-    ... ado.net/XML headers & schema ...
-    <resheader name="resmimetype">text/microsoft-resx</resheader>
-    <resheader name="version">2.0</resheader>
-    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
-    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
-    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
-    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
-    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
-        <value>[base64 mime encoded serialized .NET Framework object]</value>
-    </data>
-    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
-        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
-        <comment>This is a comment</comment>
-    </data>
-                
-    There are any number of "resheader" rows that contain simple 
-    name/value pairs.
-    
-    Each data row contains a name, and value. The row also contains a 
-    type or mimetype. Type corresponds to a .NET class that support 
-    text/value conversion through the TypeConverter architecture. 
-    Classes that don't support this are serialized and stored with the 
-    mimetype set.
-    
-    The mimetype is used for serialized objects, and tells the 
-    ResXResourceReader how to depersist the object. This is currently not 
-    extensible. For a given mimetype the value must be set accordingly:
-    
-    Note - application/x-microsoft.net.object.binary.base64 is the format 
-    that the ResXResourceWriter will generate, however the reader can 
-    read any of the formats listed below.
-    
-    mimetype: application/x-microsoft.net.object.binary.base64
-    value   : The object must be serialized with 
-            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
-            : and then encoded with base64 encoding.
-    
-    mimetype: application/x-microsoft.net.object.soap.base64
-    value   : The object must be serialized with 
-            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
-            : and then encoded with base64 encoding.
-
-    mimetype: application/x-microsoft.net.object.bytearray.base64
-    value   : The object must be serialized into a byte array 
-            : using a System.ComponentModel.TypeConverter
-            : and then encoded with base64 encoding.
-    -->
-  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
-    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
-    <xsd:element name="root" msdata:IsDataSet="true">
-      <xsd:complexType>
-        <xsd:choice maxOccurs="unbounded">
-          <xsd:element name="metadata">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" />
-              </xsd:sequence>
-              <xsd:attribute name="name" use="required" type="xsd:string" />
-              <xsd:attribute name="type" type="xsd:string" />
-              <xsd:attribute name="mimetype" type="xsd:string" />
-              <xsd:attribute ref="xml:space" />
-            </xsd:complexType>
-          </xsd:element>
-          <xsd:element name="assembly">
-            <xsd:complexType>
-              <xsd:attribute name="alias" type="xsd:string" />
-              <xsd:attribute name="name" type="xsd:string" />
-            </xsd:complexType>
-          </xsd:element>
-          <xsd:element name="data">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
-                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
-              </xsd:sequence>
-              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
-              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
-              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
-              <xsd:attribute ref="xml:space" />
-            </xsd:complexType>
-          </xsd:element>
-          <xsd:element name="resheader">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
-              </xsd:sequence>
-              <xsd:attribute name="name" type="xsd:string" use="required" />
-            </xsd:complexType>
-          </xsd:element>
-        </xsd:choice>
-      </xsd:complexType>
-    </xsd:element>
-  </xsd:schema>
-  <resheader name="resmimetype">
-    <value>text/microsoft-resx</value>
-  </resheader>
-  <resheader name="version">
-    <value>2.0</value>
-  </resheader>
-  <resheader name="reader">
-    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </resheader>
-  <resheader name="writer">
-    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </resheader>
-</root>

+ 119 - 93
InsuBusiness.cs

@@ -500,6 +500,7 @@ namespace PTMedicalInsurance
                 }
                 //获取pat
                 hBus.GetFeeHisInfo(businessType, joInParam, out Global.pat);
+                hBus.getPreAndInProcessConfingure();
                 switch (businessType)
                 {
 
@@ -530,31 +531,11 @@ namespace PTMedicalInsurance
                             mIS.deleteFee( out errMsg);
 
                             #region【住院费用上传前调用3101事前服务】
-                            //1.获取3101入参报文
-                            /* 20221207 CM 朱鹏飞要求屏蔽调用事前事中服务交易
-                            if (hIS.GetInsuPatInfo("5", Global.pat, out outParam) != 0)
+                            if (hBus.PreOrInprocessAnalysis("IPChargeRegistrationTrigScen", "3101", out errMsg) != 0)
                             {
-                                rtnResult = JsonHelper.setExceptionJson(-1, "获取3101医保明细审核事前分析服务入参失败:", outParam).ToString();
+                                rtnResult = JsonHelper.setExceptionJson(-1, $"【3101】医保明细审核事中分析服务调用失败", errMsg).ToString();
                                 return rtnResult;
                             }
-                            else
-                            {
-                                //2.调用医保3101明细审核事前分析服务
-                                JObject joInput = new JObject();
-                                joInput = JObject.Parse(outParam);
-                                JObject jo3101Rtn = invoker.invokeCenterService("3101", JsonHelper.setCenterInpar("3101", joInput.ToString().Replace("\r\n", "")));
-                                if (JsonHelper.parseCenterRtnValue(jo3101Rtn, out errMsg) != 0)
-                                {
-
-                                    DialogResult dr = MessageBox.Show("【3101】医保明细审核事前分析服务医保中心返回结果:" + errMsg + "!是否继续?", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
-                                    if (dr != DialogResult.OK)
-                                    {
-                                        rtnResult = JsonHelper.setExceptionJson(-1, "【3101】医保明细审核事前分析服务调用失败:", errMsg).ToString();
-                                        return rtnResult;
-                                    }
-                                }
-                            }
-                            */
                             #endregion
 
 
@@ -653,6 +634,7 @@ namespace PTMedicalInsurance
                 }
                 //获取pat
                 hBus.GetSettlementHisInfo(businessType, joInParam, out Global.pat);
+                hBus.getPreAndInProcessConfingure();
                 switch (businessType)
                 {
                     case "M4"://门诊预结算
@@ -764,35 +746,14 @@ namespace PTMedicalInsurance
                             }
 
                             #region【门诊就诊信息上传成功后调用3101事前服务】
-                            //1.获取3101入参报文
-                            /*
-                            if (hIS.GetInsuPatInfo("1", Global.pat, out outParam) != 0)
+                            //1.门诊挂号 2.门诊收费登记 3.住院登记 4.住院收费登记 5.住院执行医嘱 6.门诊结算 7.门诊预结算 8.住院结算 9.住院预结算 10.购药划卡
+                            if (hBus.PreOrInprocessAnalysis("OPChargeRegistrationTrigScen", "3101", out errMsg) != 0)
                             {
-                                rtnResult = JsonHelper.setExceptionJson(-1, "获取3101医保明细审核事前分析服务入参失败:", outParam).ToString();
+                                rtnResult = JsonHelper.setExceptionJson(-1, $"【3101】医保明细审核事中分析服务调用失败", errMsg).ToString();
                                 return rtnResult;
                             }
-                            else
-                            {
-                                //2.调用医保3101明细审核事前分析服务
-                                JObject joInput = new JObject();
-                                //joInput.Add("data", JObject.Parse(outParam));
-                                joInput = JObject.Parse(outParam);
-
-                                JObject jo3101Rtn = invoker.invokeCenterService("3101", JsonHelper.setCenterInpar("3101", joInput.ToString().Replace("\r\n", ""))); //.Replace(" ", "")
-                                if (JsonHelper.parseCenterRtnValue(jo3101Rtn, out errMsg) != 0)
-                                {
-
-                                    DialogResult dr = MessageBox.Show("【3101】医保明细审核事前分析服务医保中心返回结果:" + errMsg + "!是否继续?", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
-                                    if (dr != DialogResult.OK)
-                                    {
-                                        rtnResult = JsonHelper.setExceptionJson(-1, "【3101】医保明细审核事前分析服务调用失败:", errMsg).ToString();
-                                        return rtnResult;
-                                    }
-                                }
-                            }
-                            */
                             #endregion
-                            
+
                             //费用上传
                             if (hBus.uploadFee("2204", 50, out outParam) != 0)
                             {
@@ -801,32 +762,11 @@ namespace PTMedicalInsurance
                             }
 
                             #region【门诊预结算2206前调用3102医保明细审核事中服务】                            
-                            //1.获取3102入参报文
-                            /*
-                            if (hIS.GetInsuPatInfo("2", Global.pat, out outParam) != 0)
+                            if (hBus.PreOrInprocessAnalysis("OPPreSetTrigScen", "3102", out errMsg) != 0)
                             {
-                                rtnResult = JsonHelper.setExceptionJson(-1, "获取3102医保明细审核事中分析服务入参失败:", outParam).ToString();
+                                rtnResult = JsonHelper.setExceptionJson(-1, $"【3102】医保明细审核事中分析服务调用失败", errMsg).ToString();
                                 return rtnResult;
                             }
-                            else
-                            {
-                                //2.调用医保3102明细审核事前分析服务
-                                JObject joInput = new JObject();
-                                //joInput.Add("data", JObject.Parse(outParam));
-                                joInput = JObject.Parse(outParam);
-
-                                JObject jo3101Rtn = invoker.invokeCenterService("3102", JsonHelper.setCenterInpar("3102", joInput.ToString().Replace("\r\n", "")));
-                                if (JsonHelper.parseCenterRtnValue(jo3101Rtn, out errMsg) != 0)
-                                {
-                                    DialogResult dr = MessageBox.Show("【3102】医保明细审核事中分析服务医保中心返回结果:" + errMsg + "!是否继续?", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
-                                    if (dr != DialogResult.OK)
-                                    {
-                                        rtnResult = JsonHelper.setExceptionJson(-1, "【3102】医保明细审核事中分析服务调用失败:", errMsg).ToString();
-                                        return rtnResult;
-                                    }
-                                }
-                            }
-                            */
                             #endregion
 
                             //调用IRIS获取医保各项金额
@@ -860,6 +800,24 @@ namespace PTMedicalInsurance
                                 joSettlement["exp_content"] = joExpContent;
                             }
 
+                            #region【门诊结算2207前调用3101医保明细审核事中服务】 
+                            string trig_scen;
+                            if (Global.operationType.Equals("RegisterOP"))
+                            {
+                                trig_scen = "OPRegTrigScen";
+                            }
+                            else
+                            {
+                                trig_scen = "OPSetTrigScen";
+                            }
+                            if (hBus.PreOrInprocessAnalysis(trig_scen, "3102", out errMsg) != 0)
+                            {
+                                rtnResult = JsonHelper.setExceptionJson(-1, $"【3102】医保明细审核事中分析服务调用失败", errMsg).ToString();
+                                return rtnResult;
+                            }
+
+                            #endregion
+
                             #region【门诊正式结算前调用1192身份验证】
                             //if (hBus.IdentityVerify("2207", out errMsg) != 0)
                             //{
@@ -1093,33 +1051,13 @@ namespace PTMedicalInsurance
                         }
                     case "Z5"://住院结算
                         {
-                            #region【住院预结算2303前调用3102医保明细审核事中服务】                            
-                            //1.获取3102入参报文
-                            /*
-                            if (hIS.GetInsuPatInfo("9", Global.pat, out outParam) != 0)
+                            #region 住院结算之前调用3102
+                            if (hBus.PreOrInprocessAnalysis("IPPreSetTrigScen", "3102", out errMsg) != 0)
                             {
-                                rtnResult = JsonHelper.setExceptionJson(-1, "获取3102医保明细审核事中分析服务入参失败:", outParam).ToString();
+                                rtnResult = JsonHelper.setExceptionJson(-1, $"【3102】医保明细审核事中分析服务调用失败", errMsg).ToString();
                                 return rtnResult;
                             }
-                            else
-                            {
-                                //2.调用医保3102明细审核事前分析服务
-                                JObject joInput = new JObject();      
-                                joInput = JObject.Parse(outParam);
-                                JObject jo3102Rtn = invoker.invokeCenterService("3102", JsonHelper.setCenterInpar("3102", joInput.ToString().Replace("\r\n", "")));
-                                if (JsonHelper.parseCenterRtnValue(jo3102Rtn, out errMsg) != 0)
-                                {
-                                    DialogResult dr = MessageBox.Show("【3102】医保明细审核事中分析服务医保中心返回结果1:" + errMsg + "!是否继续?", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
-                                    if (dr != DialogResult.OK)
-                                    {
-                                        rtnResult = JsonHelper.setExceptionJson(-1, "【3102】医保明细审核事中分析服务调用失败:", errMsg).ToString();
-                                        return rtnResult;
-                                    }
-                                }
-                            }
-                            */
                             #endregion
-
                             #region【调用银海COM组件读卡弹框-1401交易:出院结算前校验身份信息】
                             //调用银海com组件读卡弹框 1401交易
                             /* InvokeHelper yinhaiCom = new InvokeHelper();
@@ -1786,6 +1724,94 @@ namespace PTMedicalInsurance
                             Serach.ShowDialog();
                             break;
                         }
+                    case "PreAndInProcessAnalysisNew"://事前分析  诊间只有住院的事前分析
+                        {
+                            if (!Global.curEvt.ext.isOpenAnalysis)
+                            {
+                                rtnResult = JsonHelper.setIrisReturnValue(-1, "事前事中服务接口未开启", null).ToString();
+                                break;
+                            }
+
+                            Global.pat.adm_Dr = int.Parse(JsonHelper.getDestValue(joInParam, "params[0].admID"));
+                            Global.pat.mdtrtID = JsonHelper.getDestValue(joInParam, "insuAdmObj.mdtrt_id");
+                            Global.pat.psn_no = JsonHelper.getDestValue(joInParam, "insuAdmObj.psn_no");
+                            Global.pat.insuplc_admdvs = JsonHelper.getDestValue(joInParam, "params[0].insuData.patient_dtos[0].poolarea");
+                            Global.pat.insuType = JsonHelper.getDestValue(joInParam, "params[0].insuData.patient_dtos[0].fsi_encounter_dtos[0].insutype");
+                            //Global.pat.medType = JsonHelper.getDestValue(joInParam, "params[0].insuData.patient_dtos[0].fsi_encounter_dtos[0].med_type");
+
+                            JObject joResult = new JObject();
+                            joResult.Add("result", JObject.Parse(JsonHelper.getDestValue(joParam, "insuData")));
+
+                            //场景
+                            string scen = JsonHelper.getDestValue(joInsuAdmObj, "scen");
+
+                            List<int> admTypeArr = new List<int>();
+                            string trig_scen = "";
+
+                            hBus.getPreAndInProcessConfingure();
+                            if (scen == "门诊医嘱保存")
+                            {
+                                admTypeArr = new List<int> { 3, 4 };
+                                trig_scen = Global.pat.preAndInPro.OPOrderTrigScen;
+                                Global.pat.medType = Global.pat.preAndInPro.OPMedType;
+                            }
+                            else
+                            {
+                                admTypeArr = new List<int> { 1, 2 };
+                                trig_scen = Global.pat.preAndInPro.IPOrderTrigScen;
+                                Global.pat.medType = Global.pat.preAndInPro.IPMedType;
+                            }
+                            //查询患者的医保登记信息
+                            if (String.IsNullOrEmpty(Global.pat.mdtrtID))
+                            {
+                                rtnResult = JsonHelper.setIrisReturnValue(-1, "未获取到患者的医保就诊ID.请检查该患者是否已经进行了医保登记!", null).ToString();
+                                break;
+                            }
+
+                            if (mIS.queryRegisterInfo(admTypeArr, out errMsg) != 0)
+                            {
+                                rtnResult = JsonHelper.setExceptionJson(-1, "查询医保登记信息!", errMsg).ToString();
+                                break;
+                            }
+                            JObject joReg = JObject.Parse(errMsg);
+
+                            if ((JsonHelper.getDestValue(joReg, "data") == "") || (JsonHelper.getDestValue(joReg, "data") == "{}"))
+                            {
+                                rtnResult = JsonHelper.setIrisReturnValue(-1, "查询医保登记信息返回值为空!", null).ToString();
+                                break;
+                            }
+                            Global.pat.insuplc_admdvs = JsonHelper.getDestValue(joReg, "data.InsuranceAreaCode");
+
+
+
+                            PreAndInProcessAnalysis preAnalysis = new PreAndInProcessAnalysis(joResult.ToString());
+                            if (preAnalysis.setPatientByHisBaseInfo(out errMsg) != 0)
+                            {
+                                rtnResult = JsonHelper.setIrisReturnValue(-1, "医生站事前服务" + errMsg, null).ToString();
+                                break;
+                            }
+
+                            JObject jo3101Out = new JObject();
+                            if (preAnalysis.Get3101Inpar(trig_scen, Global.pat, out jo3101Out, out errMsg) != 0)
+                            {
+                                rtnResult = JsonHelper.setIrisReturnValue(-1, "获取3101入参" + errMsg, null).ToString();
+                                break;
+                            }
+
+                            JObject joRtn = invoker.invokeCenterService("3101", JsonHelper.setCenterInpar("3101", jo3101Out));
+
+
+                            if (JsonHelper.parseCenterRtnValue(joRtn, out errMsg) != 0)
+                            {
+                                rtnResult = JsonHelper.setIrisReturnValue(-1, "医生站事前服务" + errMsg, null).ToString();
+                                break;
+                            }
+                            else
+                            {
+                                rtnResult = JsonHelper.setIrisReturnValue(0, "医生站事前服务" + errMsg, joRtn).ToString();
+                            }
+                            break;
+                        }
                     case "PrescribeCirculation"://处方流转
                         {
                             STA sta = new STA();

+ 1 - 1
Properties/AssemblyInfo.cs

@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
 // 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
 //通过使用 "*",如下所示:
 // [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.1")]
+[assembly: AssemblyVersion("1.0.0.3")]
 [assembly: AssemblyFileVersion("1.0.0.0")]

+ 8 - 1
Readme_长春基线版.md

@@ -30,4 +30,11 @@
 - **时间**:2025年11月10日
 - **改进点**:
   - **功能新增**:增加自助机功能模块。
-  
+#### 版本 1.0.0.2  
+- **时间**:2026年1月4日
+- **改进点**:
+  - **功能新增**:关于限定支付范围。与患者诊断、病情相符,且符合药品法定说明书适应症及医保限定支付范围的按照目录标记报销类别支付;与医保限定支付范围不符的,医疗机构在费用明细上传时(在门诊费用明细信息[2204]、住院费用明细[2301]两个接口中),在扩展字段medcType(医药属性标识)按照医保系统给定规则进行上传(4表示自费),医保信息平台按照规则返回待遇计算结果。经过与中心沟通, 吉林省不启用hosp_appr_flag,这个功能默认为限制药品。
+#### 版本 1.0.0.3  
+- **时间**:2026年6月8日
+- **改进点**:
+  - **功能新增**:增加新版事前事中

+ 1 - 0
Variables/Global.cs

@@ -35,6 +35,7 @@ namespace PTMedicalInsurance.Variables
         public static User user;
         public static string businessType;
         public static SelfServiceMachineParam ssmp;
+        public static string operationType;
         //写日志 二次封装
         public static void writeLog(string content)
         {

+ 26 - 0
Variables/Struct.cs

@@ -12,6 +12,7 @@
 ******************************************************************************/
 using AnHuiMI.Variables;
 using Newtonsoft.Json.Linq;
+using PTMedicalInsurance.Business;
 using System;
 using System.Collections.Generic;
 using System.Linq;
@@ -210,8 +211,33 @@ namespace PTMedicalInsurance.Variables
 
 
 
+        public PreAndInProcessAnalysises preAndInPro;
 
+    }
 
+    public struct PreAndInProcessAnalysises
+    {
+        //1.门诊挂号 2.门诊收费登记 3.住院登记 4.住院收费登记 5.住院执行医嘱 6.门诊结算 7.门诊预结算 8.住院结算 9.住院预结算 10.购药划卡
+        /// <summary>
+        /// 通过下列场景的值来判断是否调用3101或3102,当前的情况是很多地方已经取消了3102,因为3101和3102入参基本一致。可根据各地实际情况,来决定是调用3101和3102.
+        /// 当下列场景的值为0时,表示不调用。不为空且大于0则表示调用。入参里的场景传对应的值。
+        /// </summary>
+        public string OPRegTrigScen;  //门诊挂号场景 挂号时调用3101
+        public string OPChargeRegistrationTrigScen;//门诊收费登记  门诊登记后调用3101
+        public string IPRegTrigScen;  //住院登记  住院登记后调用3101
+        public string IPChargeRegistrationTrigScen;//住院收费登记  费用上传后调用3101
+        public string IPOrderTrigScen;  //住院医嘱  住院医嘱保存时调用3102
+        public string OPSetTrigScen;  //门诊结算 门诊结算前调用3102
+        public string OPPreSetTrigScen;  //门诊预结算  门诊预结算前
+        public string IPSetTrigScen;  //住院结算  住院结算前调用
+        public string IPPreSetTrigScen;  //住院预结算  住院预结算调用
+
+        public string OPOrderTrigScen;  //门诊医嘱场景
+
+        public string MedInsType;
+        public string MedInsLevel;
+        public string OPMedType;
+        public string IPMedType;
     }
 
     public struct Card