//显示未发药的信息 private void toolStripButton1_Click_1(object sender, EventArgs e) { if (zy_PatList != null) { this.dgFee.DataSource = zyPresOrder.GetNotSendDurgPresDataTable(); } }
private int CostPat(int costType, FrmCostDiag fcd) { try { ZY_PresOrder zypo = new ZY_PresOrder(); zypo.PatListID = zyPatlist.PatListID; if (zyConfig008 != 0) { DataTable dt1 = zypo.GetNotSendDurgPresDataTable(); if (dt1.Rows.Count > 0) { throw new Exception("该病人还有未发药的费用!"); } } if (costType != 1) { if (costType == 2) { zyPatlist.PatType = "4"; } else if (costType == 3) { zyPatlist.PatType = "5"; } } ZY_CostMaster zy_CostM = new ZY_CostMaster(); zy_CostM.PatID = zyPatlist.PatID; zy_CostM.PatListID = zyPatlist.PatListID; zy_CostM.Ntype = costType; zy_CostM.Discharge_date = XcDate.ServerDateTime.Date; zy_CostM.Discharge_bdate = zyPatlist.CureDate.Date; //入院日期 zy_CostM.Discharge_edate = zyPatlist.OutDate; //出院日期 zy_CostM.TicketNum = zyCostMaster.GetNewTicketNO(XcDate.ServerDateTime); //? zy_CostM.TicketCode = IfrmCostDiagView.tbTicketNO; //fcd.TicketNo.Trim(); zy_CostM.ChargeCode = user.EmployeeID.ToString(); zy_CostM.Ticket_Flag = (int)IfrmCostDiagView.Ptt; zy_CostM.CostDate = XcDate.ServerDateTime; zy_CostM.Record_Flag = 0; //农合结算 //decimal villageFee = HIS.ZY_BLL.OP_CostManage.NccmCheck_CostPat(zy_CostM, base.zy_PatList); //if (villageFee != 0) // Op_PatFee.SetvillageFee(ref patFee, villageFee); zy_CostM.Total_Fee = Convert.ToDecimal(patFee.costFee.ToString("0.00")); zy_CostM.Deptosit_Fee = Convert.ToDecimal(patFee.chargeFee.ToString("0.00")); zy_CostM.Self_Fee = Convert.ToDecimal(patFee.selfFee.ToString("0.00")); zy_CostM.Village_Fee = Convert.ToDecimal(patFee.villageFee.ToString("0.00")); zy_CostM.Favor_Fee = Convert.ToDecimal(patFee.faoverFee.ToString("0.00")); zy_CostM.Pos_Fee = IfrmCostDiagView.tbPos; zy_CostM.Money_Fee = IfrmCostDiagView.tbFee; zy_CostM.Reality_Fee = zy_CostM.Pos_Fee + zy_CostM.Money_Fee;//实收金额=pos金额+现金金额 zy_CostM.Village_Type = 3; if (_patType.Trim() == "01") { zy_CostM.Village_Type = 3; } else if (_patType.Trim() == "02") { zy_CostM.Village_Type = 2; } else if (_patType.Trim() == "03") { zy_CostM.Village_Type = 0; } else if (_patType.Trim() == "04") { zy_CostM.Village_Type = 1; } else if (_patType.Trim() == "05") { zy_CostM.Village_Type = 3; } else if (_patType.Trim() == "06") { zy_CostM.Village_Type = 3; } zy_CostM.PatType = _patType; zy_CostM.WorkUnit = WorkUnit; zy_CostM.WorkUnit_Fee = workUnit_Fee; zy_CostM.NotWorkUnit_Fee = zy_CostM.Village_Fee - workUnit_Fee; zy_CostM.Ration_Fee = Ration_Fee; zy_CostM.MoreRation_Fee = Ration_Fee != 0 ? (Ration_Fee - zy_CostM.Village_Fee) : 0; zy_CostM.SelfDrug_Fee = Convert.ToDecimal(IfrmCostView.selfDrugFee); //TicketNum = zy_CostM.TicketNum;//add zenghao 090209 DataTable dt = zyCostMaster.GetPatBigItemOrderFee(); List <ZY_CostOrder> zy_CostOL = new List <ZY_CostOrder>(); for (int i = 0; i < dt.Rows.Count; i++) { ZY_CostOrder zy_CostO = new ZY_CostOrder(); zy_CostO.PatID = zyPatlist.PatID; zy_CostO.PatListID = zyPatlist.PatListID; zy_CostO.TicketNum = zy_CostM.TicketNum; zy_CostO.TicketCode = zy_CostM.TicketCode; zy_CostO.BigItemCode = dt.Rows[i]["itemtype"].ToString(); zy_CostO.Total_Fee = Convert.ToDecimal(Convert.ToDecimal(dt.Rows[i]["tolal_fee"]).ToString("0.00")); zy_CostOL.Add(zy_CostO); } zyCostMaster.CostPat(zy_CostM, zy_CostOL, zyPatlist); return(zy_CostM.CostMasterID); } catch (Exception err) { throw new Exception(err.Message); } }