Exemple #1
0
        /// <summary>
        /// 加载数据
        /// </summary>
        public override void LoadData()
        {
            if (null != this._eventDictData)
            {
                this.EventDictData.Clear();
                this.EventDictData = null;
                this.AnesEvent.Clear();
                this.AnesEvent = null;
            }

            _eventDictData = AILearnInputUtil.GetSortedList(ApplicationModel.Instance.AllDictList.EventDictList,
                                                            ApplicationModel.Instance.AllDictList.EventSortList);
            _anesEvent   = new ObservableCollection <MED_ANESTHESIA_EVENT>(AnesInfoService.ClientInstance.GetAnesthesiaEventByEventNo(_patientID, _visitID, _operID, _eventNo).OrderBy(x => x.START_TIME));
            tmpAnesEvent = _anesEvent;
            if (paramaterData != null)
            {
                switch ((string)paramaterData)
                {
                case KeyCode.AppCode.Event:
                    EventDictData = _eventDictData.Where(x => x.EVENT_CLASS_CODE == "1").ToList();
                    AnesEvent     = new ObservableCollection <MED_ANESTHESIA_EVENT>(
                        _anesEvent.Where(x => x.EVENT_CLASS_CODE == "1").ToList());
                    break;

                case KeyCode.AppCode.Intubatton:
                    EventDictData = _eventDictData.Where(x => x.EVENT_CLASS_CODE == "7").ToList();
                    AnesEvent     = new ObservableCollection <MED_ANESTHESIA_EVENT>(
                        _anesEvent.Where(x => x.EVENT_CLASS_CODE == "7").ToList());
                    break;

                case KeyCode.AppCode.Extubation:
                    EventDictData = _eventDictData.Where(x => x.EVENT_CLASS_CODE == "8").ToList();
                    AnesEvent     = new ObservableCollection <MED_ANESTHESIA_EVENT>(
                        _anesEvent.Where(x => x.EVENT_CLASS_CODE == "8").ToList());
                    break;
                }
            }
            else
            {
                EventDictData = _eventDictData.Where(x => x.EVENT_CLASS_CODE != "2" && x.EVENT_CLASS_CODE != "3" &&
                                                     x.EVENT_CLASS_CODE != "4" && x.EVENT_CLASS_CODE != "B" &&
                                                     x.EVENT_CLASS_CODE != "C" && x.EVENT_CLASS_CODE != "D").ToList();
                AnesEvent = new ObservableCollection <MED_ANESTHESIA_EVENT>(_anesEvent.Where(x => x.EVENT_CLASS_CODE != "2" &&
                                                                                             x.EVENT_CLASS_CODE != "3" && x.EVENT_CLASS_CODE != "4" &&
                                                                                             x.EVENT_CLASS_CODE != "B" && x.EVENT_CLASS_CODE != "C" &&
                                                                                             x.EVENT_CLASS_CODE != "D").ToList());
            }

            tmpEventDictData = EventDictData;
            isChanged        = false;
        }
Exemple #2
0
        /// <summary>
        /// 加载所需字典数据
        /// </summary>
        private void CustomLoadDictData()
        {
            // 快速切换进入,需要重新设置数据源,不然界面上无法显示
            if (null != this._drugDictData)
            {
                this.DrugDictData.Clear();
                this.DrugDictData = null;
                this.AnesEvent.Clear();
                this.AnesEvent = null;
                this.DosageUnitDict.Clear();
                this.DosageUnitDict = null;
                this.SpeedUnitDict.Clear();
                this.SpeedUnitDict = null;
                this.ConcentrationUnitDict.Clear();
                this.ConcentrationUnitDict = null;
                this.AdministrationDict.Clear();
                this.AdministrationDict = null;
            }

            _drugDictData = AILearnInputUtil.GetSortedList(ApplicationModel.Instance.AllDictList.EventDictList,
                                                           ApplicationModel.Instance.AllDictList.EventSortList);

            List <MED_ADMINISTRATION_DICT> tempAdminDict = new List <MED_ADMINISTRATION_DICT>(ApplicationModel.Instance.AllDictList.AdministrationDictList);

            if (tempAdminDict[0].ADMINISTRATION_NAME != "")
            {
                MED_ADMINISTRATION_DICT item = new MED_ADMINISTRATION_DICT();
                item.ADMINISTRATION_NAME = "";
                item.ADMINISTRATION_CODE = "";
                tempAdminDict.Insert(0, item);
            }

            List <MED_UNIT_DICT> tempDosageUnitDict        = ApplicationModel.Instance.AllDictList.UnitDictList.Where(x => x.UNIT_TYPE == 3).ToList();
            List <MED_UNIT_DICT> tempSpeedUnitDict         = ApplicationModel.Instance.AllDictList.UnitDictList.Where(x => x.UNIT_TYPE == 2).ToList();
            List <MED_UNIT_DICT> tempConcentrationUnitDict = ApplicationModel.Instance.AllDictList.UnitDictList.Where(x => x.UNIT_TYPE == 1).ToList();

            if (tempDosageUnitDict[0].UNIT_NAME != "")
            {
                MED_UNIT_DICT item = new MED_UNIT_DICT();
                item.UNIT_NAME = "";
                item.UNIT_CODE = "";
                tempDosageUnitDict.Insert(0, item);
                tempSpeedUnitDict.Insert(0, item);
                tempConcentrationUnitDict.Insert(0, item);
            }

            this.AdministrationDict    = tempAdminDict;
            this.DosageUnitDict        = tempDosageUnitDict;
            this.SpeedUnitDict         = tempSpeedUnitDict;
            this.ConcentrationUnitDict = tempConcentrationUnitDict;
        }
