コード例 #1
0
        private void InitTaskList()
        {
            using (BackgroundWorker worker = new BackgroundWorker())
            {
                worker.DoWork += delegate(object sender, DoWorkEventArgs e)
                {
                    if (null == ExtendApplicationContext.Current.CommDict.EventDict)
                    {
                        ExtendApplicationContext.Current.CommDict.EventDict = comnDictRepository.GetEventDictList().Data;
                    }
                    if (null == ExtendApplicationContext.Current.CommDict.UnitDictExt)
                    {
                        ExtendApplicationContext.Current.CommDict.UnitDictExt = comnDictRepository.GetUnitDictList().Data;
                    }
                    if (ExtendApplicationContext.Current.CommDict.AdministrationDictExt == null)
                    {
                        ExtendApplicationContext.Current.CommDict.AdministrationDictExt = comnDictRepository.GetAdminstrationDictList().Data;
                    }

                    if (ExtendApplicationContext.Current.CommDict.HisUsersDict == null)
                    {
                        ExtendApplicationContext.Current.CommDict.HisUsersDict = comnDictRepository.GetHisUsersList().Data;
                    }

                    if (ExtendApplicationContext.Current.CommDict.DeptDict == null)
                    {
                        ExtendApplicationContext.Current.CommDict.DeptDict = comnDictRepository.GetDeptDictList().Data;
                    }

                    if (ExtendApplicationContext.Current.CommDict.OperationRoomDict == null)
                    {
                        ExtendApplicationContext.Current.CommDict.OperationRoomDict = comnDictRepository.GetAllOperatingRoomList().Data;
                    }

                    if (ExtendApplicationContext.Current.CommDict.AnesInputDictDict == null)
                    {
                        ExtendApplicationContext.Current.CommDict.AnesInputDictDict = comnDictRepository.GetAnesInputDictList(null).Data;
                    }

                    if (ExtendApplicationContext.Current.CommDict.BloodGasDict == null)
                    {
                        ExtendApplicationContext.Current.CommDict.BloodGasDict = comnDictRepository.GetBloodGasDictList().Data;
                    }

                    if (ExtendApplicationContext.Current.CommDict.WardDict == null)
                    {
                        ExtendApplicationContext.Current.CommDict.WardDict = comnDictRepository.GetWardDictList().Data;
                    }

                    if (ExtendApplicationContext.Current.CommDict.EventDictExt == null)
                    {
                        ExtendApplicationContext.Current.CommDict.EventDictExt = comnDictRepository.GetAnesEventDictExt().Data;
                    }

                    if (ExtendApplicationContext.Current.CommDict.ConfigDict == null)
                    {
                        ExtendApplicationContext.Current.CommDict.ConfigDict = comnDictRepository.GetConfig().Data;
                    }

                    if (ExtendApplicationContext.Current.CommDict.HosotalConfigDict == null)
                    {
                        ExtendApplicationContext.Current.CommDict.HosotalConfigDict = comnDictRepository.GetHosotalConfig().Data;
                    }

                    if (ExtendApplicationContext.Current.CommDict.AnesMethodDict == null)
                    {
                        ExtendApplicationContext.Current.CommDict.AnesMethodDict = comnDictRepository.GetAnesMethodDictList().Data;
                    }

                    if (ExtendApplicationContext.Current.CommDict.DiagnosisDict == null)
                    {
                        ExtendApplicationContext.Current.CommDict.DiagnosisDict = comnDictRepository.GetDiagDictList().Data;
                    }

                    if (ExtendApplicationContext.Current.CommDict.OperationNameDict == null)
                    {
                        ExtendApplicationContext.Current.CommDict.OperationNameDict = comnDictRepository.GetOperNameDictList().Data;
                    }

                    if (ExtendApplicationContext.Current.CommDict.MonitorDict == null)
                    {
                        ExtendApplicationContext.Current.CommDict.MonitorDict = comnDictRepository.GetMonitorDictList().Data;
                    }

                    if (ExtendApplicationContext.Current.CommDict.MonitorFuntionDict == null)
                    {
                        ExtendApplicationContext.Current.CommDict.MonitorFuntionDict = comnDictRepository.GetMonitorFuctionCodeList().Data;
                    }
                };
                worker.RunWorkerAsync();
            };
        }
