public virtual int UpdateSingleOperRoom(MED_OPERATING_ROOM sigleOperRoom) { int flag = dapper.Set <MED_OPERATING_ROOM>().Update(sigleOperRoom); dapper.SaveChanges(); return(flag); }
/// <summary> /// 刷新手术间组件 /// </summary> public void RefreshControl(string roomNo, string bedType) { List <MED_OPERATING_ROOM> operRoom = comnDictRepository.GetOperatingRoomList(bedType).Data; if (operRoom != null && operRoom.Count > 0) { operRoom = operRoom.Where(x => x.DEPT_CODE == ExtendApplicationContext.Current.OperRoom).ToList(); } MED_OPERATING_ROOM room = operRoom.Where(x => x.ROOM_NO == roomNo).FirstOrDefault(); if (room != null) { BedLabel = room.BED_LABEL; OperRoomNo = room.ROOM_NO; OperRoomKey = room.ROOM_NO; BedType = bedType; if (!string.IsNullOrEmpty(room.PATIENT_ID)) { PatientID = room.PATIENT_ID; VisitID = room.VISIT_ID.Value; OperID = room.OPER_ID.Value; } else { PatientID = ""; VisitID = 0; OperID = 0; InpNo = ""; PatName = ""; } RefreshValue(); } }
public int SaveOperatingRoom(MED_OPERATING_ROOM item) { int result = dapper.Set <MED_OPERATING_ROOM>().Save(item) == true ? 1 : 0; dapper.SaveChanges(); return(result); }
private void ChangePacuRoom_Load(object sender, EventArgs e) { List <MED_OPERATING_ROOM> operatingRoomList = comnDictRepository.GetOperatingRoomList("1").Data; MED_OPERATING_ROOM operatingRoom = operatingRoomList.Find(x => x.PATIENT_ID == _patientID && x.VISIT_ID == _visitID && x.OPER_ID == _operID); if (operatingRoom != null) { lblCurrentRoom.Text = operatingRoom.ROOM_NO; oldRoomNo = operatingRoom.ROOM_NO; } }
/// <summary> /// 在设置新的手术间前需要判断该手术间是否可以做手术 /// </summary> protected bool CheckNewRoomNo(string strNewRoomNo) { bool result = true; MED_OPERATING_ROOM tarRoomNo = this.MedOperatingRoomDict.Where(x => x.ROOM_NO.Equals(strNewRoomNo) && (null == x.PATIENT_ID || string.IsNullOrEmpty(x.PATIENT_ID))).FirstOrDefault(); if (null == tarRoomNo) { result = false; } return(result); }
private void btnSave_BtnClicked(object sender, EventArgs e) { if (string.IsNullOrEmpty(txtPacuNo.Text)) { MessageBoxFormPC.Show("复苏床位为必填项目!", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } newRoomNo = txtPacuNo.Text; List <MED_OPERATING_ROOM> operatingRoomList = comnDictRepository.GetOperatingRoomList("1").Data; MED_OPERATING_ROOM newOperatingRoom = operatingRoomList.Find(x => x.ROOM_NO == newRoomNo); //MED_OPERATING_ROOM newOperatingRoom = comnDictRepository.GetOperatingRoomByRoomNo("1", newRoomNo).Data; bool isUpdate = true; if (newOperatingRoom != null) { newOperatingRoom.PATIENT_ID = _patientID; newOperatingRoom.VISIT_ID = _visitID; newOperatingRoom.OPER_ID = _operID; isUpdate = new OperatingRoomRepository().SetOperatingRoomPatient(operatingRoomList, newRoomNo, ExtendApplicationContext.Current.OperRoom, _patientID, _visitID, _operID); } if (isUpdate) { List <MED_OPERATING_ROOM> RoomList = comnDictRepository.GetOperatingRoomList("1").Data; MED_OPERATING_ROOM operatingRoom = RoomList.Find(x => x.PATIENT_ID == _patientID && x.VISIT_ID == _visitID && x.OPER_ID == _operID && x.ROOM_NO == oldRoomNo); if (operatingRoom != null) { operatingRoom.PATIENT_ID = null; operatingRoom.VISIT_ID = null; operatingRoom.OPER_ID = null; comnDictRepository.SaveOperatingRoom(operatingRoom); } SetMonitorDictPatient("1", ExtendApplicationContext.Current.OperRoom, oldRoomNo, newRoomNo, _patientID, _visitID, _operID); result = DialogResult.OK; ParentForm.DialogResult = DialogResult.OK; } else { MessageBoxFormPC.Show("床位被占用,请重新选择", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
/// <summary> /// 在设置新的手术间前需要判断该手术间是否可以做手术 /// </summary> protected bool CheckNewRoomNo(string strNewRoomNo) { bool result = true; MED_OPERATING_ROOM tarRoomNo = this.MedOperatingRoomDict.Where(x => x.ROOM_NO.Equals(strNewRoomNo) && (null == x.PATIENT_ID || string.IsNullOrEmpty(x.PATIENT_ID))).FirstOrDefault(); if (null == tarRoomNo) { this.ShowMessageBox("该手术间有患者正在手术,请选择其他手术间!", MessageBoxButton.OK, MessageBoxImage.Asterisk); result = false; } return(result); }
private void GetPacuInfo() { OperationRoomContent operationRoomContent = null; for (int i = 0; i < OperationRoomContentList.Count; i++) { operationRoomContent = OperationRoomContentList[i]; operationRoomContent.VisitID = 0; operationRoomContent.OperID = 0; operationRoomContent.PatientID = ""; operationRoomContent.InPacuTime = ""; MED_OPERATING_ROOM pacuRoom = pacuRoomList.Where(x => x.ROOM_NO.Equals(operationRoomContent.OperRoomKey)).ToList()[0]; if (pacuRoom != null) { if (!string.IsNullOrEmpty(pacuRoom.PATIENT_ID)) { operationRoomContent.PatientID = pacuRoom.PATIENT_ID; operationRoomContent.VisitID = pacuRoom.VISIT_ID.Value; operationRoomContent.OperID = pacuRoom.OPER_ID.Value; MED_PAT_MASTER_INDEX patMaster = operationInfoRepository.GetPatMasterIndex(operationRoomContent.PatientID).Data; MED_OPERATION_MASTER operationMaster = operationInfoRepository.GetOperMaster(operationRoomContent.PatientID, operationRoomContent.VisitID, operationRoomContent.OperID).Data;//ExtendApplicationContext.Current.MED_OPERATION_MASTER; if (operationMaster != null && !string.IsNullOrEmpty(operationMaster.OPER_STATUS_CODE.ToString())) { if (operationMaster.OPER_STATUS_CODE != 45) { operationRoomContent.PatientID = ""; operationRoomContent.VisitID = 0; operationRoomContent.OperID = 0; } else { if (operationMaster.IN_PACU_DATE_TIME.HasValue) { TimeSpan timeDiff = accountRepository.GetServerTime().Data - operationMaster.IN_PACU_DATE_TIME.Value; operationRoomContent.inTime = (int)timeDiff.TotalMinutes; } } } } } operationRoomContent.RefreshValue(); operationRoomContent.CancelFocus(); } }
private void RefreshRoomInfo(int pageTage) { pacuRoomList = comnDictRepository.GetOperatingRoomList("1").Data; if (pacuRoomList != null && pacuRoomList.Count > 0) { pacuRoomList = pacuRoomList.Where(x => x.DEPT_CODE == ExtendApplicationContext.Current.OperRoom).ToList(); } foreach (OperationRoomContent roomContent in OperationRoomContentList) { MED_OPERATING_ROOM row = pacuRoomList[pageTage]; roomContent.BedLabel = row.BED_LABEL; roomContent.OperRoomNo = row.ROOM_NO; roomContent.RoomNo = row.ROOM_NO; roomContent.OperRoomKey = row.ROOM_NO; roomContent.BedType = _bedType; pageTage = pageTage + 1; } GetPacuInfo(); }
private List <KeyValue> GetFieldNames(string tableName) { List <KeyValue> list = new List <KeyValue>(); DataTable dataTable = new DataTable(); if (tableName.ToUpper().Trim().Equals("MED_OPERATION_MASTER")) { MED_OPERATION_MASTER master = new MED_OPERATION_MASTER(); foreach (string column in master.GetPropsName()) { list.Add(new KeyValue(GetFieldAlias(column), column)); } } else if (tableName.ToUpper().Trim().Equals("MED_OPERATION_MASTER_EXT")) { MED_OPERATION_MASTER_EXT ext = new MED_OPERATION_MASTER_EXT(); foreach (string column in ext.GetPropsName()) { list.Add(new KeyValue(GetFieldAlias(column), column)); } } else if (tableName.ToUpper().Trim().Equals("MED_PAT_MASTER_INDEX")) { MED_PAT_MASTER_INDEX tmp = new MED_PAT_MASTER_INDEX(); foreach (string column in tmp.GetPropsName()) { list.Add(new KeyValue(GetFieldAlias(column), column)); } } else if (tableName.ToUpper().Trim().Equals("MED_PATS_IN_HOSPITAL")) { MED_PATS_IN_HOSPITAL pats = new MED_PATS_IN_HOSPITAL(); foreach (string column in pats.GetPropsName()) { list.Add(new KeyValue(GetFieldAlias(column), column)); } } else if (tableName.ToUpper().Trim().Equals("MED_ANESTHESIA_RECOVER")) { MED_ANESTHESIA_RECOVER tmp = new MED_ANESTHESIA_RECOVER(); foreach (string column in tmp.GetPropsName()) { list.Add(new KeyValue(GetFieldAlias(column), column)); } } else if (tableName.ToUpper().Trim().Equals("MED_ANESTHESIA_INQUIRY")) { MED_ANESTHESIA_INQUIRY tmp = new MED_ANESTHESIA_INQUIRY(); foreach (string column in tmp.GetPropsName()) { list.Add(new KeyValue(GetFieldAlias(column), column)); } } else if (tableName.ToUpper().Trim().Equals("MED_SAFETY_CHECKS")) { MED_SAFETY_CHECKS safety = new MED_SAFETY_CHECKS(); foreach (string column in safety.GetPropsName()) { list.Add(new KeyValue(GetFieldAlias(column), column)); } } else if (tableName.ToUpper().Trim().Equals("MED_PAT_VISIT")) { MED_PAT_VISIT visit = new MED_PAT_VISIT(); foreach (string column in visit.GetPropsName()) { list.Add(new KeyValue(GetFieldAlias(column), column)); } } else if (tableName.ToUpper().Trim().Equals("MED_ANESTHESIA_PLAN")) { MED_ANESTHESIA_PLAN plan = new MED_ANESTHESIA_PLAN(); foreach (string column in plan.GetPropsName()) { list.Add(new KeyValue(GetFieldAlias(column), column)); } } else if (tableName.ToUpper().Trim().Equals("MED_ANESTHESIA_PLAN_EXAM")) { MED_ANESTHESIA_PLAN_EXAM plan = new MED_ANESTHESIA_PLAN_EXAM(); foreach (string column in plan.GetPropsName()) { list.Add(new KeyValue(GetFieldAlias(column), column)); } } else if (tableName.ToUpper().Trim().Equals("MED_ANESTHESIA_PLAN_PMH")) { MED_ANESTHESIA_PLAN_PMH plan = new MED_ANESTHESIA_PLAN_PMH(); foreach (string column in plan.GetPropsName()) { list.Add(new KeyValue(GetFieldAlias(column), column)); } } else if (tableName.ToUpper().Trim().Equals("MED_HIS_USERS")) { MED_HIS_USERS users = new MED_HIS_USERS(); foreach (string column in users.GetPropsName()) { list.Add(new KeyValue(GetFieldAlias(column), column)); } } else if (tableName.ToUpper().Trim().Equals("MED_DEPT_DICT")) { MED_DEPT_DICT dept = new MED_DEPT_DICT(); foreach (string column in dept.GetPropsName()) { list.Add(new KeyValue(GetFieldAlias(column), column)); } } else if (tableName.ToUpper().Trim().Equals("MED_DIAGNOSIS_DICT")) { MED_DIAGNOSIS_DICT dept = new MED_DIAGNOSIS_DICT(); foreach (string column in dept.GetPropsName()) { list.Add(new KeyValue(GetFieldAlias(column), column)); } } else if (tableName.ToUpper().Trim().Equals("MED_OPERATION_DICT")) { MED_OPERATION_DICT dept = new MED_OPERATION_DICT(); foreach (string column in dept.GetPropsName()) { list.Add(new KeyValue(GetFieldAlias(column), column)); } } else if (tableName.ToUpper().Trim().Equals("MED_ANESTHESIA_DICT")) { MED_ANESTHESIA_DICT dept = new MED_ANESTHESIA_DICT(); foreach (string column in dept.GetPropsName()) { list.Add(new KeyValue(GetFieldAlias(column), column)); } } else if (tableName.ToUpper().Trim().Equals("MED_OPERATING_ROOM")) { MED_OPERATING_ROOM dept = new MED_OPERATING_ROOM(); foreach (string column in dept.GetPropsName()) { list.Add(new KeyValue(GetFieldAlias(column), column)); } } else if (tableName.ToUpper().Trim().Equals("MED_PREOPERATIVE_EXPANSION")) { MED_PREOPERATIVE_EXPANSION row = new MED_PREOPERATIVE_EXPANSION(); foreach (string column in row.GetPropsName()) { list.Add(new KeyValue(GetFieldAlias(column), column)); } } else if (tableName.ToUpper().Trim().Equals("MED_OPERATION_EXTENDED")) { MED_OPERATION_EXTENDED row = new MED_OPERATION_EXTENDED(); foreach (string column in row.GetPropsName()) { list.Add(new KeyValue(GetFieldAlias(column), column)); } } else if (tableName.ToUpper().Trim().Equals("MED_POSTOPERATIVE_EXTENDED")) { MED_POSTOPERATIVE_EXTENDED row = new MED_POSTOPERATIVE_EXTENDED(); foreach (string column in row.GetPropsName()) { list.Add(new KeyValue(GetFieldAlias(column), column)); } } else if (tableName.ToUpper().Trim().Equals("MED_PACU_SORCE")) { MED_PACU_SORCE row = new MED_PACU_SORCE(); foreach (string column in row.GetPropsName()) { list.Add(new KeyValue(GetFieldAlias(column), column)); } } else if (tableName.ToUpper().Trim().Equals("MED_OPERATION_ANALGESIC_MASTER")) { MED_OPERATION_ANALGESIC_MASTER row = new MED_OPERATION_ANALGESIC_MASTER(); foreach (string column in row.GetPropsName()) { list.Add(new KeyValue(GetFieldAlias(column), column)); } } else if (tableName.ToUpper().Trim().Equals("MED_OPER_ANALGESIC_MEDICINE")) { MED_OPER_ANALGESIC_MEDICINE row = new MED_OPER_ANALGESIC_MEDICINE(); foreach (string column in row.GetPropsName()) { list.Add(new KeyValue(GetFieldAlias(column), column)); } } else if (tableName.ToUpper().Trim().Equals("MED_OPER_ANALGESIC_TOTAL")) { MED_OPER_ANALGESIC_TOTAL row = new MED_OPER_ANALGESIC_TOTAL(); foreach (string column in row.GetPropsName()) { list.Add(new KeyValue(GetFieldAlias(column), column)); } } else if (tableName.ToUpper().Trim().Equals("MED_OPER_RISK_ESTIMATE")) { MED_OPER_RISK_ESTIMATE row = new MED_OPER_RISK_ESTIMATE(); foreach (string column in row.GetPropsName()) { list.Add(new KeyValue(GetFieldAlias(column), column)); } } else if (tableName.ToUpper().Trim().Equals("MED_ANESTHESIA_INPUT_DICT")) { MED_ANESTHESIA_INPUT_DICT row = new MED_ANESTHESIA_INPUT_DICT(); foreach (string column in row.GetPropsName()) { list.Add(new KeyValue(GetFieldAlias(column), column)); } } else if (tableName.ToUpper().Trim().Equals("MED_ANESTHESIA_INPUT_DATA")) { MED_ANESTHESIA_INPUT_DATA row = new MED_ANESTHESIA_INPUT_DATA(); foreach (string column in row.GetPropsName()) { list.Add(new KeyValue(GetFieldAlias(column), column)); } } if (!string.IsNullOrEmpty(_tableName)) { foreach (DataRow row in dataTable.Rows) { list.Add(new KeyValue(row[_codeField].ToString(), row[_nameField].ToString())); } } else { foreach (DataColumn column in dataTable.Columns) { list.Add(new KeyValue(GetFieldAlias(column.ColumnName), column.ColumnName)); } } return(list); }
public RequestResult <int> EditOperatingRoomList(int type, MED_OPERATING_ROOM OperatingRoomList) { return(Success(sysConfig.EditOperatingRoomList(type, OperatingRoomList))); }
public void InitOperationRoomContentList() { int count = pacuRoomList.Count;// pacuRoomList.Count > 12 ? 12 : for (int i = 0; i < count; i++) { MED_OPERATING_ROOM row = pacuRoomList[i]; OperationRoomContent operRoomContent = new OperationRoomContent(); operRoomContent.BedLabel = row.BED_LABEL; operRoomContent.OperRoomNo = row.ROOM_NO; operRoomContent.RoomNo = row.ROOM_NO; operRoomContent.OperRoomKey = row.ROOM_NO; operRoomContent.BedType = _bedType; OperationRoomContentList.Add(operRoomContent); operRoomContent.OperRoomSelected += new EventHandler(operRoomContent_OperRoomSelected); operRoomContent.Click += new EventHandler(operRoomContent_Click); operRoomContent.DoDoubleClick += new EventHandler(operRoomContent_DoubleClick); operRoomContent.PACUDocClick += new EventHandler(operRoomContent_PACUDocClick); operRoomContent.OutPACUDocClick += operRoomContent_OutPACUDocClick; } int contentWidth = 0; int contentHeight = 0; if (OperationRoomContentList.Count > 0) { contentWidth = OperationRoomContentList[0].Width; contentHeight = OperationRoomContentList[0].Height; } int useWidth = this.Width < OrginWidth ? OrginWidth : this.Width; while (colCount * contentWidth >= useWidth) { colCount--; } if (colCount <= 0) { return; } if (OperationRoomContentList.Count % colCount > 0) { rowCount = OperationRoomContentList.Count / colCount + 1; } else { rowCount = OperationRoomContentList.Count / colCount; } int offX = 1; int offY = 5; OperationRoomContent operationRoomContent = null; int index = 0; //排序 for (int i = 0; i < rowCount; i++) { offY = i == 0 ? 5 : 10; for (int j = 0; j < colCount; j++) { offX = j == 0 ? 1 : 5; index = (i * colCount) + j; if (index >= OperationRoomContentList.Count) { break; } operationRoomContent = OperationRoomContentList[index]; operationRoomContent.Left = offX * (j + 1) + contentWidth * j; operationRoomContent.Top = offY * (i + 1) + contentHeight * i; operationRoomContent.Visible = true; } } pRoomPandect.Controls.AddRange(OperationRoomContentList.ToArray()); }
public RequestResult <int> SaveOperatingRoom(MED_OPERATING_ROOM item) { return(Success(_pacuCommonService.SaveOperatingRoom(item))); }
/// <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 RequestResult <int> UpdateSingleOperRoom(MED_OPERATING_ROOM operRoomDict) { return(Success(dictService.UpdateSingleOperRoom(operRoomDict))); }
public RequestResult <int> SaveOperatingRoom(MED_OPERATING_ROOM item) { string address = "PacuCommDict/SaveOperatingRoom"; return(BaseRepository.PostCallApi <MED_OPERATING_ROOM>(address, item)); }