Пример #1
0
 private void cls_successCountDown(object sender, successTypeArgs e)
 {
     DisableBtnAll();
     QueueClass.TransactionQueueCls.PatientReadyQueue ready = new QueueClass.TransactionQueueCls().ReadyQueue((int)this.tps_id, (int)this.mrd_id, this.user.mut_username);
     if (ready.Status == QueueClass.TransactionQueueCls.PatientReadyQueue.StatusReadyQueue.Error)
     {
         lbAlertMsg.Text = "กรุณากดปุ่ม Ready อีกครั้ง";
         StatusNSWR();
     }
     else
     {
         StatusTransaction showUnit = new ClsTCPClient().sendCallUnitDisplay();
         if (showUnit == StatusTransaction.Error)
         {
             //lbAlertMsg.Text = "เกิดความผิดพลาดทางเทคนิค ไม่สามารถแสดงผลบน unit display ได้";
         }
         AlertOutDepartment.LoadTime();
         ReserveSkipCls reserveSkip = new ReserveSkipCls();
         int?           skipRoom    = reserveSkip.CheckRoomSkip(this.tpr_id);
         StatusWK();
         string alert = reserveSkip.MessegeAlertSkip(skipRoom);
         lbAlertMsg.Text = alert;
     }
 }
Пример #2
0
        private void cls_successCountDown(object sender, successTypeArgs e)
        {
            DisableBtnAll();

            StatusTransaction ready = CallQueue.P_CallQueueReady();

            if (ready == StatusTransaction.True)
            {
                StatusTransaction showUnit = new ClsTCPClient().sendCallUnitDisplay();
                if (showUnit == StatusTransaction.Error)
                {
                    //lbAlertMsg.Text = "เกิดความผิดพลาดทางเทคนิค ไม่สามารถแสดงผลบน unit display ได้";
                }
                Class.FunctionDataCls func = new Class.FunctionDataCls();
                resultUltrasound = func.popupUltrasoundLower();
                if (resultUltrasound == PopupUltrasoundLower.ResultPopupUltrasoundLower.BeforeStation)
                {
                    EmrClass.GetDataMasterCls mst = new EmrClass.GetDataMasterCls();
                    List <int> mvt = mst.GetMstRoomEventByMrm(Program.CurrentRoom.mrm_id).Select(x => x.mvt_id).ToList();

                    Class.FunctionDataCls.sendQueueStatus result = func.sendQueueUltrasoundLower(resultUltrasound, mvt);
                    if (result == Class.FunctionDataCls.sendQueueStatus.error)
                    {
                        lbAlertMsg.Text = "เกิดความผิดพลาดทางเทคนิค ไม่สามารถส่งไป ultrasound ได้ กรุณาติดต่อผู้ดูแลระบบ";
                        AlertOutDepartment.LoadTime();
                        StatusWK();
                    }
                    else if (result == Class.FunctionDataCls.sendQueueStatus.sendSuccess)
                    {
                        new Class.logPatientFlowCls(Class.logPatientFlowCls.sendType.SendUltraSoundBefore,
                                                    (int)tpr_id,
                                                    (int)tps_id,
                                                    Program.CurrentSite.mhs_id,
                                                    Program.CurrentRoom.mrd_ename,
                                                    Program.CurrentUser.mut_username);

                        new ClsTCPClient().sendClearUnitDisplay();
                        StatusEmptyRoom();
                        lbAlertMsg.Text = func.GetStrSaveAndSend((int)tpr_id, "US", "UL");
                        this.tpr_id     = null;
                    }
                }
                else if (resultUltrasound == PopupUltrasoundLower.ResultPopupUltrasoundLower.AfterStation)
                {
                    AlertOutDepartment.LoadTime();

                    ReserveSkipCls reserveSkip = new ReserveSkipCls();
                    int?           skipRoom    = reserveSkip.CheckRoomSkip(tpr_id);
                    string         alert       = reserveSkip.MessegeAlertSkip(skipRoom);
                    StatusSendUltrasoundAfter();
                    lbAlertMsg.Text = alert;
                }
                else if (resultUltrasound == PopupUltrasoundLower.ResultPopupUltrasoundLower.AskMeLater)
                {
                    AlertOutDepartment.LoadTime();

                    ReserveSkipCls reserveSkip = new ReserveSkipCls();
                    int?           skipRoom    = reserveSkip.CheckRoomSkip(tpr_id);
                    StatusWK();
                    string alert = reserveSkip.MessegeAlertSkip(skipRoom);
                    lbAlertMsg.Text = alert;
                }
            }
            else if (ready == StatusTransaction.Error)
            {
                lbAlertMsg.Text = "กรุณากดปุ่ม Ready อีกครั้ง";
                StatusNSWR();
            }
        }