public PatInfoControl SetData(HIS.Model.ZY_PatList patlist) { // string[] doc = new string[3]; // doc = HIS.ZYDoc_BLL.PatInfo.PatOperation.GetDoc(patlist.PatListID); HIS.ZY_BLL.ObjectModel.CostManager.IcostManager IcM = HIS.ZY_BLL.ObjectModel.ObjectFactory.GetObject <HIS.ZY_BLL.ObjectModel.CostManager.IcostManager>(typeof(HIS.ZY_BLL.DataModel.ZY_CostMaster)); IcM.PatListID = patlist.PatListID; this.BalanceFee = IcM.GetPatFee().surplusFee; this.BedNo = patlist.BedCode; this.BordDay = patlist.PatientInfo.PatBriDate; this.CureDoctor = new GWI.HIS.Windows.Controls.BindValue(null, HIS.SYSTEM.BussinessLogicLayer.Classes.BaseData.GetUserName(patlist.CureDocCode)); this.CurrentDepartment = new GWI.HIS.Windows.Controls.BindValue(null, HIS.SYSTEM.BussinessLogicLayer.Classes.BaseData.GetDeptName(patlist.CurrDeptCode)); // this.EconomyDoctor = new GWI.HIS.Windows.Controls.BindValue(null, patlist.CureDocCode); this.InDepartment = new GWI.HIS.Windows.Controls.BindValue(null, HIS.SYSTEM.BussinessLogicLayer.Classes.BaseData.GetDeptName(patlist.CureDeptCode)); string[] strdiag = patlist.DiseaseName.Split(new char[] { '|' }); if (strdiag[0] == "") { this.InDisease = new GWI.HIS.Windows.Controls.BindValue(null, strdiag[1].Replace("\r\n", "")); } else { this.InDisease = new GWI.HIS.Windows.Controls.BindValue(null, strdiag[0].Replace("\r\n", "")); } this.InpitentNo = patlist.CureNo; //this.Nurse = new GWI.HIS.Windows.Controls.BindValue(null, doc[2]); this.PatientName = patlist.PatientInfo.PatName; this.PatientType = new GWI.HIS.Windows.Controls.BindValue(null, patlist.PatientInfo.ACCOUNTTYPE); this.PrePayFee = IcM.GetPatFee().chargeFee; this.Sex = patlist.PatientInfo.PatSex; this.InDate = patlist.CureDate; this.TendInfo = ""; return(this); }
public PatientControl SetData(HIS.Model.ZY_PatList patlist) { string[] doc = new string[3]; // doc = HIS.ZYDoc_BLL.PatInfo.PatOperation.GetDoc(patlist.PatListID); HIS.ZY_BLL.ObjectModel.CostManager.IcostManager IcM = HIS.ZY_BLL.ObjectModel.ObjectFactory.GetObject <HIS.ZY_BLL.ObjectModel.CostManager.IcostManager>(typeof(HIS.ZY_BLL.DataModel.ZY_CostMaster)); IcM.PatListID = patlist.PatListID; this.BalanceFee = IcM.GetPatFee().surplusFee; this.BedNo = patlist.BedCode; this.BordDay = patlist.PatientInfo.PatBriDate; this.CureDoctor = new GWI.HIS.Windows.Controls.BindValue(null, HIS.ZYDoc_BLL.GetName.GetEmployname(patlist.CureDocCode)); this.CurrentDepartment = new GWI.HIS.Windows.Controls.BindValue(null, HIS.ZYDoc_BLL.GetName.GetDeptName(patlist.CurrDeptCode)); // this.EconomyDoctor = new GWI.HIS.Windows.Controls.BindValue(null, doc[1]); this.InDepartment = new GWI.HIS.Windows.Controls.BindValue(null, HIS.ZYDoc_BLL.GetName.GetDeptName(patlist.CureDeptCode)); string[] strdiag = patlist.DiseaseName.Split(new char[] { '|' }); if (strdiag[0] == "") { this.InDisease = new GWI.HIS.Windows.Controls.BindValue(null, strdiag[1].Replace("\r\n", "")); } else { this.InDisease = new GWI.HIS.Windows.Controls.BindValue(null, strdiag[0].Replace("\r\n", "")); } this.InpitentNo = patlist.CureNo; //this.Nurse = new GWI.HIS.Windows.Controls.BindValue(null, doc[2]); this.PatientName = patlist.PatientInfo.PatName; this.PatientType = new GWI.HIS.Windows.Controls.BindValue(null, patlist.PatientInfo.ACCOUNTTYPE); this.PrePayFee = IcM.GetPatFee().chargeFee; this.Sex = patlist.PatientInfo.PatSex; this.InDate = patlist.CureDate; this.TendInfo = "入院登记时间:" + patlist.MarkDate.ToString("yyyy-MM-dd HH:mm:ss"); this.txtdb = patlist.DbFee;// add zenghao return(this); }
/// <summary> /// 创建一个ApplyIInPatient类的实例 /// </summary> /// <param name="patlistid">患者住院ID</param> public ApplyIInPatient(int patlistid) { _patlistid = patlistid; HIS.ZY_BLL.ObjectModel.CostManager.IcostManager IcM = HIS.ZY_BLL.ObjectModel.ObjectFactory.GetObject <HIS.ZY_BLL.ObjectModel.CostManager.IcostManager>(typeof(HIS.ZY_BLL.DataModel.ZY_CostMaster)); IcM.PatListID = _patlistid; //_BalanceFee = IcM.GetPatFee().surplusFee; str = @"select a.dbfee, a.BEDCODE BedNo, a.markdate,b.PATBRIDATE BordDay, d.NAME CureDoctor, e.NAME CurrentDepartment, f.NAME EconomyDoctor, " + " a.CUREDATE InDate, g.NAME InDepartment,a.DISEASENAME InDisease,a.CURENO InpitentNo,h.NAME Nurse,b.PATNAME PatientName," + " b.ACCOUNTTYPE PatientType, b.PATSEX Sex, '' TendInfo " + "from ZY_PATLIST a " + " left join PATIENTINFO b on a.PATID=b.PATID " + " left join ZY_NURSE_BED c on a.PATLISTID=c.PATLIST_ID " + " left join BASE_EMPLOYEE_PROPERTY d on c.ZZ_DOC=d.EMPLOYEE_ID " + " left join BASE_DEPT_PROPERTY e on a.CURRDEPTCODE=cast(e.DEPT_ID as char(20)) " + " left join BASE_EMPLOYEE_PROPERTY f on a.CUREDOCCODE=cast(f.EMPLOYEE_ID as char(20)) " + " left join BASE_DEPT_PROPERTY g on a.CUREDEPTCODE=cast(g.DEPT_ID as char(20)) " + " left join BASE_EMPLOYEE_PROPERTY h on c.CHARGE_NURSE=h.EMPLOYEE_ID " + " where patlistid=" + _patlistid; dt = oleDb.GetDataTable(str); if (dt == null || dt.Rows.Count == 0) { _BedNo = ""; _BordDay = Convert.ToDateTime(null); _CureDoctor = new BindValue(null, null); _CurrentDepartment = new BindValue(null, null); _EconomyDoctor = new BindValue(null, null); _InDate = Convert.ToDateTime(null); _InDepartment = new BindValue(null, null); _InDisease = new BindValue(null, null); _InpitentNo = ""; _Nurse = new BindValue(null, null); _PatientName = ""; _PatientType = new BindValue(null, null); _Sex = ""; _TendInfo = ""; } else { _BedNo = dt.Rows[0]["BedNo"].ToString(); _BordDay = Convert.ToDateTime(XcConvert.IsNull(dt.Rows[0]["BordDay"].ToString(), "0001-01-01 00:00:00.000000"));//(dt.Rows[0]["BordDay"].ToString()); _CureDoctor = new BindValue(null, dt.Rows[0]["CureDoctor"].ToString()); _CurrentDepartment = new BindValue(null, dt.Rows[0]["CurrentDepartment"].ToString()); _EconomyDoctor = new BindValue(null, dt.Rows[0]["EconomyDoctor"].ToString()); _InDate = Convert.ToDateTime(dt.Rows[0]["InDate"].ToString()); _InDepartment = new BindValue(null, dt.Rows[0]["InDepartment"].ToString()); _InDisease = new BindValue(null, dt.Rows[0]["InDisease"].ToString()); _InpitentNo = dt.Rows[0]["InpitentNo"].ToString(); _Nurse = new BindValue(null, dt.Rows[0]["Nurse"].ToString()); _PatientName = dt.Rows[0]["PatientName"].ToString(); _PatientType = new BindValue(null, dt.Rows[0]["PatientType"].ToString()); _Sex = dt.Rows[0]["Sex"].ToString(); _TendInfo = " 登记时间:" + dt.Rows[0]["markdate"].ToString(); _PrePayFee = IcM.GetPatFee().chargeFee; _BalanceFee = IcM.GetPatFee().surplusFee; _txtdb = Convert.ToDecimal(dt.Rows[0]["dbfee"]); } }
/// <summary> /// 获得病人信息 /// </summary> public void GetPatlist() { zy_Patlist = view.zy_patlist_get; if (zy_Patlist != null) { view.BindPatControlData = zy_Patlist; HIS.ZY_BLL.ObjectModel.CostManager.IcostManager IcM = HIS.ZY_BLL.ObjectModel.ObjectFactory.GetObject <HIS.ZY_BLL.ObjectModel.CostManager.IcostManager>(typeof(HIS.ZY_BLL.DataModel.ZY_CostMaster)); IcM.PatListID = zy_Patlist.PatListID; view.BindPatFeeControlData = IcM.GetPatFee(); } }
/// <summary> /// 取消分床 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnCancelBedAssgin_Click(object sender, EventArgs e) { if (type == null) { MessageBox.Show("请您选择一个在床病人后再进行相应的操作!", "提示", MessageBoxButtons.OK); return; } if (type == typeof(ZY_PatList)) { HIS.ZY_BLL.ObjectModel.CostManager.IcostManager IcM = HIS.ZY_BLL.ObjectModel.ObjectFactory.GetObject <HIS.ZY_BLL.ObjectModel.CostManager.IcostManager>(typeof(HIS.ZY_BLL.DataModel.ZY_CostMaster)); IcM.PatListID = Convert.ToInt32(patlistid); decimal costfee = IcM.GetPatFee().costFee; if (costfee == Convert.ToDecimal(0)) { bool cancelResult = op_bed.cancelAssign(patlistid); if (cancelResult == true) { MessageBox.Show("取消分配成功", "提示", MessageBoxButtons.OK); //op_bed.updateBedFlag(Convert.ToInt32(patlistid)); listView1.Clear(); CreateBedView(); type = null; } else { MessageBox.Show("取消分配床位失败,该病人已存在医嘱,不允许取消分床", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning); } } else { MessageBox.Show("取消分配床位失败,该病人已产生记账费用,不允许取消分床", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning); } } else { MessageBox.Show("您选择的是空床,请选择一个有病人的床进行操作!", "提示", MessageBoxButtons.OK); return; } }
/// <summary> /// 病人床位分配取消 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void CancelAssign_Click(object sender, EventArgs e) { if (dataGridViewEx3.Rows.Count > 0) { int rownum = dataGridViewEx3.CurrentCell.RowIndex; long bedid = Convert.ToInt64(dataGridViewEx3[Column16.Name, rownum].Value.ToString()); long patlistid = Convert.ToInt64(dataGridViewEx3[Column21.Name, rownum].Value.ToString()); HIS.ZY_BLL.ObjectModel.CostManager.IcostManager IcM = HIS.ZY_BLL.ObjectModel.ObjectFactory.GetObject <HIS.ZY_BLL.ObjectModel.CostManager.IcostManager>(typeof(HIS.ZY_BLL.DataModel.ZY_CostMaster)); IcM.PatListID = Convert.ToInt32(patlistid); decimal costfee = IcM.GetPatFee().costFee; if (costfee == Convert.ToDecimal(0)) { bool cancelResult = op_bed.cancelAssign(patlistid); if (cancelResult == true) { MessageBox.Show("取消分配成功", "提示", MessageBoxButtons.OK); op_bed.updateBedFlag(Convert.ToInt32(patlistid)); cmbnobed.DisplayMember = "bed_no"; cmbnobed.ValueMember = "bed_no"; cmbnobed.DataSource = op_bed.getBedNotAssign(Convert.ToInt32(currentDept.DeptID)); dataGridViewEx3.DataSource = op_bed.getBedAssignInfo(Convert.ToInt32(currentDept.DeptID)); } else { MessageBox.Show("取消分配床位失败,该病人已存在医嘱,不允许取消分床", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning); } } else { MessageBox.Show("取消分配床位失败,该病人已产生记账费用,不允许取消分床", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning); } } else { MessageBox.Show("床位分配表已为空,床位取消操作即将退出!", "提示", MessageBoxButtons.OK); return; } }