Exemplo n.º 1
0
 /// <summary>
 /// 生成 很纯洁的 实体对象
 /// </summary>
 /// <returns></returns>
 public P_User ToExtModle()
 {
     P_User info = new P_User()
     {
         ID = this.ID,
         DepID = this.DepID,
         LoginName = this.LoginName,
         WorkCode = this.WorkCode,
         Name = this.Name,
         PassWord = this.PassWord,
         Gender = this.Gender,
         IsActive = this.IsActive,
         SN = this.SN,
         P_Department = this.P_Department.ToPOCO()
     };
     return info;
 }
Exemplo n.º 2
0
        /// <summary>
        /// 生成 很纯洁的 实体对象
        /// </summary>
        /// <returns></returns>
        public P_User ToExtModle()
        {
            P_User info = new P_User()
            {
                ID           = this.ID,
                DepID        = this.DepID,
                LoginName    = this.LoginName,
                WorkCode     = this.WorkCode,
                Name         = this.Name,
                PassWord     = this.PassWord,
                Gender       = this.Gender,
                IsActive     = this.IsActive,
                SN           = this.SN,
                P_Department = this.P_Department.ToPOCO()
            };

            return(info);
        }
Exemplo n.º 3
0
        public object GetAmbulanceState()
        {
            StringBuilder sb = new StringBuilder();
            sb.Append(@"
                        select  编码,名称 from TZAmbulanceState
                        where 是否有效=1
                        ");
            DataSet ds = SqlHelper.ExecuteDataSet(SqlHelper.AttemperConnectionString, CommandType.Text, sb.ToString(), null);
            List<P_User> list = new List<P_User>();
            if (ds.Tables[0].Rows.Count > 0)
            {
                P_User info = new P_User();
                foreach (DataRow dr in ds.Tables[0].Rows)
                {
                    info = new P_User();
                    info.ID = Convert.ToInt32(dr["编码"]);
                    info.Name = dr["名称"].ToString();

                    list.Add(info);
                }
            }
            return list;
        }
Exemplo n.º 4
0
 //获取combobox姓名
 public object GetNameList()
 {
     List<P_User> list = new List<P_User>();
     StringBuilder strSQL = new StringBuilder();
     strSQL.Append(@"select ID,Name from P_User where IsActive = 1");
     DataSet ds = SqlHelper.ExecuteDataSet(SqlHelper.MainConnectionString, CommandType.Text, strSQL.ToString(), null);
     if (ds.Tables[0].Rows.Count > 0)
     {
         foreach (DataRow dr in ds.Tables[0].Rows)
         {
             P_User info = new P_User();
             info.ID = Convert.ToInt32(dr["ID"]);
             info.Name = dr["Name"].ToString();
             list.Add(info);
         }
     }
     return list;
 }
Exemplo n.º 5
0
        /// <summary>
        /// 视图-任务列表
        /// </summary>
        public ActionResult MedicalManagement()
        {
            string menuName = "";
            string startTime = null;
            string endTime = null;
            string searchBound = null;

            P_User pUser = new P_User();
            pUser = UserOperateContext.Current.Session_UsrInfo;//获取登录人信息

            ViewData["MenuName"] = menuName;
            ViewData["WorkCode"] = pUser.WorkCode;//登录人ID

            //this.ViewData["startTime"] = startTime == null ? "2012-10-20" : startTime;//测试
            //this.ViewData["endTime"] = endTime == null ? "2012-10-21" : endTime;//测试
            this.ViewData["startTime"] = startTime == null ? DateTime.Now.AddDays(-AppConfig.GetConfigInt("PRSearchTime")).ToString("yyyy-MM-dd HH:mm:ss") : startTime;
            this.ViewData["endTime"] = endTime == null ? DateTime.Now.AddHours(1).ToString("yyyy-MM-dd HH:mm:ss") : endTime;
            UserOperateContext userOperateContext = new UserOperateContext();
            bool SelectALL = userOperateContext.getGongneng(38);//查看全部出车信息
            bool SelectOwnCenter = userOperateContext.getGongneng(42);//查看本分中心
            bool SelectOwnStation = userOperateContext.getGongneng(43);//查看本分站
            bool SelectOwn = userOperateContext.getGongneng(44);//查看本人出车信息
            bool Insert = userOperateContext.getGongneng(45);//判断登录人有“新增”病历权限
            bool Edit = userOperateContext.getGongneng(46);//判断登录人有“修改”病历权限
            bool Delete = userOperateContext.getGongneng(55);//判断登录人有“删除”病历权限
            bool Look = userOperateContext.getGongneng(56);//判断登录人有“查看”病历权限

            if (SuperRole("SuperRole"))
            {
                this.ViewData["SuperRole"] = "SuperRole";//登录人有超级权限
            }
            else
                this.ViewData["SuperRole"] = "";

            this.ViewData["SelectOwn"] = "";//
            this.ViewData["PatientRole"] = "";//
            if (SelectALL)
            {
                searchBound = "1";
            }
            else
            {
                if (SelectOwnCenter)
                    searchBound = "2";
                else
                {
                    if (SelectOwnStation)
                        searchBound = "3";
                    else
                    {
                        if (SelectOwn)
                        {
                            searchBound = "4";
                            this.ViewData["SelectOwn"] = "SelectOwn";//
                            string role = UserOperateContext.Current.getMaxPerForRole();//获取登录人角色(医生、护士、司机)
                            this.ViewData["PatientRole"] = role;//
                        }
                        else
                        {
                            searchBound = "4";
                            this.ViewData["SelectOwn"] = "";//
                            this.ViewData["PatientRole"] = "";//
                        }
                    }
                }
            }
            if (Insert)
            {
                this.ViewData["RolePermissionInsert"] = "Insert";//登录人有新增病历权限
            }
            else
                this.ViewData["RolePermissionInsert"] = "";//
            if (Edit)
            {
                this.ViewData["RolePermissionEdit"] = "Edit";//登录人有修改病历权限
            }
            else
                this.ViewData["RolePermissionEdit"] = "";//
            if (Delete)
            {
                this.ViewData["RolePermissionDelete"] = "Delete";//登录人有删除病历权限
            }
            else
                this.ViewData["RolePermissionDelete"] = "";//
            if (Look)
            {
                this.ViewData["RolePermissionLook"] = "Look";//登录人有查看病历权限
            }
            else
                this.ViewData["RolePermissionLook"] = "";//

            this.ViewData["searchBound"] = searchBound == null ? "4" : searchBound;//权限

            return View();
        }
Exemplo n.º 6
0
        private static object m_SyncRoot = new Object(); //互斥对象

        #endregion Fields

        #region Methods

        /// <summary>
        /// 病历页面初始化
        /// </summary>
        /// <param name="TaskCode">任务编码</param>
        /// <param name="PatientOrder">序号</param>
        /// <param name="state">填写状态</param>
        /// <returns></returns>
        public ActionResult AddPatientRecord(string TaskCode, int PatientOrder, string state)
        {
            //, int PatientOrder//测试
            M_PatientRecordBLL prBLL = new M_PatientRecordBLL();
            M_DictionaryBLL dBLL = new M_DictionaryBLL();
            //int PatientOrder = 1;//测试

            M_AttemperData result = prBLL.GetAttemperData(TaskCode, state);//根据任务编码获取调度信息
            ViewBag.Attemper = result;

            ViewData["TaskCode"] = TaskCode == null ? "2012102023555200020101" : TaskCode;
            M_PatientRecord prInfo;//病历主表信息
            M_PatientRecordAppend pra;//病历附表--体检等信息
            M_PatientRecordCPR prCPR;//病历附表--心肺复苏
            if (state == "new")
            {
                int AddPatientOrder = prBLL.GetPatientMaxOrder(TaskCode);
                ViewData["PatientOrder"] = AddPatientOrder;
                prInfo = new M_PatientRecord();
                pra = new M_PatientRecordAppend();
                prCPR = new M_PatientRecordCPR();
                ViewBag.PRInfo = prInfo;//病历主表信息--传到页面
                ViewBag.PRAppendInfo = pra;//病历附表--体检等信息--传到页面
                ViewBag.PRCPRInfo = prCPR;//病历附表--心肺复苏--传到页面

            }
            else
            {
                object oPatientInfo;//病历主表
                prBLL.GetPatientInfo(TaskCode, PatientOrder, out oPatientInfo, out pra, out prCPR);
                if (PatientOrder > 0)
                {
                    prInfo = (M_PatientRecord)oPatientInfo;
                    ViewBag.PRInfo = prInfo;//病历主表信息--传到页面
                    ViewBag.PRAppendInfo = pra;//病历附表--体检等信息--传到页面
                    ViewBag.PRCPRInfo = prCPR;//病历附表--心肺复苏--传到页面
                    ViewData["PatientOrder"] = PatientOrder;
                    if (SuperRole("SuperRole"))
                    {
                        this.ViewData["SuperRole"] = "SuperRole";//登录人有超级权限
                    }
                    else
                        this.ViewData["SuperRole"] = "";

                    string role = UserOperateContext.Current.getMaxPerForRole();//获取登录人角色(医生、护士、司机)
                    this.ViewData["PatientRole"] = role;//
                }
            }
            ViewData["state"] = state == null ? "new" : state;

            if (SuperRole("PRAuditCPR"))
            {
                this.ViewData["PRAuditCPR"] = "PRAuditCPR";//登录人有“心肺复苏审核”权限
            }
            else
                this.ViewData["PRAuditCPR"] = "";

            if (SuperRole("SubCenterSpotChecks"))
            {
                this.ViewData["SubCenterSpotChecks"] = "SubCenterSpotChecks";//登录人有"分中心抽查"权限
            }
            else
                this.ViewData["SubCenterSpotChecks"] = "";

            if (SuperRole("CenterSpotChecks"))
            {
                this.ViewData["CenterSpotChecks"] = "CenterSpotChecks";//登录人有"中心抽查"权限
            }
            else
                this.ViewData["CenterSpotChecks"] = "";

            P_User pUser = new P_User();
            pUser = UserOperateContext.Current.Session_UsrInfo;//获取登录人信息
            ViewData["AgentCode"] = pUser.ID;
            ViewData["AgentWorkID"] = pUser.WorkCode;
            ViewData["AgentName"] = pUser.Name;
            ViewData["BeginFillPatientTime"] = DateTime.Now.ToString();//开始填写病历时间

            #region 为病历页面的CheckBoxList项目赋值
            CheckViewModel model = new CheckViewModel();
            //model.DiseasesClassification = dBLL.GetCheckBoxModelByTableName("M_ZCaseTemplate");//病种分类
            //model.GongShiRen = dBLL.GetCheckBoxModel("GongShiRen");//供史人
            //model.AnamnesisllnessHistory = dBLL.GetCheckBoxModel("PastMedicalHistory");//既往病史
            model.BodyFigure = dBLL.GetCheckBoxModel("PiFu");//皮肤
            model.Head = dBLL.GetCheckBoxModel("Head");//头部
            model.Neck = dBLL.GetCheckBoxModel("Neck");//颈部
            model.Chest = dBLL.GetCheckBoxModel("Chest");//胸部
            model.Lung = dBLL.GetCheckBoxModel("Lung");//肺脏
            model.LungLeft = dBLL.GetCheckBoxModel("LungLeft");//左肺
            model.LungRight = dBLL.GetCheckBoxModel("LungLeft");//右肺
            model.FuBu = dBLL.GetCheckBoxModel("FuBu");//腹部
            model.JiZhu = dBLL.GetCheckBoxModel("JiZhu");//脊柱
            model.Limb = dBLL.GetCheckBoxModel("Limb");//四肢
            #endregion

            #region 为病历页面的RadioButtonList从数据库传值

            var ProvideMedicalHistoryPeople = new object();//供史人
            var DiseasesClassification = new object();//病种分类
            var PastMedicalHistory = new object();//既往病史
            var BabinskiSign = new object();//神经系统--巴氏征
            var ChestExtrusionTest = new object();//胸廓挤压试验
            var PelvicExtrusionTest = new object();//骨盆挤压试验

            lock (m_SyncRoot)
            {
                ProvideMedicalHistoryPeople = CacheHelper.GetCache("ProvideMedicalHistoryPeople");
                DiseasesClassification = CacheHelper.GetCache("DiseasesClassification");
                PastMedicalHistory = CacheHelper.GetCache("PastMedicalHistory");
                BabinskiSign = CacheHelper.GetCache("BabinskiSign");
                ChestExtrusionTest = CacheHelper.GetCache("ChestExtrusionTest");
                PelvicExtrusionTest = CacheHelper.GetCache("PelvicExtrusionTest");
                if (ProvideMedicalHistoryPeople == null)
                {
                    ProvideMedicalHistoryPeople = dBLL.GetCheckBoxOrRadioButtonList("Checkbox", "ProvideMedicalHistoryPeople", "checkbox");
                    CacheHelper.SetCache("ProvideMedicalHistoryPeople", ProvideMedicalHistoryPeople);
                }
                if (DiseasesClassification == null)
                {
                    DiseasesClassification = dBLL.GetCheckBoxListByTableName("M_ZCaseTemplate", "DiseasesClassification", "checkbox");
                    CacheHelper.SetCache("DiseasesClassification", DiseasesClassification);
                }
                if (PastMedicalHistory == null)
                {
                    PastMedicalHistory = dBLL.GetCheckBoxOrRadioButtonList("Checkbox", "PastMedicalHistory", "checkbox");
                    CacheHelper.SetCache("PastMedicalHistory", PastMedicalHistory);
                }
                if (BabinskiSign == null)
                {
                    BabinskiSign = dBLL.GetCheckBoxOrRadioButtonList("Checkbox", "BabinskiSign", "checkbox");
                    CacheHelper.SetCache("BabinskiSign", BabinskiSign);
                }
                if (ChestExtrusionTest == null)
                {
                    ChestExtrusionTest = dBLL.GetCheckBoxOrRadioButtonList("Radio", "ChestExtrusionTest", "radio");
                    CacheHelper.SetCache("ChestExtrusionTest", ChestExtrusionTest);
                }
                if (PelvicExtrusionTest == null)
                {
                    PelvicExtrusionTest = dBLL.GetCheckBoxOrRadioButtonList("Radio", "PelvicExtrusionTest", "radio");
                    CacheHelper.SetCache("PelvicExtrusionTest", PelvicExtrusionTest);
                }
            }
            this.ViewData["ProvideMedicalHistoryPeople"] = ProvideMedicalHistoryPeople;
            this.ViewData["DiseasesClassification"] = DiseasesClassification;
            this.ViewData["PastMedicalHistory"] = PastMedicalHistory;
            this.ViewData["BabinskiSign"] = BabinskiSign;
            this.ViewData["ChestExtrusionTest"] = ChestExtrusionTest;
            this.ViewData["PelvicExtrusionTest"] = PelvicExtrusionTest;

            #endregion

            return View(model);
        }
Exemplo n.º 7
0
        public ActionResult DataLoad(int page, int rows, string order, string sort, DateTime startTime, DateTime endTime
            , string linkPhone, int alarmEventType, string localAddr, string taskResult, int taskAbendReason
            , string centerCode, string stationCode, string ambCode, string driver, string doctor, string litter, string isCharge
            , string isFill, string nurse, string patientName, string searchBound, string isTest, string CPRIFSuccess, string PatientState)
        {
            try
            {
                P_User pUser = new P_User();
                pUser = UserOperateContext.Current.Session_UsrInfo;//获取登录人信息
                //bool t= UserOperateContext.Current.Session_UsrRole.Contains(10);//判断登录人是否为司机

                M_UserLoginInfo loginInfo = new M_UserLoginInfo();
                loginInfo.LoginName = pUser.LoginName;
                loginInfo.Name = pUser.Name;//姓名
                loginInfo.WorkCode = pUser.WorkCode;//工号
                loginInfo.DispatchSubCenterID = pUser.P_Department.DispatchSubCenterID;//所属分中心
                loginInfo.DispatchSationID = pUser.P_Department.DispatchSationID;//所属分站
                //loginInfo.RoleID = pUser.P_UserRole.RoleID;

                M_PatientRecordBLL M_PateintRecord = new M_PatientRecordBLL();

                var list = M_PateintRecord.GetTasks(page, rows, order, sort, startTime, endTime, linkPhone, alarmEventType, localAddr
                    , taskResult, taskAbendReason, centerCode, stationCode, ambCode, driver, doctor, litter, isCharge, isFill
                    , nurse, patientName, searchBound, isTest, loginInfo, CPRIFSuccess, PatientState);
                //if (list != null)
                //{
                //return this.Json(new { total = list, rows = list }, "appliction/json", JsonRequestBehavior.AllowGet);
                return this.Json(list, "appliction/json", JsonRequestBehavior.AllowGet);
                //}
                //else
                //{
                //   return this.Json(new { total = 0, rows = 0 }, "appliction/json", JsonRequestBehavior.AllowGet);
                //}
            }
            catch
            {
                return this.Json("");
            }
        }
Exemplo n.º 8
0
        public object Get_LS_DDYGZZT_RYXM()
        {
            StringBuilder sb = new StringBuilder();
            sb.Append(@"
                    select tp.编码,tp.姓名
                    from TPerson tp
                    left join TRole tr on tr.编码 = tp.类型编码
                    where tp.类型编码 = 2 and tp.是否有效 = 1");

            DataSet ds = SqlHelper.ExecuteDataSet(SqlHelper.AttemperConnectionString, CommandType.Text, sb.ToString(), null);
            List<P_User> list = new List<P_User>();
            if (ds.Tables[0].Rows.Count > 0)
            {
                P_User info = new P_User();
                foreach (DataRow dr in ds.Tables[0].Rows)
                {
                    info = new P_User();
                    info.ID = Convert.ToInt32(dr["编码"]);
                    info.Name = dr["姓名"].ToString();

                    list.Add(info);
                }
            }
            return list;
        }
Exemplo n.º 9
0
        //根据中心编码取分站 (中心,分站联动,统计流水用)
        //public string ListToString(List<int> list)
        //{
        //    string result = "";
        //    foreach (int i in list)
        //    {
        //        result = result + i.ToString() + ",";
        //    }
        //    return result.TrimEnd(',');
        //}
        //根据中心编码取分站 (中心,分站联动,统计流水用)
        public object GetStation(string centerID)
        {
            StringBuilder sb = new StringBuilder();
            sb.Append(@"
                     select 编码,名称
                     from TStation  ");
            sb.Append("where 是否有效 = 1");
            WhereClauseUtility.AddInSelectQuery("中心编码", centerID, sb);

            //where 中心编码 in (" + centerID + ") and  是否有效 =1 ");

            DataSet ds = SqlHelper.ExecuteDataSet(SqlHelper.AttemperConnectionString, CommandType.Text, sb.ToString(), null);
            List<P_User> list = new List<P_User>();
            if (ds.Tables[0].Rows.Count > 0)
            {
                P_User info = new P_User();
                foreach (DataRow dr in ds.Tables[0].Rows)
                {
                    info = new P_User();
                    info.ID = Convert.ToInt32(dr["编码"]);
                    info.Name = dr["名称"].ToString();

                    list.Add(info);
                }
            }
            return list;
        }