public bool SaveSpotChecks() { M_PatientRecordBLL bll = new M_PatientRecordBLL(); string SpotChecks = Request.Form["SpotChecks"].ToString(); int orderNumber = int.Parse(Request.Form["orderNumber"]); M_PatientRecord info = new M_PatientRecord(); info = JsonHelper.GetJsonInfoBy <M_PatientRecord>(SpotChecks); bool save = false; if (info != null) { try { save = bll.UpdateSpotChecks(info, orderNumber);//修改病历抽查 } catch { save = false; } } return(save); }
//获取病历信息 public void GetPatientRecordInfo(string TaskCode, string WorkID, out M_PatientRecord info, out M_PatientRecordAppend pra, out M_PatientRecordCPR prCPR) { M_PatientRecordBLL prBLL = new M_PatientRecordBLL(); M_AttemperData result = prBLL.GetAttemperData(TaskCode,"");//根据任务编码获取调度信息 info = new M_PatientRecord();//病历主表信息 info.TaskCode = TaskCode; info.PatientOrder = 1; info.CallOrder = result.CallOrder; info.Name = result.Name; info.Sex = result.Sex; info.AgeType = "岁"; info.ForHelpTelephone = result.ForHelpPhone; info.ContactTelephone = result.ContactTelephone; info.PatientVersion = result.AlarmType; info.OriginalTaskType = result.AlarmType; info.ForArea = result.Area; info.LocalAddress = result.LocalAddress; info.OutStationCode = result.StationCode; info.Station = result.Station; info.SendAddress = result.SendAddress; info.DrivingTime = result.DrivingTime; info.ArriveSceneTime = result.ArriveSceneTime; info.LeaveSceneTime = result.LeaveSceneTime; info.ArriveDestinationTime = result.ArriveDestinationTime; info.Driver = result.Driver; info.StretcherBearersI = result.StretcherBearers; info.DoctorAndNurse = result.Doctor + result.Nurse; P_UserBLL bll = new P_UserBLL(); P_User user = bll.GetListBy(u => u.WorkCode == WorkID).Select(u => u.ToExtModle()).FirstOrDefault(); //查找用户名 密码 info.AgentCode = user.ID.ToString(); info.AgentWorkID = WorkID; info.AgentName = user.Name; info.BeginFillPatientTime = DateTime.Now; info.MedicalRecordGenerationTime = DateTime.Now; info.FormCompleteLogo = false; //obj.FormCompleteTime = null; info.ChargeOrder = 0; info.SubCenterIFSpotChecks = false; info.CenterIFSpotChecks = false; info.SubmitLogo = false; info.SubmitTime = null; info.MedicalStateCode = 0; info.LastUpdatePerson = user.Name;//填写病历的人员 info.LastUpdateTime = DateTime.Now; info.CPRIFSuccess = "";//心肺复苏选择 info.IFRefuseTreatment = "治疗记录";//是否拒绝治疗(救治记录) info.RescueType = "";//抢救类型(救治记录) info.IMEI = "PAD";//从PAD填写 pra = new M_PatientRecordAppend();// pra.TaskCode = TaskCode; pra.PatientOrder = 1; prCPR = new M_PatientRecordCPR();// prCPR.TaskCode = TaskCode; prCPR.PatientOrder = 1; prCPR.CenterIFAuditForXFFS = false; }
public ActionResult SavePatientCharge() { string chargeStr = Request.Form["charge"].ToString(); M_PatientCharge charge = JsonHelper.GetJsonInfoBy <M_PatientCharge>(chargeStr); if (charge == null) { return(Json(new { result = "ERROR", msg = "解析实体为空!" }, "appliction/json", JsonRequestBehavior.AllowGet)); } M_PatientCharge info = new M_PatientChargeBLL().GetListBy(pc => pc.TaskCode.Equals(charge.TaskCode) && pc.PatientOrder == 1).FirstOrDefault(); if (info != null) { if (new M_PatientChargeBLL().Del(info) <= 0) // 删除旧收费信息 { return(Json(new { result = "ERROR", msg = "删除旧收费信息失败!" }, "appliction/json", JsonRequestBehavior.AllowGet)); } } //查询是否已经填写病历 M_PatientRecord prinfo = new M_PatientRecordBLL().GetListBy(pr => pr.TaskCode.Equals(charge.TaskCode) && pr.PatientOrder == 1).FirstOrDefault(); if (prinfo == null) { M_PatientRecordBLL bll = new M_PatientRecordBLL(); M_PatientRecord pinfo = null; //病历主表信息 M_PatientRecordAppend pra = null; //病历附表 M_PatientRecordCPR prCPR = null; //病历附表--心肺复苏 List <M_PatientRecordDiag> prDiag = null; //病历子表--初步印象 List <M_PatientRecordECGImpressions> prECG = null; //病历子表--心电图印象 GetPatientRecordInfo(charge.TaskCode, charge.ChargePerson, out pinfo, out pra, out prCPR); bll.Insert(pinfo, pra, prCPR, prDiag, prECG); //新增病历主表、附表、子表 } charge.PatientOrder = 1; //收费序号目前永远为1 if (new M_PatientChargeBLL().Add(charge) > 0) { return(Json(new { result = "OK", msg = "收费成功!" }, "appliction/json", JsonRequestBehavior.AllowGet)); } else { return(Json(new { result = "ERROR", msg = "收费失败!" }, "appliction/json", JsonRequestBehavior.AllowGet)); } }
public ActionResult GetAllTemplate(string TemplateName) { try { M_PatientRecordBLL bll = new M_PatientRecordBLL(); var result = bll.GetAllTemplate(TemplateName); return(Json(result)); } catch (Exception e) { //Dictionary<string, string> dict = new Dictionary<string, string>(); //dict.Add("InfoID", "0"); //dict.Add("InfoMessage", e.Message); return(this.Json("")); } }
public bool DelectPatient() { bool save = false; try { M_PatientRecordBLL bll = new M_PatientRecordBLL(); string TaskCode = Request.Form["TaskCode"].ToString(); int PatientOrder = Convert.ToInt32(Request.Form["PatientOrder"]); if (TaskCode != null) { save = bll.Delete(TaskCode, PatientOrder); } } catch { save = false; } return(save); }
public ActionResult GetPRRescue() { try { M_PatientRecordBLL prBLL = new M_PatientRecordBLL(); M_PatientRecordRescue prrInfo;//病历--救治记录主表 string TaskCode = Request.Form["TaskCode"].ToString(); int PatientOrder = Convert.ToInt32(Request.Form["PatientOrder"]); string RescueRecordCode = Request.Form["RescueRecordCode"].ToString(); int DisposeOrder = Convert.ToInt32(Request.Form["DisposeOrder"]); prBLL.GetPRRescueInfo(TaskCode, PatientOrder, RescueRecordCode, DisposeOrder, out prrInfo); var model = prrInfo; return(Json(new { IsSuccess = true, Model = model })); } catch (Exception ex) { LogUtility.Error("PRRescueController/GetPRRescue()", ex.ToString()); return(this.Json("")); } }
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("")); } }
public bool SaveFollowUp() { M_PatientRecordBLL bll = new M_PatientRecordBLL(); string TaskCode = Request.Form["TaskCode"].ToString(); int PatientOrder = int.Parse(Request.Form["PatientOrder"]); string DoctorFollowUp = Request.Form["DoctorFollowUp"].ToString(); bool save = false; if (TaskCode != null) { try { save = bll.UpdateFollowUp(TaskCode, PatientOrder, DoctorFollowUp);//修改医生回访 } catch { save = false; } } return(save); }
/// <summary> /// 根据任务编码获取病历信息 /// </summary> /// <param name="taskCode"></param> /// <returns></returns> public ActionResult GetPatientCommonByTask(string taskCode) { try { M_PatientRecordBLL m_PateintRecord = new M_PatientRecordBLL(); List <M_PatientRecord> list = m_PateintRecord.GetPatientCommonByTask(taskCode); if (list != null) { return(this.Json(new { total = list.Count, rows = list }, "appliction/json", JsonRequestBehavior.AllowGet)); } else { return(this.Json(new { total = 0, rows = 0 }, "appliction/json", JsonRequestBehavior.AllowGet)); } } catch { //Dictionary<string, string> dict = new Dictionary<string, string>(); //dict.Add("InfoID", "0"); //dict.Add("InfoMessage", ex.Message); return(this.Json("")); } }
public ActionResult GetPatientRecordInfo() { string TaskCode = Request.Form["TaskCode"].ToString(); int PatientOrder = Convert.ToInt32(Request.Form["PatientOrder"]); M_PatientRecord pr = null; M_PatientRecordAppend pra = null; new MobilePatientRecordBLL().GetPatientInfo(TaskCode, PatientOrder, out pr, out pra); if (pr != null) { return(Json(new { success = true, pr = pr, pra = pra }, "appliction/json", JsonRequestBehavior.AllowGet)); } else { M_AttemperData result = new M_PatientRecordBLL().GetAttemperData(TaskCode, "");//根据任务编码获取调度信息 pr = new M_PatientRecord(); pr.CallOrder = result.CallOrder; pr.PatientOrder = 1; pr.LocalAddress = result.LocalAddress; pr.Name = result.Name; pr.Sex = result.Sex; pr.Age = result.Age; pr.AgeType = result.AgeType; pr.Station = result.Station; pr.OutStationCode = result.StationCode; pr.DrivingTime = result.DrivingTime; pr.ArriveSceneTime = result.ArriveSceneTime; pr.LeaveSceneTime = result.LeaveSceneTime; pr.ArriveDestinationTime = result.ArriveDestinationTime; pr.SendAddress = result.SendAddress; pr.Driver = result.Driver; pr.DoctorAndNurse = result.Doctor + result.Nurse; pr.StretcherBearersI = result.StretcherBearers; pr.ContactTelephone = result.ContactTelephone; return(Json(new { success = true, pr = pr, pra = pra }, "appliction/json", JsonRequestBehavior.AllowGet)); } }
public bool SaveAuditCPR() { M_PatientRecordBLL bll = new M_PatientRecordBLL(); string AuditCPR = Request.Form["AuditCPR"].ToString(); M_PatientRecordCPR info = new M_PatientRecordCPR(); info = JsonHelper.GetJsonInfoBy <M_PatientRecordCPR>(AuditCPR); bool save = false; if (info != null) { try { save = bll.UpdateAuditCPR(info);//修改病历审核 } catch { save = false; } } return(save); }
public ActionResult GetPatientRecordRescue() { try { //string taskCode, int patientOrder, int pageSize, int pageIndex string taskCode = Request.Form["TaskCode"].ToString(); int patientOrder = int.Parse(Request.Form["PatientOrder"]); //获取页容量 int pageSize = int.Parse(Request.Form["rows"]); //获取请求的页码 int pageIndex = int.Parse(Request.Form["page"]); M_PatientRecordBLL bll = new M_PatientRecordBLL(); int total = 0; List <M_PatientRecordRescue> list = bll.GetPRRescueList(pageIndex, pageSize, ref total, taskCode, patientOrder); return(Json(new { total = total, rows = list }, "appliction/json", JsonRequestBehavior.AllowGet)); } catch (Exception ex) { LogUtility.Error("PRRescueController/GetPatientRecordRescue()", ex.ToString()); return(this.Json("")); } }
public bool DelectPatient() { bool save = false; try { M_PatientRecordBLL bll = new M_PatientRecordBLL(); string TaskCode = Request.Form["TaskCode"].ToString(); int PatientOrder = Convert.ToInt32(Request.Form["PatientOrder"]); if (TaskCode != null) { save = bll.Delete(TaskCode, PatientOrder); } } catch { save = false; } return save; }
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); }
public bool SavePatient() { string state = ""; M_PatientRecordBLL bll = new M_PatientRecordBLL(); M_PatientRecord info = null; //病历主表信息 M_PatientRecordAppend pra = null; //病历附表 M_PatientRecordCPR prCPR = null; //病历附表--心肺复苏 List <M_PatientRecordDiag> prDiag = null; //病历子表--初步印象 List <M_PatientRecordECGImpressions> prECG = null; //病历子表--心电图印象 string PatientRecord = Request.Form["PatientRecord"].ToString(); M_AddPatientRecord add = new M_AddPatientRecord(); add = JsonHelper.GetJsonInfoBy <M_AddPatientRecord>(PatientRecord); if (add != null) { string TaskCode = add.TaskCode; int PatientOrder = add.PatientOrder; state = add.state; info = add.info; //病历主表信息 pra = add.pra; //病历附表 prCPR = add.prCPR; //病历附表--心肺复苏 if (add.prDiag.Count > 0) { prDiag = add.prDiag; } //病历子表--初步印象 else { prDiag = null; } //病历子表--初步印象 if (add.prECG.Count > 0) { prECG = add.prECG; } //病历子表--心电图印象 else { prECG = null; } //病历子表--心电图印象 } bool save = false; if (info != null) { try { if (state == "new") { save = bll.Insert(info, pra, prCPR, prDiag, prECG);//新增病历主表、附表、子表 } else if (state == "edit") { save = bll.Update(info, pra, prCPR, prDiag, prECG);//修改病历主表、附表、子表 } } catch (Exception e) { save = false; } } return(save); }
/// <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)); }
public bool SavePatient() { string state = ""; M_PatientRecordBLL bll = new M_PatientRecordBLL(); M_PatientRecord info = null;//病历主表信息 M_PatientRecordAppend pra = null;//病历附表 M_PatientRecordCPR prCPR = null;//病历附表--心肺复苏 List<M_PatientRecordDiag> prDiag = null;//病历子表--初步印象 List<M_PatientRecordECGImpressions> prECG = null;//病历子表--心电图印象 string PatientRecord = Request.Form["PatientRecord"].ToString(); M_AddPatientRecord add = new M_AddPatientRecord(); add = JsonHelper.GetJsonInfoBy<M_AddPatientRecord>(PatientRecord); if (add != null) { string TaskCode = add.TaskCode; int PatientOrder = add.PatientOrder; state = add.state; info = add.info;//病历主表信息 pra = add.pra;//病历附表 prCPR = add.prCPR;//病历附表--心肺复苏 if (add.prDiag.Count > 0) { prDiag = add.prDiag; }//病历子表--初步印象 else { prDiag = null; }//病历子表--初步印象 if (add.prECG.Count > 0) { prECG = add.prECG; }//病历子表--心电图印象 else { prECG = null; }//病历子表--心电图印象 } bool save = false; if (info != null) { try { if (state == "new") { save = bll.Insert(info, pra, prCPR, prDiag, prECG);//新增病历主表、附表、子表 } else if (state == "edit") { save = bll.Update(info, pra, prCPR, prDiag, prECG);//修改病历主表、附表、子表 } } catch (Exception e) { save = false; } } return save; }
public bool SavePRRescue() { string state = ""; M_PatientRecordBLL bll = new M_PatientRecordBLL(); M_PatientRecordRescue prRescue = null; //救治记录主表信息 List <M_PatientRecordMeasure> prMeasure = null; //救治记录--救治措施 List <M_PatientRecordDrug> prDrug = null; //救治记录--药品 List <M_PatientRecordSanitation> prSanitation = null; //救治记录--耗材 List <M_PatientRecordLossDrug> prLossDrug = null; //救治记录--损耗药品 List <M_PatientRecordLossSanitation> prLossSanitation = null; //救治记录--损耗耗材 string PRRescue = Request.Form["PRRescue"].ToString(); M_AddPatientRecordRescue add = new M_AddPatientRecordRescue(); add = JsonHelper.GetJsonInfoBy <M_AddPatientRecordRescue>(PRRescue); if (add != null) { string TaskCode = add.TaskCode; int PatientOrder = add.PatientOrder; state = add.state; prRescue = add.prRescue;//救治记录主表信息 if (add.prMeasure.Count > 0) { prMeasure = add.prMeasure;//救治记录--救治措施 } else { prMeasure = null; } if (add.prDrug.Count > 0) { prDrug = add.prDrug;//救治记录--药品 } else { prDrug = null; } if (add.prSanitation.Count > 0) { prSanitation = add.prSanitation;//救治记录--耗材 } else { prSanitation = null; } if (add.prLossDrug.Count > 0) { prLossDrug = add.prLossDrug;//救治记录--损耗药品 } else { prLossDrug = null; } if (add.prLossSanitation.Count > 0) { prLossSanitation = add.prLossSanitation;//救治记录--损耗耗材 } else { prLossSanitation = null; } } bool save = false; if (prRescue != null) { try { if (state == "new") { save = bll.InsertPRRescue(prRescue, prMeasure, prDrug, prSanitation, prLossDrug, prLossSanitation);//新增救治记录主表、子表 } else if (state == "edit") { save = bll.UpdatePRRescue(prRescue, prMeasure, prDrug, prSanitation, prLossDrug, prLossSanitation);//修改救治记录主表、子表 } } catch { save = false; } } return(save); }
/// <summary> /// 根据任务编码获取病历信息 /// </summary> /// <param name="taskCode"></param> /// <returns></returns> public ActionResult GetPatientCommonByTask(string taskCode) { try { M_PatientRecordBLL m_PateintRecord = new M_PatientRecordBLL(); List<M_PatientRecord> list = m_PateintRecord.GetPatientCommonByTask(taskCode); if (list != null) { return this.Json(new { total = list.Count, rows = list }, "appliction/json", JsonRequestBehavior.AllowGet); } else { return this.Json(new { total = 0, rows = 0 }, "appliction/json", JsonRequestBehavior.AllowGet); } } catch { //Dictionary<string, string> dict = new Dictionary<string, string>(); //dict.Add("InfoID", "0"); //dict.Add("InfoMessage", ex.Message); return this.Json(""); } }
//获取病历信息 public void GetPatientRecordInfo(string TaskCode, string WorkID, out M_PatientRecord info, out M_PatientRecordAppend pra, out M_PatientRecordCPR prCPR) { M_PatientRecordBLL prBLL = new M_PatientRecordBLL(); M_AttemperData result = prBLL.GetAttemperData(TaskCode, ""); //根据任务编码获取调度信息 info = new M_PatientRecord(); //病历主表信息 info.TaskCode = TaskCode; info.PatientOrder = 1; info.CallOrder = result.CallOrder; info.Name = result.Name; info.Sex = result.Sex; info.AgeType = "岁"; info.ForHelpTelephone = result.ForHelpPhone; info.ContactTelephone = result.ContactTelephone; info.PatientVersion = result.AlarmType; info.OriginalTaskType = result.AlarmType; info.ForArea = result.Area; info.LocalAddress = result.LocalAddress; info.OutStationCode = result.StationCode; info.Station = result.Station; info.SendAddress = result.SendAddress; info.DrivingTime = result.DrivingTime; info.ArriveSceneTime = result.ArriveSceneTime; info.LeaveSceneTime = result.LeaveSceneTime; info.ArriveDestinationTime = result.ArriveDestinationTime; info.Driver = result.Driver; info.StretcherBearersI = result.StretcherBearers; info.DoctorAndNurse = result.Doctor + result.Nurse; P_UserBLL bll = new P_UserBLL(); P_User user = bll.GetListBy(u => u.WorkCode == WorkID).Select(u => u.ToExtModle()).FirstOrDefault(); //查找用户名 密码 info.AgentCode = user.ID.ToString(); info.AgentWorkID = WorkID; info.AgentName = user.Name; info.BeginFillPatientTime = DateTime.Now; info.MedicalRecordGenerationTime = DateTime.Now; info.FormCompleteLogo = false; //obj.FormCompleteTime = null; info.ChargeOrder = 0; info.SubCenterIFSpotChecks = false; info.CenterIFSpotChecks = false; info.SubmitLogo = false; info.SubmitTime = null; info.MedicalStateCode = 0; info.LastUpdatePerson = user.Name; //填写病历的人员 info.LastUpdateTime = DateTime.Now; info.CPRIFSuccess = ""; //心肺复苏选择 info.IFRefuseTreatment = "治疗记录"; //是否拒绝治疗(救治记录) info.RescueType = ""; //抢救类型(救治记录) info.IMEI = "PAD"; //从PAD填写 pra = new M_PatientRecordAppend();// pra.TaskCode = TaskCode; pra.PatientOrder = 1; prCPR = new M_PatientRecordCPR();// prCPR.TaskCode = TaskCode; prCPR.PatientOrder = 1; prCPR.CenterIFAuditForXFFS = false; }
public ActionResult SavePatientCharge() { string chargeStr = Request.Form["charge"].ToString(); M_PatientCharge charge = JsonHelper.GetJsonInfoBy<M_PatientCharge>(chargeStr); if (charge == null) return Json(new { result = "ERROR", msg = "解析实体为空!" }, "appliction/json", JsonRequestBehavior.AllowGet); M_PatientCharge info = new M_PatientChargeBLL().GetListBy(pc => pc.TaskCode.Equals(charge.TaskCode) && pc.PatientOrder == 1).FirstOrDefault(); if (info != null) { if (new M_PatientChargeBLL().Del(info) <= 0) // 删除旧收费信息 { return Json(new { result = "ERROR", msg = "删除旧收费信息失败!" }, "appliction/json", JsonRequestBehavior.AllowGet); } } //查询是否已经填写病历 M_PatientRecord prinfo = new M_PatientRecordBLL().GetListBy(pr => pr.TaskCode.Equals(charge.TaskCode) && pr.PatientOrder == 1).FirstOrDefault(); if (prinfo == null) { M_PatientRecordBLL bll = new M_PatientRecordBLL(); M_PatientRecord pinfo = null;//病历主表信息 M_PatientRecordAppend pra = null;//病历附表 M_PatientRecordCPR prCPR = null;//病历附表--心肺复苏 List<M_PatientRecordDiag> prDiag = null;//病历子表--初步印象 List<M_PatientRecordECGImpressions> prECG = null;//病历子表--心电图印象 GetPatientRecordInfo(charge.TaskCode,charge.ChargePerson, out pinfo, out pra, out prCPR); bll.Insert(pinfo, pra, prCPR, prDiag, prECG);//新增病历主表、附表、子表 } charge.PatientOrder = 1; //收费序号目前永远为1 if (new M_PatientChargeBLL().Add(charge) > 0) return Json(new { result = "OK", msg = "收费成功!" }, "appliction/json", JsonRequestBehavior.AllowGet); else return Json(new { result = "ERROR", msg = "收费失败!" }, "appliction/json", JsonRequestBehavior.AllowGet); }
public bool SaveAuditCPR() { M_PatientRecordBLL bll = new M_PatientRecordBLL(); string AuditCPR = Request.Form["AuditCPR"].ToString(); M_PatientRecordCPR info = new M_PatientRecordCPR(); info = JsonHelper.GetJsonInfoBy<M_PatientRecordCPR>(AuditCPR); bool save = false; if (info != null) { try { save = bll.UpdateAuditCPR(info);//修改病历审核 } catch { save = false; } } return save; }
public bool SaveSpotChecks() { M_PatientRecordBLL bll = new M_PatientRecordBLL(); string SpotChecks = Request.Form["SpotChecks"].ToString(); int orderNumber = int.Parse(Request.Form["orderNumber"]); M_PatientRecord info = new M_PatientRecord(); info = JsonHelper.GetJsonInfoBy<M_PatientRecord>(SpotChecks); bool save = false; if (info != null) { try { save = bll.UpdateSpotChecks(info, orderNumber);//修改病历抽查 } catch { save = false; } } return save; }
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(""); } }
public ActionResult GetAllTemplate(string TemplateName) { try { M_PatientRecordBLL bll = new M_PatientRecordBLL(); var result = bll.GetAllTemplate(TemplateName); return Json(result); } catch (Exception e) { //Dictionary<string, string> dict = new Dictionary<string, string>(); //dict.Add("InfoID", "0"); //dict.Add("InfoMessage", e.Message); return this.Json(""); } }
public bool SaveFollowUp() { M_PatientRecordBLL bll = new M_PatientRecordBLL(); string TaskCode = Request.Form["TaskCode"].ToString(); int PatientOrder = int.Parse(Request.Form["PatientOrder"]); string DoctorFollowUp = Request.Form["DoctorFollowUp"].ToString(); bool save = false; if (TaskCode != null) { try { save = bll.UpdateFollowUp(TaskCode,PatientOrder,DoctorFollowUp);//修改医生回访 } catch { save = false; } } return save; }