Example #1
0
        /// <summary>
        /// 刷新界面数据
        /// </summary>
        /// <param name="msg">搜索框中的文本信息</param>
        private void RefreshPatientList(dynamic msg)
        {
            DateTime scheduledTime = Convert.ToDateTime(msg.scheduledTime);
            string   RoomNo        = msg.roomNo;
            string   msg1          = msg.inputText;
            // List<MED_PAT_INFO> list = PatInfoService.ClientInstance.GetPatInfos(msg1, ExtendAppContext.Current.OperDeptCode);
            List <MED_PAT_INFO>       list = PatInfoService.ClientInstance.GetPatInfosByData(scheduledTime, RoomNo, msg1, ExtendAppContext.Current.OperDeptCode);
            List <MED_OPERATING_ROOM> listOperatingRoom = DictService.ClientInstance.GetOperatingRoomList();

            if (ApplicationConfiguration.IsOpenPatConfirm && this.CheckIsNumberic(msg1) &&
                listOperatingRoom.Find(x => x.ROOM_NO == ExtendAppContext.Current.OperRoomNo).PATIENT_ID == null)
            {
                if (list.Count > 0)
                {
                    var ls = list.GroupBy(x => x.PATIENT_ID);
                    if (ls.Count() == 1)
                    {
                        var item = list.OrderByDescending(x => x.SCHEDULED_DATE_TIME).FirstOrDefault();
                        ShowContentWindowMessage message;
                        message = new ShowContentWindowMessage("PatConfirmControl", "患者核对")
                        {
                            Height = 500,
                            Width  = 600,
                            Args   = new object[] { PatientModel.CreateModel(item) }
                        };

                        Messenger.Default.Send <ShowContentWindowMessage>(message);
                    }
                }
            }

            this.PatientModelListCount = list.Count;
            // 先转换8条数据
            this.PatientModelList = PatientModel.CreateListModel(list, new EventHandler(this.CreatePageList)).ToList <PatientModel>();
        }
Example #2
0
 /// <summary>
 /// 构造方法
 /// </summary>
 public PacsInterfaceViewModel(MED_PAT_INFO patModel)
 {
     if (patModel != null)
     {
         this.CurPatientModel = PatientModel.CreateModel(patModel);
         this.GetSyncPacsNoAndType();
         // 注册按钮命令
         this.RegisterCommand();
     }
 }
Example #3
0
 /// <summary>
 /// 构造方法
 /// </summary>
 public OperationRescueViewModel(MED_PAT_INFO patModel, DateTime startDateTime, DateTime endDateTime, Grid grid)
 {
     if (patModel != null)
     {
         this.CurPatientModel = PatientModel.CreateModel(patModel);
         this.StartDateTime   = startDateTime;
         this.EndDateTime     = endDateTime;
         this.mainGrid        = grid;
         // 注册按钮命令
         this.RegisterCommand();
     }
 }
Example #4
0
 /// <summary>
 /// 构造方法
 /// </summary>
 public OperationScreenViewModel(MED_PAT_INFO patModel, RichTextBox rtb)
 {
     if (patModel != null)
     {
         this.CurPatientModel = PatientModel.CreateModel(patModel);
         this.rtbOtherMesInfo = rtb;
         // 设置列表信息
         this.ResetOperScreenTypeList("家属呼叫");
         // 注册按钮命令
         this.RegisterCommand();
     }
 }
Example #5
0
 /// <summary>
 /// 构造方法
 /// </summary>
 public ChangeOperRoomNoViewModel(MED_PAT_INFO patModel)
 {
     if (patModel != null)
     {
         this.CurPatientModel      = PatientModel.CreateModel(patModel);
         this.MedOperatingRoomDict = DictService.ClientInstance.GetOperatingRoomList().Where(x => x.DEPT_CODE.Equals(ExtendAppContext.Current.OperDeptCode) &&
                                                                                             x.BED_TYPE.Equals(ExtendAppContext.Current.EventNo)).ToList();
         this.CbOperatingRoomSourceList = new List <MED_OPERATING_ROOM>(this.MedOperatingRoomDict);
         //this.CbOperatingRoomSourceList = this.MedOperatingRoomDict.Where(x => x.BED_TYPE == ExtendAppContext.Current.EventNo && (x.PATIENT_ID == null || string.IsNullOrEmpty(x.PATIENT_ID)))
         //    .OrderBy(t => t.SORT_NO).ToList();
         // 注册按钮命令
         this.RegisterCommand();
     }
 }
Example #6
0
 /// <summary>
 /// 构造方法
 /// </summary>
 public OperationCanceledViewModel(MED_PAT_INFO patModel, RichTextBox rtb)
 {
     if (patModel != null)
     {
         this.CurPatientModel      = PatientModel.CreateModel(patModel);
         this.MedOperatingRoomDict = DictService.ClientInstance.GetOperatingRoomList().Where(x => x.DEPT_CODE.Equals(ExtendAppContext.Current.OperDeptCode) &&
                                                                                             x.BED_TYPE.Equals(ExtendAppContext.Current.EventNo)).ToList();
         this.OperRoomNo = ExtendAppContext.Current.OperRoomNo;
         this.rtbResaon  = rtb;
         // 设置列表信息
         this.ResetOperCancelTypeList("医院因素");
         // 注册按钮命令
         this.RegisterCommand();
     }
 }
