//农合预算 public void PreviewCharge() { try { //加载农合病人信息,为农合病人做准备 if (zyPatlist.patientInfo.ACCOUNTTYPE.Trim() == "农合") { if (zyPatlist.patientInfo.MediCard != null && zyPatlist.patientInfo.MediCard.Trim() != "") { IzyInterface nccmInterface = NccmFactory.Create(); if (nccmInterface != null) { nccmInterface.zyPatlist = zyPatlist; //找出所有待上传的费用记录 ZY_PresOrder zypo = new ZY_PresOrder(); zypo.PatListID = zyPatlist.PatListID; DataTable dt = zypo.GetPresDataTable(); Hashtable hashtable = new Hashtable(); hashtable.Add("FeeDetail", zyNccmInterface.ConvertFeeDetail(dt)); hashtable.Add("midWay", Ntype.ToString()); decimal _villageFee = nccmInterface.PreviewCharge(hashtable); //Op_PatFee.SetvillageFee(ref patFee, villageFee); villageFee = _villageFee; } } } } catch (Exception e) { villageFee = 0; throw new Exception(e.Message); } }
//双击病人列表 private void FrmCostList_HIS_DoubleClick(object sender, EventArgs e) { zyPresOrder.PatListID = zy_PatList.PatListID; //this.BindCostData(base.zy_PatList.PatListID, null, null); this.tbInpatNo.Text = base.zy_PatList.CureNo; this.tbpatName.Text = base.zy_PatList.patientInfo.PatName; IcostManager icM = ObjectFactory.GetObject <IcostManager>(typeof(ZY_CostMaster)); icM.PatListID = zy_PatList.PatListID; PatFee patFee = icM.GetPatFee(); this.lbChargeTolFee.Text = patFee.chargeFee.ToString(); this.lbCoseTolFee.Text = patFee.costFee.ToString(); this.lbExtFee.Text = patFee.surplusFee.ToString(); DateTime?bdt = null; DateTime?edt = null; string prestype = null; string drugname = null; if (this.checkBox1.Checked) { bdt = this.dtpBdate.Value; edt = this.dtpEdate.Value; } if (this.checkBox5.Checked) { prestype = this.cbPresType.SelectedIndex.ToString(); } if (this.checkBox2.Checked) { drugname = HIS.SYSTEM.PubicBaseClasses.XcConvert.IsNull(this.tb_drugname.MemberValue, ""); } this.dgFee.DataSource = AddAddress(zyPresOrder.GetPresDataTable(bdt, edt, prestype, drugname)); }
//记账、冲账农合费用上传 private void Nccm_UploadFee() { try { if (zyPatlist.patientInfo.ACCOUNTTYPE.Trim() == "农合") { if (zyPatlist.patientInfo.MediCard != null && zyPatlist.patientInfo.MediCard.Trim() != "") { IzyInterface nccmInterface = NccmFactory.Create(); if (nccmInterface != null) { nccmInterface.zyPatlist = zyPatlist; //找出所有待上传的费用记录 ZY_PresOrder zypo = new ZY_PresOrder(); zypo.PatListID = zyPatlist.PatListID; DataTable dt = zypo.GetPresDataTable(); Hashtable hashtable = new Hashtable(); hashtable.Add("FeeDetail", zyNccmInterface.ConvertFeeDetail(dt)); nccmInterface.UploadzyPatFee(hashtable); } } } } catch (Exception e) { throw new Exception(e.Message + "\n\n农合费用上传失败!"); } }
/// <summary> /// 得到长期账单 /// </summary> private void GetLongPresData() { if (zy_Patlist != null) { view.BindLongPresControlData = zyPresOrder.GetPresDataTable(view.PresDate, 0); view.lblongFee = zyPresOrder.GetPresAllFee(view.PresDate, 0).ToString(); DataTable dt = view.BindLongPresControlData; for (int i = 0; i < dt.Rows.Count; i++) { ZY_PresOrder zyPS = new ZY_PresOrder(); zyPS = (ZY_PresOrder)HIS.SYSTEM.PubicBaseClasses.ApiFunction.DataTableToObject(dt, i, zyPS); ShowRowColor(zyPS, i, -1); } if (dt.Rows.Count > 0) { view.PresDocCode = dt.Rows[dt.Rows.Count - 1]["PRESDOCCODE"].ToString(); } } }
/// <summary> /// 农合病人修改 /// </summary> private void NccmPatAlter() { try { //病人类型自费转农合(调入院接口和费用上传接口) if (zyPatlist.patientInfo.ACCOUNTTYPE == "农合") { if (zyPatlist.Nccm_NO == null || zyPatlist.Nccm_NO == "") { NccmPatRegister(); //农合记账 IzyInterface nccmInterface = NccmFactory.Create(); if (nccmInterface != null) { nccmInterface.zyPatlist = zyPatlist; ZY_PresOrder zypo = new ZY_PresOrder(); zypo.PatListID = zyPatlist.PatListID; DataTable dt = zypo.GetPresDataTable(); Hashtable hashtable = new Hashtable(); hashtable.Add("FeeDetail", zyNccmInterface.ConvertFeeDetail(dt)); nccmInterface.UploadzyPatFee(hashtable); } } } //病人类型农合转自费(调取消入院接口) if (zyPatlist.patientInfo.ACCOUNTTYPE != "农合") { if (zyPatlist.Nccm_NO != null && zyPatlist.Nccm_NO != "") { NccmPatCancel(); zyPatlist.Nccm_NO = ""; } } } catch (Exception e) { throw new Exception(e.Message + "\n\n农合病人修改调用[农合接口]失败!"); } }
private void _SinglePatUpdate() { try { ZY_PresOrder zypo = new ZY_PresOrder(); zypo.PatListID = zy_PatList.PatListID; if (zy_PatList == null) { view.rtbMessage = "没有指定病人!\n"; BackUpdateType(); return; } //加载农合病人信息,为农合病人做准备 view.rtbMessage = "正在上传[" + zy_PatList.patientInfo.PatName + "]数据!\n"; if (zy_PatList.patientInfo.MediCard != null && zy_PatList.patientInfo.MediCard.Trim() != "") { //第一步:实例化接口对象 nccmInterface = NccmFactory.Create(); if (nccmInterface == null) { view.rtbMessage = "没有开启上传接口!\n"; } else { //第二步:病人信息赋值 nccmInterface.zyPatlist = zy_PatList; view.rtbMessage = "根据[" + zy_PatList.patientInfo.PatName + "]医疗证号获取病人信息!\n"; //第三步:根据医疗证号获取最新的农合病人信息 view.rtbMessage = "获取[" + zy_PatList.patientInfo.PatName + "]病人信息成功!\n"; //第四步:提取病人上传的费用信息 DataTable dt = zypo.GetPresDataTable(); view.rtbMessage = "提取[" + zy_PatList.patientInfo.PatName + "]病人费用成功!\n"; if (dt.Rows.Count > 0) { //第五步:更改所有费用为上传标志 //int[] presID = new int[dt.Rows.Count]; //for (int i = 0; i < dt.Rows.Count; i++) //{ // presID[i] = Convert.ToInt32(dt.Rows[i]["PRESORDERID"]); //} //HIS.ZY_BLL.OP_PresManage.UpdateComp(presID); //第六步:调用费用上传接口(上传失败的费用会更改上传标识) Hashtable hashtable = new Hashtable(); hashtable.Add("FeeDetail", zyNccmInterface.ConvertFeeDetail(dt)); nccmInterface.UploadzyPatFee(hashtable); view.rtbMessage = "上传[" + zy_PatList.patientInfo.PatName + "]成功!\n"; } } } else { view.rtbMessage = "没有指定病人或此病人不是符合类型的病人!\n"; } } catch { view.rtbMessage = "上传失败!\n"; } BackUpdateType(); }
/// <summary> /// 得到单个病人数据 /// </summary> public void GetSinglePatData() { zy_PatList = view.zyPatList; zypo.PatListID = zy_PatList.PatListID; view.dgvFee = zypo.GetPresDataTable(); }