Exemple #3
0
        private void AnesthesiaEventDictSelectorLoad()
        {
            // this.Location = floatLocation;
            EventName = string.IsNullOrEmpty(EventName) ? "ALL" : EventName;
            ClearButton();
            if (anesClassTypes.ContainsKey(EventName) || AnesEventType.CPBEventType.ContainsKey(EventName) || EventName.Equals("ALL"))//
            {
                if (ExtendApplicationContext.Current.SystemStatus == ProgramStatus.CPBReport)
                {
                    _isEvent = EventName.Equals("事件");
                }
                else if (EventName.Equals("ALL"))
                {
                    _isEvent = true;
                }
                else
                {
                    _isEvent = ("234BCX".IndexOf(anesClassTypes[EventName]) < 0);
                }
                // timeEvent.Value = DateTime.Now;
                listEventSortList = ExtendApplicationContext.Current.CommDict.EventSortDict;
                if (listEventSortList.Count == 0)
                {
                    listEventSortList = comnDictRepository.GetEventSortList("MDSD").Data;
                    ExtendApplicationContext.Current.CommDict.EventSortDict = listEventSortList;
                }
                if (!dataSet.Tables.Contains(EventName))
                {
                    string    itemClass = "";
                    DataTable dataTable = null;
                    if (EventName.Equals("呼吸"))
                    {
                        dataTable = ModelHelper <MED_EVENT_DICT> .ConvertListToDataTable(new AnesEventRepository().GetAnesEventDictByhuxi().Data);

                        for (int i = 0; i < dataTable.Rows.Count; i++)
                        {
                            if (dataTable.Rows[i]["EVENT_ITEM_NAME"].ToString() == "辅助呼吸")
                            {
                                dataTable.Rows[i]["EVENT_CLASS_CODE"] = "9";
                            }
                            else if (dataTable.Rows[i]["EVENT_ITEM_NAME"].ToString() == "控制呼吸")
                            {
                                dataTable.Rows[i]["EVENT_CLASS_CODE"] = "A";
                            }
                            else if (dataTable.Rows[i]["EVENT_ITEM_NAME"].ToString() == "自主呼吸")
                            {
                                dataTable.Rows[i]["EVENT_CLASS_CODE"] = "Y";
                            }
                        }
                    }
                    else if (EventName.Equals("ALL"))
                    {
                        List <MED_EVENT_DICT> eventList = ExtendApplicationContext.Current.CommDict.EventDict.OrderByDescending(p => p.SORT_NO).ToList();
                        dataTable = ModelHelper <MED_EVENT_DICT> .ConvertListToDataTable(eventList);
                    }
                    else
                    {
                        itemClass = anesClassTypes[EventName];
                        List <MED_EVENT_DICT> eventList = ExtendApplicationContext.Current.CommDict.EventDict.Where(p => p.EVENT_CLASS_CODE == itemClass).ToList();
                        eventList = AILearnInputUtil.GetSortedList(eventList, ExtendApplicationContext.Current.CommDict.EventSortDict, itemClass);
                        dataTable = ModelHelper <MED_EVENT_DICT> .ConvertListToDataTable(eventList);
                    }
                    dataSet.Tables.Add(dataTable);
                    dataTable.TableName = EventName;
                }
                ReSetDictIndexList(searchTextBox.CurrentText);
                //
                CalcPage();
                AddDosageButton(0);
                if (!EventName.Equals("ALL"))
                {
                    AddPageButton();
                }

                foreach (Control control in panelBody.Controls)
                {
                    if (control is Button && !control.Text.Equals("?"))
                    {
                        control.Visible = true;
                    }
                }
            }
        }