123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214 |
- using PMS.BusinessModels.Account;
- using PMS.BusinessModels.SmartForm;
- using PMS.EntityModels.MedicalRecordManager;
- using PMS.EntityModels.SmartForm;
- using PMS.Interface;
- using PMS.Interface.MedicalRecordManager;
- using PMS.Interface.SmartForm;
- using QWPlatform.SystemLibrary.Utils;
- using System.Collections.Generic;
- using System.Data;
- using System.Web.Helpers;
- using System.Web.Mvc;
- namespace PMS.WebUI.Controllers
- {
- /// <summary>
- /// 病历原型
- /// </summary>
- public class MedicalRecordManagerController : BaseController
- {
- /// <summary>
- /// 实例接口
- /// </summary>
- IMedicalRecord MedicalRecord = InterfaceFactory.CreateBusinessInstance<IMedicalRecord>();
- // GET: MedicalRecord
- public ActionResult MedicalRecordIndex()
- {
- return View();
- }
- public ActionResult Preview()
- {
- return View();
- }
-
- /// <summary>
- /// 新增分类
- /// </summary>
- /// <returns></returns>
- public ActionResult AddClass()
- {
- return View();
- }
- /// <summary>
- /// 新增修改分类
- /// </summary>
- /// <param name="model"></param>
- /// <returns></returns>
- public ActionResult AddUpdateCategory(BLYXFL model)
- {
- var user = GetCurrentUser();
- model.渠道ID = user.CompanyID;
- model.登记人ID = user.PersonID;
- model.登记人 = user.Name;
- var r = MedicalRecord.AddCategory(model.type, model);
- if (r)
- {//保存成功
- return this.ResponseJson(System.Net.HttpStatusCode.OK, "操作成功");
- }
- else
- {//保存失败
- return this.ResponseJson(System.Net.HttpStatusCode.InternalServerError, "操作失败");
- }
- }
- /// <summary>
- /// 删除分类
- /// </summary>
- /// <param name="model"></param>
- /// <returns></returns>
- public ActionResult DelCategory(BLYXFL model)
- {
- var msg = "";
- var r = MedicalRecord.DelCategory(model, ref msg);
- if (r)
- {//保存成功
- return this.ResponseJson(System.Net.HttpStatusCode.OK, "操作成功");
- }
- else
- {//保存失败
- return this.ResponseJson(System.Net.HttpStatusCode.InternalServerError, msg);
- }
- }
- /// <summary>
- /// 查询分类
- /// </summary>
- /// <param name="model"></param>
- /// <returns></returns>
- [HttpPost]
- public ActionResult GetCategory(DTOPrototypeCassModel model)
- {
- var user = GetCurrentUser();
- model.渠道ID = user.CompanyID;
- model.登记人ID = user.PersonID;
- var list = MedicalRecord.GetCategory(model);
- var json = Strings.ObjectToJson(list);
- return Content(json, "application/json");
- }
- /// <summary>
- /// 查询字典表
- /// </summary>
- /// <param name="ID"></param>
- /// <returns></returns>
- public ActionResult SelectNature(string ID)
- {
- var list = account_obj.SelectNature(ID);
- var json = Strings.ObjectToJson(list);
- return Content(json, "application/json");
- }
-
- /// <summary>
- /// 查询原型
- /// </summary>
- /// <param name="model"></param>
- /// <returns></returns>
- public string PrototypeRecordSelect(DTOPrototypeRecordModel model)
- {
- var total = 0;
- var user = GetCurrentUser();
- model.渠道ID = user.CompanyID;
- model.登记人ID = user.PersonID;
- var dt = MedicalRecord.PrototypeRecordSelect(model, out total);
- return Strings.ObjectToJson(
- new { total = total, rows = dt });
- }
- /// <summary>
- /// 查询单个记录
- /// </summary>
- /// <param name="ID"></param>
- /// <returns></returns>
- [HttpPost]
- public ActionResult PrototypeIndividualRecord(string ID)
- {
- var dt = MedicalRecord.PrototypeIndividualRecord(ID);
- var json= Strings.ObjectToJson(dt);
- return Content(json, "application/json");
-
- }
- public ActionResult MedicalRecordStatistics()
- {
- return View();
- }
- /// <summary>
- /// 添加过程记录
- /// </summary>
- /// <returns></returns>
- public ActionResult AddComment()
- {
- return View();
- }
-
- /// <summary>
- /// 设置状态
- /// </summary>
- /// <param name="type">1状态状态,2审核操作</param>
- /// <param name="id"></param>
- /// <param name="state"></param>
- /// <returns></returns>
- public ActionResult UpdateSate(int type, string id, int state)
- {
- var user = GetCurrentUser();
- var SHR = user.Name;
- var SHRID = user.PersonID;
- var r = MedicalRecord.UpdateSate(type, id, state,SHR,SHRID);
- if (r)
- {//保存成功
- return this.ResponseJson(System.Net.HttpStatusCode.OK, "操作成功");
- }
- else
- {//保存失败
- return this.ResponseJson(System.Net.HttpStatusCode.InternalServerError, "操作失败");
- }
- }
- /// <summary>
- /// 根据病历原型ID获取过程记录
- /// </summary>
- /// <param name="ID"></param>
- /// <returns></returns>
- public ActionResult GetProcessRecords(string ID)
- {
- var dt = MedicalRecord.GetProcessRecords(ID);
- var json = Strings.ObjectToJson(dt);
- return Content(json, "application/json");
- }
- /// <summary>
- /// 添加过程记录
- /// </summary>
- /// <param name="model"></param>
- /// <returns></returns>
- public ActionResult AddProcessRecords(DTOProcessRecordsModel model)
- {
- var user = GetCurrentUser();
- model.评论人ID = user.PersonID;
- model.评论人 = user.Name;
- var r = MedicalRecord.AddProcessRecords(model);
- if (r)
- {//保存成功
- return this.ResponseJson(System.Net.HttpStatusCode.OK, "操作成功");
- }
- else
- {//保存失败
- return this.ResponseJson(System.Net.HttpStatusCode.InternalServerError, "操作失败");
- }
- }
- }
- }
|