Explorar o código

pref: 结算清单打印

zhengjie hai 1 ano
pai
achega
8a61a75f52

+ 29 - 68
Business/HisMainBusiness.cs

@@ -745,6 +745,7 @@ namespace PTMedicalInsurance.Business
                     ExportObj.Add("rel_ttp_flag", frmReg.relTtpFlag);       //涉及第三方标志
                     ExportObj.Add("mdtrt_grp_type", frmReg.mdtrtGrpType);   //就诊人群类型
                     ExportObj.Add("iden_crit_falg", frmReg.dangerFlag);
+                    ExportObj.Add("setl_way", frmReg.psn_setlway);  //结算方式
                     // 合并已有内容
                     if (!string.IsNullOrEmpty(Global.pat.ExpContent))
                     {
@@ -765,17 +766,6 @@ namespace PTMedicalInsurance.Business
 
                     Global.pat.ExpContent = ExportObj.ToString();
 
-                    //哈尔滨要求必须传病种。普通疾病传主诊断
-                    //if (string.IsNullOrEmpty(frmReg.diseCodg))
-                    //{
-                    //    diseCodg = JsonHelper.getDestValue(joHisRtnInfo, "mdtrtinfo.dscg_maindiag_code");
-
-                    //};
-                    //if (string.IsNullOrEmpty(frmReg.diseName))
-                    //{
-                    //    diseName = JsonHelper.getDestValue(joHisRtnInfo, "mdtrtinfo.dscg_maindiag_name");
-                    //}
-
                     JObject joMdtrtinfo = new JObject();                    
                     joMdtrtinfo.Add("psn_no", Global.pat.psn_no);          //人员编号
                     joMdtrtinfo.Add("insutype", Global.pat.insuType);          //险种类型
@@ -878,6 +868,26 @@ namespace PTMedicalInsurance.Business
                 InpatientRegistration frmReg = new InpatientRegistration();
                 frmReg.dblkcbxInsuranceType.Enabled = true;
 
+                string settlementWay = "01";
+                string local_dise = "";
+                //出院登记扩展字段值解析,弹框展示        
+                if ((Global.pat.ExpContent != "") && (Global.pat.RYorCY == "2"))
+                {
+                    JObject ExpContentObj = JObject.Parse(Global.pat.ExpContent);
+                    frmReg.claTrtFlag = JsonHelper.getDestValue(ExpContentObj, "cla_trt_flag");
+                    //frmReg.unifPayStdType = JsonHelper.getDestValue(ExpContentObj, "unif_pay_std_type");
+                    frmReg.traumaFlag = JsonHelper.getDestValue(ExpContentObj, "trum_flag");
+                    frmReg.iptTypeCode = JsonHelper.getDestValue(ExpContentObj, "ipt_type");
+                    frmReg.relTtpFlag = JsonHelper.getDestValue(ExpContentObj, "rel_ttp_flag");
+                    frmReg.mdtrtGrpType = JsonHelper.getDestValue(ExpContentObj, "mdtrt_grp_type");
+                    settlementWay = JsonHelper.getDestValue(ExpContentObj, "setl_way");
+                    settlementWay = string.IsNullOrEmpty(settlementWay) ? "01" : settlementWay;
+
+                    local_dise = JsonHelper.getDestValue(ExpContentObj, "local_dise");
+                    if (frmReg.traumaFlag == "1") frmReg.Chk_TraumaFlag.Checked = true;
+                    if (frmReg.relTtpFlag == "1") frmReg.Chk_RelTtpFlag.Checked = true;
+                }
+
                 DataTable dt = (DataTable)frmReg.dblkcbxInsuranceType.DataSource;
                 int selectedIndex = 0;
 
@@ -901,24 +911,12 @@ namespace PTMedicalInsurance.Business
                         frmReg.med_type = dt.Rows[i]["Code"].ToString();
                     }
                 }
