/// <summary> /// 病案室人员编辑首页(未归档) /// <auth>Yanqiao.Cai</auth> /// <date>2012-12-05</date> /// </summary> /// <param name="noofinpat">首页序号</param> /// <return></return> private void InitFirstPageEditFlag(string noofinpat) { try { editFlag = DS_BaseService.CheckIfQuatityControlPerson(DS_Common.currentUser.Id); //如果是病案人员则继续判断是否为未归档病历 if (editFlag) { editFlag = DS_BaseService.CheckRecordRebacked(noofinpat); } } catch (Exception ex) { throw new Exception(ex.Message); } }
/// <summary> /// 病历归档事件 /// <auth>Yanqiao.Cai</auth> /// <date>2011-11-05</date> /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btn_reback_Click(object sender, EventArgs e) { try { int fouceRowIndex = gridviewRecordNoOnFile.FocusedRowHandle; if (fouceRowIndex < 0) { gridControlRecordNoOnFile.Focus(); SqlUtil.App.CustomMessageBox.MessageShow("请选择一条病人记录"); return; } DataRow foucesRow = gridviewRecordNoOnFile.GetDataRow(fouceRowIndex); if (null == foucesRow || null == foucesRow["NOOFINPAT"]) { return; } int noofinpat = int.Parse(foucesRow["NOOFINPAT"].ToString().Trim()); DataTable dt = DS_SqlService.GetRecordsByNoofinpat(noofinpat); if (null == dt || dt.Rows.Count == 0) { DrectSoft.Common.Ctrs.DLG.MyMessageBox.Show(foucesRow["NAME"] + " 没有病历,无法归档。"); return; } if (DrectSoft.Common.Ctrs.DLG.MyMessageBox.Show("您确定要归档 " + foucesRow["NAME"] + " 的病历吗?", "归档病历", DrectSoft.Common.Ctrs.DLG.MyMessageBoxButtons.YesNo) == DialogResult.No) { return; } if (DS_BaseService.CheckRecordRebacked(noofinpat.ToString())) { int num = DS_SqlService.SetRecordsRebacked(noofinpat.ToString()); if (num > 0) { DrectSoft.Common.Ctrs.DLG.MyMessageBox.Show("归档成功"); gridviewRecordNoOnFile.DeleteRow(gridviewRecordNoOnFile.FocusedRowHandle); return; } } DrectSoft.Common.Ctrs.DLG.MyMessageBox.Show("该病人已归档。"); } catch (Exception ex) { DrectSoft.Common.Ctrs.DLG.MyMessageBox.Show(1, ex); } }
/// <summary> /// 病案室人员编辑首页(未归档) /// <auth>Yanqiao.Cai</auth> /// <date>2012-12-05</date> /// </summary> /// <param name="noofinpat">首页序号</param> /// <return></return> private void InitFirstPageEditFlag(string noofinpat) { try { if (!string.IsNullOrEmpty(m_Host.FloderState) && (FloderState)Enum.Parse(typeof(FloderState), m_Host.FloderState) == FloderState.FirstPage) { editFlag = DS_BaseService.CheckIfQuatityControlPerson(DS_Common.currentUser.Id); ///如果是病案人员则继续判断是否为未归档病历 if (editFlag) { IsShowBackRecord = DS_BaseService.CheckRecordRebacked(noofinpat); } } } catch (Exception ex) { throw new Exception(ex.Message); } }
/// <summary> /// 弹出窗体关闭事件 /// 1、若当前所编辑病历记录已归档,则移除该记录 /// </summary> /// <auth>Yanqiao.Cai</auth> /// <date>2012-12-06</date> /// <param name="sender"></param> /// <param name="e"></param> private void EmrBrowser_FormClosed(object sender, FormClosedEventArgs e) { try { if (gridviewRecordNoOnFile.FocusedRowHandle < 0) { return; } DataRow foucesRow = gridviewRecordNoOnFile.GetDataRow(gridviewRecordNoOnFile.FocusedRowHandle); if (null == foucesRow || null == foucesRow["NOOFINPAT"]) { return; } if (!DS_BaseService.CheckRecordRebacked(foucesRow["NOOFINPAT"].ToString())) {//若当前所编辑病历记录已归档,则移除该记录 gridviewRecordNoOnFile.DeleteRow(gridviewRecordNoOnFile.FocusedRowHandle); } } catch (Exception ex) { DrectSoft.Common.Ctrs.DLG.MyMessageBox.Show(1, ex); } }