Example #7
0
        /// <summary>
        /// 刷新界面数据
        /// </summary>
        public void RefreshData()
        {
            // 在刷新数据时可能是定时器刷新也可能是消息指令刷新,为了防止数据冲突,使用对象锁
            lock (this.locker)
            {
                try
                {
                    // 每次刷新时从数据库中获取患者信息
                    MED_PAT_INFO patInfo = PatInfoService.ClientInstance.GetCurPatientInfo(ExtendAppContext.Current.OperDeptCode, ExtendAppContext.Current.OperRoomNo);
                    this.CurPatientModel = PatientModel.CreateModel(patInfo);

                    if (null != this.CurPatientModel)
                    {
                        this.IsSelectedBorderVisibility = Visibility.Visible;
                        ExtendAppContext.Current.PatientInformationExtend = this.CurPatientModel.Med_Pat_Info;
                        //设置状态灯亮
                        int lightIndex = OperationStatusHelper.GetOperStatusIndex(ExtendAppContext.Current.PatientInformationExtend.OPER_STATUS_CODE);
                        KeyBoardStateCache.KeyBoard.OpenSecondKeyBoardAllLed(lightIndex);
                        // 刷新患者的体征数据
                        this.RefreshVitalSignList();
                        // 刷新监护仪和麻醉机的图标显示
                        this.RefreshMonitor();
                    }
                    else
                    {
                        this.IsSelectedBorderVisibility = Visibility.Collapsed;
                        ExtendAppContext.Current.PatientInformationExtend = null;
                        //关闭状态灯
                        if (KeyBoardStateCache.KeyBoard != null)
                        {
                            KeyBoardStateCache.KeyBoard.CloseSecondKeyBoardAllLed();
                        }
                    }

                    // 设置图片显示或隐藏
                    this.SetOperationVisibility();
                    // 刷新手术时长信息
                    this.RefreshOperationLength();
                }
                catch (Exception ex)
                {
                    Logger.Error("获取术中信息异常", ex);
                    this.ShowMessageBox("获取术中信息发生异常。", MessageBoxButton.OK, MessageBoxImage.Error);
                }
            }
        }
Example #8
0
 /// <summary>
 /// 构造方法
 /// </summary>
 public OperationJumpViewModel(MED_PAT_INFO patModel, RichTextBox rtb)
 {
     if (patModel != null)
     {
         this.CurPatientModel      = PatientModel.CreateModel(patModel);
         OperStatus                = OperationStatusHelper.OperationStatusToString(OperationStatus.IsReady);
         this.MedOperatingRoomDict = DictService.ClientInstance.GetOperatingRoomList().Where(x => x.DEPT_CODE.Equals(ExtendAppContext.Current.OperDeptCode) &&
                                                                                             x.BED_TYPE.Equals(ExtendAppContext.Current.EventNo)).ToList();
         this.CbOperatingRoomSourceList = this.MedOperatingRoomDict.Where(x => x.BED_TYPE == ExtendAppContext.Current.EventNo && (x.PATIENT_ID == null || string.IsNullOrEmpty(x.PATIENT_ID))).ToList();
         this.rtbResaon  = rtb;
         this.OperRoomNo = CurPatientModel.OperRoomNo;
         this.LoadOperStatusList();
         // 注册按钮命令
         this.RegisterCommand();
         // 设置界面显示的警告消息
         this.ResetWarningMessage();
     }
 }
Example #9
0
        /// <summary>
        /// 构造函数
        /// </summary>
        public AnesFreeViewModel(MED_PAT_INFO patModel)
        {
            this.RegisterCommand();
            this.CurPatientModel = PatientModel.CreateModel(patModel);
            _patientID           = ExtendAppContext.Current.PatientInformationExtend.PATIENT_ID;
            _visitID             = ExtendAppContext.Current.PatientInformationExtend.VISIT_ID;
            _operID  = ExtendAppContext.Current.PatientInformationExtend.OPER_ID;
            _eventNo = "0";
            // 计算麻醉时长
            if (this.CurPatientModel.AnesStartTime != DateTime.MinValue && this.CurPatientModel.AnesEndTime != DateTime.MinValue)
            {
                TimeSpan ts = this.CurPatientModel.AnesEndTime - this.CurPatientModel.AnesStartTime;
                this.StrAnesTimeLength = string.Format("{0}小时{1}分", ts.Hours, ts.Minutes);
            }
            BillDict          = ApplicationModel.Instance.AllDictList.BillItemClassDictList.Where(x => x.TYPE == "0").ToList();
            ValuationItemList = ChargeInfoService.ClientInstance.GetValuationItemList();
            vitalSignTitle    = AnesInfoService.ClientInstance.GetVitalSignTitles(_patientID, _visitID, _operID, _eventNo, ExtendAppContext.Current.PatientInformationExtend.OPER_ROOM_NO);
            List <MED_ANES_VALUATION_LIST> lists = ChargeInfoService.ClientInstance.GetValuationList(_patientID, _visitID, _operID);

            foreach (MED_ANES_VALUATION_LIST row in lists)
            {
                row.ITEM_CLASS_NAME = billDict.Where(x => x.BILL_CLASS_CODE == row.ITEM_CLASS).FirstOrDefault().BILL_CLASS_NAME;
            }
            valuationList      = new ObservableCollection <MED_ANES_VALUATION_LIST>(lists);
            tmpValuationList   = valuationList;
            this.ValuationList = new ObservableCollection <MED_ANES_VALUATION_LIST>(valuationList);
            if (this.ValuationList.Count > 0)
            {
                IsAddEnabled = true;
            }
            foreach (MED_ANES_VALUATION_LIST row in ValuationList)
            {
                if (row.STATUS.HasValue && row.STATUS == 2)
                {
                    IsInsertEnabled = false; IsAddEnabled = false;
                }
            }
        }