-
-                if (Global.pat.RYorCY == "1")
-                {
-                    DataTable dtMedType = (DataTable)frmReg.dblkcbxMedicalType.DataSource;
-                    for (int i = 0; i < dtMedType.Rows.Count; i++)
-                    {
-                        if (dtMedType.Rows[i]["Code"].ToString() == "21")
-                        {
-                            frmReg.dblkcbxMedicalType.Text = dtMedType.Rows[i]["Name"].ToString();
-                            frmReg.med_type = dtMedType.Rows[i]["Code"].ToString();
-                        }
-                    }
-                }
+                               
 
                 DataTable dtSettlWay = (DataTable)frmReg.dblkcbxSettelmentWay.DataSource;
                 for (int i = 0; i < dtSettlWay.Rows.Count; i++)
                 {
-                    if (dtSettlWay.Rows[i]["Code"].ToString() == "01")
+                    if (dtSettlWay.Rows[i]["Code"].ToString() == settlementWay)
                     {
                         frmReg.dblkcbxSettelmentWay.Text = dtSettlWay.Rows[i]["Name"].ToString();
                         frmReg.psn_setlway = dtSettlWay.Rows[i]["Code"].ToString();
@@ -994,60 +992,23 @@ namespace PTMedicalInsurance.Business
                     jaConvertedDiagnoses[i]["mdtrt_id"] = new JObject();
                     jaConvertedDiagnoses[i]["mdtrt_id"] = Global.pat.mdtrtID;
                 }
-
-
-
-                //出院登记扩展字段值解析,弹框展示        
-                if ((Global.pat.ExpContent != "") && (Global.pat.RYorCY == "2"))
-                {             
-                    JObject ExpContentObj = JObject.Parse(Global.pat.ExpContent);
-                    frmReg.claTrtFlag = JsonHelper.getDestValue(ExpContentObj, "cla_trt_flag");
-                    //frmReg.unifPayStdType = JsonHelper.getDestValue(ExpContentObj, "unif_pay_std_type");
-                    frmReg.traumaFlag = JsonHelper.getDestValue(ExpContentObj, "trum_flag");
-                    frmReg.iptTypeCode = JsonHelper.getDestValue(ExpContentObj, "ipt_type");
-                    frmReg.relTtpFlag = JsonHelper.getDestValue(ExpContentObj, "rel_ttp_flag");
-                    frmReg.mdtrtGrpType = JsonHelper.getDestValue(ExpContentObj, "mdtrt_grp_type");
-
-                    if (frmReg.traumaFlag == "1") frmReg.Chk_TraumaFlag.Checked = true;
-                    if (frmReg.relTtpFlag == "1") frmReg.Chk_RelTtpFlag.Checked = true;
-
-                    //if (frmReg.unifPayStdType != "")
-                    //{
-                    //    frmReg.cbxUnifPayStdType.SelectedIndex = int.Parse(frmReg.unifPayStdType) - 1;
-
-                    //    Global.pat.unifPayStdType = int.Parse(frmReg.unifPayStdType) - 1;
-                    //}
-
-                }
+                
 
                 frmReg.DtDiagnose = (DataTable)jaConvertedDiagnoses.ToObject(typeof(DataTable));
                 if (frmReg.ShowDialog() == DialogResult.OK)
                 {
                     string diseCodg = "", diseName = "";
-                    //哈尔滨要求必须传病种。普通疾病传主诊断
                     if (string.IsNullOrEmpty(frmReg.diseCodg))
                     {
                         diseCodg = JsonHelper.getDestValue(joHisRtnInfo, "mdtrtinfo.dscg_maindiag_code");
-                    };
+                    }
                     if (string.IsNullOrEmpty(frmReg.diseName))
                     {
                         diseName = JsonHelper.getDestValue(joHisRtnInfo, "mdtrtinfo.dscg_maindiag_name");
                     };
-                    //出院登记入参
-                    //单病种出院登记 病种信息取入院登记入参
-                    if (Global.pat.RYorCY == "2")
-                    {
-                        // 单病种?
-                        if (Global.pat.medType == "26")
-                        {
-                            diseCodg = Global.pat.DiseasecCode;
-                            diseName = Global.pat.DiseasecName;
-                        }
-                        else
-                        {
-                            frmReg.insuType = Global.pat.insuType;                            
-                        }                        
-                    }
+
+                    frmReg.insuType = Global.pat.insuType;
+                    Global.Set.settlementWay = frmReg.psn_setlway;
 
                     JObject ExportObj = new JObject();
                     //出院登记扩展参数用入院登记时保存的
@@ -1057,7 +1018,7 @@ namespace PTMedicalInsurance.Business
                     }
                     else
                     {                        
-                        ExportObj.Add("sin_dise_codg", "");              //单病种编码
+                        ExportObj.Add("local_dise", local_dise);              //单病种编码
                         ExportObj.Add("cla_trt_flag", frmReg.claTrtFlag);       //分级诊疗标志
                         //ExportObj.Add("unif_pay_std_typ", frmReg.unifPayStdType);           //包干标准类型
                         ExportObj.Add("bydise_setl_disediag_codg", "");  //按病种付费疾病诊断代码

+ 5 - 1
Business/Inpatient/IPPreSettlementProcess.cs

@@ -158,7 +158,11 @@ namespace PTMedicalInsurance.Business
             //清除原数据
             if ("03".Equals(Global.pat.mdtrtcertType)) {
                 CardReader reader = new CardReader();
-                reader.ReadCardBas(out outParam);
+                int rtnCode = reader.ReadCardBas(out outParam);
+                if (rtnCode != 0)
+                {
+                    return Exception(-1, "读卡失败,请确认是否社保卡是否正常!", outParam);
+                }
             }
             //读完卡后用新卡串
             Global.pat.mdtrtcertNO = "";

+ 7 - 3
Business/Inpatient/IPSettlementCancelProcess.cs

@@ -62,14 +62,18 @@ namespace PTMedicalInsurance.Business
                     return Exception(-1, "中心结算取消成功,医保平台结算信息取消失败!", outParam);
                 }
 