コード例 #2
0
        public DataTable GetDictDataByTableName(string tableName)
        {
            DataTable data = null;

            switch (tableName)
            {
            case "MED_MONITOR_FUNCTION_CODE":
                data = ModelHelper <MED_MONITOR_FUNCTION_CODE> .ConvertListToDataTable(comnDictRepository.GetMonitorFuctionCodeList().Data);

                break;

            case "MED_EVENT_DICT":
                data = ModelHelper <MED_EVENT_DICT> .ConvertListToDataTable(comnDictRepository.GetEventDictList().Data);

                break;

            case "MED_EVENT_DICT_EXT":
                data = ModelHelper <MED_EVENT_DICT_EXT> .ConvertListToDataTable(comnDictRepository.GetAnesEventDictExt().Data);

                break;

            case "MED_UNIT_DICT":
                data = ModelHelper <MED_UNIT_DICT> .ConvertListToDataTable(comnDictRepository.GetUnitDictList().Data);

                break;

            case "MED_ADMINISTRATION_DICT":
                data = ModelHelper <MED_ADMINISTRATION_DICT> .ConvertListToDataTable(comnDictRepository.GetAdminstrationDictList().Data);

                break;

            case "MED_EVENT_SORT":
                data = ModelHelper <MED_EVENT_SORT> .ConvertListToDataTable(comnDictRepository.GetEventSortList(ExtendApplicationContext.Current.LoginUser.LOGIN_NAME).Data);

                break;

            case "MED_HIS_USERS":
                data = ModelHelper <MED_HIS_USERS> .ConvertListToDataTable(comnDictRepository.GetHisUsersList().Data);

                break;

            case "MED_DEPT_DICT":
                data = ModelHelper <MED_DEPT_DICT> .ConvertListToDataTable(comnDictRepository.GetDeptDictList().Data);

                break;

            case "MED_OPERATING_ROOM":
                data = ModelHelper <MED_OPERATING_ROOM> .ConvertListToDataTable(comnDictRepository.GetOperatingRoomList("0").Data);

                break;

            case "MED_ANESTHESIA_INPUT_DICT":
                data = ModelHelper <MED_ANESTHESIA_INPUT_DICT> .ConvertListToDataTable(comnDictRepository.GetAnesInputDictList(null).Data);

                break;

            case "MED_BLOOD_GAS_DICT":
                data = ModelHelper <MED_BLOOD_GAS_DICT> .ConvertListToDataTable(comnDictRepository.GetBloodGasDictList().Data);

                break;

            case "MED_WARD_DICT":
                data = ModelHelper <MED_WARD_DICT> .ConvertListToDataTable(comnDictRepository.GetWardDictList().Data);

                break;

            case "MED_ANESTHESIA_DICT":
                data = ModelHelper <MED_ANESTHESIA_DICT> .ConvertListToDataTable(comnDictRepository.GetAnesMethodDictList().Data);

                break;

            case "MED_MONITOR_DICT":
                data = ModelHelper <MED_MONITOR_DICT> .ConvertListToDataTable(comnDictRepository.GetMonitorDictList().Data);

                break;

            case "MED_PAT_MONITOR_DATA_DICT":
                data = ModelHelper <MED_PAT_MONITOR_DATA_DICT> .ConvertListToDataTable(comnDictRepository.GetPatMonitorDict().Data);

                break;
            }
            return(data);
        }
