diff --git a/LICENSE b/LICENSE index 0227962c16c32b2f963b66836daaee7b1311e329..7ad5243bcea94044b8a2a29f7759c0955d320391 100644 --- a/LICENSE +++ b/LICENSE @@ -632,7 +632,7 @@ state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. - Copyright 2022-2024 武汉新致数字科技有限公司 + Copyright 2022-2025 湖北天天数链技术有限公司 This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -652,7 +652,7 @@ Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: - OpenHis Copyright (C) 2022-2024 武汉新致数字科技有限公司 + OpenHis Copyright (C) 2022-2025 湖北天天数链技术有限公司 This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. diff --git a/Newtouch.HIS.Base/Newtouch.HIS.Base.HOSP/Controllers/Settlement/ChargeCategoryController.cs b/Newtouch.HIS.Base/Newtouch.HIS.Base.HOSP/Controllers/Settlement/ChargeCategoryController.cs index 6cd8a01b8d1ec7daaa76054a06b2c716afb1a4fc..fc85ee38f41c28e38a29357e72a6f24bb8c9953a 100644 --- a/Newtouch.HIS.Base/Newtouch.HIS.Base.HOSP/Controllers/Settlement/ChargeCategoryController.cs +++ b/Newtouch.HIS.Base/Newtouch.HIS.Base.HOSP/Controllers/Settlement/ChargeCategoryController.cs @@ -93,12 +93,12 @@ namespace Newtouch.HIS.Base.HOSP.Controllers /// /// /// - public ActionResult GetTreeGridJson(string organizeId, string keyword) + public ActionResult GetTreeGridJson(string organizeId, string zt,string keyword) { if (!organizeId.Equals("*")) { //非基础数据 - var data = _SysChargeCategoryRepo.GetList(organizeId); + var data = _SysChargeCategoryRepo.GetList(organizeId,zt); if (!string.IsNullOrEmpty(keyword)) { data = data.ToList().TreeWhereForKeyInt(t => t.dlmc.Contains(keyword), keyValue: "dlId", @@ -217,6 +217,28 @@ namespace Newtouch.HIS.Base.HOSP.Controllers } return Success("操作成功。"); } + /// + /// 修改状态 + /// + /// + /// + /// + public ActionResult UpdateZt(int dlId,string zt,string organizeId, int? keyValue) + { + if ("*".Equals(organizeId)) + { + var entity = _SysChargeCategoryBaseRepo.FindEntity(val => val.dlId == dlId); + entity.zt = zt; + _SysChargeCategoryBaseRepo.Update(entity); + } + else + { + var entity = _SysChargeCategoryRepo.FindEntity(val => val.dlId == dlId); + entity.zt = zt; + _SysChargeCategoryRepo.Update(entity); + } + return Success("操作成功。"); + } } } \ No newline at end of file diff --git a/Newtouch.HIS.Base/Newtouch.HIS.Base.HOSP/Controllers/Settlement/SysChargeItemController.cs b/Newtouch.HIS.Base/Newtouch.HIS.Base.HOSP/Controllers/Settlement/SysChargeItemController.cs index 3dc2328eb5557b54af1b9d8d29c925ca71881dc3..5e52aee72eb0dfaa2cf74634f75a0f9f92146292 100644 --- a/Newtouch.HIS.Base/Newtouch.HIS.Base.HOSP/Controllers/Settlement/SysChargeItemController.cs +++ b/Newtouch.HIS.Base/Newtouch.HIS.Base.HOSP/Controllers/Settlement/SysChargeItemController.cs @@ -1,4 +1,5 @@ -using Newtouch.Core.Common.Exceptions; +using System; +using Newtouch.Core.Common.Exceptions; using Newtouch.Core.Common; using Newtouch.HIS.Domain.Entity; using Newtouch.HIS.Domain.IDomainServices; @@ -41,7 +42,7 @@ namespace Newtouch.HIS.Base.HOSP.Controllers /// /// /// - public ActionResult GetGridJson(Pagination pagination, string organizeId, string keyword,string sfdl) + public ActionResult GetGridJson(Pagination pagination, string organizeId, string keyword,string sfdl,string zt) { pagination.sidx = "CreateTime desc"; pagination.sord = "asc"; @@ -58,7 +59,7 @@ namespace Newtouch.HIS.Base.HOSP.Controllers if ("*".Equals(organizeId)) { - var list = _sysChargeItemDmnService.GetPagintionList(organizeId, pagination, sfdl, keyword); + var list = _sysChargeItemDmnService.GetPagintionList(organizeId, pagination, sfdl, zt,keyword); var data = new { rows = list, @@ -71,7 +72,7 @@ namespace Newtouch.HIS.Base.HOSP.Controllers } else { - var list = _sysChargeItemDmnService.GetPagintionList(organizeId, pagination, sfdl, keyword); + var list = _sysChargeItemDmnService.GetPagintionList(organizeId, pagination, sfdl, zt,keyword); var data = new { rows = list, @@ -126,6 +127,36 @@ namespace Newtouch.HIS.Base.HOSP.Controllers return Success("操作成功。"); } + + public ActionResult UpdateZt(int sfxmId,string zt,string organizeId) + { + + if (string.IsNullOrWhiteSpace(OrganizeId) && !"*".Equals( organizeId)) + { + throw new FailedException("请选择组织机构"); + } + else if (!_SysOrganizeDmnService.IsMedicalOrganize(OrganizeId)&& !"*".Equals(organizeId)) + { + throw new FailedException("请选择医疗机构(医院或诊所)"); + } + if ("*".Equals( organizeId)) + { + var entity = _sysChargeItemBaseRepo.FindEntity(p => p.sfxmId == sfxmId); + entity.zt= zt; + entity.LastModifyTime = DateTime.Now; + _sysChargeItemBaseRepo.Update(entity.ToJson().ToObject()); + } + else + { + var entity = _sysChargeItemRepo.FindEntity(p => p.sfxmId == sfxmId); + entity.zt= zt; + entity.LastModifyTime = DateTime.Now; + _sysChargeItemRepo.Update(entity); + } + return Success("操作成功。"); + } + + /// /// 收费项目同步医保 /// diff --git a/Newtouch.HIS.Base/Newtouch.HIS.Base.HOSP/Newtouch.HIS.Base.HOSP.csproj b/Newtouch.HIS.Base/Newtouch.HIS.Base.HOSP/Newtouch.HIS.Base.HOSP.csproj index 04f932948e2b6e8225aeaf178911d1037754c0f2..061c25ca991711412d7f0fa15404ffab358b957a 100644 --- a/Newtouch.HIS.Base/Newtouch.HIS.Base.HOSP/Newtouch.HIS.Base.HOSP.csproj +++ b/Newtouch.HIS.Base/Newtouch.HIS.Base.HOSP/Newtouch.HIS.Base.HOSP.csproj @@ -286,8 +286,10 @@ - + + + diff --git a/Newtouch.HIS.Base/Newtouch.HIS.Base.HOSP/Views/ChargeCategory/Index.cshtml b/Newtouch.HIS.Base/Newtouch.HIS.Base.HOSP/Views/ChargeCategory/Index.cshtml index 456552062e1fc9357391fda7360af2920bfeebf3..cb6f5c85ac4e3c93ac13d072a1b2362363f3e07e 100644 --- a/Newtouch.HIS.Base/Newtouch.HIS.Base.HOSP/Views/ChargeCategory/Index.cshtml +++ b/Newtouch.HIS.Base/Newtouch.HIS.Base.HOSP/Views/ChargeCategory/Index.cshtml @@ -25,6 +25,15 @@ + 有效状态: + + + + @@ -44,7 +53,7 @@ treeGrid: true, treeGridModel: "adjacency", ExpandColumn: "dlCode", - postData: { keyword: $("#txt_keyword").val(), organizeId: $("#OrganizeId").val() }, + postData: { keyword: $("#txt_keyword").val(), organizeId: $("#OrganizeId").val(),zt: $("#yxzt").val() }, url: "/ChargeCategory/GetTreeGridJson", height: $(window).height() - 128, colModel: [ @@ -91,7 +100,12 @@ } }}, - { label: "有效", name: "zt", width: 80, align: "left", formatter: function (cellvalue) { return cellvalue == "1" ? "" : ""; } }, + { label: "有效", name: "zt", width: 80, align: "left", + formatter: function (cellvalue, options, rowObject) { + return cellvalue == "1" + ? `` + : ``; + } }, { label: '创建人', name: 'CreatorCode', width: 100, align: 'left' }, { label: '创建时间', name: 'CreateTime', width: 100, align: 'left', formatter: "date", formatoptions: { srcformat: 'Y-m-d', newformat: 'Y-m-d' } }, { label: '最后修改', name: 'LastModifierCode', width: 100, align: 'left' }, @@ -101,7 +115,7 @@ }); $("#btn_search").click(function () { $("#gridList").jqGrid('setGridParam', { - postData: { keyword: $("#txt_keyword").val(), organizeId: $("#OrganizeId").val() }, + postData: { keyword: $("#txt_keyword").val(), organizeId: $("#OrganizeId").val() ,zt: $("#yxzt").val()}, }).trigger('reloadGrid'); }); } @@ -146,6 +160,24 @@ } }); } + function toggleZt(dlId, newZt) { + + // 发送请求到后端更新数据 + $.ajax({ + url: '/ChargeCategory/UpdateZt', // 后端处理修改的URL + type: 'POST', + data: { + dlId: dlId, + zt: newZt, + organizeId: $("#OrganizeId").val() + }, + success: function () { + // 切换显示的开关状态 + $('#btn_search').trigger('click'); + + }, + }); + } diff --git a/Newtouch.HIS.Base/Newtouch.HIS.Base.HOSP/Views/CommonLibrary/Index.cshtml b/Newtouch.HIS.Base/Newtouch.HIS.Base.HOSP/Views/CommonLibrary/Index.cshtml index 4365d47c52278ea2f169348058c12eceeb8dbb31..08381a86f95d42b0e6f4ad4fc42e39d2904b9766 100644 --- a/Newtouch.HIS.Base/Newtouch.HIS.Base.HOSP/Views/CommonLibrary/Index.cshtml +++ b/Newtouch.HIS.Base/Newtouch.HIS.Base.HOSP/Views/CommonLibrary/Index.cshtml @@ -534,7 +534,7 @@ //treeGrid: true, treeGridModel: "adjacency", ExpandColumn: "dlCode", - postData: { keyword: $("#txt_keyword_sfdl1").val(), organizeId: "*" }, + postData: { keyword: $("#txt_keyword_sfdl1").val(), organizeId: "*",zt:'' }, url: "/ChargeCategory/GetTreeGridJson", height: $(window).height() - 128, colModel: [ @@ -609,7 +609,7 @@ $.modalOpen({ id: "Form", title: "新增大类", - url: "/CommonLibrary/SysCommonMedicineAdd?orgId=*", + url: "/CommonLibrary/SysCommonChargeCategoryForm?orgId=*", width: "550px", height: "700px", callBack: function (iframeId) { @@ -761,7 +761,7 @@ function btn_add3() { $.modalOpen({ id: "Form", - title: "系统药品添加", + title: "系统耗材添加", url: "/CommonLibrary/SysCommonStuffAdd?orgId=*" , width: "1300px", height: "800px", @@ -811,7 +811,7 @@ function gridList4() { var $gridList = $("#gridList4"); $gridList.dataGrid({ - postData: { keyword: $("#txt_keyword_sfxm1").val(), organizeId: "*", sfdl: $("#sfdl").val() }, + postData: { keyword: $("#txt_keyword_sfxm1").val(), organizeId: "*", sfdl: $("#sfdl").val(),zt:'' }, url: "/SysChargeItem/GetGridJson", height: $(window).height() - 128, colModel: [ diff --git a/Newtouch.HIS.Base/Newtouch.HIS.Base.HOSP/Views/SysChargeItem/Index.cshtml b/Newtouch.HIS.Base/Newtouch.HIS.Base.HOSP/Views/SysChargeItem/Index.cshtml index 5d876ff39b43917375a3f419164e184e19663f0a..ddc230517cf70dab68e9afb379d604a34032ee16 100644 --- a/Newtouch.HIS.Base/Newtouch.HIS.Base.HOSP/Views/SysChargeItem/Index.cshtml +++ b/Newtouch.HIS.Base/Newtouch.HIS.Base.HOSP/Views/SysChargeItem/Index.cshtml @@ -28,6 +28,15 @@ + 有效状态: + + + + @@ -51,7 +60,7 @@ function gridList() { var $gridList = $("#gridList"); $gridList.dataGrid({ - postData: { keyword: $("#txt_keyword").val(), organizeId: $("#OrganizeId").val(), sfdl: $("#sfdl").val() }, + postData: { keyword: $("#txt_keyword").val(),organizeId: $("#OrganizeId").val(), sfdl: $("#sfdl").val(), zt: $("#yxzt").val() }, url: "/SysChargeItem/GetGridJson", height: $(window).height() - 128, colModel: [ @@ -100,7 +109,13 @@ } } }, - { label: "有效", name: "zt", width: 80, align: "left", formatter: function (cellvalue) { return cellvalue == "1" ? "" : ""; } }, + { + label: "有效", name: "zt", width: 80, align: "left", formatter: function (cellvalue, options, rowObject) { + return cellvalue == "1" + ? `` + : ``; + } + }, { label: '创建人', name: 'CreatorCode', width: 100, align: 'left' }, { label: '创建时间', name: 'CreateTime', width: 100, align: 'left', formatter: "date", formatoptions: { srcformat: 'Y-m-d', newformat: 'Y-m-d' } }, { label: '最后修改', name: 'LastModifierCode', width: 100, align: 'left' }, @@ -114,7 +129,7 @@ }); $("#btn_search").click(function () { $("#gridList").jqGrid('setGridParam', { - postData: { keyword: $("#txt_keyword").val(), organizeId: $("#OrganizeId").val(), sfdl: $("#sfdl").val() }, + postData: { keyword: $("#txt_keyword").val(), organizeId: $("#OrganizeId").val(), sfdl: $("#sfdl").val(),zt: $("#yxzt").val() }, }).trigger('reloadGrid'); }); } @@ -194,6 +209,26 @@ }); } + function toggleZt(sfxmId, newZt) { + + // 发送请求到后端更新数据 + $.ajax({ + url: '/SysChargeItem/UpdateZt', // 后端处理修改的URL + type: 'POST', + data: { + sfxmId: sfxmId, + zt: newZt, + organizeId: $("#OrganizeId").val() + }, + success: function () { + // 切换显示的开关状态 + $('#btn_search').trigger('click'); + + }, + }); + } + + //收费项目同步医保 function YibaoUpload(row) { $.najax({ diff --git a/Newtouch.HIS.Base/Newtouch.HIS.Base.HOSP/Views/SysMedicalOrderFrequency/Form.cshtml b/Newtouch.HIS.Base/Newtouch.HIS.Base.HOSP/Views/SysMedicalOrderFrequency/Form.cshtml index c9a63ea7657f8728d2f439ad04291c24b26e5721..54eeb37b205d02bb5708647a5598594a765300ce 100644 --- a/Newtouch.HIS.Base/Newtouch.HIS.Base.HOSP/Views/SysMedicalOrderFrequency/Form.cshtml +++ b/Newtouch.HIS.Base/Newtouch.HIS.Base.HOSP/Views/SysMedicalOrderFrequency/Form.cshtml @@ -53,13 +53,22 @@ *执行周期时间单位: - + @**@ + 周标志: - + @**@ + diff --git a/Newtouch.HIS.Base/Newtouch.HIS.Base.HOSP/Views/SysMedicalOrderFrequency/Index.cshtml b/Newtouch.HIS.Base/Newtouch.HIS.Base.HOSP/Views/SysMedicalOrderFrequency/Index.cshtml index 3a6dd6116ed3e1c26a7281115b92a19e57f4477f..7e812e43bdf24845c52125af12f1b33f74aeecc4 100644 --- a/Newtouch.HIS.Base/Newtouch.HIS.Base.HOSP/Views/SysMedicalOrderFrequency/Index.cshtml +++ b/Newtouch.HIS.Base/Newtouch.HIS.Base.HOSP/Views/SysMedicalOrderFrequency/Index.cshtml @@ -52,7 +52,7 @@ $gridList.dataGrid({ url: "/SysMedicalOrderFrequency/GetGridJson", postData: getSearchPostData(), - height: 400, + height: $(window).height() - 125, colModel: [ { label: "yzpcId", name: "yzpcId", width: 100, align: "left", hidden: true }, { label: "编码", name: "yzpcCode", width: 100, align: "left" }, @@ -60,7 +60,16 @@ { label: "名称说明", name: "yzpcmcsm", width: 100, align: "left" }, { label: "执行次数", name: "zxcs", width: 100, align: "left" }, { label: "执行周期", name: "zxzq", width: 100, align: "left" }, - { label: "执行周期时间单位", name: "zxzqdw", width: 100, align: "left" }, + { + label: "执行周期时间单位", name: "zxzqdw", width: 100, align: "left", formatter: function (cellvalue) { + if (cellvalue == "1") + return "天"; + else if (cellvalue == "2") + return "小时"; + else if (cellvalue == "3") + return "分钟"; + } + }, { label: "周标志", name: "zbz", width: 100, align: "left" }, { label: "执行时间", name: "zxsj", width: 100, align: "left" }, { label: "有效", name: "zt", width: 60, align: "center", formatter: function (cellvalue) { return cellvalue == "1" ? "" : ""; } }, diff --git a/Newtouch.HIS.Base/Newtouch.HIS.Domain/Entity/PharmacyDrugStorage/SysMedicineBaseEntity.cs b/Newtouch.HIS.Base/Newtouch.HIS.Domain/Entity/PharmacyDrugStorage/SysMedicineBaseEntity.cs index 9f317b12720cc921c20864f8cd54ee61c32cb084..0703214acac4afa278ef80e037febeecb81b18f8 100644 --- a/Newtouch.HIS.Base/Newtouch.HIS.Domain/Entity/PharmacyDrugStorage/SysMedicineBaseEntity.cs +++ b/Newtouch.HIS.Base/Newtouch.HIS.Domain/Entity/PharmacyDrugStorage/SysMedicineBaseEntity.cs @@ -16,6 +16,7 @@ namespace Newtouch.HIS.Domain.Entity /// /// [Key] + [DatabaseGenerated(DatabaseGeneratedOption.None)] public int ypId { get; set; } /// diff --git a/Newtouch.HIS.Base/Newtouch.HIS.Domain/IDomainServices/Settlement/ISysChargeItemDmnService.cs b/Newtouch.HIS.Base/Newtouch.HIS.Domain/IDomainServices/Settlement/ISysChargeItemDmnService.cs index d35ecc981e2446c768ef194ec841eaca25c3ce93..6d65178fb4918c7f1c0b077fa308a4d965e0a82f 100644 --- a/Newtouch.HIS.Base/Newtouch.HIS.Domain/IDomainServices/Settlement/ISysChargeItemDmnService.cs +++ b/Newtouch.HIS.Base/Newtouch.HIS.Domain/IDomainServices/Settlement/ISysChargeItemDmnService.cs @@ -17,7 +17,7 @@ namespace Newtouch.HIS.Domain.IDomainServices /// /// /// - IList GetPagintionList(string orgId, Pagination pagination, string sfdl, string keyword = null); + IList GetPagintionList(string orgId, Pagination pagination, string sfdl, string zt,string keyword = null); /// /// 获取医保性质字典 /// diff --git a/Newtouch.HIS.Base/Newtouch.HIS.Domain/IRepository/PharmacyDrugStorage/ISysMedicineBaseRepo.cs b/Newtouch.HIS.Base/Newtouch.HIS.Domain/IRepository/PharmacyDrugStorage/ISysMedicineBaseRepo.cs index b769c56c5eb0b5c68ec07cd780e2c416b117212c..4b12f06e1aaa15bee53283af53d4a5e77358eb0f 100644 --- a/Newtouch.HIS.Base/Newtouch.HIS.Domain/IRepository/PharmacyDrugStorage/ISysMedicineBaseRepo.cs +++ b/Newtouch.HIS.Base/Newtouch.HIS.Domain/IRepository/PharmacyDrugStorage/ISysMedicineBaseRepo.cs @@ -32,5 +32,11 @@ namespace Newtouch.HIS.Domain.IRepository IList GetYbName(string OrganizeId ,string lx, string keyword=null); IList GetYbXNHMedicineList(string keyword = null); + + /// + /// 查询基础表最后一个id + /// + /// + int GetBaseLastYpId(); } } diff --git a/Newtouch.HIS.Base/Newtouch.HIS.Domain/IRepository/Settlement/ISysChargeCategoryRepo.cs b/Newtouch.HIS.Base/Newtouch.HIS.Domain/IRepository/Settlement/ISysChargeCategoryRepo.cs index 881fcf958467dff67d5b6259d1402daa5579b71f..71b67a8dfe20c8f47c22890560cc4b8077e001ef 100644 --- a/Newtouch.HIS.Base/Newtouch.HIS.Domain/IRepository/Settlement/ISysChargeCategoryRepo.cs +++ b/Newtouch.HIS.Base/Newtouch.HIS.Domain/IRepository/Settlement/ISysChargeCategoryRepo.cs @@ -20,7 +20,7 @@ namespace Newtouch.HIS.Domain.IRepository /// /// /// - IList GetList(string orgId); + IList GetList(string orgId,string zt); /// /// 获取实体数据 diff --git a/Newtouch.HIS.Base/Newtouch.HIS.DomainServices/PharmacyDrugStorage/SysMedicineDmnService.cs b/Newtouch.HIS.Base/Newtouch.HIS.DomainServices/PharmacyDrugStorage/SysMedicineDmnService.cs index a9def3f279289b017d4b5e8bd9451939e8c58b36..875ca81682c9ea2ea9fb93262437f88b0b880f98 100644 --- a/Newtouch.HIS.Base/Newtouch.HIS.DomainServices/PharmacyDrugStorage/SysMedicineDmnService.cs +++ b/Newtouch.HIS.Base/Newtouch.HIS.DomainServices/PharmacyDrugStorage/SysMedicineDmnService.cs @@ -903,29 +903,26 @@ AND x.OrganizeId=@OrganizeId } else { - model.ypId = 0; //新增 - var ypEntity = new SysMedicineEntity(); - var ypsxEntity = new SysMedicinePropertyEntity(); if (model.OrganizeId.Equals("*")) { + model.ypId = _sysMedicineBaseRepository.GetBaseLastYpId() + 1; + var ypEntity = new SysMedicineBaseEntity(); + var ypsxEntity = new SysMedicinePropertyBaseEntity(); //在系统基础库插入插入药品 - UpdateEnityProperties(ypEntity, ypsxEntity, model); - ypEntity.Create(); - var yp = Json.ToJson(ypEntity); - var sysMedicineBaseEntity = yp.ToObject(); - var entity = sysMedicineBaseEntity.Clone(); - - _sysMedicineBaseRepository.Insert(entity); + UpdateEnityBaseProperties(ypEntity, ypsxEntity, model); + ypEntity.Create(); ; + _sysMedicineBaseRepository.Insert(ypEntity); //插入药品属性 - ypsxEntity.ypId = entity.ypId; + ypsxEntity.ypId = ypEntity.ypId; ypsxEntity.Create(); - var ypsx = Json.ToJson(ypsxEntity); - _sysMedicinePropertyBaseRepo.Insert(ypsx.ToObject()); - + _sysMedicinePropertyBaseRepo.Insert(ypsxEntity); } else { + model.ypId = 0; + var ypEntity = new SysMedicineEntity(); + var ypsxEntity = new SysMedicinePropertyEntity(); //插入药品 UpdateEnityProperties(ypEntity, ypsxEntity, model); ypEntity.Create(); @@ -1072,6 +1069,102 @@ AND x.OrganizeId=@OrganizeId #endregion } + + public void UpdateEnityBaseProperties(SysMedicineBaseEntity modelyp, SysMedicinePropertyBaseEntity modelypsx, SysMedicineVO model) + { + #region 药品信息表值 + modelyp.bzdw = model.bzdw; + modelyp.bzs = model.bzs; + modelyp.cfdw = "";//默认 + modelyp.cfl = decimal.Parse("0.0000"); + //modelyp.cldw = model.cldw; + //modelyp.cls = model.cls; + modelyp.djdw = model.djdw; + modelyp.dlCode = model.dlCode; + modelyp.jl = model.jl; + modelyp.jldw = model.jldw; ; + modelyp.jx = model.jx;//( or liek ) and bgbz='0' and zt='1' 根据代码/姓名/首拼获取剂型信息获得 + modelyp.lsj = model.lsj; + modelyp.medextid = 0;//默认 + modelyp.medid = 0;//默认 + modelyp.mzcldw = model.mzcldw; + modelyp.mzcls = model.mzcls; + modelyp.mzzybz = "1";//门诊住院标志默认1 + modelyp.nbdl = model.nbdl; + modelyp.pfj = model.pfj; + modelyp.px = model.px; + modelyp.py = model.py; + modelyp.spm = model.spm; + modelyp.OrganizeId = model.OrganizeId; //组织机构Id + modelyp.ycmc = model.ycmc; + modelyp.ypbzdm = model.ypbzdm;//药品包装代码默认3 + modelyp.bz = model.bz; + modelyp.cxjje = model.cxjje;//超限价金额 + modelyp.ypId = model.ypId; + modelyp.ypCode = model.ypCode; + modelyp.ypmc = model.ypmc; + modelyp.yphz = "";//默认 + modelyp.ypqz = "";//默认 + modelyp.zfbl = model.zfbl; + modelyp.zfxz = model.zfxz; + modelyp.zt = model.zt; + modelyp.zycldw = model.zycldw; + modelyp.zycls = model.zycls; + modelyp.zxdw = model.zxdw; + modelyp.isKss = model.isKss; + modelyp.kssId = model.kssId; + modelyp.jybz = model.jybz; + modelyp.tsypbz = model.tsypbz; + #endregion + + #region 药品SX值 + modelypsx.OrganizeId = model.OrganizeId; //组织机构Id + modelypsx.dczdjl = model.dczdjl; + modelypsx.dczdsl = model.dczdsl; + modelypsx.ghdw = model.ghdw; + modelypsx.gzy = model.gzy; + modelypsx.jsbz = model.jsbz; + modelypsx.jzlx = model.jzlx; + modelypsx.ljzdjl = model.ljzdjl; + modelypsx.ljzdsl = model.ljzdsl; + modelypsx.mrbzq = model.mrbzq; + modelypsx.mzy = model.mzy; + //modelypsx.px = model.px; + modelypsx.pzwh = model.pzwh; + modelypsx.shbz = model.shbz; + modelypsx.sjap = model.sjap; + modelypsx.syts = model.syts; + modelypsx.tsbz = model.tsbz; + modelypsx.xglx = model.xglx; + modelypsx.ybdm = model.ybdm; + modelypsx.xnhybdm = model.xnhybdm; + modelypsx.yl = model.yl; + modelypsx.yldw = model.yldw; + modelypsx.yljsy = model.yljsy; + modelypsx.ypcd = model.ypcd; + modelypsx.ypCode = model.ypCode; + modelypsx.ypflCode = model.ypflCode; + modelypsx.ypgg = model.ypgg; + modelypsx.ypId = model.ypId; + modelypsx.yptssx = model.yptssx; + modelypsx.zbbz = model.zbbz; + modelypsx.zjtzsj = model.zjtzsj; + modelypsx.zlff = model.zlff; + modelypsx.mrjl = model.mrjl; + modelypsx.mrpc = model.mrpc; + modelypsx.ybbz = model.ybbz; + modelypsx.gjybdm = model.gjybdm; + modelypsx.gjybmc = model.gjybmc; + modelypsx.dcxl = model.dcxl; + modelypsx.mbxl = model.mbxl; + modelypsx.mryf = model.mryf; + modelypsx.ybgg = model.ybgg; + //modelypsx.zt = model.zt; + + #endregion + } + + #endregion diff --git a/Newtouch.HIS.Base/Newtouch.HIS.DomainServices/Settlement/SysChargeItemDmnService.cs b/Newtouch.HIS.Base/Newtouch.HIS.DomainServices/Settlement/SysChargeItemDmnService.cs index 7e1f8b7bb41c09e6c4b1eab5b205f4cb3cc43ded..898c785646f9b2c93750e93b4304d5e41ebcddb1 100644 --- a/Newtouch.HIS.Base/Newtouch.HIS.DomainServices/Settlement/SysChargeItemDmnService.cs +++ b/Newtouch.HIS.Base/Newtouch.HIS.DomainServices/Settlement/SysChargeItemDmnService.cs @@ -29,7 +29,7 @@ namespace Newtouch.HIS.DomainServices /// /// /// - public IList GetPagintionList(string orgId, Pagination pagination,string sfdl, string keyword = null) + public IList GetPagintionList(string orgId, Pagination pagination,string sfdl, string zt,string keyword = null) { var tableName = ""; if (orgId.Equals("*")) @@ -63,6 +63,11 @@ where a.OrganizeId = @orgId"; sql += " and a.sfdlCode=@sfdl"; pars.Add(new SqlParameter("@sfdl", sfdl)); } + if (zt != "") + { + sql += " and a.zt=@zt"; + pars.Add(new SqlParameter("@zt", zt)); + } return this.QueryWithPage(sql, pagination, pars.ToArray()); } diff --git a/Newtouch.HIS.Base/Newtouch.HIS.Repository/PharmacyDrugStorage/SysMedicineRepoBase.cs b/Newtouch.HIS.Base/Newtouch.HIS.Repository/PharmacyDrugStorage/SysMedicineRepoBase.cs index c6bb8dd16c990c0783ef20cebd72f11dc7995851..1d894e026c2ebcab09493c000bec55d5a7da1e03 100644 --- a/Newtouch.HIS.Base/Newtouch.HIS.Repository/PharmacyDrugStorage/SysMedicineRepoBase.cs +++ b/Newtouch.HIS.Base/Newtouch.HIS.Repository/PharmacyDrugStorage/SysMedicineRepoBase.cs @@ -6,6 +6,7 @@ using Newtouch.Infrastructure; using System; using System.Collections.Generic; using System.Data.SqlClient; +using System.Linq; namespace Newtouch.HIS.Repository { @@ -143,6 +144,13 @@ WHERE (name LIKE @searchKeyword or code like @searchKeyword or pcode like @sea return null; } } - + + public int GetBaseLastYpId() + { + var sql = @"select max(ypId) from xt_yp_base"; + + return FirstOrDefault(sql); } + + } } diff --git a/Newtouch.HIS.Base/Newtouch.HIS.Repository/Settlement/SysChargeCategoryRepo.cs b/Newtouch.HIS.Base/Newtouch.HIS.Repository/Settlement/SysChargeCategoryRepo.cs index 1fa006dccd68166defc45266fcc5ff9ed696b94c..1f8fb34faf1f5c9fbd7db6ea46c73bd5b5cca0ec 100644 --- a/Newtouch.HIS.Base/Newtouch.HIS.Repository/Settlement/SysChargeCategoryRepo.cs +++ b/Newtouch.HIS.Base/Newtouch.HIS.Repository/Settlement/SysChargeCategoryRepo.cs @@ -45,9 +45,17 @@ namespace Newtouch.HIS.Repository /// /// /// - public IList GetList(string orgId) - { - return this.IQueryable().Where(a => a.OrganizeId == orgId).OrderByDescending(a => a.CreateTime).ToList(); + public IList GetList(string orgId,string zt) + { + var query = this.IQueryable().Where(a => a.OrganizeId == orgId); + + if (!string.IsNullOrEmpty(zt)) // + { + query = query.Where(a => a.zt == zt); // 添加 zt 的条件 + } + + return query.OrderByDescending(a => a.CreateTime).ToList(); + } /// diff --git a/Newtouch.HIS.CIS/Newtouch.Application/Implementation/Inpatient/DoctorserviceApp.cs b/Newtouch.HIS.CIS/Newtouch.Application/Implementation/Inpatient/DoctorserviceApp.cs index 56daa151cb4faea990ee85cdaba475671610a96f..147710be29c9200a8ef3741892015d888cc545d8 100644 --- a/Newtouch.HIS.CIS/Newtouch.Application/Implementation/Inpatient/DoctorserviceApp.cs +++ b/Newtouch.HIS.CIS/Newtouch.Application/Implementation/Inpatient/DoctorserviceApp.cs @@ -62,13 +62,15 @@ namespace Newtouch.Application.Implementation.Inpatient } var response = new DoctorServiceparentRequestDto { - patientInfo = new patientInfoDto - { - age = patientInfo.age, - brxzmc = patientInfo.brxzmc, - sex = patientInfo.sex, - zyh = patientInfo.zyh - }, + patientInfo = patientInfo + // patientInfo = new patientInfoDto + // { + // age = patientInfo.age, + // brxzmc = patientInfo.brxzmc, + // sex = patientInfo.sex, + // zyh = patientInfo.zyh + // } + , DoctorServiceUIRequestDto = new List() }; if (yzlx == "长") @@ -137,6 +139,7 @@ namespace Newtouch.Application.Implementation.Inpatient var repentity = new DoctorServiceUIRequestDto { Id = item.Id, + yzh = item.yzh, DeptCode = item.DeptCode, dwlb = item.dwlb, dwwwwwww = item.dw, @@ -245,6 +248,7 @@ namespace Newtouch.Application.Implementation.Inpatient var repentity = new DoctorServiceUIRequestDto { Id = item.Id, + yzh = item.yzh, DeptCode = item.DeptCode, dwlb = item.dwlb, dwwwwwww = item.dw, diff --git a/Newtouch.HIS.CIS/Newtouch.CIS.Proxy/CMMPlatform/DTO/HLYYRequest/EngDataStatusReq.cs b/Newtouch.HIS.CIS/Newtouch.CIS.Proxy/CMMPlatform/DTO/HLYYRequest/EngDataStatusReq.cs new file mode 100644 index 0000000000000000000000000000000000000000..00d19f166212cfdb2f7270671a253b9b218b3d47 --- /dev/null +++ b/Newtouch.HIS.CIS/Newtouch.CIS.Proxy/CMMPlatform/DTO/HLYYRequest/EngDataStatusReq.cs @@ -0,0 +1,14 @@ +namespace Newtouch.CIS.Proxy.CMMPlatform.DTO.HLYYRequest +{ + public class EngDataStatusReq + { + public RequestInfo Info { get; set; } + + } + public class RequestInfo + { + public string PresNo { get; set; } // 处方编号 + } + + +} \ No newline at end of file diff --git a/Newtouch.HIS.CIS/Newtouch.CIS.Proxy/CMMPlatform/DTO/HLYYRequest/EngDataStatusRes.cs b/Newtouch.HIS.CIS/Newtouch.CIS.Proxy/CMMPlatform/DTO/HLYYRequest/EngDataStatusRes.cs new file mode 100644 index 0000000000000000000000000000000000000000..2744a1abcbda93499c2e4fb219a9c435d16929e0 --- /dev/null +++ b/Newtouch.HIS.CIS/Newtouch.CIS.Proxy/CMMPlatform/DTO/HLYYRequest/EngDataStatusRes.cs @@ -0,0 +1,16 @@ +namespace Newtouch.CIS.Proxy.CMMPlatform.DTO.HLYYRequest +{ + public class EngDataStatusRes + { + public ResponseInfo Info { get; set; } + } + + public class ResponseInfo + { + public string Rest { get; set; } // 处方状态信息 + public string Message { get; set; } // 消息 + public string Suggest { get; set; } // 建议 + public string Username { get; set; } // 用户名 + public int DispenseFlag { get; set; } // 配药标志 + } +} \ No newline at end of file diff --git a/Newtouch.HIS.CIS/Newtouch.CIS.Proxy/CMMPlatform/DTO/HLYYRequest/EngineReq.cs b/Newtouch.HIS.CIS/Newtouch.CIS.Proxy/CMMPlatform/DTO/HLYYRequest/EngineReq.cs new file mode 100644 index 0000000000000000000000000000000000000000..0806cb7c5ce9a98dce68dc6b4144df7954cb8409 --- /dev/null +++ b/Newtouch.HIS.CIS/Newtouch.CIS.Proxy/CMMPlatform/DTO/HLYYRequest/EngineReq.cs @@ -0,0 +1,241 @@ +using System; +using System.Collections.Generic; +using System.Xml.Serialization; + + +namespace Newtouch.CIS.Proxy.CMMPlatform.DTO.HLYYRequest +{ + [XmlRoot("root")] + public class EngineReq + { + public bool ShouldSerializeMyProperty() => true; + public string Type { get; set; } // 处方类型 + public PatientRecord Patient { get; set; } // 病人信息 + public Operation Operation { get; set; } // 手术信息 + public List Prescriptions { get; set; } // 药品处方列表 + + } + public class PatientRecord + { + [XmlElement("departID")] + public string DepartID { get; set; } // 科室编号 + + [XmlElement("department")] + public string Department { get; set; } // 科室名称 + + [XmlElement("bedNo")] + public string BedNo { get; set; } // 住院病人床号 + + [XmlElement("presType")] + public string PresType { get; set; } // 处方类型 + + [XmlElement("presSource")] + public string PresSource { get; set; } // 来源 + + [XmlElement("presDateTime")] + public string PresDatetime { get; set; } // 处方/医嘱开具时间 + + [XmlElement("payType")] + public string PayType { get; set; } // 费别 + + [XmlElement("patientNo")] + public string PatientNo { get; set; } // 就诊卡号 + + [XmlElement("presNo")] + public string PresNo { get; set; } // 处方/医嘱号 + + [XmlElement("name")] + public string Name { get; set; } // 病人姓名 + + [XmlElement("diagnoseid")] + public string DiagnoseID { get; set; } // 诊断id + + [XmlElement("diagnose")] + public string Diagnose { get; set; } // 诊断 + + [XmlElement("IDCard")] + public string IDCard { get; set; } // 身份证号码 + + [XmlElement("address")] + public string Address { get; set; } // 病人地址 + + [XmlElement("phoneNo")] + public string PhoneNo { get; set; } // 联系电话 + + [XmlElement("age")] + public string Age { get; set; } // 年龄 + + [XmlElement("sex")] + public string Sex { get; set; } // 性别 + + [XmlElement("height")] + public string Height { get; set; } // 身高 + + [XmlElement("weight")] + public string Weight { get; set; } // 体重 + + [XmlElement("birthWeight")] + public string BirthWeight { get; set; } // 出生时体重 + + [XmlElement("previousHistory")] + public string PreviousHistory { get; set; } // 既往史 + + [XmlElement("nowMedicalHistory")] + public string NowMedicalHistory { get; set; } // 现病史 + + [XmlElement("ccr")] + public string Ccr { get; set; } // 内生肌酐清除率 + + [XmlElement("anaphylactogen")] + public string Anaphylactogen { get; set; } // 过敏史 + + [XmlElement("allergicHistory")] + public string AllergicHistory { get; set; } // 过敏源 + + [XmlElement("pregnancy")] + public string Pregnancy { get; set; } // 是否怀孕 + + [XmlElement("timeOfPreg")] + public string TimeOfPreg { get; set; } // 孕期 + + [XmlElement("disease")] + public string Disease { get; set; } // 是否慢性病 + + [XmlElement("breastFeeding")] + public string BreastFeeding { get; set; } // 是否哺乳 + + [XmlElement("dialysis")] + public string Dialysis { get; set; } // 是否透析 + + [XmlElement("proxName")] + public string ProxName { get; set; } // 代办人姓名 + + [XmlElement("proxIDCard")] + public string ProxIDCard { get; set; } // 代办人身份证号 + + [XmlElement("docID")] + public string DocID { get; set; } // 医生工号 + + [XmlElement("docName")] + public string DocName { get; set; } // 医生姓名 + + [XmlElement("totalAmount")] + public string TotalAmount { get; set; } // 处方金额 + // Add any additional fields as necessary + } + + public class Operation + { + [XmlElement("operationCode")] + public string OperationCode { get; set; } // 手术代码 + + [XmlElement("operationName")] + public string OperationName { get; set; } // 手术名称 + + [XmlElement("operationStartTime")] + public string OperationStartTime { get; set; } // 手术开始时间 + + [XmlElement("operationEndTime")] + public string OperationEndTime { get; set; } // 手术结束时间 + + [XmlElement("incisionType")] + public string IncisionType { get; set; } // 切口类型 + + [XmlElement("incisionStatus")] + public string IncisionStatus { get; set; } // 愈合类型 + + [XmlElement("inplant")] + public string Inplant { get; set; } // 是否有植入物 + } + + [XmlRoot("Prescription")] + public class Prescription + { + [XmlElement("drug")] + public string Drug { get; set; } // 药品ID + + [XmlElement("drugName")] + public string DrugName { get; set; } // 药品名称 + + [XmlElement("regName")] + public string RegName { get; set; } // 商品名 + + [XmlElement("specification")] + public string Specification { get; set; } // 含量规格 + + [XmlElement("package")] + public string Package { get; set; } // 包装规格 + + [XmlElement("quantity")] + public float Quantity { get; set; } // 数量 + + [XmlElement("packUnit")] + public string PackUnit { get; set; } // 包装单位 + + [XmlElement("unitPrice")] + public string UnitPrice { get; set; } // 单价 + + [XmlElement("amount")] + public string Amount { get; set; } // 总价 + + [XmlElement("groupNo")] + public string GroupNo { get; set; } // 组号 + + [XmlElement("firstUse")] + public string FirstUse { get; set; } // 首剂使用 + + [XmlElement("prepForm")] + public string PrepForm { get; set; } // 剂型 + + [XmlElement("adminRoute")] + public string AdminRoute { get; set; } // 给药途径 + + [XmlElement("adminArea")] + public string AdminArea { get; set; } // 给药部位 + + [XmlElement("adminFrequency")] + public string AdminFrequency { get; set; } // 给药频率 + + [XmlElement("adminDose")] + public string AdminDose { get; set; } // 给药剂量 + + [XmlElement("adminMethod")] + public string AdminMethod { get; set; } // 给药时机 + + [XmlElement("type")] + public string Type { get; set; } // 类型 + + [XmlElement("adminGoal")] + public string AdminGoal { get; set; } // 给药目的 + + [XmlElement("docID")] + public string DocID { get; set; } // 医生工号 + + [XmlElement("docName")] + public string DocName { get; set; } // 医生姓名 + + [XmlElement("docTitle")] + public string DocTitle { get; set; } // 医生职称 + + [XmlElement("departID")] + public string DepartID { get; set; } // 科室ID + + [XmlElement("department")] + public string Department { get; set; } // 科室名称 + + [XmlElement("nurseName")] + public string NurseName { get; set; } // 护士名称 + + [XmlElement("startTime")] + public string StartTime { get; set; } // 开始时间 + + [XmlElement("endTime")] + public string EndTime { get; set; } // 结束时间 + + [XmlElement("specialPromote")] + public string SpecialPromote { get; set; } // 煎煮方法 + + [XmlElement("continueDays")] + public string ContinueDays { get; set; } // 持续时间 + } +} diff --git a/Newtouch.HIS.CIS/Newtouch.CIS.Proxy/CMMPlatform/DTO/HLYYRequest/EngineRes.cs b/Newtouch.HIS.CIS/Newtouch.CIS.Proxy/CMMPlatform/DTO/HLYYRequest/EngineRes.cs new file mode 100644 index 0000000000000000000000000000000000000000..5329caa4f2ca87d47d5c68ca606d9bfdf7c7b1f2 --- /dev/null +++ b/Newtouch.HIS.CIS/Newtouch.CIS.Proxy/CMMPlatform/DTO/HLYYRequest/EngineRes.cs @@ -0,0 +1,52 @@ +using System; +using System.Collections.Generic; +using System.Xml.Serialization; + + +namespace Newtouch.CIS.Proxy.CMMPlatform.DTO.HLYYRequest +{ + [XmlRoot("root")] + public class EngineRes + { + [XmlElement("message")] public Message Message { get; set; } + + [XmlElement("cfstate")] public string Cfstate { get; set; } + + public string cfh { get; set; } + } + + public class Message + { + [XmlElement("infos")] public Infos Infos { get; set; } + } + + public class Infos + { + [XmlElement("info")] public List InfoList { get; set; } + } + + public class Info + { + [XmlElement("groupNo")] public string GroupNo { get; set; } + + [XmlElement("adminRoute")] public string AdminRoute { get; set; } + + [XmlElement("adminFrequency")] public string AdminFrequency { get; set; } + + [XmlElement("drugName")] public string DrugName { get; set; } + + [XmlElement("drugId")] public string DrugId { get; set; } + + [XmlElement("message")] public string MessageText { get; set; } + + [XmlElement("advice")] public string Advice { get; set; } + + [XmlElement("source")] public string Source { get; set; } + + [XmlElement("severity")] public string Severity { get; set; } + + [XmlElement("messageId")] public string MessageId { get; set; } + + [XmlElement("type")] public string Type { get; set; } + } +} \ No newline at end of file diff --git a/Newtouch.HIS.CIS/Newtouch.CIS.Proxy/CMMPlatform/HLYY_Proxy.cs b/Newtouch.HIS.CIS/Newtouch.CIS.Proxy/CMMPlatform/HLYY_Proxy.cs new file mode 100644 index 0000000000000000000000000000000000000000..083f8b9750ca7354807fed44acdd495dc26f715f --- /dev/null +++ b/Newtouch.HIS.CIS/Newtouch.CIS.Proxy/CMMPlatform/HLYY_Proxy.cs @@ -0,0 +1,71 @@ + +using Newtouch.CIS.Proxy.CMMPlatform.DTO.HLYYRequest; + +using Newtouch.CIS.Proxy.HisApiService; +using Newtouch.Infrastructure; + +namespace Newtouch.CIS.Proxy.CMMPlatform +{ + + /// + public class HlyyProxy + { + + // 声明 client 为类的属性 + public HisApiClient Client { get; private set; } + + public HlyyProxy() + { + // 在构造函数中初始化 client + Client = new HisApiClient(); + } + + /** + * 处方审核状态查询 + */ + public string GetEngDataStatus(string presNo) + { + var request = new EngDataStatusReq() + { + Info = new RequestInfo + { + PresNo = presNo + } + }; + var reqXMl = new getEngDataStatus + { + xml = XMLSerializer.XmlSerializeAll(request) + }; + + return Client.getEngDataStatus(reqXMl).@return; + } + + /** + * 处方审核状态查询 + */ + public EngineRes engine(EngineReq engineReq) + { + var engine = new engine + { + getxml = XMLSerializer.XmlSerializeAll(engineReq) + }; + return XmlSerializerExt.XmlDeSerialize(Client.engine(engine).@return); + } + + + /** + * 说明书 + */ + public string GetHisSmsJson(string ypmcId) + { + var getHisSmsJson = new getHisSmsJson + { + ypmcid = ypmcId + }; + return Client.getHisSmsJson(getHisSmsJson).@return; + } + + + + } +} \ No newline at end of file diff --git a/Newtouch.HIS.CIS/Newtouch.CIS.Proxy/Connected Services/HisApiService/HisApiService.cs b/Newtouch.HIS.CIS/Newtouch.CIS.Proxy/Connected Services/HisApiService/HisApiService.cs new file mode 100644 index 0000000000000000000000000000000000000000..899065f4a37ff6b8e497bc1bd9b38d8141f3b1c5 --- /dev/null +++ b/Newtouch.HIS.CIS/Newtouch.CIS.Proxy/Connected Services/HisApiService/HisApiService.cs @@ -0,0 +1,437 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Newtouch.CIS.Proxy.HisApiService +{ + + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.1.0")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://api.xiaojd.com/")] + public partial class Exception + { + + private string messageField; + + /// + [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified, Order=0)] + public string message + { + get + { + return this.messageField; + } + set + { + this.messageField = value; + } + } + } + + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.1.0")] + [System.ServiceModel.ServiceContractAttribute(Namespace="http://api.xiaojd.com/", ConfigurationName="Newtouch.CIS.Proxy.HisApiService.HisApi")] + public interface HisApi + { + + [System.ServiceModel.OperationContractAttribute(Action="", ReplyAction="*")] + [System.ServiceModel.FaultContractAttribute(typeof(Newtouch.CIS.Proxy.HisApiService.Exception), Action="", Name="Exception")] + [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults=true)] + Newtouch.CIS.Proxy.HisApiService.toChatResponse toChat(Newtouch.CIS.Proxy.HisApiService.toChat request); + + [System.ServiceModel.OperationContractAttribute(Action="", ReplyAction="*")] + System.Threading.Tasks.Task toChatAsync(Newtouch.CIS.Proxy.HisApiService.toChat request); + + [System.ServiceModel.OperationContractAttribute(Action="", ReplyAction="*")] + [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults=true)] + Newtouch.CIS.Proxy.HisApiService.deletePresNoResponse deletePresNo(Newtouch.CIS.Proxy.HisApiService.deletePresNo request); + + [System.ServiceModel.OperationContractAttribute(Action="", ReplyAction="*")] + System.Threading.Tasks.Task deletePresNoAsync(Newtouch.CIS.Proxy.HisApiService.deletePresNo request); + + [System.ServiceModel.OperationContractAttribute(Action="", ReplyAction="*")] + [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults=true)] + Newtouch.CIS.Proxy.HisApiService.getHisSmsJsonResponse getHisSmsJson(Newtouch.CIS.Proxy.HisApiService.getHisSmsJson request); + + [System.ServiceModel.OperationContractAttribute(Action="", ReplyAction="*")] + System.Threading.Tasks.Task getHisSmsJsonAsync(Newtouch.CIS.Proxy.HisApiService.getHisSmsJson request); + + [System.ServiceModel.OperationContractAttribute(Action="", ReplyAction="*")] + [System.ServiceModel.FaultContractAttribute(typeof(Newtouch.CIS.Proxy.HisApiService.Exception), Action="", Name="Exception")] + [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults=true)] + Newtouch.CIS.Proxy.HisApiService.getPwjjResponse getPwjj(Newtouch.CIS.Proxy.HisApiService.getPwjj request); + + [System.ServiceModel.OperationContractAttribute(Action="", ReplyAction="*")] + System.Threading.Tasks.Task getPwjjAsync(Newtouch.CIS.Proxy.HisApiService.getPwjj request); + + [System.ServiceModel.OperationContractAttribute(Action="", ReplyAction="*")] + [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults=true)] + Newtouch.CIS.Proxy.HisApiService.getEngDataStatusResponse getEngDataStatus(Newtouch.CIS.Proxy.HisApiService.getEngDataStatus request); + + [System.ServiceModel.OperationContractAttribute(Action="", ReplyAction="*")] + System.Threading.Tasks.Task getEngDataStatusAsync(Newtouch.CIS.Proxy.HisApiService.getEngDataStatus request); + + [System.ServiceModel.OperationContractAttribute(Action="", ReplyAction="*")] + [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults=true)] + Newtouch.CIS.Proxy.HisApiService.engineResponse engine(Newtouch.CIS.Proxy.HisApiService.engine request); + + [System.ServiceModel.OperationContractAttribute(Action="", ReplyAction="*")] + System.Threading.Tasks.Task engineAsync(Newtouch.CIS.Proxy.HisApiService.engine request); + } + + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.1.0")] + [System.ServiceModel.MessageContractAttribute(WrapperName="toChat", WrapperNamespace="http://api.xiaojd.com/", IsWrapped=true)] + public partial class toChat + { + + [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://api.xiaojd.com/", Order=0)] + [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] + public string useerId; + + [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://api.xiaojd.com/", Order=1)] + [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] + public string userName; + + public toChat() + { + } + + public toChat(string useerId, string userName) + { + this.useerId = useerId; + this.userName = userName; + } + } + + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.1.0")] + [System.ServiceModel.MessageContractAttribute(WrapperName="toChatResponse", WrapperNamespace="http://api.xiaojd.com/", IsWrapped=true)] + public partial class toChatResponse + { + + [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://api.xiaojd.com/", Order=0)] + [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] + public string @return; + + public toChatResponse() + { + } + + public toChatResponse(string @return) + { + this.@return = @return; + } + } + + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.1.0")] + [System.ServiceModel.MessageContractAttribute(WrapperName="deletePresNo", WrapperNamespace="http://api.xiaojd.com/", IsWrapped=true)] + public partial class deletePresNo + { + + [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://api.xiaojd.com/", Order=0)] + [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] + public string xml; + + public deletePresNo() + { + } + + public deletePresNo(string xml) + { + this.xml = xml; + } + } + + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.1.0")] + [System.ServiceModel.MessageContractAttribute(WrapperName="deletePresNoResponse", WrapperNamespace="http://api.xiaojd.com/", IsWrapped=true)] + public partial class deletePresNoResponse + { + + [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://api.xiaojd.com/", Order=0)] + [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] + public string @return; + + public deletePresNoResponse() + { + } + + public deletePresNoResponse(string @return) + { + this.@return = @return; + } + } + + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.1.0")] + [System.ServiceModel.MessageContractAttribute(WrapperName="getHisSmsJson", WrapperNamespace="http://api.xiaojd.com/", IsWrapped=true)] + public partial class getHisSmsJson + { + + [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://api.xiaojd.com/", Order=0)] + [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] + public string ypmcid; + + public getHisSmsJson() + { + } + + public getHisSmsJson(string ypmcid) + { + this.ypmcid = ypmcid; + } + } + + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.1.0")] + [System.ServiceModel.MessageContractAttribute(WrapperName="getHisSmsJsonResponse", WrapperNamespace="http://api.xiaojd.com/", IsWrapped=true)] + public partial class getHisSmsJsonResponse + { + + [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://api.xiaojd.com/", Order=0)] + [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] + public string @return; + + public getHisSmsJsonResponse() + { + } + + public getHisSmsJsonResponse(string @return) + { + this.@return = @return; + } + } + + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.1.0")] + [System.ServiceModel.MessageContractAttribute(WrapperName="getPwjj", WrapperNamespace="http://api.xiaojd.com/", IsWrapped=true)] + public partial class getPwjj + { + + [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://api.xiaojd.com/", Order=0)] + [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] + public string xml; + + public getPwjj() + { + } + + public getPwjj(string xml) + { + this.xml = xml; + } + } + + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.1.0")] + [System.ServiceModel.MessageContractAttribute(WrapperName="getPwjjResponse", WrapperNamespace="http://api.xiaojd.com/", IsWrapped=true)] + public partial class getPwjjResponse + { + + [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://api.xiaojd.com/", Order=0)] + [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] + public string @return; + + public getPwjjResponse() + { + } + + public getPwjjResponse(string @return) + { + this.@return = @return; + } + } + + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.1.0")] + [System.ServiceModel.MessageContractAttribute(WrapperName="getEngDataStatus", WrapperNamespace="http://api.xiaojd.com/", IsWrapped=true)] + public partial class getEngDataStatus + { + + [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://api.xiaojd.com/", Order=0)] + [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] + public string xml; + + public getEngDataStatus() + { + } + + public getEngDataStatus(string xml) + { + this.xml = xml; + } + } + + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.1.0")] + [System.ServiceModel.MessageContractAttribute(WrapperName="getEngDataStatusResponse", WrapperNamespace="http://api.xiaojd.com/", IsWrapped=true)] + public partial class getEngDataStatusResponse + { + + [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://api.xiaojd.com/", Order=0)] + [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] + public string @return; + + public getEngDataStatusResponse() + { + } + + public getEngDataStatusResponse(string @return) + { + this.@return = @return; + } + } + + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.1.0")] + [System.ServiceModel.MessageContractAttribute(WrapperName="engine", WrapperNamespace="http://api.xiaojd.com/", IsWrapped=true)] + public partial class engine + { + + [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://api.xiaojd.com/", Order=0)] + [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] + public string getxml; + + public engine() + { + } + + public engine(string getxml) + { + this.getxml = getxml; + } + } + + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.1.0")] + [System.ServiceModel.MessageContractAttribute(WrapperName="engineResponse", WrapperNamespace="http://api.xiaojd.com/", IsWrapped=true)] + public partial class engineResponse + { + + [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://api.xiaojd.com/", Order=0)] + [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] + public string @return; + + public engineResponse() + { + } + + public engineResponse(string @return) + { + this.@return = @return; + } + } + + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.1.0")] + public interface HisApiChannel : Newtouch.CIS.Proxy.HisApiService.HisApi, System.ServiceModel.IClientChannel + { + } + + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.1.0")] + public partial class HisApiClient : System.ServiceModel.ClientBase, Newtouch.CIS.Proxy.HisApiService.HisApi + { + + public HisApiClient() + { + } + + public HisApiClient(string endpointConfigurationName) : + base(endpointConfigurationName) + { + } + + public HisApiClient(string endpointConfigurationName, string remoteAddress) : + base(endpointConfigurationName, remoteAddress) + { + } + + public HisApiClient(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) : + base(endpointConfigurationName, remoteAddress) + { + } + + public HisApiClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) : + base(binding, remoteAddress) + { + } + + public Newtouch.CIS.Proxy.HisApiService.toChatResponse toChat(Newtouch.CIS.Proxy.HisApiService.toChat request) + { + return base.Channel.toChat(request); + } + + public System.Threading.Tasks.Task toChatAsync(Newtouch.CIS.Proxy.HisApiService.toChat request) + { + return base.Channel.toChatAsync(request); + } + + public Newtouch.CIS.Proxy.HisApiService.deletePresNoResponse deletePresNo(Newtouch.CIS.Proxy.HisApiService.deletePresNo request) + { + return base.Channel.deletePresNo(request); + } + + public System.Threading.Tasks.Task deletePresNoAsync(Newtouch.CIS.Proxy.HisApiService.deletePresNo request) + { + return base.Channel.deletePresNoAsync(request); + } + + public Newtouch.CIS.Proxy.HisApiService.getHisSmsJsonResponse getHisSmsJson(Newtouch.CIS.Proxy.HisApiService.getHisSmsJson request) + { + return base.Channel.getHisSmsJson(request); + } + + public System.Threading.Tasks.Task getHisSmsJsonAsync(Newtouch.CIS.Proxy.HisApiService.getHisSmsJson request) + { + return base.Channel.getHisSmsJsonAsync(request); + } + + public Newtouch.CIS.Proxy.HisApiService.getPwjjResponse getPwjj(Newtouch.CIS.Proxy.HisApiService.getPwjj request) + { + return base.Channel.getPwjj(request); + } + + public System.Threading.Tasks.Task getPwjjAsync(Newtouch.CIS.Proxy.HisApiService.getPwjj request) + { + return base.Channel.getPwjjAsync(request); + } + + public Newtouch.CIS.Proxy.HisApiService.getEngDataStatusResponse getEngDataStatus(Newtouch.CIS.Proxy.HisApiService.getEngDataStatus request) + { + return base.Channel.getEngDataStatus(request); + } + + public System.Threading.Tasks.Task getEngDataStatusAsync(Newtouch.CIS.Proxy.HisApiService.getEngDataStatus request) + { + return base.Channel.getEngDataStatusAsync(request); + } + + public Newtouch.CIS.Proxy.HisApiService.engineResponse engine(Newtouch.CIS.Proxy.HisApiService.engine request) + { + return base.Channel.engine(request); + } + + public System.Threading.Tasks.Task engineAsync(Newtouch.CIS.Proxy.HisApiService.engine request) + { + return base.Channel.engineAsync(request); + } + + public virtual System.Threading.Tasks.Task OpenAsync() + { + return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); + } + + public virtual System.Threading.Tasks.Task CloseAsync() + { + return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); + } + } +} diff --git a/Newtouch.HIS.CIS/Newtouch.CIS.Proxy/Connected Services/HisApiService/HisApiService.svcmap b/Newtouch.HIS.CIS/Newtouch.CIS.Proxy/Connected Services/HisApiService/HisApiService.svcmap new file mode 100644 index 0000000000000000000000000000000000000000..56df485c36ebb1831924cd08f65d6085a5c257de --- /dev/null +++ b/Newtouch.HIS.CIS/Newtouch.CIS.Proxy/Connected Services/HisApiService/HisApiService.svcmap @@ -0,0 +1,28 @@ + + + + false + false + true + + false + false + true + + + + + true + Auto + true + true + + + + + + + + + + \ No newline at end of file diff --git a/Newtouch.HIS.CIS/Newtouch.CIS.Proxy/Newtouch.CIS.Proxy.csproj b/Newtouch.HIS.CIS/Newtouch.CIS.Proxy/Newtouch.CIS.Proxy.csproj index ea12203edf7e40f72e7d72a66583e11ce08ee903..a3d748007159ec5a3cc7be4cb8d3c24c35b19bfe 100644 --- a/Newtouch.HIS.CIS/Newtouch.CIS.Proxy/Newtouch.CIS.Proxy.csproj +++ b/Newtouch.HIS.CIS/Newtouch.CIS.Proxy/Newtouch.CIS.Proxy.csproj @@ -59,6 +59,10 @@ + + + + @@ -72,6 +76,7 @@ + @@ -79,6 +84,11 @@ + + True + True + HisApiService.svcmap + True True @@ -128,6 +138,10 @@ + + WCF Proxy Generator + HisApiService.cs + @@ -151,6 +165,7 @@ + diff --git a/Newtouch.HIS.CIS/Newtouch.CIS.Proxy/app.config b/Newtouch.HIS.CIS/Newtouch.CIS.Proxy/app.config index c6e890ae03a0b0e6ee9568ef8b790cd7bab7d54e..e564042b852efbe30596a894f2358dc51826a088 100644 --- a/Newtouch.HIS.CIS/Newtouch.CIS.Proxy/app.config +++ b/Newtouch.HIS.CIS/Newtouch.CIS.Proxy/app.config @@ -7,6 +7,7 @@ + @@ -23,6 +24,10 @@ + \ No newline at end of file diff --git a/Newtouch.HIS.CIS/Newtouch.CIS.Web/Areas/DoctorManage/Controllers/DoctorsAdviceController.cs b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Areas/DoctorManage/Controllers/DoctorsAdviceController.cs index 9c9e208fe4c400e93c8f47cd20de69d9122acae4..3a3a25363086a8eba723d9c4030c79bbbecdcbba 100644 --- a/Newtouch.HIS.CIS/Newtouch.CIS.Web/Areas/DoctorManage/Controllers/DoctorsAdviceController.cs +++ b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Areas/DoctorManage/Controllers/DoctorsAdviceController.cs @@ -98,6 +98,7 @@ namespace Newtouch.CIS.Web.Areas.DoctorManage.Controllers #endregion 抗生素相关 //影像配置 ViewBag.PACSCode = _sysConfigRepo.GetValueByCode("PACSCode", OrganizeId); + ViewBag.isOpenRationalUse = _sysConfigRepo.GetValueByCode("OpenRationalUse", OrganizeId);//是否开启合理用药 #region 滴速 var frds = _sysConfigRepo.GetValueByCode("frequencyRelDroppingSpeed", OrganizeId); @@ -114,6 +115,7 @@ namespace Newtouch.CIS.Web.Areas.DoctorManage.Controllers public ActionResult AdviceList() { ViewBag.isopenPriorReview = _sysConfigRepo.GetValueByCode("OpenPriorReview", OrganizeId);//是否开启事前审核接口 + ViewBag.isOpenRationalUse = _sysConfigRepo.GetValueByCode("OpenRationalUse", OrganizeId);//是否开启合理用药 return View(); } @@ -121,7 +123,6 @@ namespace Newtouch.CIS.Web.Areas.DoctorManage.Controllers { return View(); } - public ActionResult ZyyzQueryAdviceList() { return View(); diff --git a/Newtouch.HIS.CIS/Newtouch.CIS.Web/Areas/DoctorManage/Controllers/MedicineController.cs b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Areas/DoctorManage/Controllers/MedicineController.cs index 3e205b80c68ebf8e555e828a18d78591e41fe2b9..8d009338d9c95dcc660919b0e7e5006c61239301 100644 --- a/Newtouch.HIS.CIS/Newtouch.CIS.Web/Areas/DoctorManage/Controllers/MedicineController.cs +++ b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Areas/DoctorManage/Controllers/MedicineController.cs @@ -1,10 +1,13 @@ using System; using System.Collections.Generic; using System.Configuration; +using System.Text.RegularExpressions; using System.Web.Mvc; using FrameworkBase.MultiOrg.Domain.IRepository; using FrameworkBase.MultiOrg.Web; using Newtouch.Application.Interface.Inpatient; +using Newtouch.CIS.Proxy.CMMPlatform; +using Newtouch.CIS.Proxy.CMMPlatform.DTO.HLYYRequest; using Newtouch.Common; using Newtouch.Common.Web; using Newtouch.Core.Common.Exceptions; @@ -15,6 +18,7 @@ using Newtouch.Domain.DTO.OutputDto.Inpatient.API; using Newtouch.Domain.DTO.OutputDto.Outpatient; using Newtouch.Domain.Entity; using Newtouch.Domain.IDomainServices; +using Newtouch.Domain.IRepository; using Newtouch.Domain.IRepository.Inpatient; using Newtouch.Domain.ValueObjects.Inpatient; using Newtouch.Domain.ViewModels; @@ -30,7 +34,21 @@ namespace Newtouch.CIS.Web.Areas.DoctorManage private readonly IDoctorserviceApp _doctorserviceApp; private readonly IDoctorserviceDmnService _doctorserviceDmnService; private readonly IQhdZnshSqtxRepo _qhdznshsqtxRepo; - + private readonly IMedicalRecordDmnService _medicalRecordDmnService; + private readonly IInpatientLongTermOrderRepo _inpatientLongTermOrderRepo; + private readonly IInpatientSTATOrderRepo _inpatientSTATOrderRepo; + + + public MedicineController( + IInpatientLongTermOrderRepo inpatientLongTermOrderRepo, + IInpatientSTATOrderRepo _inpatientSTATOrderRepo) + + { + + this._inpatientLongTermOrderRepo = inpatientLongTermOrderRepo; + this._inpatientSTATOrderRepo = _inpatientSTATOrderRepo; + + } public ActionResult SubmitdoctorService(List reqdoctorservices, List deldata) @@ -227,5 +245,167 @@ namespace Newtouch.CIS.Web.Areas.DoctorManage return Success(response); } + + /// + /// 获取医嘱合理用药信息接口 + /// + /// + /// + /// + /// + /// + public ActionResult GetYzHlyy(List reqdoctorservices, string yzh) + { + // 创建一个外部的 request 实例,只需要一个 + var request = new EngineReq + { + Type = "prescription", + Patient = new PatientRecord + { + DepartID = "", + Department = "", + BedNo = "", + PresType = "医嘱", + PresSource = "住院", + PresDatetime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), + PayType = "", + PatientNo = "", + PresNo = "", + Name = "", + DiagnoseID = "", + Diagnose = "", + IDCard = "", + Address = "", + PhoneNo = "", + Age = "", + Sex = "", + Height = "", + Weight = "", + BirthWeight = "", + PreviousHistory = "", + NowMedicalHistory = "", + Ccr = "", + Anaphylactogen = "", + AllergicHistory = "", + Pregnancy = "", + TimeOfPreg = "", + Disease = "2", + BreastFeeding = "", + Dialysis = "", + ProxName = "", + ProxIDCard = "", + DocID = "", + DocName = "", + TotalAmount = "", + }, + Operation = new Operation + { + OperationCode = "", + OperationName = "", + OperationStartTime = "", + OperationEndTime = "", + IncisionType = "", + IncisionStatus = "", + Inplant = "false" + }, + }; + + var prescriptions = new List(); + foreach (var doctorServiceRequestDto in reqdoctorservices) + { + string yzId = null; + var yzlx = doctorServiceRequestDto.yzlb; + + // 根据医嘱类型获取 yzId + if (yzlx.Equals("长")) + { + var entity = _inpatientLongTermOrderRepo.FindEntity(p => + p.yzh == yzh && p.zt == "1" && p.OrganizeId == OrganizeId); + yzId = entity.Id; + } + else if (yzlx.Equals("临")) + { + var entity = _inpatientSTATOrderRepo.FindEntity(p => + p.yzh == yzh && p.zt == "1" && p.OrganizeId == OrganizeId); + yzId = entity.Id; + } + + var zyh = doctorServiceRequestDto.zyh; + var data = _doctorserviceApp.GetYZDetail(zyh, yzId, yzlx, OrganizeId); + var orgId = XMLSerializer.GenerateShortUUIDFromString(OrganizeId); + + // 更新 patient 信息 + request.Patient.DepartID = data.patientInfo.ksdm; + request.Patient.Department = data.patientInfo.ksmc; + request.Patient.PatientNo = data.patientInfo.zyh + '_' + orgId; + request.Patient.PresNo = yzId; + request.Patient.Name = data.patientInfo.xm; + request.Patient.Diagnose = string.Join("|", data.patientInfo.zdmc); + request.Patient.Age = data.patientInfo.age + "岁0月"; + request.Patient.Sex = data.patientInfo.sex; + request.Patient.DocID = data.patientInfo.ysgh; + request.Patient.DocName = data.patientInfo.ysxm; + + var pres = new Prescription(); + // 循环添加 prescriptions + data.DoctorServiceUIRequestDto.ForEach(val => + { + var ypjx = _medicalRecordDmnService.GetYpjx(val.xmdm, UserIdentity.OrganizeId); + pres = new Prescription + { + Drug = val.xmdm + '_' + orgId, + DrugName = val.xmmc, + RegName = val.xmmc, + Specification = val.ypjl + val.dw, + Package = val.ypgg, + Quantity = val.sl, + PackUnit = val.dw, + UnitPrice = "", + Amount = "", + GroupNo = val.zh.ToString(), // 表示同组 + FirstUse = "", + PrepForm = ypjx ?? "", + AdminRoute = val.yfmcval, + AdminArea = "无", + AdminFrequency = val.pcmc, + AdminDose = val.ypjl+val.dw, + AdminMethod = "", + Type = yzlx, + AdminGoal = "", + DocID = data.patientInfo.ysgh, + DocName = data.patientInfo.ysxm, + DocTitle = "", + DepartID = "", + Department = data.patientInfo.ksmc, + NurseName = "", + StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), + EndTime = DateTime.Now.AddDays(val.ts.ToDouble()).ToString("yyyy-MM-dd HH:mm:ss"), + SpecialPromote = "", + ContinueDays = val.ts.ToString() + }; + + }); + prescriptions.Add(pres); + } + // 把 prescriptions 添加到 request + request.Prescriptions = prescriptions; + var hlyyProxy = new HlyyProxy(); + var engineRes = hlyyProxy.engine(request); + return Success("查询成功", engineRes); + } + + /// + /// 获取合理用药药品说明书 + /// + /// + /// + public ActionResult GetHlyySms(string drugId) + { + var hlyyProxy = new HlyyProxy(); + var hisSmsJson = hlyyProxy.GetHisSmsJson(drugId); + return Success("查询成功", hisSmsJson); + } + + } } \ No newline at end of file diff --git a/Newtouch.HIS.CIS/Newtouch.CIS.Web/Areas/DoctorManage/Views/DoctorsAdvice/AdviceList.cshtml b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Areas/DoctorManage/Views/DoctorsAdvice/AdviceList.cshtml index c5911dc4b98d29fbe1463daa4a17ee4a5abcb4ab..2b5b70ddd1d613efaff5372945a9438e07457b5f 100644 --- a/Newtouch.HIS.CIS/Newtouch.CIS.Web/Areas/DoctorManage/Views/DoctorsAdvice/AdviceList.cshtml +++ b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Areas/DoctorManage/Views/DoctorsAdvice/AdviceList.cshtml @@ -11,6 +11,7 @@ //获取打印处方配置 var zycfdPrinturl = SysConfigReader.OrgReportLink("zycfdPrint"); //处方单 var isopenPriorReview = (ViewBag.isopenPriorReview); + var isOpenRationalUse = (ViewBag.isOpenRationalUse); //是否开启合理用药审核接口 var reportUrl = Newtouch.Core.Common.Utils.ConfigurationHelper.GetAppConfigValue("ReportUrl"); var ReportSystemCode = Newtouch.Core.Common.Utils.ConfigurationHelper.GetAppConfigValue("ReportSystemCode"); var curOpr = Newtouch.Common.Operator.OperatorProvider.GetCurrent(); @@ -44,88 +45,88 @@ }
-
- - - - - - - - - - - - -
- - - - | - - - 医嘱类型: - - - - @*
*@ -
- - - - -
-
开始日期: - - 结束日期: - - - -
-
-
-
-
-
-
-
- - +
+
+ + + + + + + + + + + +
+ + + + | + + + 医嘱类型: + + + + @*
*@ +
+ + + + +
+
开始日期: + + 结束日期: + + + +
+
+
+
+
+
+
+
+ + - + - - - - - - -
执行长期/临时执行长期/临时 作废临时 - - 停止长期 - - 未执行长期/临时
-
-
院内报告
-
- @*
*@ - @Html.Partial("_BottomButtonsYzPrintView", new Newtouch.HIS.Web.Core.Models.BottomButtonViewModel() -{ - - ShowKeyList = new int[] { 2, 3, 9, 6, 7 ,8}, - //F5Text = "测试病案审核", - F7Text = "转区全停", - F6Text = "出院全停", - F2Text = "打印长期", - F3Text = "打印临时", - F9Text = "三测单", - F8Text="打印精麻" - , - F10Text = "测试病案审核" -}) + @Html.Partial("_BottomButtonsYzPrintView", new Newtouch.HIS.Web.Core.Models.BottomButtonViewModel() + { + + ShowKeyList = new int[] { 2, 3, 9, 6, 7 ,8}, + //F5Text = "测试病案审核", + F7Text = "转区全停", + F6Text = "出院全停", + F2Text = "打印长期", + F3Text = "打印临时", + F9Text = "三测单", + F8Text="打印精麻" + , + F10Text = "测试病案审核" + }) + +@* 合理用药模块 *@ +
@@ -346,8 +368,12 @@ @*if (rowObject["yzlx"]==@Html.Raw(((int)EnumYzlx.jc).ToString())||rowObject["yzlx"]==@Html.Raw(((int)EnumYzlx.jy).ToString())) {*@ return "删除"; } - return "修改| 删除" - } else if (rowObject["yzzt"] ==@Html.Raw(((int)EnumYzzt.DC).ToString())) {//撤DC + var result = "修改 | " + + "删除"; + + return result; + + } else if (rowObject["yzzt"] ==@Html.Raw(((int)EnumYzzt.DC).ToString())) {//撤DC return "撤DC"; @@ -593,6 +619,30 @@ } }); } + + //合理用药查询 + function adviceuse(yzId, yzlx, yzlb) { + if ('@(isOpenRationalUse)' === 'ON'){ + $.ajax({ + url: "/DoctorManage/Medicine/GetYzHlyy", + dataType: "json", + data: { zyh: currentobj.zyh, yzid: yzId, yzlx: yzlb}, + type: "POST", + cache: false, + async: false, + success: function (reqdata) { + if (reqdata) { + if (reqdata.message != "") { + HlyyDrugInfo(reqdata.data); + $('#drugInfoModal').modal('show'); + } else { + $.modalMsg(reqdata.message, 'error'); + } + } + } + }); + } + } //修改 function advicemodify(yzId, yzlx, yzlb) { //审核单据修改第一种应用场景 @@ -953,5 +1003,74 @@ $('.contentPanel').on('click', function () { cfLeftFloatHide(); }); + + + function HlyyDrugInfo(Data) { + $("#HlyydrugGrid").clearGridData(); // 清空数据 + var $HlyydrugGrid = $("#HlyydrugGrid"); + // 定义表格列模型 + var drugColModel = [ + { label: '组号', name: 'GroupNo', align: 'center', width: 100 }, + { label: '药品名称', name: 'DrugName', align: 'center', width: 150, + formatter: function (cellValue, options, rowObject) { + // 创建药品名称的超链接,点击时传入drugId + return '' + cellValue + ''; + }}, + { label: '给药途径', name: 'AdminRoute', align: 'center', width: 100 }, + { label: '给药频率', name: 'AdminFrequency', align: 'center', width: 100 }, + { label: '错误信息', name: 'MessageText', align: 'center', width: 250 }, + { label: '建议', name: 'Advice', align: 'center', width: 200 }, + { label: '来源', name: 'Source', align: 'center', width: 100 }, + { label: '错误类型', name: 'Type', align: 'center', width: 100 } + ]; + const cfStateMap = { + "1": "审核中", + "0": "已审核", + "2": "不通过" + }; + const auditStatus = cfStateMap[Data.Cfstate] || "未知状态"; + let statusColor; + let fontSize = "16px"; // 默认字体大小 + switch (Data.Cfstate) { + case "1": // 审核中 + statusColor = "orange"; // + break; + case "0": // 已审核 + statusColor = "green"; + break; + case "2": //不通过 + statusColor = "red"; + break; + default: + statusColor = "gray"; // 未知状态 + break; + } + $("#hlyyauditStatus").html("审核状态: " + auditStatus + ""); + // 创建并填充药品详情表格 + $HlyydrugGrid.newtouchLocalDataGrid({ + unwritten: false, + caption: "药品信息详情", + colModel: drugColModel, + shrinkToFit: true, + }, Data.Message.Infos.InfoList.length > 0 ?Data.Message.Infos.InfoList : [{/* Empty row to show column headers */ }]); + + } + function getYpsms(drugId) { + // 在这里执行点击事件的逻辑 + $.najax({ + url: "/MedicalRecord/GetypSms", + data: {drugId: drugId}, + type: "POST", + success: function (data) { + if(data.state && data.state === 'success' && !(data.data === false)){ + $.modalAlert(data.data, 'success') + } + else{ + $.modalAlert("发送失败", 'error'); + } + } + }); + + } diff --git a/Newtouch.HIS.CIS/Newtouch.CIS.Web/Areas/DoctorManage/Views/DoctorsAdvice/AdviceListLook.cshtml b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Areas/DoctorManage/Views/DoctorsAdvice/AdviceListLook.cshtml index 60ac14880bc963da47cfcba410ddef4c5dce24a0..e2d53442c095a85a4b3d57d639f833637fc1fcc3 100644 --- a/Newtouch.HIS.CIS/Newtouch.CIS.Web/Areas/DoctorManage/Views/DoctorsAdvice/AdviceListLook.cshtml +++ b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Areas/DoctorManage/Views/DoctorsAdvice/AdviceListLook.cshtml @@ -6,6 +6,7 @@ var isShowSign = SysConfigReader.String("IS_ShowSigner"); //时间 var kssj = ViewData["kssj"]; + var curOpr = Newtouch.Common.Operator.OperatorProvider.GetCurrent(); }
@@ -141,9 +142,9 @@ postData: Querydata, dataType: "json", height: $(window).height() - 155, - width: $(".Newtouch_iframe", parent.document).width() - $(".dv-left").width() - 25, - autowidth: false,//根据父容器宽度自适应调整 - shrinkToFit: true, + // width: $(".Newtouch_iframe", parent.document).width() - $(".dv-left").width() - 25, + autowidth: true,//根据父容器宽度自适应调整 + shrinkToFit: false,//滚动条 //unwritten: false, //multiselect: true, colModel: [ diff --git a/Newtouch.HIS.CIS/Newtouch.CIS.Web/Areas/NurseManage/Views/InpatientList/InHosBlWriting.cshtml b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Areas/NurseManage/Views/InpatientList/InHosBlWriting.cshtml new file mode 100644 index 0000000000000000000000000000000000000000..f391d3b6a13262c8ac4f0b1612a32d6d60f6bb2a --- /dev/null +++ b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Areas/NurseManage/Views/InpatientList/InHosBlWriting.cshtml @@ -0,0 +1,76 @@ +@using Newtouch.Infrastructure; +@{ + ViewBag.Title = "护士站患者中心-电子病历患者一览"; +} + +
+ +
+ diff --git a/Newtouch.HIS.CIS/Newtouch.CIS.Web/Areas/NurseManage/Views/InpatientList/InHosBookkeep.cshtml b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Areas/NurseManage/Views/InpatientList/InHosBookkeep.cshtml new file mode 100644 index 0000000000000000000000000000000000000000..50dafd4bb9b4be7003e216712d0123c3ba353f33 --- /dev/null +++ b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Areas/NurseManage/Views/InpatientList/InHosBookkeep.cshtml @@ -0,0 +1,72 @@ +@using Newtouch.Infrastructure; +@{ + ViewBag.Title = "护士站患者中心-住院记账"; +} + +
+ +
+ diff --git a/Newtouch.HIS.CIS/Newtouch.CIS.Web/Areas/NurseManage/Views/InpatientList/InHosFee.cshtml b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Areas/NurseManage/Views/InpatientList/InHosFee.cshtml new file mode 100644 index 0000000000000000000000000000000000000000..e4627cc46208078bbce636b874e3642296096aa0 --- /dev/null +++ b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Areas/NurseManage/Views/InpatientList/InHosFee.cshtml @@ -0,0 +1,124 @@ +@using Newtouch.Infrastructure; +@{ + ViewBag.Title = "护士站患者中心-费用一日清"; + var reportUrl = Newtouch.Core.Common.Utils.ConfigurationHelper.GetAppConfigValue("ReportUrl"); + var ReportSystemCode = Newtouch.Core.Common.Utils.ConfigurationHelper.GetAppConfigValue("ReportSystemCode"); + var opr = Newtouch.Common.Operator.OperatorProvider.GetCurrent(); +} + + +
+
+ + + + + + + + + + + + + + + + +
住院号: + + 开始日期: + + 结束日期: + + 入院日期:

+ + + + +
+
+ +
+ diff --git a/Newtouch.HIS.CIS/Newtouch.CIS.Web/Areas/NurseManage/Views/InpatientList/InHosFeeRefund.cshtml b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Areas/NurseManage/Views/InpatientList/InHosFeeRefund.cshtml new file mode 100644 index 0000000000000000000000000000000000000000..5c1221087b51b2f37efb4e603da4316a94e7b7f2 --- /dev/null +++ b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Areas/NurseManage/Views/InpatientList/InHosFeeRefund.cshtml @@ -0,0 +1,81 @@ +@using Newtouch.Infrastructure; +@{ + ViewBag.Title = "护士站患者中心-住院退费"; +} + +
+ +
+ diff --git a/Newtouch.HIS.CIS/Newtouch.CIS.Web/Areas/NurseManage/Views/InpatientList/InHosMedReturn.cshtml b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Areas/NurseManage/Views/InpatientList/InHosMedReturn.cshtml new file mode 100644 index 0000000000000000000000000000000000000000..ded6ea9556c0395cb89c110d8cedb006387d1e3b --- /dev/null +++ b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Areas/NurseManage/Views/InpatientList/InHosMedReturn.cshtml @@ -0,0 +1,334 @@ +@using Newtouch.Infrastructure; +@{ + ViewBag.Title = "护士站患者中心-医嘱退药"; + var tysqPrinturl = SysConfigReader.OrgReportLink("tysqdPrint");//门诊常规项目处方单 +} +
+
+ +
+ + + + + + + + + + + + + @**@ + +
药名: + + 开始日期: + + 结束日期: + + + + + +
+
+
+
+
+
+
+
+ +
+ +
+
+ diff --git a/Newtouch.HIS.CIS/Newtouch.CIS.Web/Areas/NurseManage/Views/InpatientList/InHosNursingInput.cshtml b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Areas/NurseManage/Views/InpatientList/InHosNursingInput.cshtml new file mode 100644 index 0000000000000000000000000000000000000000..a5d5a5ce9ac8005cb1c7f6eeacf25ffb2269df7a --- /dev/null +++ b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Areas/NurseManage/Views/InpatientList/InHosNursingInput.cshtml @@ -0,0 +1,772 @@ +@using Newtouch.Infrastructure; +@{ + ViewBag.Title = "护士站患者中心-多病人体温录入"; + var reportUrl = Newtouch.Core.Common.Utils.ConfigurationHelper.GetAppConfigValue("ReportUrl"); + var ReportSystemCode = Newtouch.Core.Common.Utils.ConfigurationHelper.GetAppConfigValue("ReportSystemCode"); + var opr = Newtouch.Common.Operator.OperatorProvider.GetCurrent(); + var MutipatientNursingInputFlag = SysConfigReader.String("MutipatientNursingInputFlag"); + var ScdCode = SysConfigReader.String("ScdTimePoint"); +} + + +
+
+ + + + + + + +
*日期: + + *时间点: +
+ @if (@ScdCode == "1") + { + + + + + + + } + else + { + + + + + + + } + +
+
+
+
+
+
+
说明:血压测量单位:mmHg;摄入摄出测量单位:ml
+ @Html.Partial("_BottomButtonsView", new Newtouch.HIS.Web.Core.Models.BottomButtonViewModel() +{ + ShowKeyList = new int[] { 4, 8 }, + F8Text = "提交" +}) +
+ diff --git a/Newtouch.HIS.CIS/Newtouch.CIS.Web/Areas/NurseManage/Views/InpatientList/InHosPrint.cshtml b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Areas/NurseManage/Views/InpatientList/InHosPrint.cshtml new file mode 100644 index 0000000000000000000000000000000000000000..e933dacea81f8099a9f00c047b54bad273952483 --- /dev/null +++ b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Areas/NurseManage/Views/InpatientList/InHosPrint.cshtml @@ -0,0 +1,559 @@ +@using Newtouch.Infrastructure; +@{ + ViewBag.Title = "护士站患者中心-执行单打印"; + var isShowSign = SysConfigReader.String("IS_ShowSigner"); + var reportUrl = Newtouch.Core.Common.Utils.ConfigurationHelper.GetAppConfigValue("ReportUrl"); + var ReportSystemCode = Newtouch.Core.Common.Utils.ConfigurationHelper.GetAppConfigValue("ReportSystemCode"); + var curOpr = Newtouch.Common.Operator.OperatorProvider.GetCurrent(); + var ypbjyfpz = SysConfigReader.String("ypbjyfpz");//输液标签 +} + +
+ + @* + + + + + + + + + + + *@ + + + + + + + + @**@ + + + +
姓名:性别:年龄:
执行日期: + + + - + + + 执行类别: + + + + + + + + + + + 打印 + +
+
+ +
+
+
+
+
+
+
+
+ +
+ diff --git a/Newtouch.HIS.CIS/Newtouch.CIS.Web/Areas/NurseManage/Views/InpatientList/InHosQueryIndex.cshtml b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Areas/NurseManage/Views/InpatientList/InHosQueryIndex.cshtml new file mode 100644 index 0000000000000000000000000000000000000000..3994ba89fa092e0d20159577e2f699e269f51126 --- /dev/null +++ b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Areas/NurseManage/Views/InpatientList/InHosQueryIndex.cshtml @@ -0,0 +1,409 @@ +@using Newtouch.Infrastructure; +@{ + ViewBag.Title = "护士站患者中心-体温单录入"; + var reportUrl = Newtouch.Core.Common.Utils.ConfigurationHelper.GetAppConfigValue("ReportUrl"); + var ReportSystemCode = Newtouch.Core.Common.Utils.ConfigurationHelper.GetAppConfigValue("ReportSystemCode"); + var opr = Newtouch.Common.Operator.OperatorProvider.GetCurrent(); +} + +
+
+
+ +
+ + + + + + + + + + + + + + + + + @**@ + @* + *@ + @* + *@ + + + + +
姓名: + + 性别: + + 病区: + + 年龄: + +
日期: + + + + *病区: + +
+   + +   + +   + +   + +   + + + +
+
+
+
+
+
+ @*
*@ +
+
+ diff --git a/Newtouch.HIS.CIS/Newtouch.CIS.Web/Areas/NurseManage/Views/InpatientList/InHosRecallOutArea.cshtml b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Areas/NurseManage/Views/InpatientList/InHosRecallOutArea.cshtml new file mode 100644 index 0000000000000000000000000000000000000000..dbc8e667397f55e123ec52caea151b3bd6490d4a --- /dev/null +++ b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Areas/NurseManage/Views/InpatientList/InHosRecallOutArea.cshtml @@ -0,0 +1,182 @@ +@using Newtouch.Infrastructure; +@{ + ViewBag.Title = "护士站患者中心-出区召回"; + var reportUrl = Newtouch.Core.Common.Utils.ConfigurationHelper.GetAppConfigValue("ReportUrl"); + var ReportSystemCode = Newtouch.Core.Common.Utils.ConfigurationHelper.GetAppConfigValue("ReportSystemCode"); + var opr = Newtouch.Common.Operator.OperatorProvider.GetCurrent(); +} + + +
+
+
+ +
+ + + + + + + + + + + +
姓名: + + 开始日期: + + 结束日期: + + + +
+
+
+
+
+
+
+
+
+ diff --git a/Newtouch.HIS.CIS/Newtouch.CIS.Web/Areas/NurseManage/Views/InpatientList/InHosRegistration.cshtml b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Areas/NurseManage/Views/InpatientList/InHosRegistration.cshtml new file mode 100644 index 0000000000000000000000000000000000000000..b91be214caf85dd25b104c594811331a008cd160 --- /dev/null +++ b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Areas/NurseManage/Views/InpatientList/InHosRegistration.cshtml @@ -0,0 +1,873 @@ +@model dynamic +@using Newtouch.Infrastructure +@{ + ViewBag.Title = "护士站患者中心-入区登记"; +} + + +
+
+
+ + +
    +
    +
    +
    + + + + + + + + + + + + +
      患者信息:  姓名:  性别:  住院号:    床位显示: + +   + + +
    +
    +
    +
      +
      + @**@ +
      +
      + diff --git a/Newtouch.HIS.CIS/Newtouch.CIS.Web/Areas/NurseManage/Views/InpatientList/IndexCenter.cshtml b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Areas/NurseManage/Views/InpatientList/IndexCenter.cshtml new file mode 100644 index 0000000000000000000000000000000000000000..80cf9c897430676be8d140daf1441f778ee0e38a --- /dev/null +++ b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Areas/NurseManage/Views/InpatientList/IndexCenter.cshtml @@ -0,0 +1,371 @@ +@using Newtouch.Infrastructure +@{ + ViewBag.Title = "护士站患者中心"; + Layout = "~/Views/Shared/_Index.cshtml"; +} + + + + + + + +
      +
      + + + + + + + + + + + + +
      姓名/住院号: + +
      在院状态: + +
      +
      +
      +
      +
      + @*导航栏*@ + +
      +
      + @Html.Partial("MedicalorderQuery")@*医嘱查询*@ + @Html.Partial("~/Areas/NurseManage/Views/InpatientList/OrderAudit.cshtml")@*医嘱审核*@ + @Html.Partial("~/Areas/NurseManage/Views/InpatientList/OrderExecution.cshtml")@*医嘱执行*@ + @Html.Partial("~/Areas/NurseManage/Views/InpatientList/InHosMedReturn.cshtml")@*医嘱退药*@ + @Html.Partial("~/Areas/NurseManage/Views/InpatientList/InHosBookkeep.cshtml")@*住院记账*@ + @Html.Partial("~/Areas/NurseManage/Views/InpatientList/InHosFeeRefund.cshtml")@*住院退费*@ + @Html.Partial("~/Areas/NurseManage/Views/InpatientList/InHosFee.cshtml")@*费用一日清*@ + @Html.Partial("~/Areas/NurseManage/Views/InpatientList/InHosPrint.cshtml")@*执行单打印*@ + @Html.Partial("~/Areas/NurseManage/Views/InpatientList/InHosBlWriting.cshtml")@*病历文书*@ + @Html.Partial("~/Areas/NurseManage/Views/InpatientList/InHosRegistration.cshtml")@*入区登记*@ + @Html.Partial("~/Areas/NurseManage/Views/InpatientList/InHosRecallOutArea.cshtml")@*患者出区*@ + @Html.Partial("~/Areas/NurseManage/Views/InpatientList/InHosQueryIndex.cshtml")@*体温单录入*@ + @Html.Partial("~/Areas/NurseManage/Views/InpatientList/InHosNursingInput.cshtml")@*多体温单录入*@ +
      +
      +
      + + diff --git a/Newtouch.HIS.CIS/Newtouch.CIS.Web/Areas/NurseManage/Views/InpatientList/Inpatient.cshtml b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Areas/NurseManage/Views/InpatientList/Inpatient.cshtml index 389daf85a86ff9c60fd120b63b8c97e5dddd8dd8..5a456c4b3db9ed327651996da2eb2b8fd127798d 100644 --- a/Newtouch.HIS.CIS/Newtouch.CIS.Web/Areas/NurseManage/Views/InpatientList/Inpatient.cshtml +++ b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Areas/NurseManage/Views/InpatientList/Inpatient.cshtml @@ -1,7 +1,7 @@  @model dynamic @{ - ViewBag.Title = "患者一览"; + ViewBag.Title = "护士患者一览"; Layout = "~/Views/Shared/_Index.cshtml"; var pacsHost = SiteUrl.GetUrl("OuterPacsServiceHost", ""); //长期医嘱打印单是否显示签名 @@ -235,7 +235,7 @@
      + + diff --git a/Newtouch.HIS.CIS/Newtouch.CIS.Web/Areas/NurseManage/Views/InpatientList/OrderAudit.cshtml b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Areas/NurseManage/Views/InpatientList/OrderAudit.cshtml new file mode 100644 index 0000000000000000000000000000000000000000..ad3295cdfdaaddf859a37855038e8a13ba042f2a --- /dev/null +++ b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Areas/NurseManage/Views/InpatientList/OrderAudit.cshtml @@ -0,0 +1,538 @@ +@using Newtouch.Infrastructure; +@{ + ViewBag.Title = "护士站患者中心-医嘱审核"; +} + + + + diff --git a/Newtouch.HIS.CIS/Newtouch.CIS.Web/Areas/NurseManage/Views/InpatientList/OrderExecution.cshtml b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Areas/NurseManage/Views/InpatientList/OrderExecution.cshtml new file mode 100644 index 0000000000000000000000000000000000000000..375c7f26fccea24b1a53fcc674d4affd8acc6c1b --- /dev/null +++ b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Areas/NurseManage/Views/InpatientList/OrderExecution.cshtml @@ -0,0 +1,733 @@ +@using Newtouch.Infrastructure; +@{ + ViewBag.Title = "护士站患者中心-医嘱执行"; + //欠费医嘱执行开关 + var ISOpenqfswith = (ViewBag.isqfswith); + var reportUrl = Newtouch.Core.Common.Utils.ConfigurationHelper.GetAppConfigValue("ReportUrl"); + var ReportSystemCode = Newtouch.Core.Common.Utils.ConfigurationHelper.GetAppConfigValue("ReportSystemCode"); + var curOpr = Newtouch.Common.Operator.OperatorProvider.GetCurrent(); +} + +
      +
      + + + + + + + @**@ + @**@ + +
      执行日期: + + 执行时间: + + + + + + +
      +
      +
      + +
      + + + + +
      + +
      +
      + +
      +
      +
      +
      +
      + +
      + diff --git a/Newtouch.HIS.CIS/Newtouch.CIS.Web/Areas/NurseManage/Views/InpatientMedReturn/Index.cshtml b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Areas/NurseManage/Views/InpatientMedReturn/Index.cshtml index ea4f4b99fb5a4f8e435a9b98e33fdcf16f3b594a..ef3cd3ca846823aab343b530a17020ffd086eda7 100644 --- a/Newtouch.HIS.CIS/Newtouch.CIS.Web/Areas/NurseManage/Views/InpatientMedReturn/Index.cshtml +++ b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Areas/NurseManage/Views/InpatientMedReturn/Index.cshtml @@ -10,18 +10,18 @@ -
      +
      -
      +
      病历详情 @@ -111,15 +111,15 @@ - + 中医诊断: @@ -134,12 +134,38 @@
      - - + + 症候
      + + 处方模板组套: + + + + +     + + 处方类型: + + + + + +
      +
      +
      +
      - +
      *模板名称: @@ -149,6 +175,7 @@
      + @Html.Partial("_BottomButtonsView", new Newtouch.HIS.Web.Core.Models.BottomButtonViewModel() { @@ -165,10 +192,12 @@ \ No newline at end of file diff --git a/Newtouch.HIS.CIS/Newtouch.CIS.Web/Areas/TemplateManage/Views/PresTemplate/PresTemplateDetail.cshtml b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Areas/TemplateManage/Views/PresTemplate/PresTemplateDetail.cshtml index c08dfbf57cbac6c99161d20cdffc1571615f360d..15ef8607eebaf831f8f6c4c3d2b0d9d637bd1f34 100644 --- a/Newtouch.HIS.CIS/Newtouch.CIS.Web/Areas/TemplateManage/Views/PresTemplate/PresTemplateDetail.cshtml +++ b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Areas/TemplateManage/Views/PresTemplate/PresTemplateDetail.cshtml @@ -116,6 +116,7 @@ $.modalAlert("请选择明细进行复制", 'warning'); return; } + debugger var newMxList = new Array(); $.each(data, function () { var thisMxId = this.mxId; @@ -128,6 +129,7 @@ }); templatePresData.mbmxList = newMxList; callback(templatePresData); + } diff --git a/Newtouch.HIS.CIS/Newtouch.CIS.Web/Content/js/page.common.js b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Content/js/page.common.js index 991d5190c5927758ae151381ef2efd3f1daedb6f..aab7c761f74eba67b9b5b19990919892e30d89f7 100644 --- a/Newtouch.HIS.CIS/Newtouch.CIS.Web/Content/js/page.common.js +++ b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Content/js/page.common.js @@ -472,7 +472,47 @@ $.fn.ksFloatingSelector = function (options) { $(this).newtouchFloatingSelector(options); } +//处方模板浮层 +$.fn.cfzutaoFloatingSelector12 = function (options) { + //默认options + var defaults = { + width: 350, + height: 280, + focusautotrigger: true, + caption: "选择组套", + url: '/PresTemplate/GetCfmbList', + ajaxparameters: function ($thisinput) { + return "mblx="+ options.mblx + "&cflx="+options.cflx+"&expandCflx=null&mbKeyword=" + $.trim($thisinput.val()); + }, + itemdbclickhandler: null, + colModel: [ + { label: 'cfmbId', name: 'mbId', hidden: true }, + { label: '模板名称', name: 'mbmc', widthratio: 30 }, + { + label: '处方类型', + name: 'cflx', + widthratio: 20, + formatter: function(value, options, row) { + // 将数字值转换为汉字 + const prescriptionTypes = { + 1: "西药处方", + 2: "中药处方", + 3: "检验处方", + 4: "检查处方", + 5: "康复处方", + 6: "常规项目处方", + }; + return prescriptionTypes[value] || "未知类型"; // 默认值为 "未知类型" + } + }, + { label: '描述', name: 'Description', widthratio: 30, hidden: true}, + { label: '注意事项', name: 'Remark', widthratio: 30 ,hidden: true} + ] + }; + var options = $.extend(defaults, options); + $(this).newtouchFloatingSelector(options); +} //组套 浮层选择器 $.fn.zutaoFloatingSelector = function (options) { @@ -594,6 +634,7 @@ $.fn.ztFloatingSelector = function (options) { //诊断 $.fn.zdFloatingSelector = function (options) { + debugger; var defaults = { url: '/SystemManage/SysBaseData/GetDiagnosisList', width: 600, @@ -610,7 +651,7 @@ $.fn.zdFloatingSelector = function (options) { }, itemdbclickhandler: null, colModel: [ - { label: '代码', name: 'zdCode', hidden: true }, + { label: '代码', name: 'zdCode', hidden: true}, { label: '名称', name: 'zdmc', widthratio: 60 }, { label: '拼音', name: 'py', widthratio: 20 }, { label: 'icd10', name: 'icd10', widthratio: 20 }, diff --git a/Newtouch.HIS.CIS/Newtouch.CIS.Web/Controllers/HomeController.cs b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Controllers/HomeController.cs index 95a627da8021d77a355171763db2c002f8f78300..d31ed7aa77b47fe6deb4d21cebd6890bc57e8229 100644 --- a/Newtouch.HIS.CIS/Newtouch.CIS.Web/Controllers/HomeController.cs +++ b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Controllers/HomeController.cs @@ -1,4 +1,5 @@ -using FrameworkBase.MultiOrg.Domain.IDomainServices; +using System; +using FrameworkBase.MultiOrg.Domain.IDomainServices; using Newtouch.Common; using Newtouch.Domain.IDomainServices; using Newtouch.Domain.ViewModels; @@ -7,6 +8,7 @@ using Newtouch.Tools; using System.Collections.Generic; using System.Linq; using System.Web.Mvc; +using FrameworkBase.MultiOrg.Domain.IRepository; namespace Newtouch.CIS.Web.Controllers { @@ -17,6 +19,7 @@ namespace Newtouch.CIS.Web.Controllers { private readonly ISysUserDmnService _sysUserDmnService; private readonly IOrderExecutionDmnService _OrderExecutionDmnService; + private readonly ISysConfigRepo _sysConfigRepo; /// /// @@ -91,5 +94,27 @@ namespace Newtouch.CIS.Web.Controllers } return Error("已读状态更新失败"); } + + public ActionResult SyncSysConfigParams(string orgId) + { + //基础数据 + var sysConfigBaseEntities = _sysConfigRepo.GetList("", "*").ToList(); + //组织机构自带数据 + var sysConfigEntities = _sysConfigRepo.GetList("", orgId).ToList(); + //根据code 去重 + var sysConfigCodes = new HashSet(sysConfigEntities.Select(entity => entity.Code)); + var filteredEntities = sysConfigBaseEntities + .Where(baseEntity => !sysConfigCodes.Contains(baseEntity.Code)) + .ToList(); + foreach (var item in filteredEntities) + { + item.Id = Guid.NewGuid().ToString(); + item.OrganizeId = orgId; + item.LastModifyTime = DateTime.Now; + } + var insert = _sysConfigRepo.Insert(filteredEntities); + return Success("",insert); + } + } } diff --git a/Newtouch.HIS.CIS/Newtouch.CIS.Web/Controllers/MainBusinessController.cs b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Controllers/MainBusinessController.cs index b043918004a4d42d69d7282c3baf3ada6cf3338d..555287c3c05c359ed256de675cd70d007ee10eb0 100644 --- a/Newtouch.HIS.CIS/Newtouch.CIS.Web/Controllers/MainBusinessController.cs +++ b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Controllers/MainBusinessController.cs @@ -40,6 +40,7 @@ namespace Newtouch.CIS.Web.Controllers ViewBag.ISOpenKfcf = _sysConfigRepo.GetBoolValueByCode("openKfcf", this.OrganizeId); //开关:门诊是否开放常规项目处方 ViewBag.ISOpenCgxmcf = _sysConfigRepo.GetBoolValueByCode("openCgxmcf", this.OrganizeId); + ViewBag.isOpenRationalUse = _sysConfigRepo.GetValueByCode("OpenRationalUse", OrganizeId);//是否开启合理用药 //开关:门诊是否开放中药处方 ViewBag.ISOpenZycf = _sysConfigRepo.GetBoolValueByCode("openZycf", this.OrganizeId); ViewBag.ISOpenZycfnew = _sysConfigRepo.GetBoolValueByCode("openZycfnew", this.OrganizeId); @@ -99,7 +100,7 @@ namespace Newtouch.CIS.Web.Controllers ViewBag.OrganizeCodeSd = _organizeDmnService.GetCodeByOrgId(OrganizeId); //ViewBag.OrganizeCodeSd = Core.Common.Utils.ConfigurationHelper.GetAppConfigValue("OrganizeCodeSd"); ViewBag.RemoteTreatRPTURL = Core.Common.Utils.ConfigurationHelper.GetAppConfigValue("RemoteTreatRPTURL"); - + #region 滴速 var frds = _sysConfigRepo.GetValueByCode("frequencyRelDroppingSpeed", OrganizeId); diff --git a/Newtouch.HIS.CIS/Newtouch.CIS.Web/Controllers/MedicalRecordController.cs b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Controllers/MedicalRecordController.cs index 8341bcd2e3b9469183b486947d018ad9b744b1e3..892c1fdc94a363149c8c2c06fc78331d652686af 100644 --- a/Newtouch.HIS.CIS/Newtouch.CIS.Web/Controllers/MedicalRecordController.cs +++ b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Controllers/MedicalRecordController.cs @@ -31,7 +31,10 @@ using System.IO; using System.Linq; using System.Security.Cryptography; using System.Text; +using System.Text.RegularExpressions; using System.Web.Mvc; +using Newtouch.CIS.Proxy.CMMPlatform; +using Newtouch.CIS.Proxy.CMMPlatform.DTO.HLYYRequest; using Newtouch.Infrastructure.Log; using Newtouch.Domain.ViewModels; using Newtouch.Domain.ViewModels.Outpatient; @@ -460,10 +463,20 @@ namespace Newtouch.CIS.Web.Controllers /// /// /// - public ActionResult SelectNodeContent(string jzId) + public ActionResult SelectNodeContent(string jzId,string ex2) { - var data = _medicalRecordDmnService.SelectNodeContent(jzId); - return Content(data.ToJson()); + if ("mrtemplate".Equals(ex2)) + { + var data = _medicalRecordDmnService.SelectNodeContentByBlmb(jzId,this.OrganizeId); + //病历模板 + return Content(data.ToJson()); + } + else + { + var data = _medicalRecordDmnService.SelectNodeContent(jzId); + return Content(data.ToJson()); + } + } /// @@ -626,7 +639,7 @@ namespace Newtouch.CIS.Web.Controllers cfh = cfitem.cfh, cflx = cfitem.cflx, sfbz = cfitem.sfbz ?? false, - zje = cfitem.je, + zje = cfitem.je+(cfitem.je2??Convert.ToDecimal(0.00)), ys = this.UserIdentity.rygh,//当前登录人的人员工号 ks = this.UserIdentity.DepartmentCode,//当前登录人的人员科室 tieshu = cfitem.tieshu, @@ -680,6 +693,7 @@ namespace Newtouch.CIS.Web.Controllers results[i].syncfbz = guid; ztcf.cfmxList.Add(results[i]); } + ztcf.cflx= (int)EnumCflx.RegularItemPres; ztcf.zje = ztcf.cfmxList.Sum(p=>p.je); cfmx.syncfbz = guid; cfList.Add(ztcf); @@ -822,7 +836,6 @@ namespace Newtouch.CIS.Web.Controllers LogCore.Error("SaveMedicalRecord error", ex); return Success("开立成功,但同步失败,请手动同步处方信息!", jzObject.jzId); } - //返回jzId return Success(null, jzObject.jzId); } @@ -1982,6 +1995,7 @@ namespace Newtouch.CIS.Web.Controllers pagination.page = 1; pagination.rows = 1000; pagination.sidx = "operatingTime"; + var cxsx = _sysConfigRepo.GetValueByCode("YXZ_CIS_1101", this.OrganizeId); var ysgh = ""; if (cxsx == "1") @@ -2007,7 +2021,7 @@ namespace Newtouch.CIS.Web.Controllers var RespList = new List(); foreach (var item in data) { - var ghrq = Convert.ToDateTime(item.ghsj); + var ghrq = Convert.ToDateTime(item.ghsj).Date; var newghrq = ghrq.AddDays(1); if (ghrq.AddDays(1) < DateTime.Now) { @@ -2358,5 +2372,141 @@ namespace Newtouch.CIS.Web.Controllers }; return Content(data.ToJson()); } + + + [HttpPost] + [HandlerAjaxOnly] + public ActionResult GetMzHlyy(string jzId,string cfId) + { + //获取当前用户病历信息 + var data = _medicalRecordDmnService.SelectNodeContent(jzId); + var orgId = XMLSerializer.GenerateShortUUIDFromString(UserIdentity.OrganizeId); + //构造合理用药参数 + var request = new EngineReq + { + Type = "prescription", + Patient = new PatientRecord + { + DepartID = data.jzks, + Department = data.ghksmc, + BedNo = "", + PresType = "处方", + PresSource = data.mjzbz == 1 ? "门诊" : data.mjzbz == 2 ? "急诊" : "门诊", + PresDatetime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), + PayType = "", + PatientNo = data.mzh, + PresNo = data.cfBoList.Count>0? data.cfBoList[0].presEntity.cfId:null, + Name = data.xm, + DiagnoseID = "", + //默认西医 + Diagnose =string.Join("|", data.xyzdList.Select(item => item.zdmc)), + IDCard = "", + Address = "", + PhoneNo = "", + Age =data.nlshow+"0月" , + Sex = data.xb, + Height = Regex.Match(data.ct == null ? "身高:170cm" : data.ct, @"身高:(\d+cm)").Groups[1].Value, + Weight = Regex.Match(data.ct == null ? "体重:60kg" : data.ct, @"体重:(\d+kg)").Groups[1].Value, + BirthWeight = "", + PreviousHistory = "", + NowMedicalHistory = "", + Ccr = "", + Anaphylactogen = data.gms == null? "":data.gms, + AllergicHistory = "", + Pregnancy = "", + TimeOfPreg = "", + Disease = "2", + BreastFeeding = "", + Dialysis = "", + ProxName = "", + ProxIDCard = "", + DocID =data.jzys, + DocName = data.jzysmc, + TotalAmount = "", + }, + Operation = new Operation + { + OperationCode = "", + OperationName = "", + OperationStartTime = "" , + OperationEndTime = "", + IncisionType = "", + IncisionStatus = "", + Inplant = "false" + }, + }; + var prescriptions = new List(); + var dataList = new List(); + data.cfBoList.ForEach(item => + { + if (item.presEntity.cflx != 1 ) + { + return; + } + + item.presDetailList.ForEach(val => + { + var ypjx = _medicalRecordDmnService.GetYpjx(val.ypCode, UserIdentity.OrganizeId); + var pres = new Prescription + { + Drug = val.ypCode+'_'+orgId, + DrugName = val.ypmc, + RegName = val.ypmc, + Specification = val.mcjl+val.mcjldw, + Package = val.ypgg, + Quantity = val.sl, + PackUnit = val.dw, + UnitPrice = "", + Amount = "", + GroupNo = val.zh, + FirstUse = "", + PrepForm = ypjx == null?"":ypjx, + AdminRoute = val.yfmc, + AdminArea = "无", + AdminFrequency = val.pcmc, + AdminDose = val.mcjl+val.mcjldw, + AdminMethod = "", + Type = "", + AdminGoal = "", + DocID = "", + DocName = data.jzysmc, + DocTitle = "", + DepartID = "", + Department = data.jzks, + NurseName = "", + StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), + EndTime = DateTime.Now.AddDays(val.ts.ToDouble()).ToString("yyyy-MM-dd HH:mm:ss"), + SpecialPromote = "", + ContinueDays = val.ts.ToString() + + }; + prescriptions.Add(pres); + + }); + request.Prescriptions = prescriptions; + var hlyyProxy = new HlyyProxy(); + var engineRes = hlyyProxy.engine(request); + prescriptions.Clear(); + engineRes.cfh = item.presEntity.cfh; + dataList.Add(engineRes); + }); + + return Success("查询成功", dataList); + } + + [HttpPost] + [HandlerAjaxOnly] + public ActionResult GetypSms(string drugId) + { + var hlyyProxy = new HlyyProxy(); + var hisSmsJson = hlyyProxy.GetHisSmsJson(drugId); + + return Success("查询成功", hisSmsJson);; + } + + } + + + } \ No newline at end of file diff --git a/Newtouch.HIS.CIS/Newtouch.CIS.Web/Controllers/PatientListController.cs b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Controllers/PatientListController.cs index 02c6502782a8f5f2ddecdfee74a24da1013a4942..4eff08d351f4e3103eeb6325de9f90d8477f0841 100644 --- a/Newtouch.HIS.CIS/Newtouch.CIS.Web/Controllers/PatientListController.cs +++ b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Controllers/PatientListController.cs @@ -163,7 +163,7 @@ namespace Newtouch.CIS.Web.Controllers }; return Content(list.ToJson()); } - pagination.sidx = "operatingTime desc"; + pagination.sidx = "operatingTime"; pagination.sord = ""; var reqObj = new { @@ -191,7 +191,8 @@ namespace Newtouch.CIS.Web.Controllers var apiRespList = new List(); foreach (var item in apiResp.data.list) { - if (item.ghsj.AddDays(unTreateDays) < DateTime.Now) + var ds = item.ghsj.Date; + if (item.ghsj.Date.AddDays(unTreateDays) < DateTime.Now) { continue; } @@ -229,6 +230,7 @@ namespace Newtouch.CIS.Web.Controllers ghlybz = item.ghlybz, grbh=item.grbh, zzbs = zzhz == true ? "转诊" : "", + queno=item.queno }); } diff --git a/Newtouch.HIS.CIS/Newtouch.CIS.Web/Newtouch.CIS.Web.csproj b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Newtouch.CIS.Web.csproj index 8e9451ff2cbeacee6fe1e7961a866ca47ce1c2fb..7ee940ca3be89624ff66a7d5b2784b94e53912a9 100644 --- a/Newtouch.HIS.CIS/Newtouch.CIS.Web/Newtouch.CIS.Web.csproj +++ b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Newtouch.CIS.Web.csproj @@ -150,6 +150,18 @@ ..\..\his-dll-common\dlls\NLog.Contact.dll + + ..\..\his-dll-common\hiscommondlls\NPOI.dll + + + ..\..\his-dll-common\hiscommondlls\NPOI.OOXML.dll + + + ..\..\his-dll-common\hiscommondlls\NPOI.OpenXml4Net.dll + + + ..\..\his-dll-common\hiscommondlls\NPOI.OpenXmlFormats.dll + ..\packages\Owin.1.0\lib\net40\Owin.dll @@ -384,8 +396,20 @@ Designer - - + + + + + + + + + + + + + + @@ -577,6 +601,7 @@ + Web.config diff --git a/Newtouch.HIS.CIS/Newtouch.CIS.Web/Views/Apply/Examination.cshtml b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Views/Apply/Examination.cshtml index 4571f0028dc938be25cb393f244a1a3670b6e476..14ba8b4a4e6407fb6572a54658af36131f8acd66 100644 --- a/Newtouch.HIS.CIS/Newtouch.CIS.Web/Views/Apply/Examination.cshtml +++ b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Views/Apply/Examination.cshtml @@ -484,13 +484,10 @@ //组套保存 function SaveJCbyZT(savetodb, justUpdateAlldataArray) { + debugger; var gridjcData ; //获取所有行Id,遍历使编辑框处于保存状态 var rowIds = $("#alreadyJCAppliedGroupList").jqGrid('getDataIDs'); - if (rowIds.length < 1) { - $.modalAlert("缺少检查单数据", "warning"); - return; - } for (var i = 0; i < rowIds.length; i++) { var saveResult = $("#alreadyJCAppliedGroupList").saveRow(rowIds[i], null, null, null, function (callbackRowId) { }, null, null); @@ -499,23 +496,6 @@ return; //保存失败,则return } } - $.najax({ - url: "/TemplateManage/InspectionTemplate/GetGPackageDetailByZtIdArray", - data: { ztId: rowIds }, - dataType: "json", - type: "POST", - async: false, - success: function (data) { - gridjcData = data; - $.each(gridjcData, function () { - this.bw = $("#alreadyJCAppliedGroupList").getRowData(this.ztId).bw; - this.bwff = $("#alreadyJCAppliedGroupList").getRowData(this.ztId).bwff; - this.lcyx = $('#txt_jc_lcyx').val(); - this.sqbz = $('#txt_jc_sqbz').val(); - }); - } - }); - //清空临床印象、申请备注 $('#txt_jc_lcyx').val(''); $('#txt_jc_sqbz').val(''); @@ -526,10 +506,26 @@ } return true; }); - $.each(gridjcData, function () { - this.cfh = thsNewJcCfh; - window.alldataArray.jccf.push(this); - }); + if (rowIds.length > 0) { + $.najax({ + url: "/TemplateManage/InspectionTemplate/GetGPackageDetailByZtIdArray", + data: { ztId: rowIds }, + dataType: "json", + type: "POST", + async: false, + success: function (data) { + gridjcData = data; + $.each(gridjcData, function () { + this.bw = $("#alreadyJCAppliedGroupList").getRowData(this.ztId).bw; + this.bwff = $("#alreadyJCAppliedGroupList").getRowData(this.ztId).bwff; + this.lcyx = $('#txt_jc_lcyx').val(); + this.sqbz = $('#txt_jc_sqbz').val(); + this.cfh = thsNewJcCfh; + window.alldataArray.jccf.push(this); + }); + } + }); + } if (!(justUpdateAlldataArray == true)) { if (savetodb == '1') { diff --git a/Newtouch.HIS.CIS/Newtouch.CIS.Web/Views/Apply/Inspection.cshtml b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Views/Apply/Inspection.cshtml index 37c4e6d069781d79c2dcbdcd7af238761b347ef4..405f9eb2e1581ccc76d8c69541b0b9dd837fc79b 100644 --- a/Newtouch.HIS.CIS/Newtouch.CIS.Web/Views/Apply/Inspection.cshtml +++ b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Views/Apply/Inspection.cshtml @@ -303,27 +303,9 @@ function SaveInspectionbyZt(savetodb, justUpdateAlldataArray) { //作为一个新处方 + var gridjyData; var rowIds = $("#alreadyJYAppliedGroupList").jqGrid('getDataIDs'); - if (rowIds.length < 1) { - $.modalAlert("缺少检验单数据", "warning"); - return; - } - $.najax({ - url: "/TemplateManage/InspectionTemplate/GetGPackageDetailByZtIdArray", - data: { ztId: rowIds }, - dataType: "json", - type: "POST", - async: false, - success: function (data) { - gridjyData = data; - $.each(gridjyData, function () { - this.lcyx = $('#txt_jy_lcyx').val(); - this.sqbz = $('#txt_jy_sqbz').val(); - }); - - } - }); - + //清空临床印象、申请备注 $('#txt_jc_lcyx').val(''); $('#txt_jc_sqbz').val(''); @@ -334,11 +316,25 @@ } return true; }); + if (rowIds.length > 0) { + $.najax({ + url: "/TemplateManage/InspectionTemplate/GetGPackageDetailByZtIdArray", + data: { ztId: rowIds }, + dataType: "json", + type: "POST", + async: false, + success: function (data) { + gridjyData = data; + $.each(gridjyData, function () { + this.lcyx = $('#txt_jy_lcyx').val(); + this.sqbz = $('#txt_jy_sqbz').val(); + this.cfh = thsNewJyCfh; + window.alldataArray.jycf.push(this); + }); - $.each(gridjyData, function () { - this.cfh = thsNewJyCfh; - window.alldataArray.jycf.push(this); - }); + } + }); + } if (!(justUpdateAlldataArray == true)) { if (savetodb == '1') { if (SaveData(false, function () { diff --git a/Newtouch.HIS.CIS/Newtouch.CIS.Web/Views/Home/Index.cshtml b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Views/Home/Index.cshtml index 60ff56d7eadb09ca7ec393d557df2f06c1b66f57..9f9411e62acc3bec8b8bfc77abc331faa2db04f7 100644 --- a/Newtouch.HIS.CIS/Newtouch.CIS.Web/Views/Home/Index.cshtml +++ b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Views/Home/Index.cshtml @@ -59,11 +59,6 @@
      @Html.Partial("_IndexHeaderNav") - @**@
      diff --git a/Newtouch.HIS.CIS/Newtouch.CIS.Web/Views/MainBusiness/Index.cshtml b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Views/MainBusiness/Index.cshtml index e6d18c7bd90f1f24e9f2fd1208b44be12b7b2d76..d7254bbb8abdea79b68090f264bafa993b6b1ae9 100644 --- a/Newtouch.HIS.CIS/Newtouch.CIS.Web/Views/MainBusiness/Index.cshtml +++ b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Views/MainBusiness/Index.cshtml @@ -23,7 +23,7 @@ position: fixed; top: 0px; z-index: 100009; - width: 28%; + width: 20%; line-height: 40px; font-size: 18px; white-space: nowrap; @@ -87,8 +87,8 @@ }
      @Html.Partial("_LeftMostPartDiv") - @Html.Partial("_PresTemplateTreeForm") - @Html.Partial("_HistoryPresTreeForm") + @Html.Partial("_PresTemplateTreeForm", new ViewDataDictionary { { "ISOpenZycfnew", iSOpenZycfnew } }) + @Html.Partial("_HistoryPresTreeForm",new ViewDataDictionary { { "ISOpenZycfnew", iSOpenZycfnew } }) @Html.Partial("_InspectTemplateTreeForm")
      @Html.Partial("~/Views/PatientList/PatientList.cshtml") @@ -331,7 +331,6 @@ $('a[data-toggle="tab"]').on('shown.bs.tab', function(e) { cfLeftFloatHide(); - //console.log("here"); var targetHref = $(e.target).attr('href'); @@ -528,7 +527,7 @@ function showPatientBasicInfo() { if (!$('#divPatientBasicInfo').is(':visible')) { - $('#myTab').css('width', '70%'); + $('#myTab').css('width', '78%'); $('#divPatientBasicInfo').show(); } $('#divPatientBasicInfo').html(window.currPatientInfo.xm @@ -564,7 +563,6 @@ } function newcheckItemActivity($val, $thisinput) { - //debugger; var selected = false;//默认没有选中当前值 var selectval = $thisinput.val(); if (selectval) { diff --git a/Newtouch.HIS.CIS/Newtouch.CIS.Web/Views/MedicalRecord/AdmissionNoticeForm.cshtml b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Views/MedicalRecord/AdmissionNoticeForm.cshtml index 7be978d7cbefd96c4c4c66652421c54cd2b779f7..b7dbec224396f996525ea456b0e8ee6eab7a2dea 100644 --- a/Newtouch.HIS.CIS/Newtouch.CIS.Web/Views/MedicalRecord/AdmissionNoticeForm.cshtml +++ b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Views/MedicalRecord/AdmissionNoticeForm.cshtml @@ -133,7 +133,7 @@ }); }); function dayin() { - var uri = '@Html.Raw(reportUrl)' + "?tempCode=25&orgId=" + '@curOpr.OrganizeId' + "&mzh=" + mzh; + var uri = '@Html.Raw(reportUrl)' + "?tempCode=25&systemCode=CIS&orgId=" + '@curOpr.OrganizeId' + "&mzh=" + mzh; if (uri) { window.open(uri); } diff --git a/Newtouch.HIS.CIS/Newtouch.CIS.Web/Views/MedicalRecord/HistoryMedicalRecordForm.cshtml b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Views/MedicalRecord/HistoryMedicalRecordForm.cshtml index fbfc953106a2855cc9ff1ba977d320debcfae122..76b84512655995f713faf8a265127b7c4c956b5e 100644 --- a/Newtouch.HIS.CIS/Newtouch.CIS.Web/Views/MedicalRecord/HistoryMedicalRecordForm.cshtml +++ b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Views/MedicalRecord/HistoryMedicalRecordForm.cshtml @@ -5,261 +5,262 @@ var isPrintRehabPres = (ViewBag.ISPrintRehabPres as bool?) ?? false; var isPrintRehabTreatment = (ViewBag.ISPrintRehabTreatment as bool?) ?? false; + var sfxmztbs = SysConfigReader.String("sfxmztbs");//组套项目是否合并显示 } + - - - - HistoryMedicalRecordForm - - - @Html.Partial("_YibaoCommonView") -
      -
      -
      - 历史病历       -
      -
      -
      -
      -
      -
      +
      +
      +
      + 病历信息       +
      +
      +
      +
      +
      - @**@
      -
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ' + drugColModel.map(function(col) { + return ''; + }).join('') + ''); + + var tbody = $(''); + item.prescriptions.forEach(function(drugInfo) { + var row = ''; + drugColModel.forEach(function(col) { + if (col.name === 'DrugName') { + row += ''; + } else { + row += ''; + } + }); + row += ''; + tbody.append(row); + }); + table.append(tbody); + tableContainer.append(table); + + // 将该处方号的表格插入到容器中 + $("#drugGridContainer").append(tableContainer); + } + } + + } + + + + function getYpsms(drugId) { + // 在这里执行点击事件的逻辑 + $.najax({ + url: "/MedicalRecord/GetypSms", + data: {drugId: drugId}, + type: "POST", + success: function (data) { + if(data.state && data.state === 'success' && !(data.data === false)){ + $.modalAlert(data.data, 'success') + } + else{ + $.modalAlert("发送失败", 'error'); + } + } + }); + + + } + + diff --git a/Newtouch.HIS.CIS/Newtouch.CIS.Web/Views/OutpatientNurse/prescriptionquery.cshtml b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Views/OutpatientNurse/prescriptionquery.cshtml index 4ebfddeaea8423738047cdf429f95ace33ff4323..ff5383d6bdb4675c079d4c4b764da4a07c5d1c9f 100644 --- a/Newtouch.HIS.CIS/Newtouch.CIS.Web/Views/OutpatientNurse/prescriptionquery.cshtml +++ b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Views/OutpatientNurse/prescriptionquery.cshtml @@ -356,14 +356,14 @@ if (cfdlb == 'zscf') { rpturl = '@Html.Raw(mzzszPrinturl)'; } else if (cfdlb == 'jycf' || cfdlb == 'jccf') { - rpturl = cfdlb == "jycf" ? + "?tempCode=24&systemCode='CIS'& orgId=" + '@curOpr.OrganizeId' : '@Html.Raw(reportUrl)' + " ? tempCode = 23 &systemCode='CIS'& orgId=" + '@curOpr.OrganizeId'; + rpturl = cfdlb == "jycf" ? + "?tempCode=24&systemCode=CIS& orgId=" + '@curOpr.OrganizeId' : '@Html.Raw(reportUrl)' + " ? tempCode = 23 &systemCode=CIS& orgId=" + '@curOpr.OrganizeId'; } else if (cfdlb == 'zycf') { - rpturl = "?tempCode=22&systemCode='CIS'&orgId=" + '@curOpr.OrganizeId'; + rpturl = "?tempCode=22&systemCode=CIS&orgId=" + '@curOpr.OrganizeId'; } else if (cfdlb == 'cgcf') { - rpturl = '@Html.Raw(reportUrl)' + "?tempCode=20&systemCode='CIS'&orgId=" + '@curOpr.OrganizeId'; + rpturl = '@Html.Raw(reportUrl)' + "?tempCode=20&systemCode=CIS&orgId=" + '@curOpr.OrganizeId'; } else { - rpturl = '@Html.Raw(reportUrl)' + "?tempCode=14&systemCode='CIS'&orgId=" + '@curOpr.OrganizeId'; + rpturl = '@Html.Raw(reportUrl)' + "?tempCode=14&systemCode=CIS&orgId=" + '@curOpr.OrganizeId'; } for (var i = 0; i < listarry.length; i++) { if (cfdlb == 'jycf' || cfdlb == 'jccf') { @@ -384,7 +384,7 @@ $.modalAlert("请选择病人!", "error"); return; } - window.open('@Html.Raw(reportUrl)' + "?tempCode=13&systemCode='CIS'&mzh=" + mzh + "&orgId=" + '@curOpr.OrganizeId', "height=500, width=1195,top=100, left=50, toolbar =no, menubar=no, scrollbars=yes, resizable=yes, location=no, status=no"); + window.open('@Html.Raw(reportUrl)' + "?tempCode=13&systemCode=CIS&mzh=" + mzh + "&orgId=" + '@curOpr.OrganizeId', "height=500, width=1195,top=100, left=50, toolbar =no, menubar=no, scrollbars=yes, resizable=yes, location=no, status=no"); } \ No newline at end of file diff --git a/Newtouch.HIS.CIS/Newtouch.CIS.Web/Views/PatientList/InpatientList.cshtml b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Views/PatientList/InpatientList.cshtml index 28c00faf373a76ad4c0de3d4e37d8fc6ee62188e..19d7c57f4abd8e3b10818cdfb10060aa4205b1ba 100644 --- a/Newtouch.HIS.CIS/Newtouch.CIS.Web/Views/PatientList/InpatientList.cshtml +++ b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Views/PatientList/InpatientList.cshtml @@ -112,7 +112,7 @@ @@ -355,22 +355,22 @@ if (!!opdata.MZYS || !!opdata.MZFS || !!opdata.MZFJ_ASA || !!opdata.MZKSSJNYR) { - if (!!!opdata.MZYS) { - $.modalAlert("麻醉医生为必填项", 'error'); - return false; - } - if (!!!opdata.MZFS) { - $.modalAlert("麻醉方式为必填项", 'error'); - return false; - } - if (!!!opdata.MZFJ_ASA) { - $.modalAlert("麻醉等级为必填项", 'error'); - return false; - } - if (!!!opdata.MZKSSJNYR) { - $.modalAlert("麻醉开始时间为必填项", 'error'); - return false; - } + //if (!!!opdata.MZYS) { + // $.modalAlert("麻醉医生为必填项", 'error'); + // return false; + //} + //if (!!!opdata.MZFS) { + // $.modalAlert("麻醉方式为必填项", 'error'); + // return false; + //} + //if (!!!opdata.MZFJ_ASA) { + // $.modalAlert("麻醉等级为必填项", 'error'); + // return false; + //} + //if (!!!opdata.MZKSSJNYR) { + // $.modalAlert("麻醉开始时间为必填项", 'error'); + // return false; + //} } if (!!opdata.QKBW || !!opdata.QKYHDJ || !!opdata.QKYHLB) { diff --git a/Newtouch.HIS.EMR/Newtouch.EMR.Web/Areas/MRHomePage/Views/MRHomePage/MainZyInfo.cshtml b/Newtouch.HIS.EMR/Newtouch.EMR.Web/Areas/MRHomePage/Views/MRHomePage/MainZyInfo.cshtml index a60428af09109267f431e45237d0b42d87f621b5..d37038a659f2c5ce9d669b3ae56ab89c03b87f5a 100644 --- a/Newtouch.HIS.EMR/Newtouch.EMR.Web/Areas/MRHomePage/Views/MRHomePage/MainZyInfo.cshtml +++ b/Newtouch.HIS.EMR/Newtouch.EMR.Web/Areas/MRHomePage/Views/MRHomePage/MainZyInfo.cshtml @@ -352,13 +352,13 @@ - + - - - + + @* + + + + + *@
      主诉: - - 发病日期: - -
      现病史: - -
      既往史: - -
      月经史: - -
      过敏史: - -
      查体: - -
      处理: - - -
      辅助检查: - - -
      婚姻状态: - -
      西医诊断: - + @**@ + +
      +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @*@if (isOpenKfcf == true) + {*@ + + + + + @*} + @if (isOpenCgxmcf == true) + {*@ + + + - - - - @if (isPrintRehabPres) { - + + @**@ } @if (isPrintRehabTreatment) { - + + @**@ } + @@ -981,6 +987,30 @@
        + + + + + @@ -997,9 +1027,8 @@ var pageType = $.request("pageType"); var Id = $.request("Id");//远程诊疗申请信息Id if (pageType == "yczl") {//远程诊疗 - $('#myTab [href="#linkbl"').trigger('click'); //初始化显示哪个tab + $('#myTab [href="#linkbl"]').trigger('click'); //初始化显示哪个tab } - window.init_MedicalRecord = function() { $('#zcfsj').text(""); $("#zcfsj").attr("title", ""); @@ -1242,21 +1271,23 @@ //}); //加载树 function reloadTreeView(){ + debugger EnabledControls(); var blh = window.currPatientInfo.blh; var queryDate = $('#queryDate').val(); if(!blh || !queryDate){ return; - }$("#fbsj").val($.getDate()); + } + $("#fbsj").val($.getDate()); $("#divTree").treeview({ - height: $(window).height() - 300, + height: $(window).height() - 75, slimscroll: false, url: "/MedicalRecord/GetTreeList?blh=" + blh + "&queryDate="+queryDate, onnodeclick: function (item) { if (item.hasChildren === true) { return; } - clickjzid = item.id; + //clickjzid = item.id; /******树的内容********/ if(item.Ex2 == "medicalRecord"){ //选择的 历史病历(包括就诊中) @@ -1284,10 +1315,10 @@ //查询自己系统的历史病历 $.najax({ type: "POST", - url: "/MedicalRecord/SelectNodeContentV2", - data: { jzId: item.id, Id: Id, pageType: pageType, jzzt: window.currPatientInfo.jzzt }, - //url: "/MedicalRecord/SelectNodeContent", - //data: { jzId: item.id, Id: Id }, + //url: "/MedicalRecord/SelectNodeContentV2", + //data: { jzId: item.id, Id: Id, pageType: pageType, jzzt: window.currPatientInfo.jzzt }, + url: "/MedicalRecord/SelectNodeContent", + data: { jzId: item.id, Id: Id ,ex2: item.Ex2}, loadingtext :'病历数据加载中,请稍后…', success: function (ajaxresp) { if(item.Ex1 == '@Html.Raw(((int)@EnumJzzt.Treating).ToString())'){ @@ -1316,6 +1347,7 @@ jzyyxx(); } }); + } } else if(item.Ex2 == "dictionary"){ @@ -1331,28 +1363,52 @@ $('.activeValue').trigger('keyup'); } else if(item.Ex2 == "mrtemplate"){ - $.najax({ - url: "/TemplateManage/MRecordTemplate/SelectTemplateDetailByMbId", - dataType: "json", - data: { mbId: item.id }, - type: "POST", - loadingtext :'模板数据加载中,请稍后…', - success: function (ajaxresp) { - $.modalConfirm("将替换病历详情的内容,是否继续?", function (flag) { - $('#form1 .minusToggleCircle').trigger('click'); //先还原 - if (flag) { - //填充所有文本、处方、历史处方、grid列表 - fillData(item, ajaxresp); - } - else { - return false; + debugger + //弹窗病历内容引用版本(新增病历模板中处方组套引用) + $.modalOpen({ + id: "HistoryMedicalRecordForm", + title: "病历信息", + url: "/MedicalRecord/HistoryMedicalRecordForm?ex2=" + item.Ex2 + "&jzid=" + item.id, + width: "930px", + height: "850px", + btn: ['复制', '关闭'], + showleftlalbel: !!!item.id, //新增时显示 '确认并关闭按钮' + callBack: function (iframeId, isClose) { + //$("#detailTreeNode").treeview('revealNode', [/*刷新节点的ID*/]); + top.frames[iframeId].submitForm(function (treeSeleData,historydataArray,ajaxresp){ + if (!treeSeleData || treeSeleData.length == 0){ + + }else{ + CopyHistory(treeSeleData,historydataArray,ajaxresp); //复制病历引用 } - }); + }) } }); + + //直接替换病历内容版本(主诉 病历 诊断) + //$.najax({ + // url: "/TemplateManage/MRecordTemplate/SelectTemplateDetailByMbId", + // dataType: "json", + // data: { mbId: item.id }, + // type: "POST", + // loadingtext :'模板数据加载中,请稍后…', + // success: function (ajaxresp) { + // $.modalConfirm("将替换病历详情的内容,是否继续?", function (flag) { + // $('#form1 .minusToggleCircle').trigger('click'); //先还原 + // if (flag) { + // 填充所有文本、处方、历史处方、grid列表 + // fillData(item, ajaxresp); + // } + // else { + // return false; + // } + // }); + // } + //}); } } }); + } //禁用Button @@ -1380,14 +1436,14 @@ } //填充页面数据 function fillData(item, ajaxresp, reqSource) { + debugger if ( - (item.Ex1 && - (item.Ex1 == '@Html.Raw(((int)@EnumJzzt.Treating).ToString())' - || (reqSource == "fromTreatedPage" && item.Ex1 == '@Html.Raw(((int)@EnumJzzt.Treated).ToString())')) - ) + (item.Ex1 &&(item.Ex1 == '@Html.Raw(((int)@EnumJzzt.Treating).ToString())'|| (reqSource == "fromTreatedPage" && item.Ex1 == '@Html.Raw(((int)@EnumJzzt.Treated).ToString())')) + ) || item.Ex2 == 'mrtemplate' ) - @*if ( + + @*if ( (item.Ex1 && (item.Ex1 == '@Html.Raw(((int)@EnumJzzt.Treating).ToString())' && pageType != "yczl" //就诊中排除远程诊疗 || (reqSource == "fromTreatedPage" && item.Ex1 == '@Html.Raw(((int)@EnumJzzt.Treated).ToString())')) @@ -1396,19 +1452,18 @@ || (window.currPatientInfo.jzzt == ((int)@EnumJzzt.NotYetTreate).toString() && pageType=="yczl") //远程诊疗待就诊 )*@ { - //就诊中(或者是从已就诊列表双击进来,并且选中的是已结束的记录) 直接呈现到当前文本里 //或选的是病历模板 - $('#form1').formSerialize(ajaxresp); - if (ajaxresp.cfzbz=="1") { - $("input[name='cfzbzRadios'][value='0']").prop('checked',false); - $("input[name='cfzbzRadios'][value='1']").prop('checked',true); - } else { - $("input[name='cfzbzRadios'][value='1']").prop('checked',false); - $("input[name='cfzbzRadios'][value='0']").prop('checked',true); - } - - if(item.Ex2 != 'mrtemplate'){ + $('#form1').formSerialize(ajaxresp); + if (ajaxresp.cfzbz == "1") { + $("input[name='cfzbzRadios'][value='0']").prop('checked', false); + $("input[name='cfzbzRadios'][value='1']").prop('checked', true); + } + else { + $("input[name='cfzbzRadios'][value='1']").prop('checked', false); + $("input[name='cfzbzRadios'][value='0']").prop('checked', true); + } + if (item.Ex2 != 'mrtemplate' ) { //不是来自病历模板 //1.隐藏下方的节点内容 @@ -1416,9 +1471,9 @@ //2.填充文本 $('#mzh').text(ajaxresp.mzh); $('#jzks').text(ajaxresp.ghksmc); - ajaxresp.zlkssj = ajaxresp.zlkssj == undefined ? '' : $.getTime({ date: ajaxresp.zlkssj }); + ajaxresp.zlkssj = ajaxresp.zlkssj == undefined ? '' : $.getTime({date: ajaxresp.zlkssj}); $("#zlkssj").text(ajaxresp.zlkssj); - ajaxresp.fbsj = ajaxresp.fbsj == undefined ? '' : $.getDate({ date: ajaxresp.fbsj }); + ajaxresp.fbsj = ajaxresp.fbsj == undefined ? '' : $.getDate({date: ajaxresp.fbsj}); $("#fbsj").val(ajaxresp.fbsj); if (!!ajaxresp.lastzcfDto) { $('#zcfsj').text(ajaxresp.lastzcfDto.zcfsj); @@ -1439,8 +1494,8 @@ //再赋值 for (var i = 0; i < ajaxresp.xyzdList.length; i++) { $($('#tablexyzd .zdText')[i]).val(ajaxresp.xyzdList[i].zdmc); - $($('#tablexyzd .zdText')[i]).attr("data-zdCode",ajaxresp.xyzdList[i].zdCode); - $($('#tablexyzd .zdText')[i]).attr("data-icd10",ajaxresp.xyzdList[i].icd10); + $($('#tablexyzd .zdText')[i]).attr("data-zdCode", ajaxresp.xyzdList[i].zdCode); + $($('#tablexyzd .zdText')[i]).attr("data-icd10", ajaxresp.xyzdList[i].icd10); $($('#tablexyzd .gjybxsText')[i]).val(ajaxresp.xyzdList[i].icd10); $($('#tablexyzd .chkValue')[i]).prop('checked', ajaxresp.xyzdList[i].ysbz); $($('#tablexyzd .xyzdbzText')[i]).val(ajaxresp.xyzdList[i].zdbz); @@ -1449,18 +1504,18 @@ $($('#tablexyzd .ywxsText')[i]).val(ajaxresp.xyzdList[i].ywxs); } } - else{ + else { //清空主诊断 $('#tablexyzd .zdText').val(''); - $('#tablexyzd .zdText').attr("data-zdCode",''); - $('#tablexyzd .zdText').attr("data-icd10",''); - $('#tablexyzd .chkValue').prop('checked' ,false); + $('#tablexyzd .zdText').attr("data-zdCode", ''); + $('#tablexyzd .zdText').attr("data-icd10", ''); + $('#tablexyzd .chkValue').prop('checked', false); } if (ajaxresp.zyzdList && ajaxresp.zyzdList.length && ajaxresp.zyzdList.length > 0) { for (var i = 1; i < ajaxresp.zyzdList.length; i++) { //从1开始 有个主 //先append var number = $('#tablezyzd .zdText').length + 1; - var $newTr = $(''); + var $newTr = $(''); $newTr.appendTo($('#tablezyzd')); bindZyyczdFloatingSelector(number); bindZyzhFloatingSelector($newTr.find("#zh" + number)); @@ -1468,31 +1523,32 @@ //再赋值 for (var i = 0; i < ajaxresp.zyzdList.length; i++) { $($('#tablezyzd .zdText')[i]).val(ajaxresp.zyzdList[i].zdmc); - $($('#tablezyzd .zdText')[i]).attr("data-zdCode",ajaxresp.zyzdList[i].zdCode); - $($('#tablezyzd .zdText')[i]).attr("data-icd10",ajaxresp.zyzdList[i].icd10); - $($('#tablezyzd .chkValue')[i]).prop('checked' ,ajaxresp.zyzdList[i].ysbz); + $($('#tablezyzd .zdText')[i]).attr("data-zdCode", ajaxresp.zyzdList[i].zdCode); + $($('#tablezyzd .zdText')[i]).attr("data-icd10", ajaxresp.zyzdList[i].icd10); + $($('#tablezyzd .chkValue')[i]).prop('checked', ajaxresp.zyzdList[i].ysbz); $($('#tablezyzd .zhText')[i]).val(ajaxresp.zyzdList[i].zhmc); $($('#tablezyzd .zhText')[i]).attr("data-zhCode", ajaxresp.zyzdList[i].zhCode); $($('#tablezyzd .zyzdbzText')[i]).val(ajaxresp.zyzdList[i].zdbz); } - } - else{ + } else { //清空主诊断 $('#tablezyzd .zdText').val(''); $('#tablezyzd .zdText').attr("data-zdCode", ''); $('#tablezyzd .zdText').attr("data-icd10", ''); - $('#tablezyzd .chkValue').prop('checked' ,false); + $('#tablezyzd .chkValue').prop('checked', false); $('#tablezyzd .zhText').val(''); - $('#tablezyzd .zhText').attr("data-zhCode",''); + $('#tablezyzd .zhText').attr("data-zhCode", ''); } - if(item.Ex2 != 'mrtemplate'){ - //4.填充处方 //选择了一份病历 //病历模板不包括处方 + + if (item.Ex2 != 'mrtemplate') + { + //4.自动填充填充处方 //选择了一份病历 if (ajaxresp.cfBoList) { $.each(ajaxresp.cfBoList, function () { - if(this.presDetailList){ - var cflx = this.presEntity.cflx == @Html.Raw(((int)EnumCflx.RehabPres).ToString()) ? "kfcf" : this.presEntity.cflx == @Html.Raw(((int)EnumCflx.RegularItemPres).ToString()) ? "cgxmcf" : this.presEntity.cflx == @Html.Raw(((int)EnumCflx.WMPres).ToString()) ? "xycf" : this.presEntity.cflx == @Html.Raw(((int)EnumCflx.TCMPres).ToString()) ? "zycf" : this.presEntity.cflx == @Html.Raw(((int)EnumCflx.InspectionPres).ToString()) ? "jycf" : this.presEntity.cflx == @Html.Raw(((int)EnumCflx.ExaminationPres).ToString()) ? "jccf" : this.presEntity.cflx==@Html.Raw(((int)EnumCflx.Dzcf).ToString())?"dzcf":"0"; + if (this.presDetailList) { + var cflx = this.presEntity.cflx == @Html.Raw(((int)EnumCflx.RehabPres).ToString()) ? "kfcf" : this.presEntity.cflx == @Html.Raw(((int)EnumCflx.RegularItemPres).ToString()) ? "cgxmcf" : this.presEntity.cflx == @Html.Raw(((int)EnumCflx.WMPres).ToString()) ? "xycf" : this.presEntity.cflx == @Html.Raw(((int)EnumCflx.TCMPres).ToString()) ? "zycf" : this.presEntity.cflx == @Html.Raw(((int)EnumCflx.InspectionPres).ToString()) ? "jycf" : this.presEntity.cflx == @Html.Raw(((int)EnumCflx.ExaminationPres).ToString()) ? "jccf" : this.presEntity.cflx == @Html.Raw(((int)EnumCflx.Dzcf).ToString()) ? "dzcf" : "0"; //cfmxList - if(cflx == "kfcf"){ + if (cflx == "kfcf") { var cfId = this.presEntity.cfId; var cfh = this.presEntity.cfh; var sfbz = this.presEntity.sfbz; @@ -1500,32 +1556,32 @@ var cfzhdysj = this.cfzhdysj; var zldzhdysj = this.zldzhdysj; var sendtohisResult = this.sendtohisResult; - $.each(this.presDetailList,function(){ + $.each(this.presDetailList, function () { var cfmx = { - cfzhdysj:cfzhdysj, - zldzhdysj:zldzhdysj, - sendtohisResult:sendtohisResult, - sfbz:sfbz, - klrq:klrq, - cfId:cfId, - cfh:cfh, - xmmc:this.xmmc, - xmCode:this.xmCode, - dj:this.dj, - dw:this.dw, - bw:this.bw, - dwjls:this.dwjls, - jjcl:this.jjcl, - mczll:this.mczll, - pcmc:this.pcmc, - pcCode:this.pcCode, - sl:this.sl, - zl:this.zl, - je:this.je, - zxks:this.zxks, - zxksmc:this.zxksmc, - ybwym:this.ybwym, - xzsybz:this.xzsybz, + cfzhdysj: cfzhdysj, + zldzhdysj: zldzhdysj, + sendtohisResult: sendtohisResult, + sfbz: sfbz, + klrq: klrq, + cfId: cfId, + cfh: cfh, + xmmc: this.xmmc, + xmCode: this.xmCode, + dj: this.dj, + dw: this.dw, + bw: this.bw, + dwjls: this.dwjls, + jjcl: this.jjcl, + mczll: this.mczll, + pcmc: this.pcmc, + pcCode: this.pcCode, + sl: this.sl, + zl: this.zl, + je: this.je, + zxks: this.zxks, + zxksmc: this.zxksmc, + ybwym: this.ybwym, + xzsybz: this.xzsybz, cfmxId: this.cfmxId, ts: this.ts, tbz: this.tbz, @@ -1533,16 +1589,16 @@ ztId: this.ztId, ztmc: this.ztmc, ztsl: this.ztsl, - ztCode:this.ztCode + ztCode: this.ztCode }; - if(!(window.alldataArray && window.alldataArray.kfcf)){ + if (!(window.alldataArray && window.alldataArray.kfcf)) { window.alldataArray.kfcf = new Array(); } window.alldataArray.kfcf.push(cfmx); }); } //cgxmcf - if(cflx == "cgxmcf"){ + if (cflx == "cgxmcf") { var cfId = this.presEntity.cfId; var cfh = this.presEntity.cfh; var sfbz = this.presEntity.sfbz; @@ -1551,39 +1607,39 @@ var sendtohisResult = this.sendtohisResult; $.each(this.presDetailList, function () { var cfmx = { - cfzhdysj:cfzhdysj, - sendtohisResult:sendtohisResult, - sfbz:sfbz, - klrq:klrq, - cfId:cfId, - cfh:cfh, - xmmc:this.xmmc, - xmCode:this.xmCode, - dj:this.dj, - dw:this.dw, - bw:this.bw, - dwjls:this.dwjls, - jjcl:this.jjcl, - mczll:this.mczll, - pcmc:this.pcmc, - pcCode:this.pcCode, - sl:this.sl, - zl:this.zl, - je:this.je, - zxks:this.zxks, - zxksmc:this.zxksmc, - ybwym:this.ybwym, - xzsybz:this.xzsybz, - cfmxId:this.cfmxId, + cfzhdysj: cfzhdysj, + sendtohisResult: sendtohisResult, + sfbz: sfbz, + klrq: klrq, + cfId: cfId, + cfh: cfh, + xmmc: this.xmmc, + xmCode: this.xmCode, + dj: this.dj, + dw: this.dw, + bw: this.bw, + dwjls: this.dwjls, + jjcl: this.jjcl, + mczll: this.mczll, + pcmc: this.pcmc, + pcCode: this.pcCode, + sl: this.sl, + zl: this.zl, + je: this.je, + zxks: this.zxks, + zxksmc: this.zxksmc, + ybwym: this.ybwym, + xzsybz: this.xzsybz, + cfmxId: this.cfmxId, ts: this.ts, tbz: this.tbz, zzfbz: this.zzfbz, ztId: this.ztId, ztmc: this.ztmc, ztsl: this.ztsl, - ztCode:this.ztCode + ztCode: this.ztCode }; - if(!(window.alldataArray && window.alldataArray.cgxmcf)){ + if (!(window.alldataArray && window.alldataArray.cgxmcf)) { window.alldataArray.cgxmcf = new Array(); } window.alldataArray.cgxmcf.push(cfmx); @@ -1591,286 +1647,301 @@ } //cfmxList if (cflx == "xycf") { - var cfId=this.presEntity.cfId; - var cfh=this.presEntity.cfh; - var sfbz=this.presEntity.sfbz; + debugger; + var cfId = this.presEntity.cfId; + var cfh = this.presEntity.cfh; + var sfbz = this.presEntity.sfbz; var klrq = this.presEntity.CreateTime; var cfzhdysj = this.cfzhdysj; var sendtohisResult = this.sendtohisResult; var cftag = this.presEntity.cftag; var isdzcf = this.presEntity.isdzcf; - $.each(this.presDetailList,function(){ + $.each(this.presDetailList, function () { var cfmx = { - cfzhdysj:cfzhdysj, - sendtohisResult:sendtohisResult, - sfbz:sfbz, - klrq:klrq, - cfId:cfId, - cfh:cfh, - zh:this.zh, - ypmc:this.ypmc, - ypCode:this.ypCode, - ypgg:this.ypgg, - dj:this.dj, - mcjl:this.mcjl, - mcjldw:this.mcjldw, - mcjldwwwwwww:this.mcjldwwwwwww, - redundant_jldw:this.redundant_jldw, - yfmc:this.yfmc, - yfCode:this.yfCode, - pcmc:this.pcmc, - pcCode:this.pcCode, - sl:this.sl, - dw:this.dw, - je:this.je, - zxks:this.zxks, - ybwym:this.ybwym, - xzsybz:this.xzsybz, - cfmxId:this.cfmxId, + cfzhdysj: cfzhdysj, + sendtohisResult: sendtohisResult, + sfbz: sfbz, + klrq: klrq, + cfId: cfId, + cfh: cfh, + zh: this.zh, + ypmc: this.ypmc, + ypCode: this.ypCode, + ypgg: this.ypgg, + dj: this.dj, + mcjl: this.mcjl, + mcjldw: this.mcjldw, + mcjldwwwwwww: this.mcjldwwwwwww, + redundant_jldw: this.redundant_jldw, + yfmc: this.yfmc, + yfCode: this.yfCode, + pcmc: this.pcmc, + pcCode: this.pcCode, + sl: this.sl, + dw: this.dw, + je: this.je, + zxks: this.zxks, + ybwym: this.ybwym, + xzsybz: this.xzsybz, + cfmxId: this.cfmxId, ts: this.ts, jxCode: this.jxCode, ds: this.ds, tbz: this.tbz, sfdlCode: this.sfdlCode, - sfdlmc:this.sfdlmc, + sfdlmc: this.sfdlmc, zzfbz: this.zzfbz, cftag: cftag, isdzcf: isdzcf, - gjybdm:this.gjybdm, + gjybdm: this.gjybdm, ispsbz: this.ispsbz, islgbz: this.islgbz, ztId: this.ztId, ztmc: this.ztmc, - sfzt: this.sfzt + sfzt: this.sfzt, + zxcs:this.zxcs, + jlzhxs:this.jlzhxs, + cls:this.cls }; - if(!(window.alldataArray && window.alldataArray.xycf)){ + if (!(window.alldataArray && window.alldataArray.xycf)) { window.alldataArray.xycf = new Array(); } window.alldataArray.xycf.push(cfmx); }); } //cfmxList - if(cflx == "zycf"){ - var cfId=this.presEntity.cfId; - var cfh=this.presEntity.cfh; - var sfbz=this.presEntity.sfbz; + if (cflx == "zycf") { + var cfId = this.presEntity.cfId; + var cfh = this.presEntity.cfh; + var sfbz = this.presEntity.sfbz; var klrq = this.presEntity.CreateTime; - var tieshu=this.presEntity.tieshu; - var cfyf=this.presEntity.cfyf; - var djbz=this.presEntity.djbz; + var tieshu = this.presEntity.tieshu; + var cfyf = this.presEntity.cfyf; + var djbz = this.presEntity.djbz; var cfzhdysj = this.cfzhdysj; var sendtohisResult = this.sendtohisResult; var isdzcf = this.presEntity.isdzcf; - $.each(this.presDetailList,function(){ + $.each(this.presDetailList, function () { var cfmx = { - cfzhdysj:cfzhdysj, - sendtohisResult:sendtohisResult, - sfbz:sfbz, - klrq:klrq, - cfId:cfId, - cfh:cfh, + cfzhdysj: cfzhdysj, + sendtohisResult: sendtohisResult, + sfbz: sfbz, + klrq: klrq, + cfId: cfId, + cfh: cfh, // - ypmc:this.ypmc, - ypCode:this.ypCode, - ypgg:this.ypgg, - dj:this.dj, - mcjl:this.mcjl, - mcjldw:this.mcjldw, - sl:this.sl, - dw:this.dw, - je:this.je, - Remark:this.Remark, - zxks:this.zxks, + ypmc: this.ypmc, + ypCode: this.ypCode, + ypgg: this.ypgg, + dj: this.dj, + mcjl: this.mcjl, + mcjldw: this.mcjldw, + sl: this.sl, + dw: this.dw, + je: this.je, + Remark: this.Remark, + zxks: this.zxks, // - tieshu:tieshu, - cfyf:cfyf, - djbz:djbz, - ybwym:this.ybwym, - xzsybz:this.xzsybz, + tieshu: tieshu, + cfyf: cfyf, + djbz: djbz, + ybwym: this.ybwym, + xzsybz: this.xzsybz, cfmxId: this.cfmxId, xmmc: this.xmmc, zl: this.zl, ts: this.ts, tbz: this.tbz, - zycf:this.zycf, + zycf: this.zycf, isdzcf: isdzcf, - gjybdm:this.gjybdm + gjybdm: this.gjybdm }; - if(!(window.alldataArray && window.alldataArray.zycf)){ + if (!(window.alldataArray && window.alldataArray.zycf)) { window.alldataArray.zycf = new Array(); } window.alldataArray.zycf.push(cfmx); }); } //cfmxList - if(cflx == "jycf"){ - var cfId=this.presEntity.cfId; - var cfh=this.presEntity.cfh; - var sfbz=this.presEntity.sfbz; + if (cflx == "jycf") { + var cfId = this.presEntity.cfId; + var cfh = this.presEntity.cfh; + var sfbz = this.presEntity.sfbz; var klrq = this.presEntity.CreateTime; var sendtohisResult = this.sendtohisResult; - $.each(this.presDetailList,function(){ + $.each(this.presDetailList, function () { var cfmx = { - sendtohisResult:sendtohisResult, - sfbz:sfbz, - klrq:klrq, - cfId:cfId, - cfh:cfh, - xmmc:this.xmmc, + sendtohisResult: sendtohisResult, + sfbz: sfbz, + klrq: klrq, + cfId: cfId, + cfh: cfh, + xmmc: this.xmmc, xmCode: this.xmCode, sl: this.sl, - dw:this.dw, - dj:this.dj, - zxks:this.zxks, - zxksmc:this.zxksmc, - ybwym:this.ybwym, - xzsybz:this.xzsybz, - cfmxId:this.cfmxId, - ts:this.ts, - ztId:this.ztId, + dw: this.dw, + dj: this.dj, + je: this.je, + zxks: this.zxks, + zxksmc: this.zxksmc, + ybwym: this.ybwym, + xzsybz: this.xzsybz, + cfmxId: this.cfmxId, + ts: this.ts, + ztId: this.ztId, ztmc: this.ztmc, - ztCode:this.ztCode, + ztCode: this.ztCode, tbz: this.tbz, }; - if(!(window.alldataArray && window.alldataArray.jycf)){ + if (!(window.alldataArray && window.alldataArray.jycf)) { window.alldataArray.jycf = new Array(); } window.alldataArray.jycf.push(cfmx); }); } //cfmxList - if(cflx == "jccf"){ - var cfId=this.presEntity.cfId; - var cfh=this.presEntity.cfh; - var sfbz=this.presEntity.sfbz; + if (cflx == "jccf") { + var cfId = this.presEntity.cfId; + var cfh = this.presEntity.cfh; + var sfbz = this.presEntity.sfbz; var klrq = this.presEntity.CreateTime; var lcyx = this.presEntity.lcyx; var sqbz = this.presEntity.sqbz; var sendtohisResult = this.sendtohisResult; - $.each(this.presDetailList,function(){ + $.each(this.presDetailList, function () { var cfmx = { - sendtohisResult:sendtohisResult, - sfbz:sfbz, - klrq:klrq, - cfId:cfId, - cfh:cfh, - xmmc:this.xmmc, - xmCode:this.xmCode, - dw:this.dw, - dj:this.dj, - zxks:this.zxks, - zxksmc:this.zxksmc, - ybwym:this.ybwym, - xzsybz:this.xzsybz, - cfmxId:this.cfmxId, - ts:this.ts, - sl:this.sl, - bw:this.bw, - lcyx:lcyx, - sqbz:sqbz, - ztId:this.ztId, + sendtohisResult: sendtohisResult, + sfbz: sfbz, + klrq: klrq, + cfId: cfId, + cfh: cfh, + xmmc: this.xmmc, + xmCode: this.xmCode, + dw: this.dw, + dj: this.dj, + je: this.je, + zxks: this.zxks, + zxksmc: this.zxksmc, + ybwym: this.ybwym, + xzsybz: this.xzsybz, + cfmxId: this.cfmxId, + ts: this.ts, + sl: this.sl, + bw: this.bw, + lcyx: lcyx, + sqbz: sqbz, + ztId: this.ztId, ztmc: this.ztmc, - ztCode:this.ztCode, + ztCode: this.ztCode, tbz: this.tbz }; - if(!(window.alldataArray && window.alldataArray.jccf)){ + if (!(window.alldataArray && window.alldataArray.jccf)) { window.alldataArray.jccf = new Array(); } window.alldataArray.jccf.push(cfmx); }); - } + } - if (cflx == "dzcf") { - var cfId = this.presEntity.cfId; - var cfh = this.presEntity.cfh; - var sfbz = this.presEntity.sfbz; - var klrq = this.presEntity.CreateTime; - var cfzhdysj = this.cfzhdysj; - var sendtohisResult = this.sendtohisResult; - var cftag = this.presEntity.cftag; - $.each(this.presDetailList, function () { - var cfmx = { - cfzhdysj: cfzhdysj, - sendtohisResult: sendtohisResult, - sfbz: sfbz, - klrq: klrq, - cfId: cfId, - cfh: cfh, - zh: this.zh, - ypmc: this.ypmc, - ypCode: this.ypCode, - ypgg: this.ypgg, - dj: this.dj, - mcjl: this.mcjl, - mcjldw: this.mcjldw, - mcjldwwwwwww: this.mcjldwwwwwww, - redundant_jldw: this.redundant_jldw, - yfmc: this.yfmc, - yfCode: this.yfCode, - pcmc: this.pcmc, - pcCode: this.pcCode, - sl: this.sl, - dw: this.dw, - je: this.je, - zxks: this.zxks, - ybwym: this.ybwym, - xzsybz: this.xzsybz, - cfmxId: this.cfmxId, - ts: this.ts, - jxCode: this.jxCode, - ds: this.ds, - tbz: this.tbz, - sfdlCode: this.sfdlCode, - sfdlmc: this.sfdlmc, - zzfbz: this.zzfbz, - cftag: cftag, - ispsbz: this.ispsbz, - islgbz: this.islgbz, - ztId: this.ztId, - ztmc: this.ztmc, - sfzt: this.sfzt - }; - if (!(window.alldataArray && window.alldataArray.dzcf)) { - window.alldataArray.dzcf = new Array(); - } - window.alldataArray.dzcf.push(cfmx); - }); - } + if (cflx == "dzcf") { + var cfId = this.presEntity.cfId; + var cfh = this.presEntity.cfh; + var sfbz = this.presEntity.sfbz; + var klrq = this.presEntity.CreateTime; + var cfzhdysj = this.cfzhdysj; + var sendtohisResult = this.sendtohisResult; + var cftag = this.presEntity.cftag; + $.each(this.presDetailList, function () { + var cfmx = { + cfzhdysj: cfzhdysj, + sendtohisResult: sendtohisResult, + sfbz: sfbz, + klrq: klrq, + cfId: cfId, + cfh: cfh, + zh: this.zh, + ypmc: this.ypmc, + ypCode: this.ypCode, + ypgg: this.ypgg, + dj: this.dj, + mcjl: this.mcjl, + mcjldw: this.mcjldw, + mcjldwwwwwww: this.mcjldwwwwwww, + redundant_jldw: this.redundant_jldw, + yfmc: this.yfmc, + yfCode: this.yfCode, + pcmc: this.pcmc, + pcCode: this.pcCode, + sl: this.sl, + dw: this.dw, + je: this.je, + zxks: this.zxks, + ybwym: this.ybwym, + xzsybz: this.xzsybz, + cfmxId: this.cfmxId, + ts: this.ts, + jxCode: this.jxCode, + ds: this.ds, + tbz: this.tbz, + sfdlCode: this.sfdlCode, + sfdlmc: this.sfdlmc, + zzfbz: this.zzfbz, + cftag: cftag, + ispsbz: this.ispsbz, + islgbz: this.islgbz, + ztId: this.ztId, + ztmc: this.ztmc, + sfzt: this.sfzt + }; + if (!(window.alldataArray && window.alldataArray.dzcf)) { + window.alldataArray.dzcf = new Array(); + } + window.alldataArray.dzcf.push(cfmx); + }); + } } }); triggleActive(); } } } - //else if(pageType!="yczl"){ - else { - //结束的就诊记录 则显示在历史病历中,可进行复制 - //1.显示下方的节点内容 - //alert(1); + //else if(pageType!="yczl"){ + else { //弹框 - var test = { par1: "par1", par2: "par2" } + //var test = {par1: "par1", par2: "par2"} //if (pageType != "yczl") { - $.modalOpen({ - id: "HistoryMedicalRecordForm", - title: "历史病历", - //data: { ajaxresp: JSON.stringify(ajaxresp)}, - url: "/MedicalRecord/HistoryMedicalRecordForm?ex2=" + item.Ex2 + "&jzid=" + item.id + " &Id=" + Id + "&pageType=" + pageType + "&jzzt=" + window.currPatientInfo.jzzt, - width: "830px", - height: "750px", - btn: ['复制', '关闭'], - showleftlalbel: !!!item.id, //新增时显示 '确认并关闭按钮' - callBack: function (iframeId, isClose) { - - var treeSeleData = top.frames[iframeId].submitForm(); - if (!treeSeleData || treeSeleData.length == 0) { - } else { - CopyHistory(treeSeleData); //复制历史病历引用 + $.modalOpen({ + id: "HistoryMedicalRecordForm", + title: "病历信息", + //data: { ajaxresp: JSON.stringify(ajaxresp)}, + url: "/MedicalRecord/HistoryMedicalRecordForm?ex2=" + item.Ex2 + "&jzid=" + item.id + " &Id=" + Id + "&pageType=" + pageType + "&jzzt=" + window.currPatientInfo.jzzt, + width: "930px", + height: "850px", + btn: ['复制', '关闭'], + showleftlalbel: !!!item.id, //新增时显示 '确认并关闭按钮' + callBack: function (iframeId, isClose) { + $("#detailTreeNode").treeview('revealNode', [/*刷新节点的ID*/]); + top.frames[iframeId].submitForm(function (treeSeleData,historydataArray,ajaxresp){ + if (!treeSeleData || treeSeleData.length == 0){ + + }else{ + CopyHistory(treeSeleData,historydataArray,ajaxresp); //复制历史病历引用 } - } - }); - // } + }) + //var treeSeleData = top.frames[iframeId].submitForm(); + //if (!treeSeleData || treeSeleData.length == 0) { + + //} else { + // CopyHistory(treeSeleData); //复制历史病历引用 + //} - //$('#dispDiv').show(); + } + }); + return; + // 初始版 历史病历中电已结束历史病历显示当前病历下方供复制- 现改为上方弹窗 + //结束的就诊记录 则显示在历史病历中,可进行复制 + //1.显示下方的节点内容 + $('#form1').formSerialize(ajaxresp); + $('#dispDiv').show(); $('#lsblfrombilling').hide() $('.historyleft').show(); $('.historydetail').show(); @@ -1881,14 +1952,12 @@ showcheck: true, url: "/MedicalRecord/GetDetailTreeNode", oncheckboxclick: function (item) { - if (item.hasChildren === true) { - return; - } + } }); //3.填充文本 $('#nc_zs').val(ajaxresp.zs); - $("#nc_fbsj").val($.getDate({ date: ajaxresp.fbsj,ute:true })); + $("#nc_fbsj").val($.getDate({date: ajaxresp.fbsj, ute: true})); $('#nc_xbs').val(ajaxresp.xbs); $('#nc_jws').val(ajaxresp.jws); $('#nc_yjs').val(ajaxresp.yjs); @@ -1901,20 +1970,19 @@ //4.填充诊断 if (ajaxresp.xyzdList) { for (var i = 0; i < ajaxresp.xyzdList.length; i++) { - if(ajaxresp.xyzdList.length>1 && i< ajaxresp.xyzdList.length-1) - { + if (ajaxresp.xyzdList.length > 1 && i < ajaxresp.xyzdList.length - 1) { //先append var number = $('#nc_tablexyzd .nc_zdText').length + 1; - var $newTr = $(''); + var $newTr = $(''); $newTr.appendTo($('#nc_tablexyzd')); } //再赋值 for (var j = 0; j < $('#nc_tablexyzd .nc_zdText').length; j++) { - if(i==j){ + if (i == j) { $($('#nc_tablexyzd .nc_zdText')[j]).val(ajaxresp.xyzdList[i].zdmc); - $($('#nc_tablexyzd .nc_zdText')[j]).attr("data-zdCode",ajaxresp.xyzdList[i].zdCode); - $($('#nc_tablexyzd .nc_zdText')[i]).attr("data-icd10",ajaxresp.xyzdList[i].icd10); + $($('#nc_tablexyzd .nc_zdText')[j]).attr("data-zdCode", ajaxresp.xyzdList[i].zdCode); + $($('#nc_tablexyzd .nc_zdText')[i]).attr("data-icd10", ajaxresp.xyzdList[i].icd10); $($('#nc_tablexyzd .chkValue')[j]).prop('checked', ajaxresp.xyzdList[i].ysbz); $($('#nc_tablexyzd .nc_ywxsText')[j]).val(ajaxresp.xyzdList[i].ywxs); @@ -1926,516 +1994,699 @@ } if (ajaxresp.zyzdList) { for (var i = 0; i < ajaxresp.zyzdList.length; i++) { - if(ajaxresp.zyzdList.length>1 && i< ajaxresp.zyzdList.length-1) - { + if (ajaxresp.zyzdList.length > 1 && i < ajaxresp.zyzdList.length - 1) { //先append var number = $('#nc_tablezyzd .nc_zdText').length + 1; - var $newTr = $(''); + var $newTr = $(''); $newTr.appendTo($('#nc_tablezyzd')); } //再赋值 for (var j = 0; j < $('#nc_tablezyzd .nc_zdText').length; j++) { - if(i==j){ + if (i == j) { $($('#nc_tablezyzd .nc_zdText')[j]).val(ajaxresp.zyzdList[i].zdmc); - $($('#nc_tablezyzd .nc_zdText')[j]).attr("data-zdCode",ajaxresp.zyzdList[i].zdCode); - $($('#nc_tablezyzd .nc_zdText')[i]).attr("data-icd10",ajaxresp.zyzdList[i].icd10); - $($('#nc_tablezyzd .chkValue')[j]).prop('checked' ,ajaxresp.zyzdList[i].ysbz); + $($('#nc_tablezyzd .nc_zdText')[j]).attr("data-zdCode", ajaxresp.zyzdList[i].zdCode); + $($('#nc_tablezyzd .nc_zdText')[i]).attr("data-icd10", ajaxresp.zyzdList[i].icd10); + $($('#nc_tablezyzd .chkValue')[j]).prop('checked', ajaxresp.zyzdList[i].ysbz); $($('#nc_tablezyzd .nc_zhText')[j]).val(ajaxresp.zyzdList[i].zhmc); - $($('#nc_tablezyzd .nc_zhText')[j]).attr("data-zhCode",ajaxresp.zyzdList[i].zhCode); + $($('#nc_tablezyzd .nc_zhText')[j]).attr("data-zhCode", ajaxresp.zyzdList[i].zhCode); } } } } //5.填充处方 - if(item.Ex2 == 'medicalRecord') - { + if (item.Ex2 == 'medicalRecord' || item.Ex2 == 'mrtemplate') { //清空 - window.historydataArray.kfcf = new Array(); - window.historydataArray.cgxmcf = new Array(); - window.historydataArray.xycf = new Array(); - window.historydataArray.zycf = new Array(); - window.historydataArray.jycf = new Array(); - window.historydataArray.jccf = new Array(); - window.historydataArray.dzcf = new Array(); - $.each(ajaxresp.cfBoList,function(){ - if(this.presDetailList){ + //window.historydataArray.kfcf = new Array(); + //window.historydataArray.cgxmcf = new Array(); + //window.historydataArray.xycf = new Array(); + //window.historydataArray.zycf = new Array(); + //window.historydataArray.jycf = new Array(); + //window.historydataArray.jccf = new Array(); + //window.historydataArray.dzcf = new Array(); + $.each(ajaxresp.cfBoList, function () { + if (this.presDetailList) { //这是一个处方 - var cflx = this.presEntity.cflx == @Html.Raw(((int)EnumCflx.RehabPres).ToString()) ? "kfcf" : this.presEntity.cflx == @Html.Raw(((int)EnumCflx.RegularItemPres).ToString()) ? "cgxmcf" : this.presEntity.cflx == @Html.Raw(((int)EnumCflx.WMPres).ToString()) ? "xycf" : this.presEntity.cflx == @Html.Raw(((int)EnumCflx.TCMPres).ToString()) ? "zycf" : this.presEntity.cflx == @Html.Raw(((int)EnumCflx.InspectionPres).ToString()) ? "jycf" : this.presEntity.cflx == @Html.Raw(((int)EnumCflx.ExaminationPres).ToString()) ? "jccf" : this.presEntity.cflx==@Html.Raw(((int)EnumCflx.Dzcf).ToString())?"dzcf":"0"; + var cflx = this.presEntity.cflx == @Html.Raw(((int)EnumCflx.RehabPres).ToString()) ? "kfcf" : this.presEntity.cflx == @Html.Raw(((int)EnumCflx.RegularItemPres).ToString()) ? "cgxmcf" : this.presEntity.cflx == @Html.Raw(((int)EnumCflx.WMPres).ToString()) ? "xycf" : this.presEntity.cflx == @Html.Raw(((int)EnumCflx.TCMPres).ToString()) ? "zycf" : this.presEntity.cflx == @Html.Raw(((int)EnumCflx.InspectionPres).ToString()) ? "jycf" : this.presEntity.cflx == @Html.Raw(((int)EnumCflx.ExaminationPres).ToString()) ? "jccf" : this.presEntity.cflx == @Html.Raw(((int)EnumCflx.Dzcf).ToString()) ? "dzcf" : "0"; var newCfh = GetNewPresNo(); //这里有新处方号,后面就可以直接用了 //var newCfh = this.cfh; //cfmxList if (cflx == "kfcf") { - $.each(this.presDetailList.sort(function (a, b) { return a.px - b.px; }), function () { + $.each(this.presDetailList.sort(function (a, b) { + return a.px - b.px; + }), function () { var cfmx = { - sfbz:false, - cfId:"", - cfh:newCfh, - xmmc:this.xmmc, - xmCode:this.xmCode, - dj:this.dj, - dw:this.dw, - bw:this.bw, - dwjls:this.dwjls, - jjcl:this.jjcl, - mczll:this.mczll, - pcmc:this.pcmc, - pcCode:this.pcCode, - sl:this.sl, - zl:this.zl, - je:this.je, - zxks:this.zxks, - zxksmc:this.zxksmc, - ybwym:this.ybwym, - xzsybz:this.xzsybz, - cfmxId:this.cfmxId, + sfbz: false, + cfId: "", + cfh: newCfh, + xmmc: this.xmmc, + xmCode: this.xmCode, + dj: this.dj, + dw: this.dw, + bw: this.bw, + dwjls: this.dwjls, + jjcl: this.jjcl, + mczll: this.mczll, + pcmc: this.pcmc, + pcCode: this.pcCode, + sl: this.sl, + zl: this.zl, + je: this.je, + zxks: this.zxks, + zxksmc: this.zxksmc, + ybwym: this.ybwym, + xzsybz: this.xzsybz, + cfmxId: this.cfmxId, ts: this.ts }; - if(!(window.historydataArray && window.historydataArray.kfcf)){ + if (!(window.historydataArray && window.historydataArray.kfcf)) { window.historydataArray.kfcf = new Array(); } window.historydataArray.kfcf.push(cfmx); }); } // - if(cflx=="cgxmcf"){ - $.each(this.presDetailList.sort(function (a, b) { return a.px - b.px; }),function(){ + if (cflx == "cgxmcf") { + $.each(this.presDetailList.sort(function (a, b) { + return a.px - b.px; + }), function () { var cfmx = { - sfbz:false, - cfId:"", - cfh:newCfh, - xmmc:this.xmmc, - xmCode:this.xmCode, - dj:this.dj, - dw:this.dw, - bw:this.bw, - dwjls:this.dwjls, - jjcl:this.jjcl, - mczll:this.mczll, - pcmc:this.pcmc, - pcCode:this.pcCode, - sl:this.sl, - zl:this.zl, - je:this.je, - zxks:this.zxks, - zxksmc:this.zxksmc, - ybwym:this.ybwym, - xzsybz:this.xzsybz, - cfmxId:this.cfmxId, + sfbz: false, + cfId: "", + cfh: newCfh, + xmmc: this.xmmc, + xmCode: this.xmCode, + dj: this.dj, + dw: this.dw, + bw: this.bw, + dwjls: this.dwjls, + jjcl: this.jjcl, + mczll: this.mczll, + pcmc: this.pcmc, + pcCode: this.pcCode, + sl: this.sl, + zl: this.zl, + je: this.je, + zxks: this.zxks, + zxksmc: this.zxksmc, + ybwym: this.ybwym, + xzsybz: this.xzsybz, + cfmxId: this.cfmxId, ts: this.ts }; - if(!(window.historydataArray && window.historydataArray.cgxmcf)){ + if (!(window.historydataArray && window.historydataArray.cgxmcf)) { window.historydataArray.cgxmcf = new Array(); } window.historydataArray.cgxmcf.push(cfmx); }); } //cfmxList - if(cflx=="xycf"){ - $.each(this.presDetailList.sort(function (a, b) { return a.px - b.px; }),function(){ + if (cflx == "xycf") { + $.each(this.presDetailList.sort(function (a, b) { + return a.px - b.px; + }), function () { var cfmx = { - sfbz:false, - cfId:"", - cfh:newCfh, - zh:this.zh, - ypmc:this.ypmc, - ypCode:this.ypCode, - ypgg:this.ypgg, - dj:this.dj, - mcjl:this.mcjl, - mcjldw:this.mcjldw, - mcjldwwwwwww:this.mcjldwwwwwww, - redundant_jldw:this.mcjldw, - yfmc:this.yfmc, - yfCode:this.yfCode, - pcmc:this.pcmc, - pcCode:this.pcCode, - sl:this.sl, - dw:this.dw, - je:this.je, - zxks:this.zxks, - ybwym:this.ybwym, - xzsybz:this.xzsybz, - cfmxId:this.cfmxId, + sfbz: false, + cfId: "", + cfh: newCfh, + zh: this.zh, + ypmc: this.ypmc, + ypCode: this.ypCode, + ypgg: this.ypgg, + dj: this.dj, + mcjl: this.mcjl, + mcjldw: this.mcjldw, + mcjldwwwwwww: this.mcjldwwwwwww, + redundant_jldw: this.mcjldw, + yfmc: this.yfmc, + yfCode: this.yfCode, + pcmc: this.pcmc, + pcCode: this.pcCode, + sl: this.sl, + dw: this.dw, + je: this.je, + zxks: this.zxks, + ybwym: this.ybwym, + xzsybz: this.xzsybz, + cfmxId: this.cfmxId, ts: this.ts, isdzcf: this.isdzcf }; - if(!(window.historydataArray && window.historydataArray.xycf)){ + if (!(window.historydataArray && window.historydataArray.xycf)) { window.historydataArray.xycf = new Array(); } window.historydataArray.xycf.push(cfmx); + console.log(1222) }); + } //cfmxList - if(cflx=="zycf"){ - var tieshu=this.presEntity.tieshu; - var cfyf=this.presEntity.cfyf; - var djbz=this.presEntity.djbz; - $.each(this.presDetailList.sort(function (a, b) { return a.px - b.px; }),function(){ + if (cflx == "zycf") { + var tieshu = this.presEntity.tieshu; + var cfyf = this.presEntity.cfyf; + var djbz = this.presEntity.djbz; + $.each(this.presDetailList.sort(function (a, b) { + return a.px - b.px; + }), function () { var cfmx = { - sfbz:false, - cfId:"", - cfh:newCfh, + sfbz: false, + cfId: "", + cfh: newCfh, // - ypmc:this.ypmc, - ypCode:this.ypCode, - ypgg:this.ypgg, - dj:this.dj, - mcjl:this.mcjl, - mcjldw:this.mcjldw, - sl:this.sl, - dw:this.dw, - je:this.je, - Remark:this.Remark, - zxks:this.zxks, + ypmc: this.ypmc, + ypCode: this.ypCode, + ypgg: this.ypgg, + dj: this.dj, + mcjl: this.mcjl, + mcjldw: this.mcjldw, + sl: this.sl, + dw: this.dw, + je: this.je, + Remark: this.Remark, + zxks: this.zxks, // - tieshu:tieshu, - cfyf:cfyf, - djbz:djbz, - ybwym:this.ybwym, - xzsybz:this.xzsybz, - cfmxId:this.cfmxId, + tieshu: tieshu, + cfyf: cfyf, + djbz: djbz, + ybwym: this.ybwym, + xzsybz: this.xzsybz, + cfmxId: this.cfmxId, ts: this.ts, isdzcf: this.isdzcf }; - if(!(window.historydataArray && window.historydataArray.zycf)){ + if (!(window.historydataArray && window.historydataArray.zycf)) { window.historydataArray.zycf = new Array(); } window.historydataArray.zycf.push(cfmx); }); } //cfmxList - if(cflx == "jycf"){ - $.each(this.presDetailList.sort(function (a, b) { return a.px - b.px; }),function(){ + if (cflx == "jycf") { + $.each(this.presDetailList.sort(function (a, b) { + return a.px - b.px; + }), function () { var cfmx = { - sfbz:false, - cfId:"", - cfh:newCfh, - xmmc:this.xmmc, - xmCode:this.xmCode, - dw:this.dw, - dj:this.dj, - zxks:this.zxks, - zxksmc:this.zxksmc, - ybwym:this.ybwym, - xzsybz:this.xzsybz, - cfmxId:this.cfmxId, - ts:this.ts, - ztId:this.ztId, + sfbz: false, + cfId: "", + cfh: newCfh, + xmmc: this.xmmc, + xmCode: this.xmCode, + dw: this.dw, + dj: this.dj, + zxks: this.zxks, + zxksmc: this.zxksmc, + ybwym: this.ybwym, + xzsybz: this.xzsybz, + cfmxId: this.cfmxId, + ts: this.ts, + ztId: this.ztId, ztmc: this.ztmc, sl: this.sl, }; - if(!(window.historydataArray && window.historydataArray.jycf)){ + if (!(window.historydataArray && window.historydataArray.jycf)) { window.historydataArray.jycf = new Array(); } window.historydataArray.jycf.push(cfmx); }); } //cfmxList - if(cflx == "jccf"){ - $.each(this.presDetailList.sort(function (a, b) { return a.px - b.px; }),function(){ + if (cflx == "jccf") { + $.each(this.presDetailList.sort(function (a, b) { + return a.px - b.px; + }), function () { var cfmx = { - sfbz:false, - cfId:"", - cfh:newCfh, - xmmc:this.xmmc, - xmCode:this.xmCode, - dw:this.dw, - dj:this.dj, - zxks:this.zxks, - zxksmc:this.zxksmc, - ybwym:this.ybwym, - xzsybz:this.xzsybz, - cfmxId:this.cfmxId, - ts:this.ts, - sl:this.sl, - bw:this.bw, - ztId:this.ztId, + sfbz: false, + cfId: "", + cfh: newCfh, + xmmc: this.xmmc, + xmCode: this.xmCode, + dw: this.dw, + dj: this.dj, + zxks: this.zxks, + zxksmc: this.zxksmc, + ybwym: this.ybwym, + xzsybz: this.xzsybz, + cfmxId: this.cfmxId, + ts: this.ts, + sl: this.sl, + bw: this.bw, + ztId: this.ztId, ztmc: this.ztmc }; - if(!(window.historydataArray && window.historydataArray.jccf)){ + if (!(window.historydataArray && window.historydataArray.jccf)) { window.historydataArray.jccf = new Array(); } window.historydataArray.jccf.push(cfmx); }); - } - if (cflx == "dzcf") { - $.each(this.presDetailList.sort(function (a, b) { return a.px - b.px; }), function () { - var cfmx = { - sfbz: false, - cfId: "", - cfh: newCfh, - zh: this.zh, - ypmc: this.ypmc, - ypCode: this.ypCode, - ypgg: this.ypgg, - dj: this.dj, - mcjl: this.mcjl, - mcjldw: this.mcjldw, - mcjldwwwwwww: this.mcjldwwwwwww, - redundant_jldw: this.mcjldw, - yfmc: this.yfmc, - yfCode: this.yfCode, - pcmc: this.pcmc, - pcCode: this.pcCode, - sl: this.sl, - dw: this.dw, - je: this.je, - zxks: this.zxks, - ybwym: this.ybwym, - xzsybz: this.xzsybz, - cfmxId: this.cfmxId, - ts: this.ts - }; - if (!(window.historydataArray && window.historydataArray.dzcf)) { - window.historydataArray.dzcf = new Array(); - } - window.historydataArray.dzcf.push(cfmx); - }); - } + } + if (cflx == "dzcf") { + $.each(this.presDetailList.sort(function (a, b) { + return a.px - b.px; + }), function () { + var cfmx = { + sfbz: false, + cfId: "", + cfh: newCfh, + zh: this.zh, + ypmc: this.ypmc, + ypCode: this.ypCode, + ypgg: this.ypgg, + dj: this.dj, + mcjl: this.mcjl, + mcjldw: this.mcjldw, + mcjldwwwwwww: this.mcjldwwwwwww, + redundant_jldw: this.mcjldw, + yfmc: this.yfmc, + yfCode: this.yfCode, + pcmc: this.pcmc, + pcCode: this.pcCode, + sl: this.sl, + dw: this.dw, + je: this.je, + zxks: this.zxks, + ybwym: this.ybwym, + xzsybz: this.xzsybz, + cfmxId: this.cfmxId, + ts: this.ts + }; + if (!(window.historydataArray && window.historydataArray.dzcf)) { + window.historydataArray.dzcf = new Array(); + } + window.historydataArray.dzcf.push(cfmx); + }); + } } }); triggleActive("historynodeContent"); } - //? } - } - - //下面的历史病历内容 - $('#hideDispDiv').click(function () { - $('#dispDiv').hide(); - }); - - //复制历史病历引用 - //$('#btncopy').click(function () { - function CopyHistory(treeSeleData) { - $.modalConfirm("将替换病历详情的内容,是否继续?", function (flag) { - if (flag) { - $.modalClose("HistoryMedicalRecordForm"); - //var treeSeleData = $("#detailTreeNode").getCheckedNodeObjArray(); - var needTriggleActive = false; //是否需要处方处方更新 - $.each(treeSeleData, function () { - var inputName = this.Code.substr(3); - if (inputName == "zs" || inputName == "xbs" || inputName == "jws" || inputName == "yjs" || inputName == "gms" || inputName == "hy" || inputName == "ct" || inputName == "fbsj" || inputName == "clfa" || inputName == "fzjc") { - $('#' + inputName).val($('#' + this.Code).val()); //除诊断和处方外 + } + + //下面的历史病历内容 + $('#hideDispDiv').click(function () { + $('#dispDiv').hide(); + }); + + $('#btncopy').click(function(){ + $.modalConfirm("将替换病历详情的内容,是否继续?", function (flag) { + if (flag) { + var treeSeleData = $("#detailTreeNode").getCheckedNodeObjArray(); + var needTriggleActive = false; //是否需要处方处方更新 + $.each(treeSeleData, function () { + var inputName = this.Code.substr(3); + if (inputName == "zs" || inputName == "xbs" || inputName == "jws" || inputName == "yjs" || inputName == "gms" || inputName == "hy" || inputName == "ct" || inputName == "fbsj" || inputName == "clfa" || inputName == "fzjc") { + $('#' + inputName).val($('#' + this.Code).val()); //除诊断和处方外 + } + //西医诊断 + if (inputName == "xyzd") { + $('#tablexyzd .minusToggleCircle').trigger('click'); //先还原 + if ($('#nc_tablexyzd .nc_zdText').length > 0) { + var xyzdArray = new Array(); + for (var i = 0; i < $('#nc_tablexyzd .nc_zdText').length; i++) { + var zdObj = new Object(); + zdObj.zdmc = $($('#nc_tablexyzd .nc_zdText')[i]).val(); + zdObj.zdCode = $($('#nc_tablexyzd .nc_zdText')[i]).attr('data-zdCode'); + zdObj.icd10 = $($('#nc_tablexyzd .nc_zdText')[i]).attr('data-icd10'); + + zdObj.ywxs = $($('#nc_tablexyzd .nc_ywxsText')[i]).val(); + zdObj.ywstr = $($('#nc_tablexyzd .nc_ywxsText')[i]).attr('data-ywstr'); + zdObj.ywlx = $($('#nc_tablexyzd .nc_ywxsText')[i]).attr('data-ywlx'); + zdObj.ysbz = $($('#nc_tablexyzd .nc_zdText')[i]).siblings('.chkValue').is(':checked') + if (zdObj.zdmc && zdObj.zdmc) { //为的是排除空诊断 + if (i == 0) { + zdObj.zdlx = @Html.Raw(((int)EnumZdlx.Main).ToString()); //默认第一个诊断为主诊断 1:主诊断 2副诊断 + } else { + zdObj.zdlx = @Html.Raw(((int)EnumZdlx.Deputy).ToString()); + } + xyzdArray.push(zdObj) + } + } + for (var i = 0; i < xyzdArray.length; i++) { + if (xyzdArray.length > 1 && i < xyzdArray.length - 1) { + //先append + var number = $('#tablexyzd .zdText').length + 1; + var $newTr = $('>'); + $newTr.appendTo($('#tablexyzd')); + } + //再赋值 + for (var j = 0; j < $('#tablexyzd .zdText').length; j++) { + if (i == j) { + $($('#tablexyzd .zdText')[j]).val(xyzdArray[i].zdmc); + $($('#tablexyzd .zdText')[j]).attr("data-zdCode", xyzdArray[i].zdCode); + $($('#tablexyzd .zdText')[j]).attr("data-icd10", xyzdArray[i].icd10); + $($('#tablexyzd .chkValue')[j]).prop('checked', xyzdArray[i].ysbz); + + + //alert(xyzdArray[i].ywxs): + $($('#tablexyzd .xyywtstrText')[j]).val(xyzdArray[i].ywstr); + $($('#tablexyzd .xyywtlxText')[j]).val(xyzdArray[i].ywlx); + $($('#tablexyzd .ywxsText')[j]).val(xyzdArray[i].ywxs); + } + } + } + } else { + //清空主诊断 + $('#tablexyzd .zdText').val(''); + $('#tablexyzd .zdText').attr("data-zdCode", ''); + $('#tablexyzd .zdText').attr("data-icd10", ''); + $('#tablexyzd .chkValue').prop('checked', false); + } + } + //中医诊断 + if (inputName == "zyzd") { + $('#tablezyzd .minusToggleCircle').trigger('click'); //先还原 + if ($('#nc_tablezyzd .nc_zdText').length) { + var zyzdArray = new Array(); + for (var i = 0; i < $('#nc_tablezyzd .nc_zdText').length; i++) { + var zdObj = new Object(); + zdObj.zdmc = $($('#nc_tablezyzd .nc_zdText')[i]).val(); + zdObj.zdCode = $($('#nc_tablezyzd .nc_zdText')[i]).attr('data-zdCode'); + zdObj.icd10 = $($('#nc_tablezyzd .nc_zdText')[i]).attr('data-icd10'); + zdObj.ysbz = $($('#nc_tablezyzd .nc_zdText')[i]).siblings('.chkValue').is(':checked'); + zdObj.zhmc = $($('#nc_tablezyzd .nc_zhText')[i]).val(); + zdObj.zhCode = $($('#nc_tablezyzd .nc_zhText')[i]).attr('data-zhCode'); + if (zdObj.zdmc && zdObj.zdmc) { //为的是排除空诊断 + if (i == 0) { + zdObj.zdlx = @Html.Raw(((int)EnumZdlx.Main).ToString()); //默认第一个诊断为主诊断 1:主诊断 2副诊断 + } else { + zdObj.zdlx = @Html.Raw(((int)EnumZdlx.Deputy).ToString()); + } + + zyzdArray.push(zdObj) + } + } + for (var i = 0; i < zyzdArray.length; i++) { + if (zyzdArray.length > 1 && i < zyzdArray.length - 1) { + //先append + var number = $('#tablezyzd .zdText').length + 1; + var $newTr = $(''); + $newTr.appendTo($('#tablezyzd')); + } + //再赋值 + for (var j = 0; j < $('#tablezyzd .zdText').length; j++) { + if (i == j) { + $($('#tablezyzd .zdText')[j]).val(zyzdArray[i].zdmc); + $($('#tablezyzd .zdText')[j]).attr("data-zdCode", zyzdArray[i].zdCode); + $($('#tablezyzd .zdText')[j]).attr("data-icd10", zyzdArray[i].icd10); + $($('#tablezyzd .chkValue')[j]).prop('checked', zyzdArray[i].ysbz); + $($('#tablezyzd .zhText')[j]).val(zyzdArray[i].zhmc); + $($('#tablezyzd .zhText')[j]).attr("data-zhCode", zyzdArray[i].zhCode); + } + } + } + } else { + //清空主诊断 + $('#tablezyzd .zdText').val(''); + $('#tablezyzd .zdText').attr("data-zdCode", ''); + $('#tablezyzd .zdText').attr("data-icd10", ''); + $('#tablezyzd .chkValue').prop('checked', false); + $('#tablezyzd .zhText').val(''); + $('#tablezyzd .zhText').attr("data-zhCode", ''); + } + } + //康复 + if (inputName == "kfcf" + && window.historydataArray.kfcf && window.historydataArray.kfcf.length) { + needTriggleActive = true; + if (!window.alldataArray.kfcf) { + window.alldataArray.kfcf = new Array(); + } + window.alldataArray.kfcf = $.jsonWhere(window.alldataArray.kfcf, function (v) { + return !!v.cfId; //保留原已持久化的处方 + }); + $.each(window.historydataArray.kfcf, function () { + window.alldataArray.kfcf.push(this); + }); + } + //常规项目 + if (inputName == "cgxmcf" + && window.historydataArray.cgxmcf && window.historydataArray.cgxmcf.length) { + needTriggleActive = true; + if (!window.alldataArray.cgxmcf) { + window.alldataArray.cgxmcf = new Array(); + } + window.alldataArray.cgxmcf = $.jsonWhere(window.alldataArray.cgxmcf, function (v) { + return !!v.cfId; //保留原已持久化的处方 + }); + $.each(window.historydataArray.cgxmcf, function () { + window.alldataArray.cgxmcf.push(this); + }); + } + //西药 + if (inputName == "xycf" + && window.historydataArray.xycf && window.historydataArray.xycf.length) { + needTriggleActive = true; + if (!window.alldataArray.xycf) { + window.alldataArray.xycf = new Array(); + } + window.alldataArray.xycf = $.jsonWhere(window.alldataArray.xycf, function (v) { + return !!v.cfId; //保留原已持久化的处方 + }); + $.each(window.historydataArray.xycf, function () { + window.alldataArray.xycf.push(this); + }); + } + //中药 + if (inputName == "zycf" + && window.historydataArray.zycf && window.historydataArray.zycf.length) { + needTriggleActive = true; + if (!window.alldataArray.zycf) { + window.alldataArray.zycf = new Array(); + } + window.alldataArray.zycf = $.jsonWhere(window.alldataArray.zycf, function (v) { + return !!v.cfId; //保留原已持久化的处方 + }); + $.each(window.historydataArray.zycf, function () { + window.alldataArray.zycf.push(this); + }); + } + //检验 + if (inputName == "jycf" + && window.historydataArray.jycf && window.historydataArray.jycf.length) { + needTriggleActive = true; + if (!window.alldataArray.jycf) { + window.alldataArray.jycf = new Array(); + } + window.alldataArray.jycf = $.jsonWhere(window.alldataArray.jycf, function (v) { + return !!v.cfId; //保留原已持久化的处方 + }); + $.each(window.historydataArray.jycf, function () { + window.alldataArray.jycf.push(this); + }); + } + //检查 + if (inputName == "jccf" + && window.historydataArray.jccf && window.historydataArray.jccf.length) { + needTriggleActive = true; + if (!window.alldataArray.jccf) { + window.alldataArray.jccf = new Array(); + } + window.alldataArray.jccf = $.jsonWhere(window.alldataArray.jccf, function (v) { + return !!v.cfId; //保留原已持久化的处方 + }); + $.each(window.historydataArray.jccf, function () { + window.alldataArray.jccf.push(this); + }); + } + }); + if (needTriggleActive) { + //处方数据发生了变更 + triggleActive(); + } + } else { + return false; + } + }); + }); + + //复制历史病历引用-弹框方式 + function CopyHistory(treeSeleDatas,historydataArray,ajaxresp) { + $.modalConfirm("将替换病历详情的内容,是否继续?", function (flag) { + if (flag) { + debugger; + var treeSeleData = $("#detailTreeNode").getCheckedNodeObjArray(); + if(treeSeleDatas){ + $.modalClose("HistoryMedicalRecordForm"); + treeSeleData=treeSeleDatas; } - //西医诊断 - if (inputName == "xyzd") { - $('#tablexyzd .minusToggleCircle').trigger('click'); //先还原 - if ($('#nc_tablexyzd .nc_zdText').length > 0) { - var xyzdArray = new Array(); - for (var i = 0; i < $('#nc_tablexyzd .nc_zdText').length; i++) { - var zdObj = new Object(); - zdObj.zdmc = $($('#nc_tablexyzd .nc_zdText')[i]).val(); - zdObj.zdCode = $($('#nc_tablexyzd .nc_zdText')[i]).attr('data-zdCode'); - zdObj.icd10 = $($('#nc_tablexyzd .nc_zdText')[i]).attr('data-icd10'); - - zdObj.ywxs = $($('#nc_tablexyzd .nc_ywxsText')[i]).val(); - zdObj.ywstr = $($('#nc_tablexyzd .nc_ywxsText')[i]).attr('data-ywstr'); - zdObj.ywlx = $($('#nc_tablexyzd .nc_ywxsText')[i]).attr('data-ywlx'); - zdObj.ysbz = $($('#nc_tablexyzd .nc_zdText')[i]).siblings('.chkValue').is(':checked') - if (zdObj.zdmc && zdObj.zdmc) { //为的是排除空诊断 - if (i == 0) { - zdObj.zdlx = @Html.Raw(((int)EnumZdlx.Main).ToString()); //默认第一个诊断为主诊断 1:主诊断 2副诊断 - } - else { - zdObj.zdlx = @Html.Raw(((int)EnumZdlx.Deputy).ToString()); + var needTriggleActive = false; //是否需要处方处方更新 + $.each(treeSeleData, function () { + var inputName = this.Code.substr(3); + if (inputName == "zs" || inputName == "xbs" || inputName == "jws" || inputName == "yjs" || inputName == "gms" || inputName == "hy" || inputName == "ct" || inputName == "fbsj" || inputName == "clfa" || inputName == "fzjc") { + $('#' + inputName).val(ajaxresp[inputName]); //除诊断和处方外 + } + //西医诊断 + if (inputName == "xyzd") { + $('#tablexyzd .minusToggleCircle').trigger('click'); //先还原 + if (ajaxresp.xyzdList.length > 0) { + for (var i = 0; i < ajaxresp.xyzdList.length; i++) { + if (ajaxresp.xyzdList.length > 1 && i < ajaxresp.xyzdList.length - 1) { + //先append + var number = $('#tablexyzd .zdText').length + 1; + var $newTr = $('>'); + $newTr.appendTo($('#tablexyzd')); } - xyzdArray.push(zdObj) - } - } - for (var i = 0; i < xyzdArray.length; i++) { - if (xyzdArray.length > 1 && i < xyzdArray.length - 1) { - //先append - var number = $('#tablexyzd .zdText').length + 1; - var $newTr = $('>'); - $newTr.appendTo($('#tablexyzd')); - } - //再赋值 - for (var j = 0; j < $('#tablexyzd .zdText').length; j++) { - if (i == j) { - $($('#tablexyzd .zdText')[j]).val(xyzdArray[i].zdmc); - $($('#tablexyzd .zdText')[j]).attr("data-zdCode", xyzdArray[i].zdCode); - $($('#tablexyzd .zdText')[j]).attr("data-icd10", xyzdArray[i].icd10); - $($('#tablexyzd .chkValue')[j]).prop('checked', xyzdArray[i].ysbz); - - - //alert(xyzdArray[i].ywxs): - $($('#tablexyzd .xyywtstrText')[j]).val(xyzdArray[i].ywstr); - $($('#tablexyzd .xyywtlxText')[j]).val(xyzdArray[i].ywlx); - $($('#tablexyzd .ywxsText')[j]).val(xyzdArray[i].ywxs); + //再赋值 + for (var j = 0; j < $('#tablexyzd .zdText').length; j++) { + if (i == j) { + $($('#tablexyzd .zdText')[j]).val(ajaxresp.xyzdList[i].zdmc); + $($('#tablexyzd .zdText')[j]).attr("data-zdCode", ajaxresp.xyzdList[i].zdCode); + $($('#tablexyzd .zdText')[j]).attr("data-icd10", ajaxresp.xyzdList[i].icd10); + $($('#tablexyzd .gjybxsText')[i]).val(ajaxresp.xyzdList[i].icd10); + $($('#tablexyzd .chkValue')[j]).prop('checked', ajaxresp.xyzdList[i].ysbz); + $($('#tablexyzd .xyzdbzText')[i]).val(ajaxresp.xyzdList[i].zdbz); + $($('#tablexyzd .xyywtstrText')[j]).val(ajaxresp.xyzdList[i].ywstr); + $($('#tablexyzd .xyywtlxText')[j]).val(ajaxresp.xyzdList[i].ywlx); + $($('#tablexyzd .ywxsText')[j]).val(ajaxresp.xyzdList[i].ywxs); + } } } + } else { + //清空主诊断 + $('#tablexyzd .zdText').val(''); + $('#tablexyzd .zdText').attr("data-zdCode", ''); + $('#tablexyzd .zdText').attr("data-icd10", ''); + $('#tablexyzd .chkValue').prop('checked', false); } } - else { - //清空主诊断 - $('#tablexyzd .zdText').val(''); - $('#tablexyzd .zdText').attr("data-zdCode", ''); - $('#tablexyzd .zdText').attr("data-icd10", ''); - $('#tablexyzd .chkValue').prop('checked', false); - } - } - //中医诊断 - if (inputName == "zyzd") { - $('#tablezyzd .minusToggleCircle').trigger('click'); //先还原 - if ($('#nc_tablezyzd .nc_zdText').length) { - var zyzdArray = new Array(); - for (var i = 0; i < $('#nc_tablezyzd .nc_zdText').length; i++) { - var zdObj = new Object(); - zdObj.zdmc = $($('#nc_tablezyzd .nc_zdText')[i]).val(); - zdObj.zdCode = $($('#nc_tablezyzd .nc_zdText')[i]).attr('data-zdCode'); - zdObj.icd10 = $($('#nc_tablezyzd .nc_zdText')[i]).attr('data-icd10'); - zdObj.ysbz = $($('#nc_tablezyzd .nc_zdText')[i]).siblings('.chkValue').is(':checked'); - zdObj.zhmc = $($('#nc_tablezyzd .nc_zhText')[i]).val(); - zdObj.zhCode = $($('#nc_tablezyzd .nc_zhText')[i]).attr('data-zhCode'); - if (zdObj.zdmc && zdObj.zdmc) { //为的是排除空诊断 - if (i == 0) { - zdObj.zdlx = @Html.Raw(((int)EnumZdlx.Main).ToString()); //默认第一个诊断为主诊断 1:主诊断 2副诊断 - } - else { - zdObj.zdlx = @Html.Raw(((int)EnumZdlx.Deputy).ToString()); + //中医诊断 + if (inputName == "zyzd") { + $('#tablezyzd .minusToggleCircle').trigger('click'); //先还原 + if (ajaxresp.zyzdList.length>0) { + for (var i = 0; i < ajaxresp.zyzdList.length; i++) { + if (ajaxresp.zyzdList.length > 1 && i < ajaxresp.zyzdList.length - 1) { + //先append + var number = $('#tablezyzd .zdText').length + 1; + var $newTr = $(''); + $newTr.appendTo($('#tablezyzd')); } - - zyzdArray.push(zdObj) - } - } - for (var i = 0; i < zyzdArray.length; i++) { - if (zyzdArray.length > 1 && i < zyzdArray.length - 1) { - //先append - var number = $('#tablezyzd .zdText').length + 1; - var $newTr = $(''); - $newTr.appendTo($('#tablezyzd')); - } - //再赋值 - for (var j = 0; j < $('#tablezyzd .zdText').length; j++) { - if (i == j) { - $($('#tablezyzd .zdText')[j]).val(zyzdArray[i].zdmc); - $($('#tablezyzd .zdText')[j]).attr("data-zdCode", zyzdArray[i].zdCode); - $($('#tablezyzd .zdText')[j]).attr("data-icd10", zyzdArray[i].icd10); - $($('#tablezyzd .chkValue')[j]).prop('checked', zyzdArray[i].ysbz); - $($('#tablezyzd .zhText')[j]).val(zyzdArray[i].zhmc); - $($('#tablezyzd .zhText')[j]).attr("data-zhCode", zyzdArray[i].zhCode); + //再赋值 + for (var j = 0; j < $('#tablezyzd .zdText').length; j++) { + if (i == j) { + $($('#tablezyzd .zdText')[j]).val(ajaxresp.zyzdList[i].zdmc); + $($('#tablezyzd .zdText')[j]).attr("data-zdCode", ajaxresp.zyzdList[i].zdCode); + $($('#tablezyzd .zdText')[j]).attr("data-icd10", ajaxresp.zyzdList[i].icd10); + $($('#tablezyzd .chkValue')[j]).prop('checked', ajaxresp.zyzdList[i].ysbz); + $($('#tablezyzd .zhText')[j]).val(ajaxresp.zyzdList[i].zhmc); + $($('#tablezyzd .zhText')[j]).attr("data-zhCode", ajaxresp.zyzdList[i].zhCode); + $($('#tablezyzd .zyzdbzText')[i]).val(ajaxresp.zyzdList[i].zdbz); + } } } + } else { + //清空主诊断 + $('#tablezyzd .zdText').val(''); + $('#tablezyzd .zdText').attr("data-zdCode", ''); + $('#tablezyzd .zdText').attr("data-icd10", ''); + $('#tablezyzd .chkValue').prop('checked', false); + $('#tablezyzd .zhText').val(''); + $('#tablezyzd .zhText').attr("data-zhCode", ''); } } - else { - //清空主诊断 - $('#tablezyzd .zdText').val(''); - $('#tablezyzd .zdText').attr("data-zdCode", ''); - $('#tablezyzd .zdText').attr("data-icd10", ''); - $('#tablezyzd .chkValue').prop('checked', false); - $('#tablezyzd .zhText').val(''); - $('#tablezyzd .zhText').attr("data-zhCode", ''); - } - } - //康复 - if (inputName == "kfcf" - && window.historydataArray.kfcf && window.historydataArray.kfcf.length) { - needTriggleActive = true; - if (!window.alldataArray.kfcf) { - window.alldataArray.kfcf = new Array(); + //康复 + if (inputName == "kfcf" + && historydataArray.kfcf && historydataArray.kfcf.length) { + needTriggleActive = true; + if (!window.alldataArray.kfcf) { + window.alldataArray.kfcf = new Array(); + } + window.alldataArray.kfcf = $.jsonWhere(window.alldataArray.kfcf, function (v) { + return !!v.cfId; //保留原已持久化的处方 + }); + $.each(historydataArray.kfcf, function () { + window.alldataArray.kfcf.push(this); + }); } - window.alldataArray.kfcf = $.jsonWhere(window.alldataArray.kfcf, function (v) { - return !!v.cfId; //保留原已持久化的处方 - }); - $.each(window.historydataArray.kfcf, function () { - window.alldataArray.kfcf.push(this); - }); - } - //常规项目 - if (inputName == "cgxmcf" - && window.historydataArray.cgxmcf && window.historydataArray.cgxmcf.length) { - needTriggleActive = true; - if (!window.alldataArray.cgxmcf) { - window.alldataArray.cgxmcf = new Array(); + //常规项目 + if (inputName == "cgxmcf" + && historydataArray.cgxmcf && historydataArray.cgxmcf.length) { + needTriggleActive = true; + if (!window.alldataArray.cgxmcf) { + window.alldataArray.cgxmcf = new Array(); + } + window.alldataArray.cgxmcf = $.jsonWhere(window.alldataArray.cgxmcf, function (v) { + return !!v.cfId; //保留原已持久化的处方 + }); + $.each(historydataArray.cgxmcf, function () { + window.alldataArray.cgxmcf.push(this); + }); } - window.alldataArray.cgxmcf = $.jsonWhere(window.alldataArray.cgxmcf, function (v) { - return !!v.cfId; //保留原已持久化的处方 - }); - $.each(window.historydataArray.cgxmcf, function () { - window.alldataArray.cgxmcf.push(this); - }); - } - //西药 - if (inputName == "xycf" - && window.historydataArray.xycf && window.historydataArray.xycf.length) { - needTriggleActive = true; - if (!window.alldataArray.xycf) { - window.alldataArray.xycf = new Array(); + + //西药 + if (inputName == "xycf" + && historydataArray.xycf && historydataArray.xycf.length) { + needTriggleActive = true; + if (!window.alldataArray.xycf) { + window.alldataArray.xycf = new Array(); + } + window.alldataArray.xycf = $.jsonWhere(window.alldataArray.xycf, function (v) { + return !!v.cfId; //保留原已持久化的处方 + }); + $.each(historydataArray.xycf, function () { + window.alldataArray.xycf.push(this); + }); } - window.alldataArray.xycf = $.jsonWhere(window.alldataArray.xycf, function (v) { - return !!v.cfId; //保留原已持久化的处方 - }); - $.each(window.historydataArray.xycf, function () { - window.alldataArray.xycf.push(this); - }); - } - //中药 - if (inputName == "zycf" - && window.historydataArray.zycf && window.historydataArray.zycf.length) { - needTriggleActive = true; - if (!window.alldataArray.zycf) { - window.alldataArray.zycf = new Array(); + //中药 + if (inputName == "zycf" + && historydataArray.zycf && historydataArray.zycf.length) { + needTriggleActive = true; + if (!window.alldataArray.zycf) { + window.alldataArray.zycf = new Array(); + } + window.alldataArray.zycf = $.jsonWhere(window.alldataArray.zycf, function (v) { + return !!v.cfId; //保留原已持久化的处方 + }); + $.each(historydataArray.zycf, function () { + window.alldataArray.zycf.push(this); + }); } - window.alldataArray.zycf = $.jsonWhere(window.alldataArray.zycf, function (v) { - return !!v.cfId; //保留原已持久化的处方 - }); - $.each(window.historydataArray.zycf, function () { - window.alldataArray.zycf.push(this); - }); - } - //检验 - if (inputName == "jycf" - && window.historydataArray.jycf && window.historydataArray.jycf.length) { - needTriggleActive = true; - if (!window.alldataArray.jycf) { - window.alldataArray.jycf = new Array(); + //检验 + if (inputName == "jycf" + && historydataArray.jycf && historydataArray.jycf.length) { + needTriggleActive = true; + if (!window.alldataArray.jycf) { + window.alldataArray.jycf = new Array(); + } + window.alldataArray.jycf = $.jsonWhere(window.alldataArray.jycf, function (v) { + return !!v.cfId; //保留原已持久化的处方 + }); + $.each(historydataArray.jycf, function () { + window.alldataArray.jycf.push(this); + }); } - window.alldataArray.jycf = $.jsonWhere(window.alldataArray.jycf, function (v) { - return !!v.cfId; //保留原已持久化的处方 - }); - $.each(window.historydataArray.jycf, function () { - window.alldataArray.jycf.push(this); - }); - } - //检查 - if (inputName == "jccf" - && window.historydataArray.jccf && window.historydataArray.jccf.length) { - needTriggleActive = true; - if (!window.alldataArray.jccf) { - window.alldataArray.jccf = new Array(); + //检查 + if (inputName == "jccf" + && historydataArray.jccf && historydataArray.jccf.length) { + needTriggleActive = true; + if (!window.alldataArray.jccf) { + window.alldataArray.jccf = new Array(); + } + window.alldataArray.jccf = $.jsonWhere(window.alldataArray.jccf, function (v) { + return !!v.cfId; //保留原已持久化的处方 + }); + $.each(historydataArray.jccf, function () { + window.alldataArray.jccf.push(this); + }); } - window.alldataArray.jccf = $.jsonWhere(window.alldataArray.jccf, function (v) { - return !!v.cfId; //保留原已持久化的处方 - }); - $.each(window.historydataArray.jccf, function () { - window.alldataArray.jccf.push(this); - }); + }); + if (needTriggleActive) { + //处方数据发生了变更 + triggleActive(); } - }); - if (needTriggleActive) { - //处方数据发生了变更 - triggleActive(); + } else { + return false; } - } - else { - return false; - } - }); - } - //}); - - //显示检查报告 //待完善 - function showReport() { - if ($('#divTree').is(":hidden")) { - $('#divTree').show(); - $('#hpreport').hide(); + }); } - else { - $('#divTree').hide(); - $('#hpreport').show(); - var mydata = [ + + //显示检查报告 //待完善 + function showReport() { + if ($('#divTree').is(":hidden")) { + $('#divTree').show(); + $('#hpreport').hide(); + } else { + $('#divTree').hide(); + $('#hpreport').show(); + var mydata = [ { bgmc: 'CT报告', fbsj: '2017-12-29' }, @@ -2445,34 +2696,35 @@ { bgmc: 'HOT', fbsj: '2017-12-29' } - ] + ] - gridReport(mydata); - } - } - //显示检查报告 //待完善 - function gridReport(mydata) { - var $gridReport = $("#gridReport"); - $gridReport.newtouchLocalDataGrid({ - height: $(window).height() - 130, - unwritten: false, - colModel: [ - { label: '报告名称', name: 'bgmc', width: 60, align: 'center' }, - { label: '发布时间', name: 'fbsj', width: 80, align: 'center' }, - ], - ondblClickRow: function (rowid) { - $.modalOpen({ - id: "Form", - title: "修改数据", - url: "/EPrescriptionManage/EPrescription/InspectForm", - width: "1000px", - height: "800px", - callBack: function (iframeId) { - } - }); + gridReport(mydata); } - }, mydata); - } + } + + //显示检查报告 //待完善 + function gridReport(mydata) { + var $gridReport = $("#gridReport"); + $gridReport.newtouchLocalDataGrid({ + height: $(window).height() - 130, + unwritten: false, + colModel: [ + {label: '报告名称', name: 'bgmc', width: 60, align: 'center'}, + {label: '发布时间', name: 'fbsj', width: 80, align: 'center'}, + ], + ondblClickRow: function (rowid) { + $.modalOpen({ + id: "Form", + title: "修改数据", + url: "/EPrescriptionManage/EPrescription/InspectForm", + width: "1000px", + height: "800px", + callBack: function (iframeId) { + } + }); + } + }, mydata); + } @@ -2538,6 +2790,7 @@ //保存 function SaveData(jzFinish, fromCfSaveCallback) { + debugger; var jzObject = window.currPatientInfo; if (!!!jzObject || JSON.stringify(jzObject) === '{}') { $.modalAlert("患者信息异常,当前病人已结束就诊。", 'warning'); @@ -2686,7 +2939,7 @@ $.modalAlert(ret.msg, "warning"); return; } - console.log("所有处方信息:", cfDtoArray); + //console.log("所有处方信息:", cfDtoArray); //return false; //保存 if (window.currPatientInfo.brxzCode !== "" && '@ViewBag.ControlbrxzCode'.indexOf(window.currPatientInfo.brxzCode) > -1) { @@ -2771,6 +3024,7 @@ type: "POST", loadingtext: !!!fromCfSaveCallback ? "病历数据保存中,请稍后…" : "处方数据保存中,请稍后…", success: function (data) { + debugger; var patInfoObj = window.currPatientInfo; var jysj = $.getTime(); var trHead = {GRSBM:patInfoObj.sbbh,CBRXZQH:patInfoObj.cbdbm,JZWYBH:patInfoObj.ybjsh,JYSJ:jysj}; @@ -2779,6 +3033,10 @@ jz_sqtx(SqtxHead,patInfoObj);//就诊事前提醒 zd_sqtx(SqtxHead,patInfoObj);//调用诊断事前提醒,不在下方保存处方时调用 } + if ('@(isOpenRationalUse)' === 'ON'){ + var jzId = data.data; + mzhlyy(jzId); + } if (!!!fromCfSaveCallback) { if (data.message==null) { $.modalAlert("保存成功", 'success'); @@ -2786,14 +3044,21 @@ else { $.modalAlert(data.message, 'warning'); } - + mrflag = 0; if(jzFinish)//结束就诊 { - newtouch_globalevent_f4(); //清空 所有文本、处方、历史处方、grid列表 - newtouch_event_f4_expand();//清空当前病历病人信息; + sessionStorage.removeItem('reqSourcePage'); //先清空 + sessionStorage.setItem("reqSourcePage", "fromTreatedPage"); + window.currPatientInfo.jzzt = '@((int)EnumJzzt.Treated)'; + window.init_MedicalRecord(); + //newtouch_globalevent_f4(); //清空 所有文本、处方、历史处方、grid列表 + //newtouch_event_f4_expand();//清空当前病历病人信息; } else{ - GetfillData(); + //GetfillData(); + window.currPatientInfo.jzId = data.data; + window.currPatientInfo.jzzt = '@((int)EnumJzzt.Treating)'; + window.init_MedicalRecord(); } if("@SkipPatientList"=="true") { @@ -2817,7 +3082,8 @@ { case "qinhuangdao": case "shanghai": - if(patInfoObj.brxzCode != '0' && patInfoObj.brxzCode != 'yb3' && patInfoObj.brxzCode != 'yb6' && patInfoObj.brxzCode != 'yb25'&& patInfoObj.brxzCode != 'yb4'&& patInfoObj.brxzCode != 'yb19'&& patInfoObj.brxzCode != 'yb23') + case "tongyong": + if(patInfoObj.brxzCode != '0') yzsqtx(); break; } @@ -3444,6 +3710,7 @@ var historydataArray = new Array(); //全局变量,用来存放历史处方数据 //接收'处方'数据 呈现之 typeFlag 区分下面树 function triggleActive(typeFlag) { + debugger; var newdataArray = new Array(); var $newtableKfmx; var $newtableCgxmmx; @@ -3476,6 +3743,7 @@ //alldataArray :[kfcf:[{cfh:‘处方1’,xmmc:‘’},{cfh:‘处方2’,xmmc:‘’},{cfh:‘处方1’,xmmc:‘’}]] //1.遍历所有数据 $.each(Object.keys(newdataArray), function () { //Object.keys(newdataArray):["kfcf"] + debugger; var itemsKey = String(this); //String(Object.keys(newdataArray):["kfcf"]) : kfcf //2.根据每个索引找到其对应的Value(value是一个数组,数组里是多个对象) var itemsMxArr = newdataArray[String(this)]; //itemsMxArr 取出key为kfcf的所有明细 @@ -3496,10 +3764,10 @@ else { let JeArray = {}; itemsMxArr.forEach(item => { - if (!JeArray[item.je]) { - JeArray[item.je] = []; + if (!JeArray[item.cfId]) { + JeArray[item.cfId] = []; } - JeArray[item.je].push(item); + JeArray[item.cfId].push(item); }); var JeArrays = new Array(); @@ -3516,7 +3784,7 @@ } } let toJe = ""; - if (JeArrays.length > 0) toJe = JeArrays.reduce((prev, items) => { return prev += items.je }, 0).toFixed(2); + if (JeArrays.length > 0) toJe = JeArrays.reduce((prev, items) => { return prev += parseFloat(items.je) }, 0).toFixed(2); //3.3.2 若不存在,则push typeClassificationArr.push({ cfId: itemsMxArr[i].cfId ,cfh: itemsMxArr[i].cfh @@ -3532,6 +3800,7 @@ } //遍历处方,呈现之 for (var i = 0; i < typeClassificationArr.length; i++) { + debugger; var lasttdContent = ''; lasttdContent += '  Rp'; if(typeFlag != "historynodeContent" && !(window.currPatientInfo && window.currPatientInfo.jzzt == '@((int)EnumJzzt.Treated)')){ @@ -3607,7 +3876,7 @@ } let toJe = ""; - if (JeArrays.length > 0) toJe = JeArrays.reduce((prev, items) => { return prev += items.je }, 0).toFixed(2); + if (JeArrays.length > 0) toJe = JeArrays.reduce((prev, items) => { return prev += parseFloat(items.je) }, 0).toFixed(2); //3.3.2 若不存在,则push typeClassificationArr.push({ cfId: itemsMxArr[i].cfId ,cfh: itemsMxArr[i].cfh @@ -3642,6 +3911,11 @@ } } lasttdContent += '  '; + + if ('@(isOpenRationalUse)' === 'ON'){ + lasttdContent += '   '; + } + } var thisHtml = ''; thisHtml += ''; @@ -3659,6 +3933,7 @@ } // 3.1.2找到key是否为西药处方 if (itemsKey == "xycf") { + debugger; $newtableXymx.html(''); //先清空html var typeClassificationArr = new Array(); for (var i = 0; i < itemsMxArr.length; i++) { @@ -3713,7 +3988,7 @@ } let toJe = ""; - if (JeArrays.length > 0) toJe = JeArrays.reduce((prev, items) => { return prev += items.je }, 0).toFixed(2); + if (JeArrays.length > 0) toJe = JeArrays.reduce((prev, items) => { return prev += parseFloat(items.je) }, 0).toFixed(2); //3.3.2 若不存在,则push typeClassificationArr.push({ cfId: itemsMxArr[i].cfId ,cfh: itemsMxArr[i].cfh @@ -3765,6 +4040,9 @@ } //} } + if ('@(isOpenRationalUse)' === 'ON'){ + lasttdContent += '   '; + } var thisHtml = ''; thisHtml += ''; if(typeFlag != "historynodeContent"){ @@ -3829,7 +4107,7 @@ } let toJe = ""; - if (JeArrays.length > 0) toJe = JeArrays.reduce((prev, items) => { return prev += items.je }, 0).toFixed(2); + if (JeArrays.length > 0) toJe = JeArrays.reduce((prev, items) => { return prev += parseFloat(items.je) }, 0).toFixed(2); //3.3.2 若不存在,则push typeClassificationArr.push({ cfId: itemsMxArr[i].cfId ,cfh: itemsMxArr[i].cfh @@ -3891,6 +4169,7 @@ } // 3.1.4找到key是否为检验申请单 if (itemsKey == "jycf") { + debugger; $newtableJymx.html(''); //先清空html var typeClassificationArr = new Array(); for (var i = 0; i < itemsMxArr.length; i++) { @@ -3905,7 +4184,7 @@ } else { let JeArray = {}; - itemsMxArr.forEach(JeItems => { if (!JeArray[JeItems.cfId]) JeArray[JeItems.cfId] = []; JeArray[JeItems.cfId].push(JeItems); }); + itemsMxArr.forEach(JeItems => { if (!JeArray[JeItems.cfh]) JeArray[JeItems.cfh] = []; JeArray[JeItems.cfh].push(JeItems); }); var JeArrays = new Array(); for (const groupKey in JeArray) { @@ -3913,7 +4192,7 @@ const itemArray = JeArray[groupKey]; for (const items in itemArray) { const itemsDetails = itemArray[items]; - if (itemsMxArr[i].cfId == itemsDetails.cfId) + if (itemsMxArr[i].cfh == itemsDetails.cfh) JeArrays = itemArray; break; } if (JeArrays.length > 0) break; @@ -3921,7 +4200,7 @@ } let toJe = ""; - if (JeArrays.length > 0) toJe = JeArrays.reduce((prev, items) => { return prev += items.dj }, 0).toFixed(2); + if (JeArrays.length > 0) toJe = JeArrays.reduce((prev, items) => { return prev += items.je }, 0).toFixed(2); //3.3.2 若不存在,则push typeClassificationArr.push({ cfId: itemsMxArr[i].cfId ,cfh: itemsMxArr[i].cfh @@ -3982,7 +4261,7 @@ } else { let JeArray = {}; - itemsMxArr.forEach(JeItems => { if (!JeArray[JeItems.cfId]) JeArray[JeItems.cfId] = []; JeArray[JeItems.cfId].push(JeItems); }); + itemsMxArr.forEach(JeItems => { if (!JeArray[JeItems.cfh]) JeArray[JeItems.cfh] = []; JeArray[JeItems.cfh].push(JeItems); }); var JeArrays = new Array(); for (const groupKey in JeArray) { @@ -3990,7 +4269,7 @@ const itemArray = JeArray[groupKey]; for (const items in itemArray) { const itemsDetails = itemArray[items]; - if (itemsMxArr[i].cfId == itemsDetails.cfId) + if (itemsMxArr[i].cfh == itemsDetails.cfh) JeArrays = itemArray; break; } if (JeArrays.length > 0) break; @@ -3998,7 +4277,7 @@ } let toJe = ""; - if (JeArrays.length > 0) toJe = JeArrays.reduce((prev, items) => { return prev += items.dj }, 0).toFixed(2); + if (JeArrays.length > 0) toJe = JeArrays.reduce((prev, items) => { return prev += items.je }, 0).toFixed(2); //3.3.2 若不存在,则push typeClassificationArr.push({ cfId: itemsMxArr[i].cfId ,cfh: itemsMxArr[i].cfh @@ -4531,7 +4810,60 @@ }); } + + $(document).on('click', '#mzhlyy', function(e){ + + var cfId = $(this).closest('tr').attr('data-cfId'); + if ( '@(isOpenRationalUse)' === 'ON'){ + $.najax({ + url: "/MedicalRecord/GetMzHlyy", + data: {jzId: window.currPatientInfo.jzId,cfId: cfId}, + type: "POST", + success: function (data) { + if(data.state && data.state == 'success' && !(data.data === false)){ + var filteredData = data.data.filter(function(item) { + return item.Cfstate === "1" || item.Cfstate === "2"; + }); + // 如果有符合条件的元素,调用 HlyyDrugInfo + if (filteredData.length > 0) { + HlyyDrugInfo(filteredData); // 传递筛选后的数据 + $('#drugInfoModal').modal('show'); + } + } + else{ + $.modalAlert("发送失败", 'error'); + } + } + }); + } + }); + function mzhlyy (jzId){ + if ( '@(isOpenRationalUse)' === 'ON'){ + $.najax({ + url: "/MedicalRecord/GetMzHlyy", + data: {jzId: jzId,cfId:""}, + type: "POST", + success: function (data) { + if(data.state && data.state == 'success' && !(data.data === false)){ + var filteredData = data.data.filter(function(item) { + return item.Cfstate === "1" || item.Cfstate === "2"; + }); + // 如果有符合条件的元素,调用 HlyyDrugInfo + if (filteredData.length > 0) { + HlyyDrugInfo(filteredData); // 传递筛选后的数据 + $('#drugInfoModal').modal('show'); + } + } + else{ + $.modalAlert("发送失败", 'error'); + } + } + }); + } + } + + //打印单个处方 $(document).on('click', '.iconPrintSingleCf', function(e){ var type = $(this).closest('tr').attr('data-cflx'); @@ -4582,6 +4914,10 @@ { rpturl = '@Html.Raw(reportUrl)'+"?tempCode=20&orgId="+'@curOpr.OrganizeId'+ "&systemCode=" + '@Html.Raw(ReportSystemCode)'; } + else if (type == "kfcf") + { + rpturl = '@Html.Raw(reportUrl)'+"?tempCode=20&orgId="+'@curOpr.OrganizeId'+ "&systemCode=" + '@Html.Raw(ReportSystemCode)'; + } else { rpturl = '@Html.Raw(reportUrl)'+"?tempCode=14&orgId="+'@curOpr.OrganizeId'+ "&systemCode=" + '@Html.Raw(ReportSystemCode)'; } @@ -4653,13 +4989,11 @@ // $('.cfdetailpreview ul').append('
      • ' + this.xmmc + '  ' + this.pcmc + '  ' + this.mczll + ' ' + '*' + ' ' + this.sl + '
      • '); //}); // - + debugger var xmcfdatas = []; const rr = new Map(); //const datas = window.alldataArray.kfcf.filter((a) => !rr.has(a.ztId) && rr.set(a.ztId, 1)); xmcfdatas = window.alldataArray.kfcf; - - const orchesData = (data, key) => { const groupBy = (list, fn) => { @@ -4682,25 +5016,26 @@ }) return sortList } - const groupList = orchesData(xmcfdatas, 'cfh'); - const datas = groupList.filter((a) => !rr.has(a.ztId) && rr.set(a.ztId, 1)); - $.each($.jsonWhere(datas, function (v) { - return v && v.cfh == cfh; - }), function () { - //const rr = new Map(); - - //for (var k = 0; k < datas.length; k++) { - if (this.ztId) { - $('.cfdetailpreview ul').append('
      • ' + this.ztmc + ' ' + '*' + ' ' + this.ztsl + '
      • '); - } - else { - $('.cfdetailpreview ul').append('
      • ' + this.xmmc + ' ' + '*' + ' ' + this.ztsl + '
      • '); - } - //} - }); - // - + if(xmcfdatas){ + const groupList = orchesData(xmcfdatas, 'cfh'); + const datas = groupList.filter((a) => !rr.has(a.ztId) && rr.set(a.ztId, 1)); + $.each($.jsonWhere(datas, function (v) { + return v && v.cfh == cfh; + }), function () { + //const rr = new Map(); + //for (var k = 0; k < datas.length; k++) { + if (this.ztId) { + $('.cfdetailpreview ul').append('
      • ' + this.ztmc + ' ' + '*' + ' ' + this.ztsl + '
      • '); + } + else { + $('.cfdetailpreview ul').append('
      • ' + this.xmmc + '  ' + this.pcmc + '  ' + this.mczll + ' ' + '*' + ' ' + this.sl + '
      • '); + //$('.cfdetailpreview ul').append('
      • ' + this.xmmc + ' ' + '*' + ' ' + this.ztsl + '
      • '); + } + //} + }); + } + //历史处方浮层 $.each($.jsonWhere(window.historydataArray.kfcf, function(v){ return v && v.cfh == cfh; }), function(){ @@ -4713,7 +5048,6 @@ //}), function(){ // $('.cfdetailpreview ul').append('
      • ' + this.xmmc + ' ' + '*' + ' ' + this.sl + '
      • '); //}); - //// //$.each($.jsonWhere(window.historydataArray.cgxmcf, function(v){ // return v && v.cfh == cfh; //}), function(){ @@ -4745,39 +5079,42 @@ }) return sortList; } - const groupList = orchesData(xmcfdatas, 'cfh'); - var datas = groupList.filter((a) => !rr.has(a.ztId) ); - if("@sfxmztbs"=="true"){ - var nolist= groupList.filter((a) => a.ztId===null||a.ztId===undefined); - datas = groupList.filter((a) => a.ztId!=null).filter((a) =>!rr.has(a.ztId) && rr.set(a.ztId, 1)).concat(nolist); - } - $.each($.jsonWhere(datas, function (v) { - return v && v.cfh == cfh; - }), function () { - if (this.ztId &&"@sfxmztbs"=="true") { - $('.cfdetailpreview ul').append('
      • ' + this.ztmc + ' ' + '*' + ' ' + this.ztsl +"套"+ '
      • '); + if(xmcfdatas){ + const groupList = orchesData(xmcfdatas, 'cfh'); + var datas = groupList.filter((a) => !rr.has(a.ztId) ); + if("@sfxmztbs"=="true"){ + var nolist= groupList.filter((a) => a.ztId===null||a.ztId===undefined); + datas = groupList.filter((a) => a.ztId!=null).filter((a) =>!rr.has(a.ztId) && rr.set(a.ztId, 1)).concat(nolist); + } + $.each($.jsonWhere(datas, function (v) { + return v && v.cfh == cfh; + }), function () { + if (this.ztId &&"@sfxmztbs"=="true") { + $('.cfdetailpreview ul').append('
      • ' + this.ztmc + ' ' + '*' + ' ' + this.ztsl +"套"+ '
      • '); } - else { - $('.cfdetailpreview ul').append('
      • ' + this.xmmc + ' ' + '*' + ' ' + this.sl + '
      • '); + else { + $('.cfdetailpreview ul').append('
      • ' + this.xmmc + ' ' + '*' + ' ' + this.sl + '
      • '); } }); - + } + $.each($.jsonWhere(window.historydataArray.cgxmcf, function(v){ return v && v.cfh == cfh; }), function(){ $('.cfdetailpreview ul').append('
      • ' + this.xmmc + ' ' + '*' + ' ' + this.sl + '
      • '); - }); - window.alldataArray.cgxmcf = xmcfdatas; + }); } - else if (type == 'xycf') { - - + else if (type == 'xycf') { + //$.each($.jsonWhere(window.alldataArray.xycf, function(v){ + // return v && v.cfh == cfh; + //}), function(){ + // $('.cfdetailpreview ul').append('
      • ' + this.ypmc + '  '+ this.ypgg+ '  ' + this.sl + this.dw + '  (剂量)' + this.mcjl + this.mcjldw + '  ' + this.pcmc + '  ' + this.yfmc + '
      • '); + //}); + // var xmcfdatas = []; const rr = new Map(); //const datas = window.alldataArray.cgxmcf.filter((a) => !rr.has(a.ztId) && rr.set(a.ztId, 1)); xmcfdatas = window.alldataArray.xycf; - - const orchesData = (data, key) => { const groupBy = (list, fn) => { @@ -4805,34 +5142,26 @@ }) return sortList } - const groupList = orchesData(xmcfdatas, 'cfh'); - const datas = groupList.filter((a) => !rr.has(a.ypCode) && rr.set(a.ypCode, 1)); - - $.each($.jsonWhere(datas, function (v) { - return v && v.cfh == cfh; - }), function () { - if (this.ypCode != null) { - - $('.cfdetailpreview ul').append('
      • ' + this.ypmc + '  ' + this.ypgg + '  ' + this.sl + this.dw + '  (剂量)' + this.mcjl + this.mcjldw + '  ' + this.pcmc + '  ' + this.yfmc + '
      • '); - - // $('.cfdetailpreview ul').append('
      • ' + this.ztmc + ' ' + '*' + ' ' + this.sl + '
      • '); - } - //else { - // $('.cfdetailpreview ul').append('
      • ' + this.ypmc + '  ' + this.ypgg + '  ' + this.sl + this.dw + '  (剂量)' + this.mcjl + this.mcjldw + '  ' + this.pcmc + '  ' + this.yfmc + '
      • '); - //} - - }); + if(xmcfdatas){ + const groupList = orchesData(xmcfdatas, 'cfh'); + const datas = groupList.filter((a) => !rr.has(a.ypCode) && rr.set(a.ypCode, 1)); + $.each($.jsonWhere(datas, function (v) { + return v && v.cfh == cfh; + }), function () { + if (this.ypCode != null) { + $('.cfdetailpreview ul').append('
      • ' + this.ypmc + '  ' + this.ypgg + '  ' + this.sl + this.dw + '  (剂量)' + this.mcjl + this.mcjldw + '  ' + this.pcmc + '  ' + this.yfmc + '
      • '); + // $('.cfdetailpreview ul').append('
      • ' + this.ztmc + ' ' + '*' + ' ' + this.sl + '
      • '); + } + //else { + // $('.cfdetailpreview ul').append('
      • ' + this.ypmc + '  ' + this.ypgg + '  ' + this.sl + this.dw + '  (剂量)' + this.mcjl + this.mcjldw + '  ' + this.pcmc + '  ' + this.yfmc + '
      • '); + //} + }); + } - //$.each($.jsonWhere(window.alldataArray.xycf, function(v){ - // return v && v.cfh == cfh; - //}), function(){ - // $('.cfdetailpreview ul').append('
      • ' + this.ypmc + '  '+ this.ypgg+ '  ' + this.sl + this.dw + '  (剂量)' + this.mcjl + this.mcjldw + '  ' + this.pcmc + '  ' + this.yfmc + '
      • '); - //}); - // $.each($.jsonWhere(window.historydataArray.xycf, function (v) { return v && v.cfh == cfh; }), function () { @@ -4890,25 +5219,26 @@ }) return sortList; } - const groupList = orchesData(jycfdatas, 'cfh'); - var datas = groupList.filter((a) => !rr.has(a.ztId) ); - if("@sfxmztbs"=="true"){ - datas = groupList.filter((a) => !rr.has(a.ztId) && rr.set(a.ztId, 1)); - } - $.each($.jsonWhere(datas, function (v) { - return v && v.cfh == cfh; - }), function () { - if (this.ztId &&"@sfxmztbs"=="true") { - if(!this.ztsl) - this.ztsl='1'; - $('.cfdetailpreview ul').append('
      • ' + this.ztmc + ' ' + '*' + ' ' + this.ztsl + '
      • '); + if(jycfdatas){ + const groupList = orchesData(jycfdatas, 'cfh'); + var datas = groupList.filter((a) => !rr.has(a.ztId) ); + if("@sfxmztbs"=="true"){ + datas = groupList.filter((a) => !rr.has(a.ztId) && rr.set(a.ztId, 1)); } - else { - $('.cfdetailpreview ul').append('
      • ' + this.xmmc + ' ' + '*' + ' ' + this.sl + '
      • '); - } - }); - window.alldataArray.jycf = jycfdatas; - // + $.each($.jsonWhere(datas, function (v) { + return v && v.cfh == cfh; + }), function () { + if (this.ztId &&"@sfxmztbs"=="true") { + if(!this.ztsl) + this.ztsl='1'; + $('.cfdetailpreview ul').append('
      • ' + this.ztmc + ' ' + '*' + ' ' + this.ztsl + '
      • '); + } + else { + $('.cfdetailpreview ul').append('
      • ' + this.xmmc + ' ' + '*' + ' ' + this.sl + '
      • '); + } + }); + } + $.each($.jsonWhere(window.historydataArray.jycf, function(v){ return v && v.cfh == cfh; }), function(){ @@ -4947,24 +5277,26 @@ }) return sortList; } - const groupList = orchesData(jccfdatas, 'cfh'); - var datas = groupList.filter((a) => !rr.has(a.ztId) ); - if("@sfxmztbs"=="true"){ - datas = groupList.filter((a) => !rr.has(a.ztId) && rr.set(a.ztId, 1)); - } - $.each($.jsonWhere(datas, function (v) { - return v && v.cfh == cfh; - }), function () { - if (this.ztId &&"@sfxmztbs"=="true") { - if(!this.ztsl) - this.ztsl='1'; - $('.cfdetailpreview ul').append('
      • ' + this.ztmc + ' ' + '*' + ' ' + this.ztsl + '
      • '); - } - else { - $('.cfdetailpreview ul').append('
      • ' + this.xmmc + ' ' + '*' + ' ' + this.sl + '
      • '); + if(jccfdatas){ + const groupList = orchesData(jccfdatas, 'cfh'); + var datas = groupList.filter((a) => !rr.has(a.ztId) ); + if("@sfxmztbs"=="true"){ + datas = groupList.filter((a) => !rr.has(a.ztId) && rr.set(a.ztId, 1)); } - }); - window.alldataArray.jccf = jccfdatas; + $.each($.jsonWhere(datas, function (v) { + return v && v.cfh == cfh; + }), function () { + if (this.ztId &&"@sfxmztbs"=="true") { + if(!this.ztsl) + this.ztsl='1'; + $('.cfdetailpreview ul').append('
      • ' + this.ztmc + ' ' + '*' + ' ' + this.ztsl + '
      • '); + } + else { + $('.cfdetailpreview ul').append('
      • ' + this.xmmc + ' ' + '*' + ' ' + this.sl + '
      • '); + } + }); + } + $.each($.jsonWhere(window.historydataArray.jccf, function(v){ return v && v.cfh == cfh; }), function(){ @@ -5599,7 +5931,9 @@ title: "住院通知单", url: "/MedicalRecord/AdmissionNoticeForm?mzh=" + $('#mzh').text() + "&xm=" + window.currPatientInfo.xm + "&brxz=" + window.currPatientInfo.brxzCode + "&xb=" + window.currPatientInfo.xb + "&nl=" + window.currPatientInfo.nlshow + "&zdmc=" + zdmc , width: "800px", - height: "600px", + height: "450px", + btn: ['', ''], + btnclass: ['', ''], callBack: function (iframeId) { var yuyueObj = top.frames[iframeId].submitForm(); $.modalClose("AdmissionNoticeForm"); @@ -6272,6 +6606,7 @@ }); } function nextclick() { + var mjzbz=$('#mjzbz option:selected').val()??"1"; var djzlist; $.ajax({ @@ -6281,7 +6616,6 @@ dataType: "json", success: function (reflist) { djzlist = reflist; - //console.log("门急诊备注:", mjzbz); if (djzlist != null && djzlist.length>0) { var nextrow = djzlist[0]; syncPresChargeStatus(nextrow.blh, true); @@ -6346,9 +6680,8 @@ window.init_MedicalRecord(); }, }); - - } + @**********************公共方法*************************@ @@ -6441,4 +6774,144 @@ } }); } + function HlyyDrugInfo(Data) { + // 清空已有的内容 + $("#hlyyauditStatus").empty(); + $("#drugGridContainer").empty(); // 清空药品表格容器 + + // 按处方号 (cfh) 和 审核状态 (Cfstate) 分组数据 + var groupedData = {}; + + Data.forEach(function(item) { + + var prescriptionId = item.cfh; + var auditStatus = item.Cfstate; + + + if (!groupedData[prescriptionId]) { + groupedData[prescriptionId] = { + auditStatus: auditStatus, // 存储审核状态 + prescriptions: [] // 存储当前处方号下的药品信息 + }; + } + + // 如果 InfoList 有数据,添加药品信息 + if (item.Message.Infos.InfoList && item.Message.Infos.InfoList.length > 0) { + groupedData[prescriptionId].prescriptions.push(...item.Message.Infos.InfoList); + } + }); + + // 定义药品详情的列模型 + var drugColModel = [ + { label: '组号', name: 'GroupNo', align: 'center', width: 100 }, + { + label: '药品名称', + name: 'DrugName', + align: 'center', + width: 150, + formatter: function(cellValue, options, rowObject) { + // 确保点击时正确传入 DrugId + if ('@(isOpenRationalUse)' === 'ON') { + // 生成一个超链接,点击时传入DrugId + return '' + cellValue + ''; + } + return cellValue; // 如果没有开启 rational use,直接显示药品名称 + } + }, + { label: '给药途径', name: 'AdminRoute', align: 'center', width: 100 }, + { label: '给药频率', name: 'AdminFrequency', align: 'center', width: 100 }, + { label: '错误信息', name: 'MessageText', align: 'center', width: 250 }, + { label: '建议', name: 'Advice', align: 'center', width: 200 }, + { label: '来源', name: 'Source', align: 'center', width: 100 }, + { label: '错误类型', name: 'Type', align: 'center', width: 100 } + ]; + + for (var prescriptionId in groupedData) { + var item = groupedData[prescriptionId]; + + // 定义审核状态的颜色和文字 + const cfStateMap = { + "1": "审核中", + "0": "已审核", + "2": "不通过" + }; + const auditStatus = cfStateMap[item.auditStatus] || "未知状态"; + let statusColor; + let fontSize = "10px"; // 默认字体大小 + + switch (item.auditStatus) { + case "1": // 审核中 + statusColor = "orange"; + break; + case "0": // 已审核 + statusColor = "green"; + break; + case "2": // 不通过 + statusColor = "red"; + break; + default: + statusColor = "gray"; + break; + } + + // 添加处方号和审核状态到模态框 + $("#hlyyauditStatus").append("
        处方号: " + prescriptionId + " 审核状态: " + auditStatus + "
        "); + + // 为每个处方号生成一个单独的表格 + if (item.prescriptions.length > 0) { + // 创建分组标题 + var tableContainer = $('
        '); + tableContainer.append("
        处方号: " + prescriptionId + " 审核信息
        "); + + // 创建并填充药品详情表格 + var table = $('
        主诉: + + 发病日期: + +
        现病史: + +
        既往史: + +
        月经史: + +
        过敏史: + +
        查体: + +
        处理: + + +
        辅助检查: + + +
        婚姻状态: + +
        西医诊断: + + + + + +
        + + + +
        +
        中医诊断: + + + + + + + +
        + + + + 症候 + + +
        +
        康复: +
        + + + + + + +
        处方号
        +
        +
        常规项目: +
        + - - + + +
        - - - - - 处方号
        -
        中医诊断: - + + + + @*}*@ + + + - - @*@if (isOpenKfcf == true) - {*@ - - - - - @*} - @if (isOpenCgxmcf == true) - {*@ - - - - - @*}*@ - - - - - - - - - @*@if (IsOpenJyJcSwitch == true) - {*@ - - - - - - - - - @*}*@ -
        西药: +
        + - - - - + + +
        - - - - 症候 - - - 处方号
        -
        康复: -
        - - - - - - -
        处方号
        -
        -
        常规项目: -
        - - - - - - -
        处方号
        -
        -
        西药: -
        - - - - - - -
        处方号
        -
        -
        中药: -
        - - - - - - -
        处方号
        -
        -
        检验: -
        - - - - - - -
        申请单号
        -
        -
        检查: -
        - - - - - - -
        申请单号
        -
        -
        - - + + + + + + + + @*@if (IsOpenJyJcSwitch == true) + {*@ + + + + - - - - - + + + @*}*@
        中药: +
        + + + + + + +
        处方号
        +
        +
        检验: +
        + + + + + + +
        申请单号
        +
        +
        文件路径备注查看检查: +
        + + + + + + +
        申请单号
        +
        +
        - + + @* *@ + @* *@ + @* *@ + @* *@ + @* *@ + @* *@ + @* *@ + @* *@ + @*
        文件路径备注查看
        *@ - - + - + \ No newline at end of file diff --git a/Newtouch.HIS.CIS/Newtouch.CIS.Web/Views/MedicalRecord/MedicalRecord.cshtml b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Views/MedicalRecord/MedicalRecord.cshtml index b15bde258a9d812318bd2f2155a11047750f863f..dbb920143978ecc336cf6671f43ca950bf02ed61 100644 --- a/Newtouch.HIS.CIS/Newtouch.CIS.Web/Views/MedicalRecord/MedicalRecord.cshtml +++ b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Views/MedicalRecord/MedicalRecord.cshtml @@ -7,6 +7,8 @@ var pacsHost = SiteUrl.GetUrl("OuterPacsServiceHost", ""); var isPrintRehabPres = (ViewBag.ISPrintRehabPres as bool?) ?? false; var isPrintRehabTreatment = (ViewBag.ISPrintRehabTreatment as bool?) ?? false; + //合理用药接口 + var isOpenRationalUse = (ViewBag.isOpenRationalUse); //是否开启合理用药审核接口 //开关:是否开放检验检查 var IsOpenJyJcSwitch = ViewBag.IsOpenJyJcSwitch as bool?; @@ -32,6 +34,7 @@ //远程医疗 var OrganizeCodeSd = ViewBag.OrganizeCodeSd; var RemoteTreatRPTURL = ViewBag.RemoteTreatRPTURL; + //秦皇岛智能审核事前提醒配置 var medicalInsurance = SysConfigReader.String("medicalInsurance"); @@ -110,16 +113,16 @@
        - @**@ + @*报告*@ -
        -
        收费状态处方最后打印时间处方最后打印时间处方最后打印时间治疗单最后打印时间治疗单最后打印时间治疗单最后打印时间金额/元
        症候 常用诊断备注
        症候 常用诊断备注
        症候
        症候
        备注
        备注
        备注
        备注
        备注
        备注
        ' + typeClassificationArr[i].cfh + '
        ' + typeClassificationArr[i].cfh + (typeClassificationArr[i].isdzcf == "1" ? "(电)" : "")+ '
        '); + table.append('
        ' + col.label + '
        ' + drugInfo[col.name] + '' + (drugInfo[col.name] || '') + '
        - +
        *颅脑损伤患者昏迷时间颅脑损伤患者昏迷时间 - *入院前 + 入院前 小时 分钟 - *入院后 + 入院后 小时 分钟 diff --git a/Newtouch.HIS.EMR/Newtouch.EMR.Web/Areas/MedicalRecordManage/Controllers/MedRecordTemplateController.cs b/Newtouch.HIS.EMR/Newtouch.EMR.Web/Areas/MedicalRecordManage/Controllers/MedRecordTemplateController.cs index 5012615dc6537c3945606004db5e579283360f59..ff67d10643d1e960fbca81c976fcab2f7acf9d77 100644 --- a/Newtouch.HIS.EMR/Newtouch.EMR.Web/Areas/MedicalRecordManage/Controllers/MedRecordTemplateController.cs +++ b/Newtouch.HIS.EMR/Newtouch.EMR.Web/Areas/MedicalRecordManage/Controllers/MedRecordTemplateController.cs @@ -91,7 +91,8 @@ namespace Newtouch.EMR.Web.Areas.MedicalRecordManage data.mbqx = mod.mbqx; data.Memo = mod.blxtml + mod.blxtmc; data.zt = "true"; - data.mblj= ConfigurationHelper.GetAppConfigValue("BlTemplatePath"); + data.mblj= ConfigurationHelper.GetAppConfigValue("BlTemplatePath"); + data.LoadWay = Convert.ToInt32(EnummbqxTempLoadWay.DcWriter); if (data.mbqx == Convert.ToInt32( Enummbqx.prv)) { data.ysgh = this.UserIdentity.rygh; diff --git a/Newtouch.HIS.EMR/Newtouch.EMR.Web/Areas/MedicalRecordManage/Views/Shared/_DCSW.JS.cshtml b/Newtouch.HIS.EMR/Newtouch.EMR.Web/Areas/MedicalRecordManage/Views/Shared/_DCSW.JS.cshtml index 1ac48031035a0905f9457d99019b469632b54e8c..7e2699de71b794f2c4ce8b1c38ec239135609c3b 100644 --- a/Newtouch.HIS.EMR/Newtouch.EMR.Web/Areas/MedicalRecordManage/Views/Shared/_DCSW.JS.cshtml +++ b/Newtouch.HIS.EMR/Newtouch.EMR.Web/Areas/MedicalRecordManage/Views/Shared/_DCSW.JS.cshtml @@ -617,6 +617,7 @@ //contentHtml.querySelectorAll('span[innerid]') //获取当前点击的节点 $(contentHtml).on('click', function () { + debugger; var target = ctl.CurrnetElement(function (element) { if (element.getAttribute && element.getAttribute("innerid")) { return true; @@ -647,6 +648,9 @@ //点击列表项时回调 $('#list dl>div').on('click', function (e) { + debugger; + //let res = ctl.SelectSubDocument(modifyRecord[0].NativeHandle); + //var res = ctl.NavigateByUserTrackInfo(modifyRecord[0].NativeHandle.toString()); var innerId = e.srcElement.parentElement.getAttribute('class') var target = $(contentHtml).find('[innerid=' + innerId + ']') var colorFlag = 0 @@ -1061,7 +1065,7 @@ ctl.DCExecuteCommand('Copy', true, null); } } - EventBeforePaste(); + //EventBeforePaste(); + + diff --git a/Newtouch.HIS.PDS/Newtouch.HIS.Web/Areas/StorageManage/Views/DrugStockSearch/ExpiredDrugsView.cshtml b/Newtouch.HIS.PDS/Newtouch.HIS.Web/Areas/StorageManage/Views/DrugStockSearch/ExpiredDrugsView.cshtml index 004c9c8e0aaaecd773495b02381d2f89779fb6e5..9af30a7003cc3fefca1641713a7eb7605260c5be 100644 --- a/Newtouch.HIS.PDS/Newtouch.HIS.Web/Areas/StorageManage/Views/DrugStockSearch/ExpiredDrugsView.cshtml +++ b/Newtouch.HIS.PDS/Newtouch.HIS.Web/Areas/StorageManage/Views/DrugStockSearch/ExpiredDrugsView.cshtml @@ -54,14 +54,15 @@ - + @@ -100,6 +101,9 @@ $(window).resize(function () {//浏览器窗口调整大小时重新加载jqGrid的宽 window.initLayout("MyTabGrid"); }); + if ($.request("type")) { + $("#sel_gqrq").val($.request("type")); + } gridYPZLData(); $("#btn_search").click(function () {search();}); diff --git a/Newtouch.HIS.PDS/Newtouch.HIS.Web/Controllers/HomeController.cs b/Newtouch.HIS.PDS/Newtouch.HIS.Web/Controllers/HomeController.cs index e6a1347922ff6f7713d1f18d5b0e83cd0254baa3..5a30248e2af7dc09986c68314119a0e59de7cae3 100644 --- a/Newtouch.HIS.PDS/Newtouch.HIS.Web/Controllers/HomeController.cs +++ b/Newtouch.HIS.PDS/Newtouch.HIS.Web/Controllers/HomeController.cs @@ -1,10 +1,12 @@ -using System.Collections.Generic; +using System; +using System.Collections.Generic; using System.Linq; using Newtouch.Common.Operator; using Newtouch.HIS.Domain.IDomainServices; using Newtouch.Infrastructure; using Newtouch.Tools; using System.Web.Mvc; +using FrameworkBase.MultiOrg.Domain.IRepository; using Newtouch.Core.Common.Utils; using Newtouch.HIS.Application.Interface; using Newtouch.HIS.Domain.DO; @@ -25,7 +27,7 @@ namespace Newtouch.HIS.Web.Controllers private readonly IPyDmnService _pyDmnService; private readonly IMedicineApp _medicineApp; private readonly IHomePageStatisticsApp _homePageStatisticsApp; - + private readonly ISysConfigRepo _sysConfigRepo; /// /// Index /// @@ -172,19 +174,44 @@ namespace Newtouch.HIS.Web.Controllers string kcyjz = SysConfigReader.String("GET_YFKCYG");//库存预警值 int gqyjz = -SysConfigReader.Int("GET_YFGQYG");//过期预警值 var retdata = _sysUserDmnService.MSGQuery(yfbm,this.OrganizeId, gqyjz, kcyjz); - int gqyjcount=0,kcyjcount=0; + int gqyjcount=0,kcyjcount=0,kcdryjcount=0; if (retdata!=null) { kcyjcount=retdata.Where(p => p.typeas == "1").Count(); gqyjcount = retdata.Where(p => p.typeas == "2").Count(); + kcdryjcount = retdata.Where(p => p.typeas == "3").Count(); } var data =new { rows = retdata, kcyj = kcyjcount, - gqyj= gqyjcount + gqyj= gqyjcount, + drgqyj= kcdryjcount }; return Content(data.ToJson()); } #endregion + + /** + * 同步系统配置参数 + */ + public ActionResult SyncSysConfigParams(string orgId) + { + //基础数据 + var sysConfigBaseEntities = _sysConfigRepo.GetList("", "*").ToList(); + //组织机构自带数据 + var sysConfigEntities = _sysConfigRepo.GetList("", orgId).ToList(); + //根据code 去重 + var sysConfigCodes = new HashSet(sysConfigEntities.Select(entity => entity.Code)); + var filteredEntities = sysConfigBaseEntities + .Where(baseEntity => !sysConfigCodes.Contains(baseEntity.Code)) + .ToList(); + foreach (var item in filteredEntities) + { + item.Id = Guid.NewGuid().ToString(); + item.OrganizeId = orgId; + } + var insert = _sysConfigRepo.Insert(filteredEntities); + return Success("",insert); + } } } \ No newline at end of file diff --git a/Newtouch.HIS.PDS/Newtouch.HIS.Web/Controllers/HospitalizationPharmacyController.cs b/Newtouch.HIS.PDS/Newtouch.HIS.Web/Controllers/HospitalizationPharmacyController.cs index 4bd7a019044607e59e635fc0f80a3707c6b7dfa9..40e0dd5e607eaac42e3ecab8396d9a10317e1804 100644 --- a/Newtouch.HIS.PDS/Newtouch.HIS.Web/Controllers/HospitalizationPharmacyController.cs +++ b/Newtouch.HIS.PDS/Newtouch.HIS.Web/Controllers/HospitalizationPharmacyController.cs @@ -555,6 +555,19 @@ namespace Newtouch.HIS.Web.Controllers return View("RepercussionIndex2019"); } + /// + /// 退药 -- 按照退药申请单退药 + /// + /// + public ActionResult RepercussionIndex2021() + { + ViewBag.OrganizeId = _OrganizeId; + ViewBag.yfbmCode = Constants.CurrentYfbm.yfbmCode; + var printSwitch = _sysConfigRepo.GetValueByCode("hospitalizationReturnDrugAutoPrint", OrganizeId); + ViewBag.returnDrugAutoPrint = string.IsNullOrWhiteSpace(printSwitch) || "true".Equals(printSwitch.ToLower()) ? ViewBag.autoPrintSwitch = "checked=\"checked\"" : ""; + + return View("RepercussionIndex2021"); + } /// /// 住院退药用户信息数据 @@ -854,19 +867,7 @@ namespace Newtouch.HIS.Web.Controllers #endregion - /// - /// 退药 -- 按照退药申请单退药 - /// - /// - public ActionResult RepercussionIndex2021() - { - ViewBag.OrganizeId = _OrganizeId; - ViewBag.yfbmCode = Constants.CurrentYfbm.yfbmCode; - var printSwitch = _sysConfigRepo.GetValueByCode("hospitalizationReturnDrugAutoPrint", OrganizeId); - ViewBag.returnDrugAutoPrint = string.IsNullOrWhiteSpace(printSwitch) || "true".Equals(printSwitch.ToLower()) ? ViewBag.autoPrintSwitch = "checked=\"checked\"" : ""; - - return View("RepercussionIndex2021"); - } + /// /// 执行住院退药V2 diff --git a/Newtouch.HIS.PDS/Newtouch.HIS.Web/Controllers/OutPatientPharmacyController.cs b/Newtouch.HIS.PDS/Newtouch.HIS.Web/Controllers/OutPatientPharmacyController.cs index 4fb340aa0a38b8eb5434f89d60d7c2dc747ea589..be378e710905fe480895144b11269e90239fab58 100644 --- a/Newtouch.HIS.PDS/Newtouch.HIS.Web/Controllers/OutPatientPharmacyController.cs +++ b/Newtouch.HIS.PDS/Newtouch.HIS.Web/Controllers/OutPatientPharmacyController.cs @@ -1095,7 +1095,7 @@ namespace Newtouch.HIS.Web.Controllers var cfhls = new List(); var eq = new OutpatienDrugDeliveryInfo { - PatientInfo = patients.ToList(), + PatientInfo = patients.ToList().GroupBy(p => new { p.cfh, p.cfnm, p.CardNo, p.xm }).Select(v => new patientInfoVO { cfh = v.Key.cfh, cfnm = v.Key.cfnm, CardNo = v.Key.CardNo, xm = v.Key.xm, zsm = string.Join("|", v.Select(f => f.zsm.Trim())) }).ToList(), yfbmCode = Constants.CurrentYfbm.yfbmCode, userCode = OperatorProvider.GetCurrent().UserCode, organizeId = OrganizeId diff --git a/Newtouch.HIS.PDS/Newtouch.HIS.Web/Newtouch.HIS.PDS.Web.csproj b/Newtouch.HIS.PDS/Newtouch.HIS.Web/Newtouch.HIS.PDS.Web.csproj index 418f6a476ed0544d636e69049ed9717293e024a0..b11094e81bae08bfa63d70cba0168af91f090c16 100644 --- a/Newtouch.HIS.PDS/Newtouch.HIS.Web/Newtouch.HIS.PDS.Web.csproj +++ b/Newtouch.HIS.PDS/Newtouch.HIS.Web/Newtouch.HIS.PDS.Web.csproj @@ -89,10 +89,7 @@ False .\..\..\his-dll-common\dlls\MsgPack.dll - - False - ..\..\his-dll-common\dlls\Newtonsoft.Json.dll - + False .\..\..\his-dll-common\hiscommondlls\Newtouch.Common.dll @@ -263,6 +260,8 @@ + + diff --git a/Newtouch.HIS.PDS/Newtouch.HIS.Web/Views/DrugStorage/PriceAdjustmentApproval.cshtml b/Newtouch.HIS.PDS/Newtouch.HIS.Web/Views/DrugStorage/PriceAdjustmentApproval.cshtml index 7664923139384b3013556761e07de85e00c32ab5..39299d5f5beaf7bd08faf45d7269f9ea2f29f12e 100644 --- a/Newtouch.HIS.PDS/Newtouch.HIS.Web/Views/DrugStorage/PriceAdjustmentApproval.cshtml +++ b/Newtouch.HIS.PDS/Newtouch.HIS.Web/Views/DrugStorage/PriceAdjustmentApproval.cshtml @@ -215,7 +215,7 @@ } var ypCodeStr = ""; for (var i = 0; i < rowsDataArray.length; i++) { - if (rowsDataArray[i].Isgq === '已过期') { + if (rowsDataArray[i].Isgq === '已过期' && operationType=="4") { $.modalAlert(rowsDataArray[i].ypCode + " 已过期,执行时间需大于当前时间", 'warning'); return; } diff --git a/Newtouch.HIS.PDS/Newtouch.HIS.Web/Views/Home/Default.cshtml b/Newtouch.HIS.PDS/Newtouch.HIS.Web/Views/Home/Default.cshtml index 0d209e7d708e26034e535fa7ec5ab33a364b21e9..37a59fc5ff93e27d73bcc125ec21ebf9dc4dd8bc 100644 --- a/Newtouch.HIS.PDS/Newtouch.HIS.Web/Views/Home/Default.cshtml +++ b/Newtouch.HIS.PDS/Newtouch.HIS.Web/Views/Home/Default.cshtml @@ -29,7 +29,10 @@ float: left; width: 20%; } - + .dashboard-statss { + float: left; + width: 16.6%; + } .dashboard-stats-item { position: relative; overflow: hidden; @@ -129,7 +132,7 @@
        -
        +
        @@ -324,6 +327,7 @@ $("#h_zydfCount").html(ajaxresp.zydfCount); $("#h_zydtCount").html(ajaxresp.zydtCount); $("#h_expriedDrugCount").html(ajaxresp.expiryDrugCount); + $("#h_todayDrugCount").html(ajaxresp.todayDrugCount); } } }); diff --git a/Newtouch.HIS.PDS/Newtouch.HIS.Web/Views/Home/Index.cshtml b/Newtouch.HIS.PDS/Newtouch.HIS.Web/Views/Home/Index.cshtml index 1a2a81856a096966f4885756e1e70dedc932bfbc..32da3dd4695fcbb0262383217057bec3d9fc91f4 100644 --- a/Newtouch.HIS.PDS/Newtouch.HIS.Web/Views/Home/Index.cshtml +++ b/Newtouch.HIS.PDS/Newtouch.HIS.Web/Views/Home/Index.cshtml @@ -45,12 +45,11 @@
        - @*header部分*@ - @*主体部分*@ - @if (Constants.CurrentYfbm !=null && !string.IsNullOrEmpty(Constants.CurrentYfbm.yfbmmc)) - { -
        -
        - -
        -
        - - - -
        - - +
        +
        + +
        +
        + + + + + +
        +
        +
        + +
        - } - else - { -
        -
        - 请前往 后台管理系统-组织机构-系统用户 为该用户关联药房 -
        -
        - } - - - +
        报表类型: - @Html.DropDownList("sel_rptype", EnumRportType.zgmzjz.ToDescSelectList(), new { @class = "form-control form-an" }) - - 预留金:药房/药库: -
        -
        - -
        - -
        - % -
        -
        +
        报表类型: + @Html.DropDownList("sel_rptype", EnumRportType.zgmzjz.ToDescSelectList(), new { @class = "form-control form-an" }) + + 预留金: +
        +
        + +
        + +
        + % +
        +
        +
        + +
        @@ -73,46 +90,47 @@ $.modalAlert("开始时间不能大于结束时间", "error"); return; } - var patrn = /^\+?[1-9][0-9]*$/; - var yljv = $('#txtylj').val(); - if (patrn.exec(yljv) == null || yljv == "") { - $.modalAlert("预留金只能输入正整数", "error"); - return; - } - - var url = getUrl(); - var type = $('#sel_rptype').val(); - var dybh = null; + var url = '@Html.Raw(reportUrl)' + "?tempCode=1325" + "&systemCode=" + '@Html.Raw(ReportSystemCode)'; + url += "&ksrq=" + $('#kssj').val() + ' 00:00:00'; + url += "&jsrq=" + $('#jssj').val() + ' 23:59:59'; + url += "&yfbm=" + $('#yfbm').val(); + url += "&orgId=" + '@Html.Raw(opr.OrganizeId)'; + //var patrn = /^\+?[1-9][0-9]*$/; + //var yljv = $('#txtylj').val(); + //if (patrn.exec(yljv) == null || yljv == "") { + // $.modalAlert("预留金只能输入正整数", "error"); + // return; + //} + //var url = getUrl(); + //var type = $('#sel_rptype').val(); + //var dybh = null; - if (type==1||type==2) { - - url += "&kssj=" + $('#kssj').val(); - url += "&jssj=" + $.getDate({ date: $('#jssj').val() }) + ' 23:59:59'; - url += "&cblb=" + type; - } - else - { - if (type == 6 || type == 7) { - dybh = 1; - } - if (type==3||type==6) { - type = 1; - } - else if (type == 4 || type == 7) { - type = 2; - } else { - type = 3; - } - - - url += "&kssj=" + $('#kssj').val(); - url += "&jssj=" + $.getDate({ date: $('#jssj').val() }) + ' 23:59:59'; - url += "&ylj=" + $('#txtylj').val(); - url += "&cblb=" + type; - if(dybh){ - url += "&dybh=" + dybh; - } - } + //if (type==1||type==2) { + // url += "&kssj=" + $('#kssj').val(); + // url += "&jssj=" + $.getDate({ date: $('#jssj').val() }) + ' 23:59:59'; + // url += "&cblb=" + type; + //} + //else + //{ + // if (type == 6 || type == 7) { + // dybh = 1; + // } + // if (type==3||type==6) { + // type = 1; + // } + // else if (type == 4 || type == 7) { + // type = 2; + // } else { + // type = 3; + // } + //url += "&kssj=" + $('#kssj').val(); + //url += "&jssj=" + $.getDate({ date: $('#jssj').val() }) + ' 23:59:59'; + //url += "&ylj=" + $('#txtylj').val(); + //url += "&cblb=" + type; + // if(dybh){ + // url += "&dybh=" + dybh; + // } + //} setTimeout("$.loading(true, '正在请求报表页面...');", 10); $("#iframerightiframerightiframerightttt").attr('src', url); diff --git a/Newtouch.HIS.Sett/Newtouch.Web/Areas/ReportManage/Views/Report/Hospitalizationclassification.cshtml b/Newtouch.HIS.Sett/Newtouch.Web/Areas/ReportManage/Views/Report/Hospitalizationclassification.cshtml index a26e6bc1ca7b1553b476491a0a880738e41a2c81..45e307e647f881ceebcc47efa96989f024408a48 100644 --- a/Newtouch.HIS.Sett/Newtouch.Web/Areas/ReportManage/Views/Report/Hospitalizationclassification.cshtml +++ b/Newtouch.HIS.Sett/Newtouch.Web/Areas/ReportManage/Views/Report/Hospitalizationclassification.cshtml @@ -125,10 +125,10 @@ //}) var url = '@Html.Raw(reportUrl)' + "?tempCode=1219" + "&systemCode=" + '@Html.Raw(ReportSystemCode)'; - url += " &zyh=" + $('#zyh').val(); - url += " &orgId=" + OrgId; - url += " &kssj=" + $('#ksrq').val(); - url += " &jssj=" +$('#jsrq').val(); + url += "&zyh=" + $('#zyh').val(); + url += "&orgId=" + OrgId; + url += "&kssj=" + $('#ksrq').val(); + url += "&jssj=" +$('#jsrq').val(); setTimeout("$.loading(true, '正在请求报表页面...');", 10); $("#iframerightiframerightiframerightttt").attr('src', url); diff --git a/Newtouch.HIS.Sett/Newtouch.Web/Areas/ReportManage/Views/Report/InpatientXnhBcmxsqd.cshtml b/Newtouch.HIS.Sett/Newtouch.Web/Areas/ReportManage/Views/Report/InpatientXnhBcmxsqd.cshtml index 90ed359034a9546e936b1f22a11fcd099e887f39..3c80fd7f1bae7db73e58dbeaf65bff63364ac63d 100644 --- a/Newtouch.HIS.Sett/Newtouch.Web/Areas/ReportManage/Views/Report/InpatientXnhBcmxsqd.cshtml +++ b/Newtouch.HIS.Sett/Newtouch.Web/Areas/ReportManage/Views/Report/InpatientXnhBcmxsqd.cshtml @@ -1,8 +1,10 @@ @{ - ViewBag.Title = ""; + ViewBag.Title = "出库明细表"; Layout = "~/Views/Shared/_Form.cshtml"; //报表链接 - var reportUrl = SysConfigReader.OrgReportLink("InpatientXnhBcmxsqd"); + var reportUrl = Newtouch.Core.Common.Utils.ConfigurationHelper.GetAppConfigValue("ReportUrl"); + var ReportSystemCode = Newtouch.Core.Common.Utils.ConfigurationHelper.GetAppConfigValue("ReportSystemCode"); + var opr = Newtouch.Common.Operator.OperatorProvider.GetCurrent(); }
        @@ -12,12 +14,22 @@ 开始日期: + onclick="WdatePicker({ dateFmt: 'yyyy-MM-dd' })" value="@(DateTime.Now.ToString("yyyy-MM-01"))" /> 结束日期: + onclick="WdatePicker({ dateFmt: 'yyyy-MM-dd' })" value="@(DateTime.Now.ToString("yyyy-MM-dd"))" /> + + 药房/药库: + + @@ -49,10 +61,15 @@ $.modalAlert("开始时间不能大于结束时间", "error"); return; } - var url = getUrl(); + var url = '@Html.Raw(reportUrl)' + "?tempCode=1326" + "&systemCode=" + '@Html.Raw(ReportSystemCode)'; + url += "&ksrq=" + $('#kssj').val() + ' 00:00:00'; + url += "&jsrq=" + $('#jssj').val() + ' 23:59:59'; + url += "&yfbm=" + $('#yfbm').val(); + url += "&orgId=" + '@Html.Raw(opr.OrganizeId)'; + @*var url = getUrl(); var usercode = '@ViewBag.usercode'; url += "&kssj=" + $('#kssj').val(); - url += "&jssj=" + $('#jssj').val(); + url += "&jssj=" + $('#jssj').val();*@ setTimeout("$.loading(true, '正在请求报表页面...');", 10); $("#iframerightiframerightiframerightttt").attr('src', url); } diff --git a/Newtouch.HIS.Sett/Newtouch.Web/Areas/ReportManage/Views/Report/InpatientXnhBcsqd.cshtml b/Newtouch.HIS.Sett/Newtouch.Web/Areas/ReportManage/Views/Report/InpatientXnhBcsqd.cshtml index ad836ed6c0b15c9abbd26940e514916ed4c7ff55..229f93f3e8d7a8294e88b185b11d3f5d78812a70 100644 --- a/Newtouch.HIS.Sett/Newtouch.Web/Areas/ReportManage/Views/Report/InpatientXnhBcsqd.cshtml +++ b/Newtouch.HIS.Sett/Newtouch.Web/Areas/ReportManage/Views/Report/InpatientXnhBcsqd.cshtml @@ -1,8 +1,11 @@ @{ - ViewBag.Title = ""; + ViewBag.Title = "门诊结算主单"; Layout = "~/Views/Shared/_Form.cshtml"; //报表链接 - var reportUrl = SysConfigReader.OrgReportLink("InpatientXnhBcsqd"); + //var reportUrl = SysConfigReader.OrgReportLink("InpatientXnhBcsqd"); + var reportUrl = Newtouch.Core.Common.Utils.ConfigurationHelper.GetAppConfigValue("ReportUrl"); + var ReportSystemCode = Newtouch.Core.Common.Utils.ConfigurationHelper.GetAppConfigValue("ReportSystemCode"); + var opr = Newtouch.Common.Operator.OperatorProvider.GetCurrent(); }
        @@ -12,12 +15,12 @@ 开始日期: + onclick="WdatePicker({ dateFmt: 'yyyy-MM-dd' })" value="@(DateTime.Now.ToString("yyyy-MM-01"))" /> 结束日期: + onclick="WdatePicker({ dateFmt: 'yyyy-MM-dd' })" value="@(DateTime.Now.ToString("yyyy-MM-dd"))" /> @@ -49,10 +52,11 @@ $.modalAlert("开始时间不能大于结束时间", "error"); return; } - var url = getUrl(); - var usercode = '@ViewBag.usercode'; - url += "&kssj=" + $('#kssj').val(); - url += "&jssj=" + $('#jssj').val(); + //var url = getUrl(); + var url = '@Html.Raw(reportUrl)' + "?tempCode=1319" + "&systemCode=" + '@Html.Raw(ReportSystemCode)'; + url += "&orgId=" +'@Html.Raw(opr.OrganizeId)'; + url += "&ksrq=" + $('#kssj').val()+' 00:00:00'; + url += "&jsrq=" + $('#jssj').val()+' 23:59:59'; setTimeout("$.loading(true, '正在请求报表页面...');", 10); $("#iframerightiframerightiframerightttt").attr('src', url); } diff --git a/Newtouch.HIS.Sett/Newtouch.Web/Areas/ReportManage/Views/Report/MZCBFYFX.cshtml b/Newtouch.HIS.Sett/Newtouch.Web/Areas/ReportManage/Views/Report/MZCBFYFX.cshtml index c5abcb1d2f5a194de14d7ff875511f19f075670f..802f73241865bd49207a28f1173d8b35921c5ccd 100644 --- a/Newtouch.HIS.Sett/Newtouch.Web/Areas/ReportManage/Views/Report/MZCBFYFX.cshtml +++ b/Newtouch.HIS.Sett/Newtouch.Web/Areas/ReportManage/Views/Report/MZCBFYFX.cshtml @@ -1,6 +1,6 @@  @{ - ViewBag.Title = "MZCBFYFX"; + ViewBag.Title = "住院诊断信息表"; Layout = "~/Views/Shared/_Form.cshtml"; var reportUrl = Newtouch.Core.Common.Utils.ConfigurationHelper.GetAppConfigValue("ReportUrl"); var ReportSystemCode = Newtouch.Core.Common.Utils.ConfigurationHelper.GetAppConfigValue("ReportSystemCode"); @@ -9,30 +9,33 @@
        - - - - - - - - - - - - + + + + + + + + + + + + +
        开始日期: - - 结束日期: - - - -
        住院号: + + 开始日期: + + 结束日期: + + + +
        @@ -63,7 +66,7 @@ $(function () { var h = $(window).height() - 55 $('#layout iframe').css('height', h); - + setTimeout(function () { submit(); }, 100); }); //刷新列表 function refReport() { @@ -71,8 +74,48 @@ } function getUrl() { - var srcUrl2 = '@Html.Raw(reportUrl)' + "?tempCode=1222" + "&systemCode=" + '@Html.Raw(ReportSystemCode)' + "&orgId=" + OrgId + "&ksrq=" + $('#ksrq').val() + "&jsrq=" + $('#jsrq').val(); + var srcUrl2 = '@Html.Raw(reportUrl)' + "?tempCode=1317" + "&systemCode=" + '@Html.Raw(ReportSystemCode)' + "&zyh=" + $('#zyh').val() + "&orgId=" + OrgId + "&ksrq=" + $('#ksrq').val() + "&jsrq=" + $('#jsrq').val(); return srcUrl2; + @*var srcUrl2 = '@Html.Raw(reportUrl)' + "?tempCode=1222" + "&systemCode=" + '@Html.Raw(ReportSystemCode)' + "&orgId=" + OrgId + "&ksrq=" + $('#ksrq').val() + "&jsrq=" + $('#jsrq').val(); + return srcUrl2;*@ } - + //治疗项目选择浮层绑定 + $('#zyh').newtouchBatchFloatingSelector({ + width: 520, + height: 200, + caption: "选择患者", + clickautotrigger: true, + url: "/ReportManage/Report/GetInpatientcryrq", + ajaxparameters: function ($thisinput) { + var keyword = $thisinput.val().trim(); + var zyh = $("#zyh").val(); + return "zyh=" + zyh; + }, + itemdbclickhandler: function ($thistr, $thisinput) { + if (!!$thistr.attr('data-zyh')) { + $('#ryrq').html($thistr.attr('data-ryrq')); + $('#zyh').val($thistr.attr('data-zyh')); + } + }, + colModel: [ + { label: '住院号', name: 'zyh', width: 100 }, + { label: 'cyrq', name: 'cyrq', hidden: true }, + { label: 'ryrq', name: 'ryrq', hidden: true }, + { label: '在院标志', name: 'zybz', width: 100, align: 'Center' }, + { label: '姓名', name: 'xm', width: 120, align: 'Center' }, + { label: '出生年月', name: 'csny', hidden: true, width: 100, align: 'Center' }, + { + label: '性别', name: 'xb', width: 50, align: 'Center', formatter: function (cellvalue) { + return $.getGender(cellvalue); + } + }, + { + label: '年龄', name: 'nlshow', width: 50, align: 'Center', formatter: function (cellvalue, a, b) { + return getAgeFromBirthTime({ begin: b.csny }).text; + } + }, + { label: '床号', name: 'cw', width: 50, align: 'Center' }, + { label: '入院日期', name: 'ryrq', hidden: true, width: 100, align: 'Center' } + ] + }); diff --git a/Newtouch.HIS.Sett/Newtouch.Web/Areas/ReportManage/Views/Report/OutpatientDailyFee.cshtml b/Newtouch.HIS.Sett/Newtouch.Web/Areas/ReportManage/Views/Report/OutpatientDailyFee.cshtml index 5dd707672e132f1f34f6c3edc91ddf462f7adbf0..3ee7d635784257c45b033b2c433c03b586528a59 100644 --- a/Newtouch.HIS.Sett/Newtouch.Web/Areas/ReportManage/Views/Report/OutpatientDailyFee.cshtml +++ b/Newtouch.HIS.Sett/Newtouch.Web/Areas/ReportManage/Views/Report/OutpatientDailyFee.cshtml @@ -17,7 +17,7 @@ 开始日期: - + 结束日期: @@ -142,7 +142,13 @@ var h = $(window).height() - 55; $('#layout iframe').css('height', h); $("#kssj").val('@ViewBag.kssj'); - $("#jssj").val($.getTime()); + $("#jssj").val($.getTime()); + if ('@ViewBag.isfirst' == 'True') { + $('#kssj').prop('disabled', false); + } + else { + $('#kssj').prop('disabled', true); + } setTimeout(function () { submit(); }, 100); }); diff --git a/Newtouch.HIS.Sett/Newtouch.Web/Areas/ReportManage/Views/Report/OutpatientXnhBcmxsqd.cshtml b/Newtouch.HIS.Sett/Newtouch.Web/Areas/ReportManage/Views/Report/OutpatientXnhBcmxsqd.cshtml index 7a2552c3f4c7d280f1f94c36af83c87501bf6189..029e37966cb9214269d717c345c7f3e8e4053daa 100644 --- a/Newtouch.HIS.Sett/Newtouch.Web/Areas/ReportManage/Views/Report/OutpatientXnhBcmxsqd.cshtml +++ b/Newtouch.HIS.Sett/Newtouch.Web/Areas/ReportManage/Views/Report/OutpatientXnhBcmxsqd.cshtml @@ -1,23 +1,29 @@ @{ - ViewBag.Title = ""; + ViewBag.Title = "检验记录表"; Layout = "~/Views/Shared/_Form.cshtml"; //报表链接 - var reportUrl = SysConfigReader.OrgReportLink("OutpatientXnhBcmxsqd"); + var reportUrl = Newtouch.Core.Common.Utils.ConfigurationHelper.GetAppConfigValue("ReportUrl"); + var ReportSystemCode = Newtouch.Core.Common.Utils.ConfigurationHelper.GetAppConfigValue("ReportSystemCode"); + var opr = Newtouch.Common.Operator.OperatorProvider.GetCurrent(); }
        + + @@ -122,10 +122,10 @@ // var url = getUrl(); var url = '@Html.Raw(reportUrl)' + "?tempCode=1218" + "&systemCode=" + '@Html.Raw(ReportSystemCode)'; - url += " &zyh=" + $('#zyh').val(); - url += " &orgId=" + OrgId; - url += " &kssj=" + $('#ksrq').val(); - url += " &jssj=" +$('#jsrq').val(); + url += "&zyh=" + $('#zyh').val(); + url += "&orgId=" + OrgId; + url += "&kssj=" + $('#ksrq').val(); + url += "&jssj=" +$('#jsrq').val(); setTimeout("$.loading(true, '正在请求报表页面...');", 10); $("#iframerightiframerightiframerightttt").attr('src', url); } diff --git a/Newtouch.HIS.Sett/Newtouch.Web/Areas/ReportManage/Views/Report/TBStatistics.cshtml b/Newtouch.HIS.Sett/Newtouch.Web/Areas/ReportManage/Views/Report/TBStatistics.cshtml index 0e25834d532b86eac51d7eff4f80ffbbd4b40901..5511f2c605245925b944b202bb757839edbff2b0 100644 --- a/Newtouch.HIS.Sett/Newtouch.Web/Areas/ReportManage/Views/Report/TBStatistics.cshtml +++ b/Newtouch.HIS.Sett/Newtouch.Web/Areas/ReportManage/Views/Report/TBStatistics.cshtml @@ -1,6 +1,9 @@ @{ ViewBag.Title = ""; Layout = "~/Views/Shared/_Form.cshtml"; + var reportUrl = Newtouch.Core.Common.Utils.ConfigurationHelper.GetAppConfigValue("ReportUrl"); + var ReportSystemCode = Newtouch.Core.Common.Utils.ConfigurationHelper.GetAppConfigValue("ReportSystemCode"); + var opr = Newtouch.Common.Operator.OperatorProvider.GetCurrent(); }
        @@ -15,7 +18,7 @@
        住院号: + + 开始日期: + onclick="WdatePicker({ dateFmt: 'yyyy-MM-dd' })" value="@(DateTime.Now.ToString("yyyy-MM-01"))" /> 结束日期: + onclick="WdatePicker({ dateFmt: 'yyyy-MM-dd' })" value="@(DateTime.Now.ToString("yyyy-MM-dd"))" /> @@ -49,10 +55,11 @@ $.modalAlert("开始时间不能大于结束时间", "error"); return; } - var url = getUrl(); - var usercode = '@ViewBag.usercode'; - url += "&kssj=" + $('#kssj').val(); - url += "&jssj=" + $('#jssj').val(); + var url = '@Html.Raw(reportUrl)' + "?tempCode=1322" + "&systemCode=" + '@Html.Raw(ReportSystemCode)'; + url += "&ksrq=" + $('#kssj').val() + ' 00:00:00'; + url += "&jsrq=" + $('#jssj').val() + ' 23:59:59'; + url += "&zyh=" + $('#zyh').val(); + url += "&orgId=" + '@Html.Raw(opr.OrganizeId)'; setTimeout("$.loading(true, '正在请求报表页面...');", 10); $("#iframerightiframerightiframerightttt").attr('src', url); } @@ -80,5 +87,42 @@ return srcUrl; } - + $('#zyh').newtouchBatchFloatingSelector({ + width: 520, + height: 200, + caption: "选择患者", + clickautotrigger: true, + url: "/ReportManage/Report/GetInpatientcryrq", + ajaxparameters: function ($thisinput) { + var keyword = $thisinput.val().trim(); + var zyh = $("#zyh").val(); + return "zyh=" + zyh; + }, + itemdbclickhandler: function ($thistr, $thisinput) { + if (!!$thistr.attr('data-zyh')) { + $('#ryrq').html($thistr.attr('data-ryrq')); + $('#zyh').val($thistr.attr('data-zyh')); + } + }, + colModel: [ + { label: '住院号', name: 'zyh', width: 100 }, + { label: 'cyrq', name: 'cyrq', hidden: true }, + { label: 'ryrq', name: 'ryrq', hidden: true }, + { label: '在院标志', name: 'zybz', width: 100, align: 'Center' }, + { label: '姓名', name: 'xm', width: 120, align: 'Center' }, + { label: '出生年月', name: 'csny', hidden: true, width: 100, align: 'Center' }, + { + label: '性别', name: 'xb', width: 50, align: 'Center', formatter: function (cellvalue) { + return $.getGender(cellvalue); + } + }, + { + label: '年龄', name: 'nlshow', width: 50, align: 'Center', formatter: function (cellvalue, a, b) { + return getAgeFromBirthTime({ begin: b.csny }).text; + } + }, + { label: '床号', name: 'cw', width: 50, align: 'Center' }, + { label: '入院日期', name: 'ryrq', hidden: true, width: 100, align: 'Center' } + ] + }); \ No newline at end of file diff --git a/Newtouch.HIS.Sett/Newtouch.Web/Areas/ReportManage/Views/Report/OutpatientXnhBcsqd.cshtml b/Newtouch.HIS.Sett/Newtouch.Web/Areas/ReportManage/Views/Report/OutpatientXnhBcsqd.cshtml index 26b5950535fd281a24ac986636bcd83b9733df70..508bf5df55baa3b91503457ecb5ddffde0655055 100644 --- a/Newtouch.HIS.Sett/Newtouch.Web/Areas/ReportManage/Views/Report/OutpatientXnhBcsqd.cshtml +++ b/Newtouch.HIS.Sett/Newtouch.Web/Areas/ReportManage/Views/Report/OutpatientXnhBcsqd.cshtml @@ -1,8 +1,9 @@ @{ - ViewBag.Title = ""; + ViewBag.Title = "门诊结算明细"; Layout = "~/Views/Shared/_Form.cshtml"; - //报表链接 - var reportUrl = SysConfigReader.OrgReportLink("OutpatientXnhBcsqd"); + var reportUrl = Newtouch.Core.Common.Utils.ConfigurationHelper.GetAppConfigValue("ReportUrl"); + var ReportSystemCode = Newtouch.Core.Common.Utils.ConfigurationHelper.GetAppConfigValue("ReportSystemCode"); + var opr = Newtouch.Common.Operator.OperatorProvider.GetCurrent(); }
        @@ -12,12 +13,12 @@
        开始日期: + onclick="WdatePicker({ dateFmt: 'yyyy-MM-dd' })" value="@(DateTime.Now.ToString("yyyy-MM-01"))" /> 结束日期: + onclick="WdatePicker({ dateFmt: 'yyyy-MM-dd })" value="@(DateTime.Now.ToString("yyyy-MM-dd"))" /> @@ -49,10 +50,10 @@ $.modalAlert("开始时间不能大于结束时间", "error"); return; } - var url = getUrl(); - var usercode = '@ViewBag.usercode'; - url += "&kssj=" + $('#kssj').val(); - url += "&jssj=" + $('#jssj').val(); + var url = '@Html.Raw(reportUrl)' + "?tempCode=1320" + "&systemCode=" + '@Html.Raw(ReportSystemCode)'; + url += "&orgId=" +'@Html.Raw(opr.OrganizeId)'; + url += "&ksrq=" + $('#kssj').val()+' 00:00:00'; + url += "&jsrq=" + $('#jssj').val()+' 23:59:59'; setTimeout("$.loading(true, '正在请求报表页面...');", 10); $("#iframerightiframerightiframerightttt").attr('src', url); } diff --git a/Newtouch.HIS.Sett/Newtouch.Web/Areas/ReportManage/Views/Report/PrintReport.cshtml b/Newtouch.HIS.Sett/Newtouch.Web/Areas/ReportManage/Views/Report/PrintReport.cshtml index 29c4b5aa945663ca294fac5cc2faceba4c4f2ef4..16db9d67a6ac56777c1edd38988c286d3226b906 100644 --- a/Newtouch.HIS.Sett/Newtouch.Web/Areas/ReportManage/Views/Report/PrintReport.cshtml +++ b/Newtouch.HIS.Sett/Newtouch.Web/Areas/ReportManage/Views/Report/PrintReport.cshtml @@ -35,7 +35,7 @@ - + 结束日期: + onclick="WdatePicker({ dateFmt: 'yyyy-MM-dd HH:mm:ss' })" value="@(DateTime.Now.ToString("yyyy-MM-dd 23:59:59"))" /> @@ -48,12 +51,13 @@ return; } var url = getUrl(); - var orgId = '@ViewBag.OrgId'; + @*var orgId = '@ViewBag.OrgId'; url += "&orgId=" + orgId; url += "&kssj=" + $('#kssj').val(); - url += "&jssj=" + $('#jssj').val(); + url += "&jssj=" + $('#jssj').val();*@ setTimeout("$.loading(true, '正在请求报表页面...');", 10); $("#iframerightiframerightiframerightttt").attr('src', url); + } $("#iframerightiframerightiframerightttt").load(function () { @@ -63,11 +67,11 @@ $(function () { var h = $(window).height() - 55 $('#layout iframe').css('height', h); - + setTimeout(function () { submit(); }, 100); }); function getUrl() { - var reportServerHOST = '@(ViewBag.ReportServerHOST)'; + @*var reportServerHOST = '@(ViewBag.ReportServerHOST)'; var srcUrl = reportServerHOST; srcUrl += 'ReportServer/Pages/ReportViewer.aspx?%2fHIS.Report.1%2f特病门诊统计'; @@ -78,7 +82,11 @@ } } - return srcUrl; + return srcUrl;*@ + var kssj = $("#kssj").val(); + var jssj = $("#jssj").val(); + var srcUrl2 = '@Html.Raw(reportUrl)' + "?tempCode=1314" + "&systemCode=" + '@Html.Raw(ReportSystemCode)' + "&hospitalCode=" + '@(opr.OrganizeId)' + "&orgId=" + '@(opr.OrganizeId)' + "&kssj=" + kssj + "&jssj=" + jssj; + return srcUrl2; } \ No newline at end of file diff --git a/Newtouch.HIS.Sett/Newtouch.Web/Areas/SystemManage/Controllers/SysForCashPayController.cs b/Newtouch.HIS.Sett/Newtouch.Web/Areas/SystemManage/Controllers/SysForCashPayController.cs index eb8691d038f79406838c07f054f3441324ab2317..dacfa02c58f6da1b5214162719f8db5b7668a03b 100644 --- a/Newtouch.HIS.Sett/Newtouch.Web/Areas/SystemManage/Controllers/SysForCashPayController.cs +++ b/Newtouch.HIS.Sett/Newtouch.Web/Areas/SystemManage/Controllers/SysForCashPayController.cs @@ -21,7 +21,7 @@ namespace Newtouch.HIS.Web.Areas.SystemManage.Controllers return View(); } - public ActionResult SubmitForm(SysCashPaymentModelEntity SysForCashPayEntity, string keyValue) + public ActionResult SubmitForm(SysCashPaymentModelEntity SysForCashPayEntity, int? keyValue) { _SysForCashPayApp.SubmitForm(SysForCashPayEntity, keyValue); return Success("操作成功。"); @@ -75,7 +75,7 @@ namespace Newtouch.HIS.Web.Areas.SystemManage.Controllers /// [HttpGet] [HandlerAjaxOnly] - public ActionResult GetFormJson(Guid keyValue) + public ActionResult GetFormJson(int keyValue) { var entity = _SysForCashPayApp.GetForm(keyValue); return Content(entity.ToJson()); @@ -87,7 +87,7 @@ namespace Newtouch.HIS.Web.Areas.SystemManage.Controllers /// public ActionResult GetfsGridJson(string keyword) { - var data = _SysForCashPayApp.GetListBySearch(keyword); + var data = _SysForCashPayApp.GetList(); return Content(data.ToJson()); } diff --git a/Newtouch.HIS.Sett/Newtouch.Web/Areas/SystemManage/Controllers/SysParameterConfigController.cs b/Newtouch.HIS.Sett/Newtouch.Web/Areas/SystemManage/Controllers/SysParameterConfigController.cs index e34eee2484bf27a99cf1fafbb94367db653f5967..a932312c82af26ac13830f9031412a2323cddc91 100644 --- a/Newtouch.HIS.Sett/Newtouch.Web/Areas/SystemManage/Controllers/SysParameterConfigController.cs +++ b/Newtouch.HIS.Sett/Newtouch.Web/Areas/SystemManage/Controllers/SysParameterConfigController.cs @@ -20,6 +20,7 @@ namespace Newtouch.HIS.Web.Areas.SystemManage.Controllers private readonly ISysChargeItemDmnService _sysChargeItemDmnService; private readonly ISysDepartmentRepo _SysDepartmentRepo; private readonly ISysConfigRepo _sysConfigRepo; + private readonly ISysFeeDmnService _sysFeeDmnService; #region 收费模板 @@ -32,14 +33,25 @@ namespace Newtouch.HIS.Web.Areas.SystemManage.Controllers return View(); } + /// + /// + /// + /// + /// + public ActionResult ChargeTemplate_EditForm() + { + return View(); + } + + /// /// /// /// /// - public ActionResult ChargeTemplate_GetGridJson(Pagination pagination, string keyword) + public ActionResult ChargeTemplate_GetGridJson(Pagination pagination, string keyword, string yxbz) { - var list = _sysChargeItemDmnService.Search(pagination, keyword, this.OrganizeId); + var list = _sysChargeItemDmnService.Search(pagination, keyword, this.OrganizeId,yxbz); var data = new { rows = list, @@ -50,16 +62,7 @@ namespace Newtouch.HIS.Web.Areas.SystemManage.Controllers return Content(data.ToJson()); } - /// - /// - /// - /// - /// - public ActionResult ChargeTemplate_EditForm() - { - return View(); - } - + /// /// @@ -101,7 +104,11 @@ namespace Newtouch.HIS.Web.Areas.SystemManage.Controllers return Content(data.ToJson()); } - + public ActionResult deleteid(string keyValue) + { + _sysFeeDmnService.DeleteById(keyValue, this.OrganizeId); + return Success("删除成功"); + } #endregion #region diff --git a/Newtouch.HIS.Sett/Newtouch.Web/Areas/SystemManage/Views/InpatientAccountManage/Index.cshtml b/Newtouch.HIS.Sett/Newtouch.Web/Areas/SystemManage/Views/InpatientAccountManage/Index.cshtml index ecb3b4ad93a0d0cac1f2b225a3d71b5a64dba4be..72460044c2424b9a33d36391c18be71a85ce4b11 100644 --- a/Newtouch.HIS.Sett/Newtouch.Web/Areas/SystemManage/Views/InpatientAccountManage/Index.cshtml +++ b/Newtouch.HIS.Sett/Newtouch.Web/Areas/SystemManage/Views/InpatientAccountManage/Index.cshtml @@ -512,10 +512,10 @@ function sjPrint() { var pzh = $("#txtlpzh").val(); - if (gridIpzh == "" || pzh != gridIpzh) { - $.modalAlert("请选择一条充值明细", 'warning'); - return false; - } + //if (gridIpzh == "" || pzh != gridIpzh) { + // $.modalAlert("请选择一条充值明细", 'warning'); + // return false; + //} var reqzhxz=$.request("zhxz")=='zy'?'住院':'门诊' var orgId = '@curOpr.OrganizeId'; @@ -576,6 +576,7 @@ //余额全退 function RefundOverAccount() { + debugger; patid = $("#patid").val(); zh = $('#zhCode').val(); zhxz = $('#zhxz').val(); @@ -589,8 +590,8 @@ return false; } var reg = /^(-?\d+)(\.\d+)?$/; - //zfmoney = "-" +$("#zhye").val(); - zfmoney = $("#txtmoney").val(); + zfmoney = "-" +$("#zhye").val(); + //zfmoney = $("#txtmoney").val(); var ddlzffs = $("#ddlzffs option:selected");//获取选中的项 zffsbh = ddlzffs.val();//拿到选中项的值 zffsmc = ddlzffs.text();//拿到选中项的文本 diff --git a/Newtouch.HIS.Sett/Newtouch.Web/Areas/SystemManage/Views/SysForCashPay/Form.cshtml b/Newtouch.HIS.Sett/Newtouch.Web/Areas/SystemManage/Views/SysForCashPay/Form.cshtml index 3ebd8ab03aef4d58348d973024a794db8855046d..dbbe15cc0dd1253bdca8ade22f1d70b1cef95d67 100644 --- a/Newtouch.HIS.Sett/Newtouch.Web/Areas/SystemManage/Views/SysForCashPay/Form.cshtml +++ b/Newtouch.HIS.Sett/Newtouch.Web/Areas/SystemManage/Views/SysForCashPay/Form.cshtml @@ -3,8 +3,8 @@ ViewBag.Title = "Form"; Layout = "~/Views/Shared/_Form.cshtml"; } - - +@**@ +@**@
        @@ -57,3 +57,37 @@
        + + + \ No newline at end of file diff --git a/Newtouch.HIS.Sett/Newtouch.Web/Areas/SystemManage/Views/SysForCashPay/SysForCashPay.cshtml b/Newtouch.HIS.Sett/Newtouch.Web/Areas/SystemManage/Views/SysForCashPay/SysForCashPay.cshtml index a1800c141eb85e960f553237123129cdb820897e..96bb9682e66f7ac64ae09fda3b673c6bbaaa8b81 100644 --- a/Newtouch.HIS.Sett/Newtouch.Web/Areas/SystemManage/Views/SysForCashPay/SysForCashPay.cshtml +++ b/Newtouch.HIS.Sett/Newtouch.Web/Areas/SystemManage/Views/SysForCashPay/SysForCashPay.cshtml @@ -2,6 +2,7 @@ ViewBag.Title = "SysForCashPay"; Layout = "~/Views/Shared/_Index.cshtml"; } +
        @@ -39,3 +40,104 @@
        + \ No newline at end of file diff --git a/Newtouch.HIS.Sett/Newtouch.Web/Areas/SystemManage/Views/SysParameterConfig/ChargeTemplateIndex.cshtml b/Newtouch.HIS.Sett/Newtouch.Web/Areas/SystemManage/Views/SysParameterConfig/ChargeTemplateIndex.cshtml index 3dba5d077638e2e04050aecc24f373f30f0b568d..56672f1a6af864d98f98a08a893f640518881b5a 100644 --- a/Newtouch.HIS.Sett/Newtouch.Web/Areas/SystemManage/Views/SysParameterConfig/ChargeTemplateIndex.cshtml +++ b/Newtouch.HIS.Sett/Newtouch.Web/Areas/SystemManage/Views/SysParameterConfig/ChargeTemplateIndex.cshtml @@ -12,6 +12,15 @@ +
        + 删除 +
        +
        + +