// <summary> // 文书上传前检查 // </summary> // <returns></returns> protected override bool CheckBeforeCommit() { if (!AccessControl.CheckModifyRightForOperator("麻醉记录单") && ExtendApplicationContext.Current.AppType != ApplicationType.PACU) { MessageBoxFormPC.Show("您没有归档该文书的权限!", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information); return(false); } //AnesInformations.AnesthesiaEventDataTable anesEvent = DataContext.GetCurrent().GetAnesthesiaEvent(_eventNo); //foreach (AnesInformations.AnesthesiaEventRow row in anesEvent) //{ // PointType pointType = (GetDecimalValue(row["DURATIVE_INDICATOR"]) == 1 ? PointType.ProLonged : PointType.SinglePoint); // if (pointType == PointType.ProLonged) // { // if (row["START_TIME"] != System.DBNull.Value) // { // if (row["END_DATE"] == System.DBNull.Value) // { // Dialog.MessageBox("持续性 【" + row["ITEM_NAME"].ToString() + "】 已有开始时间,但是还没有结束时间,请确认文书完成后再上传 。", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information); // return false; // } // } // } //} OperationStatus operStatus = ExtendApplicationContext.Current.OperationStatus; if (operStatus != OperationStatus.OutOperationRoom && operStatus != OperationStatus.TurnToPACU && operStatus != OperationStatus.TurnToSickRoom && operStatus != OperationStatus.InPACU && operStatus != OperationStatus.OutPACU && operStatus != OperationStatus.Done) { MessageBoxFormPC.Show("只有 【出手术室】后才能归档麻醉单 。", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information); return(false); } return(base.CheckBeforePrint()); }
/// <summary> ///打印前检查,判断是否可以打印 /// </summary> /// <returns></returns> protected override bool CheckBeforePrint() { if (!AccessControl.CheckModifyRightForOperator("麻醉记录单") && ExtendApplicationContext.Current.AppType != ApplicationType.PACU) { MessageBoxFormPC.Show("您没有归档该文书的权限!", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information); return(false); } return(base.CheckBeforePrint()); // return true; }
private void VitalSignShowEditor_Load(object sender, EventArgs e) { this.SetDefaultGridViewStyle(dataGridView1); label1.Text = ""; dataGridView1.DataSource = _list; if (ExtendApplicationContext.Current.AppType == ApplicationType.Anesthesia) { if (!AccessControl.CheckModifyRightForOperator("麻醉记录单")) { btnOK.Enabled = false; dataGridView1.ReadOnly = true; } } else if (ExtendApplicationContext.Current.AppType == ApplicationType.PACU) { } }
public void ShowFormByDocName(object patientId, object visitId, object operId, string docName) { ApplicationConfiguration.MedicalDocucementElement document = ApplicationConfiguration.GetMedicalDocument(docName); //没有找到退出 if (string.IsNullOrEmpty(document.Caption)) { return; } try { Type t = Type.GetType(document.Type); BaseDoc baseDoc = Activator.CreateInstance(t) as BaseDoc; baseDoc.ShowScrollBar(); // 设置指定的患者信息 if (patientId != null) { object[] objs = new object[3]; objs[0] = patientId; objs[1] = visitId; objs[2] = operId; baseDoc.SetDocParameters(objs); } baseDoc.LoadReport(ExtendApplicationContext.Current.AppPath + document.Path); DialogHostFormPC dialogHostForm = null; dialogHostForm = new DialogHostFormPC(docName, 1200, 900); dialogHostForm.Child = baseDoc; if (AccessControl.CheckModifyRightForOperator(docName))//有Modify权限 { baseDoc.SetAllControlEditable(true); } else { baseDoc.SetAllButtonsEnable(false); baseDoc.SetAllControlEditable(false); } if (baseDoc.AllowSingleDocModify()) { baseDoc.SetAllControlEditable(true); } dialogHostForm.ShowDialog(); } catch (Exception ex) { throw; } }
// <summary> // 文书上传前检查 // </summary> // <returns></returns> //protected override bool CheckBeforeCommit() //{ // if (!AccessControl.CheckModifyRightForOperator("麻醉记录单") && ExtendApplicationContext.Current.AppType != ApplicationType.PACU) // { // Dialog.MessageBox("您没有上传该文书的权限!", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information); // return false; // } // AnesInformations.AnesthesiaEventDataTable anesEvent = DataContext.GetCurrent().GetAnesthesiaEvent(_eventNo); // foreach (AnesInformations.AnesthesiaEventRow row in anesEvent) // { // PointType pointType = (GetDecimalValue(row["DURATIVE_INDICATOR"]) == 1 ? PointType.ProLonged : PointType.SinglePoint); // if (pointType == PointType.ProLonged) // { // if (row["START_TIME"] != System.DBNull.Value) // { // if (row["END_DATE"] == System.DBNull.Value) // { // MessageBoxFormPC.Show("持续性 【" + row["ITEM_NAME"].ToString() + "】 已有开始时间,但是还没有结束时间,请确认文书完成后再上传 。", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information); // return false; // } // } // } // } // OperationStatus operStatus = ExtendApplicationContext.Current.OperationStatus; // if (operStatus != OperationStatus.OutOperationRoom && operStatus != OperationStatus.TurnToPACU && operStatus != OperationStatus.TurnToSickRoom // && operStatus != OperationStatus.InPACU && operStatus != OperationStatus.OutPACU && operStatus != OperationStatus.Done) // { // MessageBoxFormPC.Show("只有 【出手术室】后才能上传麻醉单 。", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information); // return false; // } // return true; //} //protected override bool CheckBeforeCommit() //{ // if (ExtendApplicationContext.Current.PatientInformationExtend.OPER_STATUS_CODE < 50) // { // MessageBoxFormPC.Show("请在出复苏室之后才能归档!"); // return false; // } // return true; //} /// <summary> ///打印前检查,判断是否可以打印 /// </summary> /// <returns></returns> protected override bool CheckBeforePrint() { if (!AccessControl.CheckModifyRightForOperator("麻醉记录单") && ExtendApplicationContext.Current.AppType != ApplicationType.PACU) { MessageBoxFormPC.Show("您没有归档该文书的权限!", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information); return(false); } OperationStatus operStatus = ExtendApplicationContext.Current.OperationStatus; if (operStatus != OperationStatus.TurnToSickRoom && operStatus != OperationStatus.TurnToICU && operStatus != OperationStatus.OutPACU && operStatus != OperationStatus.Done) { if (MessageBoxFormPC.Show("病人还未出 【复苏室】,是否继续打印 ?", "操作提示", MessageBoxButtons.YesNo) != DialogResult.Yes) { return(false); } } return(base.CheckBeforePrint()); // return true; }
private void AccessOperEvent() { if (ExtendApplicationContext.Current.AppType == ApplicationType.PACU) { if (!AccessControl.CheckModifyRightForOperator("复苏记录单") && ApplicationConfiguration.ApplicationPatterns == "0") { if (_anesthesiaEventsEditor != null) { _anesthesiaEventsEditor.SetReadOnly(false); } if (selector != null) { selector.Visible = true; } if (monitor != null) { monitor.SetReadOnly(false); } } } else if (ExtendApplicationContext.Current.AppType == ApplicationType.Anesthesia) { if (!AccessControl.CheckModifyRightForOperator("麻醉记录单") && ApplicationConfiguration.ApplicationPatterns == "0") { if (_anesthesiaEventsEditor != null) { _anesthesiaEventsEditor.SetReadOnly(false); } if (selector != null) { selector.Visible = false; } if (monitor != null) { monitor.SetReadOnly(false); } } } }
void baseDoc_BtnClicked(object sender, int index) { if (AccessControl.CheckModifyRightForOperator(bocList[index].Caption))//有Modify权限 { bocList[index].SetAllControlEditable(true); } else { bocList[index].SetAllButtonsEnable(false); bocList[index].SetAllControlEditable(false); } if (bocList[index].AllowSingleDocModify()) { bocList[index].SetAllControlEditable(true); } Panel panel = ((UserControl)sender).Parent as Panel; panel.Controls.Clear(); DialogHostFormPC form = panel.Parent as DialogHostFormPC; form.Child = bocList[index]; bocList[index].LoadReport(reportNameDic, bocList[index].Caption); }
public InOperation(MED_PATIENT_CARD patientInfo, decimal eventNo, bool showAnesAndOper) { Caption = ViewNames.InOperation; if (eventNo == 1) { Caption = ViewNames.PACUInOperation; } DevExpress.XtraEditors.SplitContainerControl splitter = new DevExpress.XtraEditors.SplitContainerControl(); splitter.Dock = DockStyle.Fill; Controls.Add(splitter); splitter.Horizontal = false; splitter.Panel2.MinSize = 150; splitter.Panel1.MinSize = 200; splitter.FixedPanel = DevExpress.XtraEditors.SplitFixedPanel.Panel2; Panel pnlBody = new Panel(); pnlBody.Dock = DockStyle.Fill; _anesthesiaEventsEditor = new AnesthesiaEventsEditor(patientInfo, eventNo.ToString()); pnlBody.Controls.Add(_anesthesiaEventsEditor); _anesthesiaEventsEditor.Dock = DockStyle.Fill; _anesthesiaEventsEditor.BringToFront(); splitter.Panel1.Controls.Add(pnlBody); _patMonitorEditor = new PatMonitorEditor(patientInfo.PATIENT_ID, patientInfo.VISIT_ID, patientInfo.OPER_ID, eventNo.ToString()); _patMonitorEditor.Dock = DockStyle.Fill; splitter.SplitterPosition = 280; splitter.Panel2.Controls.Add(_patMonitorEditor); if (ExtendApplicationContext.Current.AppType == ApplicationType.PACU) { if (_anesthesiaEventsEditor != null) { _anesthesiaEventsEditor.SetReadOnly(false); } if (_patMonitorEditor != null) { _patMonitorEditor.SetReadOnly(false); } } else if (ExtendApplicationContext.Current.AppType == ApplicationType.Anesthesia) { if (!AccessControl.CheckModifyRight(PermissionContext.ANESRECORDOPER) || !AccessControl.CheckModifyRightForOperator("麻醉记录单"))//ApplicationConfiguration.AnesRecordOper)//麻醉数据修改操作权限控制 { if (_anesthesiaEventsEditor != null) { _anesthesiaEventsEditor.SetReadOnly(true); } } else { if (_anesthesiaEventsEditor != null) { _anesthesiaEventsEditor.SetReadOnly(false); } } if (!AccessControl.CheckModifyRight(PermissionContext.MonitorDataEdit) || !AccessControl.CheckModifyRightForOperator("麻醉记录单")) { if (_patMonitorEditor != null) { _patMonitorEditor.SetReadOnly(true); } } else { if (_patMonitorEditor != null) { _patMonitorEditor.SetReadOnly(false); } } } //只有PACU时判断 if (ExtendApplicationContext.Current.EventNo == "1") { if (!ExtendApplicationContext.Current.CustomSettingContext.IsShowAnesthesiaEventsEditor) { SetAnesthesiaEventsEditorVisible(false); splitter.Panel1.MinSize = 0; splitter.Panel2.MinSize = (int)(Screen.PrimaryScreen.Bounds.Height); splitter.Panel1.Height = 0; splitter.SplitterPosition = 0; } if (!ExtendApplicationContext.Current.CustomSettingContext.IsShowPatMonitorEditor) { _patMonitorEditor.Visible = false; splitter.Panel2.MinSize = 0; splitter.Panel1.MinSize = (int)(Screen.PrimaryScreen.Bounds.Height); splitter.Panel2.Height = 0; splitter.SplitterPosition = (int)(Screen.PrimaryScreen.Bounds.Height); } } }
/// <summary> /// 根据状态判断流程 /// </summary> private void ShowPatientStatus(PatientCard patCard) { if (ApplicationConfiguration.ApplicationPatterns.Equals("0") && AccessControl.CheckModifyRightForOperator("麻醉记录单")) { List <MED_OPERATING_ROOM> roomList = comnDictRepository.GetOperatingRoomList("0").Data.Where(p => p.ROOM_NO == ExtendApplicationContext.Current.OperRoomNo && p.DEPT_CODE == ExtendApplicationContext.Current.OperRoom).ToList(); if (roomList != null && roomList.Count > 0) { MED_OPERATING_ROOM operRoom = roomList[0]; if (string.IsNullOrEmpty(patCard.PatCard.OPER_STATUS_CODE.ToString()) || patCard.PatCard.OPER_STATUS_CODE < 5) { if (string.IsNullOrEmpty(operRoom.PATIENT_ID)) { ConfirmationSureBase sure = new ConfirmationSureBase(patCard.PatCard, Convert.ToDecimal(ExtendApplicationContext.Current.EventNo)); DialogHostFormPC dialogHostForm = new DialogHostFormPC("入室信息确认", sure.Width, sure.Height); dialogHostForm.Text = "信息确认"; dialogHostForm.Child = sure; dialogHostForm.ShowDialog(); //确认患者信息 } else { MED_PATIENT_CARD cardRow = patientInfoRepository.GetPatCard(operRoom.PATIENT_ID, (int)operRoom.VISIT_ID, (int)operRoom.OPER_ID).Data; MessageBoxFormPC.Show("该手术间" + operRoom.ROOM_NO + "已存在患者【" + cardRow.NAME + " " + cardRow.INP_NO + "】,请换其他手术间!", "提示信息", MessageBoxButtons.OK, MessageBoxIcon.Information); } } else if (patCard.PatCard.OPER_STATUS_CODE < 35) { if (!string.IsNullOrEmpty(operRoom.PATIENT_ID) && !operRoom.PATIENT_ID.Equals(patCard.PatCard.PATIENT_ID)) { MED_PATIENT_CARD cardRow = patientInfoRepository.GetPatCard(operRoom.PATIENT_ID, (int)operRoom.VISIT_ID, (int)operRoom.OPER_ID).Data; MessageBoxFormPC.Show("该手术间" + operRoom.ROOM_NO + "已存在患者【" + cardRow.NAME + " " + cardRow.INP_NO + "】,请换其他手术间!", "提示信息", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } if (patCard.PatCard.OPER_ROOM_NO != ExtendApplicationContext.Current.OperRoomNo) { if (DialogResult.Yes == MessageBoxFormPC.Show("显示非本手术间手术,是否更换手术间?", "提示信息", MessageBoxButtons.YesNo, MessageBoxIcon.Question)) { MED_OPERATION_MASTER operationMaster = operationInfoRepository.GetOperMaster(ExtendApplicationContext.Current.PatientContextExtend.PatientID, ExtendApplicationContext.Current.PatientContextExtend.VisitID, ExtendApplicationContext.Current.PatientContextExtend.OperID).Data; if (operationMaster != null) { operationMaster.OPER_ROOM_NO = ExtendApplicationContext.Current.OperRoomNo; operationInfoRepository.SaveOperMaster(operationMaster); } ClearPatientRoom(ExtendApplicationContext.Current.PatientContextExtend.PatientID); ClearPatientMonitor(ExtendApplicationContext.Current.PatientContextExtend.PatientID, "0"); List <MED_OPERATING_ROOM> operList = comnDictRepository.GetOperatingRoomList("0").Data; if (operList != null && operList.Count > 0) { foreach (MED_OPERATING_ROOM room in operList) { if (room.ROOM_NO == ExtendApplicationContext.Current.OperRoomNo) { room.PATIENT_ID = patCard.PatCard.PATIENT_ID; room.VISIT_ID = patCard.PatCard.VISIT_ID; room.OPER_ID = patCard.PatCard.OPER_ID; comnDictRepository.SaveOperatingRoom(room); break; } } } // CommDictService.SaveOperatingRommList(operList); SelectMonitor monitor = new SelectMonitor(patCard.PatCard, 1, ExtendApplicationContext.Current.OperRoomNo.ToString(), false); monitor.Save(); } else { //权限改为False 术中只读 } } } } } }
public void ShowFormByDocName(object patientId, object visitId, object operId, List <string> item) { string firstDocName = ""; bocList.Clear(); reportNameDic.Clear(); try { BaseDoc baseDoc = new BaseDoc(); foreach (string docName in item) { if (!string.IsNullOrEmpty(docName)) { if (string.IsNullOrEmpty(firstDocName)) { firstDocName = docName; } ApplicationConfiguration.MedicalDocucementElement document = ApplicationConfiguration.GetMedicalDocument(docName); //没有找到退出 if (!string.IsNullOrEmpty(document.Caption)) { Type t = Type.GetType(document.Type); baseDoc = Activator.CreateInstance(t) as BaseDoc; baseDoc.BtnClicked += baseDoc_BtnClicked; baseDoc.Caption = docName; baseDoc.ShowScrollBar(); // 设置指定的患者信息 if (patientId != null) { object[] objs = new object[3]; objs[0] = patientId; objs[1] = visitId; objs[2] = operId; baseDoc.SetDocParameters(objs); } bocList.Add(baseDoc); reportNameDic.Add(docName, ExtendApplicationContext.Current.AppPath + document.Path); } } } if (reportNameDic.Count > 0) { bocList[0].LoadReport(reportNameDic, firstDocName); DialogHostFormPC dialogHostForm = null; dialogHostForm = new DialogHostFormPC("其他文书", 1200, 900); dialogHostForm.Child = bocList[0]; if (AccessControl.CheckModifyRightForOperator(firstDocName))//有Modify权限 { bocList[0].SetAllControlEditable(true); } else { bocList[0].SetAllButtonsEnable(false); bocList[0].SetAllControlEditable(false); } if (bocList[0].AllowSingleDocModify()) { bocList[0].SetAllControlEditable(true); } dialogHostForm.ShowDialog(); } } catch (Exception ex) { throw; } }