/// <summary> /// 重新更新指定患者信息 /// </summary> public void RefreshPatientDataTable(string patientID, int visitID, int operID) { if (OperationsInfoDataTable != null) { MED_PATIENT_CARD cardRow = patientInfoRepository.GetPatCard(patientID, visitID, operID).Data; if (OperationsInfoDataTable != null && OperationsInfoDataTable.Count > 0 && cardRow != null) { for (int i = 0; i < OperationsInfoDataTable.Count; i++) { if (OperationsInfoDataTable[i].PATIENT_ID == patientID && OperationsInfoDataTable[i].VISIT_ID == visitID && OperationsInfoDataTable[i].OPER_ID == operID) { OperationsInfoDataTable[i] = cardRow; break; } } } if (_patients != null && _patients.Count > 0) { foreach (PatientCard patientSearch in _patients) { if (patientSearch.PatCard != null && patientSearch.PatCard.PATIENT_ID == patientID && patientSearch.PatCard.VISIT_ID == visitID && patientSearch.PatCard.OPER_ID == operID) { patientSearch.PatCard = cardRow; patientSearch.RefreshCard(); patientSearch.Refresh(); break; } } } } }
public bool SearchTomorrowFilterData(string searchContent) { bool isReturn = false; if (OperationScheduleFilter != null && OperationScheduleFilter.Count > 0) { List <MED_OPERATION_SCHEDULE> operScheduledList = OperationScheduleFilter.Where(x => x.PATIENT_ID == searchContent || x.INP_NO == searchContent || x.NAME == searchContent).ToList().OrderBy(x => x.SCHEDULED_DATE_TIME).ToList(); if (operScheduledList != null && operScheduledList.Count > 0) { MED_OPERATION_SCHEDULE operSchedule = operScheduledList[0]; for (int i = 0; i < dgTomorrowSchedule.Rows.Count; i++) { if (dgTomorrowSchedule["ColumnPatientID", i].Value.ToString().Trim() == operSchedule.PATIENT_ID && Convert.ToInt32(dgTomorrowSchedule["ColumnVisitID", i].Value) == operSchedule.VISIT_ID && Convert.ToInt32(dgTomorrowSchedule["ColumnOperID", i].Value) == operSchedule.OPER_ID) { this.dgTomorrowSchedule.Rows[i].Selected = true; this.dgTomorrowSchedule.CurrentCell = this.dgTomorrowSchedule.Rows[i].Cells[0]; isReturn = true; break; } else { this.dgTomorrowSchedule.Rows[i].Selected = false; } } MessageQueue.AddMessage("为您查找到明日手术患者" + operSchedule.NAME + " " + operSchedule.SEX + " " + operSchedule.AGE, Color.Black); } } else if (PatientCardScheduleFilter != null && PatientCardScheduleFilter.Count > 0) { List <MED_PATIENT_CARD> operScheduledList = PatientCardScheduleFilter.Where(x => x.PATIENT_ID == searchContent || x.INP_NO == searchContent || x.NAME == searchContent).ToList().OrderBy(x => x.SCHEDULED_DATE_TIME).ToList(); if (operScheduledList != null && operScheduledList.Count > 0) { MED_PATIENT_CARD operSchedule = operScheduledList[0]; for (int i = 0; i < dgTomorrowSchedule.Rows.Count; i++) { if (dgTomorrowSchedule["ColumnPatientID", i].Value.ToString().Trim() == operSchedule.PATIENT_ID && Convert.ToInt32(dgTomorrowSchedule["ColumnVisitID", i].Value) == operSchedule.VISIT_ID && Convert.ToInt32(dgTomorrowSchedule["ColumnOperID", i].Value) == operSchedule.OPER_ID) { this.dgTomorrowSchedule.Rows[i].Selected = true; this.dgTomorrowSchedule.CurrentCell = this.dgTomorrowSchedule.Rows[i].Cells[0]; isReturn = true; break; } else { this.dgTomorrowSchedule.Rows[i].Selected = false; } } MessageQueue.AddMessage("为您查找到明日手术患者" + operSchedule.NAME + " " + operSchedule.SEX + " " + operSchedule.AGE, Color.Black); } } if (!isReturn) { for (int i = 0; i < dgTomorrowSchedule.Rows.Count; i++) { this.dgTomorrowSchedule.Rows[i].Selected = false; } } return(isReturn); }
//private void SelectPatient(int index) //{ // if (_patients.Count > index && index >= 0) // { // SelectPatient(_patients[index]); // } //} private void SelectPatient(PatientCard patCard) { if (ExtendAppContext.Current.PatientID == patCard.PatCard.PATIENT_ID && ExtendAppContext.Current.VisitID == patCard.PatCard.VISIT_ID && ExtendAppContext.Current.OperID == patCard.PatCard.OPER_ID) { } else { if (ExtendApplicationContext.Current.IsRescueMode) { if (MessageBoxFormPC.Show("当前患者处于急救模式下,是否取消急救模式后切换患者?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { ExtendApplicationContext.Current.IsRescueMode = false; } else { return; } } } RefreshPatientDataTable(patCard.PatCard.PATIENT_ID, patCard.PatCard.VISIT_ID, patCard.PatCard.OPER_ID); foreach (PatientCard patient in _patients) { if (!patient.Equals(patCard)) { patient.Selected = false; } } patCard.Selected = true; _selectedPatient = patCard; //双击选中,全局变量赋值 MED_PATIENT_CARD patientInformation = patCard.PatCard; if (patientInformation != null) { ExtendAppContext.Current.PatientID = patientInformation.PATIENT_ID; ExtendAppContext.Current.VisitID = patientInformation.VISIT_ID; ExtendAppContext.Current.OperID = patientInformation.OPER_ID; ExtendApplicationContext.Current.PatientContextExtend.PatientID = patientInformation.PATIENT_ID; ExtendApplicationContext.Current.PatientContextExtend.VisitID = patientInformation.VISIT_ID; ExtendApplicationContext.Current.PatientContextExtend.OperID = patientInformation.OPER_ID; } else { ExtendAppContext.Current.PatientID = ""; ExtendApplicationContext.Current.PatientContextExtend.PatientID = ""; } ExtendApplicationContext.Current.PatientInformationExtend = patCard.PatCard; TransOperationName(); ShowPatientStatus(patCard); EventHandler eventHandle = Events[_selectChanged] as EventHandler; if (eventHandle != null) { eventHandle(this, null); } }
private void OperationRoomContent_DragDrop(object sender, DragEventArgs e) { this.IsSelected = true; if (e.Data.GetDataPresent(typeof(MED_PATIENT_CARD))) { MED_PATIENT_CARD patientCard = (MED_PATIENT_CARD)(e.Data.GetData(typeof(MED_PATIENT_CARD))); AddPACUInfo(patientCard, sender as OperationRoomContent); } }
public SelectMonitor(MED_PATIENT_CARD patientInfo, decimal eventNo, string roomNo, bool isSelect) { _patientInfo = patientInfo; _eventNo = eventNo; _roomNo = roomNo; InitializeComponent(); this.panelSelect.Visible = isSelect; medDataGridView1.AutoGenerateColumns = false; MonitorLoad(); }
private void dgPatientInfo_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { if (dgPatientInfo.CurrentCell != null) { string patientID = dgPatientInfo.Rows[e.RowIndex].Cells["ColumnPatientID"].Value.ToString(); int visitID = (int)dgPatientInfo.Rows[e.RowIndex].Cells["ColumnVisitID"].Value; int operID = (int)dgPatientInfo.Rows[e.RowIndex].Cells["ColumnOperID"].Value; ExtendApplicationContext.Current.PatientContextExtend.PatientID = patientID; ExtendApplicationContext.Current.PatientContextExtend.VisitID = visitID; ExtendApplicationContext.Current.PatientContextExtend.OperID = operID; _selectPatientCard = patientInfoRepository.GetPatCard(patientID, visitID, operID).Data; result = DialogResult.OK; ParentForm.DialogResult = DialogResult.OK; } }
private void RefreshInfo() { _patientCard = patientInfoRepository.GetPatCard(PatientID, VisitID, OperID).Data; if (_patientCard != null) { InpNo = _patientCard.INP_NO; PatName = _patientCard.NAME; if (_patientCard.SEX == "男") { pictureBoxSex.Image = Resources.男; } else if (_patientCard.SEX == "女") { pictureBoxSex.Image = Resources.女; } lbPatientName.Text = _patientCard.NAME; lblAge.Text = _patientCard.AGE; lblInPacuTime.Text = _patientCard.IN_PACU_DATE_TIME.Value.ToString("HH:mm"); lblOutRoomTime.Text = _patientCard.OUT_DATE_TIME.Value.ToString("HH:mm"); // lbPatientID.Text = _patientCard.PATIENT_ID + " " + RefareshDeptCode(_patientCard.DEPT_CODE) + " " + _patientCard.BED_NO; lbOperName.Text = _patientCard.OPERATION_NAME + " " + _patientCard.OPER_POSITION; lblAnesMethod.Text = _patientCard.ANES_METHOD; lblProcedures.Text = string.Format("术者:{0}{1} 主麻:{2}{3}", RefareshHisUsers(_patientCard.SURGEON), RefareshHisUsers(_patientCard.FIRST_OPER_ASSISTANT), RefareshHisUsers(_patientCard.ANES_DOCTOR), RefareshHisUsers(_patientCard.FIRST_ANES_ASSISTANT)); TimeSpan span = (TimeSpan)(_patientCard.OUT_DATE_TIME - _patientCard.IN_DATE_TIME); int hour = span.Days * 24; // lbloperTime.Text = "手术时长:" + hour + span.Hours + "小时" + span.Minutes + "分钟"; // lbInRoomTime.Text = _patientCard.IN_DATE_TIME.Value.ToString("HH:mm"); // lbAnesStartTime.Text = _patientCard.ANES_START_TIME.Value.ToString("HH:mm"); // lbOperStartTime.Text = _patientCard.START_DATE_TIME.Value.ToString("HH:mm"); // lbOperEndTime.Text = _patientCard.END_DATE_TIME.Value.ToString("HH:mm"); // lbAnesEndTime.Text = _patientCard.ANES_END_TIME.Value.ToString("HH:mm"); // lbOutRomTime.Text = _patientCard.OUT_DATE_TIME.Value.ToString("HH:mm"); lblAware.Text = string.IsNullOrEmpty(_patientCard.INP_NO) ? "住院号:" : _patientCard.INP_NO; lblPupil.Text = string.IsNullOrEmpty(_patientCard.DEPT_CODE) ? "科室:" : RefareshDeptCode(_patientCard.DEPT_CODE); lblIntubation.Text = string.IsNullOrEmpty(_patientCard.BED_NO) ? "床号:" : _patientCard.BED_NO; // lbloperTime } //MED_CONFIRMATION_PACU confirmationPACU = OperationInfoService.GetConfirmationPACU(PatientID, VisitID, OperID, 45); //if (confirmationPACU != null) //{ // lblAware.Text = string.IsNullOrEmpty(patient) ? "住院号:" : "住院号:" + confirmationPACU.CONSCIOUSNESS; // lblPupil.Text = string.IsNullOrEmpty(confirmationPACU.PUPIL) ? "科室:" : "科室:" + confirmationPACU.PUPIL; // lblIntubation.Text = string.IsNullOrEmpty(confirmationPACU.PUPIL) ? "床号:" : "床号:" + confirmationPACU.PUPIL; //} }
public int GetMaxEventItemNo(MED_PATIENT_CARD patientContext) { int maxItemNo = 0; List <MED_ANESTHESIA_EVENT> anesEvent = operationInfoRepository.GetAnesEventList(patientContext.PATIENT_ID, patientContext.VISIT_ID, patientContext.OPER_ID).Data; if (anesEvent != null && anesEvent.Count > 0) { anesEvent.ForEach(row => { if (row.ITEM_NO > maxItemNo) { maxItemNo = row.ITEM_NO; } }); } return(maxItemNo); }
/// <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> public void RefreshPatientDataTable(string patientID, int visitID, int operID) { if (OperationsInfoDataTable != null) { MED_PATIENT_CARD cardRow = patientInfoRepository.GetPatCard(patientID, visitID, operID).Data; if (OperationsInfoDataTable != null && OperationsInfoDataTable.Count > 0 && cardRow != null) { for (int i = 0; i < OperationsInfoDataTable.Count; i++) { if (OperationsInfoDataTable[i].PATIENT_ID == patientID && OperationsInfoDataTable[i].VISIT_ID == visitID && OperationsInfoDataTable[i].OPER_ID == operID) { OperationsInfoDataTable[i] = cardRow; break; } } _selectedPatient = cardRow; } } }
private void PatientInfoLoad() { _patientCard = patientInfoRepository.GetPatCard(_patientID, _visitID, _operID).Data; if (_patientCard != null) { PanelMMonitor.Controls.Clear(); monitor = new SelectMonitor(_patientCard, 1, "", false); PanelMMonitor.Controls.Add(monitor); monitor.Dock = DockStyle.Fill; dateEditOutDateTime.DateTime = _patientCard.OUT_DATE_TIME.Value; lblRoomNo.Text = _patientCard.OPER_ROOM_NO; lblSequence.Text = _patientCard.SEQUENCE.ToString(); patName.Text = _patientCard.NAME; patSex.Text = _patientCard.SEX; patAge.Text = _patientCard.AGE; patInpNo.Text = _patientCard.INP_NO; patBedNo.Text = _patientCard.BED_NO; } }
public MED_ANESTHESIA_EVENT CopyAnesthesiaEventRow(List <MED_ANESTHESIA_EVENT> anesthestaEventDataTable , MED_PATIENT_CARD patientContext, string eventNo, MED_ANESTHESIA_EVENT sourceRow) { MED_ANESTHESIA_EVENT row = NewAnesthesiaEventRow(anesthestaEventDataTable, patientContext, eventNo); row.EVENT_CLASS_CODE = sourceRow.EVENT_CLASS_CODE; row.EVENT_ITEM_NAME = sourceRow.EVENT_ITEM_NAME; row.EVENT_ITEM_SPEC = sourceRow.EVENT_ITEM_SPEC; row.EVENT_ITEM_CODE = sourceRow.EVENT_ITEM_CODE; row.ADMINISTRATOR = sourceRow.ADMINISTRATOR; row.CONCENTRATION = sourceRow.CONCENTRATION; row.CONCENTRATION_UNIT = sourceRow.CONCENTRATION_UNIT; row.DOSAGE = sourceRow.DOSAGE; row.DOSAGE_UNITS = sourceRow.DOSAGE_UNITS; row.PERFORM_SPEED = sourceRow.PERFORM_SPEED; row.SPEED_UNIT = sourceRow.SPEED_UNIT; row.PERFORM_SPEED = sourceRow.PERFORM_SPEED; row.EVENT_ATTR = sourceRow.EVENT_ATTR; return(row); }
private void dgPACUList_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e) { if (dgPACUList.Columns[e.ColumnIndex].HeaderText.Equals("操作")) { MED_PATIENT_CARD card = dgPACUList.Rows[e.RowIndex].DataBoundItem as MED_PATIENT_CARD; int operStatus = Convert.ToInt32(dgPACUList.Rows[e.RowIndex].Cells["OperStatus"].Value); if (dgPACUList.Rows[e.RowIndex].Cells["OperStatus"].Value == null) { return; } if (card.OPER_STATUS_CODE == (int)OperationStatus.TurnToPACU) { e.Value = Resources.pacu左表格_入室1; } else if (card.OPER_STATUS_CODE > (int)OperationStatus.InPACU) { if (card.IN_PACU_DATE_TIME.HasValue) { e.Value = Resources.pacu左表格_出室1; } else { e.Value = Resources.pacu左表格_入室1; } } else { e.Value = Resources.pacu左表格_blank; } } else if (dgPACUList.Columns[e.ColumnIndex].HeaderText.Equals("状态")) { if (e.Value == null) { return; } int operStatus = Convert.ToInt32(e.Value); e.Value = OperationStatusHelper.OperationStatusToString((OperationStatus)operStatus); } }
private void PatientCard_MouseDown(object sender, MouseEventArgs e) { if (_patCard != null) { PatientCard_Click(null, null); MED_PATIENT_CARD patientCard = _patCard; if (e.Clicks == 2) { DoubleClicked(this, EventArgs.Empty); } else { if (patientCard == null) { return; } this.DoDragDrop(this, DragDropEffects.Copy); } } }
private void searchTextBox1_BtnClicked(object sender, string var) { if (!string.IsNullOrEmpty(var)) { _patientID = var; List <MED_PATIENT_CARD> _patientCardList = patientInfoRepository.GetPatientListDataTableByPatientID( _patientID, ExtendApplicationContext.Current.OperRoom, ExtendApplicationContext.Current.HospBranchCode).Data; if (_patientCardList != null && _patientCardList.Count > 0) { _patientCardList.ForEach(row => { if (row.OPER_ID > _operID) { _operID = row.OPER_ID; } }); PatientInfoSureControl sure = new PatientInfoSureControl(_patientCardList); DialogHostFormPC dialogHostForm = new DialogHostFormPC("病人信息选择", sure.Width, sure.Height); dialogHostForm.Text = "病人信息选择"; dialogHostForm.Child = sure; dialogHostForm.ShowDialog(); if (sure.result == DialogResult.OK) { _patientCard = sure.SelectPatientCard; _patientID = _patientCard.PATIENT_ID; _visitID = _patientCard.VISIT_ID; _operID = _operID + 1; LoadPatientID(); } } else { SyncPatientByPatientId(_patientID); } LoadPatientInfo(); } }
public ConfirmationSureBase(MED_PATIENT_CARD patientCard, decimal eventNo) : this() { _eventNo = ApplicationConfiguration.IsPACUProgram ? 1 : 0; if (patientCard == null) { panelEmergency.Visible = true; panel1.Visible = false; label1.Text = "急诊登记信息确认"; btnUp.Visible = false; btnNext.Title = "确认"; return; } else { panelEmergency.Visible = false; } _patientCard = patientCard; _patientID = patientCard.PATIENT_ID; _visitID = patientCard.VISIT_ID; _operID = patientCard.OPER_ID; LoadPatientInfo(); }
public PatientCard(MED_PATIENT_CARD patientInformation) : this() { _patCard = patientInformation; }
private void PatientTree_Load(object sender, EventArgs e) { MED_PATIENT_CARD cardRow = patientInfoRepository.GetPatCard(patientID, (int)visitID, (int)operID).Data; labelName.Text = GetValue(cardRow.NAME); labelBaseInfo.Text = string.Format("{0} {1} {2}", GetValue(cardRow.SEX), DateDiff.CalAge(cardRow.DATE_OF_BIRTH.Value, cardRow.SCHEDULED_DATE_TIME.Value), GetValue(cardRow.INP_NO)); MED_PAT_VISIT patVisit = operationInfoRepository.GetPatVisit(patientID, (int)visitID).Data; if (patVisit == null) { patVisit = new MED_PAT_VISIT(); } string admission_date_time = string.Empty; if (patVisit.ADMISSION_DATE_TIME != null) { admission_date_time = patVisit.ADMISSION_DATE_TIME.Value.ToString("yyyy-MM-dd"); } labelZD.Text = string.Format("{0}{1}{2}", admission_date_time, GetValue(patVisit.PAT_ADM_CONDITION), GetValue(patVisit.INSURANCE_TYPE)); #region 术后随访 List <MED_ANESTHESIA_INQUIRY> anesthesia_inquiry = operationInfoRepository.GetAnesInquiryList(patientID, (int)visitID, (int)operID).Data; if (anesthesia_inquiry != null && anesthesia_inquiry.Count > 0) { labelINQUIRY_DATE.Text = anesthesia_inquiry[0].INQUIRY_DATE.ToString("yyyy-MM-dd"); labelDocName.Text = RefUsersDT(anesthesia_inquiry[0].INQUIRY_DOCTOR); } else { labelINQUIRY_DATE.Text = string.Empty; labelDocName.Text = string.Empty; } #endregion #region 患者复苏 string[] tempArr = new string[10] { "", "", "", "", "", "", "", "", "", "" }; StringBuilder sb = new StringBuilder(); sb.Append("入室:{0} 出室:{1}\r\n"); sb.Append("复苏市时长:{2}分钟\r\n"); sb.Append("入室情况:体温{3}℃ 意识:{4} 呼吸:{5}次/分\r\n"); sb.Append("苏醒评分:{6}分\r\n"); sb.Append("出室情况:体温{7}℃ 意识:{8} 呼吸:{9}次/分\r\n"); if (cardRow.IN_PACU_DATE_TIME != null) { labelFuSuDate.Text = cardRow.IN_PACU_DATE_TIME.Value.ToString("yyyy-MM-dd"); tempArr[0] = cardRow.IN_PACU_DATE_TIME.Value.ToString("HH:mm"); } else { labelFuSuDate.Text = string.Empty; } if (cardRow.OUT_PACU_DATE_TIME != null) { tempArr[1] = cardRow.OUT_PACU_DATE_TIME.Value.ToString("HH:mm"); } if (cardRow.IN_PACU_DATE_TIME != null && cardRow.OUT_PACU_DATE_TIME != null) { tempArr[2] = (cardRow.OUT_PACU_DATE_TIME.Value - cardRow.IN_PACU_DATE_TIME.Value).Minutes.ToString(); } //入室 MED_CONFIRMATION_PACU in_confirmation_pacu = operationInfoRepository.GetConfirmationPACU(patientID, (int)visitID, (int)operID, 45).Data; if (in_confirmation_pacu != null) { tempArr[3] = in_confirmation_pacu.BODY_TEMP.Value.ToString(); tempArr[4] = in_confirmation_pacu.CONSCIOUSNESS; tempArr[5] = in_confirmation_pacu.RESP.Value.ToString(); } List <MED_STEWARD_MARK> steward_mark = operationInfoRepository.GetStewardMarkList(patientID, (int)visitID, (int)operID).Data; if (steward_mark != null && steward_mark.Count > 0) { tempArr[6] = steward_mark[steward_mark.Count - 1].TOTAL_MATK.ToString(); } //出室 MED_CONFIRMATION_PACU out_confirmation_pacu = operationInfoRepository.GetConfirmationPACU(patientID, (int)visitID, (int)operID, 55).Data; if (out_confirmation_pacu != null) { tempArr[7] = out_confirmation_pacu.BODY_TEMP.Value.ToString(); tempArr[8] = out_confirmation_pacu.CONSCIOUSNESS; tempArr[9] = out_confirmation_pacu.RESP.Value.ToString(); } labelPACU.Text = string.Format(sb.ToString(), tempArr); #endregion #region 术中麻醉 MED_ANESTHESIA_INPUT_DATA input_data = operationInfoRepository.GetAnesInputData(patientID, (int)visitID, (int)operID).Data; if (cardRow.START_DATE_TIME != null) { labelShouShuZhongDate.Text = cardRow.START_DATE_TIME.Value.ToString("yyyy-MM-dd"); } else { labelShouShuZhongDate.Text = string.Empty; } string ANALGESIA_EFFECT = string.Empty; if (input_data != null) { ANALGESIA_EFFECT = input_data.ANALGESIA_EFFECT; } if (cardRow.OUT_DATE_TIME != null && cardRow.IN_DATE_TIME != null) { TimeSpan span = (TimeSpan)(cardRow.OUT_DATE_TIME - cardRow.IN_DATE_TIME); int hour = span.Days * 24; lbloperTime.Text = string.Format("手术时长:{0}小时 {1}分钟 麻醉效果:{2}", hour + span.Hours, span.Minutes, ANALGESIA_EFFECT); lbInRoomTime.Text = cardRow.IN_DATE_TIME.Value.ToString("HH:mm"); lbAnesStartTime.Text = cardRow.ANES_START_TIME.Value.ToString("HH:mm"); lbOperStartTime.Text = cardRow.START_DATE_TIME.Value.ToString("HH:mm"); lbOperEndTime.Text = cardRow.END_DATE_TIME.Value.ToString("HH:mm"); lbAnesEndTime.Text = cardRow.ANES_END_TIME.Value.ToString("HH:mm"); lbOutRomTime.Text = cardRow.OUT_DATE_TIME.Value.ToString("HH:mm"); } else { lbloperTime.Text = string.Format("手术时长: 麻醉效果:"); lbInRoomTime.Text = "--:--"; lbAnesStartTime.Text = "--:--"; lbAnesStartTime.Text = "--:--"; lbOperStartTime.Text = "--:--"; lbOperEndTime.Text = "--:--"; lbAnesEndTime.Text = "--:--"; lbOutRomTime.Text = "--:--"; } MED_OPERATION_MASTER_EXT master_ext = operationInfoRepository.GetOperMasterExt(patientID, (int)visitID, (int)operID).Data; string[] arrayInOrOut = new string[8] { "", "", "", "", "", "", "", "" }; if (master_ext == null) { master_ext = new MED_OPERATION_MASTER_EXT(); } if (master_ext.INFUSION_TRAN_VOL != null) { arrayInOrOut[0] = GetValue(master_ext.INFUSION_TRAN_VOL.ToString()); } if (master_ext.OUT_FLUIDS_AMOUNT != null) { arrayInOrOut[1] = GetValue(master_ext.OUT_FLUIDS_AMOUNT.ToString()); } if (master_ext.BLOOD_TRANSFUSED != null) { arrayInOrOut[2] = GetValue(master_ext.BLOOD_TRANSFUSED.ToString()); } if (master_ext.CRY_WATHER != null) { arrayInOrOut[3] = GetValue(master_ext.CRY_WATHER.ToString()); } List <MED_VITAL_SIGN> vitalSignList = new OperationVitalSignRepository().GetVitalSignData(patientID, (int)visitID, (int)operID, "0", false); if (vitalSignList != null && vitalSignList.Count > 0) { DateTime lastTime = vitalSignList[vitalSignList.Count - 1].TIME_POINT; vitalSignList = vitalSignList.Where(p => p.TIME_POINT == lastTime).ToList(); foreach (MED_VITAL_SIGN row in vitalSignList) { if (row.ITEM_CODE == "100") //体温 { arrayInOrOut[4] = GetValue(row.ITEM_VALUE); } else if (row.ITEM_CODE == "89")//血压高 { arrayInOrOut[5] = GetValue(row.ITEM_VALUE); } else if (row.ITEM_CODE == "90")//血压低 { arrayInOrOut[6] = GetValue(row.ITEM_VALUE); } else if (row.ITEM_CODE == "44")//脉搏 { arrayInOrOut[7] = GetValue(row.ITEM_VALUE); } } } labelInOrOut.Text = string.Format("术中输液:入量:{0}ml 出量:{1}ml\r\n输血:{2}ml 自体血:{3}\r\n出室时:体温:{4}℃ 血压:{5}/{6} 脉搏:{7}", arrayInOrOut); MED_OPERATION_MASTER master = operationInfoRepository.GetOperMaster(patientID, (int)visitID, (int)operID).Data; labelAnesOper.Text = string.Format("麻:{0} 护:{1}\r\n手:{2}", RefUsersDT(master.ANES_DOCTOR) + " " + RefUsersDT(master.FIRST_ANES_ASSISTANT), RefUsersDT(master.FIRST_OPER_NURSE) + " " + RefUsersDT(master.FIRST_SUPPLY_NURSE), RefUsersDT(master.SURGEON) + " " + RefUsersDT(master.FIRST_OPER_ASSISTANT)); #endregion #region 术前访视 MED_ANESTHESIA_PLAN_EXAM anesPlanExam = operationInfoRepository.GetAnesPlanExam(patientID, (int)visitID, (int)operID).Data; MED_ANESTHESIA_PLAN_PMH anesPlanPmh = operationInfoRepository.GetAnesPlanPmh(patientID, (int)visitID, (int)operID).Data; MED_ANESTHESIA_PLAN anesPlan = operationInfoRepository.GetAnesPlan(patientID, (int)visitID, (int)operID).Data; if (anesPlanExam == null) { anesPlanExam = new MED_ANESTHESIA_PLAN_EXAM(); } if (anesPlanPmh == null) { anesPlanPmh = new MED_ANESTHESIA_PLAN_PMH(); } if (anesPlan == null) { anesPlan = new MED_ANESTHESIA_PLAN(); } if (anesPlan.INQUIRY_BEFORE_DATE != null) { labelFangShiDate.Text = anesPlan.INQUIRY_BEFORE_DATE.Value.ToString("yyyy-MM-dd"); } else { labelFangShiDate.Text = string.Empty; } labelFangShiName.Text = GetValue(anesPlan.INQUIRY_DOCTOR); labelPatient.Text = string.Format("{0}cm,{1}kg{2}/{3}mmHg{4}次/分,{5}次/分", GetValue(anesPlanPmh.HEIGHT.ToString()), GetValue(anesPlanPmh.WEIGHT.ToString()), GetValue(anesPlanExam.BLOOD_PRESS_HIGH.ToString()), GetValue(anesPlanExam.BLOOD_PRESS_LOW.ToString()), GetValue(anesPlanExam.CARDIOTACH.ToString()), GetValue(anesPlanExam.BREATH.ToString())); labelSQ1.Text = string.Format("血常规:{0} 心电图:{1}", "", GetValue(anesPlanExam.ECG_EXAM)); labelSQ2.Text = string.Format("生化:{0} 意识:{1}", "", ""); labelSQ3.Text = string.Format("{0} {1}", "", ""); labelSQ4.Text = string.Format("执行麻醉:{0} ASA分级:{1}", GetValue(anesPlan.ANESTHESIA_METHOD), GetValue(cardRow.ASA_GRADE)); #endregion List <MED_OPERATION_SCHEDULE> operScheduleList = operationInfoRepository.GetOperScheduleList(patientID, (int)visitID).Data.ToList(); if (operScheduleList != null && operScheduleList.Count > 0) { operScheduleList = operScheduleList.Where(x => x.OPER_ID == (int)operID).ToList(); } #region 手术安排 StringBuilder sbschedule1 = new StringBuilder(); sbschedule1.Append("手术安排日期:{0}\r\n"); sbschedule1.Append("麻:{1}\r\n"); sbschedule1.Append("护:{2}\r\n"); sbschedule1.Append("手术间:{3} 台次:{4}"); string[] tempSchedule1Arr = new string[5] { "", "", "", "", "" }; if (operScheduleList != null && operScheduleList.Count > 0) { MED_OPERATION_SCHEDULE tempoperation_schedule1 = operScheduleList[0]; tempSchedule1Arr[0] = tempoperation_schedule1.SCHEDULED_DATE_TIME.Value.ToString("yyyy-MM-dd"); StringBuilder sbOperAnes = new StringBuilder(); sbOperAnes.Append(RefUsersDT(tempoperation_schedule1.ANES_DOCTOR)); sbOperAnes.Append(RefUsersDT(tempoperation_schedule1.FIRST_ANES_ASSISTANT)); sbOperAnes.Append(RefUsersDT(tempoperation_schedule1.SECOND_ANES_ASSISTANT)); sbOperAnes.Append(RefUsersDT(tempoperation_schedule1.THIRD_ANES_ASSISTANT)); sbOperAnes.Append(RefUsersDT(tempoperation_schedule1.FOURTH_ANES_ASSISTANT)); tempSchedule1Arr[1] = sbOperAnes.ToString(); StringBuilder sbOperNurse = new StringBuilder(); sbOperNurse.Append(RefUsersDT(tempoperation_schedule1.FIRST_OPER_NURSE)); sbOperNurse.Append(RefUsersDT(tempoperation_schedule1.SECOND_OPER_NURSE)); sbOperNurse.Append(RefUsersDT(tempoperation_schedule1.THIRD_OPER_NURSE)); sbOperNurse.Append(RefUsersDT(tempoperation_schedule1.FOURTH_OPER_NURSE)); sbOperNurse.Append(RefUsersDT(tempoperation_schedule1.FIRST_OPER_NURSE)); sbOperNurse.Append(RefUsersDT(tempoperation_schedule1.SECOND_SUPPLY_NURSE)); sbOperNurse.Append(RefUsersDT(tempoperation_schedule1.THIRD_SUPPLY_NURSE)); sbOperNurse.Append(RefUsersDT(tempoperation_schedule1.FOURTH_SUPPLY_NURSE)); tempSchedule1Arr[2] = sbOperNurse.ToString(); tempSchedule1Arr[3] = GetValue(tempoperation_schedule1.OPER_ROOM_NO); if (tempoperation_schedule1.SEQUENCE != null) { tempSchedule1Arr[4] = tempoperation_schedule1.SEQUENCE.ToString(); } labelSchedule.Text = string.Format(sbschedule1.ToString(), tempSchedule1Arr); labelOperScheduleTime.Text = tempoperation_schedule1.SCHEDULED_DATE_TIME.Value.ToString("yyyy-MM-dd"); } else { labelSchedule.Text = string.Format(sbschedule1.ToString(), tempSchedule1Arr); labelOperScheduleTime.Visible = false; } #endregion #region 手术申请 if (operScheduleList != null && operScheduleList.Count > 0) { MED_OPERATION_SCHEDULE tempoperation_schedule = operScheduleList[0]; string[] tempScheduleArr = new string[7] { "", "", "", "", "", "", "" }; tempScheduleArr[0] = RefDeptDT(tempoperation_schedule.DEPT_CODE); tempScheduleArr[1] = GetValue(tempoperation_schedule.BED_NO); tempScheduleArr[2] = GetValue(tempoperation_schedule.DIAG_BEFORE_OPERATION); tempScheduleArr[3] = GetValue(tempoperation_schedule.OPERATION_NAME); tempScheduleArr[4] = GetValue(tempoperation_schedule.OPER_SCALE); tempScheduleArr[5] = GetValue(tempoperation_schedule.OPER_POSITION); labelOperReg.Text = string.Format("{0}{1}\r\n{2}\r\n{3}{4}\r\n{5}", tempScheduleArr); StringBuilder sbOper = new StringBuilder(); sbOper.Append(RefUsersDT(tempoperation_schedule.SURGEON)); sbOper.Append(RefUsersDT(tempoperation_schedule.FIRST_OPER_ASSISTANT)); sbOper.Append(RefUsersDT(tempoperation_schedule.SECOND_OPER_ASSISTANT)); sbOper.Append(RefUsersDT(tempoperation_schedule.THIRD_OPER_ASSISTANT)); sbOper.Append(RefUsersDT(tempoperation_schedule.FOURTH_ANES_ASSISTANT)); labelOper.Text = string.Format("手:{0}", sbOper.ToString()); labelCreateDate.Text = tempoperation_schedule.REQ_DATE_TIME.Value.ToString("yyyy-Mm-dd"); if (cardRow.EMERGENCY_IND == 1) { pictureBoxJZ.Visible = true; } if (cardRow.RADIATE_IND == 2) { pictureBoxFS.Visible = true; } if (cardRow.ISOLATION_IND == 2) { pictureBoxGL.Visible = true; } } else { labelOperReg.Text = string.Empty; labelOper.Text = "手:"; labelCreateDate.Text = string.Empty; } #endregion }
private void SyncPatientByPatientId(string patientID) { if (!string.IsNullOrEmpty(patientID)) { if (ExtendApplicationContext.Current.IsSync) { string ret = ""; ret = syncInfoRepository.SyncPatientInfoAndInHospital(patientID).Data; ret += syncInfoRepository.SyncScheduleInfo(patientID, accountRepository.GetServerTime().Data).Data; if (!string.IsNullOrEmpty(ret)) { MessageBoxFormPC.Show(ret); } } } bool flag = true; if (patientID != "") { patMasterIndex = operationInfoRepository.GetPatMasterIndex(patientID).Data; MED_PATS_IN_HOSPITAL patsInHospital = null; if (patMasterIndex == null) { patsInHospital = operationInfoRepository.GetPatsInHospital(patientID).Data; if (patsInHospital != null) { patientID = patsInHospital.PATIENT_ID; patMasterIndex = operationInfoRepository.GetPatMasterIndex(patientID).Data; } } List <MED_PAT_VISIT> patVisitList = operationInfoRepository.GetPatVisitList(patientID).Data; if (patVisitList != null && patVisitList.Count > 0) { flag = flag & false; patVisit = patVisitList[0]; _visitID = Convert.ToInt32(patVisitList[0].GetValue("VISIT_ID")); } else { flag = flag & true; patVisit = new MED_PAT_VISIT(); _visitID = 1; patVisit.SetValue("PATIENT_ID", patientID); } if (patMasterIndex == null) { flag = flag & true; patMasterIndex = new MED_PAT_MASTER_INDEX(); patMasterIndex.SetValue("PATIENT_ID", patientID); MessageBoxFormPC.Show("当前输入患者ID,需要手动输入患者信息进行急诊登记", "系统提示"); // return; } List <MED_OPERATION_MASTER> operMasterList = operationInfoRepository.GetOperMasterList(patientID, _visitID).Data; if (operMasterList != null && operMasterList.Count > 0) { _operID = Convert.ToInt32(operMasterList[0].GetValue("OPER_ID")) + 1; } operationMaster = new MED_OPERATION_MASTER(); operationMaster.PATIENT_ID = patientID; operationMaster.VISIT_ID = _visitID; operationMaster.OPER_ID = _operID; operationMaster.OPER_ROOM = ExtendApplicationContext.Current.OperRoom; operationMaster.OPER_ROOM_NO = ExtendApplicationContext.Current.OperRoomNo; operationMaster.HOSP_BRANCH = ExtendApplicationContext.Current.HospBranchCode; operationMaster.SCHEDULED_DATE_TIME = accountRepository.GetServerTime().Data; if (patsInHospital != null) { patVisit.INP_NO = patsInHospital.INP_NO; operationMaster.WARD_CODE = patsInHospital.WARD_CODE; operationMaster.DEPT_CODE = patsInHospital.WARD_CODE; operationMaster.BED_NO = patsInHospital.BED_NO; } else { patsInHospital = operationInfoRepository.GetPatsInHospitalByID(patientID, _visitID).Data; patVisit.INP_NO = patsInHospital.INP_NO; operationMaster.WARD_CODE = patsInHospital.WARD_CODE; operationMaster.DEPT_CODE = patsInHospital.WARD_CODE; operationMaster.BED_NO = patsInHospital.BED_NO; } ExtendApplicationContext.Current.MED_PAT_MASTER_INDEX = patMasterIndex; ExtendApplicationContext.Current.MED_OPERATION_MASTER = operationMaster; ExtendApplicationContext.Current.MED_PAT_VISIT = patVisit; anesPlan = new DocDataRepository().GetAnesthesiaPlan(_patientID, _visitID, _operID); _patientCard = new MED_PATIENT_CARD(); foreach (string column in _patientCard.GetPropsName()) { foreach (string col in patMasterIndex.GetPropsName()) { if (column == col) { _patientCard.SetValue(column, patMasterIndex.GetValue(col)); } } foreach (string col in operationMaster.GetPropsName()) { if (column == col) { _patientCard.SetValue(column, operationMaster.GetValue(col)); } } foreach (string col in patVisit.GetPropsName()) { if (column == col) { _patientCard.SetValue(column, patVisit.GetValue(col)); } } } } }
private void dgPACUList_CellMouseDown(object sender, DataGridViewCellMouseEventArgs e) { if (e.RowIndex == -1 || e.ColumnIndex == -1) { return; } if (e.Button == MouseButtons.Left && e.Clicks == 1) { MED_PATIENT_CARD card = dgPACUList.Rows[e.RowIndex].DataBoundItem as MED_PATIENT_CARD; ExtendApplicationContext.Current.PatientContextExtend.PatientID = card.PATIENT_ID; ExtendApplicationContext.Current.PatientContextExtend.VisitID = card.VISIT_ID; ExtendApplicationContext.Current.PatientContextExtend.OperID = card.OPER_ID; ExtendApplicationContext.Current.PatientInformationExtend = card; EventHandler eventHandle = Events[_patientClick] as EventHandler; if (eventHandle != null) { eventHandle(this, null); } if (dgPACUList.Columns[e.ColumnIndex].Name.Equals("ColAction") && dgPACUList.Rows[e.RowIndex].Cells["OperStatus"].Value != null) { for (int i = 0; i < dgPACUList.Rows.Count; i++) { if (dgPACUList["ColumnPatientID", i].Value.ToString().Trim() == card.PATIENT_ID && Convert.ToInt32(dgPACUList["ColumnVisitID", i].Value) == card.VISIT_ID && Convert.ToInt32(dgPACUList["ColumnOperID", i].Value) == card.OPER_ID) { this.dgPACUList.Rows[i].Selected = true; this.dgPACUList.CurrentCell = this.dgPACUList.Rows[i].Cells[0]; break; } else { this.dgPACUList.Rows[i].Selected = false; } } if (card.OPER_STATUS_CODE == (int)OperationStatus.TurnToPACU || (card.OPER_STATUS_CODE > (int)OperationStatus.InPACU && !card.IN_PACU_DATE_TIME.HasValue))//dgPACUList.Rows[e.RowIndex].Cells["OperStatus"].Value.ToString().Contains("40") { dgPACUList.Rows[e.RowIndex].Cells["ColAction"].Value = Resources.pacu左表格_入室3; RefreshPatientDataTable(card.PATIENT_ID, card.VISIT_ID, card.OPER_ID); RefreshOperatingRoomList(); ConfirmationInPacu inPacu = new ConfirmationInPacu(card.PATIENT_ID, card.VISIT_ID, card.OPER_ID, false); DialogHostFormPC dialogHostForm = new DialogHostFormPC("入室信息确认", inPacu.Width, inPacu.Height); dialogHostForm.Child = inPacu; dialogHostForm.ShowDialog(); if (inPacu.result == DialogResult.OK) { operationRoomPandect1.RefreshRoom(inPacu.PacuRoom, card.PATIENT_ID, card.VISIT_ID, card.OPER_ID); RefreshPatientDataTable(ExtendApplicationContext.Current.CurrentDateTime, ExtendApplicationContext.Current.CurrentSearchStr); } //DragDropEffects effect = (sender as DataGridView).DoDragDrop(_selectedPatient, DragDropEffects.Move); //if (effect == DragDropEffects.Move) //{ // foreach (DataGridViewRow row in dgPACUList.SelectedRows) // { // this.dgPACUList.Rows.Remove(row); // } //} } else if (card.OPER_STATUS_CODE > (int)OperationStatus.TurnToPACU && card.IN_PACU_DATE_TIME.HasValue) { dgPACUList.Rows[e.RowIndex].Cells["ColAction"].Value = Resources.pacu左表格_出室3; RefreshPatientDataTable(card.PATIENT_ID, card.VISIT_ID, card.OPER_ID); patientSelectClick(); } } } }
public bool SearchYesterdayFilterData(string searchContent) { bool isReturn = false; List <MED_PATIENT_CARD> patientCardList = null; List <MED_PATIENT_CARD> refreshList = new List <MED_PATIENT_CARD>(); MED_PATIENT_CARD patientCard = new MED_PATIENT_CARD(); if (FinishedOperFilter != null && FinishedOperFilter.Count > 0) { patientCardList = FinishedOperFilter.Where(x => x.PATIENT_ID == searchContent || x.INP_NO == searchContent || x.NAME == searchContent).ToList(); } if (patientCardList == null || patientCardList.Count == 0) { patientCardList = patientInfoRepository.GetPatientListDataTable(DateTime.MinValue, ExtendApplicationContext.Current.OperRoom, ExtendApplicationContext.Current.HospBranchCode).Data; patientCardList = patientCardList.Where(x => x.PATIENT_ID == searchContent || x.INP_NO == searchContent || x.NAME == searchContent).ToList(); if (patientCardList != null && patientCardList.Count > 0) { foreach (MED_PATIENT_CARD card in patientCardList) { bool isAdd = true; foreach (MED_PATIENT_CARD patient in FinishedOperFilter) { if (card.PATIENT_ID == patient.PATIENT_ID && card.VISIT_ID == patient.VISIT_ID && card.OPER_ID == patient.OPER_ID) { isAdd = false; } } if (isAdd) { refreshList.Add(card); } } foreach (MED_PATIENT_CARD card in FinishedOperFilter) { refreshList.Add(card); } FinishedOperFilter = new List <MED_PATIENT_CARD>(); FinishedOperFilter = refreshList; dgFinishedYesterday.DataSource = FinishedOperFilter; patientCard = FinishedOperFilter[0]; } } else { patientCard = patientCardList[0]; } if (patientCard != null) { for (int i = 0; i < dgFinishedYesterday.Rows.Count; i++) { if (dgFinishedYesterday["ColumnYPatientID", i].Value.ToString().Trim() == patientCard.PATIENT_ID && Convert.ToInt32(dgFinishedYesterday["ColumnYVisitID", i].Value) == patientCard.VISIT_ID && Convert.ToInt32(dgFinishedYesterday["ColumnYOperID", i].Value) == patientCard.OPER_ID) { this.dgFinishedYesterday.Rows[i].Selected = true; this.dgFinishedYesterday.CurrentCell = this.dgFinishedYesterday.Rows[i].Cells[0]; isReturn = true; break; } else { this.dgFinishedYesterday.Rows[i].Selected = false; } } MessageQueue.AddMessage("为您查找到已完成手术患者" + patientCard.NAME + " " + patientCard.SEX + " " + patientCard.AGE, Color.Black); } return(isReturn); }
public void Search(string searchContent) { List <MED_PATIENT_CARD> patientCardList = null; if (_operationSelectInfoDT != null && _operationSelectInfoDT.Count > 0) { patientCardList = _operationSelectInfoDT.Where(p => p.PATIENT_ID == searchContent || p.INP_NO == searchContent || p.NAME == searchContent).ToList(); } else { _operationSelectInfoDT = new List <MED_PATIENT_CARD>(); } if (patientCardList != null && patientCardList.Count > 0) { MED_PATIENT_CARD patientCard = patientCardList[0]; for (int i = 0; i < dgPACUList.Rows.Count; i++) { if (dgPACUList["ColumnPatientID", i].Value.ToString().Trim() == patientCard.PATIENT_ID && Convert.ToInt32(dgPACUList["ColumnVisitID", i].Value) == patientCard.VISIT_ID && Convert.ToInt32(dgPACUList["ColumnOperID", i].Value) == patientCard.OPER_ID) { this.dgPACUList.Rows[i].Selected = true; this.dgPACUList.CurrentCell = this.dgPACUList.Rows[i].Cells[0]; break; } else { this.dgPACUList.Rows[i].Selected = false; } } operationRoomPandect1.RefreshRoom(searchContent, false); } else { patientCardList = patientInfoRepository.GetPatientListDataTable(DateTime.MinValue, ExtendApplicationContext.Current.OperRoom, ExtendApplicationContext.Current.HospBranchCode).Data; if (patientCardList != null) { patientCardList = patientCardList.Where(x => x.PATIENT_ID == searchContent || x.INP_NO == searchContent || x.NAME == searchContent).ToList(); } if (patientCardList != null && patientCardList.Count > 0) { foreach (MED_PATIENT_CARD card in patientCardList) { _operationSelectInfoDT.Add(card); } BindingSource BS = new BindingSource(); BS.DataSource = _operationSelectInfoDT; dgPACUList.DataSource = BS; _selectedPatient = patientCardList[0]; } if (_selectedPatient != null) { for (int i = 0; i < dgPACUList.Rows.Count; i++) { if (dgPACUList["ColumnPatientID", i].Value.ToString().Trim() == _selectedPatient.PATIENT_ID && Convert.ToInt32(dgPACUList["ColumnVisitID", i].Value) == _selectedPatient.VISIT_ID && Convert.ToInt32(dgPACUList["ColumnOperID", i].Value) == _selectedPatient.OPER_ID) { this.dgPACUList.Rows[i].Selected = true; this.dgPACUList.CurrentCell = this.dgPACUList.Rows[i].Cells[0]; break; } else { this.dgPACUList.Rows[i].Selected = false; } } MessageQueue.AddMessage("为您查找到已完成手术患者" + _selectedPatient.NAME + " " + _selectedPatient.SEX + " " + _selectedPatient.AGE, Color.Black); } operationRoomPandect1.RefreshRoom(searchContent, true); } }
public void AddPACUInfo(MED_PATIENT_CARD patientCard, OperationRoomContent operContent) { if (!patientCard.IN_PACU_DATE_TIME.HasValue && patientCard.OPER_STATUS_CODE == 40) { TimeInPutFrmPC timeInput = new TimeInPutFrmPC(); timeInput.Text = "入PACU时间"; if (timeInput.ShowDialog() != DialogResult.Cancel) { string roomNo = operContent.RoomNo; List <MED_OPERATING_ROOM> operatingRoomList = comnDictRepository.GetOperatingRoomList(operContent.BedType).Data; if (operatingRoomList != null && operatingRoomList.Count > 0) { operatingRoomList = operatingRoomList.Where(x => x.DEPT_CODE == ExtendApplicationContext.Current.OperRoom).ToList(); } MED_OPERATION_MASTER operMaster = operationInfoRepository.GetOperMaster(ExtendApplicationContext.Current.PatientContextExtend.PatientID, ExtendApplicationContext.Current.PatientContextExtend.VisitID, ExtendApplicationContext.Current.PatientContextExtend.OperID).Data; if (operMaster != null) { if (operMaster.OUT_DATE_TIME.HasValue) { if (timeInput.SelectedDateTime.AddSeconds(0 - timeInput.SelectedDateTime.Second) < operMaster.OUT_DATE_TIME) { MessageBoxFormPC.Show("【入复苏室】 时间 [" + timeInput.SelectedDateTime + "] 小于 【出手术室】时间 [" + operMaster.OUT_DATE_TIME + "],请重新输入!", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } } } if (operatingRoomList != null && operatingRoomList.Count > 0) { List <string> bedNos = new List <string>(); operatingRoomList.ForEach(row => { if (!string.IsNullOrEmpty(row.BED_TYPE) && row.BED_TYPE.Equals("1")) { bedNos.Add(row.ROOM_NO); } }); } if (string.IsNullOrEmpty(roomNo)) { return; } { bool isUpdate = new OperatingRoomRepository().SetOperatingRoomPatient(operatingRoomList, roomNo, ExtendApplicationContext.Current.OperRoom, patientCard.PATIENT_ID , patientCard.VISIT_ID, patientCard.OPER_ID); if (isUpdate) { new OperatingRoomRepository().SetOperMaster(patientCard.PATIENT_ID, patientCard.VISIT_ID, patientCard.OPER_ID, "IN_PACU_DATE_TIME", timeInput.SelectedDateTime, 45); // CommDictService.SaveOperatingRommList(operatingRoomList); new OperatingRoomRepository().SetMonitorDictPatient(operContent.BedType, ExtendApplicationContext.Current.OperRoom, roomNo, patientCard.PATIENT_ID , patientCard.VISIT_ID, patientCard.OPER_ID); patientCard.OPER_STATUS_CODE = 45; patientCard.IN_PACU_DATE_TIME = timeInput.SelectedDateTime; ExtendApplicationContext.Current.PatientInformationExtend = patientCard; } } RefreshControl(roomNo, operContent.BedType); } } }
private void PatientInfoLoad() { if (string.IsNullOrEmpty(PacuRoom)) { List <MED_OPERATING_ROOM> roomList = comnDictRepository.GetOperatingRoomList("1").Data; roomList = roomList.Where(p => p.PATIENT_ID == _patientID && p.VISIT_ID == _visitID && p.OPER_ID == _operID).ToList(); if (roomList != null && roomList.Count > 0) { PacuRoom = roomList[0].ROOM_NO; } } _patientCard = patientInfoRepository.GetPatCard(_patientID, _visitID, _operID).Data; _anesPlan = operationInfoRepository.GetAnesPlan(_patientID, _visitID, _operID).Data; if (_anesPlan != null) { switch (_anesPlan.PLAN_WHEREABORTS) { case "60": radioStatusOperTurnTo.SelectedIndex = 0; break; case "65": radioStatusOperTurnTo.SelectedIndex = 1; break; case "66": radioStatusOperTurnTo.SelectedIndex = 2; break; case "67": radioStatusOperTurnTo.SelectedIndex = 3; break; default: radioStatusOperTurnTo.SelectedIndex = 0; break; } } if (_patientCard != null) { lblInPacuTime.Text = _patientCard.IN_PACU_DATE_TIME.Value.ToString("yyyy-MM-dd HH:mm"); } _anesInputData = operationInfoRepository.GetAnesInputData(_patientID, _visitID, _operID).Data; if (_patientCard.IN_PACU_DATE_TIME.HasValue && _patientCard.OUT_PACU_DATE_TIME.HasValue) { TimeSpan ts = (_patientCard.OUT_PACU_DATE_TIME - _patientCard.IN_PACU_DATE_TIME).Value; if (_anesInputData != null && string.IsNullOrEmpty(_anesInputData.PACU_3H) && ts.TotalHours > 3) { _anesInputData.PACU_3H = "1"; chkPACU3H.Checked = true; } } if (_anesInputData.PACU_3H == "1") { chkPACU3H.Checked = true; } if (_anesInputData.PACU_TEMPERATURE.HasValue && _anesInputData.PACU_TEMPERATURE == 1) { checkPACU_LowTemp.Checked = true; } if (_anesInputData.NO_PLAN_IN_ICU.HasValue && _anesInputData.NO_PLAN_IN_ICU == 1) { checkNoPlanToIcu.Checked = true; } if (_anesInputData.AFTER_ANES_COMA.HasValue && _anesInputData.AFTER_ANES_COMA == 1) { chkAFTER_ANES_COMA.Checked = true; } if (_anesInputData.TRACHEA_HOARSE.HasValue && _anesInputData.TRACHEA_HOARSE == 1) { chkTRACHEA_HOARSE.Checked = true; } if (_anesInputData.ANES_ANAPHYLAXIS.HasValue && _anesInputData.ANES_ANAPHYLAXIS == 1) { chkANES_ANAPHYLAXIS.Checked = true; } if (_anesInputData.SPINAL_ANES_COMP.HasValue && _anesInputData.SPINAL_ANES_COMP == 1) { chkSPINAL_ANES_COMP.Checked = true; } if (_anesInputData.OTHER_NOT_EXP.HasValue && _anesInputData.OTHER_NOT_EXP == 1) { chkOTHER_NOT_EXP.Checked = true; } }
/// <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(); } }
/// <summary> /// 构造方法 /// </summary> /// <param name="patientInfo">病人基本信息</param> public InOperation(MED_PATIENT_CARD patientInfo, decimal eventNo) : this(patientInfo, eventNo, false) { }
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; }
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); } } }
public MED_ANESTHESIA_EVENT CopyAnesthesiaEventRow(List <MED_ANESTHESIA_EVENT> anesthestaEventDataTable, MED_PATIENT_CARD patientContext, string eventNo, int index) { MED_ANESTHESIA_EVENT sourceRow = anesthestaEventDataTable[index]; return(CopyAnesthesiaEventRow(anesthestaEventDataTable, patientContext, eventNo, sourceRow)); }