Ejemplo n.º 1
0
 private void btnNext_Click(object sender, EventArgs e)
 {
     _selectLbl++;
     if (!panelEmergency.Visible)
     {
         stepSelectIndex(true);
     }
     if (btnNext.Title.Equals("确认"))
     {
         if (operationMaster != null)
         {
             if (SavePatientInfo())
             {
                 if (!panelEmergency.Visible)
                 {
                     if (InRoom(timeControl.DateTimes))
                     {
                         monitor.Save();
                     }
                 }
                 result = DialogResult.OK;
                 ParentForm.DialogResult = DialogResult.OK;
             }
         }
         else
         {
             MessageBoxFormPC.Show("录入信息不完整,请重新核查!");
         }
     }
 }
Ejemplo n.º 2
0
 /// <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  术中只读
                     }
                 }
             }
         }
     }
 }