Example #1
0
        protected override bool CheckBeforeCommit()
        {
            List <MTextBox> boxs = GetControls <MTextBox>();

            foreach (MTextBox textbox in boxs)
            {
                if (!string.IsNullOrEmpty(textbox.WantValueBeforePrint) && string.IsNullOrEmpty(textbox.Text.Trim()))
                {
                    MessageBoxFormPC.Show(textbox.WantValueBeforePrint);
                    return(false);
                }
            }

            List <MRichTextBox> boxs2 = GetControls <MRichTextBox>();

            foreach (MRichTextBox textbox in boxs2)
            {
                if (!string.IsNullOrEmpty(textbox.WantValueBeforePrint) && string.IsNullOrEmpty(textbox.Text.Trim()))
                {
                    MessageBoxFormPC.Show(textbox.WantValueBeforePrint);
                    return(false);
                }
            }

            //if (ExtendApplicationContext.Current.PatientInformationExtend.OPER_STATUS_CODE < 50)
            //{
            //    MessageBoxFormPC.Show("请在出复苏室之后才能上传!");
            //    return false;
            //}



            return(true);
        }
Example #2
0
        /// <summary>
        /// 打印前判断
        /// </summary>
        protected override bool CheckBeforePrint()
        {
            List <MTextBox> boxs = GetControls <MTextBox>();

            foreach (MTextBox textbox in boxs)
            {
                if (!string.IsNullOrEmpty(textbox.WantValueBeforePrint) && string.IsNullOrEmpty(textbox.Text.Trim()))
                {
                    MessageBoxFormPC.Show(textbox.WantValueBeforePrint);
                    return(false);
                }
            }

            List <MRichTextBox> boxs2 = GetControls <MRichTextBox>();

            foreach (MRichTextBox textbox in boxs2)
            {
                if (!string.IsNullOrEmpty(textbox.WantValueBeforePrint) && string.IsNullOrEmpty(textbox.Text.Trim()))
                {
                    MessageBoxFormPC.Show(textbox.WantValueBeforePrint);
                    return(false);
                }
            }

            return(true);
        }
