private void neuSpread1_CellDoubleClick(object sender, FarPoint.Win.Spread.CellClickEventArgs e) { if (neuSpread1_Sheet1.Rows.Count < 1) { //没有数据 返回 return; } Neusoft.HISFC.Models.RADT.PatientInfo patient = new Neusoft.HISFC.Models.RADT.PatientInfo(); //取出住院流水号 patient.ID = neuSpread1_Sheet1.Cells[neuSpread1_Sheet1.ActiveRowIndex, GetColumnId("住院流水号")].Text; Neusoft.HISFC.BizLogic.RADT.InPatient inPatient = new Neusoft.HISFC.BizLogic.RADT.InPatient(); patient = inPatient.QueryPatientInfoByInpatientNO(patient.ID); //触发事件 try { SaveInfo(patient); } catch (Exception ex) { string Err = ex.Message; } this.Close(); //if (dcEvent == neusoft.Common.Class.FormStyleInfo.DCAutoClose) //{ // this.Close(); //} }
//{F0C48258-8EFB-4356-B730-E852EE4888A0} private void mnuI_Add_Click(object sender, EventArgs e) { Neusoft.HISFC.BizLogic.RADT.InPatient patient = new Neusoft.HISFC.BizLogic.RADT.InPatient(); try { Neusoft.FrameWork.Management.PublicTrans.BeginTransaction(); patient.SetTrans(Neusoft.FrameWork.Management.PublicTrans.Trans); if (patient.UpdateBZ_Info(((HISFC.Models.RADT.PatientInfo) this.lsvBedView.SelectedItems[0].Tag).ID) != -1) { this.lsvBedView.SelectedItems[0].BackColor = Color.Red; Neusoft.FrameWork.Management.PublicTrans.Commit(); this.Err = "设置病情为病重!"; MessageBox.Show(this.Err); //刷新床位列表 this.RefreshView(); } else { Neusoft.FrameWork.Management.PublicTrans.RollBack(); this.Err = "更新病人病情失败!" + patient.Err; MessageBox.Show(this.Err); } } catch { } }
public virtual System.Collections.ArrayList QueryPatientByDept(string deptCode) { Neusoft.HISFC.BizLogic.RADT.InPatient manager = new Neusoft.HISFC.BizLogic.RADT.InPatient(); this.SetDB(manager); Neusoft.HISFC.Models.RADT.InStateEnumService instate = new Neusoft.HISFC.Models.RADT.InStateEnumService(); instate.ID = "I"; return(manager.PatientQuery(deptCode, instate)); }
public virtual System.Collections.ArrayList QueryPatientByEmpl(string emplCode, string deptCode) { Neusoft.HISFC.BizLogic.RADT.InPatient manager = new Neusoft.HISFC.BizLogic.RADT.InPatient(); this.SetDB(manager); Neusoft.FrameWork.Models.NeuObject obj = new Neusoft.FrameWork.Models.NeuObject(); obj.ID = emplCode; return(manager.QueryHouseDocPatient(obj, Neusoft.HISFC.Models.Base.EnumInState.I, deptCode)); }
private void ucMetCasHos_Load(object sender, EventArgs e) { Neusoft.HISFC.BizLogic.RADT.InPatient inpatientManager = new Neusoft.HISFC.BizLogic.RADT.InPatient(); DateTime nowTime = inpatientManager.GetDateTimeFromSysDateTime(); DateTime lastTime = new DateTime(nowTime.Year, nowTime.Month, 26, 00, 00, 00); this.dtpBeginTime.Value = lastTime.AddMonths(-1); this.dtpEndTime.Value = new DateTime(nowTime.Year, nowTime.Month, 25, 00, 00, 00); }
/// <summary> /// 初始化药品类别 /// </summary> /// <returns></returns> private bool GetItemzFunctionInfo() { Neusoft.HISFC.BizLogic.RADT.InPatient Manager = new Neusoft.HISFC.BizLogic.RADT.InPatient(); System.Collections.ArrayList alUsecodeList = new ArrayList(); this.cbPhaName.alItems.Clear(); this.cbPhaName.Items.Clear(); Neusoft.HISFC.Models.Base.Spell sp = new Neusoft.HISFC.Models.Base.Spell(); sp.Name = "全部"; sp.ID = "ALL"; alUsecodeList.Add(sp); //{3868F08C-D224-443b-94FB-FE4A493742B6} 药品过滤时要加上规格 //string strSql = @" select tt.drug_code,tt.trade_name,tt.spell_code,tt.wb_code from pha_com_baseinfo tt"; string strSql = @" select tt.drug_code,tt.trade_name,tt.specs,tt.spell_code,tt.wb_code from pha_com_baseinfo tt "; strSql = string.Format(strSql); DataSet ds = new DataSet(); if (Manager.ExecQuery(strSql, ref ds) == -1) { return(false); } if (ds == null || ds.Tables[0] == null) { MessageBox.Show("查询错误", "警告,药品加载错误!"); } if (ds.Tables[0].Rows.Count > 0) { for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { Neusoft.HISFC.Models.Base.Spell obj = new Neusoft.HISFC.Models.Base.Spell(); obj.ID = ds.Tables[0].Rows[i][0].ToString(); obj.Name = ds.Tables[0].Rows[i][1].ToString(); obj.Memo = ds.Tables[0].Rows[i][2].ToString(); obj.SpellCode = ds.Tables[0].Rows[i][3].ToString(); obj.WBCode = ds.Tables[0].Rows[i][4].ToString(); alUsecodeList.Add(obj); } int c = this.cbPhaName.AddItems(alUsecodeList); } else { return(false); } this.cbPhaName.SelectedIndex = 0; return(true); }
private bool InitTypeCode() { Neusoft.HISFC.BizLogic.RADT.InPatient Manager = new Neusoft.HISFC.BizLogic.RADT.InPatient(); ArrayList alTypeCode = new ArrayList(); this.cbTypeName.alItems.Clear(); this.cbTypeName.Items.Clear(); Neusoft.HISFC.Models.Base.Spell sp = new Neusoft.HISFC.Models.Base.Spell(); sp.Name = "全部"; sp.ID = "ALL"; alTypeCode.Add(sp); string strSql = @" SELECT m.type_code,m.type_name FROM met_ipm_kind m"; strSql = string.Format(strSql); DataSet ds = new DataSet(); if (Manager.ExecQuery(strSql, ref ds) == -1) { return(false); } if (ds == null || ds.Tables[0] == null) { MessageBox.Show("查询错误", "警告,药品加载错误!"); } if (ds.Tables[0].Rows.Count > 0) { for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { Neusoft.HISFC.Models.Base.Spell obj = new Neusoft.HISFC.Models.Base.Spell(); obj.ID = ds.Tables[0].Rows[i][0].ToString(); obj.Name = ds.Tables[0].Rows[i][1].ToString(); alTypeCode.Add(obj); } int c = this.cbTypeName.AddItems(alTypeCode); } else { return(false); } this.cbTypeName.SelectedIndex = 0; return(true); }
/// <summary> /// 查询符合条件的信息 /// [email protected] 2005.6.29 /// </summary> private void SearchInfo() { try { Neusoft.HISFC.BizLogic.RADT.InPatient inPatient = new Neusoft.HISFC.BizLogic.RADT.InPatient(); string strWhere = this.ucCustomQuery1.GetWhereString(); if (strWhere == "") { MessageBox.Show("请输入查询条件!"); return; } else { strWhere = " where " + strWhere; } //等待窗口 Neusoft.FrameWork.WinForms.Classes.Function.ShowWaitForm("正在查询数据,请稍候..."); Application.DoEvents(); ArrayList list = inPatient.PatientInfoGet(strWhere); if (list == null) { MessageBox.Show("查询数据失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); Neusoft.FrameWork.WinForms.Classes.Function.HideWaitForm(); return; } //插入数据 InsertInfo(list); //设置fpSpread1 的属性 if (System.IO.File.Exists(FilePath)) { Neusoft.FrameWork.WinForms.Classes.CustomerFp.ReadColumnProperty(this.neuSpread1_Sheet1, FilePath); } Neusoft.FrameWork.WinForms.Classes.Function.HideWaitForm(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private bool GetItemzFunctionInfo1() { Neusoft.HISFC.BizLogic.RADT.InPatient Manager = new Neusoft.HISFC.BizLogic.RADT.InPatient(); System.Collections.ArrayList alUsecodeList1 = new ArrayList(); this.neuComboBox2.alItems.Clear(); this.neuComboBox2.Items.Clear(); string strSql = @"select t.dept_code,t.dept_name,t.spell_code,t.wb_code from com_department t where dept_type IN('P','PI')"; strSql = string.Format(strSql); DataSet ds = new DataSet(); if (Manager.ExecQuery(strSql, ref ds) == -1) { return(false); } if (ds == null || ds.Tables[0] == null) { MessageBox.Show("²éѯ´íÎó", "¾¯¸æ,Ó÷¨¼ÓÔØ´íÎó£¡"); } if (ds.Tables[0].Rows.Count > 0) { for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { Neusoft.HISFC.Models.Base.Spell obj = new Neusoft.HISFC.Models.Base.Spell(); obj.ID = ds.Tables[0].Rows[i][0].ToString(); obj.Name = ds.Tables[0].Rows[i][1].ToString(); obj.SpellCode = ds.Tables[0].Rows[i][2].ToString(); obj.WBCode = ds.Tables[0].Rows[i][3].ToString(); alUsecodeList1.Add(obj); } int c = this.neuComboBox2.AddItems(alUsecodeList1); } else { return(false); } return(true); }
private bool GetItemzFunctionInfo() { Neusoft.HISFC.BizLogic.RADT.InPatient Manager = new Neusoft.HISFC.BizLogic.RADT.InPatient(); System.Collections.ArrayList alUsecodeList = new ArrayList(); this.neuComboBox1.alItems.Clear(); this.neuComboBox1.Items.Clear(); string strSql = @"select code,name,spell_code,wb_code from com_dictionary where type = 'DOSAGEFORM'"; strSql = string.Format(strSql); DataSet ds = new DataSet(); if (Manager.ExecQuery(strSql, ref ds) == -1) { return(false); } if (ds == null || ds.Tables[0] == null) { MessageBox.Show("查询错误", "警告,用法加载错误!"); } if (ds.Tables[0].Rows.Count > 0) { for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { Neusoft.HISFC.Models.Base.Spell obj = new Neusoft.HISFC.Models.Base.Spell(); obj.ID = ds.Tables[0].Rows[i][0].ToString(); obj.Name = ds.Tables[0].Rows[i][1].ToString(); obj.SpellCode = ds.Tables[0].Rows[i][2].ToString(); obj.WBCode = ds.Tables[0].Rows[i][3].ToString(); alUsecodeList.Add(obj); } int c = this.neuComboBox1.AddItems(alUsecodeList); } else { return(false); } return(true); }
public virtual System.Collections.ArrayList QueryInpatientNOByBedNO(string bedNo) { Neusoft.HISFC.BizLogic.RADT.InPatient manager = new Neusoft.HISFC.BizLogic.RADT.InPatient(); this.SetDB(manager); return(manager.QueryInpatientNOByBedNO(bedNo)); }
protected override void OnLoad() { base.OnLoad(); // 药品类别下拉列表 Neusoft.HISFC.BizLogic.Manager.Constant consManager = new Neusoft.HISFC.BizLogic.Manager.Constant(); ArrayList allDrugType = consManager.GetList(Neusoft.HISFC.Models.Base.EnumConstant.ITEMTYPE); if (allDrugType == null) { MessageBox.Show(Language.Msg("根据常数类别获取药品类型名称发生错误!") + consManager.Err); drugTypeHelper = new Neusoft.FrameWork.Public.ObjectHelper(); return; } Neusoft.FrameWork.Models.NeuObject drugTypeObj = new Neusoft.FrameWork.Models.NeuObject(); drugTypeObj.ID = "ALL"; drugTypeObj.Name = "全部"; allDrugType.Insert(0, drugTypeObj); drugTypeHelper = new Neusoft.FrameWork.Public.ObjectHelper(allDrugType); for (int i = 0; i < allDrugType.Count; i++) { ncboDrugType.Items.Add(allDrugType[i]); } ncboDrugType.alItems.AddRange(allDrugType); if (ncboDrugType.Items.Count > 0) { ncboDrugType.SelectedIndex = 0; drugTypeName = ((Neusoft.FrameWork.Models.NeuObject)ncboDrugType.Items[0]).Name; drugTypeValue = ((Neusoft.FrameWork.Models.NeuObject)ncboDrugType.Items[0]).ID; } // 药品性质下拉列表 ArrayList allQuality = consManager.GetList(Neusoft.HISFC.Models.Base.EnumConstant.DRUGQUALITY); if (allQuality == null) { MessageBox.Show(Language.Msg("根据常数类别获取药品性质发生错误!") + consManager.Err); this.qualityHelper = new Neusoft.FrameWork.Public.ObjectHelper(); return; } Neusoft.FrameWork.Models.NeuObject qualityObj = new Neusoft.FrameWork.Models.NeuObject(); qualityObj.ID = "ALL"; qualityObj.Name = "全部"; allQuality.Insert(0, qualityObj); this.qualityHelper = new Neusoft.FrameWork.Public.ObjectHelper(allQuality); for (int i = 0; i < allQuality.Count; i++) { ncboDrugQuality.Items.Add(allQuality[i]); } ncboDrugQuality.alItems.AddRange(allQuality); if (ncboDrugQuality.Items.Count > 0) { ncboDrugQuality.SelectedIndex = 0; drugQualityName = ((Neusoft.FrameWork.Models.NeuObject)ncboDrugQuality.Items[0]).Name; drugQualityValue = ((Neusoft.FrameWork.Models.NeuObject)ncboDrugQuality.Items[0]).ID; } // 供货公司下拉列表 Neusoft.HISFC.BizLogic.RADT.InPatient Manager = new Neusoft.HISFC.BizLogic.RADT.InPatient(); System.Collections.ArrayList alUsecodeList = new ArrayList(); this.ncboCompany.alItems.Clear(); this.ncboCompany.Items.Clear(); string strSql = @"select fac_code,fac_name,spell_code,wb_code from pha_com_company"; strSql = string.Format(strSql); DataSet ds = new DataSet(); if (Manager.ExecQuery(strSql, ref ds) == -1) { //return; } if (ds == null || ds.Tables[0] == null) { MessageBox.Show("查询错误", "警告,用法加载错误!"); } if (ds.Tables[0].Rows.Count > 0) { for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { Neusoft.HISFC.Models.Base.Spell obj = new Neusoft.HISFC.Models.Base.Spell(); obj.ID = ds.Tables[0].Rows[i][0].ToString(); obj.Name = ds.Tables[0].Rows[i][1].ToString(); obj.SpellCode = ds.Tables[0].Rows[i][2].ToString(); obj.WBCode = ds.Tables[0].Rows[i][3].ToString(); alUsecodeList.Add(obj); } } Neusoft.HISFC.Models.Base.Spell obj2 = new Neusoft.HISFC.Models.Base.Spell(); obj2.ID = "ALL"; obj2.Name = "全部"; obj2.SpellCode = "QB"; alUsecodeList.Insert(0, obj2); for (int i = 0; i < alUsecodeList.Count; i++) { ncboCompany.Items.Add(alUsecodeList[i]); } ncboCompany.alItems.AddRange(alUsecodeList); if (ncboCompany.Items.Count > 0) { ncboCompany.SelectedIndex = 0; companyName = ((Neusoft.HISFC.Models.Base.Spell)ncboCompany.Items[0]).Name; companyValue = ((Neusoft.HISFC.Models.Base.Spell)ncboCompany.Items[0]).ID; } }
public int ShowData(ArrayList alData, bool isPreview) { #region 患者进行单独分组 List <Neusoft.HISFC.Models.Pharmacy.ApplyOut> detailApplyOut = new List <Neusoft.HISFC.Models.Pharmacy.ApplyOut>(); System.Collections.Hashtable hsPatientApply = new Hashtable(); foreach (Neusoft.HISFC.Models.Pharmacy.ApplyOut temp in alData) { if (hsPatientApply.ContainsKey(temp.PatientNO + temp.UseTime.ToString())) { (hsPatientApply[temp.PatientNO + temp.UseTime.ToString()] as List <Neusoft.HISFC.Models.Pharmacy.ApplyOut>).Add(temp.Clone()); } else { List <Neusoft.HISFC.Models.Pharmacy.ApplyOut> tempList = new List <Neusoft.HISFC.Models.Pharmacy.ApplyOut>(); tempList.Add(temp.Clone()); hsPatientApply.Add(temp.PatientNO + temp.UseTime.ToString(), tempList); } } #endregion #region 批次流水对患者药品进行排序 完成打印 CompareApplyOutByCompoundGroup compare = new CompareApplyOutByCompoundGroup(); foreach (List <Neusoft.HISFC.Models.Pharmacy.ApplyOut> list in hsPatientApply.Values) { if (list.Count <= 0) { continue; } list.Sort(compare); //患者头信息赋值 string information = ""; this.neuSpread1_Sheet1.Rows.Count = 0; foreach (Neusoft.HISFC.Models.Pharmacy.ApplyOut info in list) { int iRowIndex = this.neuSpread1_Sheet1.Rows.Count; this.neuSpread1_Sheet1.Rows.Add(iRowIndex, 1); this.neuSpread1_Sheet1.Cells[iRowIndex, 0].Text = info.CompoundGroup.Substring(0, 1); this.neuSpread1_Sheet1.Cells[iRowIndex, 1].Text = info.CompoundGroup; this.neuSpread1_Sheet1.Cells[iRowIndex, 2].Text = info.Item.Name + "-" + Function.DrugDosage.GetStaticDosage(info.Item.ID) + "[" + info.Item.Specs + "]"; this.neuSpread1_Sheet1.Cells[iRowIndex, 3].Text = info.Operation.ApplyQty.ToString(); //总量 this.neuSpread1_Sheet1.Cells[iRowIndex, 4].Text = info.DoseOnce.ToString() + info.Item.DoseUnit; //用量 this.neuSpread1_Sheet1.Cells[iRowIndex, 5].Text = usageHelper.GetName(info.Usage.ID); string birth = ""; if (hsBirth.ContainsKey(info.PatientNO)) { birth = hsBirth[info.PatientNO] as string; } else { Neusoft.HISFC.BizLogic.RADT.InPatient patientManager = new Neusoft.HISFC.BizLogic.RADT.InPatient(); Neusoft.HISFC.Models.RADT.PatientInfo patient = patientManager.QueryPatientInfoByInpatientNO(info.PatientNO); birth = patient.Birthday.ToString("yyyy.MM.dd"); hsBirth.Add(info.PatientNO, birth); } if (iRowIndex == 0) { if (info.User01.Length <= 4) { information = string.Format("{0} 床号:{1} {2} {3} 出生日期:{4} 用药时间:{5}", deptHelper.GetName(info.ApplyDept.ID), info.User01, info.User02, info.User02.Substring(2), birth, info.UseTime.ToString("yyyy.MM.dd")); } else { information = string.Format("{0} 床号:{1} {2} {3} 出生日期:{4} 用药时间:{5}", deptHelper.GetName(info.ApplyDept.ID), info.User01.Substring(4), info.User02, info.PatientNO.Substring(4), birth, info.UseTime.ToString("yyyy.MM.dd")); } } } this.lbInfo.Text = information; this.Print(isPreview); } #endregion return(1); }
public ucQueryInpatientNo() { InitializeComponent(); Inpatient = new Neusoft.HISFC.BizLogic.RADT.InPatient(); }
public virtual System.Collections.ArrayList PatientQueryByPcNoRetArray(string str, string str1) { Neusoft.HISFC.BizLogic.RADT.InPatient manager = new Neusoft.HISFC.BizLogic.RADT.InPatient(); this.SetDB(manager); return(manager.PatientQueryByPcNoRetArray(str, str1)); }
public virtual System.Collections.ArrayList QueryPatientByDept(string deptCode, int days) { Neusoft.HISFC.BizLogic.RADT.InPatient manager = new Neusoft.HISFC.BizLogic.RADT.InPatient(); this.SetDB(manager); return(manager.PatientQuery(deptCode, days)); }
public virtual Neusoft.HISFC.Models.RADT.PatientInfo QueryPatientInfoByInpatientNO(string inpatientNo) { Neusoft.HISFC.BizLogic.RADT.InPatient manager = new Neusoft.HISFC.BizLogic.RADT.InPatient(); this.SetDB(manager); return(manager.QueryPatientInfoByInpatientNO(inpatientNo)); }
public virtual System.Collections.ArrayList QuereyPatientByDate(DateTime dt1, DateTime dt2) { Neusoft.HISFC.BizLogic.RADT.InPatient manager = new Neusoft.HISFC.BizLogic.RADT.InPatient(); this.SetDB(manager); return(manager.QueryPatient(dt1, dt2)); }
public virtual System.Collections.ArrayList QuereyPatientByDateAndState(DateTime dt1, DateTime dt2, Neusoft.HISFC.Models.Base.EnumInState state) { Neusoft.HISFC.BizLogic.RADT.InPatient manager = new Neusoft.HISFC.BizLogic.RADT.InPatient(); this.SetDB(manager); return(manager.QueryPatientInfoByTimeInState(dt1, dt2, state.ToString())); }
public virtual System.Collections.ArrayList PatientInfoGet(string strWhere) { Neusoft.HISFC.BizLogic.RADT.InPatient manager = new Neusoft.HISFC.BizLogic.RADT.InPatient(); this.SetDB(manager); return(manager.PatientInfoGet(strWhere)); }