/// <summary> /// 刷新选定的患者 /// </summary> public void RefreshSelectedPatient(PatientCard patient) { RefreshPatientDataTable(patient.PatCard.PATIENT_ID, patient.PatCard.VISIT_ID, patient.PatCard.OPER_ID); MED_PATIENT_CARD patientInformation = patient.PatCard; if (patientInformation != null) { ExtendAppContext.Current.PatientID = patientInformation.PATIENT_ID; ExtendAppContext.Current.VisitID = patientInformation.VISIT_ID; ExtendAppContext.Current.OperID = patientInformation.OPER_ID; ExtendApplicationContext.Current.PatientInformationExtend = patientInformation; } else { ExtendAppContext.Current.PatientID = ""; ExtendApplicationContext.Current.PatientContextExtend.PatientID = ""; } }
/// <summary> /// 显示当前患者详细信息 /// </summary> private void ShowPatientInformation(PatientCard patient) { currentSelectNum = patient.SelectNum; _showPatient = patient; foreach (PatientCard pat in _patients) { if (patient.PatCard != pat.PatCard) { pat.Selected = false; } else { pat.Selected = true; } } EventHandler eventHandle = Events[_patientClick] as EventHandler; if (eventHandle != null) { eventHandle(this, null); } }
/// <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 Search(string searchContent) { if (!this.doctorQualityControl1.SearchTomorrowFilterData(searchContent)) { if (_operationSelectInfoDT != null) { List <MED_PATIENT_CARD> patientCardList = _operationSelectInfoDT.Where(p => p.PATIENT_ID == searchContent || p.INP_NO == searchContent || p.NAME == searchContent).ToList(); if (patientCardList != null && patientCardList.Count > 0) { MED_PATIENT_CARD patientCard = patientCardList[0]; foreach (PatientCard patient in _patients) { if (patient.PatCard != null && patient.PatCard.PATIENT_ID == patientCard.PATIENT_ID && patient.PatCard.VISIT_ID == patientCard.VISIT_ID && patient.PatCard.OPER_ID == patientCard.OPER_ID) { patient.Selected = true; patient.Focus(); _selectedPatient = patient; //设置滚动条 medScrollbar1.Value = pnlBody.VerticalScroll.Value; medScrollbar1.Maximum = pnlBody.VerticalScroll.Maximum; medScrollbar1.LargeChange = pnlBody.VerticalScroll.LargeChange; } else { patient.Selected = false; } } this.doctorQualityControl1.FinishedYesterdaySelect(); MessageQueue.AddMessage("为您查找到今日手术患者" + patientCard.NAME + " " + patientCard.SEX + " " + patientCard.AGE, Color.Black); } else { foreach (PatientCard patient in _patients) { patient.Selected = false; } if (!this.doctorQualityControl1.SearchYesterdayFilterData(searchContent)) { MessageQueue.AddMessage("没有您要查找的患者信息", Color.Black); } } } else { foreach (PatientCard patient in _patients) { patient.Selected = false; } if (!this.doctorQualityControl1.SearchYesterdayFilterData(searchContent)) { MessageQueue.AddMessage("没有您要查找的患者信息", Color.Black); } } } else { foreach (PatientCard patient in _patients) { patient.Selected = false; } this.doctorQualityControl1.FinishedYesterdaySelect(); } }
private void FilterData(string patientID) { pnlBody.Controls.Clear(); _patients.Clear(); //if (OperationsInfoDataTable == null || OperationsInfoDataTable.Count == 0) // return; if (OperationsInfoDataTable != null && OperationsInfoDataTable.Count > 0) { SetFilter(); } if (_operationSelectInfoDT != null && _operationSelectInfoDT.Count > 0) { _patientCount = _operationSelectInfoDT.Count; labelPatCount.Text = _operationSelectInfoDT.Count.ToString(); } else { _patientCount = 0; labelPatCount.Text = "0"; } if (_operationSelectInfoDT != null && _operationSelectInfoDT.Count > 0) { List <MED_PATIENT_CARD> patCardOutList = _operationSelectInfoDT.Where(p => p.OPER_STATUS_CODE >= 35).ToList(); if (patCardOutList != null && patCardOutList.Count > 0) { labelOutCount.Text = patCardOutList.Count.ToString(); } else { labelOutCount.Text = "0"; } } else { labelOutCount.Text = "0"; } int top = 12; int left = 2; int count = 0; if (_patientCount < 8) { _patientCount = 8; } else if (_patientCount % 2 != 0) { _patientCount = _patientCount + 1; } while (_patients.Count < _patientCount) { PatientCard patient = new PatientCard(); patient.Visible = false; _patients.Add(patient); patient.SelectNum = _patients.Count; pnlBody.Controls.Add(patient); if (_operationSelectInfoDT != null && count < _operationSelectInfoDT.Count) { patient.Clicked += new EventHandler(patient_Click); patient.DoubleClicked += new EventHandler(patient_DoubleClick); } patient.Left = left; patient.Top = top; left += patient.Width + 8; count++; if (count % 2 == 0) { left = 3; top += patient.Height + 25; } patient.BringToFront(); } foreach (PatientCard patient in _patients) { patient.CancelFocus(); } while (_patients.Count > _patientCount) { PatientCard patient = _patients[_patients.Count - 1]; pnlBody.Controls.Remove(patient); _patients.Remove(patient); } //string filtString = ""; int patientIndex = 0; for (int i = 0; i < _patients.Count; i++) { if (_operationSelectInfoDT != null && (_operationSelectInfoDT.Count - 1) >= i) { MED_PATIENT_CARD row = _operationSelectInfoDT[i]; PatientCard patient = _patients[patientIndex]; patient.PatCard = row; patientIndex++; toolTip1.SetToolTip(patient, "鼠标双击选中"); patient.RefreshCard(); if (row != null && row.PATIENT_ID == ExtendApplicationContext.Current.PatientContextExtend.PatientID && row.VISIT_ID == ExtendApplicationContext.Current.PatientContextExtend.VisitID && row.OPER_ID == ExtendApplicationContext.Current.PatientContextExtend.OperID) { patient.Selected = true; } patient.Visible = true; patient.Refresh(); if (patientIndex >= _patientCount) { break; } } else { PatientCard patient = _patients[patientIndex]; patient.PatCard = null; patientIndex++; patient.RefreshCard(); patient.Visible = true; patient.Refresh(); if (patientIndex >= _patientCount) { break; } } } for (int i = _patients.Count - 1; i >= patientIndex; i--) { _patients[i].Visible = false; } Visible = true; }