//个人信息(不可编辑) public ActionResult PatientDetailInfo(string PatientId, string Category) { //PatientId = "P4444"; if (PatientId == null) { PatientId = Session["PatientId"] as String; } else { Session["PatientId"] = PatientId; } PatientDetailInfoViewModel pbiModel = new PatientDetailInfoViewModel(); pbiModel.UserId = PatientId; List<ModuleInfo> ModuleInfo = new List<Models.ModuleInfo>(); DataSet ModulesInfo = _ServicesSoapClient.GetModulesBoughtByPId(PatientId); foreach (DataTable item in ModulesInfo.Tables) { foreach (DataRow row in item.Rows) { ModuleInfo NewLine = new Models.ModuleInfo(); NewLine.Category = row[0].ToString(); NewLine.ModuleName = row[1].ToString(); ModuleInfo.Add(NewLine); } } pbiModel.ModuleBoughtInfo = ModuleInfo; pbiModel.ModuleDetailList = PDCHPFunctions.GetPatientDetailInfo(_ServicesSoapClient, PatientId, Category); return View(pbiModel); }
public ActionResult PatientDetailInfoEdit(PatientDetailInfoViewModel ei, FormCollection formCollection) { var user = Session["CurrentUser"] as UserAndRole; string PatientId = ei.UserId; bool flag = false; DataSet set = _ServicesSoapClient.GetPatBasicInfoDtlList(PatientId); //获取关注的详细信息 if (set.Tables.Count > 0) { foreach (DataTable ta in set.Tables) { foreach (System.Data.DataRow row in ta.Rows) { if ((row[3].ToString() != "InvalidFlag") && (row[3].ToString() != "Doctor") && (row[4].ToString() != "伴随疾病")) { string CategoryCode = row[1].ToString(); //主键 string ItemCode = row[3].ToString(); //主键 int ItemSeq = Convert.ToInt32(row[10]); //主键 string Description = row[9].ToString(); int SortNo = Convert.ToInt32(row[10]); string Value = Request.Form[row[3].ToString()]; //只更改了Value //插入数据 flag = _ServicesSoapClient.SetPatBasicInfoDetail(PatientId, CategoryCode, ItemCode, ItemSeq, Value, Description, SortNo, user.UserId, user.TerminalName, user.TerminalIP, user.DeviceType); if (flag == false) { break; } } } } } //flag为TRUE即全部插成功,FALSE不知道哪里断掉。。。 if (flag == true) { return RedirectToAction("PatientDetailInfo", "PatientInfo", new { PatientId = ei.UserId }); //成功跳转至详细 //return Content("ok"); } else { //return Content("<script >alert('提交失败!');</script >", "text/html"); Response.Write("<script>alert('部分插入失败');</script>"); //失败返回编辑,提示失败 return View(ei); //return Content("fai"); } }
//个人信息(可编辑) public ActionResult PatientDetailInfoEdit(string PatientId) { var user = Session["CurrentUser"] as UserAndRole; string DoctorId = user.UserId; PatientDetailInfoViewModel pbiModel = new PatientDetailInfoViewModel(); pbiModel.PatientDetailInfo = PDCHPFunctions.GetPatientDetailInfoEdit(_ServicesSoapClient, PatientId, DoctorId); pbiModel.UserId = PatientId; return View(pbiModel); }
//个人信息(不可编辑) public ActionResult PatientDetailInfo(string PatientId) { //PatientId = "P4444"; if (PatientId == null) { PatientId = Session["PatientId"] as String; } else { Session["PatientId"] = PatientId; } PatientDetailInfoViewModel pbiModel = new PatientDetailInfoViewModel(); pbiModel.UserId = PatientId; pbiModel.PatientDetailInfo = PDCHPFunctions.GetPatientDetailInfo(_ServicesSoapClient, PatientId); return View(pbiModel); }
public ActionResult EditCancel(PatientDetailInfoViewModel ei, FormCollection formCollection) { string PatientId = ei.UserId; return RedirectToAction("PatientDetailInfo", "PatientInfo", new { PatientId = ei.UserId }); //跳转至详细 }
// GET: /PatientInfo/ //首页-基本信息和tab //public ActionResult Index(string UserId) //{ // //UserId = "P4444"; // _PatientId = UserId; // ServiceReference.PatientBasicInfo zn = _ServicesSoapClient.GetPatBasicInfo(UserId); //获取基本信息 // PatientBasicInfoViewModel ei = new PatientBasicInfoViewModel(); // ei.PatientBasicInfo.UserId = zn.UserId; // ei.PatientBasicInfo.UserName = zn.UserName; // ei.PatientBasicInfo.Gender = zn.Gender; // ei.PatientBasicInfo.Age = Convert.ToInt32(zn.Age); // ei.PatientBasicInfo.BloodType = zn.BloodType; // ei.PatientBasicInfo.Module = zn.Module; // ei.PatientBasicInfo.AlertNumber = _ServicesSoapClient.GetUntreatedAlertAmount(UserId); //获取警报数 // //CDMIS.Models.PatientBasicInfo zz = new CDMIS.Models.PatientBasicInfo(); // //ei.UserId= zn.UserId; // //ei.UserName=zn.UserName; // //ei.Gender=zn.Gender; // //ei.Age=zn.Age; // //ei.BloodType=zn.BloodType; // //ei.Module=zn.Module; // //ei.AlertNumber=_ServicesSoapClient.GetUntreatedAlertAmount(UserId); // return View(ei); //} //public ActionResult PatientBasicInfo() //{ // //UserId = "P4444"; // var user = Session["CurrentUser"] as UserAndRole; // _PatientId = user.UserId; // ServiceReference.PatientBasicInfo zn = _ServicesSoapClient.GetPatBasicInfo(_PatientId); //获取基本信息 // PatientBasicInfoViewModel ei = new PatientBasicInfoViewModel(); // ei.PatientBasicInfo.UserId = zn.UserId; // ei.PatientBasicInfo.UserName = zn.UserName; // ei.PatientBasicInfo.Gender = zn.GenderText; // ei.PatientBasicInfo.Age = Convert.ToInt32(zn.Age); // ei.PatientBasicInfo.BloodType = zn.BloodTypeText; // ei.PatientBasicInfo.Module = zn.Module; // ei.PatientBasicInfo.AlertNumber = _ServicesSoapClient.GetUntreatedAlertAmount(_PatientId); //获取警报数 // //CDMIS.Models.PatientBasicInfo zz = new CDMIS.Models.PatientBasicInfo(); // //ei.UserId= zn.UserId; // //ei.UserName=zn.UserName; // //ei.Gender=zn.Gender; // //ei.Age=zn.Age; // //ei.BloodType=zn.BloodType; // //ei.Module=zn.Module; // //ei.AlertNumber=_ServicesSoapClient.GetUntreatedAlertAmount(UserId); // return View(ei); //} #region 详细信息 //个人信息(不可编辑) public ActionResult PatientDetailInfo(string UserId, string Category) { //UserId = "P4444"; if (UserId == null) { var user = Session["CurrentUser"] as UserAndRole; UserId = user.UserId; } PatientDetailInfoViewModel pbiModel = new PatientDetailInfoViewModel(); pbiModel.UserId = UserId; List<ModuleInfo> ModuleInfo = new List<Models.ModuleInfo>(); DataSet ModulesInfo = _ServicesSoapClient.GetModulesBoughtByPId(UserId); foreach (DataTable item in ModulesInfo.Tables) { foreach (DataRow row in item.Rows) { if (Convert.ToInt32(row[0].ToString().Substring(1)) < 4) { ModuleInfo NewLine = new Models.ModuleInfo(); NewLine.Category = row[0].ToString(); NewLine.ModuleName = row[1].ToString(); ModuleInfo.Add(NewLine); } } } pbiModel.ModuleBoughtInfo = ModuleInfo; pbiModel.ModuleDetailList = PDCHPFunctions.GetPatientDetailInfo(_ServicesSoapClient, UserId, Category); return View(pbiModel); }
public ActionResult EditCancel(PatientDetailInfoViewModel ei) { //string PatientId = ei.UserId; return RedirectToAction("PatientDetailInfo", "PatientHome", new { UserId = ei.UserId }); //跳转至详细 }
//个人信息(可编辑) public ActionResult PatientDetailInfoEdit(string UserId) { PatientDetailInfoViewModel ei = new PatientDetailInfoViewModel(); ei.UserId = UserId; ei.PatientDetailInfo = PDCHPFunctions.GetPatientDetailInfoEdit(_ServicesSoapClient, UserId, UserId); return View(ei); }
public ActionResult PatientDetailInfo(PatientDetailInfoViewModel model) { var user = Session["CurrentUser"] as UserAndRole; string Category = Request.Form["ModuleDetailList[0].CategoryCode"]; List<ModuleInfo> ModuleInfo = new List<Models.ModuleInfo>(); DataSet ModulesInfo = _ServicesSoapClient.GetModulesBoughtByPId(model.UserId); foreach (DataTable item in ModulesInfo.Tables) { foreach (DataRow row in item.Rows) { ModuleInfo NewLine = new Models.ModuleInfo(); NewLine.Category = row[0].ToString(); NewLine.ModuleName = row[1].ToString(); ModuleInfo.Add(NewLine); } } model.ModuleBoughtInfo = ModuleInfo; List<PatientDetailInfo> ItemInfo = PDCHPFunctions.GetPatientDetailInfo(_ServicesSoapClient, model.UserId, Category); bool flag = false; foreach (PatientDetailInfo Row in ItemInfo) { if ((Row.ItemCode != "InvalidFlag") && (Row.ItemCode != "Doctor")) { string CategoryCode = "M"; //主键 string Value = Request.Form[Row.ItemCode]; //只更改了Value if (Row.ControlType != "7") { flag = _ServicesSoapClient.SetPatBasicInfoDetail(model.UserId, CategoryCode, Row.ItemCode, Row.ItemSeq, Value, Row.Description, Row.ItemSeq, user.UserId, user.TerminalName, user.TerminalIP, user.DeviceType); } if (flag == false) { break; } } } model.ModuleDetailList = PDCHPFunctions.GetPatientDetailInfo(_ServicesSoapClient, model.UserId, Category); return View(model); }
//个人信息(不可编辑) public ActionResult PatientDetailInfo(string UserId) { //UserId = "P4444"; if (UserId == null) { var user = Session["CurrentUser"] as UserAndRole; UserId = user.UserId; } PatientDetailInfoViewModel ei = new PatientDetailInfoViewModel(); ei.UserId = UserId; ei.PatientDetailInfo = PDCHPFunctions.GetPatientDetailInfo(_ServicesSoapClient, UserId); return View(ei); }