コード例 #3
0
        public void RefreshCard()
        {
            ClearCard();
            if (_patCard != null)
            {
                CardVisible(true);
                lbRoomSequence.Text = _patCard.OPER_ROOM_NO;
                if (!string.IsNullOrEmpty(_patCard.SEQUENCE.ToString()))
                {
                    lbRoomSequence.Text = _patCard.OPER_ROOM_NO + "-" + Convert.ToInt16(_patCard.SEQUENCE).ToString();
                }
                lbName.Text = _patCard.NAME;

                if (_patCard.SEX == "男")
                {
                    pictureBoxSex.Image = Resources.男;
                }
                else if (_patCard.SEX == "女")
                {
                    pictureBoxSex.Image = Resources.女;
                }
                string strlbAge = string.Empty;
                if (!string.IsNullOrEmpty(_patCard.DATE_OF_BIRTH.ToString()) && !string.IsNullOrEmpty(_patCard.SCHEDULED_DATE_TIME.ToString()))
                {
                    strlbAge = DateDiff.CalAge(_patCard.DATE_OF_BIRTH.Value, _patCard.SCHEDULED_DATE_TIME.Value);
                }
                lbAgeInpNo.Text = strlbAge;


                if (_patCard.OPER_STATUS_CODE < 5)//术前
                {
                    this.BackgroundImage = Resources.card_术前;
                }
                else if (_patCard.OPER_STATUS_CODE >= 5 && _patCard.OPER_STATUS_CODE < 35)//术中
                {
                    this.BackgroundImage = Resources.card_术中;
                }
                else if (_patCard.OPER_STATUS_CODE >= 35)//术后
                {
                    this.BackgroundImage = Resources.card_术后;
                }
                if (_patCard.START_DATE_TIME.HasValue)
                {
                    if (((TimeSpan)(accountRepository.GetServerTime().Data - _patCard.START_DATE_TIME)).TotalDays > 1)
                    {
                        lbOperationStartDate.Text = _patCard.START_DATE_TIME.Value.ToString("HH:mm");
                        lblAddDay.Visible         = true;
                    }
                    else
                    {
                        lbOperationStartDate.Text = _patCard.START_DATE_TIME.Value.ToString("HH:mm");
                        lblAddDay.Visible         = false;
                    }
                }
                else
                {
                    if (_patCard.SCHEDULED_DATE_TIME.HasValue)
                    {
                        if (((TimeSpan)(accountRepository.GetServerTime().Data - _patCard.SCHEDULED_DATE_TIME)).TotalDays > 1)
                        {
                            lbOperationStartDate.Text = _patCard.SCHEDULED_DATE_TIME.Value.ToString("HH:mm");
                            lblAddDay.Visible         = true;
                        }
                        else
                        {
                            lbOperationStartDate.Text = _patCard.SCHEDULED_DATE_TIME.Value.ToString("HH:mm");
                            lblAddDay.Visible         = false;
                        }
                    }
                    else
                    {
                        lbOperationStartDate.Text = string.Empty;
                        lblAddDay.Visible         = false;
                    }
                }
                string DEPT_CODE = string.Empty;
                if (!string.IsNullOrEmpty(_patCard.DEPT_CODE))
                {
                    MED_DEPT_DICT deptDict = comnDictRepository.GetDeptDict(_patCard.DEPT_CODE).Data;
                    DEPT_CODE = deptDict == null ? _patCard.DEPT_CODE : deptDict.DEPT_NAME;
                }

                labelInfo.Text = _patCard.INP_NO; labelDeptName.Text = DEPT_CODE; labelBedNo.Text = _patCard.BED_NO + " 床";

                lbOperationName.Text = _patCard.OPERATION_NAME;

                string strlbSurgeon = string.Empty;
                if (!string.IsNullOrEmpty(_patCard.SURGEON))
                {
                    MED_HIS_USERS hisUsers = comnDictRepository.GetHisUsersList(_patCard.SURGEON).Data;
                    strlbSurgeon = hisUsers == null ? _patCard.SURGEON : hisUsers.USER_NAME;
                }

                string strlbAnesDoctor = string.Empty;
                if (!string.IsNullOrEmpty(_patCard.ANES_DOCTOR))
                {
                    MED_HIS_USERS hisUsers = comnDictRepository.GetHisUsersList(_patCard.ANES_DOCTOR).Data;
                    strlbAnesDoctor = hisUsers == null ? _patCard.ANES_DOCTOR : hisUsers.USER_NAME;
                }

                string strlbAnesAss = string.Empty;
                if (!string.IsNullOrEmpty(_patCard.FIRST_ANES_ASSISTANT))
                {
                    MED_HIS_USERS hisUsers = comnDictRepository.GetHisUsersList(_patCard.FIRST_ANES_ASSISTANT).Data;
                    strlbAnesAss = hisUsers == null ? _patCard.FIRST_ANES_ASSISTANT : hisUsers.USER_NAME;
                }

                lbSurgeon.Text = string.Format("术者:{0}  麻醉:{1} {2}", strlbSurgeon, strlbAnesDoctor, strlbAnesAss);

                this.lbAnesMethod.Text = _patCard.ANES_METHOD;
                this.lblOperScal.Text  = !string.IsNullOrEmpty(_patCard.OPER_SCALE) ? _patCard.OPER_SCALE + " 级" : "";
                this.lblOperPost.Text  = _patCard.OPER_POSITION;


                switch (_patCard.ASA_GRADE)
                {
                case "Ⅰ":
                case "1":
                case "一":
                    pictureBoxOPER_SCALE.Image = Resources.一级;
                    break;

                case "Ⅱ":
                case "2":
                case "二":
                    pictureBoxOPER_SCALE.Image = Resources.二级;
                    break;

                case "Ⅲ":
                case "3":
                case "三":
                    pictureBoxOPER_SCALE.Image = Resources.级;
                    break;

                case "Ⅳ":
                case "4":
                case "四":
                    pictureBoxOPER_SCALE.Image = Resources.四级;
                    break;
                }
                if (_patCard.EMERGENCY_IND == 1)
                {
                    pictureBoxJZ.Visible = true;
                }
                if (_patCard.RADIATE_IND == 2)
                {
                    pictureBoxFS.Visible = true;
                }
                if (_patCard.ISOLATION_IND == 2)
                {
                    pictureBoxGL.Visible = true;
                }
            }
            else
            {
                CardVisible(false);
                this.BackgroundImage = Resources.card_blank;
            }

            //INFECTED_IND
        }