Exemple #1
0
 /// <summary>
 /// 构造方法
 /// </summary>
 public OperationJumpViewModel(MED_PAT_INFO patModel, RichTextBox rtb)
 {
     if (patModel != null)
     {
         this.CurPatientModel      = PatientModel.CreateModel(patModel);
         OperStatus                = OperationStatusHelper.OperationStatusToString(OperationStatus.IsReady);
         this.MedOperatingRoomDict = DictService.ClientInstance.GetOperatingRoomList().Where(x => x.DEPT_CODE.Equals(ExtendAppContext.Current.OperDeptCode) &&
                                                                                             x.BED_TYPE.Equals(ExtendAppContext.Current.EventNo)).ToList();
         this.CbOperatingRoomSourceList = this.MedOperatingRoomDict.Where(x => x.BED_TYPE == ExtendAppContext.Current.EventNo && (x.PATIENT_ID == null || string.IsNullOrEmpty(x.PATIENT_ID))).ToList();
         this.rtbResaon  = rtb;
         this.OperRoomNo = CurPatientModel.OperRoomNo;
         this.LoadOperStatusList();
         // 注册按钮命令
         this.RegisterCommand();
         // 设置界面显示的警告消息
         this.ResetWarningMessage();
     }
 }
Exemple #2
0
        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);
            }
        }
Exemple #3
0
        public string SetOperationStatusText()
        {
            string          statusName = "";
            OperationStatus status     = ExtendApplicationContext.Current.OperationStatus;

            if (ApplicationConfiguration.IsPACUProgram)
            {
                if (status > OperationStatus.OutPACU)
                {
                    statusName = OperationStatusHelper.OperationStatusToString(status);
                }
            }
            else
            {
                if (status > OperationStatus.OutOperationRoom)
                {
                    statusName = OperationStatusHelper.OperationStatusToString(status);
                }
            }
            return(statusName);
        }