-                //费用撤销
-                new InpatientFeeUploadCancelProcess().Process(input);
-
                 //取消HIS医保结算信息
                 if (hIS.cancleSettlementInfo(OrginalInput, out outParam) != 0)
                 {
                     return Exception(-1, "中心跟医保平台结算取消成功, 取消HIS结算信息失败!", outParam);
                 }
+
+                // 取消出院
+                new InpatientExitCancelProcess().Process(input);
+
+                //费用撤销
+                new InpatientFeeUploadCancelProcess().Process(input);
+
             }
 
             return IrisReturn("取消结算成功",null);

+ 2 - 0
Business/IrisServices.cs

@@ -1369,10 +1369,12 @@ namespace PTMedicalInsurance.Business
                 joSetlinfo.Add("insuplc_admdvs", Global.pat.insuplc_admdvs);
                 joSetlinfo.Add("ExpContent", Global.pat.ExpContent);
 
+
                 joSetlinfo.Add("HospitalizationsDays", Global.Set.hospitalizationsDays);
                 joSetlinfo.Add("HospitalizationsTimes", Global.Set.hospitalizationsTimes);
                 joSetlinfo.Add("HISAdmTime", Global.Set.hisAdmTime);
                 joSetlinfo.Add("HISDischargeTime", Global.Set.hisDischargeTime);
+                joSetlinfo.Add("SettlementWay", Global.Set.settlementWay);
 
 
                 JObject joRtn = invoker.invokeInsuService(JsonHelper.setIrisInpar("09010051", joSetlinfo).ToString(), "插入结算信息");

+ 3 - 41
Forms/SettlementChecklist.cs

