Ejemplo n.º 1
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);
         }
     }
 }
Ejemplo n.º 2
0
        private void PatientStatusSingleControl_Click(object sender, EventArgs e)
        {
            //验证是否可触发
            if ((_ControlDateTime == DateTime.MinValue || _ControlDateTime == DateTime.MinValue) && ApplicationConfiguration.ApplicationPatterns == "1")
            {
                SetOperationStatusTimeText(DateTime.MinValue);
                return;
            }
            if (!_ServicePatientStatusContrl.OnPatientStatusSingleControlKeyDown(this))
            {
                SetOperationStatusTimeText(DateTime.MinValue);
                return;
            }
            object result = null;

            if (_ControlDateTime != null && _ControlDateTime != DateTime.MinValue &&
                _ControlDateTime != DateTime.MaxValue && !StatusName.Trim().Equals("出复苏室"))
            {
                TimeInPutFrmPC timeInput = new TimeInPutFrmPC();
                timeInput.Text = this.StatusName + "时间";
                if (this._ControlDateTime != null && this._ControlDateTime != DateTime.MinValue &&
                    this._ControlDateTime != DateTime.MaxValue)
                {
                    timeInput.SelectedDateTime = this._ControlDateTime;
                }
                if (timeInput.ShowDialog() != DialogResult.Cancel)
                {
                    result = timeInput.SelectedDateTime;
                }
            }
            else
            {
                if (StatusName.Trim().Equals("出复苏室"))
                {
                    ConfirmationOutPacu outPacu = new ConfirmationOutPacu("", ExtendApplicationContext.Current.PatientContextExtend.PatientID,
                                                                          ExtendApplicationContext.Current.PatientContextExtend.VisitID, ExtendApplicationContext.Current.PatientContextExtend.OperID, _ControlDateTime);
                    DialogHostFormPC dialogForm = new DialogHostFormPC("出室信息确认", outPacu.Width, outPacu.Height);
                    dialogForm.Child = outPacu;
                    dialogForm.ShowDialog();
                    if (outPacu.result == DialogResult.OK)
                    {
                        result = outPacu.statusTime;
                    }
                }
                else if (StatusName.Trim().Equals("入手术室"))
                {
                    ConfirmationSureBase sure           = new ConfirmationSureBase(ExtendApplicationContext.Current.PatientInformationExtend, Convert.ToDecimal(ExtendApplicationContext.Current.EventNo));
                    DialogHostFormPC     dialogHostForm = new DialogHostFormPC("入室信息确认", sure.Width, sure.Height);
                    dialogHostForm.Text  = "信息确认";
                    dialogHostForm.Child = sure;
                    dialogHostForm.ShowDialog();
                    if (sure.result == DialogResult.OK)
                    {
                        result = sure.SelectDateTime;
                    }
                }
                else if (StatusName.Trim().Equals("出手术室"))
                {
                    ConfirmationOutRoom timeControl    = new ConfirmationOutRoom(_ControlDateTime);
                    DialogHostFormPC    dialogHostForm = new DialogHostFormPC("出室确认", timeControl.Width, timeControl.Height);
                    dialogHostForm.Child = timeControl;
                    dialogHostForm.ShowDialog();
                    if (timeControl.result == DialogResult.OK)
                    {
                        result = timeControl.statusTime;
                    }
                }
                else if (StatusName.Trim().Equals("入复苏室"))
                {
                    ConfirmationInPacu inPacu = new ConfirmationInPacu(ExtendApplicationContext.Current.PatientContextExtend.PatientID,
                                                                       ExtendApplicationContext.Current.PatientContextExtend.VisitID, ExtendApplicationContext.Current.PatientContextExtend.OperID, false);
                    DialogHostFormPC dialogHostForm = new DialogHostFormPC("入室信息确认", inPacu.Width, inPacu.Height);
                    dialogHostForm.Child = inPacu;
                    dialogHostForm.ShowDialog();
                    if (inPacu.result == DialogResult.OK)
                    {
                        result = inPacu.SelectDateTime;
                    }
                }
                //else if (StatusName.Equals("麻醉开始") || StatusName.Equals("手术开始") || StatusName.Equals("出手术室"))
                //{
                //   ConfirmationTimeControl timeControl = new ConfirmationTimeControl(StatusName, _ControlDateTime);
                //    DialogHostFormPC dialogHostForm = new DialogHostFormPC(StatusName, timeControl.Width, timeControl.Height);
                //    dialogHostForm.Child = timeControl;
                //    dialogHostForm.ShowDialog();
                //    if (timeControl.result == DialogResult.OK)
                //    {
                //        result = timeControl.statusTime;
                //    }
                //}
                else
                {
                    TimeInPutFrmPC timeInput = new TimeInPutFrmPC();
                    timeInput.Text = this.StatusName + "时间";
                    if (this._ControlDateTime != null && this._ControlDateTime != DateTime.MinValue &&
                        this._ControlDateTime != DateTime.MaxValue)
                    {
                        timeInput.SelectedDateTime = this._ControlDateTime;
                    }
                    if (timeInput.ShowDialog() != DialogResult.Cancel)
                    {
                        result = timeInput.SelectedDateTime;
                    }
                }
            }

            if (result != null)
            {
                _ControlDateTime = Convert.ToDateTime(result);
                DateTime dt = Convert.ToDateTime(result);
                if (_ServicePatientStatusContrl.OnSinglePatientStatusConrolTimeValidate(this))
                {
                    SetOperationStatusTimeText(dt);
                }
            }
        }