コード例 #1
0
        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);
            }
        }
コード例 #2
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);
        }
コード例 #3
0
        private bool OutPacuRoom()
        {
            List <MED_OPERATING_ROOM> operatingRoomList = comnDictRepository.GetOperatingRoomList("1").Data;
            DateTime outPacuTime = timeControl.DateTimes;

            if (_patientCard != null)
            {
                if (_patientCard.IN_PACU_DATE_TIME.HasValue)
                {
                    if (outPacuTime < _patientCard.IN_PACU_DATE_TIME)
                    {
                        MessageBoxFormPC.Show("【出复苏室】 时间 [" + outPacuTime + "] 小于 【入复苏室】时间 [" + _patientCard.IN_PACU_DATE_TIME + "],请重新输入!",
                                              "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                        return(false);
                    }
                }
            }
            int  sataus   = Convert.ToInt32(radioStatusOperTurnTo.Text);
            bool isUpdate = new OperatingRoomRepository().SetOperatingRoomPatient(operatingRoomList, PacuRoom, ExtendApplicationContext.Current.OperRoom, "", 0, 0);

            Logger.Error("更新手术间表结果:" + isUpdate.ToString() + "|" + _patientID + "|" + _visitID + "|" + _operID);
            if (_patientCard.OUT_PACU_DATE_TIME.HasValue)
            {
                isUpdate = true;
                new OperatingRoomRepository().SetOperMaster(_patientCard.PATIENT_ID, _patientCard.VISIT_ID, _patientCard.OPER_ID, "OUT_PACU_DATE_TIME", outPacuTime, sataus);
            }
            else
            {
                //  if (isUpdate)
                {
                    new OperatingRoomRepository().SetOperMaster(_patientCard.PATIENT_ID, _patientCard.VISIT_ID, _patientCard.OPER_ID, "OUT_PACU_DATE_TIME", outPacuTime, sataus);
                    new OperatingRoomRepository().SetMonitorDictPatient("1", ExtendApplicationContext.Current.OperRoom, PacuRoom, "", 0, 0);
                }
            }
            //  if (isUpdate)
            {
                _patientCard.OPER_STATUS_CODE   = sataus;
                _patientCard.OUT_PACU_DATE_TIME = outPacuTime;
                ExtendApplicationContext.Current.PatientInformationExtend = _patientCard;
            }

            if (chkPACU3H.Checked)
            {
                _anesInputData.PACU_3H = "1";
            }
            else
            {
                _anesInputData.PACU_3H = "0";
            }

            if (checkPACU_LowTemp.Checked)
            {
                _anesInputData.PACU_TEMPERATURE = 1;
            }
            else
            {
                _anesInputData.PACU_TEMPERATURE = 0;
            }

            if (checkNoPlanToIcu.Checked)
            {
                _anesInputData.NO_PLAN_IN_ICU = 1;
            }
            else
            {
                _anesInputData.NO_PLAN_IN_ICU = 0;
            }


            if (chkAFTER_ANES_COMA.Checked)
            {
                _anesInputData.AFTER_ANES_COMA = 1;
            }
            else
            {
                _anesInputData.AFTER_ANES_COMA = 0;
            }

            if (chkTRACHEA_HOARSE.Checked)
            {
                _anesInputData.TRACHEA_HOARSE = 1;
            }
            else
            {
                _anesInputData.TRACHEA_HOARSE = 0;
            }

            if (chkANES_ANAPHYLAXIS.Checked)
            {
                _anesInputData.ANES_ANAPHYLAXIS = 1;
            }
            else
            {
                _anesInputData.ANES_ANAPHYLAXIS = 0;
            }

            if (chkSPINAL_ANES_COMP.Checked)
            {
                _anesInputData.SPINAL_ANES_COMP = 1;
            }
            else
            {
                _anesInputData.SPINAL_ANES_COMP = 0;
            }

            if (chkOTHER_NOT_EXP.Checked)
            {
                _anesInputData.OTHER_NOT_EXP = 1;
            }
            else
            {
                _anesInputData.OTHER_NOT_EXP = 0;
            }

            operationInfoRepository.SaveAnesInputData(_anesInputData);

            return(isUpdate);
        }
コード例 #4
0
 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);
         }
     }
 }