@@ -383,7 +383,8 @@ namespace PTMedicalInsurance.Forms
 
             try
             {
-                Thread thread = new Thread(new ThreadStart(print));
+                //Thread thread = new Thread(new ThreadStart(print));
+                Thread thread = new Thread(new ThreadStart(printReportCloud));
                 thread.SetApartmentState(ApartmentState.STA); //重点
                 thread.Start();
                 thread.Join();
@@ -401,7 +402,7 @@ namespace PTMedicalInsurance.Forms
         /// <summary>
         /// 调用正版FastReport打印
         /// </summary>
-        private void printReport()
+        private void printReportCloud()
         {
             if (dgvSettlRecord.RowCount <= 0)
             {
@@ -483,51 +484,12 @@ namespace PTMedicalInsurance.Forms
                 JArray jaReginfo = JArray.Parse(JsonHelper.getDestValue(joRtnSettle, "result.data.reginfo"));
                 JArray japatinsuinfo = JArray.Parse(JsonHelper.getDestValue(joRtnSettle, "result.data.patinsuinfo"));
 
-                ////转换金额大写
-                //string Sumamt = FastReportFunction.MoneyToUpper(JsonHelper.getDestValue(joRtnSettle, "result.data.settlement[0].Sumamt").ToString());
-                //string ActualPayDeductible = FastReportFunction.MoneyToUpper(JsonHelper.getDestValue(joRtnSettle, "result.data.settlement[0].ActualPayDeductible").ToString());
-                //string PersonCashPay = FastReportFunction.MoneyToUpper(JsonHelper.getDestValue(joRtnSettle, "result.data.settlement[0].PersonCashPay").ToString());
-                //string AccountPaySumamt = FastReportFunction.MoneyToUpper(JsonHelper.getDestValue(joRtnSettle, "result.data.settlement[0].AccountPaySumamt").ToString());
-                //string FundPaySumamt = FastReportFunction.MoneyToUpper(JsonHelper.getDestValue(joRtnSettle, "result.data.settlement[0].FundPaySumamt").ToString());
-                //string LargeExpensesSupplementPay = FastReportFunction.MoneyToUpper(JsonHelper.getDestValue(joRtnSettle, "result.data.settlement[0].LargeExpensesSupplementPay").ToString());
-                //string SeriousIllnessPay = FastReportFunction.MoneyToUpper(JsonHelper.getDestValue(joRtnSettle, "result.data.settlement[0].SeriousIllnessPay").ToString());
-                //string CivilserviceAllowancePay = FastReportFunction.MoneyToUpper(JsonHelper.getDestValue(joRtnSettle, "result.data.settlement[0].CivilserviceAllowancePay").ToString());
-                //string MedicalAssistPay = FastReportFunction.MoneyToUpper(JsonHelper.getDestValue(joRtnSettle, "result.data.settlement[0].MedicalAssistPay").ToString());
-                //string OtherPay = FastReportFunction.MoneyToUpper(JsonHelper.getDestValue(joRtnSettle, "result.data.settlement[0].OtherPay").ToString());
-                //string HospitalPartAmount = FastReportFunction.MoneyToUpper(JsonHelper.getDestValue(joRtnSettle, "result.data.settlement[0].HospitalPartAmount").ToString());
-                //string AccountMutualAidAmount = FastReportFunction.MoneyToUpper(JsonHelper.getDestValue(joRtnSettle, "result.data.settlement[0].AccountMutualAidAmount").ToString());
-                //string InPolicyRangeAmount = FastReportFunction.MoneyToUpper(JsonHelper.getDestValue(joRtnSettle, "result.data.settlement[0].InPolicyRangeAmount").ToString());
-
-                ////string BeginDate = JsonHelper.getDestValue(joRtnSettle, "result.data.reginfo[0].RegDate").ToString();
-                ////string EndDate = JsonHelper.getDestValue(joRtnSettle, "result.data.settlement[0].HISDischargeTime").ToString();
-                ////string InHosDays = FastReportFunction.DateDiff(Convert.ToDateTime(BeginDate), Convert.ToDateTime(EndDate));  
-
-                //JObject jaAmountChiness = new JObject();
-                //jaAmountChiness.Add("Sumamt", Sumamt);
-                //jaAmountChiness.Add("ActualPayDeductible", ActualPayDeductible);
-                //jaAmountChiness.Add("PersonCashPay", PersonCashPay);
-                //jaAmountChiness.Add("AccountPaySumamt", AccountPaySumamt);
-                //jaAmountChiness.Add("FundPaySumamt", FundPaySumamt);
-                //jaAmountChiness.Add("LargeExpensesSupplementPay", LargeExpensesSupplementPay);
-                //jaAmountChiness.Add("SeriousIllnessPay", SeriousIllnessPay);
-                //jaAmountChiness.Add("CivilserviceAllowancePay", CivilserviceAllowancePay);
-                //jaAmountChiness.Add("MedicalAssistPay", MedicalAssistPay);
-                //jaAmountChiness.Add("OtherPay", OtherPay);
-                //jaAmountChiness.Add("HospitalPartAmount", HospitalPartAmount);
-                //jaAmountChiness.Add("AccountMutualAidAmount", AccountMutualAidAmount);
-                //jaAmountChiness.Add("InPolicyRangeAmount", InPolicyRangeAmount); //合规费用
-                //jaAmountChiness.Add("SettlOpter", Global.user.name);
-
-                //JArray jachinessParams = new JArray();
-                //jachinessParams.Add(jaAmountChiness);
-
                 JObject joDataResult = new JObject();
                 joDataResult.Add("SettlementInfo", jaSettlement);
                 joDataResult.Add("ChargeItemLvFee", jachargeItemLvFee);
                 joDataResult.Add("ClassificationInfo", jaClassification);
                 joDataResult.Add("RegInfo", jaReginfo);
                 joDataResult.Add("Patinsuinfo", japatinsuinfo);
-                //joDataResult.Add("ChinessSummat", jachinessParams);
 
                 JObject joParams = new JObject();
                 joParams.Add("fastReportCode", "SP11"); //这个要从表取值

+ 21 - 1
InsuBusiness.cs

@@ -596,7 +596,8 @@ namespace PTMedicalInsurance
                         }
                     case "Print"://打印
                         {
-                            break;
+                            printFastReport();
+                            return JsonHelper.setIrisReturnValue(0, "", null).ToString();
                         }
                     case "Log"://日志
                         {
@@ -652,6 +653,25 @@ namespace PTMedicalInsurance
 
         }
 
+        private void printFastReport()
+        {
+            SettlementChecklist frmSettlList;
+            string insuAdmObj = JsonHelper.getDestValue(joInParam, "insuAdmObj");
+            if (insuAdmObj == "")
+            {
+                frmSettlList = new SettlementChecklist();
+                frmSettlList.ShowDialog();
+            }
+            else
+            {
+                JObject joInsuAdmObj = JObject.Parse(insuAdmObj);
+                frmSettlList = new SettlementChecklist(joInsuAdmObj);
+                string groupID = JsonHelper.getDestValue((JObject)Global.curEvt.jaSession[0], "groupID");
+                DataTable dt = (DataTable)frmSettlList.dgvSettlRecord.DataSource;
+                frmSettlList.btnPrint_Click(null, null);
+            }
+        }
+
         
         public string PlatformDirectConnect(string InParam)
         {            

+ 1 - 0
Variables/Struct.cs

@@ -197,6 +197,7 @@ namespace PTMedicalInsurance.Variables
         public string clearingType;
         public string clearingWay;
         public string clearingOrgan;
+        public string settlementWay; //结算方式
         DateTime occurTime;
         public DateTime settlTime;//结算时间
         public int hospitalizationsTimes;