Exemple #4
0
        private bool InPacuRoom()
        {
            PacuRoom = txtPacuNo.Text;
            DateTime inPacuTime = Convert.ToDateTime(txtInPacuTime.EditValue);

            if (!string.IsNullOrEmpty(PacuRoom) && inPacuTime != DateTime.MaxValue && inPacuTime != DateTime.MinValue)
            {
                List <MED_OPERATING_ROOM> operatingRoomList = new ComnDictRepository().GetOperatingRoomList("1").Data;
                MED_OPERATION_MASTER      operMaster        = operationInfoRepository.GetOperMaster(ExtendApplicationContext.Current.PatientContextExtend.PatientID, ExtendApplicationContext.Current.PatientContextExtend.VisitID, ExtendApplicationContext.Current.PatientContextExtend.OperID).Data;
                if (operMaster.IN_PACU_DATE_TIME.HasValue)
                {
                    MessageBoxFormPC.Show("该患者已经入室,请刷新数据!",
                                          "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    return(false);
                }
                else if (operMaster.OPER_STATUS_CODE < (int)OperationStatus.TurnToPACU)
                {
                    MessageBoxFormPC.Show("该患者已被跳转到【" + OperationStatusHelper.OperationStatusToString((OperationStatus)operMaster.OPER_STATUS_CODE) + "】状态,请刷新数据!",
                                          "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    return(false);
                }
                if (operMaster != null)
                {
                    if (operMaster.OUT_DATE_TIME.HasValue)
                    {
                        if (inPacuTime < operMaster.OUT_DATE_TIME)
                        {
                            MessageBoxFormPC.Show("【入复苏室】 时间 [" + inPacuTime + "] 小于 【出手术室】时间 [" + operMaster.OUT_DATE_TIME + "],请重新输入!",
                                                  "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                            return(false);
                        }
                    }
                }
                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(PacuRoom))
                {
                    return(false);
                }
                bool isUpdate = new OperatingRoomRepository().SetOperatingRoomPatient(operatingRoomList, PacuRoom, ExtendApplicationContext.Current.OperRoom, _patientID, _visitID, _operID);
                if (isUpdate)
                {
                    new OperatingRoomRepository().SetOperMaster(_patientID, _visitID, _operID, "IN_PACU_DATE_TIME", inPacuTime, 45);
                    new OperatingRoomRepository().SetMonitorDictPatient("1", ExtendApplicationContext.Current.OperRoom, PacuRoom, _patientID, _visitID, _operID);
                    _patientCard.OPER_STATUS_CODE  = 45;
                    _patientCard.IN_PACU_DATE_TIME = inPacuTime;
                    ExtendApplicationContext.Current.PatientInformationExtend = _patientCard;
                }
                else
                {
                    MessageBoxFormPC.Show("床位被占用,请重新选择",
                                          "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
                return(isUpdate);
            }
            else
            {
                return(false);
            }

            return(true);
        }
Exemple #5
0
 /// <summary>
 /// 设置界面跳转目标状态
 /// </summary>
 private void LoadOperStatusList()
 {
     if (CurPatientModel.OperStatusCode == OperationStatus.InOperationRoom)//入手术室
     {
         _cbOperStatusSourceList.Add(new MED_ANESTHESIA_INPUT_DICT()
         {
             ITEM_CLASS = "手术状态", ITEM_NAME = "入室前", ITEM_CODE = OperationStatusHelper.OperationStatusToString(OperationStatus.IsReady)
         });
     }
     else if (CurPatientModel.OperStatusCode == OperationStatus.AnesthesiaStart)//麻醉开始
     {
         _cbOperStatusSourceList.Add(new MED_ANESTHESIA_INPUT_DICT()
         {
             ITEM_CLASS = "手术状态", ITEM_NAME = "入室前", ITEM_CODE = OperationStatusHelper.OperationStatusToString(OperationStatus.IsReady)
         });
         _cbOperStatusSourceList.Add(new MED_ANESTHESIA_INPUT_DICT()
         {
             ITEM_CLASS = "手术状态", ITEM_NAME = "入手术室", ITEM_CODE = OperationStatusHelper.OperationStatusToString(OperationStatus.InOperationRoom)
         });
         _cbOperStatusSourceList.Add(new MED_ANESTHESIA_INPUT_DICT()
         {
             ITEM_CLASS = "手术状态", ITEM_NAME = "麻醉结束", ITEM_CODE = OperationStatusHelper.OperationStatusToString(OperationStatus.AnesthesiaEnd)
         });
     }
     else if (CurPatientModel.OperStatusCode == OperationStatus.OperationStart)//手术开始
     {
         _cbOperStatusSourceList.Add(new MED_ANESTHESIA_INPUT_DICT()
         {
             ITEM_CLASS = "手术状态", ITEM_NAME = "入室前", ITEM_CODE = OperationStatusHelper.OperationStatusToString(OperationStatus.IsReady).ToString()
         });
         _cbOperStatusSourceList.Add(new MED_ANESTHESIA_INPUT_DICT()
         {
             ITEM_CLASS = "手术状态", ITEM_NAME = "入手术室", ITEM_CODE = OperationStatusHelper.OperationStatusToString(OperationStatus.InOperationRoom)
         });
         _cbOperStatusSourceList.Add(new MED_ANESTHESIA_INPUT_DICT()
         {
             ITEM_CLASS = "手术状态", ITEM_NAME = "麻醉开始", ITEM_CODE = OperationStatusHelper.OperationStatusToString(OperationStatus.AnesthesiaStart)
         });
     }
     else if (CurPatientModel.OperStatusCode == OperationStatus.OperationEnd)//手术结束
     {
         _cbOperStatusSourceList.Add(new MED_ANESTHESIA_INPUT_DICT()
         {
             ITEM_CLASS = "手术状态", ITEM_NAME = "入室前", ITEM_CODE = OperationStatusHelper.OperationStatusToString(OperationStatus.IsReady).ToString()
         });
         _cbOperStatusSourceList.Add(new MED_ANESTHESIA_INPUT_DICT()
         {
             ITEM_CLASS = "手术状态", ITEM_NAME = "入手术室", ITEM_CODE = OperationStatusHelper.OperationStatusToString(OperationStatus.InOperationRoom)
         });
         _cbOperStatusSourceList.Add(new MED_ANESTHESIA_INPUT_DICT()
         {
             ITEM_CLASS = "手术状态", ITEM_NAME = "麻醉开始", ITEM_CODE = OperationStatusHelper.OperationStatusToString(OperationStatus.AnesthesiaStart)
         });
         _cbOperStatusSourceList.Add(new MED_ANESTHESIA_INPUT_DICT()
         {
             ITEM_CLASS = "手术状态", ITEM_NAME = "手术开始", ITEM_CODE = OperationStatusHelper.OperationStatusToString(OperationStatus.OperationStart)
         });
     }
     else if (CurPatientModel.OperStatusCode == OperationStatus.AnesthesiaEnd)//麻醉结束
     {
         _cbOperStatusSourceList.Add(new MED_ANESTHESIA_INPUT_DICT()
         {
             ITEM_CLASS = "手术状态", ITEM_NAME = "入室前", ITEM_CODE = OperationStatusHelper.OperationStatusToString(OperationStatus.IsReady)
         });
         _cbOperStatusSourceList.Add(new MED_ANESTHESIA_INPUT_DICT()
         {
             ITEM_CLASS = "手术状态", ITEM_NAME = "入手术室", ITEM_CODE = OperationStatusHelper.OperationStatusToString(OperationStatus.InOperationRoom)
         });
         _cbOperStatusSourceList.Add(new MED_ANESTHESIA_INPUT_DICT()
         {
             ITEM_CLASS = "手术状态", ITEM_NAME = "麻醉开始", ITEM_CODE = OperationStatusHelper.OperationStatusToString(OperationStatus.AnesthesiaStart)
         });
         _cbOperStatusSourceList.Add(new MED_ANESTHESIA_INPUT_DICT()
         {
             ITEM_CLASS = "手术状态", ITEM_NAME = "手术开始", ITEM_CODE = OperationStatusHelper.OperationStatusToString(OperationStatus.OperationStart)
         });
         _cbOperStatusSourceList.Add(new MED_ANESTHESIA_INPUT_DICT()
         {
             ITEM_CLASS = "手术状态", ITEM_NAME = "手术结束", ITEM_CODE = OperationStatusHelper.OperationStatusToString(OperationStatus.OperationEnd)
         });
     }
     else //其他
     {
         _cbOperStatusSourceList.Add(new MED_ANESTHESIA_INPUT_DICT()
         {
             ITEM_CLASS = "手术状态", ITEM_NAME = "入室前", ITEM_CODE = OperationStatusHelper.OperationStatusToString(OperationStatus.IsReady)
         });
         _cbOperStatusSourceList.Add(new MED_ANESTHESIA_INPUT_DICT()
         {
             ITEM_CLASS = "手术状态", ITEM_NAME = "入手术室", ITEM_CODE = OperationStatusHelper.OperationStatusToString(OperationStatus.InOperationRoom)
         });
         _cbOperStatusSourceList.Add(new MED_ANESTHESIA_INPUT_DICT()
         {
             ITEM_CLASS = "手术状态", ITEM_NAME = "麻醉开始", ITEM_CODE = OperationStatusHelper.OperationStatusToString(OperationStatus.AnesthesiaStart)
         });
         _cbOperStatusSourceList.Add(new MED_ANESTHESIA_INPUT_DICT()
         {
             ITEM_CLASS = "手术状态", ITEM_NAME = "手术开始", ITEM_CODE = OperationStatusHelper.OperationStatusToString(OperationStatus.OperationStart)
         });
         _cbOperStatusSourceList.Add(new MED_ANESTHESIA_INPUT_DICT()
         {
             ITEM_CLASS = "手术状态", ITEM_NAME = "手术结束", ITEM_CODE = OperationStatusHelper.OperationStatusToString(OperationStatus.OperationEnd)
         });
         _cbOperStatusSourceList.Add(new MED_ANESTHESIA_INPUT_DICT()
         {
             ITEM_CLASS = "手术状态", ITEM_NAME = "麻醉结束", ITEM_CODE = OperationStatusHelper.OperationStatusToString(OperationStatus.AnesthesiaEnd)
         });
     }
 }