Example #3
0
        // <summary>
        // 文书上传前检查
        // </summary>
        // <returns></returns>
        protected override bool CheckBeforeCommit()
        {
            if (!AccessControl.CheckModifyRightForOperator("麻醉记录单") && ExtendApplicationContext.Current.AppType != ApplicationType.PACU)
            {
                MessageBoxFormPC.Show("您没有归档该文书的权限!", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return(false);
            }
            //AnesInformations.AnesthesiaEventDataTable anesEvent = DataContext.GetCurrent().GetAnesthesiaEvent(_eventNo);
            //foreach (AnesInformations.AnesthesiaEventRow row in anesEvent)
            //{
            //    PointType pointType = (GetDecimalValue(row["DURATIVE_INDICATOR"]) == 1 ? PointType.ProLonged : PointType.SinglePoint);
            //    if (pointType == PointType.ProLonged)
            //    {
            //        if (row["START_TIME"] != System.DBNull.Value)
            //        {
            //            if (row["END_DATE"] == System.DBNull.Value)
            //            {
            //                Dialog.MessageBox("持续性 【" + row["ITEM_NAME"].ToString() + "】 已有开始时间,但是还没有结束时间,请确认文书完成后再上传 。", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
            //                return false;
            //            }
            //        }
            //    }
            //}
            OperationStatus operStatus = ExtendApplicationContext.Current.OperationStatus;

            if (operStatus != OperationStatus.OutOperationRoom && operStatus != OperationStatus.TurnToPACU && operStatus != OperationStatus.TurnToSickRoom &&
                operStatus != OperationStatus.InPACU && operStatus != OperationStatus.OutPACU && operStatus != OperationStatus.Done)
            {
                MessageBoxFormPC.Show("只有 【出手术室】后才能归档麻醉单 。", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return(false);
            }

            return(base.CheckBeforePrint());
        }
Example #4
0
        /// <summary>
        /// 保存整个文书的模板
        /// </summary>
        /// <returns></returns>
        public bool SaveAllDataModel(DataTable TotalModelDT)
        {
            TotalModelDT.TableName = "TOTALMODEL";
            bool isSaved = false;
            SetNewDocumentTemplet newDocumentTemplet = new SetNewDocumentTemplet();
            XtraForm xtraForm = GetDialogForm("保存整体模板", newDocumentTemplet);

            xtraForm.Size = new Size(634, 160);
            if (xtraForm.ShowDialog() == DialogResult.OK && newDocumentTemplet.DialogResultData != null)
            {
                MED_DOCUMENT_TEMPLET row = newDocumentTemplet.DialogResultData;
                row.DOCUMENT_NAME = Path.GetFileNameWithoutExtension(_baseDoc.ReportName);
                row.ISJUBU        = 0;
                MemoryStream stream = new MemoryStream();
                TotalModelDT.WriteXml(stream);
                stream.Position   = 0;
                row.TEMPLET_VALUE = FileHelper.StreamToBytes(stream);
                stream.Close();
                stream.Dispose();
                isSaved = SaveModel(row);
            }
            else
            {
                MessageBoxFormPC.Show("除患者基本信息外其他信息为空—请填写后再保存模板", "提示信息", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
            return(isSaved);
        }
Example #5
0
        private void btnDeleteItem_Click(object sender, EventArgs e)
        {
            if (dgMonitorEditorView.SelectedColumns.Count > 0 && dgMonitorEditorView.CurrentRow.Index >= 0)
            {
                if (MessageBoxFormPC.Show("真的要删除所选列的数据吗?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
                {
                    bool           result      = false;
                    NewMonitorData monitorData = new NewMonitorData(_patientID, _visitID, _operID, _eventNo, ExtendApplicationContext.Current.LoginUser.USER_JOB_ID);
                    for (int i = 0; i < dgMonitorEditorView.SelectedColumns.Count; i++)
                    {
                        string code = ((DataTable)dgMonitorEditorView.DataSource).Columns[dgMonitorEditorView.SelectedColumns[i].Index].Caption;

                        if (monitorData.Delete(code))
                        {
                            result = true;
                        }
                    }
                    if (result)
                    {
                        _dataChanged = true;
                        GetVitalSignDataTable();
                        if (SignVitalSaveClicked != null)
                        {
                            SignVitalSaveClicked(this, EventArgs.Empty);
                        }
                    }
                }
            }
        }
Example #6
0
        private void btnOk_Click(object sender, EventArgs e)
        {
            MED_USERS user = AccountService.Login(_userID, txtPassWord.Text.Trim());

            if (user != null)
            {
                if (txtNewPWD.Text.Trim() != "" && txtNewPWDtoo.Text.Trim() != "")
                {
                    if (txtNewPWD.Text.Trim() == txtNewPWDtoo.Text.Trim())
                    {
                        user.LOGIN_PWD = MD5Encrypt.GetMd5To32Str(txtNewPWD.Text.Trim());
                        if (UserService.SaveUser(user))
                        {
                            ExtendApplicationContext.Current.LoginUser.LOGIN_PWD = MD5Encrypt.GetMd5To32Str(txtNewPWD.Text.Trim());
                            MessageBoxFormPC.Show("密码修改成功", MessageBoxIcon.Asterisk);
                        }
                    }
                    else
                    {
                        MessageBoxFormPC.Show("确认新密码错误", MessageBoxIcon.Information);
                    }
                }
                else
                {
                    MessageBoxFormPC.Show("新密码不能为空", MessageBoxIcon.Information);
                }
            }
            else
            {
                MessageBoxFormPC.Show("旧密码输入错误!", MessageBoxIcon.Information);
            }
        }
Example #7
0
        private void btnNext_BtnClicked(object sender, EventArgs e)
        {
            if (radioStatusOperTurnTo.SelectedIndex < 0)
            {
                MessageBoxFormPC.Show("请填写术后去向!", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }

            if (OutPacuRoom())
            {
                statusTime = timeControl.DateTimes;
                if (ApplicationConfiguration.IsUpdateHisStatus)
                {
                    MED_OPERATION_MASTER operMaster = operationInfoRepository.GetOperMaster(ExtendApplicationContext.Current.PatientContextExtend.PatientID, ExtendApplicationContext.Current.PatientContextExtend.VisitID, ExtendApplicationContext.Current.PatientContextExtend.OperID).Data;
                    Logger.Error("SyncOPER503W前:" + operMaster.PATIENT_ID + "|" + operMaster.VISIT_ID + "|" + operMaster.OPER_ID + "|" + operMaster.OPER_STATUS_CODE + "|" + operMaster.IN_PACU_DATE_TIME + "|" + operMaster.OUT_PACU_DATE_TIME);

                    string ret = new SyncInfoRepository().SyncOPER503W(_patientID, _visitID, _operID, 55).Data;

                    operMaster = operationInfoRepository.GetOperMaster(ExtendApplicationContext.Current.PatientContextExtend.PatientID, ExtendApplicationContext.Current.PatientContextExtend.VisitID, ExtendApplicationContext.Current.PatientContextExtend.OperID).Data;

                    Logger.Error("SyncOPER503W后:" + operMaster.PATIENT_ID + "|" + operMaster.VISIT_ID + "|" + operMaster.OPER_ID + "|" + operMaster.OPER_STATUS_CODE + "|" + operMaster.IN_PACU_DATE_TIME + "|" + operMaster.OUT_PACU_DATE_TIME);
                }
                result = DialogResult.OK;
                ParentForm.DialogResult = DialogResult.OK;
            }
        }
Example #8
0
        private void btnOK_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(textEdit2.Text.Trim()))
            {
                MessageBoxFormPC.Show("模板名不能为空!", "提示信息");
                return;
            }
            List <MED_DOCUMENT_TEMPLET> documentTempletDataTable = CommonService.ClientInstance.GetDocumentTemplet().Where(x => x.TEMPLET_NAME == textEdit2.Text.Trim()).ToList();

            if (documentTempletDataTable.Count > 0)
            {
                MessageBoxFormPC.Show("模板名已存在!", "提示信息");
                return;
            }
            if (ParentForm != null && ParentForm.Modal)
            {
                ParentForm.DialogResult = DialogResult.OK;
                MED_DOCUMENT_TEMPLET row = new MED_DOCUMENT_TEMPLET();
                row.TEMPLET_GUID = Guid.NewGuid().ToString();
                row.CLASS_NAME   = string.IsNullOrEmpty(textEdit1.Text.Trim()) ? "通用" : textEdit1.Text.Trim();
                row.TEMPLET_NAME = textEdit2.Text.Trim();
                row.USER_ID      = ExtendAppContext.Current.LoginUser.USER_JOB_ID;
                row.EVENT_NO     = ExtendAppContext.Current.EventNo;
                row.ISPRIVATE    = checkEdit1.Checked ? 1 : 0;
                DialogResultData = row;
            }
        }
Example #9
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("录入信息不完整,请重新核查!");
         }
     }
 }
Example #10
0
        /// <summary>
        /// 保存整体模板
        /// </summary>
        /// <returns></returns>
        public bool SaveModel()
        {
            bool isSaved = false;

            if (null != this._currentMRichTextBox && this._currentMRichTextBox.TempletFlag == DocTempletType.AnesSummary)
            {
                SetNewDocumentTemplet newDocumentTemplet = new SetNewDocumentTemplet();
                XtraForm xtraForm = GetDialogForm("保存整体模板", newDocumentTemplet);
                xtraForm.Size    = new Size(340, 320);
                xtraForm.TopMost = true;
                if (xtraForm.ShowDialog() == DialogResult.OK && newDocumentTemplet.DialogResultData != null)
                {
                    MED_DOCUMENT_TEMPLET row = newDocumentTemplet.DialogResultData;
                    row.DOCUMENT_NAME = Path.GetFileNameWithoutExtension(_baseDoc.ReportName);
                    row.ISJUBU        = 0;
                    row.TEMPLET_VALUE = StringHelper.Str2Arr(this._currentMRichTextBox.Text.Trim());
                    isSaved           = SaveModel(row);
                }
                else
                {
                    MessageBoxFormPC.Show("除患者基本信息外其他信息为空—请填写后再保存模板", "提示信息", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                }
            }
            return(isSaved);
        }
Example #11
0
 private void btnNext_BtnClicked(object sender, EventArgs e)
 {
     // if (btnNext.Title.Equals("确认"))
     {
         if (string.IsNullOrEmpty(txtPacuNo.Text))
         {
             MessageBoxFormPC.Show("复苏床位为必填项目!",
                                   "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
             return;
         }
         if (!_isSelectMark)
         {
             if (!InPacuRoom())
             {
                 return;
             }
             //monitor.Save();
         }
         SelectDateTime = Convert.ToDateTime(txtInPacuTime.EditValue);
         if (ApplicationConfiguration.IsUpdateHisStatus)
         {
             string ret = new SyncInfoRepository().SyncOPER503W(_patientID, _visitID, _operID, 45).Data;
         }
         result = DialogResult.OK;
         ParentForm.DialogResult = DialogResult.OK;
     }
 }
Example #12
0
        /// <summary>
        /// 对四个时间点的逻辑判断
        /// </summary>
        private bool CheckTime()
        {
            if (txtInRoomTime != null && txtOperStart != null && txtOperEnd != null && txtOutRoomTime != null)
            {
                if (txtInRoomTime.Text != "" && txtOperStart.Text != "" &&
                    DateTime.Parse(txtOperStart.Text) < DateTime.Parse(txtInRoomTime.Text))
                {
                    MessageBoxFormPC.Show("手术开始时间不可早于入室时间");
                    return(false);
                }
                else if (txtOperEnd.Text != "" && txtOperStart.Text != "" &&
                         DateTime.Parse(txtOperEnd.Text) < DateTime.Parse(txtOperStart.Text))
                {
                    MessageBoxFormPC.Show("手术结束时间不可早于手术开始时间");
                    return(false);
                }
                else if (txtOutRoomTime.Text != "" && txtOperEnd.Text != "" &&
                         DateTime.Parse(txtOutRoomTime.Text) < DateTime.Parse(txtOperEnd.Text))
                {
                    MessageBoxFormPC.Show("出室时间不可早于手术结束时间");
                    return(false);
                }
            }

            return(true);
        }
Example #13
0
        private void btnCommit_BtnClicked(object sender, EventArgs e)
        {
            MED_USERS user = accountRepository.Login(_userID, txtPassWord.Value.Trim()).Data;

            if (user != null)
            {
                if (txtNewPWD.Value.Trim() != "" && txtNewPWDtoo.Value.Trim() != "")
                {
                    if (txtNewPWD.Value.Trim() == txtNewPWDtoo.Value.Trim())
                    {
                        user.LOGIN_PWD = SecretHelper.GetMd5To32Str(txtNewPWD.Value.Trim());
                        if (userRepository.SaveUser(user).Data > 0)
                        {
                            ExtendApplicationContext.Current.LoginUser.LOGIN_PWD = SecretHelper.GetMd5To32Str(txtNewPWD.Value.Trim());
                            MessageBoxFormPC.Show("密码修改成功", MessageBoxIcon.Asterisk);

                            ParentForm.DialogResult = DialogResult.OK;
                        }
                    }
                    else
                    {
                        MessageBoxFormPC.Show("确认新密码错误", MessageBoxIcon.Information);
                    }
                }
                else
                {
                    MessageBoxFormPC.Show("新密码不能为空", MessageBoxIcon.Information);
                }
            }
            else
            {
                MessageBoxFormPC.Show("旧密码输入错误!", MessageBoxIcon.Information);
            }
        }
Example #14
0
 private void ListFromTable(IList list, Type type, DataTable dataTable)
 {
     if (dataTable != null)
     {
         List <MemberDetail> memberDetails = AssemblyHelper.GetPropertyList(type);
         foreach (DataRow row in dataTable.Rows)
         {
             object obj = Activator.CreateInstance(type);
             foreach (MemberDetail memberDetail in memberDetails)
             {
                 PropertyInfo propertyInfo = memberDetail.PropertyInfo;
                 if (dataTable.Columns.Contains(memberDetail.Name) && row[memberDetail.Name] != System.DBNull.Value)
                 {
                     try
                     {
                         AssemblyHelper.SetPropertyValue(propertyInfo, obj, row[memberDetail.Name].ToString());
                     }
                     catch (Exception ex)
                     {
                         MessageBoxFormPC.Show(ex.Message, "提示信息", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
                 }
             }
             list.Add(obj);
         }
     }
 }
Example #15
0
        private void LoadingFrm_Load(object sender, EventArgs e)
        {
            LoadingFrm_Resize(sender, e);

            this.label1.Text = "";

            //进度条设置
            InitTaskList();

            if (taskList.Count > 0)
            {
                string format = "f2";
                if (100f / taskList.Count == 100 / taskList.Count)
                {
                    format = "f0";
                }

                t = new System.Windows.Forms.Timer()
                {
                    Interval = 1000
                };
                t.Tick += (s, d) =>
                {
                    if (resultList.Count < taskList.Count)
                    {
                        this.label1.Text = "数据加载进度["
                                           + (resultList.Count * 100f / taskList.Count).ToString(format)
                                           + "%]";
                    }
                    else
                    {
                        EndOfTask = true;
                    }

                    if (EndOfTask)
                    {
                        if (!EndWithMainFrm)
                        {
                            this.label1.Text = "等待加载主窗口";
                        }
                        else
                        {
                            if (resultList.Contains(false))
                            {
                                taskList.Clear();
                                resultList.Clear();
                                MessageBoxFormPC.Show("加载字典时出错,请检查日志。");
                            }
                            this.Close();
                            this.Dispose(true);
                        }
                    }
                };
                t.Start();

                thread = new Thread(new ThreadStart(BackgroudRunTask));
                thread.Start();
            }
        }
Example #16
0
        //private void SelectPatient(int index)
        //{
        //    if (_patients.Count > index && index >= 0)
        //    {
        //        SelectPatient(_patients[index]);
        //    }
        //}
        private void SelectPatient(PatientCard patCard)
        {
            if (ExtendAppContext.Current.PatientID == patCard.PatCard.PATIENT_ID && ExtendAppContext.Current.VisitID == patCard.PatCard.VISIT_ID &&
                ExtendAppContext.Current.OperID == patCard.PatCard.OPER_ID)
            {
            }
            else
            {
                if (ExtendApplicationContext.Current.IsRescueMode)
                {
                    if (MessageBoxFormPC.Show("当前患者处于急救模式下,是否取消急救模式后切换患者?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
                    {
                        ExtendApplicationContext.Current.IsRescueMode = false;
                    }
                    else
                    {
                        return;
                    }
                }
            }
            RefreshPatientDataTable(patCard.PatCard.PATIENT_ID, patCard.PatCard.VISIT_ID, patCard.PatCard.OPER_ID);
            foreach (PatientCard patient in _patients)
            {
                if (!patient.Equals(patCard))
                {
                    patient.Selected = false;
                }
            }
            patCard.Selected = true;
            _selectedPatient = patCard;

            //双击选中,全局变量赋值
            MED_PATIENT_CARD patientInformation = patCard.PatCard;

            if (patientInformation != null)
            {
                ExtendAppContext.Current.PatientID = patientInformation.PATIENT_ID;
                ExtendAppContext.Current.VisitID   = patientInformation.VISIT_ID;
                ExtendAppContext.Current.OperID    = patientInformation.OPER_ID;
                ExtendApplicationContext.Current.PatientContextExtend.PatientID = patientInformation.PATIENT_ID;
                ExtendApplicationContext.Current.PatientContextExtend.VisitID   = patientInformation.VISIT_ID;
                ExtendApplicationContext.Current.PatientContextExtend.OperID    = patientInformation.OPER_ID;
            }
            else
            {
                ExtendAppContext.Current.PatientID = "";
                ExtendApplicationContext.Current.PatientContextExtend.PatientID = "";
            }
            ExtendApplicationContext.Current.PatientInformationExtend = patCard.PatCard;
            TransOperationName();
            ShowPatientStatus(patCard);
            EventHandler eventHandle = Events[_selectChanged] as EventHandler;

            if (eventHandle != null)
            {
                eventHandle(this, null);
            }
        }
Example #17
0
 private void btnOK_Click(object sender, EventArgs e)
 {
     try
     {
         if (dateEdit1.DateTime > dateEdit2.DateTime)
         {
             MessageBoxFormPC.Show("开始时间不能大于结束时间", MessageBoxIcon.Information);
             return;
         }
         if (((TimeSpan)(dateEdit2.DateTime - dateEdit1.DateTime)).TotalHours > 8)
         {
             MessageBoxFormPC.Show("每次添加体征数据的时间区域请保持在8小时以内!", MessageBoxIcon.Information);
             return;
         }
         NewMonitorData newMonitorData = new NewMonitorData(_patientID, _visitID, _operID, _eventNo, ExtendApplicationContext.Current.LoginUser.USER_JOB_ID);
         DateTime       dt             = DateTimeEqual(dateEdit1.DateTime);
         dt = new DateTime(dt.Year, dt.Month, dt.Day, dt.Hour, dt.Minute, 0);
         while (dt <= dateEdit2.DateTime)
         {
             List <MED_VITAL_SIGN> vitalSignDataTable = new OperationVitalSignRepository().GetVitalSignData(_patientID, _visitID, _operID, _eventNo, false);
             //int index = _items.Count - 1;
             foreach (Control control in Controls)
             {
                 if (control is MedTextBox && !control.Equals(txtInterval))
                 {
                     string text     = (control as MedTextBox).Text;
                     string oldvalue = "0";
                     string itemName = "";
                     if (vitalSignDataTable != null && vitalSignDataTable.Count > 0)
                     {
                         foreach (MED_VITAL_SIGN row in vitalSignDataTable)
                         {
                             if (dt == row.TIME_POINT && (control as MedTextBox).Tag.ToString() == row.ITEM_CODE)
                             {
                                 oldvalue = row.ITEM_VALUE.ToString();
                             }
                         }
                     }
                     itemName = ExtendApplicationContext.Current.MonitorFunctionCodeDict.ContainsKey((control as MedTextBox).Tag.ToString()) ? ExtendApplicationContext.Current.MonitorFunctionCodeDict[(control as MedTextBox).Tag.ToString()] : (control as MedTextBox).Tag.ToString();
                     if (!string.IsNullOrEmpty(text))
                     {
                         newMonitorData.SetItem(dt, itemName, text, oldvalue, (control as MedTextBox).Tag.ToString());
                     }
                 }
             }
             dt = dt.AddSeconds(double.Parse(txtInterval.Text));
         }
         newMonitorData.Save();
         _result = DialogResult.OK;
         ParentForm.DialogResult = DialogResult.OK;
     }
     catch (Exception ex)
     {
         Dialog.MessageBox(ex.Message, MessageBoxIcon.Information);
         _result = DialogResult.None;
     }
 }
Example #18
0
 /// <summary>
 ///打印前检查,判断是否可以打印
 /// </summary>
 /// <returns></returns>
 protected override bool CheckBeforePrint()
 {
     if (!AccessControl.CheckModifyRightForOperator("麻醉记录单") && ExtendApplicationContext.Current.AppType != ApplicationType.PACU)
     {
         MessageBoxFormPC.Show("您没有归档该文书的权限!", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
         return(false);
     }
     return(base.CheckBeforePrint());
     // return true;
 }
Example #19
0
 public void AddPatientView(BaseView view, string statusName)
 {
     if (_anesthesiaEventsEditor != null && _anesthesiaEventsEditor.IsDirty)
     {
         if (MessageBoxFormPC.Show("是否保存麻醉事件?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
         {
             _anesthesiaEventsEditor.Save();
         }
     }
     // Application.DoEvents();
     panelProcess.Visible = false;
     AddViewToWorkSpace(view, statusName);
 }
Example #20
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);
            }
        }
Example #21
0
 private void btnOK_BtnClicked(object sender, EventArgs e)
 {
     if (timeControl.DateTimes != DateTime.MinValue || timeControl.DateTimes != DateTime.MaxValue)
     {
         SaveOutRoomData();
         statusTime = timeControl.DateTimes;
         result     = DialogResult.OK;
         ParentForm.DialogResult = DialogResult.OK;
     }
     else
     {
         MessageBoxFormPC.Show("标*号的为必填项目,请认真填写,谢谢!");
     }
 }
Example #22
0
 private void SyncPatientByInpNo(string inpNo)
 {
     if (ExtendApplicationContext.Current.IsSync)
     {
         string ret = "";
         ret = syncInfoRepository.SyncPatientInfoAndInHospitalByInpNo(inpNo).Data;
         if (!string.IsNullOrEmpty(ret))
         {
             MessageBoxFormPC.Show(ret);
         }
     }
     btnSave.Enabled = true;
     if (inpNo != "")
     {
         List <MED_PAT_VISIT> patVisitList = operationInfoRepository.GetPatVisitListByInpNo(inpNo).Data;
         dtScheduledTime.EditValue = DateTime.Now.Date.AddHours(DateTime.Now.Hour).AddMinutes(DateTime.Now.Minute);
         if (patVisitList != null && patVisitList.Count > 0)
         {
             MED_PAT_VISIT patRow = patVisitList[0];
             txtPatientID.Text = patRow.PATIENT_ID;
             MED_PAT_MASTER_INDEX patMaster = operationInfoRepository.GetPatMasterIndex(patRow.PATIENT_ID).Data;
             txtPatName.Text = patMaster.NAME;
             txtPatSex.Text  = patMaster.SEX;
             if (patMaster.DATE_OF_BIRTH.HasValue)
             {
                 dtBirthDay.EditValue = patMaster.DATE_OF_BIRTH.Value;
             }
             else
             {
                 dtBirthDay.EditValue = null;
             }
         }
         MED_PATS_IN_HOSPITAL patsHospital = operationInfoRepository.GetPatsInHospital(inpNo).Data;
         if (patsHospital != null)
         {
             txtBedNo.Text = patsHospital.BED_NO;
             txtDeptCode.SetData(patsHospital.DEPT_CODE);
             if (txtDeptCode.Data != null)
             {
                 List <MED_DEPT_DICT> dataTable = ExtendApplicationContext.Current.CommDict.DeptDict.Where(x => x.DEPT_CODE == patsHospital.DEPT_CODE).ToList();
                 if (dataTable != null && dataTable.Count > 0)
                 {
                     txtDeptCode.Text = dataTable[0].DEPT_NAME;
                 }
             }
             txtConcultation.Text = patsHospital.DIAGNOSIS;
         }
     }
 }
Example #23
0
        /// <summary>
        /// 重写保存数据前判断逻辑:必填项提示和时间节点的判断
        /// </summary>
        public override bool OnCustomCheckBeforeSave()
        {
            bool bl = base.OnCustomCheckBeforeSave();

            foreach (IUIElementHandler handler in _UIElementHandlers)
            {
                if (handler.GetControlType == typeof(MTextBox) && handler.GetAllControls != null)
                {
                    foreach (Control ctl in handler.GetAllControls)
                    {
                        if (ctl is MTextBox)
                        {
                            MTextBox textbox = ctl as MTextBox;
                            if (!string.IsNullOrEmpty(textbox.InputNeededMessage) && string.IsNullOrEmpty(textbox.Text.Trim()))
                            {
                                MessageBoxFormPC.Show(textbox.InputNeededMessage);
                                return(false);
                            }
                        }
                    }
                    foreach (Control ctl in handler.GetAllControls)
                    {
                        if (ctl is MTextBox)
                        {
                            if (ctl.Name == "txtInRoomTime")
                            {
                                txtInRoomTime = ctl as MTextBox;
                            }
                            else if (ctl.Name == "txtOutRoomTime")
                            {
                                txtOutRoomTime = ctl as MTextBox;
                            }
                            else if (ctl.Name == "txtOperStart")
                            {
                                txtOperStart = ctl as MTextBox;
                            }
                            else if (ctl.Name == "txtOperEnd")
                            {
                                txtOperEnd = ctl as MTextBox;
                            }
                        }
                    }

                    bl = CheckTime();
                }
            }

            return(bl);
        }
Example #24
0
 private void tsFirstPage_Click(object sender, EventArgs e)
 {
     if (this.pdfDocumentViewer1.PageCount > 0)
     {
         int currentPage = this.pdfDocumentViewer1.CurrentPageNumber;
         if (currentPage != 1)
         {
             this.pdfDocumentViewer1.GoToFirstPage();
         }
         else
         {
             MessageBoxFormPC.Show("已经是首页了。", "提示信息", MessageBoxButtons.OKCancel, MessageBoxIcon.Information);
         }
     }
 }
Example #25
0
        private void ctl_TextChanged(object sender, EventArgs e)
        {
            MTextBox txtBox = sender as MTextBox;

            if (!IsNaturalNumber(txtBox.Text) && txtBox.Text.Length > 0)
            {
                MessageBoxFormPC.Show("只允许输入字母和数字。");
                txtBox.Text           = txtBox.Text.Substring(0, txtBox.Text.Length - 1);
                txtBox.SelectionStart = txtBox.Text.Length;
            }
            else
            {
                bPatientID_Change = true;
            }
        }
Example #26
0
        public bool Save()
        {
            bool returnData = true;

            foreach (MED_MONITOR_DICT row in _monitorList)
            {
                if (!string.IsNullOrEmpty(row.PATIENT_ID) && row.PATIENT_ID != ExtendApplicationContext.Current.PatientContextExtend.PatientID)
                {
                    if (DialogResult.No == MessageBoxFormPC.Show("您选择的仪器" + row.MONITOR_LABEL + "正被病人 " + row.PATIENT_ID + " 使用, 是否强制使用此仪器?", "提示信息", MessageBoxButtons.YesNo, MessageBoxIcon.Question))
                    {
                        return(false);
                    }
                }
                row.PATIENT_ID = ExtendApplicationContext.Current.PatientContextExtend.PatientID;
                row.VISIT_ID   = ExtendApplicationContext.Current.PatientContextExtend.VisitID;
                row.OPER_ID    = ExtendApplicationContext.Current.PatientContextExtend.OperID;
                bool yes = false;
                if (!string.IsNullOrEmpty(row.DRIVER_PROG))
                {
                    string exeName = row.DRIVER_PROG;
                    if (!string.IsNullOrEmpty(exeName))
                    {
                        if (!exeName.ToLower().EndsWith(".exe"))
                        {
                            exeName = exeName + ".exe";
                        }
                        exeName = ExtendApplicationContext.Current.AppPath + exeName;
                        //exeName = Globals.AppPath + "runCaiji.bat";
                        if (System.IO.File.Exists(exeName))
                        {
                            ShellExecute(0, "Open", exeName, "", "", 0);
                            yes = true;
                        }
                        else
                        {
                            MessageBoxFormPC.Show("采集程序" + exeName + "不存在", MessageBoxIcon.Information);
                        }
                    }
                }
                if (!yes)
                {
                    MessageBoxFormPC.Show(row.MONITOR_LABEL + "仪器没启动", MessageBoxIcon.Information);
                    return(false);
                }
            }
            returnData = comnDictRepository.SaveMonitorDictList(_monitorList).Data > 0 ? true : false;
            return(returnData);
        }
Example #27
0
        // <summary>
        // 文书上传前检查
        // </summary>
        // <returns></returns>
        //protected override bool CheckBeforeCommit()
        //{
        //    if (!AccessControl.CheckModifyRightForOperator("麻醉记录单") && ExtendApplicationContext.Current.AppType != ApplicationType.PACU)
        //    {
        //        Dialog.MessageBox("您没有上传该文书的权限!", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
        //        return false;
        //    }
        //    AnesInformations.AnesthesiaEventDataTable anesEvent = DataContext.GetCurrent().GetAnesthesiaEvent(_eventNo);
        //    foreach (AnesInformations.AnesthesiaEventRow row in anesEvent)
        //    {
        //        PointType pointType = (GetDecimalValue(row["DURATIVE_INDICATOR"]) == 1 ? PointType.ProLonged : PointType.SinglePoint);
        //        if (pointType == PointType.ProLonged)
        //        {
        //            if (row["START_TIME"] != System.DBNull.Value)
        //            {
        //                if (row["END_DATE"] == System.DBNull.Value)
        //                {
        //                    MessageBoxFormPC.Show("持续性 【" + row["ITEM_NAME"].ToString() + "】 已有开始时间,但是还没有结束时间,请确认文书完成后再上传 。", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
        //                    return false;
        //                }
        //            }
        //        }
        //    }
        //    OperationStatus operStatus = ExtendApplicationContext.Current.OperationStatus;
        //    if (operStatus != OperationStatus.OutOperationRoom && operStatus != OperationStatus.TurnToPACU && operStatus != OperationStatus.TurnToSickRoom
        //         && operStatus != OperationStatus.InPACU && operStatus != OperationStatus.OutPACU && operStatus != OperationStatus.Done)
        //    {

        //        MessageBoxFormPC.Show("只有 【出手术室】后才能上传麻醉单 。", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
        //        return false;
        //    }

        //    return true;
        //}
        //protected override bool CheckBeforeCommit()
        //{
        //    if (ExtendApplicationContext.Current.PatientInformationExtend.OPER_STATUS_CODE < 50)
        //    {
        //        MessageBoxFormPC.Show("请在出复苏室之后才能归档!");
        //        return false;
        //    }
        //    return true;
        //}
        /// <summary>
        ///打印前检查,判断是否可以打印
        /// </summary>
        /// <returns></returns>
        protected override bool CheckBeforePrint()
        {
            if (!AccessControl.CheckModifyRightForOperator("麻醉记录单") && ExtendApplicationContext.Current.AppType != ApplicationType.PACU)
            {
                MessageBoxFormPC.Show("您没有归档该文书的权限!", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return(false);
            }
            OperationStatus operStatus = ExtendApplicationContext.Current.OperationStatus;

            if (operStatus != OperationStatus.TurnToSickRoom &&
                operStatus != OperationStatus.TurnToICU && operStatus != OperationStatus.OutPACU && operStatus != OperationStatus.Done)
            {
                if (MessageBoxFormPC.Show("病人还未出 【复苏室】,是否继续打印 ?", "操作提示", MessageBoxButtons.YesNo) != DialogResult.Yes)
                {
                    return(false);
                }
            }
            return(base.CheckBeforePrint());
            // return true;
        }
Example #28
0
        private void panelVitalSign_Click(object sender, EventArgs e)
        {
            if (monitor != null && monitor.IsDirty)
            {
                if (MessageBoxFormPC.Show("是否保存体征修改项目?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
                {
                    monitor.Save();
                }
            }
            if (_anesthesiaEventsEditor != null && _anesthesiaEventsEditor.IsDirty)
            {
                if (MessageBoxFormPC.Show("是否保存麻醉事件?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
                {
                    _anesthesiaEventsEditor.Save();
                }
            }
            panelTopEvent.BackgroundImage = Resources.事件体征2;
            panelControlSelector.Visible  = false;

            VitalSignShow();
        }
Example #29
0
        private void btnOk_Click(object sender, EventArgs e)
        {
            bool flag = true;

            if (!isEditMode)
            {
                editItem = new Domain.MED_DAILY_SCHEDULE()
                {
                    DAILY_DAY     = _currentDay,
                    DAILY_USER    = _loginName,
                    DAILY_NO      = 1,
                    SCHEDULE_TYPE = this.rbtnTYPE0.Checked ? this.rbtnTYPE0.Text : this.rbtnTYPE1.Text,
                    CONTENT       = this.txtCONTENT.Text.Trim(),
                    STATE         = this.rbtnSTATE0.Checked ? 0 : 1,
                    CREATE_DATE   = DateTime.Now,
                    UPDATE_DATE   = DateTime.Now
                };
                flag = dailyScheduleRepository.Add(editItem).Data;
            }
            else
            {
                editItem.SCHEDULE_TYPE = this.rbtnTYPE0.Checked ? this.rbtnTYPE0.Text : this.rbtnTYPE1.Text;
                editItem.CONTENT       = this.txtCONTENT.Text.Trim();
                editItem.STATE         = this.rbtnSTATE0.Checked ? 0 : 1;
                flag = dailyScheduleRepository.Update(editItem).Data;
            }

            if (flag)
            {
                MessageBoxFormPC.Show("保存成功。");
                if (this.ParentForm != null)
                {
                    this.ParentForm.Close();
                }
            }
            else
            {
                MessageBoxFormPC.Show("保存失败。");
            }
        }
Example #30
0
 private void Delete()
 {
     if (MessageBoxFormPC.Show("真的要删除所选时间点的数据吗?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
     {
         bool result = false;
         //NewMonitorData monitorData = new NewMonitorData(_patientID, _visitID, _operID, _eventNo, ExtendApplicationContext.Current.LoginUser.USER_JOB_ID);
         for (int i = 0; i < dgMonitorEditorView.SelectedRows.Count; i++)
         {
             //DateTime timePoint = DateTime.Parse(((DataTable)dgMonitorEditorView.DataSource).Rows[dgMonitorEditorView.CurrentCell.RowIndex][0].ToString());
             DateTime timePoint = DateTime.Parse(dgMonitorEditorView.SelectedRows[i].Cells["实际时间"].Value.ToString());
             if (_newMonitorData.Delete(timePoint))
             {
                 result = true;
             }
         }
         if (result)
         {
             _dataChanged = true;
             GetVitalSignDataTable();
         }
     }
 }