/// <summary> /// 打开选中单据的批量录入 /// </summary> /// <param name="commonNoteEntity"></param> private void OpenHLDPL(CommonNoteEntity commonNoteEntity) { try { if (commonNoteEntity == null) { return; } XtraTabPage xtraTabPage = HasTabPage("KS" + commonNoteEntity.CommonNoteFlow); if (xtraTabPage == null) { xtraTabPage = new XtraTabPage(); xtraTabPage.Name = "KS" + commonNoteEntity.CommonNoteFlow; xtraTabPage.Text = commonNoteEntity.CommonNoteName + "多人录入"; if (commonNoteEntity.CommonNote_TabList == null) { CommonNoteBiz commonNoteBiz = new CommonNoteBiz(m_app); commonNoteEntity = commonNoteBiz.GetDetailCommonNote(commonNoteEntity.CommonNoteFlow); } DayListForm dayListForm = new DayListForm(commonNoteEntity, m_app); dayListForm.TopLevel = false; dayListForm.FormBorderStyle = FormBorderStyle.None; dayListForm.Dock = DockStyle.Fill; dayListForm.Show(); xtraTabPage.Controls.Add(dayListForm); tabControlSCD.TabPages.Add(xtraTabPage); } tabControlSCD.SelectedTabPage = xtraTabPage; } catch (Exception ex) { throw ex; } }
/// <summary> /// 测试方法 /// </summary> private void Test() { string message = ""; CommonNoteBiz cbiz = new CommonNoteBiz(m_app); m_commonNoteEntity = cbiz.GetDetailCommonNote("f5d1c558-df2a-4ac5-8d1d-6ef3ccaef5e7"); InCommonNoteBiz icombiz = new InCommonNoteBiz(m_app); List <InCommonNoteEnmtity> InCommonNoteList = icombiz.GetSimInCommonNote("1333"); if (InCommonNoteList == null || InCommonNoteList.Count == 0) { m_inCommonNote = InCommonNoteBiz.ConvertCommonToInCommon(m_commonNoteEntity); DataTable inpatientDt = icombiz.GetInpatient("1333"); m_inCommonNote.CurrDepartID = inpatientDt.Rows[0]["OUTHOSDEPT"].ToString(); m_inCommonNote.CurrDepartName = inpatientDt.Rows[0]["DEPARTNAME"].ToString(); m_inCommonNote.CurrWardID = inpatientDt.Rows[0]["OUTHOSWARD"].ToString(); m_inCommonNote.CurrWardName = inpatientDt.Rows[0]["WARDNAME"].ToString(); m_inCommonNote.NoofInpatient = "1333"; m_inCommonNote.InPatientName = inpatientDt.Rows[0]["NAME"].ToString(); bool saveResult = icombiz.SaveInCommomNoteAll(m_inCommonNote, ref message); } else { m_inCommonNote = InCommonNoteList[0]; } }
/// <summary> /// 记录单快速录入 /// </summary> private void SetNurseJLDPL() { try { CommonNoteBiz commonNoteBiz = new CommonNoteBiz(m_app); List <CommonNoteEntity> commonNoteEntityList = commonNoteBiz.GetCommonNoteByDeptWard(m_app.User.CurrentWardId, "02"); if (commonNoteEntityList == null) { return; } //只显示批量的 commonNoteEntityListPL = commonNoteEntityList.FindAll(a => a.UsingFlag == "1") as List <CommonNoteEntity>; if (commonNoteEntityListPL == null || commonNoteEntityListPL.Count == 0) { btnHLDPL.Visibility = BarItemVisibility.Never; } else { btnHLDPL.Visibility = BarItemVisibility.Always; } } catch (Exception ex) { throw ex; } }
DataTable dtInpatient; //科室病区病人 public AddFrom(CommonNoteEntity commonNoteEntity, IEmrHost app) { this.m_CommonNoteEntity = commonNoteEntity; this.m_app = app; this.m_CommonNoteBiz = new CommonNoteBiz(this.m_app); this.m_InCommonNoteBiz = new InCommonNoteBiz(this.m_app); InitializeComponent(); #region ---已注销 by xlb 2013.02.04-------------------- //if (m_CommonNoteEntity.CommonNote_TabList == null) //{ // CommonNoteBiz commonNoteBiz = new DrectSoft.Core.CommonTableConfig.CommonNoteBiz(m_app); // m_CommonNoteEntity = commonNoteBiz.GetDetailCommonNote(m_CommonNoteEntity.CommonNoteFlow); //} #endregion dateTimeAdd.DateTime = DateTime.Now; }
/// <summary> /// 初始化模板列表信息 /// </summary> private void InitDate() { try { CommonNoteBiz commonNoteBiz = new CommonNoteBiz(m_app); commonNoteEntityList = commonNoteBiz.GetCommonNoteByDeptWard(m_app.User.CurrentWardId, "02"); foreach (var item in commonNoteEntityList) { item.CreateDateTime = DrectSoft.Common.DateUtil.getDateTime(item.CreateDateTime, DrectSoft.Common.DateUtil.NORMAL_LONG); } gridControl1.DataSource = commonNoteEntityList; } catch (Exception ex) { throw ex; } }
Dictionary <string, List <InCommonNoteItemEntity> > dicitemListDel = new Dictionary <string, List <InCommonNoteItemEntity> >(); //删除的数据 /// <summary> /// 构造方法 /// edit by xlb 2013-02-01 /// 加上了等待窗 /// </summary> /// <param name="commonNoteEntity"></param> /// <param name="app"></param> public DayListForm(CommonNoteEntity commonNoteEntity, IEmrHost app) { m_WaitDialog = new WaitDialogForm("正在打开" + "" + commonNoteEntity.CommonNoteName + "", "请稍后..."); this.m_CommonNoteEntity = commonNoteEntity; this.m_app = app; this.m_CommonNoteBiz = new CommonNoteBiz(this.m_app); this.m_InCommonNoteBiz = new InCommonNoteBiz(this.m_app); InitializeComponent(); #region ----------------已注销 by xlb 2013.02.04-------- if (m_CommonNoteEntity.CommonNote_TabList == null) { CommonNoteBiz commonNoteBiz = new DrectSoft.Core.CommonTableConfig.CommonNoteBiz(m_app); m_CommonNoteEntity = commonNoteBiz.GetDetailCommonNote(m_CommonNoteEntity.CommonNoteFlow); } #endregion dateEdit1.DateTime = DateTime.Now; }
/// <summary> /// edit by xlb 2013-01-28 /// 改用新的记录单整体录入 /// 隐藏该功能 /// xll 2013-06-04 修改该 如果没有单据 就不启用该功能 /// </summary> private void SetNurseJLD() { try { CommonNoteBiz commonNoteBiz = new CommonNoteBiz(m_app); List <CommonNoteEntity> commonNoteEntityList = commonNoteBiz.GetCommonNoteByDeptWard(m_app.User.CurrentWardId, "02"); if (commonNoteEntityList == null || commonNoteEntityList.Count == 0) { btnHLDSing.Visibility = BarItemVisibility.Never; } else { btnHLDSing.Visibility = BarItemVisibility.Always; } } catch (Exception ex) { throw ex; } }
/// <summary> /// 将CommonNoeEntity->InCommonNoteEnmtity; /// xlb 2013-01-19 /// </summary> /// <param name="commonNote"></param> /// <returns></returns> private InCommonNoteEnmtity ConvertToByCommonNote(CommonNoteEntity commonNote, InPatientSim inPatient) { try { //用来接收选择的模板的新模板名称 string commonNoteNames = commonNote.CommonNoteName == null ? "" : commonNote.CommonNoteName; CommonNoteBiz commonNoteBiz = new CommonNoteBiz(m_app); commonNote = commonNoteBiz.GetDetailCommonNote(commonNote.CommonNoteFlow); commonNote.CommonNoteName = commonNoteNames;//模板名称修改 InCommonNoteEnmtity inCommonNote = InCommonNoteBiz.ConvertCommonToInCommon(commonNote); InCommonNoteBiz incommonNoteBiz = new InCommonNoteBiz(m_app); DataTable dtPatient = incommonNoteBiz.GetInpatient(inPatient.NoofInpat.ToString()); inCommonNote.CurrDepartID = dtPatient.Rows[0]["OUTHOSDEPT"].ToString(); inCommonNote.CurrDepartName = dtPatient.Rows[0]["DEPARTNAME"].ToString(); inCommonNote.CurrWardID = dtPatient.Rows[0]["OUTHOSWARD"].ToString(); inCommonNote.CurrWardName = dtPatient.Rows[0]["WARDNAME"].ToString(); inCommonNote.NoofInpatient = inPatient.NoofInpat.ToString(); inCommonNote.InPatientName = dtPatient.Rows[0]["NAME"].ToString(); inCommonNote.CreateDateTime = DateTime.Now.ToString(); inCommonNote.Valide = "1"; string message = ""; bool saveResult = incommonNoteBiz.SaveInCommomNoteAll(inCommonNote, ref message); if (saveResult) { return(inCommonNote); } else { MessageBox.Show("创建单据失败"); return(null); } } catch (Exception ex) { throw ex; } }
/// <summary> /// 将数据对象转诊打印对象 用于绑定到控件进行打印预览 /// </summary> /// <returns></returns> private PrintInCommonView ConvertPrintEntity() { //inCommonNoteBiz.GetDetaliInCommonNote(ref m_inCommonNote); PrintInCommonView printInCommonView = new CommonNoteUse.PrintInCommonView(); printInCommonView.PrintFileName = m_inCommonNote.PrinteModelName; printInCommonView.IncommonNoteflow = m_inCommonNote.InCommonNoteFlow; printInCommonView.RecordName = m_commonNoteEntity.CommonNoteName; //病人的基本信息构造 if (inCommonNoteBiz == null) { inCommonNoteBiz = new InCommonNoteBiz(m_app); } DataTable inpatientDt = inCommonNoteBiz.GetInpatient(m_inCommonNote.NoofInpatient); PrintInpatientView printInpatientView = new CommonNoteUse.PrintInpatientView(); printInpatientView.HospitalName = m_app.CurrentHospitalInfo.Name; printInpatientView.SubHospitalName = m_app.CurrentHospitalInfo.Subname; printInpatientView.AdmitDiagnosis = inpatientDt.Rows[0]["DIAGNOSISNAME"].ToString(); printInpatientView.Depart = m_inCommonNote.CurrDepartName; printInpatientView.InBedNo = inpatientDt.Rows[0]["OUTBED"].ToString(); printInpatientView.RecordName = m_inCommonNote.InCommonNoteName; if (inpatientDt.Rows[0]["INWARDDATE"].ToString().Length >= 10) { printInpatientView.InDateTime = inpatientDt.Rows[0]["INWARDDATE"].ToString().Substring(0, 10); } printInpatientView.InNo = inpatientDt.Rows[0]["PATID"].ToString(); printInpatientView.OutNo = inpatientDt.Rows[0]["NOOFCLINIC"].ToString(); printInpatientView.PatId = inpatientDt.Rows[0]["PATNOOFHIS"].ToString(); printInpatientView.InpatientAge = inpatientDt.Rows[0]["AGESTR"].ToString(); printInpatientView.InpatientName = inpatientDt.Rows[0]["NAME"].ToString(); printInpatientView.Sex = inpatientDt.Rows[0]["SEX"].ToString(); printInpatientView.Ward = m_inCommonNote.CurrWardName; printInCommonView.PrintInpatientView = printInpatientView; if (m_inCommonNote.InCommonNoteTabList == null) { return(printInCommonView); } for (int i = 0; i < m_inCommonNote.InCommonNoteTabList.Count; i++) { CommonNote_TabEntity commonNote_TabEntity = null; foreach (var itemTab in m_commonNoteEntity.CommonNote_TabList) { if (itemTab.CommonNote_Tab_Flow == m_inCommonNote.InCommonNoteTabList[i].CommonNote_Tab_Flow) { commonNote_TabEntity = itemTab; break; } } PrintInCommonTabView printInCommonTabView = new CommonNoteUse.PrintInCommonTabView(); //主要目的是给这个对象复制 Dictionary <string, List <InCommonNoteItemEntity> > dicitemList; List <string> strNames = InCommonNoteBiz.ConvertInCommonTabToPrint(m_inCommonNote.InCommonNoteTabList[i], printInCommonTabView, out dicitemList, commonNote_TabEntity, m_app, m_inCommonNote); string proName = "PrintInCommonTabViewList"; proName = proName + (i + 1); PropertyInfo property = printInCommonView.GetType().GetProperty(proName); if (property != null) { property.SetValue(printInCommonView, printInCommonTabView, null); } if (i == 0 && m_inCommonNote.InCommonNoteTabList[i] != null) { ConverToDuoRow(printInCommonView); //ConvertForDuoLie(printInCommonView); IPrintNurse iPrintNurse = AbstractorFactry.GetNurseRecord(printInCommonView.PrintFileName); if (iPrintNurse != null) { iPrintNurse.commonNoteCountEntity = CommonNoteBiz.GetCommonNoteCount(m_commonNoteEntity.CommonNoteFlow); printInCommonView.PrintInCommonTabViewList1.PrintInCommonItemViewList = iPrintNurse.JiSuanZongLiang(printInCommonView); } else { if (printInCommonView != null && printInCommonView.PrintInCommonTabViewList1 != null && printInCommonView.PrintInCommonTabViewList1.PrintInCommonItemViewList != null) { InCommonNoteBiz.ConvertForDateTime(printInCommonView.PrintInCommonTabViewList1.PrintInCommonItemViewList); InCommonNoteBiz.SetRowEnd(printInCommonView.PrintInCommonTabViewList1.PrintInCommonItemViewList, printInCommonView.PrintFileName); } } //xll 2013-01-12 处理相同时间数据 //ConvertForDateTime(printInCommonView); } } return(printInCommonView); }