diff --git a/.gitignore b/.gitignore index 0956d36598a1d6350514e1946d522d35b1d5fd13..896152b8ad30b50f1a09cb6f67b89fb5e6385b81 100644 --- a/.gitignore +++ b/.gitignore @@ -22,6 +22,10 @@ bld/ !Newtouch.HIS.PDS/Newtouch.Infrastructure/Log/LogProxy !Newtouch.HIS.PDS/Newtouch.Infrastructure/Log/LogCore.cs !Newtouch.HIS.PDS/Newtouch.Infrastructure/Log/AppLogger.cs +!Newtouch.HIS.Herp/Newtouch.Herp.Infrastructure/Log/LogProxy +!Newtouch.HIS.Herp/Newtouch.Herp.Infrastructure/Log/LogCore.cs +!Newtouch.HIS.Herp/Newtouch.Herp.Infrastructure/Log/AppLogger.cs + # Uncomment if you have tasks that create the project's static files in wwwroot #wwwroot/ diff --git a/FrameworkBase/FrameworkBase.MultiOrg.Domain/Entity/V/SysDepartmentVEntity.cs b/FrameworkBase/FrameworkBase.MultiOrg.Domain/Entity/V/SysDepartmentVEntity.cs index c60290578afbd273b75c3baae8ebf0c70afaa208..2ed9ab90821766c93018cf1d6516e239dda0ec06 100644 --- a/FrameworkBase/FrameworkBase.MultiOrg.Domain/Entity/V/SysDepartmentVEntity.cs +++ b/FrameworkBase/FrameworkBase.MultiOrg.Domain/Entity/V/SysDepartmentVEntity.cs @@ -53,5 +53,7 @@ namespace FrameworkBase.MultiOrg.Domain.Entity /// public string zt { get; set; } + public string zlks { get; set; } + public string zxks { get; set; } } } diff --git a/FrameworkBase/FrameworkBase.MultiOrg.Domain/ValueObjects/SystemManage/SfxmYpSelectResultVO.cs b/FrameworkBase/FrameworkBase.MultiOrg.Domain/ValueObjects/SystemManage/SfxmYpSelectResultVO.cs index b0659a0b4887a1c16b5ff4e9e40069cf1b7b6acb..d0f4a2175ba9d6a8b5a617cc8c8105239245bc6c 100644 --- a/FrameworkBase/FrameworkBase.MultiOrg.Domain/ValueObjects/SystemManage/SfxmYpSelectResultVO.cs +++ b/FrameworkBase/FrameworkBase.MultiOrg.Domain/ValueObjects/SystemManage/SfxmYpSelectResultVO.cs @@ -208,5 +208,13 @@ /// 抗生素权限级别 /// public string kssqxjb { get; set; } + /// + /// 生产厂家 + /// + public string sccj { get; set; } + /// + /// 国家医保代码 + /// + public string gjybdm { get; set; } } } diff --git a/Newtouch.HIS.Base/Newtouch.HIS.Application/Newtouch.HIS.Application.csproj b/Newtouch.HIS.Base/Newtouch.HIS.Application/Newtouch.HIS.Application.csproj index bf64c7006caa7b5dd36099883084ca6d513fc3ca..ffbc027891f016f88f6c8ebe173c6dda042e00dc 100644 --- a/Newtouch.HIS.Base/Newtouch.HIS.Application/Newtouch.HIS.Application.csproj +++ b/Newtouch.HIS.Base/Newtouch.HIS.Application/Newtouch.HIS.Application.csproj @@ -31,6 +31,9 @@ prompt 4 + + bin\9_190\ + ..\..\his-dll-common\hiscommondlls\EntityFramework.dll diff --git a/Newtouch.HIS.Base/Newtouch.HIS.Base.HOSP.API/Newtouch.HIS.Base.HOSP.API.csproj b/Newtouch.HIS.Base/Newtouch.HIS.Base.HOSP.API/Newtouch.HIS.Base.HOSP.API.csproj index 96fe9e083dd2f905c9ca8fec105cb3ca25a43a5e..f11d5a002c016663d07cab7737389908e6c6cc75 100644 --- a/Newtouch.HIS.Base/Newtouch.HIS.Base.HOSP.API/Newtouch.HIS.Base.HOSP.API.csproj +++ b/Newtouch.HIS.Base/Newtouch.HIS.Base.HOSP.API/Newtouch.HIS.Base.HOSP.API.csproj @@ -253,6 +253,9 @@ 10.0 $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + + bin\ + diff --git a/Newtouch.HIS.Static/Newtouch.HIS.Static/Properties/PublishProfiles/FolderProfile1.pubxml b/Newtouch.HIS.Base/Newtouch.HIS.Base.HOSP.API/Properties/PublishProfiles/PublishProfile.pubxml similarity index 89% rename from Newtouch.HIS.Static/Newtouch.HIS.Static/Properties/PublishProfiles/FolderProfile1.pubxml rename to Newtouch.HIS.Base/Newtouch.HIS.Base.HOSP.API/Properties/PublishProfiles/PublishProfile.pubxml index 7f448e8486dbbabaeb283b7b6f7dbd7e5c5ac14d..bc104861fa5c5f6ae10915fc0fe7e1638d178807 100644 --- a/Newtouch.HIS.Static/Newtouch.HIS.Static/Properties/PublishProfiles/FolderProfile1.pubxml +++ b/Newtouch.HIS.Base/Newtouch.HIS.Base.HOSP.API/Properties/PublishProfiles/PublishProfile.pubxml @@ -10,7 +10,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121. Release Any CPU FileSystem - D:\发布地址\开源\static + ..\..\publish\BaseAPI FileSystem <_TargetId>Folder diff --git a/Newtouch.HIS.Base/Newtouch.HIS.Base.HOSP.Request/Newtouch.HIS.Base.HOSP.Request.csproj b/Newtouch.HIS.Base/Newtouch.HIS.Base.HOSP.Request/Newtouch.HIS.Base.HOSP.Request.csproj index 4f24ba2c2305e1f761cec48aa988e11e85cf488b..5cb054274ff1dbfa5689f750c951643cd0785012 100644 --- a/Newtouch.HIS.Base/Newtouch.HIS.Base.HOSP.Request/Newtouch.HIS.Base.HOSP.Request.csproj +++ b/Newtouch.HIS.Base/Newtouch.HIS.Base.HOSP.Request/Newtouch.HIS.Base.HOSP.Request.csproj @@ -30,6 +30,9 @@ prompt 4 + + bin\9_190\ + False diff --git a/Newtouch.HIS.Base/Newtouch.HIS.Base.HOSP/Areas/PharmacyDrugStorage/Views/SysMedicineStorageIOMode/Index.cshtml b/Newtouch.HIS.Base/Newtouch.HIS.Base.HOSP/Areas/PharmacyDrugStorage/Views/SysMedicineStorageIOMode/Index.cshtml index c469ed3927c596b1795237129ebc7b570fadc456..9ea8401766745983c876231e745a705c5dba5349 100644 --- a/Newtouch.HIS.Base/Newtouch.HIS.Base.HOSP/Areas/PharmacyDrugStorage/Views/SysMedicineStorageIOMode/Index.cshtml +++ b/Newtouch.HIS.Base/Newtouch.HIS.Base.HOSP/Areas/PharmacyDrugStorage/Views/SysMedicineStorageIOMode/Index.cshtml @@ -1,4 +1,5 @@ -@{ +@using Newtouch.Common.Operator; +@{ ViewBag.Title = "Index"; Layout = "~/Views/Shared/_Index.cshtml"; var opr = Newtouch.Common.Operator.OperatorProvider.GetCurrent(); diff --git a/Newtouch.HIS.Base/Newtouch.HIS.Base.HOSP/Configs/9_190/database.config b/Newtouch.HIS.Base/Newtouch.HIS.Base.HOSP/Configs/9_190/database.config new file mode 100644 index 0000000000000000000000000000000000000000..756fc553b936cf2eb75ed1d56065eb21e3be6853 --- /dev/null +++ b/Newtouch.HIS.Base/Newtouch.HIS.Base.HOSP/Configs/9_190/database.config @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/Newtouch.HIS.Base/Newtouch.HIS.Base.HOSP/Configs/9_190/system.config b/Newtouch.HIS.Base/Newtouch.HIS.Base.HOSP/Configs/9_190/system.config new file mode 100644 index 0000000000000000000000000000000000000000..27298bf1ef2c4100477fc5b0dd7dbc0d2d5212c2 --- /dev/null +++ b/Newtouch.HIS.Base/Newtouch.HIS.Base.HOSP/Configs/9_190/system.config @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Newtouch.HIS.Base/Newtouch.HIS.Base.HOSP/Configs/local/database.config b/Newtouch.HIS.Base/Newtouch.HIS.Base.HOSP/Configs/local/database.config deleted file mode 100644 index 8cec2d31a970135c14871a1a9fb57b348ef30cf5..0000000000000000000000000000000000000000 --- a/Newtouch.HIS.Base/Newtouch.HIS.Base.HOSP/Configs/local/database.config +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/Newtouch.HIS.Base/Newtouch.HIS.Base.HOSP/Configs/local/system.config b/Newtouch.HIS.Base/Newtouch.HIS.Base.HOSP/Configs/local/system.config deleted file mode 100644 index 65b0a36c2ddaf45bbbdc12fc3a3a298eeebe408e..0000000000000000000000000000000000000000 --- a/Newtouch.HIS.Base/Newtouch.HIS.Base.HOSP/Configs/local/system.config +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Newtouch.HIS.Base/Newtouch.HIS.Base.HOSP/Controllers/PharmacyDrugStorage/SysMedicineElectronicPrescriptionController.cs b/Newtouch.HIS.Base/Newtouch.HIS.Base.HOSP/Controllers/PharmacyDrugStorage/SysMedicineElectronicPrescriptionController.cs new file mode 100644 index 0000000000000000000000000000000000000000..d000a340a9479a8aca56cc055e4c42ecba07e2b0 --- /dev/null +++ b/Newtouch.HIS.Base/Newtouch.HIS.Base.HOSP/Controllers/PharmacyDrugStorage/SysMedicineElectronicPrescriptionController.cs @@ -0,0 +1,41 @@ +using Newtouch.Core.Common; +using Newtouch.HIS.Domain.IDomainServices.PharmacyDrugStorage; +using Newtouch.Tools; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.Mvc; + +namespace Newtouch.HIS.Base.HOSP.Controllers.PharmacyDrugStorage +{ + public class SysMedicineElectronicPrescriptionController : Controller + { + // GET: SysMedicineElectronicPrescription + private readonly ISysMedicineElectronicPrescriptionDmnService _sysMedicineElectronicPrescriptionDmnService; + + public SysMedicineElectronicPrescriptionController(ISysMedicineElectronicPrescriptionDmnService SysMedicineElectronicPrescriptionDmnService) + { + this._sysMedicineElectronicPrescriptionDmnService = SysMedicineElectronicPrescriptionDmnService; + } + + public ActionResult Index() + { + return View(); + } + + [HttpGet] + [HandlerAjaxOnly] + public ActionResult GetGridJson(Pagination pagination, string genname, string medListCodg) + { + var data = new + { + rows = _sysMedicineElectronicPrescriptionDmnService.GetPaginationList(pagination, genname, medListCodg), + total = pagination.total, + page = pagination.page, + records = pagination.records + }; + return Content(data.ToJson()); + } + } +} \ No newline at end of file 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 df5e35e1c7d0699a765c2aa0144ee5251fd7a7a3..48c433b2cd0136044fa514016a2fe744b3e5fe54 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 @@ -271,10 +271,10 @@ Designer - + Designer - + Designer @@ -441,6 +441,10 @@ + + + Web.config + Web.config @@ -483,6 +487,7 @@ + @@ -573,6 +578,9 @@ 10.0 $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + + bin\ + diff --git a/Newtouch.HIS.Base/Newtouch.HIS.Base.HOSP/Properties/PublishProfiles/FolderProfile.pubxml b/Newtouch.HIS.Base/Newtouch.HIS.Base.HOSP/Properties/PublishProfiles/FolderProfile.pubxml index b0927fef2a4002b4b1ad05538ed78db8db7b09c0..42e831036340672b9816bc7d076016d455f7ca43 100644 --- a/Newtouch.HIS.Base/Newtouch.HIS.Base.HOSP/Properties/PublishProfiles/FolderProfile.pubxml +++ b/Newtouch.HIS.Base/Newtouch.HIS.Base.HOSP/Properties/PublishProfiles/FolderProfile.pubxml @@ -10,7 +10,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121. Release Any CPU FileSystem - ..\..\publish\Base + ..\..\publish\Base FileSystem <_TargetId>Folder diff --git a/Newtouch.HIS.Base/Newtouch.HIS.Base.HOSP/Properties/PublishProfiles/PublishProfile.pubxml b/Newtouch.HIS.Base/Newtouch.HIS.Base.HOSP/Properties/PublishProfiles/PublishProfile.pubxml new file mode 100644 index 0000000000000000000000000000000000000000..42e831036340672b9816bc7d076016d455f7ca43 --- /dev/null +++ b/Newtouch.HIS.Base/Newtouch.HIS.Base.HOSP/Properties/PublishProfiles/PublishProfile.pubxml @@ -0,0 +1,18 @@ + + + + + true + false + true + Release + Any CPU + FileSystem + ..\..\publish\Base + FileSystem + <_TargetId>Folder + + + \ No newline at end of file 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 a61bd9eaa35f170bb131f82d17215957b5c9fa71..c9a63ea7657f8728d2f439ad04291c24b26e5721 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 @@ -101,6 +101,14 @@ } }) + $(document).ready(function () { + // 设置组织机构不可编辑 + if (keyValue && orgId) { + $("#OrganizeId").prop("disabled", true); // 设置下拉框不可编辑 + $("#OrganizeId").css("background-color", "#e9ecef"); // 使其变灰色 + } + }); + function initControl() { //组织机构下拉框 $("#OrganizeId").bindSelect({ diff --git a/Newtouch.HIS.Base/Newtouch.HIS.Base.HOSP/Views/SysMedicineElectronicPrescription/Index.cshtml b/Newtouch.HIS.Base/Newtouch.HIS.Base.HOSP/Views/SysMedicineElectronicPrescription/Index.cshtml new file mode 100644 index 0000000000000000000000000000000000000000..08ce9855b1855b916a3053225ef3fcb539537135 --- /dev/null +++ b/Newtouch.HIS.Base/Newtouch.HIS.Base.HOSP/Views/SysMedicineElectronicPrescription/Index.cshtml @@ -0,0 +1,149 @@ +@using Newtouch.Common.Operator; +@{ + ViewBag.Title = "电子处方药品管理"; + Layout = "~/Views/Shared/_Index.cshtml"; + + var opr = Newtouch.Common.Operator.OperatorProvider.GetCurrent(); +} + + + + + + + + Index + + + +
+
+ + + + + + + + + + + +
药品名: + + 国家医保编码: + + + + +
+
+
+
+
+
+
+ + + + + diff --git a/Newtouch.HIS.Base/Newtouch.HIS.Base.HOSP/Web.9_190.config b/Newtouch.HIS.Base/Newtouch.HIS.Base.HOSP/Web.9_190.config new file mode 100644 index 0000000000000000000000000000000000000000..6324a42e500656a23cbed8341ff997c94d54b206 --- /dev/null +++ b/Newtouch.HIS.Base/Newtouch.HIS.Base.HOSP/Web.9_190.config @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Newtouch.HIS.Base/Newtouch.HIS.Base.HOSP/Web.config b/Newtouch.HIS.Base/Newtouch.HIS.Base.HOSP/Web.config index 1af789107f5322df0411c2b9ac1e70047abfaad5..cd3744af6913fd44ed4f99d0a0b5f4ea78019747 100644 --- a/Newtouch.HIS.Base/Newtouch.HIS.Base.HOSP/Web.config +++ b/Newtouch.HIS.Base/Newtouch.HIS.Base.HOSP/Web.config @@ -13,8 +13,8 @@
- - + + diff --git a/Newtouch.HIS.Base/Newtouch.HIS.Base.sln b/Newtouch.HIS.Base/Newtouch.HIS.Base.sln index 5ac160f7367e6509131b1060f3381ae67cc41de5..974386f660ad470bf73d78eb072fb9560aaa3e23 100644 --- a/Newtouch.HIS.Base/Newtouch.HIS.Base.sln +++ b/Newtouch.HIS.Base/Newtouch.HIS.Base.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.27428.2037 +# Visual Studio Version 17 +VisualStudioVersion = 17.11.35327.3 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Newtouch.HIS.Base.HOSP", "Newtouch.HIS.Base.HOSP\Newtouch.HIS.Base.HOSP.csproj", "{CD764D7C-24CF-4902-831A-16DBAE619DC0}" EndProject @@ -33,42 +33,61 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Newtouch.HIS.Base", "Newtou EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution + 9_190|Any CPU = 9_190|Any CPU Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution + {CD764D7C-24CF-4902-831A-16DBAE619DC0}.9_190|Any CPU.ActiveCfg = 9_190|Any CPU + {CD764D7C-24CF-4902-831A-16DBAE619DC0}.9_190|Any CPU.Build.0 = 9_190|Any CPU {CD764D7C-24CF-4902-831A-16DBAE619DC0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {CD764D7C-24CF-4902-831A-16DBAE619DC0}.Debug|Any CPU.Build.0 = Debug|Any CPU {CD764D7C-24CF-4902-831A-16DBAE619DC0}.Release|Any CPU.ActiveCfg = Release|Any CPU {CD764D7C-24CF-4902-831A-16DBAE619DC0}.Release|Any CPU.Build.0 = Release|Any CPU + {6C59712F-BDCA-4FF7-ACF7-A3F386B97DE5}.9_190|Any CPU.ActiveCfg = 9_190|Any CPU + {6C59712F-BDCA-4FF7-ACF7-A3F386B97DE5}.9_190|Any CPU.Build.0 = 9_190|Any CPU {6C59712F-BDCA-4FF7-ACF7-A3F386B97DE5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {6C59712F-BDCA-4FF7-ACF7-A3F386B97DE5}.Debug|Any CPU.Build.0 = Debug|Any CPU {6C59712F-BDCA-4FF7-ACF7-A3F386B97DE5}.Release|Any CPU.ActiveCfg = Release|Any CPU {6C59712F-BDCA-4FF7-ACF7-A3F386B97DE5}.Release|Any CPU.Build.0 = Release|Any CPU + {BD026358-CC01-440C-A7B7-1C64A422CE02}.9_190|Any CPU.ActiveCfg = 9_190|Any CPU + {BD026358-CC01-440C-A7B7-1C64A422CE02}.9_190|Any CPU.Build.0 = 9_190|Any CPU {BD026358-CC01-440C-A7B7-1C64A422CE02}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {BD026358-CC01-440C-A7B7-1C64A422CE02}.Debug|Any CPU.Build.0 = Debug|Any CPU {BD026358-CC01-440C-A7B7-1C64A422CE02}.Release|Any CPU.ActiveCfg = Release|Any CPU {BD026358-CC01-440C-A7B7-1C64A422CE02}.Release|Any CPU.Build.0 = Release|Any CPU + {7E82D60B-D28C-4596-A338-6C7321899CD4}.9_190|Any CPU.ActiveCfg = 9_190|Any CPU + {7E82D60B-D28C-4596-A338-6C7321899CD4}.9_190|Any CPU.Build.0 = 9_190|Any CPU {7E82D60B-D28C-4596-A338-6C7321899CD4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {7E82D60B-D28C-4596-A338-6C7321899CD4}.Debug|Any CPU.Build.0 = Debug|Any CPU {7E82D60B-D28C-4596-A338-6C7321899CD4}.Release|Any CPU.ActiveCfg = Release|Any CPU {7E82D60B-D28C-4596-A338-6C7321899CD4}.Release|Any CPU.Build.0 = Release|Any CPU + {773E380E-608D-4671-87DC-DEEC0FEE16AE}.9_190|Any CPU.ActiveCfg = 9_190|Any CPU + {773E380E-608D-4671-87DC-DEEC0FEE16AE}.9_190|Any CPU.Build.0 = 9_190|Any CPU {773E380E-608D-4671-87DC-DEEC0FEE16AE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {773E380E-608D-4671-87DC-DEEC0FEE16AE}.Debug|Any CPU.Build.0 = Debug|Any CPU {773E380E-608D-4671-87DC-DEEC0FEE16AE}.Release|Any CPU.ActiveCfg = Release|Any CPU {773E380E-608D-4671-87DC-DEEC0FEE16AE}.Release|Any CPU.Build.0 = Release|Any CPU + {C774F1F5-B3A7-4CD9-8596-AE4C2F350F43}.9_190|Any CPU.ActiveCfg = 9_190|Any CPU + {C774F1F5-B3A7-4CD9-8596-AE4C2F350F43}.9_190|Any CPU.Build.0 = 9_190|Any CPU {C774F1F5-B3A7-4CD9-8596-AE4C2F350F43}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {C774F1F5-B3A7-4CD9-8596-AE4C2F350F43}.Debug|Any CPU.Build.0 = Debug|Any CPU {C774F1F5-B3A7-4CD9-8596-AE4C2F350F43}.Release|Any CPU.ActiveCfg = Release|Any CPU {C774F1F5-B3A7-4CD9-8596-AE4C2F350F43}.Release|Any CPU.Build.0 = Release|Any CPU + {A9D390EF-E7A4-46D8-8014-3B0E6D29F65C}.9_190|Any CPU.ActiveCfg = 9_190|Any CPU + {A9D390EF-E7A4-46D8-8014-3B0E6D29F65C}.9_190|Any CPU.Build.0 = 9_190|Any CPU {A9D390EF-E7A4-46D8-8014-3B0E6D29F65C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {A9D390EF-E7A4-46D8-8014-3B0E6D29F65C}.Debug|Any CPU.Build.0 = Debug|Any CPU {A9D390EF-E7A4-46D8-8014-3B0E6D29F65C}.Release|Any CPU.ActiveCfg = Release|Any CPU {A9D390EF-E7A4-46D8-8014-3B0E6D29F65C}.Release|Any CPU.Build.0 = Release|Any CPU + {E8EA812D-B849-4847-BF8B-2E4B1C80FFF6}.9_190|Any CPU.ActiveCfg = 9_190|Any CPU + {E8EA812D-B849-4847-BF8B-2E4B1C80FFF6}.9_190|Any CPU.Build.0 = 9_190|Any CPU {E8EA812D-B849-4847-BF8B-2E4B1C80FFF6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {E8EA812D-B849-4847-BF8B-2E4B1C80FFF6}.Debug|Any CPU.Build.0 = Debug|Any CPU {E8EA812D-B849-4847-BF8B-2E4B1C80FFF6}.Release|Any CPU.ActiveCfg = Release|Any CPU {E8EA812D-B849-4847-BF8B-2E4B1C80FFF6}.Release|Any CPU.Build.0 = Release|Any CPU + {61462AE5-7449-406C-B233-BE57B0AEAA28}.9_190|Any CPU.ActiveCfg = 9_190|Any CPU + {61462AE5-7449-406C-B233-BE57B0AEAA28}.9_190|Any CPU.Build.0 = 9_190|Any CPU {61462AE5-7449-406C-B233-BE57B0AEAA28}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {61462AE5-7449-406C-B233-BE57B0AEAA28}.Debug|Any CPU.Build.0 = Debug|Any CPU {61462AE5-7449-406C-B233-BE57B0AEAA28}.Release|Any CPU.ActiveCfg = Release|Any CPU diff --git a/Newtouch.HIS.Base/Newtouch.HIS.Base/Newtouch.HIS.Base.csproj b/Newtouch.HIS.Base/Newtouch.HIS.Base/Newtouch.HIS.Base.csproj index 5630645c7f9dbee96448ea9cd3075fcb7c9f6800..e72eb9f0bf73e50be4e29c5e871a0e9ddac7f90a 100644 --- a/Newtouch.HIS.Base/Newtouch.HIS.Base/Newtouch.HIS.Base.csproj +++ b/Newtouch.HIS.Base/Newtouch.HIS.Base/Newtouch.HIS.Base.csproj @@ -299,6 +299,9 @@ 10.0 $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + + bin\ + diff --git a/Newtouch.HIS.Base/Newtouch.HIS.Domain/IDomainServices/PharmacyDrugStorage/ISysMedicineElectronicPrescriptionDmnService.cs b/Newtouch.HIS.Base/Newtouch.HIS.Domain/IDomainServices/PharmacyDrugStorage/ISysMedicineElectronicPrescriptionDmnService.cs new file mode 100644 index 0000000000000000000000000000000000000000..5806496570ccd5d5d1512d08600fa5453eb1aebd --- /dev/null +++ b/Newtouch.HIS.Base/Newtouch.HIS.Domain/IDomainServices/PharmacyDrugStorage/ISysMedicineElectronicPrescriptionDmnService.cs @@ -0,0 +1,15 @@ +using Newtouch.Core.Common; +using Newtouch.HIS.Domain.ValueObjects; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Newtouch.HIS.Domain.IDomainServices.PharmacyDrugStorage +{ + public interface ISysMedicineElectronicPrescriptionDmnService + { + IList GetPaginationList(Pagination pagination, string genname, string medListCodg); + } +} diff --git a/Newtouch.HIS.Base/Newtouch.HIS.Domain/Newtouch.HIS.Domain.csproj b/Newtouch.HIS.Base/Newtouch.HIS.Domain/Newtouch.HIS.Domain.csproj index 90d2f40d1d6819497102e2711f0e797a51470865..d10665979e076205f686c267106c4cfcecadbf2c 100644 --- a/Newtouch.HIS.Base/Newtouch.HIS.Domain/Newtouch.HIS.Domain.csproj +++ b/Newtouch.HIS.Base/Newtouch.HIS.Domain/Newtouch.HIS.Domain.csproj @@ -30,6 +30,9 @@ prompt 4 + + bin\9_190\ + ..\..\his-dll-common\hiscommondlls\EntityFramework.dll @@ -139,6 +142,7 @@ + @@ -250,6 +254,7 @@ + diff --git a/Newtouch.HIS.Base/Newtouch.HIS.Domain/ValueObjects/SysMedicineElectronicPrescriptionVO.cs b/Newtouch.HIS.Base/Newtouch.HIS.Domain/ValueObjects/SysMedicineElectronicPrescriptionVO.cs new file mode 100644 index 0000000000000000000000000000000000000000..70fef3096cf90d5948b95c546e74c29021b60e5e --- /dev/null +++ b/Newtouch.HIS.Base/Newtouch.HIS.Domain/ValueObjects/SysMedicineElectronicPrescriptionVO.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Newtouch.HIS.Domain.ValueObjects +{ + public class SysMedicineElectronicPrescriptionVO + { + public string medListCodg { get; set; } + public string natDrugNo { get; set; } + public string genname { get; set; } + public string prodname { get; set; } + public string regName { get; set; } + public string listType { get; set; } + public string listTypeName { get; set; } + public string specName { get; set; } + public string prdrName { get; set; } + public string aprvno { get; set; } + public string dosformName { get; set; } + public string minPacunt { get; set; } + public string minPacCnt { get; set; } + public string minPrepunt { get; set; } + public string poolareaNo { get; set; } + public string poolareaName { get; set; } + public string dualchnlFlag { get; set; } + public string oppoolFlag { get; set; } + public string begntime { get; set; } + public string endtime { get; set; } + } +} diff --git a/Newtouch.HIS.Base/Newtouch.HIS.DomainServices/Newtouch.HIS.DomainServices.csproj b/Newtouch.HIS.Base/Newtouch.HIS.DomainServices/Newtouch.HIS.DomainServices.csproj index 41fab8ce21412bb8d5198765c757eba970ac7a52..78d379a71a51e2be534c9c8dc9ebac755921d731 100644 --- a/Newtouch.HIS.Base/Newtouch.HIS.DomainServices/Newtouch.HIS.DomainServices.csproj +++ b/Newtouch.HIS.Base/Newtouch.HIS.DomainServices/Newtouch.HIS.DomainServices.csproj @@ -30,6 +30,9 @@ prompt 4 + + bin\9_190\ + ..\..\his-dll-common\hiscommondlls\EntityFramework.dll @@ -62,6 +65,7 @@ + diff --git a/Newtouch.HIS.Base/Newtouch.HIS.DomainServices/PharmacyDrugStorage/SysMedicineElectronicPrescriptionDmnService.cs b/Newtouch.HIS.Base/Newtouch.HIS.DomainServices/PharmacyDrugStorage/SysMedicineElectronicPrescriptionDmnService.cs new file mode 100644 index 0000000000000000000000000000000000000000..b721b1960fea3cc6485b369b5ba9e95d2eae9a67 --- /dev/null +++ b/Newtouch.HIS.Base/Newtouch.HIS.DomainServices/PharmacyDrugStorage/SysMedicineElectronicPrescriptionDmnService.cs @@ -0,0 +1,48 @@ +using Newtouch.Core.Common; +using Newtouch.HIS.Domain.IDomainServices.PharmacyDrugStorage; +using Newtouch.HIS.Domain.ValueObjects; +using Newtouch.Infrastructure; +using System; +using System.Collections.Generic; +using System.Data.Common; +using System.Data.SqlClient; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Newtouch.HIS.DomainServices.PharmacyDrugStorage +{ + public class SysMedicineElectronicPrescriptionDmnService : DmnServiceBase, ISysMedicineElectronicPrescriptionDmnService + { + public SysMedicineElectronicPrescriptionDmnService(IBaseDatabaseFactory databaseFactory) + : base(databaseFactory) + { + } + + + /// + /// 获取当前组织下的系统药品信息 + /// + /// + public IList GetPaginationList(Pagination pagination, string genname, string medListCodg) + { + var sql = @"select * from [NewtouchHIS_Sett]..Dzcf_CFYP_output where 1=1 "; + if (!string.IsNullOrEmpty(genname)) + { + sql += @" and (genname like @genname or regName like @genname)"; + } + if (!string.IsNullOrEmpty(medListCodg)) + { + sql += @" and medListCodg=@medListCodg"; + } + DbParameter[] par = new DbParameter[] + { + new SqlParameter("@genname", "%"+genname.Trim()+"%"), + new SqlParameter("@medListCodg", medListCodg), + }; + return this.QueryWithPage(sql, pagination,par + ); + } + + } +} diff --git a/Newtouch.HIS.Base/Newtouch.HIS.Repository/Newtouch.HIS.Repository.csproj b/Newtouch.HIS.Base/Newtouch.HIS.Repository/Newtouch.HIS.Repository.csproj index c564a5143fdf362400b9ff7bbb6e708aaeea8607..52aa28c4fb2b83bc261f410be590a5fa6b20771f 100644 --- a/Newtouch.HIS.Base/Newtouch.HIS.Repository/Newtouch.HIS.Repository.csproj +++ b/Newtouch.HIS.Base/Newtouch.HIS.Repository/Newtouch.HIS.Repository.csproj @@ -30,6 +30,9 @@ prompt 4 + + bin\9_190\ + ..\..\his-dll-common\hiscommondlls\EntityFramework.dll diff --git a/Newtouch.HIS.Base/Newtouch.Infrastructure/Newtouch.Infrastructure.csproj b/Newtouch.HIS.Base/Newtouch.Infrastructure/Newtouch.Infrastructure.csproj index 39e56887e6f7f015bf8c1ad4a52d4804f4f90476..8b78db69ba1b235faf1d645ed2e531476b8fcefa 100644 --- a/Newtouch.HIS.Base/Newtouch.Infrastructure/Newtouch.Infrastructure.csproj +++ b/Newtouch.HIS.Base/Newtouch.Infrastructure/Newtouch.Infrastructure.csproj @@ -29,6 +29,9 @@ prompt 4 + + bin\9_190\ + ..\..\his-dll-common\hiscommondlls\EntityFramework.dll diff --git "a/Newtouch.HIS.Base/sql/20241021_\345\255\230\345\202\250\350\277\207\347\250\213_CIS\347\224\265\345\255\220\345\244\204\346\226\271\350\215\257\345\223\201\346\265\256\345\261\202.sql" "b/Newtouch.HIS.Base/sql/20241021_\345\255\230\345\202\250\350\277\207\347\250\213_CIS\347\224\265\345\255\220\345\244\204\346\226\271\350\215\257\345\223\201\346\265\256\345\261\202.sql" new file mode 100644 index 0000000000000000000000000000000000000000..726191126b3285187033880d04339939ab847830 --- /dev/null +++ "b/Newtouch.HIS.Base/sql/20241021_\345\255\230\345\202\250\350\277\207\347\250\213_CIS\347\224\265\345\255\220\345\244\204\346\226\271\350\215\257\345\223\201\346\265\256\345\261\202.sql" @@ -0,0 +1,145 @@ +/** +exec [usp_SelectDzcf] '2','' + +*/ + +USE [Newtouch_CIS] +GO + + +create PROCEDURE [dbo].[usp_SelectDzcf] + @topCount int, --ǰ + @keyword varchar(50) = '' + +as + CREATE TABLE #YpQuery( + ypCode varchar(20), + ypmc varchar(256), + sfdlCode varchar(20), + sfdlmc varchar(50), + dw varchar(50), + cls numeric(9,4), + dj numeric(9,4), + py VARCHAR(500), + px INT , + jldw varchar(50) , + jldwzhxs numeric(9,4), + zfxz char(1), + zfbl numeric(9,4), + yfbmCode varchar(20), + kcsl numeric(11,2), + yfbmmc varchar(50), + ypgg varchar(500), + ypjxCode varchar(20), + kzbz varchar(1), + zyqzlx char(1), + ybdm varchar(500), + xzyy BIT, + xzyysm varchar(256), + mrjl decimal, + mrpc varchar(20), + mrpcmc varchar(50), + isKss char(1), + jlfwBegin NUMERIC(9,4), + jlfwEnd NUMERIC(9,4), + pcfwBegin NUMERIC(9,4), + pcfwEnd NUMERIC(9,4), + kssKy CHAR(1), + cxjje numeric(9,4), + tsypbz varchar(20), + kssqxjb varchar(20), + bz varchar(500), + sccj varchar(500), + gjybdm varchar(50) + ) +INSERT INTO #YpQuery + select + cfypcode ypCode, + regname ypmc, + case listType when '101' then '01' when '102' then '03' end sfdlCode,--շѴ Ĭ + case listType when '101' then 'ҩ' when '102' then 'ҩ' end sfdlmc --Ĭҩ + ,minPacunt dw + ,case when minPacCnt='' or minPacCnt=NULL THEN 0 else minPacCnt end cls + ,convert(NUMERIC(9,4),'0.01') dj + ,py py + ,0 px + ,minPrepunt jldw + ,case when minPacCnt='' or minPacCnt=NULL THEN 0 else minPacCnt end jldwzhxs + ,'4' zfxz + ,convert(NUMERIC(9,4),'0') zfbl + ,'' yfbmCode + ,'1000' kcsl + ,'' yfbmmc + ,specName ypgg + , '17' ypjxCode + ,'' kzbz + , '' zyqzlx + , medListCodg ybdm + , null xzyy + ,null xzyysm + ,NULL mrjl + ,NULL mrpc + ,NULL mrpcmc + , NULL isKss + , NULL jlfwBegin + , NULL jlfwEnd + , NULL pcfwBegin + , NULL pcfwEnd + , NULL kssKy + ,convert(NUMERIC(9,4),'0') cxjje, + ''tsypbz, + ''kssqxjb + ,'' bz + ,isnull(prdrName,'') sccj + ,medListCodg gjybdm +from [NewtouchHIS_Sett]..Dzcf_CFYP_output +where regname!='' + + +select top (@topCount) * from +( +select ypCode sfxmCode , ypmc sfxmmc, py py +, sfdlCode sfdlCode, sfdlmc sfdlmc +, dw dw, dj dj +, '1' yzlx +, bz bz +, null duration +, null dwjls +, null jjcl +, jldw jldw +, jldwzhxs jldwzhxs +, zfxz zfxz +, zfbl zfbl +, cls cls +, yfbmCode yfbmCode +, yfbmmc yfbmmc +, kcsl kcsl +, ypgg gg +, ypjxCode ypjxCode +, kzbz kzbz +, zyqzlx zyqzlx +, '' zxks +, '' zxksmc +, ybdm ybdm +, xzyy xzyy +, xzyysm xzyysm +,mrjl mrjl +,mrpc mrpc +,mrpcmc mrpcmc +,isKss +,jlfwBegin +,jlfwEnd +,pcfwBegin +,pcfwEnd +,kssKy +,cxjje, + tsypbz, + kssqxjb + ,sccj + ,gjybdm +from #YpQuery +) as reslt +where (isnull(@keyword, '') = '' or sfxmCode like '%' + @keyword + '%' or sfxmmc like '%' + @keyword + '%' or py like '%' + @keyword + '%') +and isnull(ybdm,'')<>'' + +order by sfxmCode \ No newline at end of file diff --git "a/Newtouch.HIS.Base/sql/20241021_\345\255\230\345\202\250\350\277\207\347\250\213_\345\214\273\347\224\237\347\253\231\350\215\257\345\223\201\346\267\273\345\212\240\346\265\256\345\261\202\347\224\265\345\255\220\345\244\204\346\226\271.sql" "b/Newtouch.HIS.Base/sql/20241021_\345\255\230\345\202\250\350\277\207\347\250\213_\345\214\273\347\224\237\347\253\231\350\215\257\345\223\201\346\267\273\345\212\240\346\265\256\345\261\202\347\224\265\345\255\220\345\244\204\346\226\271.sql" new file mode 100644 index 0000000000000000000000000000000000000000..35d93761fdc0f48d250253fe9c2e43219bbe3613 --- /dev/null +++ "b/Newtouch.HIS.Base/sql/20241021_\345\255\230\345\202\250\350\277\207\347\250\213_\345\214\273\347\224\237\347\253\231\350\215\257\345\223\201\346\267\273\345\212\240\346\265\256\345\261\202\347\224\265\345\255\220\345\244\204\346\226\271.sql" @@ -0,0 +1,416 @@ +USE [Newtouch_CIS] +GO + +/****** Object: StoredProcedure [dbo].[usp_SelectSfxmYp] Script Date: 2024/10/22 18:13:57 ******/ +SET ANSI_NULLS ON +GO + +SET QUOTED_IDENTIFIER ON +GO + + + + + + + + + + + + + + +/* +޸ˣ˷ +޸ʱ䣺202231811:28:20 +޸ݣcxjjeֶ +*/ + +/* +޸ˣ +޸ʱ䣺202233114:54:20 +޸ݣtsypbzֶ +*/ + +/* +޸ˣ +޸ʱ䣺202241211:00:00 +޸ݣkssqxjbֶ +*/ +/* + ˣ쿥 +޸ʱ䣺20228515:13 +޸ݣҽԺҪƲʾΪ0ҩڴ˿ơ޸ֱעʹ˴ +޸ı־20220805A +exec [usp_SelectSfxmYp] '521','6d5752a7-234a-403e-aa1c-df8b45d3469f','9','1','WM','','',null,null,null,null,null,null +exec [usp_SelectSfxmYp] '5','6d5752a7-234a-403e-aa1c-df8b45d3469f','2','1','','','',null,null,null,null,null,null +exec [Newtouch_CIS].[dbo].[usp_open_SelectCfYp] @topCount, @orgId, @mzzybz,@ypyfbmCode, @sfdllx, @keyword, @isQyKssKZ, @qxjb +*/ + +ALTER PROCEDURE [dbo].[usp_SelectSfxmYp] +( + @topCount int, --ǰ + @orgId varchar(50), + @mzzybz varchar(50) = '', --1 2סԺ ָDz סԺ 3ұҩ 9Ӵ + + @dllb varchar(50) = '', --1ҩƷ 2Ŀ 3Ŀ ŷָ + @sfdllx varchar(20) = '', --ֵChargeCateTypeWM ҩ + + @keyword varchar(50) = '', + + @dlCode varchar(20) = '', --շѴCode ŷָ + @isContansChildDl bit = 1, --@dlCodeʹ + + @useypckflag bit = 0, --ǷʹҩƷ߼ + @ypyfbmCode varchar(128) = '', --ҩƷҩɸѡ ŷָʲô鲻 + @containyp0ck bit = 0, --ǷҩƷ0棬0 1 + @onlyybflag bit = 0, --ǷҽĿ/ҩƷ + @isQyKssKZ bit = 0, --Ƿÿؿ + @qxjb VARCHAR(2) = '' --صȨ޼ +) +AS +DECLARE @isdzcfyp VARCHAR(50) = '0' --ʹõӴĿ¼ +if @mzzybz='9' +begin + select @mzzybz='1'; + select @isdzcfyp ='1'; +end +if(@mzzybz <> '0'and @mzzybz <> '1' and @mzzybz <> '2' and @mzzybz <> '9' and @mzzybz <> '' and charindex('3|',@mzzybz)<=0) + return; -- '0' ͨõ EmptyﻹסԺͨ + +if(@useypckflag = 0) +begin + + exec [NewtouchHIS_Base].dbo.usp_SelectSfxmYp_WithNoKc @topCount, @orgId, @mzzybz, @dllb, @sfdllx, @keyword, @dlCode + , @isContansChildDl, @onlyybflag,@isQyKssKZ,@qxjb + return; +end +; + +if(charindex('3|',@mzzybz)>0) --ȡұҩ +begin +set @mzzybz=substring(@mzzybz,3,len(@mzzybz)) + exec [Newtouch_CIS].dbo.[usp_SelectKsbyYp] @topCount, @orgId, '2', @dllb, @sfdllx, @keyword, @dlCode + , @isContansChildDl,@ypyfbmCode, @onlyybflag,@isQyKssKZ,@qxjb , @mzzybz + return; +end +; + +if (@isdzcfyp='1') --ҽӴ +begin + exec [usp_SelectDzcf] @topCount,@keyword + return; +end + +--Add by zzm +if (@mzzybz = '2' and @dllb = '1' and @sfdllx='') set @sfdllx = 'WM' +if (@sfdllx = 'WM' OR @sfdllx='TCM') +begin + exec [Newtouch_CIS].[dbo].[usp_open_SelectCfYp] @topCount, @orgId, @mzzybz,@ypyfbmCode, @sfdllx, @keyword, @isQyKssKZ, @qxjb + return; +end +else if ((@mzzybz = '1' or @mzzybz = '2') and @dllb = '2' and @sfdllx <> '') +begin + exec [Newtouch_CIS].[dbo].[usp_open_SelectCfXm] @topCount, @orgId, @mzzybz, @sfdllx, @keyword + return; +end +; + +if exists(select 1 from Sys_Config where OrganizeId = @orgId and Code = 'HISSyncMethod' and Value = 'IDB') +begin + --м + + exec usp_SelectSfxmYp_WithIDB @topCount, @orgId, @mzzybz, @dllb, @sfdllx, @keyword, @dlCode + , @isContansChildDl, @useypckflag, @ypyfbmCode, @containyp0ck, @onlyybflag + return; +end +; + +--dlCode dlmc --ʱ#tbdlCodeTemp +WITH cteTree AS + (SELECT * + FROM [NewtouchHIS_Base]..V_S_xt_sfdl + where dlId in ( + select dlId from [NewtouchHIS_Base]..V_S_xt_sfdl + where Organizeid = @orgId and zt = '1' and (isnull(@dlCode, '') = '' or dlCode in (select * from dbo.f_split(isnull(@dlCode, ''), ','))) + ) and zt = '1' + UNION ALL + SELECT a.* + FROM [NewtouchHIS_Base]..V_S_xt_sfdl a + INNER JOIN cteTree ON cteTree.dlId=a.ParentId and a.zt = '1' and @isContansChildDl = 1) + +select distinct dlCode, dlmc, dllb +into #tbdlCodeTemp +from cteTree where (isnull(@dllb, '') = '' or dllb in (select Convert(int, col) from dbo.f_split(isnull(@dllb, ''), ','))) +and ( +isnull(@sfdllx, '') = '' +or +dlCode in + ( + select dlCode from [NewtouchHIS_Base]..V_S_xt_sfdl_lx where Organizeid = @orgId and zt = '1' + and ((left(@sfdllx,1) <> '-' and Type in (select col from [dbo].[f_split](@sfdllx,','))) or (left(@sfdllx,1) = '-' and Type not in + (select col from [dbo].[f_split]((case when isnull(@sfdllx, '') <> '' then SUBSTRING(@sfdllx,2,len(@sfdllx) - 1) else '' end),',')))) + ) +) +and ( + mzzybz = @mzzybz or mzzybz = '0' or @mzzybz = '' +) + + select + sfxmCode, + sfxmmc, + a.sfdlCode sfdlCode, + b.dlmc sfdlmc, + dw, + CAST(ROUND(dj,2) AS NUMERIC(12, 2)) dj, + a.mzzybz, + a.py, + a.px, + a.duration + ,isnull(a.bz,'') bz + ,isnull(a.dwjls,0) dwjls + ,isnull(a.jjcl,2) jjcl --Ĭϰ + ,a.zfxz + ,a.zfbl + ,a.zxks + ,sysdept.Name zxksmc + ,a.gg + ,a.ybdm + ,a.cxjje + INTO #XmQuery + from[NewtouchHIS_Base]..V_S_xt_sfxm(nolock) a + INNER join #tbdlCodeTemp(nolock) b + on a.sfdlCode = b.dlCode + left join [NewtouchHIS_Base]..V_S_Sys_Department(nolock) sysdept + on sysdept.Code = a.zxks and sysdept.OrganizeId = a.OrganizeId and sysdept.zt = '1' + where a.OrganizeId = @orgId and a.zt = '1' + and (@mzzybz = '' or @mzzybz = '1' or @mzzybz = '2' or (@mzzybz = '0' and dllb = 3)) --ѯĿһҪָסԺͨýĿ򲻹ﻹסԺͨ + and ( + a.mzzybz = @mzzybz or a.mzzybz = '0' or @mzzybz = '' + ) + + CREATE TABLE #YpQuery( + ypCode varchar(20), + ypmc varchar(256), + sfdlCode varchar(20), + sfdlmc varchar(50), + dw varchar(20), + cls numeric(9,4), + dj numeric(9,4), + py VARCHAR(70), + px INT , + jldw varchar(10) , + jldwzhxs numeric(9,4), + zfxz char(1), + zfbl numeric(9,4), + yfbmCode varchar(100), + kcsl numeric(11,2), + yfbmmc varchar(50), + ypgg varchar(100), + ypjxCode varchar(20), + kzbz varchar(1), + zyqzlx char(1), + ybdm varchar(20), + xzyy BIT, + xzyysm varchar(256), + mrjl decimal, + mrpc varchar(20), + mrpcmc varchar(50), + isKss char(1), + jlfwBegin NUMERIC(9,4), + jlfwEnd NUMERIC(9,4), + pcfwBegin NUMERIC(9,4), + pcfwEnd NUMERIC(9,4), + kssKy CHAR(1), + cxjje numeric(9,4), + tsypbz varchar(20), + kssqxjb varchar(20), + bz varchar(200) + ) + +IF @isQyKssKZ=0 +BEGIN +INSERT INTO #YpQuery +SELECT aaa.ypCode, aaa.ypmc, aaa.dlCode sfdlCode, bbb.dlmc sfdlmc + , case @mzzybz when '1' then aaa.mzcldw when '2' then aaa.zycldw end dw + , case @mzzybz when '1' then aaa.mzcls when '2' then aaa.zycls end cls + , CONVERT(DECIMAL(19,4), case @mzzybz when '1' then (case when aaa.mzcldw = aaa.bzdw then aaa.lsj else (aaa.lsj / aaa.bzs * aaa.mzcls) end) when '2' then (case when aaa.zycldw = aaa.bzdw then aaa.lsj else (aaa.lsj / aaa.bzs * aaa.zycls) end)end) dj + + , aaa.py + , aaa.px + , aaa.jldw + , aaa.jl jldwzhxs + , aaa.zfxz + , aaa.zfbl + , ypkc.yfbmCode, convert(numeric(11,2),isnull(ypkc.zxdwsl,0)) kcsl, yfbm.yfbmmc + , ypsx.ypgg + , aaa.jx ypjxCode + , ypkc.kzbz + , ypsx.jzlx zyqzlx + , ypsx.ybdm + , ypsx.xzyy,ypsx.xzyysm,ypsx.mrjl,ypsx.mrpc,yzpc.yzpcmc mrpcmc,NULL isKss,NULL jlfwBegin,NULL jlfwEnd,NULL pcfwBegin,NULL pcfwEnd,NULL kssKy + , aaa.cxjje,aaa.tsypbz,ypkss.qxjb kssqxjb +,isnull(aaa.bz,'') bz + from [NewtouchHIS_Base]..V_S_xt_yp(nolock) aaa + INNER JOIN NewtouchHIS_Base.dbo.V_S_xt_ypsx(NOLOCK) ypsx ON ypsx.ypId=aaa.ypId AND ypsx.zt='1' AND ypsx.OrganizeId=aaa.OrganizeId + INNER join #tbdlCodeTemp(nolock) bbb on aaa.dlCode = bbb.dlCode + INNER join [NewtouchHIS_PDS].dbo.V_S_P_Kc ypkc + on ypkc.OrganizeId = aaa.OrganizeId and ypkc.ypCode = aaa.ypCode + left join NewtouchHIS_Base.dbo.V_S_xt_yfbm yfbm + on yfbm.OrganizeId = aaa.OrganizeId and yfbm.yfbmCode = ypkc.yfbmCode + LEFT JOIN NewtouchHIS_Base..V_S_xt_yzpc yzpc + ON ypsx.mrpc=yzpc.yzpcCode AND yzpc.zt = '1' AND yzpc.OrganizeId = ypsx.OrganizeId + LEFT JOIN NewtouchHIS_Base..xt_ypKss ypkss on aaa.kssId = ypkss.Id and ypkss.OrganizeId=aaa.OrganizeId + where aaa.OrganizeId = @orgId + and (isnull(@ypyfbmCode,'') = '' or ypkc.yfbmCode in (select * from dbo.f_split(isnull(@ypyfbmCode, ''), ','))) + and aaa.zt = '1' + and (@mzzybz = '1' or @mzzybz = '2') --ѯҩƷһҪָѯסԺ + and (yfbm.mzzybz = @mzzybz or yfbm.mzzybz = '3') --/סԺҩ ͨҩ + and (@containyp0ck = 1 or ypkc.zxdwsl > 0) +END +ELSE +BEGIN +INSERT INTO #YpQuery +SELECT aaa.ypCode, aaa.ypmc, aaa.dlCode sfdlCode, bbb.dlmc sfdlmc + , case @mzzybz when '1' then aaa.mzcldw when '2' then aaa.zycldw end dw + , case @mzzybz when '1' then aaa.mzcls when '2' then aaa.zycls end cls + , CONVERT(DECIMAL(19,4), case @mzzybz when '1' then (case when aaa.mzcldw = aaa.bzdw then aaa.lsj else (aaa.lsj / aaa.bzs * aaa.mzcls) end) when '2' then (case when aaa.zycldw = aaa.bzdw then aaa.lsj else (aaa.lsj / aaa.bzs * aaa.zycls) end)end) dj + + , aaa.py + , aaa.px + , aaa.jldw + , aaa.jl jldwzhxs + , aaa.zfxz + , aaa.zfbl + , ypkc.yfbmCode, convert(numeric(11,2),isnull(ypkc.zxdwsl,0)) kcsl, yfbm.yfbmmc + , ypsx.ypgg + , aaa.jx ypjxCode + , ypkc.kzbz + , ypsx.jzlx zyqzlx + , ypsx.ybdm + , ypsx.xzyy,ypsx.xzyysm,ypsx.mrjl,ypsx.mrpc,yzpc.yzpcmc mrpcmc,aaa.isKss,kss.jlfwBegin,kss.jlfwEnd, + kss.pcfwBegin,kss.pcfwEnd,CASE WHEN ISNULL(kss.qxjb,'0') <=@qxjb THEN '1' ELSE '0' END kssKy --ؿ 1 ,0 (qxjb:0 ʹҩ,1 ʹҩ,2 ʹҩ) + ,aaa.cxjje,aaa.tsypbz,ypkss.qxjb kssqxjb + ,isnull(aaa.bz,'') bz + from [NewtouchHIS_Base]..V_S_xt_yp(nolock) aaa + INNER JOIN NewtouchHIS_Base.dbo.V_S_xt_ypsx(NOLOCK) ypsx ON ypsx.ypId=aaa.ypId AND ypsx.zt='1' AND ypsx.OrganizeId=aaa.OrganizeId + INNER join #tbdlCodeTemp(nolock) bbb on aaa.dlCode = bbb.dlCode + INNER join [NewtouchHIS_PDS].dbo.V_S_P_Kc ypkc + on ypkc.OrganizeId = aaa.OrganizeId and ypkc.ypCode = aaa.ypCode + left join NewtouchHIS_Base.dbo.V_S_xt_yfbm yfbm + on yfbm.OrganizeId = aaa.OrganizeId and yfbm.yfbmCode = ypkc.yfbmCode + LEFT JOIN NewtouchHIS_Base..V_S_xt_yzpc yzpc + ON ypsx.mrpc=yzpc.yzpcCode AND yzpc.zt = '1' AND yzpc.OrganizeId = ypsx.OrganizeId + LEFT JOIN NewtouchHIS_Base..xt_ypKss(NOLOCK) kss ON aaa.isKss='1' AND aaa.kssId = kss.Id AND kss.zt='1' AND aaa.OrganizeId = kss.OrganizeId + LEFT JOIN NewtouchHIS_Base..xt_ypKss ypkss on aaa.kssId = ypkss.Id and ypkss.OrganizeId=aaa.OrganizeId + where aaa.OrganizeId = @orgId + and (isnull(@ypyfbmCode,'') = '' or ypkc.yfbmCode in (select * from dbo.f_split(isnull(@ypyfbmCode, ''), ','))) + and aaa.zt = '1' + and (@mzzybz = '1' or @mzzybz = '2') --ѯҩƷһҪָѯסԺ + and (yfbm.mzzybz = @mzzybz or yfbm.mzzybz = '3') --/סԺҩ ͨҩ + and (@containyp0ck = 1 or ypkc.zxdwsl > 0) +END + +/*ҽԺҪƲʾΪ0ҩڴ˿ơ޸ֱעʹ˴20220805A*/ +delete from #YpQuery where kcsl <= 0 + +select top (@topCount) * from +( +select sfxmCode sfxmCode , sfxmmc sfxmmc, py py +, sfdlCode sfdlCode, sfdlmc sfdlmc +, dw dw, dj dj +, '2' yzlx +, bz bz +, duration duration +, dwjls dwjls +, jjcl jjcl +, '' jldw +, null jldwzhxs +, zfxz zfxz +, zfbl zfbl +, 0 cls +, '' yfbmCode +, '' yfbmmc +, null kcsl +, gg gg +, '' ypjxCode +, '' kzbz +, '' zyqzlx +, zxks zxks +, zxksmc zxksmc +, ybdm ybdm +, null xzyy,null xzyysm,NULL mrjl, NULL mrpc,NULL mrpcmc +, NULL isKss +, NULL jlfwBegin +, NULL jlfwEnd +, NULL pcfwBegin +, NULL pcfwEnd +, NULL kssKy +, cxjje,''tsypbz,''kssqxjb +,'2' jybz --ҩ־ Ƿұҩʶ 1ұҩ 2ҩ +from #XmQuery + +union all + +select ypCode sfxmCode , ypmc sfxmmc, py py +, sfdlCode sfdlCode, sfdlmc sfdlmc +, dw dw, dj dj +, '1' yzlx +, bz bz +, null duration +, null dwjls +, null jjcl +, jldw jldw +, jldwzhxs jldwzhxs +, zfxz zfxz +, zfbl zfbl +, cls cls +, yfbmCode yfbmCode +, yfbmmc yfbmmc +, kcsl kcsl +, ypgg gg +, ypjxCode ypjxCode +, kzbz kzbz +, zyqzlx zyqzlx +, '' zxks +, '' zxksmc +, ybdm ybdm +, xzyy xzyy +, xzyysm xzyysm +,mrjl mrjl +,mrpc mrpc +,mrpcmc mrpcmc +,isKss +,jlfwBegin +,jlfwEnd +,pcfwBegin +,pcfwEnd +,kssKy +,cxjje +, tsypbz +, kssqxjb +,'2' jybz --ҩ־ Ƿұҩʶ 1ұҩ 2ҩ +from #YpQuery +) as reslt +where (isnull(@keyword, '') = '' or sfxmCode like '%' + @keyword + '%' or sfxmmc like '%' + @keyword + '%' or py like '%' + @keyword + '%') +and (@onlyybflag = 0 or isnull(ybdm,'')<>'') + +order by sfxmCode + +--ɾʱ +drop table #tbdlCodeTemp + +return + + + + + + + + + +GO + + diff --git "a/Newtouch.HIS.Base/sql/20241021_\347\224\265\345\255\220\345\244\204\346\226\271.sql" "b/Newtouch.HIS.Base/sql/20241021_\347\224\265\345\255\220\345\244\204\346\226\271.sql" new file mode 100644 index 0000000000000000000000000000000000000000..1868580b4d3e6fe910a5947c7c3dadc9ab1d6753 --- /dev/null +++ "b/Newtouch.HIS.Base/sql/20241021_\347\224\265\345\255\220\345\244\204\346\226\271.sql" @@ -0,0 +1,151 @@ +-- 医保电子处方目录落地表 +USE [NewtouchHIS_Sett] +GO + +/****** Object: Table [dbo].[Dzcf_CFYP_output] + +Script Date: 2024/10/21 11:25:14 +remark:Ò½±£µç×Ó´¦·½Ò©Æ·Ä¿Â¼ÂäµØ±í +******/ +SET ANSI_NULLS ON +GO + +SET QUOTED_IDENTIFIER ON +GO + +CREATE TABLE [dbo].[Dzcf_CFYP_output]( + [cfypcode] [int] IDENTITY(1,1) NOT NULL, + [medListCodg] [varchar](500) NULL, + [natDrugNo] [varchar](500) NULL, + [genname] [varchar](500) NULL, + [prodname] [varchar](500) NULL, + [regName] [varchar](500) NULL, + [listType] [varchar](500) NULL, + [listTypeName] [varchar](500) NULL, + [specName] [varchar](500) NULL, + [prdrName] [varchar](500) NULL, + [aprvno] [varchar](500) NULL, + [dosformName] [varchar](500) NULL, + [minPacunt] [varchar](500) NULL, + [minPacCnt] [varchar](500) NULL, + [minPrepunt] [varchar](500) NULL, + [poolareaNo] [varchar](500) NULL, + [poolareaName] [varchar](500) NULL, + [dualchnlFlag] [varchar](500) NULL, + [oppoolFlag] [varchar](500) NULL, + [begntime] [varchar](500) NULL, + [endtime] [varchar](500) NULL, + [dj] [decimal](18, 2) NOT NULL, + [py] [varchar](500) NULL +) ON [PRIMARY] +GO + +ALTER TABLE [dbo].[Dzcf_CFYP_output] ADD CONSTRAINT [DF_Dzcf_CFYP_output_dj] DEFAULT ((0.01)) FOR [dj] +GO + + +-- 电子处方上传预核验出参落地 +USE [NewtouchHIS_Sett] +GO + +/****** Object: Table [dbo].[Dzcf_D001_output] +remark:µç×Ó´¦·½ÉÏ´«Ô¤ºËÑé³ö²ÎÂäµØ +Script Date: 2024/10/21 11:27:08 ******/ +SET ANSI_NULLS ON +GO + +SET QUOTED_IDENTIFIER ON +GO + +CREATE TABLE [dbo].[Dzcf_D001_output]( + [mzh] [varchar](100) NULL, + [cfh] [varchar](100) NULL, + [OrganizeId] [varchar](100) NULL, + [InputContent] [varchar](max) NULL, + [rxTraceCode] [varchar](500) NULL, + [hiRxno] [varchar](500) NULL, + [czydm] [varchar](50) NULL, + [czrq] [datetime] NULL, + [zt] [int] NULL, + [zt_czy] [varchar](50) NULL, + [zt_rq] [datetime] NULL +) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] +GO + + +-- 电子处方医保电子签名出参落地 +USE [NewtouchHIS_Sett] +GO + +/****** Object: Table [dbo].[Dzcf_D002_output] +remark:µç×Ó´¦·½Ò½±£µç×ÓÇ©Ãû³ö²ÎÂäµØ +Script Date: 2024/10/21 11:28:43 ******/ +SET ANSI_NULLS ON +GO + +SET QUOTED_IDENTIFIER ON +GO + +CREATE TABLE [dbo].[Dzcf_D002_output]( + [mzh] [varchar](100) NULL, + [cfh] [varchar](100) NULL, + [OrganizeId] [varchar](100) NULL, + [InputContent] [varchar](max) NULL, + [originalValue] [varchar](max) NULL, + [originalRxFile] [varchar](max) NULL, + [rxFile] [varchar](max) NULL, + [signDigest] [varchar](max) NULL, + [signCertSn] [varchar](1000) NULL, + [signCertDn] [varchar](1000) NULL, + [czydm] [varchar](50) NULL, + [czrq] [datetime] NULL, + [zt] [int] NULL, + [zt_czy] [varchar](50) NULL, + [zt_rq] [datetime] NULL +) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] +GO + + +-- 电子处方上传出参落地表 +USE [NewtouchHIS_Sett] +GO + +/****** Object: Table [dbo].[Dzcf_D003_output] +µç×Ó´¦·½ÉÏ´«³ö²ÎÂäµØ±í +Script Date: 2024/10/21 11:29:37 ******/ +SET ANSI_NULLS ON +GO + +SET QUOTED_IDENTIFIER ON +GO + +CREATE TABLE [dbo].[Dzcf_D003_output]( + [mzh] [varchar](100) NULL, + [cfh] [varchar](100) NULL, + [OrganizeId] [varchar](100) NULL, + [InputContent] [varchar](max) NULL, + [rxTraceCode] [varchar](500) NULL, + [hiRxno] [varchar](500) NULL, + [rxStasCodg] [varchar](500) NULL, + [rxStasName] [varchar](500) NULL, + [cxyy] [varchar](5000) NULL, + [cxsj] [varchar](500) NULL, + [czydm] [varchar](50) NULL, + [czrq] [datetime] NULL, + [zt] [int] NULL, + [zt_czy] [varchar](50) NULL, + [zt_rq] [datetime] NULL, + [rxChkStasCodg] [varchar](500) NULL, + [rxChkOpnn] [varchar](500) NULL, + [rxChkTime] [varchar](500) NULL, + [rxChkStasName] [varchar](500) NULL, + [rxUsedStasCodg] [varchar](500) NULL, + [rxUsedStasName] [varchar](500) NULL +) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] +GO + + +-- 电子处方开立脚本 +alter table Newtouch_CIS..xt_cf add isdzcf varchar(5) +alter table Newtouch_CIS..xt_cf add ysshyj varchar(30) +alter table Newtouch_CIS..xt_cfmx add gjybdm varchar(100) diff --git "a/Newtouch.HIS.Base/sql/20241022_\347\256\200\346\230\223\351\227\250\350\257\212.sql" "b/Newtouch.HIS.Base/sql/20241022_\347\256\200\346\230\223\351\227\250\350\257\212.sql" new file mode 100644 index 0000000000000000000000000000000000000000..768eb88157c8a64e2c005f9b73b087acb5eed278 --- /dev/null +++ "b/Newtouch.HIS.Base/sql/20241022_\347\256\200\346\230\223\351\227\250\350\257\212.sql" @@ -0,0 +1,2 @@ +-- 简易门诊 +ALTER TABLE [dbo].[mz_ghpb_config] ALTER COLUMN [mjzbz] CHAR(2); \ No newline at end of file diff --git a/Newtouch.HIS.CIS/Newtouch.Application/Newtouch.Application.csproj b/Newtouch.HIS.CIS/Newtouch.Application/Newtouch.Application.csproj index b96138713b9f58ce507d15eabb73768229dbb389..fada7b0f8c33fd6910db274c360bc6c1186e98d3 100644 --- a/Newtouch.HIS.CIS/Newtouch.Application/Newtouch.Application.csproj +++ b/Newtouch.HIS.CIS/Newtouch.Application/Newtouch.Application.csproj @@ -29,6 +29,9 @@ prompt 4 + + bin\9_190\ + ..\..\his-dll-common\FrameworkBase\FrameworkBase.MultiOrg.Application.dll diff --git a/Newtouch.HIS.CIS/Newtouch.CIS.APIRequest/Newtouch.CIS.APIRequest.csproj b/Newtouch.HIS.CIS/Newtouch.CIS.APIRequest/Newtouch.CIS.APIRequest.csproj index 73c15f62547dfc9f06f70b5f66d24242e0303ed1..c53b19528629f128c1478795ec53756f26ef068c 100644 --- a/Newtouch.HIS.CIS/Newtouch.CIS.APIRequest/Newtouch.CIS.APIRequest.csproj +++ b/Newtouch.HIS.CIS/Newtouch.CIS.APIRequest/Newtouch.CIS.APIRequest.csproj @@ -29,6 +29,9 @@ prompt 4 + + bin\9_190\ + ..\..\his-dll-common\webapicommondlls\Newtouch.HIS.API.Common.dll 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 4282443dd88a9f4cfc4ebb886e7fff88e71b2f30..ea12203edf7e40f72e7d72a66583e11ce08ee903 100644 --- a/Newtouch.HIS.CIS/Newtouch.CIS.Proxy/Newtouch.CIS.Proxy.csproj +++ b/Newtouch.HIS.CIS/Newtouch.CIS.Proxy/Newtouch.CIS.Proxy.csproj @@ -30,6 +30,9 @@ prompt 4 + + bin\9_190\ + ..\..\his-dll-common\FrameworkBase\FrameworkBase.MultiOrg.Domain.dll diff --git a/Newtouch.HIS.CIS/Newtouch.CIS.UnitTestProject/Newtouch.CIS.UnitTestProject.csproj b/Newtouch.HIS.CIS/Newtouch.CIS.UnitTestProject/Newtouch.CIS.UnitTestProject.csproj index 2afb803d9011e5445ea49e6c504270acfab38d8c..a1d30d01428664f0eb54912ee1f2d2154fa4e14f 100644 --- a/Newtouch.HIS.CIS/Newtouch.CIS.UnitTestProject/Newtouch.CIS.UnitTestProject.csproj +++ b/Newtouch.HIS.CIS/Newtouch.CIS.UnitTestProject/Newtouch.CIS.UnitTestProject.csproj @@ -38,6 +38,9 @@ prompt 4 + + bin\9_190\ + ..\..\his-dll-common\FrameworkBase\FrameworkBase.MultiOrg.Domain.dll 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 08341fbb541b967353fc8c65a67f34811baa125a..9c9e208fe4c400e93c8f47cd20de69d9122acae4 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 @@ -60,11 +60,18 @@ namespace Newtouch.CIS.Web.Areas.DoctorManage.Controllers { var FequencyList = frequencyStr.Split(','); var pcInfo = _iDoctorserviceDmnService.getpcInfoByCode(FequencyList[0], OrganizeId); - ViewBag.pccode = pcInfo.yzpcCode; - ViewBag.zxcs = pcInfo.zxcs; - ViewBag.zxzq = pcInfo.zxzq; - ViewBag.zxzqdw = pcInfo.zxzqdw; - ViewBag.pcmc = pcInfo.yzpcmc; + if (pcInfo != null) + { + ViewBag.pccode = pcInfo.yzpcCode; + ViewBag.zxcs = pcInfo.zxcs; + ViewBag.zxzq = pcInfo.zxzq; + ViewBag.zxzqdw = pcInfo.zxzqdw; + ViewBag.pcmc = pcInfo.yzpcmc; + } + else { + throw new Exception($"未找到有效的医嘱频次信息 (医嘱频次编号: {FequencyList[0]}),请稍后重试或联系管理员。"); + } + } #region 抗生素相关 ViewBag.IsQyKssKz = _sysConfigRepo.GetBoolValueByCode("openKssQxSwitch", OrganizeId);//是否启用抗生素 diff --git a/Newtouch.HIS.CIS/Newtouch.CIS.Web/Areas/DoctorManage/Controllers/ElectronicPrescriptionController.cs b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Areas/DoctorManage/Controllers/ElectronicPrescriptionController.cs new file mode 100644 index 0000000000000000000000000000000000000000..58bc8a373ba8f5504533a5ac73885ed5f725109e --- /dev/null +++ b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Areas/DoctorManage/Controllers/ElectronicPrescriptionController.cs @@ -0,0 +1,60 @@ +using FrameworkBase.MultiOrg.Web; +using Newtouch.Core.Common; +using Newtouch.Domain.IDomainServices.Outpatient; +using Newtouch.Domain.ValueObjects.Outpatient; +using Newtouch.Tools; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.Mvc; + +namespace Newtouch.CIS.Web.Areas.DoctorManage.Controllers +{ + public class ElectronicPrescriptionController : OrgControllerBase + { + private readonly IElectronicPrescriptionDmnService _electronicPrescriptionDmnService; + // GET: DoctorManage/ElectronicPrescription + public ActionResult Index() + { + return View(); + } + + public ActionResult examForm() + { + return View(); + } + + public ActionResult medicineForm() + { + return View(); + } + + + public ActionResult cfForm() + { + return View(); + } + + public ActionResult backForm() + { + return View(); + } + + public ActionResult GetGridJson(Pagination pagination, DateTime kssj, DateTime jssj, string xm) + { + var tt = _electronicPrescriptionDmnService.GetGridJson(pagination, OrganizeId, kssj, jssj, xm); + var data = new + { + rows = tt, + total = pagination.total, + page = pagination.page, + records = pagination.records, + }; + return Content(data.ToJson()); ; + } + + + + } +} \ No newline at end of file diff --git a/Newtouch.HIS.CIS/Newtouch.CIS.Web/Areas/DoctorManage/Views/ElectronicPrescription/Index.cshtml b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Areas/DoctorManage/Views/ElectronicPrescription/Index.cshtml new file mode 100644 index 0000000000000000000000000000000000000000..80d9f3f215ad6829e64cbac149cfbb3767a67dee --- /dev/null +++ b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Areas/DoctorManage/Views/ElectronicPrescription/Index.cshtml @@ -0,0 +1,314 @@ + +@using Newtouch.Infrastructure; +@using Newtouch.HIS.Web.Core.Extensions; +@{ + ViewBag.Title = "电子处方管理"; + Layout = "~/Views/Shared/_Index.cshtml"; + var opr = Newtouch.Common.Operator.OperatorProvider.GetCurrent(); +} + + + + + + + + Index + + + +
+
+ + + + + + + + + + + +
订单时间: + + + + 关键字: + + + +
+
+
+
+
+
+ @*
+ +
+
+
+
+
+ +
*@ +
+ + + + + +
+
+ + + + + diff --git a/Newtouch.HIS.CIS/Newtouch.CIS.Web/Areas/DoctorManage/Views/ElectronicPrescription/backForm.cshtml b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Areas/DoctorManage/Views/ElectronicPrescription/backForm.cshtml new file mode 100644 index 0000000000000000000000000000000000000000..6e7243596e092407c909eedeb9c456b3472e0634 --- /dev/null +++ b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Areas/DoctorManage/Views/ElectronicPrescription/backForm.cshtml @@ -0,0 +1,78 @@ +@using Newtouch.Infrastructure; +@{ + ViewBag.Title = "backForm"; + Layout = "~/Views/Shared/_Index.cshtml"; + var curOpr = Newtouch.Common.Operator.OperatorProvider.GetCurrent(); +} + +
+
+ + + + + + + +
撤销原因: + +
+
+
+ + \ No newline at end of file diff --git a/Newtouch.HIS.CIS/Newtouch.CIS.Web/Areas/DoctorManage/Views/ElectronicPrescription/cfForm.cshtml b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Areas/DoctorManage/Views/ElectronicPrescription/cfForm.cshtml new file mode 100644 index 0000000000000000000000000000000000000000..ca4ecb50961d5ff72ef667e30c2ca0e172bc2a03 --- /dev/null +++ b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Areas/DoctorManage/Views/ElectronicPrescription/cfForm.cshtml @@ -0,0 +1,279 @@ +@using Newtouch.Infrastructure; +@{ + ViewBag.Title = "cfFrom"; + Layout = "~/Views/Shared/_Index.cshtml"; + var curOpr = Newtouch.Common.Operator.OperatorProvider.GetCurrent(); +} +
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+ \ No newline at end of file diff --git a/Newtouch.HIS.CIS/Newtouch.CIS.Web/Areas/DoctorManage/Views/ElectronicPrescription/examForm.cshtml b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Areas/DoctorManage/Views/ElectronicPrescription/examForm.cshtml new file mode 100644 index 0000000000000000000000000000000000000000..9b34edd0645f3f6708b8697df91f7b0888193e00 --- /dev/null +++ b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Areas/DoctorManage/Views/ElectronicPrescription/examForm.cshtml @@ -0,0 +1,102 @@ +@using Newtouch.Infrastructure; +@{ + ViewBag.Title = "examForm"; + Layout = "~/Views/Shared/_Form.cshtml"; + var curOpr = Newtouch.Common.Operator.OperatorProvider.GetCurrent(); +} + + +
+
+
+
+ + + + + + + + + + + + + + + + + + + +
医保处方编号: + + 医保药师姓名: + +
医保药师代码: + + 处方审核状态名称: + +
处方审核意见: + + 处方审核时间: + +
+
+
+
+
+ + + + + diff --git a/Newtouch.HIS.CIS/Newtouch.CIS.Web/Areas/DoctorManage/Views/ElectronicPrescription/medicineForm.cshtml b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Areas/DoctorManage/Views/ElectronicPrescription/medicineForm.cshtml new file mode 100644 index 0000000000000000000000000000000000000000..c415c3b42cdc5d2682470182b400cc78bcdb7b52 --- /dev/null +++ b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Areas/DoctorManage/Views/ElectronicPrescription/medicineForm.cshtml @@ -0,0 +1,105 @@ +@using Newtouch.Infrastructure; +@{ + ViewBag.Title = "examForm"; + Layout = "~/Views/Shared/_Form.cshtml"; + var curOpr = Newtouch.Common.Operator.OperatorProvider.GetCurrent(); +} + + + + + + + + + + + + + + + +
医保处方编号: + + 医保结算时间: + +
+
+
+
+ + + + + diff --git a/Newtouch.HIS.CIS/Newtouch.CIS.Web/Areas/NurseManage/Views/ExceReportPrint/Index.cshtml b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Areas/NurseManage/Views/ExceReportPrint/Index.cshtml index 2140304e5c60f444a028b871ff17b5d3ad0fe586..6459138ffd809dee987eb3016e656d5d01ccf45a 100644 --- a/Newtouch.HIS.CIS/Newtouch.CIS.Web/Areas/NurseManage/Views/ExceReportPrint/Index.cshtml +++ b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Areas/NurseManage/Views/ExceReportPrint/Index.cshtml @@ -388,7 +388,7 @@ } }, { label: '医嘱', name: 'yznr', align: 'center', width: 270 }, - { label: '单价', name: 'dj', align: 'center', width: 50, formatter: 'number', formatoptions: { thousandsSeparator: "", decimalPlaces: 2 } }, + { label: '单价', name: 'dj', align: 'center', width: 50, formatter: 'number', formatoptions: { thousandsSeparator: "", decimalPlaces: 4 } }, { label: '数量', name: 'sl', align: 'center', width: 50, formatter: 'number', formatoptions: { thousandsSeparator: "", decimalPlaces: 2 } }, { label: '金额', name: 'je', align: 'center', width: 50, formatter: 'number', formatoptions: { thousandsSeparator: "", decimalPlaces: 2 } }, { label: '最后执行时间', name: 'zxsj', align: 'center', width: 120, formatter: "date", formatoptions: { srcformat: 'Y-m-d H:i:s', newformat: 'Y-m-d H:i:s' } }, 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 597decf0898407fecda67bd42810d5257f064a81..ea4f4b99fb5a4f8e435a9b98e33fdcf16f3b594a 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 @@ -212,7 +212,8 @@ colModel: [ { label: '药品Id', name: 'Id', align: 'center', width: 100, hidden: true,key:true}, { label: '患者姓名', name: 'hzxm', align: 'center', width: 100 }, - { label: 'zyh', name: 'zyh', align: 'center' ,hidden: true, }, + { label: 'zyh', name: 'zyh', align: 'center', hidden: true, }, + { label: 'yzlx', name: 'yzlx', align: 'center', hidden: true, }, { label: '医嘱性质', name: 'yzxz', align: 'center', width: 50, formatter: function (cellvalue) { if(cellvalue==2) return "长期"; if(cellvalue==1) return "临时"; } }, { label: '药品名称', name: 'ypmc', align: 'center', width: 180 }, { label: '执行日期', name: 'zxrq', align: 'center', width: 120, formatter: function (val) { return $.getTime({ date: val }); } }, @@ -355,6 +356,7 @@ var medobj = {}; medobj.Id = row.Id; medobj.tsL = row.tsl; + medobj.yzlx = row.yzlx; medobjs.push(medobj); //medIds += row.Id + ","; }); diff --git a/Newtouch.HIS.CIS/Newtouch.CIS.Web/Configs/9_190/database.config b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Configs/9_190/database.config new file mode 100644 index 0000000000000000000000000000000000000000..a2a3cad7fd9bb18c0192a5efca9a4153c45ecc8b --- /dev/null +++ b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Configs/9_190/database.config @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/Newtouch.HIS.CIS/Newtouch.CIS.Web/Configs/9_190/system.config b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Configs/9_190/system.config new file mode 100644 index 0000000000000000000000000000000000000000..b987e59e97cdc00d321e1986324e8df9403c0b87 --- /dev/null +++ b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Configs/9_190/system.config @@ -0,0 +1,113 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Newtouch.HIS.CIS/Newtouch.CIS.Web/Configs/database.config b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Configs/database.config index 4d2075b059fcd99cdb7dd45f18bd8ab57daab701..625ea393235846418aeca7342ef0388b1e2c066e 100644 --- a/Newtouch.HIS.CIS/Newtouch.CIS.Web/Configs/database.config +++ b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Configs/database.config @@ -1,12 +1,13 @@  - - - - - - + + + + + + + diff --git a/Newtouch.HIS.CIS/Newtouch.CIS.Web/Configs/system.config b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Configs/system.config index 58fbc8b5407df2d9b60f2e50ee093c2c0f697136..f002610e89b34e655a159e5a15de1091eb28a4d1 100644 --- a/Newtouch.HIS.CIS/Newtouch.CIS.Web/Configs/system.config +++ b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Configs/system.config @@ -26,7 +26,7 @@ - + @@ -36,41 +36,42 @@ - + - + - + - - + - - - + - + + + + + - + - + - + - + - - + + @@ -95,15 +96,15 @@ - + - - - - + + + + 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 16b178fa7d84da52ae5585746fdd2fa4788ac7ec..991d5190c5927758ae151381ef2efd3f1daedb6f 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 @@ -46,8 +46,8 @@ $.fn.yfFloatingSelector = function (options) { $.fn.sfxmFloatingSelector = function (options) { //默认options var defaults = { - width: 900, - height: 200, + width: 1550, + height: 380, clickautotrigger: true, url: '/SystemManage/BaseData/SelectSfxmYp', ajaxparameters: null, //请指定 @@ -58,10 +58,10 @@ $.fn.sfxmFloatingSelector = function (options) { ypkccbjc: true, //药品库存初步检查 是否被控制 是否库存0 colModel: [ - { label: '代码', name: 'sfxmCode', widthratio: 7 }, - { label: '名称', name: 'sfxmmc', widthratio: 10 }, + { label: '代码', name: 'sfxmCode', widthratio: 6 }, + { label: '名称', name: 'sfxmmc', widthratio: 6 }, { - label: '规格', name: 'gg', widthratio: 10 + label: '规格', name: 'gg', widthratio: 6 , hidden: true }, { label: '医嘱类型', name: 'yzlx', hidden: true }, @@ -69,12 +69,12 @@ $.fn.sfxmFloatingSelector = function (options) { { label: '收费大类', name: 'sfdlCode', hidden: true }, { label: '收费大类', name: 'sfdlmc' - , widthratio: 10 + , widthratio: 6 , hidden: true }, - { label: '单位', name: 'dw', widthratio: 4 }, + { label: '单位', name: 'dw', widthratio: 3 }, { - label: '单价', name: 'dj', widthratio: 10, formatter: function (cellvalue) { + label: '单价', name: 'dj', widthratio: 6, formatter: function (cellvalue) { return (!!cellvalue || cellvalue == 0) ? (parseFloat(cellvalue).toFixed(options.djDecimalPlaces ? options.djDecimalPlaces : 2)) : ''; } }, @@ -93,11 +93,11 @@ $.fn.sfxmFloatingSelector = function (options) { //}, { label: '报销政策', name: 'zfxz', hidden: true }, { - label: '报销政策', name: 'zfxzmc', widthratio: 8, formatter: function (cellvalue, a, b) { + label: '报销政策', name: 'zfxzmc', widthratio: 5, formatter: function (cellvalue, a, b) { return $.enum.getDescByValue("EnumZiFuXingZhi", b.zfxz); } }, - { label: '自负比例', name: 'zfbl', hidden: true }, + { label: '自负比例', name: 'zfbl', widthratio: 3,hidden: true }, { label: '特殊药品标志', name: 'tsypbz', hidden: true }, { label: '特殊药品标志', name: 'tsypbzmc', hidden: true, formatter: function (cellvalue, a, b) { @@ -132,33 +132,33 @@ $.fn.sfxmFloatingSelector = function (options) { return $.enum.getDescByValue("EnumKss", b.kssqxjb); } }, { - label: '超限价金额', name: 'cxjje', formatter: function (cellvalue, a, b) { + label: '医保限价', name: 'cxjje', formatter: function (cellvalue, a, b) { if (b.cxjje == null) { return "0.00" } else return b.cxjje - }, widthratio: 7, hidden: true + }, widthratio: 4, hidden: true }, { label: '药房', name: 'yfbmmc', formatter: function (cellvalue, a, b) { return b.yzlx === '1' && !!cellvalue ? cellvalue : ''; - }, widthratio: 7, hidden: false + }, widthratio: 4, hidden: true }, { label: '库存', name: 'kcsl', formatter: function (cellvalue, a, b) { return b.yzlx === '1'&&!!cellvalue ? cellvalue : ''; - }, widthratio: 6, hidden: true + }, widthratio: 4, hidden: true }, { label: '库存', name: 'clkcsl', formatter: function (cellvalue, a, b) { //给的kcsl是最小单位的,这里要显示门诊/住院单位的数量 return b.yzlx === '1' ? (!!b.kcsl && !!b.cls ? (parseInt(b.kcsl / b.cls)) : '无') : ''; - }, widthratio: 6, hidden: true + }, widthratio: 4, hidden: true }, { label: '抗生素', name: 'isKss', formatter: function (cellvalue, a, b) { return cellvalue == '1' ? '是' : '否'; - }, widthratio: 7, hidden: true + }, widthratio: 3, hidden: true }, { label: '单次剂量', name: 'jlfw', formatter: function (cellvalue, a, b) { @@ -179,9 +179,15 @@ $.fn.sfxmFloatingSelector = function (options) { { label: '控制', name: 'kzbz', formatter: function (cellvalue, a, b) { return cellvalue == '1' ? '控制' : ''; - }, widthratio: 6, hidden: true + }, widthratio: 3, hidden: true }, - { label: '备注', name: 'bz', hidden: true ,widthratio: 15} + { + label: '生产厂家', name: 'sccj'/*, hidden: true*/, formatter: function (cellvalue, a, b) { + return cellvalue == undefined ? '' : cellvalue; + }, widthratio: 8 + }, + { label: '国家医保代码', name: 'gjybdm', widthratio: 8 }, + { label: '备注', name: 'bz' } ] }; var options = $.extend(defaults, options); @@ -206,6 +212,8 @@ $.fn.sfxmFloatingSelector = function (options) { var colbz = null; var colcxjje = null; var coltsypbz = null; + var colsccj = null; + var colgjybdm = null; $.each(options.colModel, function () { if (this.name === 'bz') { colbz = this; @@ -246,6 +254,12 @@ $.fn.sfxmFloatingSelector = function (options) { else if (this.name == 'cxjje') { colcxjje = this; } + else if (this.name === 'sccj') { + colsccj = this; + } + else if (this.name === 'gjybdm') { + colgjybdm = this; + } if (this.name === 'tsypbzmc') { coltsypbz = this; } @@ -253,7 +267,7 @@ $.fn.sfxmFloatingSelector = function (options) { if (!!colsfxmmc && !!colgg && !!colsfdlmc && !!coldwjls && !!colyfbmmc && !!colclkcsl && !!colkzbz) { //已被占用50宽 switch (options.searchType) { - case "yp": console.log('12'); + case "yp": colsfxmmc.widthratio = 10; colgg.hidden = undefined; colgg.widthratio = 8; @@ -261,16 +275,20 @@ $.fn.sfxmFloatingSelector = function (options) { colsfdlmc.widthratio = 10; colisKss.hidden = undefined; colisKss.widthratio = 6; - //colzfbl.hidden = undefined; - //colzfbl.widthratio = 10; + colzfbl.hidden = undefined; + colzfbl.widthratio = 10; colbz.hidden = undefined; - colbz.widthratio = 10; + colbz.widthratio = 5; + colsccj.hidden = undefined; + colsccj.widthratio = 10; + colgjybdm.hidden = undefined; + colgjybdm.widthratio = 5; //coljlfw.hidden = undefined; //coljlfw.widthratio = 10; //colpcfw.hidden = undefined; //colpcfw.widthratio = 10; break; - case "sfxm": console.log('1'); + case "sfxm": colgg.hidden = undefined; colgg.widthratio = 10; colsfxmmc.widthratio = 20; @@ -278,20 +296,20 @@ $.fn.sfxmFloatingSelector = function (options) { colsfdlmc.widthratio = 12; colcxjje.hidden = undefined; colcxjje.widthratio = 10; - colclkcsl.hidden = undefined; - colclkcsl.widthratio = 5; + //colclkcsl.hidden = undefined; + //colclkcsl.widthratio = 10; break; case "yp,sfxm": - case "sfxm,yp": console.log('128'); + case "sfxm,yp": colsfxmmc.widthratio = 14; colgg.hidden = undefined; colgg.widthratio = 12; colisKss.hidden = undefined; colisKss.widthratio = 6; - //colzfbl.hidden = undefined; - //colzfbl.widthratio = 10; + colzfbl.hidden = undefined; + colzfbl.widthratio = 10; colbz.hidden = undefined; - colbz.widthratio = 10; + colbz.widthratio = 5; //coljlfw.hidden = undefined; //coljlfw.widthratio = 10; //colpcfw.hidden = undefined; @@ -300,32 +318,36 @@ $.fn.sfxmFloatingSelector = function (options) { case "yp.kc": case "yp.kc,sfxm": case "sfxm,yp.kc": //cxjje - //coltsypbz.hidden = undefined; - //coltsypbz.widthratio = 9; - colsfxmmc.widthratio = 20; + coltsypbz.hidden = undefined; + coltsypbz.widthratio = 8; + colsfxmmc.widthratio = 15; colgg.hidden = undefined; - colgg.widthratio = 10; - //colyfbmmc.hidden = undefined; - //colyfbmmc.widthratio = 5; + colgg.widthratio = 8; + colyfbmmc.hidden = undefined; + colyfbmmc.widthratio = 5; colclkcsl.hidden = undefined; - colclkcsl.widthratio = 5; - //colkzbz.hidden = undefined; - //colkzbz.widthratio = 5; + colclkcsl.widthratio = 4; + colkzbz.hidden = undefined; + colkzbz.widthratio = 4; colisKss.hidden = undefined; - colisKss.widthratio = 6; - //colzfbl.hidden = undefined; - //colzfbl.widthratio = 9; + colisKss.widthratio = 4; + colzfbl.hidden = undefined; + colzfbl.widthratio = 5; colbz.hidden = undefined; - colbz.widthratio = 10; + colbz.widthratio = 5; colbz.cx = undefined; + colbz.widthratio = 5; colcxjje.hidden = undefined; - colcxjje.widthratio = 10; + colcxjje.widthratio = 6; + colsccj.widthratio = 8; + colgjybdm.hidden = undefined; + colgjybdm.widthratio = 8; //coljlfw.hidden = undefined; //coljlfw.widthratio = 10; //colpcfw.hidden = undefined; //colpcfw.widthratio = 10; break; - case "sfxm.dwjls": console.log('121'); + case "sfxm.dwjls": colgg.hidden = undefined; colgg.widthratio = 10; colsfxmmc.widthratio = 25; @@ -335,7 +357,7 @@ $.fn.sfxmFloatingSelector = function (options) { colcxjje.widthratio = 10; break; case "yp,sfxm.dwjls": - case "sfxm.dwjls,yp": console.log('1233'); + case "sfxm.dwjls,yp": colsfxmmc.widthratio = 12; colgg.hidden = undefined; colgg.widthratio = 10; @@ -343,10 +365,10 @@ $.fn.sfxmFloatingSelector = function (options) { coldwjls.widthratio = 8; colisKss.hidden = undefined; colisKss.widthratio = 7; - //colzfbl.hidden = undefined; - //colzfbl.widthratio = 10; + colzfbl.hidden = undefined; + colzfbl.widthratio = 10; colbz.hidden = undefined; - colbz.widthratio = 10; + colbz.widthratio = 5; //coljlfw.hidden = undefined; //coljlfw.widthratio = 10; //colpcfw.hidden = undefined; @@ -355,24 +377,24 @@ $.fn.sfxmFloatingSelector = function (options) { case "yp.kc,sfxm.dwjls": case "sfxm.dwjls,yp.kc": colyfbmmc.hidden = undefined; - //coltsypbz.widthratio = 9; - colsfxmmc.widthratio = 20; + coltsypbz.widthratio = 9; + colsfxmmc.widthratio = 12; colgg.hidden = undefined; colgg.widthratio = 8; colyfbmmc.hidden = undefined; colyfbmmc.widthratio = 7; colclkcsl.hidden = undefined; colclkcsl.widthratio = 5; - //colkzbz.hidden = undefined; - //colkzbz.widthratio = 5; + colkzbz.hidden = undefined; + colkzbz.widthratio = 5; coldwjls.hidden = undefined; coldwjls.widthratio = 6; colisKss.hidden = undefined; colisKss.widthratio = 6; - //colzfbl.hidden = undefined; - //colzfbl.widthratio = 10; + colzfbl.hidden = undefined; + colzfbl.widthratio = 10; colbz.hidden = undefined; - colbz.widthratio = 10; + colbz.widthratio = 5; //coljlfw.hidden = undefined; //coljlfw.widthratio = 10; //colpcfw.hidden = undefined; diff --git a/Newtouch.HIS.CIS/Newtouch.CIS.Web/Controllers/MedicalRecordController.cs b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Controllers/MedicalRecordController.cs index 77581ccae7b36c0600a5785879865ada8aeec3fe..c695c039ffd758a20750bce991c10f6a2389bba1 100644 --- a/Newtouch.HIS.CIS/Newtouch.CIS.Web/Controllers/MedicalRecordController.cs +++ b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Controllers/MedicalRecordController.cs @@ -637,6 +637,8 @@ namespace Newtouch.CIS.Web.Controllers djts = cfitem.djts, cfzt = cfitem.cfzt, valiDays=3, + isdzcf = cfitem.isdzcf, + gjybdm = cfitem.gjybdm //ztId = cfitem.yfztbm, //ztmc=cfitem.yfztmc, diff --git a/Newtouch.HIS.CIS/Newtouch.CIS.Web/Controllers/PrescriptionController.cs b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Controllers/PrescriptionController.cs index ec82e9237c7a3f86213bf040a83d4074c3a781a5..3f4e8caf74e47d024300a673fe8de31d0f493037 100644 --- a/Newtouch.HIS.CIS/Newtouch.CIS.Web/Controllers/PrescriptionController.cs +++ b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Controllers/PrescriptionController.cs @@ -350,5 +350,20 @@ namespace Newtouch.CIS.Web.Controllers var mxbstr = _iDoctorserviceDmnService.GetYfData(OrganizeId); return Content(mxbstr.ToJson()); } + + /// + /// 医保电子处方 + /// + /// + /// + public ActionResult getdzcfnrxs(string cfh) + { + var data = _prescriptionDmnService.getdzcfnrxs(cfh, this.OrganizeId); + if (data.Count > 0) + { + return Content("ok"); + } + return Content(""); + } } } \ No newline at end of file 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 4935244a0a1245d407a6805d9007692d11e7414f..ba663278b16ac9476e6e45c7a99c5e83b9b141f9 100644 --- a/Newtouch.HIS.CIS/Newtouch.CIS.Web/Newtouch.CIS.Web.csproj +++ b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Newtouch.CIS.Web.csproj @@ -233,6 +233,7 @@ + @@ -252,6 +253,8 @@ + + @@ -290,7 +293,6 @@ - @@ -368,6 +370,16 @@ + + + + + + + + Designer + + @@ -559,6 +571,9 @@ + + Web.config + Web.config @@ -582,6 +597,7 @@ + @@ -694,6 +710,12 @@ 10.0 $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + + bin\ + + + bin\ + diff --git a/Newtouch.HIS.CIS/Newtouch.CIS.Web/Properties/PublishProfiles/PublishProfile.pubxml b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Properties/PublishProfiles/PublishProfile.pubxml new file mode 100644 index 0000000000000000000000000000000000000000..bef6f7212e2eab68014ab194e27bdc2f0b4729f7 --- /dev/null +++ b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Properties/PublishProfiles/PublishProfile.pubxml @@ -0,0 +1,18 @@ + + + + + true + false + true + Release + Any CPU + FileSystem + ..\..\publish\CIS + FileSystem + <_TargetId>Folder + + + \ 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 2c956d4c695ee2eb95c775a52366579c4d45925a..d0aa23c7eb640582fbf15c896ad8e0bcd6405ab0 100644 --- a/Newtouch.HIS.CIS/Newtouch.CIS.Web/Views/MedicalRecord/MedicalRecord.cshtml +++ b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Views/MedicalRecord/MedicalRecord.cshtml @@ -647,7 +647,7 @@ - + 中药:
@@ -1597,6 +1597,7 @@ var cfzhdysj = this.cfzhdysj; var sendtohisResult = this.sendtohisResult; var cftag = this.presEntity.cftag; + var isdzcf = this.presEntity.isdzcf; $.each(this.presDetailList,function(){ var cfmx = { cfzhdysj:cfzhdysj, @@ -1633,6 +1634,8 @@ sfdlmc:this.sfdlmc, zzfbz: this.zzfbz, cftag: cftag, + isdzcf: isdzcf, + gjybdm:this.gjybdm, ispsbz: this.ispsbz, islgbz: this.islgbz, ztId: this.ztId, @@ -1656,6 +1659,7 @@ var djbz=this.presEntity.djbz; var cfzhdysj = this.cfzhdysj; var sendtohisResult = this.sendtohisResult; + var isdzcf = this.presEntity.isdzcf; $.each(this.presDetailList,function(){ var cfmx = { cfzhdysj:cfzhdysj, @@ -1687,7 +1691,9 @@ zl: this.zl, ts: this.ts, tbz: this.tbz, - zycf:this.zycf + zycf:this.zycf, + isdzcf: isdzcf, + gjybdm:this.gjybdm }; if(!(window.alldataArray && window.alldataArray.zycf)){ window.alldataArray.zycf = new Array(); @@ -2049,7 +2055,8 @@ ybwym:this.ybwym, xzsybz:this.xzsybz, cfmxId:this.cfmxId, - ts: this.ts + ts: this.ts, + isdzcf: this.isdzcf }; if(!(window.historydataArray && window.historydataArray.xycf)){ window.historydataArray.xycf = new Array(); @@ -2086,7 +2093,8 @@ ybwym:this.ybwym, xzsybz:this.xzsybz, cfmxId:this.cfmxId, - ts: this.ts + ts: this.ts, + isdzcf: this.isdzcf }; if(!(window.historydataArray && window.historydataArray.zycf)){ window.historydataArray.zycf = new Array(); @@ -3712,22 +3720,24 @@ , Iscontainsy:Iscontainsy , tbz: itemsMxArr[i].tbz , je: toJe + , isdzcf: itemsMxArr[i].isdzcf }); } } //遍历处方,呈现之 for (var i = 0; i < typeClassificationArr.length; i++) { var lasttdContent = ''; + var isysh = isyshycx(typeClassificationArr[i].cfh); lasttdContent += '  Rp'; if(typeFlag != "historynodeContent" && !(window.currPatientInfo && window.currPatientInfo.jzzt == '@((int)EnumJzzt.Treated)')){ - if(typeClassificationArr[i].sfbz == false){ + if(typeClassificationArr[i].sfbz == false && isysh==""){ lasttdContent += '  '; } } if (!!typeClassificationArr[i].cfId) { - if(typeFlag != "historynodeContent" && !(window.currPatientInfo && window.currPatientInfo.jzzt == '@((int)EnumJzzt.Treated)')){ + if(typeFlag != "historynodeContent" && !(window.currPatientInfo && window.currPatientInfo.jzzt == '@((int)EnumJzzt.Treated)') && isysh==""){ if(typeClassificationArr[i].sfbz == false){ - if(!(typeClassificationArr[i].sendtohisResult == 1)){ + if(!(typeClassificationArr[i].sendtohisResult == 1)&& typeClassificationArr[i].isdzcf != "1"){ lasttdContent += '  '; } lasttdContent += '  '; @@ -3749,7 +3759,7 @@ //} } var thisHtml = ''; - thisHtml += '' + typeClassificationArr[i].cfh + ''; + thisHtml += '' + typeClassificationArr[i].cfh + (typeClassificationArr[i].isdzcf == "1" ? "(电)" : "")+ ''; if(typeFlag != "historynodeContent"){ thisHtml += '' + $.getDate({date: typeClassificationArr[i].klrq, ute:true}) + ''; thisHtml += '' + (typeClassificationArr[i].sendtohisResult == '1' ? '已同步' : '未同步') + ''; @@ -3825,14 +3835,16 @@ , Iscontainzs: Iscontainzs , tbz: itemsMxArr[i].tbz , je: toJe + , isdzcf: itemsMxArr[i].isdzcf }); } } //遍历处方,呈现之 for (var i = 0; i < typeClassificationArr.length; i++) { var lasttdContent = ''; + var isysh = isyshycx(typeClassificationArr[i].cfh); lasttdContent += '  Rp'; - if(typeFlag != "historynodeContent" && !(window.currPatientInfo && window.currPatientInfo.jzzt == '@((int)EnumJzzt.Treated)')){ + if(typeFlag != "historynodeContent" && !(window.currPatientInfo && window.currPatientInfo.jzzt == '@((int)EnumJzzt.Treated)') && isysh == ""){ if(typeClassificationArr[i].sfbz == false){ lasttdContent += '  '; } else if (typeClassificationArr[i].sfbz && typeClassificationArr[i].tbz) { @@ -3841,8 +3853,8 @@ } if(!!typeClassificationArr[i].cfId){ if(typeFlag != "historynodeContent" && !(window.currPatientInfo && window.currPatientInfo.jzzt == '@((int)EnumJzzt.Treated)')){ - if(typeClassificationArr[i].sfbz == false){ - if(!(typeClassificationArr[i].sendtohisResult == 1)){ + if(typeClassificationArr[i].sfbz == false && isysh == ""){ + if(!(typeClassificationArr[i].sendtohisResult == 1) && typeClassificationArr[i].isdzcf != "1"){ lasttdContent += '  '; } lasttdContent += '  '; @@ -3857,7 +3869,7 @@ } } var thisHtml = ''; - thisHtml += '' + typeClassificationArr[i].cfh + ''; + thisHtml += '' + typeClassificationArr[i].cfh +(typeClassificationArr[i].isdzcf=="1"?"(电)":"") + ''; if(typeFlag != "historynodeContent"){ thisHtml += '' + $.getDate({date: typeClassificationArr[i].klrq, ute:true}) + ''; thisHtml += '' + (typeClassificationArr[i].sendtohisResult == '1' ? '已同步' : '未同步') + ''; @@ -4140,6 +4152,18 @@ } }); }); + function isyshycx(cfh) { + var isysh = ""; + $.ajax({ + url: '/Prescription/getdzcfnrxs', + data: { cfh: cfh }, + async: false, + success: function (resp) { + isysh = resp; + } + }); + return isysh; + } var url = '@dzcfUrl'; //电子处方上传 diff --git a/Newtouch.HIS.CIS/Newtouch.CIS.Web/Views/PatientList/PatientList.cshtml b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Views/PatientList/PatientList.cshtml index 59883b70c4d165a92bb1375d98c84a521ae93f03..e67bdc0272714c3109298e799940d61586f02d9f 100644 --- a/Newtouch.HIS.CIS/Newtouch.CIS.Web/Views/PatientList/PatientList.cshtml +++ b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Views/PatientList/PatientList.cshtml @@ -33,6 +33,7 @@ + diff --git a/Newtouch.HIS.CIS/Newtouch.CIS.Web/Views/Prescription/TCMPrescription.cshtml b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Views/Prescription/TCMPrescription.cshtml index a768de2e1d722f1fb2c66b6877c6cf7ecf684ab8..385d974250a9bc0b0271eb86e2d7a0b9f86290b6 100644 --- a/Newtouch.HIS.CIS/Newtouch.CIS.Web/Views/Prescription/TCMPrescription.cshtml +++ b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Views/Prescription/TCMPrescription.cshtml @@ -152,6 +152,13 @@ //未提交到数据库的处方,这里length 0 也没问题 $('span.bbit-tree-node-text[data-value="' + triggereditcfh + '"]').trigger('click'); } + var isdzcf = '0'; + $.jsonWhere(window.alldataArray.zycf, function (v) { + if (v.cfh == triggereditcfh && v.isdzcf != '') { + isdzcf = v.isdzcf; + } + }); + $("#isdzcfzy").val(isdzcf); } //处方列表 @@ -283,6 +290,7 @@ } }, { label: 'zzfbz', name: 'zzfbz', editwidth: '', align: 'center', editable: true, hidden: true }, + { label: '国家医保代码', name: 'gjybdm', editable: true, hidden: true}, { label: '操作', name: 'action', width: 110, align: 'center' } ], editinputwidthborder: false, //是否需要边框 默认为true @@ -356,8 +364,8 @@ }); $("#tip_zyyfly").empty(); $("#gridzycfPager_right").append('药房:'); - $("#gridzycfPager_right").append('特殊处方:'); - + $("#gridzycfPager_right").append('电子处方:   特殊处方:'); + $.ajax({ type: "POST", dataType: "json", //返回json格式的数据 @@ -397,7 +405,7 @@ //初始化 浮层 function initTCMInlineFunc(rowid) { - + //部分列只读 $("#" + rowid + "_dj").css('background-color','#f6f7fb').attr('readonly','true'); @@ -413,7 +421,7 @@ } else { $("#" + rowid + "_Remark").parent().next().children('select').val(0).trigger("change"); } - + //根据贴数和剂量算出来的 @@ -424,19 +432,21 @@ //药品浮层 //中药西药 会重复么 ‘"#" + rowid + "_ypmc"’ $("#" + rowid + "_ypmc").sfxmFloatingSelector({ djDecimalPlaces: 4, - searchType: '@(isMedicineSearchRelatedKC ? "yp.kc" : "yp")', //药品是否显示库存 + searchType: $("#isdzcfzy").val() == "1" ? "yp" : '@(isMedicineSearchRelatedKC ? "yp.kc" : "yp")', //药品是否显示库存 ajaxparameters: function ($thisinput) { var flag = false; //限制用药的话,flag=true if (window.currPatientInfo.brxzCode != "" &&'@ViewBag.ControlbrxzCode'.indexOf(window.currPatientInfo.brxzCode) > -1) { flag = true; } - var mzzybz=$('#tip_zyyfly option:selected').val().split('|')[1]; + var mzzybz=$('#tip_zyyfly option:selected').val().split('|')[1];//药房部门 0:不发药 1:门诊用药 2:住院用药 3:门诊住院通用 if(mzzybz=="3") mzzybz="1"; + if($("#isdzcfzy").val() == "1") + mzzybz="9";//走电子处方目录 return "onlyybflag=" + flag + "&mzzybz="+mzzybz+"&dllb=1&sfdllx=TCM&keyword=" + $.trim($thisinput.val())+"&ypyfbmCode="+$('#tip_zyyfly option:selected').val().split('|')[0]; }, - + itemdbclickhandler: function ($this) { $.ajax({ @@ -530,6 +540,7 @@ $("#" + rowid + "_mcjldw").val($this.attr('data-jldw')); $("#" + rowid + "_dw").val($this.attr('data-dw')); $("#" + rowid + "_mcjl").val($this.attr('data-mrjl')); + $("#" + rowid + "_gjybdm").val($this.attr('data-gjybdm')); $("#" + rowid + "_ypmc").css('background-color','#f6f7fb').attr('readonly','true'); CalculateTCMEachLineSlANDJe(rowid); //计算明细里的金额和处方金额 @@ -543,7 +554,7 @@ } } - + }); //嘱托浮层 @@ -554,7 +565,7 @@ }, }); - + } //计算明细里的数量 @@ -789,6 +800,7 @@ this.klrq = matchedHisCf[0].klrq; } this.cftag = $("#tip_jmcf").val(); + this.isdzcf = $("#isdzcfzy").val(); }); if (!saveResult) { diff --git a/Newtouch.HIS.CIS/Newtouch.CIS.Web/Views/Prescription/WMPrescription.cshtml b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Views/Prescription/WMPrescription.cshtml index 7092be85a4bb1359e4ff8ca6448aa731dd852f62..e6677061429280a94d0fa1bf2136e1b8be195b49 100644 --- a/Newtouch.HIS.CIS/Newtouch.CIS.Web/Views/Prescription/WMPrescription.cshtml +++ b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Views/Prescription/WMPrescription.cshtml @@ -128,7 +128,7 @@ dropUp: true }); $("#gridxycfPager_right").append('药房:'); - $("#gridxycfPager_right").append('   特殊处方:'); + $("#gridxycfPager_right").append('电子处方:   特殊处方:'); $("#tip_yfly").empty(); $.ajax({ type: "POST", @@ -255,6 +255,22 @@ $('span.bbit-tree-node-text[data-value="' + triggereditcfh + '"]').trigger('click'); } zddata();//诊断复选框生成 + + //初始化特殊处方 + var cftag = ''; + $.jsonWhere(window.alldataArray.xycf, function (v) { + if (v.cfh==triggereditcfh && v.cgtag != '') { + cftag = v.cftag; + } + }); + $("#tip_jmcf").val(cftag); + var isdzcf = '0'; + $.jsonWhere(window.alldataArray.xycf, function (v) { + if (v.cfh == triggereditcfh && v.isdzcf != '') { + isdzcf = v.isdzcf; + } + }); + $("#isdzcfxy").val(isdzcf); } //处方列表 function gridxycf() { @@ -610,6 +626,7 @@ { label: 'sfdlCode', name: 'sfdlCode', editable: true, hidden: true }, { label: 'sfdlmc', name: 'sfdlmc', editable: true, hidden: true }, { label: 'mrjl', name: 'mrjl', editable: true, hidden: true }, + { label: 'gjybdm', name: 'gjybdm', editable: true, hidden: true }, { label: '操作', name: 'action', width: 80, align: 'center' } ], editinputwidthborder: false, //是否需要边框 默认为true @@ -859,16 +876,18 @@ //药品浮层 //中药西药 会重复么 ‘"#" + rowid + "_ypmc"’ $("#" + rowid + "_ypmc").sfxmFloatingSelector({ djDecimalPlaces: 4, - searchType: '@(isMedicineSearchRelatedKC ? "yp.kc" : "yp")', //药品是否显示库存 + searchType: $("#isdzcfxy").val() == "1" ?"yp": '@(isMedicineSearchRelatedKC ? "yp.kc" : "yp")', //药品是否显示库存 ajaxparameters: function ($thisinput) { var flag = false; //限制用药的话,flag=true if (window.currPatientInfo.brxzCode != "" &&'@ViewBag.ControlbrxzCode'.indexOf(window.currPatientInfo.brxzCode) > -1) { flag = true; } - var mzzybz=$('#tip_yfly option:selected').val().split('|')[1]; + var mzzybz=$('#tip_yfly option:selected').val().split('|')[1];//药房部门 0:不发药 1:门诊用药 2:住院用药 3:门诊住院通用 if(mzzybz=="3") mzzybz="1"; + if( $("#isdzcfxy").val()=="1") + mzzybz="9";//走电子处方目录 return "onlyybflag=" + flag + "&mzzybz="+mzzybz+"&dllb=1&sfdllx=WM&keyword=" + $.trim($thisinput.val()) + "&isQyKssKZ="+ IsQyKssKz + "&qxjb="+qxjb+"&ypyfbmCode="+$('#tip_yfly option:selected').val().split('|')[0]; }, itemdbclickhandler: function ($this) { @@ -995,6 +1014,7 @@ $("#" + rowid + "_pcfwend").val($this.attr('data-pcfwend')); $("#" + rowid + "_cls").val($this.attr('data-cls')); $("#" + rowid + "_jlzhxs").val($this.attr('data-jldwzhxs')); + $("#" + rowid + "_gjybdm").val($this.attr('data-gjybdm')); $("#" + rowid + "_yfCode").val($this.attr('data-mryf')) //$("#" + rowid + "_ypmc").css('background-color','#f6f7fb').attr('readonly','true'); @@ -1162,12 +1182,12 @@ return "keyword=" + $.trim($thisinput.val())+"&yfcode="+yfbm; }, colModel: [ - + { label: '组套编码', name: 'sfmb', widthratio: 60 }, { label: '组套名称', name: 'sfmbmc', widthratio: 35 } ], itemdbclickhandler: function ($this) { - + //var curyfdm = $("#" + rowid + "_ypmc").val(); //alert(curyfdm); $("#" + rowid + "_yfztbm").val($this.attr('data-sfmb')); @@ -1444,6 +1464,7 @@ } this.cftag = $("#tip_jmcf").val(); + this.isdzcf = $("#isdzcfxy").val(); }); if ((!(saveResult == false)) && savetodb == '1' && gridxycfData.length > 0) {//药品限制开立 var isbmzd = $("#mzbck").is(":checked") ? "1" : "0"; diff --git a/Newtouch.HIS.CIS/Newtouch.CIS.Web/Web.9_190.config b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Web.9_190.config new file mode 100644 index 0000000000000000000000000000000000000000..1db134980c48262ae6864d39a129e8b4184a6b14 --- /dev/null +++ b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Web.9_190.config @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Newtouch.HIS.CIS/Newtouch.CIS.Web/Web.config b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Web.config index 80a9ca4c9767678dec69a8cb7180d679609fd9a1..1e27cb013d8e2f4c731b60768ebdb5544b93296c 100644 --- a/Newtouch.HIS.CIS/Newtouch.CIS.Web/Web.config +++ b/Newtouch.HIS.CIS/Newtouch.CIS.Web/Web.config @@ -6,11 +6,18 @@ -
+
- -
-
+ +
+
@@ -22,102 +29,107 @@ - - + + - + - - - - - - - - + + + + + + + + - + - + - + - - - - - - - - - - + + + + + + + + + + - - - - + + + + - + - + - - - - - - + + + + + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + @@ -125,18 +137,21 @@ - - - - + + + + - - - - + + + + \ No newline at end of file diff --git a/Newtouch.HIS.CIS/Newtouch.Domain/DTO/InputDto/Inpatient/API/InpMedReturnRequestDto.cs b/Newtouch.HIS.CIS/Newtouch.Domain/DTO/InputDto/Inpatient/API/InpMedReturnRequestDto.cs index 11dcecec8f2f82bc590448b2e39cde7bafefa1e0..c8ed38d4f846ff2ebd20a6c82f099b66585e30af 100644 --- a/Newtouch.HIS.CIS/Newtouch.Domain/DTO/InputDto/Inpatient/API/InpMedReturnRequestDto.cs +++ b/Newtouch.HIS.CIS/Newtouch.Domain/DTO/InputDto/Inpatient/API/InpMedReturnRequestDto.cs @@ -46,5 +46,6 @@ namespace Newtouch.Domain.DTO.InputDto public class InMedReturnRequestslDto { public string Id { get; set; } public int tsl { get; set; } + public int? yzlx { get; set; } } } diff --git a/Newtouch.HIS.CIS/Newtouch.Domain/DTO/InputDto/Inpatient/InpatientMedicineGrantDto.cs b/Newtouch.HIS.CIS/Newtouch.Domain/DTO/InputDto/Inpatient/InpatientMedicineGrantDto.cs index a21c8102f38b97acc626c60e66887bacb8c3e39b..1b7d02f16cf31890da11c28d8bfe18c5b18522ad 100644 --- a/Newtouch.HIS.CIS/Newtouch.Domain/DTO/InputDto/Inpatient/InpatientMedicineGrantDto.cs +++ b/Newtouch.HIS.CIS/Newtouch.Domain/DTO/InputDto/Inpatient/InpatientMedicineGrantDto.cs @@ -8,5 +8,6 @@ namespace Newtouch.Domain.DTO.InputDto.Inpatient { public int tsl { get; set; } public int ktsl { get; set; } + public int? yzlx { get; set; } } } diff --git a/Newtouch.HIS.CIS/Newtouch.Domain/DTO/OutputDto/Outpatient/PrescriptionDTO.cs b/Newtouch.HIS.CIS/Newtouch.Domain/DTO/OutputDto/Outpatient/PrescriptionDTO.cs index c72fa2a50900f3e6684e368afe5a017961748344..c755d6460dc4b28379564f4d26aa55c4b1c9fe9b 100644 --- a/Newtouch.HIS.CIS/Newtouch.Domain/DTO/OutputDto/Outpatient/PrescriptionDTO.cs +++ b/Newtouch.HIS.CIS/Newtouch.Domain/DTO/OutputDto/Outpatient/PrescriptionDTO.cs @@ -74,6 +74,11 @@ namespace Newtouch.Domain.DTO.OutputDto /// public string cftag { get; set; } public string jzId { get; set; } + + + public string isdzcf { get; set; }//电子处方 1 是 0 否 + public string gjybdm { get; set; } + /// /// 代煎方式 /// diff --git a/Newtouch.HIS.CIS/Newtouch.Domain/Entity/Outpatient/PrescriptionDetailEntity.cs b/Newtouch.HIS.CIS/Newtouch.Domain/Entity/Outpatient/PrescriptionDetailEntity.cs index f3cbc57f8d62575587542c23ed01cd1686f64cea..9005289f44df2cfc0d6c7df9554649a414117423 100644 --- a/Newtouch.HIS.CIS/Newtouch.Domain/Entity/Outpatient/PrescriptionDetailEntity.cs +++ b/Newtouch.HIS.CIS/Newtouch.Domain/Entity/Outpatient/PrescriptionDetailEntity.cs @@ -210,12 +210,22 @@ namespace Newtouch.Domain.Entity //留观标志 public string islgbz { get; set; } + /// + /// 组套数量 + /// public int? ztsl { get; set; } + /// + /// + /// public int? sfzt { get; set; } public string zysm { get; set; } /// /// 用法对应的项目组套 /// public string syncfbz { get; set; } + /// + /// 国家医保代码 + /// + public string gjybdm { get; set; } } } diff --git a/Newtouch.HIS.CIS/Newtouch.Domain/Entity/Outpatient/PrescriptionEntity.cs b/Newtouch.HIS.CIS/Newtouch.Domain/Entity/Outpatient/PrescriptionEntity.cs index b09466811ad3bce5bc2f84f95b5a72e91116381a..30ea2fb72740d83ac35f0d27cec6fb5c03dd90dc 100644 --- a/Newtouch.HIS.CIS/Newtouch.Domain/Entity/Outpatient/PrescriptionEntity.cs +++ b/Newtouch.HIS.CIS/Newtouch.Domain/Entity/Outpatient/PrescriptionEntity.cs @@ -135,7 +135,7 @@ namespace Newtouch.Domain.Entity /// 嘱托 /// public string cfzt { get; set; } - + public string isdzcf { get; set; }//电子处方 1 是 0 否 } } diff --git a/Newtouch.HIS.CIS/Newtouch.Domain/IDomainServices/Outpatient/IElectronicPrescriptionDmnService.cs b/Newtouch.HIS.CIS/Newtouch.Domain/IDomainServices/Outpatient/IElectronicPrescriptionDmnService.cs new file mode 100644 index 0000000000000000000000000000000000000000..5d4a1e4edd892f45a2811eafb1a1186a0029edf4 --- /dev/null +++ b/Newtouch.HIS.CIS/Newtouch.Domain/IDomainServices/Outpatient/IElectronicPrescriptionDmnService.cs @@ -0,0 +1,15 @@ +using Newtouch.Core.Common; +using Newtouch.Domain.ValueObjects.Outpatient; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Newtouch.Domain.IDomainServices.Outpatient +{ + public interface IElectronicPrescriptionDmnService + { + IList GetGridJson(Pagination pagination, string organizeId, DateTime kssj, DateTime jssj, string xm); + } +} diff --git a/Newtouch.HIS.CIS/Newtouch.Domain/IDomainServices/Outpatient/IPrescriptionDmnService.cs b/Newtouch.HIS.CIS/Newtouch.Domain/IDomainServices/Outpatient/IPrescriptionDmnService.cs index 17301b11369d607d9d4e4b197871063b62a3bf64..cdb42399f5ee86011f2cdaedeebd1feb95029cf9 100644 --- a/Newtouch.HIS.CIS/Newtouch.Domain/IDomainServices/Outpatient/IPrescriptionDmnService.cs +++ b/Newtouch.HIS.CIS/Newtouch.Domain/IDomainServices/Outpatient/IPrescriptionDmnService.cs @@ -48,5 +48,12 @@ namespace Newtouch.Domain.IDomainServices /// int ZUOFwzdj(string cfh, string orgId, string rygh); - } + /// + /// 医保电子处方 + /// + /// + /// + /// + List getdzcfnrxs(string cfh, string orgId); + } } diff --git a/Newtouch.HIS.CIS/Newtouch.Domain/Newtouch.Domain.csproj b/Newtouch.HIS.CIS/Newtouch.Domain/Newtouch.Domain.csproj index baaf072a3c4f6bb751bf47de905568b0a2621a49..87222ec436295de96b5795da99e8244558e6a3eb 100644 --- a/Newtouch.HIS.CIS/Newtouch.Domain/Newtouch.Domain.csproj +++ b/Newtouch.HIS.CIS/Newtouch.Domain/Newtouch.Domain.csproj @@ -29,6 +29,9 @@ prompt 4 + + bin\9_190\ + ..\..\his-dll-common\hiscommondlls\EntityFramework.dll @@ -224,6 +227,7 @@ + @@ -373,6 +377,7 @@ + diff --git a/Newtouch.HIS.CIS/Newtouch.Domain/ValueObjects/Outpatient/ElectronicPrescriptionVO.cs b/Newtouch.HIS.CIS/Newtouch.Domain/ValueObjects/Outpatient/ElectronicPrescriptionVO.cs new file mode 100644 index 0000000000000000000000000000000000000000..aa72d364689f387d0addc00400c28879802f54c3 --- /dev/null +++ b/Newtouch.HIS.CIS/Newtouch.Domain/ValueObjects/Outpatient/ElectronicPrescriptionVO.cs @@ -0,0 +1,37 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Newtouch.Domain.ValueObjects.Outpatient +{ + public class ElectronicPrescriptionVO + { + public string cfId { get; set; } + public string cfh { get; set; } + public string mzh { get; set; } + public string xm { get; set; } + public string zjlx { get; set; } + public string zjh { get; set; } + public string shzt { get; set; } + public string qyzt { get; set; } + public string cfzt { get; set; } + public string ghks { get; set; } + public string kdks { get; set; } + public DateTime? ghsj { get; set; } + public DateTime? cfklrq { get; set; } + public string ysshyj { get; set; } + + } + + public class examSearchDTO + { + public string hiRxno { get; set; } + public string fixmedinsCode { get; set; } + public string mdtrtId { get; set; } + public string psnName { get; set; } + public string psnCertType { get; set; } + public string certno { get; set; } + } +} diff --git a/Newtouch.HIS.CIS/Newtouch.Domain/ValueObjects/Outpatient/PrescriptionDetailQueryVO.cs b/Newtouch.HIS.CIS/Newtouch.Domain/ValueObjects/Outpatient/PrescriptionDetailQueryVO.cs index e562dfce9d781b69e0fe74916e096ca3a1923356..0495ba9d3f4cdbf9f8ae0aa3773dd9fecd5a6ee3 100644 --- a/Newtouch.HIS.CIS/Newtouch.Domain/ValueObjects/Outpatient/PrescriptionDetailQueryVO.cs +++ b/Newtouch.HIS.CIS/Newtouch.Domain/ValueObjects/Outpatient/PrescriptionDetailQueryVO.cs @@ -53,6 +53,6 @@ namespace Newtouch.Domain.ValueObjects public bool? tbz { get; set; } public string sfdlCode { get; set; } public string sfdlmc { get; set; } - + } } diff --git a/Newtouch.HIS.CIS/Newtouch.Domain/ValueObjects/Outpatient/PrescriptionDetailVO.cs b/Newtouch.HIS.CIS/Newtouch.Domain/ValueObjects/Outpatient/PrescriptionDetailVO.cs index 1ca954184d8738b73feb515d76e4d106c1f5cf1b..f6281e95fc7dafb97a93d27a38fe043a0f50079d 100644 --- a/Newtouch.HIS.CIS/Newtouch.Domain/ValueObjects/Outpatient/PrescriptionDetailVO.cs +++ b/Newtouch.HIS.CIS/Newtouch.Domain/ValueObjects/Outpatient/PrescriptionDetailVO.cs @@ -167,7 +167,7 @@ namespace Newtouch.Domain.ValueObjects /// /// public string ghlybz { get; set; } - + public string gjybdm { get; set; } } } diff --git a/Newtouch.HIS.CIS/Newtouch.Domain/ValueObjects/Outpatient/PrescriptionHtmlVO.cs b/Newtouch.HIS.CIS/Newtouch.Domain/ValueObjects/Outpatient/PrescriptionHtmlVO.cs index b052651c0b21856b88511e50fe01abc8e22d6db7..ebf06fbc187455eac244c6519f42904f9ed21c3c 100644 --- a/Newtouch.HIS.CIS/Newtouch.Domain/ValueObjects/Outpatient/PrescriptionHtmlVO.cs +++ b/Newtouch.HIS.CIS/Newtouch.Domain/ValueObjects/Outpatient/PrescriptionHtmlVO.cs @@ -65,7 +65,7 @@ namespace Newtouch.Domain.ValueObjects /// 嘱托 /// public string cfzt { get; set; } - + public string isdzcf { get; set; }//电子处方 1 是 0 否 #endregion @@ -311,6 +311,6 @@ namespace Newtouch.Domain.ValueObjects /// 处方有效天数 /// public int? yxts { get; set; } - - } + public string gjybdm { get; set; } + } } diff --git a/Newtouch.HIS.CIS/Newtouch.DomainServices/Inpatient/DoctorserviceDmnService.cs b/Newtouch.HIS.CIS/Newtouch.DomainServices/Inpatient/DoctorserviceDmnService.cs index fabbadcebfe0801a0566fdea0da3dfdf530e7e9c..6173fa44178100d5c4260febdd07bcbc8020f6b1 100644 --- a/Newtouch.HIS.CIS/Newtouch.DomainServices/Inpatient/DoctorserviceDmnService.cs +++ b/Newtouch.HIS.CIS/Newtouch.DomainServices/Inpatient/DoctorserviceDmnService.cs @@ -1595,8 +1595,8 @@ namespace Newtouch.DomainServices.Inpatient dept.Name deptName , yz.yztag, case yz.yztag when 'JI' then '精I' when 'JII' then '精II' when 'MZ' then '麻醉' else yz.yztag end yztagName, - isnull(yz.isjf,1) isjf,ispscs,isnull(zzfbz,0) zzfbz , yz.xmdm,yz.sl, yz.Px, - case when yzlx in (2,4,10) then (cast(yz.sl as varchar)+ypxx.zycldw) end zycldw,yfztbs,yply,isfsyz + isnull(yz.isjf,1) isjf,ispscs,isnull(zzfbz,0) zzfbz , yz.xmdm,case when yzlx='10' then yz.sl* (cast(yz.ypjl as int)) else yz.sl end sl, yz.Px, + case when yzlx in (2,4,10) then (cast(case when yzlx='10' then convert(numeric(18,2),yz.sl*yz.ypjl) else yz.sl end as varchar)+ypxx.zycldw) end zycldw,yfztbs,yply,isfsyz FROM ( select 'Y' iszt,row_number() over(partition by ztid,yzh order by createtime desc) num ,* from zy_cqyz yz with(nolock) where ztid is not null @@ -1657,8 +1657,8 @@ namespace Newtouch.DomainServices.Inpatient isnull(yz.isjf,1) isjf, ispscs ,isnull(zzfbz,0) zzfbz, xmdm, - sl, yz.Px, - case when yzlx in (2,4,10) then (cast(sl as varchar)+ypxx.zycldw) end zycldw ,yfztbs,yply,isfsyz + case when yzlx='10' then sl* (cast(yz.ypjl as int)) else sl end sl, yz.Px, + case when yzlx in (2,4,10) then (cast(case when yzlx='10' then convert(numeric(18,2),sl*yz.ypjl) else sl end as varchar)+ypxx.zycldw) end zycldw ,yfztbs,yply,isfsyz from ( select 'Y' iszt,row_number() over(partition by ztid,yzh order by createtime desc) num ,* from zy_lsyz jyjcyz with(nolock) where ztid is not null--yzlx in ('6','7') diff --git a/Newtouch.HIS.CIS/Newtouch.DomainServices/Inpatient/ExceReportPrintDmnService.cs b/Newtouch.HIS.CIS/Newtouch.DomainServices/Inpatient/ExceReportPrintDmnService.cs index a7b827553d493b4c7f12c27a4e511208fb418f5d..a7c977d556add1f967e9848975e4fb463c096ab9 100644 --- a/Newtouch.HIS.CIS/Newtouch.DomainServices/Inpatient/ExceReportPrintDmnService.cs +++ b/Newtouch.HIS.CIS/Newtouch.DomainServices/Inpatient/ExceReportPrintDmnService.cs @@ -173,7 +173,17 @@ where num1=1 "; return this.FindList(sql,par.ToArray()); } - + /// + /// 执行单打印查询 + /// + /// + /// + /// + /// + /// + /// + /// + /// public IList QueryExecDetailGridJson(Pagination pagination, string orgId, string zyh, DateTime zxsj, DateTime zxsjend, string zxdlb,string yzxz) { @@ -181,12 +191,12 @@ where num1=1 "; ,zxrq zxsj,shr,yzlx,ypyfdm,lyxh,shz,zxz,convert(varchar(10),isjf)isjf,sum(dj) dj,sum(case when num1>1 then 0 else sl end) sl,sum(je) je,px from( select tb.*,case when ztmc='' then '1' else num end num1 from ( - select a.*,aaa.dj,aaa.sl,aaa.je,aaa.lyxh,b.Name shz,c.Name zxz ,Row_Number() OVER (partition by yzh,ztmc ORDER BY zxrq desc) num,zxrq from - (select yzxh,dj,sl,CONVERT(decimal(18,2),dj*sl) je,CONVERT(INT,lyxh) lyxh,CreatorCode,zxrq from zy_tyssqqk with(nolock) where OrganizeId=@orgId and zxrq>=@zxsj and zxrq<=@zxsjend and zyh in(select col from dbo.f_split(@zyh,',') where col>'') + select a.*,aaa.dj,case when yzlx='10' then aaa.sl*mcsl else aaa.sl end sl,case when yzlx='10' then CONVERT(decimal(18,2),dj*sl*mcsl) else aaa.je end je,aaa.lyxh,b.Name shz,c.Name zxz ,Row_Number() OVER (partition by yzh,ztmc ORDER BY zxrq desc) num,zxrq from + (select yzxh,dj,sl,mcsl,CONVERT(decimal(18,2),dj*sl) je,CONVERT(INT,lyxh) lyxh,CreatorCode,zxrq from zy_tyssqqk with(nolock) where OrganizeId=@orgId and zxrq>=@zxsj and zxrq<=@zxsjend and zyh in(select col from dbo.f_split(@zyh,',') where col>'') union all - select yzxh,ypdj,ypsl,CONVERT(decimal(18,2),ypdj*ypsl) je,CONVERT(INT,lyxh) lyxh,CreatorCode,zxrq from zy_fyqqk with(nolock) where OrganizeId=@orgId and zxrq>=@zxsj and zxrq<=@zxsjend and zyh in(select col from dbo.f_split(@zyh,',') where col>'') + select yzxh,ypdj,ypsl,mcsl,CONVERT(decimal(18,2),ypdj*ypsl) je,CONVERT(INT,lyxh) lyxh,CreatorCode,zxrq from zy_fyqqk with(nolock) where OrganizeId=@orgId and zxrq>=@zxsj and zxrq<=@zxsjend and zyh in(select col from dbo.f_split(@zyh,',') where col>'') union - select yzxh,dj,sl,CONVERT(decimal(18,2),dj*sl) je,null lyxh,CreatorCode,zxrq from zy_fymxk with(nolock) where OrganizeId=@orgId and zxrq>=@zxsj and zxrq<=@zxsjend and zyh in(select col from dbo.f_split(@zyh,',') where col>'') and isjf=0 + select yzxh,dj,sl,1.00 mcsl,CONVERT(decimal(18,2),dj*sl) je,null lyxh,CreatorCode,zxrq from zy_fymxk with(nolock) where OrganizeId=@orgId and zxrq>=@zxsj and zxrq<=@zxsjend and zyh in(select col from dbo.f_split(@zyh,',') where col>'') and isjf=0 ) aaa join (select zyh,isjf,px,'长' clbz,'2' yzxz,hzxm,Id yzId,yzh,zh,case when ztid is not null then ztmc else yznr end yznr,shr,yzlx,ypyfdm,xmdm,isnull(ztmc,'') ztmc,yfztbs diff --git a/Newtouch.HIS.CIS/Newtouch.DomainServices/Inpatient/InpatientMedReturnDmnService.cs b/Newtouch.HIS.CIS/Newtouch.DomainServices/Inpatient/InpatientMedReturnDmnService.cs index 417cacc7b1b6608db70972e2976e4aa570eb3795..b245ed108d7a2987709fc910c24583279ee077af 100644 --- a/Newtouch.HIS.CIS/Newtouch.DomainServices/Inpatient/InpatientMedReturnDmnService.cs +++ b/Newtouch.HIS.CIS/Newtouch.DomainServices/Inpatient/InpatientMedReturnDmnService.cs @@ -91,7 +91,7 @@ and e.zybz not in (" + (int)EnumZYBZ.Ycy + "," + (int)EnumZYBZ.Wry + "," + (int) string sql = @"select [Id],a.[OrganizeId],[lyxh],[zyh],[hzxm],[yzxh],[fzxh],[yfdm],[WardCode],[DeptCode],[ysgh] ,[zxrq],[qqrq],[fyrq],[ypdm],a.[ypmc],[ypsl],a.[ypgg],[ypdw],[dwxs],[ykxs],[ypdj],[zxcs],[tybz] ,[fyczyh],[yzxz],[zbbz],[memo],[mcsl],[CreateTime],[CreatorCode],[LastModifyTime], -[LastModifierCode],a.[zt],ypsl-isnull(ytsl,0) tsl,ypsl-isnull(ytsl,0) ktsl +[LastModifierCode],a.[zt],ypsl-isnull(ytsl,0) tsl,ypsl-isnull(ytsl,0) ktsl,isnull(yzlx,0) yzlx from v_yzisfy a with(nolock) --zy_fyqqk a with(nolock) left join [NewtouchHIS_Base].[dbo].[V_C_xt_yp] b with(nolock) on a.[ypdm]=b.ypcode and a.OrganizeId=b.OrganizeId and b.zt='1' where a.OrganizeId=@orgId and a.zt='1' and a.tybz in (" + (int)EnumMedSTflag.Receive + "," + (int)EnumMedSTflag.PartReturn + @") @@ -182,14 +182,16 @@ and not exists(select 1 from zy_tyjl b with(nolock) var medentity = Tools.Json.ToList(medList); string sql = ""; sql = @" -select Id fyId, yzxh yzId,ypdm ypCode,ypmc,fzxh zh,zxrq,zyh,ypsl tysl,yfdm fyyf,DeptCode ksCode,WardCode bqCode,cast(a.lyxh as bigint) lyxh +select a.Id fyId, yzxh yzId,ypdm ypCode,ypmc,fzxh zh,zxrq,a.zyh,case when yzlx='10' then cast(ypsl*mcsl as int) else ypsl end tysl,yfdm fyyf,a.DeptCode ksCode,a.WardCode bqCode,cast(a.lyxh as bigint) lyxh from zy_fyqqk a with(nolock) +left join zy_lsyz lsyz with(nolock) on lsyz.Id=a.yzxh and lsyz.OrganizeId=a.OrganizeId and lsyz.zt='1' where a.zt=1 and a.OrganizeId=@orgId and tybz in(select col from dbo.f_split(@tybz,',')) and a.id in(select col from dbo.f_split(@medList,',') where col>'') and isnull(fzxh,'')='' union all -select Id fyId, yzxh yzId,ypdm ypCode,ypmc,fzxh zh,zxrq,zyh,ypsl tysl,yfdm fyyf,DeptCode ksCode,WardCode bqCode,cast(b.lyxh as bigint) lyxh +select b.Id fyId, yzxh yzId,ypdm ypCode,ypmc,fzxh zh,zxrq,b.zyh,case when yzlx='10' then cast(ypsl*mcsl as int) else ypsl end tysl,yfdm fyyf,b.DeptCode ksCode,b.WardCode bqCode,cast(b.lyxh as bigint) lyxh from zy_fyqqk b with(nolock) +left join zy_lsyz lsyz with(nolock) on lsyz.Id=b.yzxh and lsyz.OrganizeId=b.OrganizeId and lsyz.zt='1' where b.zt=1 and b.OrganizeId=@orgId and b.tybz in(select col from dbo.f_split(@tybz,',')) and exists ( select 1 -- OrganizeId,fzxh,zyh @@ -323,15 +325,19 @@ and exists ( InpatientMedicineGrantEntity ime = db.IQueryable().FirstOrDefault(p => p.Id == item.Id && p.tybz != (int)EnumMedSTflag.AllReturn && p.zt == "1" && p.OrganizeId == user.OrganizeId); if (ime != null) { + int ypsl = ime.ypsl; + if (item.yzlx == 10) { + ypsl = Convert.ToInt32(ime.mcsl ?? 0)*ime.ypsl; //中药需ypsl*每次数量 =中药总数量 + } ime.ytsl = (ime.ytsl ?? 0) + item.tsl; - if (ime.ytsl == ime.ypsl) + if (ime.ytsl == ypsl) { ime.tybz = (int)EnumMedSTflag.AllReturn; } - else if (ime.ytsl > ime.ypsl) + else if (ime.ytsl > ypsl) { throw new FailedException("退药数量不能大于发药数量"); - } else if (ime.ytsl < ime.ypsl) { + } else if (ime.ytsl < ypsl) { ime.tybz = (int)EnumMedSTflag.PartReturn; } ime.LastModifyTime = DateTime.Now; @@ -350,7 +356,7 @@ and exists ( fyqqxh = ime.lyxh, ypdm = ime.ypdm, tysl = item.tsl, - ktypsl = (ime.ypsl - ime.ytsl).ToInt(), + ktypsl = (ypsl - ime.ytsl).ToInt(), ypgg = ime.ypgg, ypdw = ime.ypdw, dwxs = ime.dwxs, diff --git a/Newtouch.HIS.CIS/Newtouch.DomainServices/Inpatient/OrderAuditDmnService.cs b/Newtouch.HIS.CIS/Newtouch.DomainServices/Inpatient/OrderAuditDmnService.cs index c9715eec56e6559d84a3a5bd9b958174dc04c56f..2dc30428ff73791cb949385e2ed9f203b5f4c922 100644 --- a/Newtouch.HIS.CIS/Newtouch.DomainServices/Inpatient/OrderAuditDmnService.cs +++ b/Newtouch.HIS.CIS/Newtouch.DomainServices/Inpatient/OrderAuditDmnService.cs @@ -161,7 +161,7 @@ CONVERT(VARCHAR(25),CASE DATEDIFF(DAY, xx.ryrq,GETDATE()) WHEN 0 THEN 1 else DA strkfwhere = " and yzlx<>@yzlx "; } string sql = @"select iszt,zyh,max(yzid) yzid, yzxz,yzxzsm,max(kssj) kssj,xmmc,ypjl,yzmc,yzjl,yfmc,yzpcmc,max(tzsj) tzsj,tzysgh,tzr,Creator,zh,zh1,OrganizeId,yzzt,yzlx,hzxm,yztag,yztagName,isjf,ispscs,yzh -,psjgms,psjg,yfztbs,yply,sum(dj) dj,sum(je) je,case when zh1 is null then sum(sl) else 1 end sl,Px +,psjgms,psjg,yfztbs,yply,sum(dj) dj,sum(je) je,case when zh1 is null or zh1='' then sum(sl) else 1 end sl,Px from ( select iszt,a.zyh, a.id yzid,2 yzxz,'长期' yzxzsm,a.kssj,case when ztid is not null then ztmc else a.xmmc end xmmc,a.ypjl, case when ztid is not null then (case when a.yzzt=3 then '[停]'+a.ztmc else a.ztmc end) else @@ -169,8 +169,9 @@ case when ztid is not null then (case when a.yzzt=3 then '[停]'+a.ztmc else a.z a.tzsj,a.tzysgh,a.tzr ,b.Name Creator,a.zh, case when ztid is not null then yzh else '' end zh1,a.OrganizeId,yzzt,a.yzlx,a.hzxm, a.yztag,case a.yztag when 'JI' then '精I' when 'JII' then '精II' when 'MZ' then '麻醉' else a.yztag end yztagName, -isnull(a.isjf,1) isjf,isnull(a.ispscs,'') ispscs,a.yzh,c.Remark psjgms,c.result psjg,yfztbs,yply,isnull(isnull(yp.lsj,sfxm.dj),0) dj -,isnull(isnull(yp.lsj*sl,sfxm.dj*sl),0) je,sl,case when ztid is not null then '1' else a.Px end Px +isnull(a.isjf,1) isjf,isnull(a.ispscs,'') ispscs,a.yzh,c.Remark psjgms,c.result psjg,yfztbs,yply +,isnull(convert(numeric(18,4),isnull(yp.lsj/bzs,sfxm.dj)),0) dj +,convert(numeric(18,2),isnull(convert(numeric(18,4),yp.lsj/bzs)*sl,sfxm.dj*sl)) je,sl,case when ztid is not null then '1' else a.Px end Px from ( select 'N' iszt,1 num,* from [dbo].[zy_cqyz] a with(nolock) @@ -196,8 +197,10 @@ case when ztid is not null then (case when a.yzzt=3 then '[停]'+a.ztmc else a.z a.zfsj,a.zfysgh,a.zfr ,b.Name Creator,a.zh, case when ztId is not null then yzh else '' end zh1,a.OrganizeId,yzzt,a.yzlx,a.hzxm, a.yztag,case a.yztag when 'JI' then '精I' when 'JII' then '精II' when 'MZ' then '麻醉' else a.yztag end yztagName, -isnull(a.isjf,1) isjf,a.ispscs,a.yzh,c.Remark psjgms,c.result psjg,yfztbs,yply,isnull(isnull(yp.lsj,sfxm.dj),0) dj -,isnull(isnull(yp.lsj*sl,sfxm.dj*sl),0) je,sl,case when ztId is not null then '1' else a.Px end Px +isnull(a.isjf,1) isjf,a.ispscs,a.yzh,c.Remark psjgms,c.result psjg,yfztbs,yply +,isnull(convert(numeric(18,4),isnull(yp.lsj/bzs,sfxm.dj)),0) dj +,case when yzlx='10' then isnull(isnull(yp.lsj*sl*ypjl,sfxm.dj*sl*ypjl),0) else convert(numeric(18,2),isnull(convert(numeric(18,4),yp.lsj/bzs)*sl,sfxm.dj*sl)) end je, +case when yzlx='10' then cast(isnull(ypjl,1) as int)*sl else sl end sl,case when ztId is not null then '1' else a.Px end Px from ( select 'N' iszt,1 num,* from [dbo].[zy_lsyz] a with(nolock) diff --git a/Newtouch.HIS.CIS/Newtouch.DomainServices/Inpatient/WardMaintenanceDmnService.cs b/Newtouch.HIS.CIS/Newtouch.DomainServices/Inpatient/WardMaintenanceDmnService.cs index c1dc7d1e4fc100e176a796c305b2a0cb3165332a..b4edd36c792a6d0f159adcd380c2752d1b08cae6 100644 --- a/Newtouch.HIS.CIS/Newtouch.DomainServices/Inpatient/WardMaintenanceDmnService.cs +++ b/Newtouch.HIS.CIS/Newtouch.DomainServices/Inpatient/WardMaintenanceDmnService.cs @@ -74,6 +74,12 @@ namespace Newtouch.DomainServices.Inpatient var sqlstr3 = sqlstr + " union all " + sqlstr2; return this.FindList(sqlstr3.ToString(), par.ToArray()); } + /// + /// 医嘱发药查询 + /// + /// + /// + /// public IList GetDispensings(Pagination pagination, DispensingMXRequestDto req) { var sqlstr = new StringBuilder(); @@ -82,7 +88,7 @@ namespace Newtouch.DomainServices.Inpatient from [NewtouchHIS_PDS].dbo.zy_ypyzczjl czjl inner join NewtouchHIS_PDS.dbo.zy_ypyzxx yzxx ON czjl.zxId=yzxx.zxId and czjl.yzid=yzxx.yzid AND czjl.ypCode=yzxx.ypCode AND czjl.OrganizeId=yzxx.OrganizeId inner join [NewtouchHIS_Base].dbo.V_S_Sys_Department ks on ks.Code=yzxx.ksCode and ks.OrganizeId=yzxx.OrganizeId -where czjl.createtime>=@kssj and czjl.createtime<=@jssj +where czjl.operateType='1' and czjl.createtime>=@kssj and czjl.createtime<=@jssj and czjl.OrganizeId=@OrganizeId group by czjl.createtime,czjl.creatorcode,ks.Name "); par.Add(new SqlParameter("@OrganizeId", req.OrganizeId)); diff --git a/Newtouch.HIS.CIS/Newtouch.DomainServices/Newtouch.DomainServices.csproj b/Newtouch.HIS.CIS/Newtouch.DomainServices/Newtouch.DomainServices.csproj index 7f2e3821adf4290285f5bdd2ddb080dd54c04296..c9fcda0fb360917e662418c383b75df1cdc32d8d 100644 --- a/Newtouch.HIS.CIS/Newtouch.DomainServices/Newtouch.DomainServices.csproj +++ b/Newtouch.HIS.CIS/Newtouch.DomainServices/Newtouch.DomainServices.csproj @@ -29,6 +29,9 @@ prompt 4 + + bin\9_190\ + ..\..\his-dll-common\hiscommondlls\EntityFramework.dll @@ -104,6 +107,7 @@ + diff --git a/Newtouch.HIS.CIS/Newtouch.DomainServices/Outpatient/ElectronicPrescriptionDmnService.cs b/Newtouch.HIS.CIS/Newtouch.DomainServices/Outpatient/ElectronicPrescriptionDmnService.cs new file mode 100644 index 0000000000000000000000000000000000000000..88c0e5d7dea4d7d4757df009604adaf905c14f51 --- /dev/null +++ b/Newtouch.HIS.CIS/Newtouch.DomainServices/Outpatient/ElectronicPrescriptionDmnService.cs @@ -0,0 +1,54 @@ +using FrameworkBase.MultiOrg.DmnService; +using FrameworkBase.MultiOrg.Infrastructure; +using Newtouch.Core.Common; +using Newtouch.Domain.IDomainServices.Outpatient; +using Newtouch.Domain.ValueObjects.Outpatient; +using System; +using System.Collections.Generic; +using System.Data.Common; +using System.Data.SqlClient; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Newtouch.DomainServices.Outpatient +{ + public class ElectronicPrescriptionDmnService : DmnServiceBase, IElectronicPrescriptionDmnService + { + public ElectronicPrescriptionDmnService(IDefaultDatabaseFactory databaseFactory) : base(databaseFactory) + { + + } + public IList GetGridJson(Pagination pagination, string organizeId,DateTime kssj, DateTime jssj, string xm) + { + var sql = new StringBuilder(@" +select a.*, +case when ysshyj is null then shzt1 when ysshyj='' then shzt1 else '未通过' end shzt +from ( +select +cf.cfId,cf.cfh,jz.mzh,gh.xm,gh.zjlx,gh.zjh,isnull(rxStasName,'无效') shzt1,isnull(rxUsedStasName,'未使用') qyzt,isnull(rxStasName,'未审核') cfzt +,jz.ghksmc ghks,dept.name kdks,jz.ghsj,cf.createtime cfklrq,cf.ysshyj + from dbo.xt_cf cf + --left join dbo.xt_cfmx cfmx on cfmx.cfId=cf.cfId and cfmx.organizeId=cf.organizeId and cfmx.zt=cf.zt + left join [dbo].[xt_jz] jz on cf.jzId=jz.jzId and cf.organizeId=jz.organizeId and cf.zt=jz.zt + left join [NewtouchHIS_Sett].dbo.mz_gh gh on gh.mzh=jz.mzh and gh.organizeId=jz.organizeId and gh.zt=jz.zt + left join [NewtouchHIS_Sett].[dbo].[Dzcf_D003_output] a on a.cfh=cf.cfh and a.OrganizeId=cf.OrganizeId + left join [NewtouchHIS_Base].[dbo].[Sys_Department] dept on dept.code=cf.ks + where cf.zt=1 and isdzcf=1 and cf.organizeId=@OrganizeId and cf.createtime between @kssj and @jssj+' 23:59:59' +"); + if (!string.IsNullOrWhiteSpace(xm)) + { + sql.AppendLine(" and (gh.xm like @xm or gh.mzh like @xm)"); + } + + sql.AppendLine(" ) a"); + var param = new DbParameter[] { + new SqlParameter("@OrganizeId", organizeId), + new SqlParameter("@kssj", kssj), + new SqlParameter("@jssj", jssj), + new SqlParameter("@xm", "%"+xm+"%"), + }; + return QueryWithPage(sql.ToString(), pagination, param); + } + } +} diff --git a/Newtouch.HIS.CIS/Newtouch.DomainServices/Outpatient/MedicalRecordDmnService.cs b/Newtouch.HIS.CIS/Newtouch.DomainServices/Outpatient/MedicalRecordDmnService.cs index 29397fa2aaa168972998ee4f22072f0961ac47dd..b64dab7c6f7e834577912153c8ff980edaf15086 100644 --- a/Newtouch.HIS.CIS/Newtouch.DomainServices/Outpatient/MedicalRecordDmnService.cs +++ b/Newtouch.HIS.CIS/Newtouch.DomainServices/Outpatient/MedicalRecordDmnService.cs @@ -237,16 +237,16 @@ SELECT cf.cfId, cfmx.ypCode,cfmx.ypmc,cfmx.mcjl,cfmx.mcjldw ,cfmx.mcjldw AS mcjldwwwwwww,sfdl.dlCode sfdlCode,sfdl.dlmc sfdlmc ,cfmx.yfCode,cfmx.pcCode,(case when cfmx.sfzt=1 then cfmx.ztsl else cfmx.sl end) sl, cfmx.zh,cf.tieshu,cf.cfyf,cf.djbz, - isnull(CONVERT(DECIMAL(9,4),(isnull(cfmx.sl,0)*(yp.lsj / yp.bzs * yp.mzcls))),0) AS je, --根据最新的dj算出je - isnull(CONVERT(DECIMAL(9,4),yp.lsj / yp.bzs * yp.mzcls,0),0) AS dj, --最新的dj + case isnull(cfyp.dj,'1') when '1' then isnull(CONVERT(DECIMAL(9,4),(isnull(cfmx.sl,0)*(yp.lsj / yp.bzs * yp.mzcls))),0) else isnull(cfmx.sl,0)*isnull(cfyp.dj,0) end AS je, --根据最新的dj算出je + isnull(cfyp.dj,isnull(CONVERT(DECIMAL(9,4),yp.lsj / yp.bzs * yp.mzcls,0),0)) AS dj, --最新的dj pc.yzpcmc AS pcmc, - yp.ypgg, + isnull(yp.ypgg,cfyp.specName) ypgg , yp.mzcls AS cls, yf.yfmc, --开的、算钱的一定是用门诊单位 cfmx.dw 和 yp.mzcldw一样 --中药? cfmx.dw, - yp.jldw AS redundant_jldw, + isnull(yp.jldw,cfyp.minPrepunt) AS redundant_jldw, cf.cfh AS cfh, cfmx.zxks, --执行科室(领药药房代码) cfmx.Remark, --嘱托 @@ -254,12 +254,12 @@ cfmx.ybwym, cfmx.xzsybz, cfmx.cfmxId, cfmx.ts, -yp.jx jxCode, +isnull(case cfyp.listtype when '102' then '43' when '101' then '21' else null end ,yp.jx) jxCode, cfmx.ds, cfmx.zl, cfmx.xmmc, cf.tbz, -cfmx.zzfbz,cfmx.ispsbz,cfmx.islgbz,cfmx.ztId,cfmx.ztmc,cfmx.sfzt +cfmx.zzfbz,cfmx.ispsbz,cfmx.islgbz,cfmx.ztId,cfmx.ztmc,cfmx.sfzt,cfmx.gjybdm FROM xt_cfmx cfmx INNER JOIN xt_cf(nolock) cf ON cf.cfId=cfmx.cfId @@ -270,6 +270,7 @@ LEFT JOIN [NewtouchHIS_Base]..V_S_xt_yzpc(nolock) pc LEFT JOIN [NewtouchHIS_Base]..V_C_xt_yp(nolock) yp ON yp.ypCode=cfmx.ypCode AND yp.OrganizeId=cfmx.OrganizeId +LEFT JOIN [NewtouchHIS_Sett]..Dzcf_CFYP_output cfyp on cfmx.ypcode=cast(cfyp.cfypcode as varchar) and cf.isdzcf='1' --电子处方目录 LEFT JOIN [NewtouchHIS_Base]..V_S_xt_ypyf(nolock) yf ON yf.yfCode=cfmx.yfCode left join [NewtouchHIS_Base]..V_S_xt_sfdl(nolock) sfdl @@ -805,7 +806,8 @@ WHERE cfmx.zt='1' AND cf.zt='1' cftag = cf.cftag, djfs = cf.djfs, djts = cf.djts, - cfzt = cf.cfzt + cfzt = cf.cfzt, + isdzcf = cf.isdzcf }; if (cfzdlist != null) { @@ -875,17 +877,20 @@ WHERE cfmx.zt='1' AND cf.zt='1' #region 发送处方至pds var t = ""; - if (needOutpatientBook) - { - t = SendNewRpToPds(jzObject, cf.cfh, cf.cfId, operatorCode, rpDetail, ypyfList); - } - else if (needOutpatientBookModify) + if (cf.isdzcf != "1")//如果走电子处方,不发送处方到药房 { - t = UpdateRpToPds(jzObject, cf.cfh, cf.cfId, operatorCode, rpDetail, ypyfList); - } - - if (!string.IsNullOrWhiteSpace(t)) throw new FailedException("syncRpToPdsError", t); + if (needOutpatientBook) + { + t = SendNewRpToPds(jzObject, cf.cfh, cf.cfId, operatorCode, rpDetail, ypyfList); + } + else if (needOutpatientBookModify) + { + t = UpdateRpToPds(jzObject, cf.cfh, cf.cfId, operatorCode, rpDetail, ypyfList); + } + if (!string.IsNullOrWhiteSpace(t)) throw new FailedException("syncRpToPdsError", t); + } + #endregion } } @@ -1115,6 +1120,10 @@ where zyzd.zdlx = 1 and jzId = @jzId and zyzd.zt = '1'", new[] { new SqlParamete case (int)EnumCflx.WMPres: case (int)EnumCflx.TCMPres: { + if (cf.isdzcf != null && cf.isdzcf == "1") + { + break; + } if (cf.djbz ?? false) { var dto1 = new PrescriptionAPIDto diff --git a/Newtouch.HIS.CIS/Newtouch.DomainServices/Outpatient/PrescriptionDmnService.cs b/Newtouch.HIS.CIS/Newtouch.DomainServices/Outpatient/PrescriptionDmnService.cs index 9755a22092e95ddd20a67e4e7a0831e7f140fc66..994f6b738e9c9bedcffbd44e51d9b10644bbe854 100644 --- a/Newtouch.HIS.CIS/Newtouch.DomainServices/Outpatient/PrescriptionDmnService.cs +++ b/Newtouch.HIS.CIS/Newtouch.DomainServices/Outpatient/PrescriptionDmnService.cs @@ -6,6 +6,7 @@ using Newtouch.Infrastructure; using System.Collections.Generic; using System.Data.SqlClient; using System.Linq; +using System.Text; namespace Newtouch.DomainServices { @@ -265,5 +266,21 @@ WHERE 1=1"; return 1; } - } + /// + /// 医保电子处方 + /// + /// + /// + /// + public List getdzcfnrxs(string cfh, string orgId) + { + var sqlpar = new List(); + var par = new StringBuilder(); + par.Append(@"select top 1 mzh from [NewtouchHIS_Sett]..Dzcf_D003_output where cfh=@cfh and OrganizeId=@orgId and zt='1'"); + sqlpar.Add(new SqlParameter("@cfh", cfh)); + sqlpar.Add(new SqlParameter("@orgId", orgId)); + var resultList = this.FindList(par.ToString(), sqlpar.ToArray()); + return resultList; + } + } } diff --git a/Newtouch.HIS.CIS/Newtouch.HIS.CIS.sln b/Newtouch.HIS.CIS/Newtouch.HIS.CIS.sln index 2af2a9b5e1f34be7dd3f3b03df5edf88423ff16e..1462b402b57a48b77ea6757336b941c476a0c97f 100644 --- a/Newtouch.HIS.CIS/Newtouch.HIS.CIS.sln +++ b/Newtouch.HIS.CIS/Newtouch.HIS.CIS.sln @@ -37,75 +37,75 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Newtouch.CIS.UnitTestProjec EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution + 9_190|Any CPU = 9_190|Any CPU Debug|Any CPU = Debug|Any CPU - DebugLocal|Any CPU = DebugLocal|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution + {92E9B0B9-8543-4711-8C4C-924E19CFBFAF}.9_190|Any CPU.ActiveCfg = 9_190|Any CPU + {92E9B0B9-8543-4711-8C4C-924E19CFBFAF}.9_190|Any CPU.Build.0 = 9_190|Any CPU {92E9B0B9-8543-4711-8C4C-924E19CFBFAF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {92E9B0B9-8543-4711-8C4C-924E19CFBFAF}.Debug|Any CPU.Build.0 = Debug|Any CPU - {92E9B0B9-8543-4711-8C4C-924E19CFBFAF}.DebugLocal|Any CPU.ActiveCfg = Debug|Any CPU - {92E9B0B9-8543-4711-8C4C-924E19CFBFAF}.DebugLocal|Any CPU.Build.0 = Debug|Any CPU {92E9B0B9-8543-4711-8C4C-924E19CFBFAF}.Release|Any CPU.ActiveCfg = Release|Any CPU {92E9B0B9-8543-4711-8C4C-924E19CFBFAF}.Release|Any CPU.Build.0 = Release|Any CPU + {77FCEE9A-4E4B-48CE-B06B-888FA30F6027}.9_190|Any CPU.ActiveCfg = 9_190|Any CPU + {77FCEE9A-4E4B-48CE-B06B-888FA30F6027}.9_190|Any CPU.Build.0 = 9_190|Any CPU {77FCEE9A-4E4B-48CE-B06B-888FA30F6027}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {77FCEE9A-4E4B-48CE-B06B-888FA30F6027}.Debug|Any CPU.Build.0 = Debug|Any CPU - {77FCEE9A-4E4B-48CE-B06B-888FA30F6027}.DebugLocal|Any CPU.ActiveCfg = Debug|Any CPU - {77FCEE9A-4E4B-48CE-B06B-888FA30F6027}.DebugLocal|Any CPU.Build.0 = Debug|Any CPU {77FCEE9A-4E4B-48CE-B06B-888FA30F6027}.Release|Any CPU.ActiveCfg = Release|Any CPU {77FCEE9A-4E4B-48CE-B06B-888FA30F6027}.Release|Any CPU.Build.0 = Release|Any CPU + {8B0D33A9-A52D-4596-8D7B-6B94EC31AB54}.9_190|Any CPU.ActiveCfg = 9_190|Any CPU + {8B0D33A9-A52D-4596-8D7B-6B94EC31AB54}.9_190|Any CPU.Build.0 = 9_190|Any CPU {8B0D33A9-A52D-4596-8D7B-6B94EC31AB54}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8B0D33A9-A52D-4596-8D7B-6B94EC31AB54}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8B0D33A9-A52D-4596-8D7B-6B94EC31AB54}.DebugLocal|Any CPU.ActiveCfg = Debug|Any CPU - {8B0D33A9-A52D-4596-8D7B-6B94EC31AB54}.DebugLocal|Any CPU.Build.0 = Debug|Any CPU {8B0D33A9-A52D-4596-8D7B-6B94EC31AB54}.Release|Any CPU.ActiveCfg = Release|Any CPU {8B0D33A9-A52D-4596-8D7B-6B94EC31AB54}.Release|Any CPU.Build.0 = Release|Any CPU + {BD86828D-F0D6-4742-8AE3-9FD3CB137362}.9_190|Any CPU.ActiveCfg = 9_190|Any CPU + {BD86828D-F0D6-4742-8AE3-9FD3CB137362}.9_190|Any CPU.Build.0 = 9_190|Any CPU {BD86828D-F0D6-4742-8AE3-9FD3CB137362}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {BD86828D-F0D6-4742-8AE3-9FD3CB137362}.Debug|Any CPU.Build.0 = Debug|Any CPU - {BD86828D-F0D6-4742-8AE3-9FD3CB137362}.DebugLocal|Any CPU.ActiveCfg = Debug|Any CPU - {BD86828D-F0D6-4742-8AE3-9FD3CB137362}.DebugLocal|Any CPU.Build.0 = Debug|Any CPU {BD86828D-F0D6-4742-8AE3-9FD3CB137362}.Release|Any CPU.ActiveCfg = Release|Any CPU {BD86828D-F0D6-4742-8AE3-9FD3CB137362}.Release|Any CPU.Build.0 = Release|Any CPU + {B9E82BA4-1DFA-4172-BCBC-FA589E9297E1}.9_190|Any CPU.ActiveCfg = 9_190|Any CPU + {B9E82BA4-1DFA-4172-BCBC-FA589E9297E1}.9_190|Any CPU.Build.0 = 9_190|Any CPU {B9E82BA4-1DFA-4172-BCBC-FA589E9297E1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {B9E82BA4-1DFA-4172-BCBC-FA589E9297E1}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B9E82BA4-1DFA-4172-BCBC-FA589E9297E1}.DebugLocal|Any CPU.ActiveCfg = Debug|Any CPU - {B9E82BA4-1DFA-4172-BCBC-FA589E9297E1}.DebugLocal|Any CPU.Build.0 = Debug|Any CPU {B9E82BA4-1DFA-4172-BCBC-FA589E9297E1}.Release|Any CPU.ActiveCfg = Release|Any CPU {B9E82BA4-1DFA-4172-BCBC-FA589E9297E1}.Release|Any CPU.Build.0 = Release|Any CPU + {94134A88-2DC3-4BD8-92BC-C32C5F6F2AAD}.9_190|Any CPU.ActiveCfg = 9_190|Any CPU + {94134A88-2DC3-4BD8-92BC-C32C5F6F2AAD}.9_190|Any CPU.Build.0 = 9_190|Any CPU {94134A88-2DC3-4BD8-92BC-C32C5F6F2AAD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {94134A88-2DC3-4BD8-92BC-C32C5F6F2AAD}.Debug|Any CPU.Build.0 = Debug|Any CPU - {94134A88-2DC3-4BD8-92BC-C32C5F6F2AAD}.DebugLocal|Any CPU.ActiveCfg = Debug|Any CPU - {94134A88-2DC3-4BD8-92BC-C32C5F6F2AAD}.DebugLocal|Any CPU.Build.0 = Debug|Any CPU {94134A88-2DC3-4BD8-92BC-C32C5F6F2AAD}.Release|Any CPU.ActiveCfg = Release|Any CPU {94134A88-2DC3-4BD8-92BC-C32C5F6F2AAD}.Release|Any CPU.Build.0 = Release|Any CPU + {D1701DC6-A8E4-4418-BEBF-4437A3C247BF}.9_190|Any CPU.ActiveCfg = 9_190|Any CPU + {D1701DC6-A8E4-4418-BEBF-4437A3C247BF}.9_190|Any CPU.Build.0 = 9_190|Any CPU {D1701DC6-A8E4-4418-BEBF-4437A3C247BF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {D1701DC6-A8E4-4418-BEBF-4437A3C247BF}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D1701DC6-A8E4-4418-BEBF-4437A3C247BF}.DebugLocal|Any CPU.ActiveCfg = Debug|Any CPU - {D1701DC6-A8E4-4418-BEBF-4437A3C247BF}.DebugLocal|Any CPU.Build.0 = Debug|Any CPU {D1701DC6-A8E4-4418-BEBF-4437A3C247BF}.Release|Any CPU.ActiveCfg = Release|Any CPU {D1701DC6-A8E4-4418-BEBF-4437A3C247BF}.Release|Any CPU.Build.0 = Release|Any CPU + {0A01F35D-D960-4BA1-92E5-C4A8D92FC492}.9_190|Any CPU.ActiveCfg = 9_190|Any CPU + {0A01F35D-D960-4BA1-92E5-C4A8D92FC492}.9_190|Any CPU.Build.0 = 9_190|Any CPU {0A01F35D-D960-4BA1-92E5-C4A8D92FC492}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {0A01F35D-D960-4BA1-92E5-C4A8D92FC492}.Debug|Any CPU.Build.0 = Debug|Any CPU - {0A01F35D-D960-4BA1-92E5-C4A8D92FC492}.DebugLocal|Any CPU.ActiveCfg = Debug|Any CPU - {0A01F35D-D960-4BA1-92E5-C4A8D92FC492}.DebugLocal|Any CPU.Build.0 = Debug|Any CPU {0A01F35D-D960-4BA1-92E5-C4A8D92FC492}.Release|Any CPU.ActiveCfg = Release|Any CPU {0A01F35D-D960-4BA1-92E5-C4A8D92FC492}.Release|Any CPU.Build.0 = Release|Any CPU + {8DEFE379-2B48-4CC8-B0DC-6DAF83B165FF}.9_190|Any CPU.ActiveCfg = 9_190|Any CPU + {8DEFE379-2B48-4CC8-B0DC-6DAF83B165FF}.9_190|Any CPU.Build.0 = 9_190|Any CPU {8DEFE379-2B48-4CC8-B0DC-6DAF83B165FF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8DEFE379-2B48-4CC8-B0DC-6DAF83B165FF}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8DEFE379-2B48-4CC8-B0DC-6DAF83B165FF}.DebugLocal|Any CPU.ActiveCfg = Debug|Any CPU - {8DEFE379-2B48-4CC8-B0DC-6DAF83B165FF}.DebugLocal|Any CPU.Build.0 = Debug|Any CPU {8DEFE379-2B48-4CC8-B0DC-6DAF83B165FF}.Release|Any CPU.ActiveCfg = Release|Any CPU {8DEFE379-2B48-4CC8-B0DC-6DAF83B165FF}.Release|Any CPU.Build.0 = Release|Any CPU + {CEA2FA20-0AF3-4972-B9CA-78FCD9C1AB00}.9_190|Any CPU.ActiveCfg = 9_190|Any CPU + {CEA2FA20-0AF3-4972-B9CA-78FCD9C1AB00}.9_190|Any CPU.Build.0 = 9_190|Any CPU {CEA2FA20-0AF3-4972-B9CA-78FCD9C1AB00}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {CEA2FA20-0AF3-4972-B9CA-78FCD9C1AB00}.Debug|Any CPU.Build.0 = Debug|Any CPU - {CEA2FA20-0AF3-4972-B9CA-78FCD9C1AB00}.DebugLocal|Any CPU.ActiveCfg = Debug|Any CPU - {CEA2FA20-0AF3-4972-B9CA-78FCD9C1AB00}.DebugLocal|Any CPU.Build.0 = Debug|Any CPU {CEA2FA20-0AF3-4972-B9CA-78FCD9C1AB00}.Release|Any CPU.ActiveCfg = Release|Any CPU {CEA2FA20-0AF3-4972-B9CA-78FCD9C1AB00}.Release|Any CPU.Build.0 = Release|Any CPU + {B0AECA53-1C5C-425F-886C-BF6DA5284501}.9_190|Any CPU.ActiveCfg = 9_190|Any CPU + {B0AECA53-1C5C-425F-886C-BF6DA5284501}.9_190|Any CPU.Build.0 = 9_190|Any CPU {B0AECA53-1C5C-425F-886C-BF6DA5284501}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {B0AECA53-1C5C-425F-886C-BF6DA5284501}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B0AECA53-1C5C-425F-886C-BF6DA5284501}.DebugLocal|Any CPU.ActiveCfg = Debug|Any CPU - {B0AECA53-1C5C-425F-886C-BF6DA5284501}.DebugLocal|Any CPU.Build.0 = Debug|Any CPU {B0AECA53-1C5C-425F-886C-BF6DA5284501}.Release|Any CPU.ActiveCfg = Release|Any CPU {B0AECA53-1C5C-425F-886C-BF6DA5284501}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection diff --git a/Newtouch.HIS.CIS/Newtouch.Infrastructure/EnumDB.cs b/Newtouch.HIS.CIS/Newtouch.Infrastructure/EnumDB.cs index 9bf836865e6e86ab487c21a4405c216e2853e47b..4bf725f2c6d4594fa022d9b44b7be959d74c34b8 100644 --- a/Newtouch.HIS.CIS/Newtouch.Infrastructure/EnumDB.cs +++ b/Newtouch.HIS.CIS/Newtouch.Infrastructure/EnumDB.cs @@ -192,7 +192,12 @@ namespace Newtouch.Infrastructure /// 儿童两病门诊 /// [Description("儿童两病门诊")] - etlbmz = 11 + etlbmz = 11, + /// + /// 简易门诊 + /// + [Description("简易门诊")] + jymz = 12 } /// diff --git a/Newtouch.HIS.CIS/Newtouch.Infrastructure/Newtouch.Infrastructure.csproj b/Newtouch.HIS.CIS/Newtouch.Infrastructure/Newtouch.Infrastructure.csproj index 3869a860b3837f9bccdd258a506b4b20e447f9f3..7bcbbd6883d24b2e25993334d947b2ad98f5caee 100644 --- a/Newtouch.HIS.CIS/Newtouch.Infrastructure/Newtouch.Infrastructure.csproj +++ b/Newtouch.HIS.CIS/Newtouch.Infrastructure/Newtouch.Infrastructure.csproj @@ -29,6 +29,9 @@ prompt 4 + + bin\9_190\ + ..\..\his-dll-common\hiscommondlls\EntityFramework.dll diff --git a/Newtouch.HIS.CIS/Newtouch.Repository/Newtouch.Repository.csproj b/Newtouch.HIS.CIS/Newtouch.Repository/Newtouch.Repository.csproj index de62bbff1027eebf3f5a43278b1dc48bb63a0f90..1ce77a1fab17d6af6cb300d1aca8c031779db145 100644 --- a/Newtouch.HIS.CIS/Newtouch.Repository/Newtouch.Repository.csproj +++ b/Newtouch.HIS.CIS/Newtouch.Repository/Newtouch.Repository.csproj @@ -29,6 +29,9 @@ prompt 4 + + bin\9_190\ + ..\..\his-dll-common\hiscommondlls\EntityFramework.dll diff --git a/Newtouch.HIS.CIS/NewtouchActiveX/NewtouchActiveX.csproj b/Newtouch.HIS.CIS/NewtouchActiveX/NewtouchActiveX.csproj index db459897405ea5d0c7becf4e2337d970bbd457f0..b5ce78c517c84e9ee302685d521c4fc7d4a4a391 100644 --- a/Newtouch.HIS.CIS/NewtouchActiveX/NewtouchActiveX.csproj +++ b/Newtouch.HIS.CIS/NewtouchActiveX/NewtouchActiveX.csproj @@ -30,6 +30,9 @@ prompt 4 + + bin\9_190\ + diff --git a/Newtouch.HIS.CIS/NewtouchCIS.API/NewtouchCIS.API.csproj b/Newtouch.HIS.CIS/NewtouchCIS.API/NewtouchCIS.API.csproj index 2fd0bc2e0f080dae150797932aefd170a948a55f..86fb67ba89e235e3566781134d187af3bc71148f 100644 --- a/Newtouch.HIS.CIS/NewtouchCIS.API/NewtouchCIS.API.csproj +++ b/Newtouch.HIS.CIS/NewtouchCIS.API/NewtouchCIS.API.csproj @@ -111,6 +111,15 @@ False ..\..\his-dll-common\dlls\Newtouch.Tools.dll + + ..\..\his-dll-common\dlls\StackExchange.Redis.dll + + + ..\..\his-dll-common\dlls\StackExchange.Redis.Extensions.Core.dll + + + ..\..\his-dll-common\dlls\StackExchange.Redis.Extensions.MsgPack.dll + ..\packages\Microsoft.AspNet.WebApi.Client.5.2.7\lib\net45\System.Net.Http.Formatting.dll @@ -256,6 +265,9 @@ 10.0 $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + + bin\ + diff --git a/Newtouch.HIS.CIS/NewtouchCIS.API/Properties/PublishProfiles/PublishProfile.pubxml b/Newtouch.HIS.CIS/NewtouchCIS.API/Properties/PublishProfiles/PublishProfile.pubxml new file mode 100644 index 0000000000000000000000000000000000000000..4459caaa5abff46ee8957042b8f0cced03bb083b --- /dev/null +++ b/Newtouch.HIS.CIS/NewtouchCIS.API/Properties/PublishProfiles/PublishProfile.pubxml @@ -0,0 +1,18 @@ + + + + + true + false + true + Release + Any CPU + FileSystem + ..\..\publish\CISAPI + FileSystem + <_TargetId>Folder + + + \ No newline at end of file diff --git a/Newtouch.HIS.EMR/Newtouch.EMR.Web/Configs/database.config b/Newtouch.HIS.EMR/Newtouch.EMR.Web/Configs/database.config index dad0a6d7f62d2408dfe4d32b705e318ab21bf911..6eb4cd69b12e1b7e5e94102cc9eefe08674fa1e9 100644 --- a/Newtouch.HIS.EMR/Newtouch.EMR.Web/Configs/database.config +++ b/Newtouch.HIS.EMR/Newtouch.EMR.Web/Configs/database.config @@ -1,11 +1,10 @@  - - + + - - - + + \ No newline at end of file diff --git a/Newtouch.HIS.EMR/Newtouch.EMR.Web/Configs/system.config b/Newtouch.HIS.EMR/Newtouch.EMR.Web/Configs/system.config index bf6b57bddf6e940638674395bfd7492f07f52b70..0121adc6d36f9884d24b75363406819781ec0908 100644 --- a/Newtouch.HIS.EMR/Newtouch.EMR.Web/Configs/system.config +++ b/Newtouch.HIS.EMR/Newtouch.EMR.Web/Configs/system.config @@ -1,81 +1,77 @@  - - - + + + - - - - - - - - - - - - + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + - + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/newFile.xml b/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/newFile.xml index a9c72f043ebe8dec9ba6edc6cfc3a325c7454253..f4b979b9d29a627c8ae06bea34d29191ccad26b3 100644 --- a/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/newFile.xml +++ b/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/newFile.xml @@ -22,7 +22,7 @@ - 秦皇岛经济技术开发区泰盛健瑞仕社区卫生服务中心 + 新致开源医疗医院 diff --git "a/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/\344\275\217\351\231\242\346\226\207\344\271\246/\345\205\245\351\231\242\350\256\260\345\275\225-\347\251\272\346\250\241\347\211\210.xml" "b/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/\344\275\217\351\231\242\346\226\207\344\271\246/\345\205\245\351\231\242\350\256\260\345\275\225-\347\251\272\346\250\241\347\211\210.xml" index d16a8f0e1d22a4b23910f7f24a0275ae787a8815..db67ee6d4a43f8f1a2ea0bf05287e697e0bf20a9 100644 --- "a/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/\344\275\217\351\231\242\346\226\207\344\271\246/\345\205\245\351\231\242\350\256\260\345\275\225-\347\251\272\346\250\241\347\211\210.xml" +++ "b/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/\344\275\217\351\231\242\346\226\207\344\271\246/\345\205\245\351\231\242\350\256\260\345\275\225-\347\251\272\346\250\241\347\211\210.xml" @@ -52,7 +52,7 @@ - 乌 兰 察 布 市 德 佑  + 新致开源医疗 diff --git "a/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/\344\275\217\351\231\242\346\226\207\344\271\246/\345\205\245\351\231\242\350\256\260\345\275\225.xml" "b/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/\344\275\217\351\231\242\346\226\207\344\271\246/\345\205\245\351\231\242\350\256\260\345\275\225.xml" index 1ddabbedbf3c0697ddd8e3ccd1e28bb9387d5a80..e354e40fc1dfe4bffd2aad3922841fd8554d7d9f 100644 --- "a/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/\344\275\217\351\231\242\346\226\207\344\271\246/\345\205\245\351\231\242\350\256\260\345\275\225.xml" +++ "b/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/\344\275\217\351\231\242\346\226\207\344\271\246/\345\205\245\351\231\242\350\256\260\345\275\225.xml" @@ -52,11 +52,11 @@ - 乌 兰 察 布 市 德 佑  + 新致开源医疗 - 医 院 + 医院 diff --git "a/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/\344\275\217\351\231\242\346\226\207\344\271\246/\345\207\272\351\231\242\350\256\260\345\275\225-\347\251\272\346\250\241\346\235\277.xml" "b/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/\344\275\217\351\231\242\346\226\207\344\271\246/\345\207\272\351\231\242\350\256\260\345\275\225-\347\251\272\346\250\241\346\235\277.xml" index 00a50b9ad9ad71dd4ad5f033a818e42b3081277f..b280b193958cf6fd679ebb448cb1ee9a4dbf1705 100644 --- "a/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/\344\275\217\351\231\242\346\226\207\344\271\246/\345\207\272\351\231\242\350\256\260\345\275\225-\347\251\272\346\250\241\346\235\277.xml" +++ "b/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/\344\275\217\351\231\242\346\226\207\344\271\246/\345\207\272\351\231\242\350\256\260\345\275\225-\347\251\272\346\250\241\346\235\277.xml" @@ -52,7 +52,7 @@ - 乌 兰 察 布 市 德 佑 医 院 + 新 致 开 源 医 疗 医 院 diff --git "a/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/\344\275\217\351\231\242\346\226\207\344\271\246/\345\207\272\351\231\242\350\256\260\345\275\225.xml" "b/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/\344\275\217\351\231\242\346\226\207\344\271\246/\345\207\272\351\231\242\350\256\260\345\275\225.xml" index 75c021f879fbd8099288a4078ac0f819e3150139..b841d908efb2a92a2b431e776b98fe0a7d34f09e 100644 --- "a/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/\344\275\217\351\231\242\346\226\207\344\271\246/\345\207\272\351\231\242\350\256\260\345\275\225.xml" +++ "b/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/\344\275\217\351\231\242\346\226\207\344\271\246/\345\207\272\351\231\242\350\256\260\345\275\225.xml" @@ -52,7 +52,7 @@ - 乌 兰 察 布 市 德 佑 医 院 + 新 致 开 源 医 疗 医 院 diff --git "a/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/\344\275\217\351\231\242\346\226\207\344\271\246/\345\214\273\347\226\227\346\226\207\344\271\246/\344\275\217\351\231\242\347\227\205\344\272\272\351\241\273\347\237\245.xml" "b/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/\344\275\217\351\231\242\346\226\207\344\271\246/\345\214\273\347\226\227\346\226\207\344\271\246/\344\275\217\351\231\242\347\227\205\344\272\272\351\241\273\347\237\245.xml" index c3d65f5655b0ac687d882d6466368cf1cecb12bb..44089b7a2a174370083ef6398dae7f66e02cda0e 100644 --- "a/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/\344\275\217\351\231\242\346\226\207\344\271\246/\345\214\273\347\226\227\346\226\207\344\271\246/\344\275\217\351\231\242\347\227\205\344\272\272\351\241\273\347\237\245.xml" +++ "b/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/\344\275\217\351\231\242\346\226\207\344\271\246/\345\214\273\347\226\227\346\226\207\344\271\246/\344\275\217\351\231\242\347\227\205\344\272\272\351\241\273\347\237\245.xml" @@ -52,7 +52,7 @@ - 乌兰察布市德祐医院 + 新致开源医疗医院 diff --git "a/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/\344\275\217\351\231\242\346\226\207\344\271\246/\345\214\273\347\226\227\346\226\207\344\271\246/\346\202\243\350\200\205\347\237\245\346\203\205\345\220\214\346\204\217\345\276\201\346\261\202\346\204\217\350\247\201\344\271\246.xml" "b/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/\344\275\217\351\231\242\346\226\207\344\271\246/\345\214\273\347\226\227\346\226\207\344\271\246/\346\202\243\350\200\205\347\237\245\346\203\205\345\220\214\346\204\217\345\276\201\346\261\202\346\204\217\350\247\201\344\271\246.xml" index 57b31d5c7c1f09325f11424f0e3ce8933ed0a021..04d85c112f8535db744a5f8d7a8e406bfb46ce84 100644 --- "a/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/\344\275\217\351\231\242\346\226\207\344\271\246/\345\214\273\347\226\227\346\226\207\344\271\246/\346\202\243\350\200\205\347\237\245\346\203\205\345\220\214\346\204\217\345\276\201\346\261\202\346\204\217\350\247\201\344\271\246.xml" +++ "b/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/\344\275\217\351\231\242\346\226\207\344\271\246/\345\214\273\347\226\227\346\226\207\344\271\246/\346\202\243\350\200\205\347\237\245\346\203\205\345\220\214\346\204\217\345\276\201\346\261\202\346\204\217\350\247\201\344\271\246.xml" @@ -52,11 +52,11 @@ - 乌兰察布市 + 上海市 - 德佑医院 + 新致开源医疗医院 diff --git "a/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/\344\275\217\351\231\242\346\226\207\344\271\246/\345\214\273\347\226\227\346\226\207\344\271\246/\347\226\276\347\227\205\350\257\201\346\230\216.xml" "b/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/\344\275\217\351\231\242\346\226\207\344\271\246/\345\214\273\347\226\227\346\226\207\344\271\246/\347\226\276\347\227\205\350\257\201\346\230\216.xml" index d85059cb1c37a68a01b6f185ef19e0df1f1aa115..444e2c16a53eaf5878509dcadb44993b9790f67a 100644 --- "a/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/\344\275\217\351\231\242\346\226\207\344\271\246/\345\214\273\347\226\227\346\226\207\344\271\246/\347\226\276\347\227\205\350\257\201\346\230\216.xml" +++ "b/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/\344\275\217\351\231\242\346\226\207\344\271\246/\345\214\273\347\226\227\346\226\207\344\271\246/\347\226\276\347\227\205\350\257\201\346\230\216.xml" @@ -52,7 +52,7 @@ - 乌兰察布市德佑医院 + 新致开源医疗医院 diff --git "a/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/\344\275\217\351\231\242\346\226\207\344\271\246/\345\214\273\347\226\227\346\226\207\344\271\246/\351\235\236\350\215\257\347\211\251\346\262\273\347\226\227\346\211\247\350\241\214\345\215\225.xml" "b/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/\344\275\217\351\231\242\346\226\207\344\271\246/\345\214\273\347\226\227\346\226\207\344\271\246/\351\235\236\350\215\257\347\211\251\346\262\273\347\226\227\346\211\247\350\241\214\345\215\225.xml" index be459f8ea31b3424bab731f8211d3bda2638dbe1..8bb285974ff5cba4894a7ab9837c7c711457ffa3 100644 --- "a/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/\344\275\217\351\231\242\346\226\207\344\271\246/\345\214\273\347\226\227\346\226\207\344\271\246/\351\235\236\350\215\257\347\211\251\346\262\273\347\226\227\346\211\247\350\241\214\345\215\225.xml" +++ "b/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/\344\275\217\351\231\242\346\226\207\344\271\246/\345\214\273\347\226\227\346\226\207\344\271\246/\351\235\236\350\215\257\347\211\251\346\262\273\347\226\227\346\211\247\350\241\214\345\215\225.xml" @@ -52,7 +52,7 @@ - 乌兰察布市德祐医院 + 新致开源医疗医院 diff --git "a/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/\344\275\217\351\231\242\346\226\207\344\271\246/\346\202\243\350\200\205\347\237\245\346\203\205\345\220\214\346\204\217\345\276\201\346\261\202\346\204\217\350\247\201\344\271\246.xml" "b/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/\344\275\217\351\231\242\346\226\207\344\271\246/\346\202\243\350\200\205\347\237\245\346\203\205\345\220\214\346\204\217\345\276\201\346\261\202\346\204\217\350\247\201\344\271\246.xml" index 8d26231bf0d14a7cff400c6a9fa37f495ee7d4c4..6ee577b409acfcfb181a35f75839ab17d109e6c9 100644 --- "a/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/\344\275\217\351\231\242\346\226\207\344\271\246/\346\202\243\350\200\205\347\237\245\346\203\205\345\220\214\346\204\217\345\276\201\346\261\202\346\204\217\350\247\201\344\271\246.xml" +++ "b/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/\344\275\217\351\231\242\346\226\207\344\271\246/\346\202\243\350\200\205\347\237\245\346\203\205\345\220\214\346\204\217\345\276\201\346\261\202\346\204\217\350\247\201\344\271\246.xml" @@ -52,11 +52,11 @@ - 乌兰察布市 + 上海市 - 德佑医院 + 新致开源医疗医院 diff --git "a/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/\344\275\217\351\231\242\346\226\207\344\271\246/\346\227\245\345\270\270\347\227\205\347\250\213\350\256\260\345\275\225.xml" "b/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/\344\275\217\351\231\242\346\226\207\344\271\246/\346\227\245\345\270\270\347\227\205\347\250\213\350\256\260\345\275\225.xml" index 27983a9dc1230113822226c72dc7aefb1e4f8e66..f076fbc34b5218b72ec28df435adaad405e52db0 100644 --- "a/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/\344\275\217\351\231\242\346\226\207\344\271\246/\346\227\245\345\270\270\347\227\205\347\250\213\350\256\260\345\275\225.xml" +++ "b/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/\344\275\217\351\231\242\346\226\207\344\271\246/\346\227\245\345\270\270\347\227\205\347\250\213\350\256\260\345\275\225.xml" @@ -52,7 +52,7 @@ - 乌 兰 察 布 市 德 佑 医 院 + 新 致 开 源 医 疗 医 院 diff --git "a/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/\344\275\217\351\231\242\346\226\207\344\271\246/\346\237\245\346\210\277\350\256\260\345\275\225.xml" "b/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/\344\275\217\351\231\242\346\226\207\344\271\246/\346\237\245\346\210\277\350\256\260\345\275\225.xml" index 5ae5dd003891ad25ec8e6bb447e0edb48740e0bb..19d7753da0cf8aa1f67e948f7f8500447993d498 100644 --- "a/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/\344\275\217\351\231\242\346\226\207\344\271\246/\346\237\245\346\210\277\350\256\260\345\275\225.xml" +++ "b/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/\344\275\217\351\231\242\346\226\207\344\271\246/\346\237\245\346\210\277\350\256\260\345\275\225.xml" @@ -6,7 +6,7 @@ 2254 - 隆  安  县  城 镇 卫 生  院 + 新致开源医疗医院 42 diff --git "a/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/\344\275\217\351\231\242\346\226\207\344\271\246/\346\265\213\350\257\2252.xml" "b/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/\344\275\217\351\231\242\346\226\207\344\271\246/\346\265\213\350\257\2252.xml" deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git "a/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/\344\275\217\351\231\242\346\226\207\344\271\246/\347\226\276\347\227\205\350\257\201\346\230\216.xml" "b/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/\344\275\217\351\231\242\346\226\207\344\271\246/\347\226\276\347\227\205\350\257\201\346\230\216.xml" index d85059cb1c37a68a01b6f185ef19e0df1f1aa115..444e2c16a53eaf5878509dcadb44993b9790f67a 100644 --- "a/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/\344\275\217\351\231\242\346\226\207\344\271\246/\347\226\276\347\227\205\350\257\201\346\230\216.xml" +++ "b/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/\344\275\217\351\231\242\346\226\207\344\271\246/\347\226\276\347\227\205\350\257\201\346\230\216.xml" @@ -52,7 +52,7 @@ - 乌兰察布市德佑医院 + 新致开源医疗医院 diff --git "a/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/\344\275\217\351\231\242\346\226\207\344\271\246/\347\227\205\347\250\213\350\256\260\345\275\225.xml" "b/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/\344\275\217\351\231\242\346\226\207\344\271\246/\347\227\205\347\250\213\350\256\260\345\275\225.xml" index 9e7ae234bcf6065907f9f02bb1b9628a3e21f41b..605c1a401fb225c1ee3beb2a43fdd976d6141f98 100644 --- "a/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/\344\275\217\351\231\242\346\226\207\344\271\246/\347\227\205\347\250\213\350\256\260\345\275\225.xml" +++ "b/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/\344\275\217\351\231\242\346\226\207\344\271\246/\347\227\205\347\250\213\350\256\260\345\275\225.xml" @@ -6,7 +6,7 @@ 1989 - 隆安县城厢镇卫生院 + 新致开源医疗医院 32 diff --git "a/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/\344\275\217\351\231\242\346\226\207\344\271\246/\351\235\236\350\215\257\347\211\251\346\262\273\347\226\227\346\211\247\350\241\214\345\215\225.xml" "b/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/\344\275\217\351\231\242\346\226\207\344\271\246/\351\235\236\350\215\257\347\211\251\346\262\273\347\226\227\346\211\247\350\241\214\345\215\225.xml" index be459f8ea31b3424bab731f8211d3bda2638dbe1..8bb285974ff5cba4894a7ab9837c7c711457ffa3 100644 --- "a/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/\344\275\217\351\231\242\346\226\207\344\271\246/\351\235\236\350\215\257\347\211\251\346\262\273\347\226\227\346\211\247\350\241\214\345\215\225.xml" +++ "b/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/\344\275\217\351\231\242\346\226\207\344\271\246/\351\235\236\350\215\257\347\211\251\346\262\273\347\226\227\346\211\247\350\241\214\345\215\225.xml" @@ -52,7 +52,7 @@ - 乌兰察布市德祐医院 + 新致开源医疗医院 diff --git "a/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/\344\275\217\351\231\242\346\226\207\344\271\246/\351\246\226\346\254\241\347\227\205\347\250\213\350\256\260\345\275\225.xml" "b/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/\344\275\217\351\231\242\346\226\207\344\271\246/\351\246\226\346\254\241\347\227\205\347\250\213\350\256\260\345\275\225.xml" index 54dd36a5714cc76233b076bafc79df04c36425fc..f3a6f1d9f6a701b9cb046a41fb655d1a06e12db2 100644 --- "a/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/\344\275\217\351\231\242\346\226\207\344\271\246/\351\246\226\346\254\241\347\227\205\347\250\213\350\256\260\345\275\225.xml" +++ "b/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/\344\275\217\351\231\242\346\226\207\344\271\246/\351\246\226\346\254\241\347\227\205\347\250\213\350\256\260\345\275\225.xml" @@ -6,7 +6,7 @@ 2612 - 隆  安  县  城 镇 卫 生  院 + 新致开源医疗医院 42 diff --git "a/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/\344\275\217\351\231\242\346\226\207\344\271\246/\351\246\226\347\250\213+\346\227\245\345\270\270\347\227\205\347\250\213\350\256\260\345\275\225.xml" "b/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/\344\275\217\351\231\242\346\226\207\344\271\246/\351\246\226\347\250\213+\346\227\245\345\270\270\347\227\205\347\250\213\350\256\260\345\275\225.xml" index 14d965fa82565e24f1ba853a6d9dcbccc46a9d97..e1a5d3722f6a35ca10b7594c8a6e984f334e41fb 100644 --- "a/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/\344\275\217\351\231\242\346\226\207\344\271\246/\351\246\226\347\250\213+\346\227\245\345\270\270\347\227\205\347\250\213\350\256\260\345\275\225.xml" +++ "b/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/\344\275\217\351\231\242\346\226\207\344\271\246/\351\246\226\347\250\213+\346\227\245\345\270\270\347\227\205\347\250\213\350\256\260\345\275\225.xml" @@ -52,7 +52,7 @@ - 乌 兰 察 布 市 德 佑 医 院 + 新 致 开 源 医 疗 医 院 diff --git "a/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/\344\275\217\351\231\242\346\226\207\344\271\246/\351\246\226\347\250\213+\346\237\245\346\210\277\350\256\260\345\275\225+\345\207\272\351\231\242\350\256\260\345\275\225.xml" "b/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/\344\275\217\351\231\242\346\226\207\344\271\246/\351\246\226\347\250\213+\346\237\245\346\210\277\350\256\260\345\275\225+\345\207\272\351\231\242\350\256\260\345\275\225.xml" index 5bc645a600c706ea83d8e5d0e6229948e4a148aa..f0c49421cbc18c011f79a5e9e46335338a0515ea 100644 --- "a/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/\344\275\217\351\231\242\346\226\207\344\271\246/\351\246\226\347\250\213+\346\237\245\346\210\277\350\256\260\345\275\225+\345\207\272\351\231\242\350\256\260\345\275\225.xml" +++ "b/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/\344\275\217\351\231\242\346\226\207\344\271\246/\351\246\226\347\250\213+\346\237\245\346\210\277\350\256\260\345\275\225+\345\207\272\351\231\242\350\256\260\345\275\225.xml" @@ -7,7 +7,7 @@ 13005 - 隆  安  县  城 镇 卫 生  院 + 新致开源医疗医院 6633 diff --git "a/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/\344\275\217\351\231\242\346\226\207\344\271\246/\351\246\226\347\250\213\350\256\260\345\275\225.xml" "b/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/\344\275\217\351\231\242\346\226\207\344\271\246/\351\246\226\347\250\213\350\256\260\345\275\225.xml" index 6a548fe7d5e90ff357791b5468d80c10e2f42160..933a351041b53c071f5370919e77ba6f058414c2 100644 --- "a/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/\344\275\217\351\231\242\346\226\207\344\271\246/\351\246\226\347\250\213\350\256\260\345\275\225.xml" +++ "b/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/\344\275\217\351\231\242\346\226\207\344\271\246/\351\246\226\347\250\213\350\256\260\345\275\225.xml" @@ -52,7 +52,7 @@ - 乌 兰 察 布 市 德 佑 医 院 + 新 致 开 源 医 疗 医 院 diff --git "a/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/\345\205\245\351\231\242\350\256\260\345\275\225\346\250\241\346\235\277.xml" "b/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/\345\205\245\351\231\242\350\256\260\345\275\225\346\250\241\346\235\277.xml" index 8c7e0a7657fc44a71b0a90957d3cffed87a48157..63fc4566df45ed92987826077831ce88b2994267 100644 --- "a/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/\345\205\245\351\231\242\350\256\260\345\275\225\346\250\241\346\235\277.xml" +++ "b/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/\345\205\245\351\231\242\350\256\260\345\275\225\346\250\241\346\235\277.xml" @@ -11,7 +11,7 @@ true - 重庆重医附二院宽仁康复医院 + 新致开源医疗医院 diff --git "a/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/\345\214\273\345\230\261\345\215\225/\344\270\264\346\227\266\345\214\273\345\230\261.xml" "b/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/\345\214\273\345\230\261\345\215\225/\344\270\264\346\227\266\345\214\273\345\230\261.xml" index 7f6c55b3e3098e3311856bcd1ea545a4c679319b..88697ceba98dda3e18fbfc2e94a3114be4d02d8d 100644 --- "a/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/\345\214\273\345\230\261\345\215\225/\344\270\264\346\227\266\345\214\273\345\230\261.xml" +++ "b/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/\345\214\273\345\230\261\345\215\225/\344\270\264\346\227\266\345\214\273\345\230\261.xml" @@ -7,7 +7,7 @@ 23 B0EADC5F-D1A7-4C1D-8BFF-C30B4AB96B89 - 请输入医院名称 + 新致开源医疗医院 true zy_brjbxx @@ -16,7 +16,7 @@ False yymc - 医院名称 + 新致开源医疗医院 None diff --git "a/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/\345\214\273\345\230\261\345\215\225/\345\214\273\345\230\261\345\215\225/\344\270\264\346\227\266\345\214\273\345\230\261.xml" "b/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/\345\214\273\345\230\261\345\215\225/\345\214\273\345\230\261\345\215\225/\344\270\264\346\227\266\345\214\273\345\230\261.xml" index 36711d0d76ba3c305fa952866062c661f49625b9..c35f3dff6b9737cfee5c0a0113b8e86e4a00fa42 100644 --- "a/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/\345\214\273\345\230\261\345\215\225/\345\214\273\345\230\261\345\215\225/\344\270\264\346\227\266\345\214\273\345\230\261.xml" +++ "b/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/\345\214\273\345\230\261\345\215\225/\345\214\273\345\230\261\345\215\225/\344\270\264\346\227\266\345\214\273\345\230\261.xml" @@ -9,7 +9,7 @@ B0EADC5F-D1A7-4C1D-8BFF-C30B4AB96B89 - 请输入医院名称 + 新致开源医疗医院 true zy_brjbxx @@ -20,7 +20,7 @@ yymc - 医院名称 + 新致开源医疗医院 None diff --git "a/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/\345\214\273\345\230\261\345\215\225/\345\214\273\345\230\261\345\215\225/\351\225\277\346\234\237\345\214\273\345\230\261.xml" "b/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/\345\214\273\345\230\261\345\215\225/\345\214\273\345\230\261\345\215\225/\351\225\277\346\234\237\345\214\273\345\230\261.xml" index 573036fcc6880645add338da5b868ddcebd5de4e..d8eef10b52be6657cbd1a352b68eb713b9ed2383 100644 --- "a/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/\345\214\273\345\230\261\345\215\225/\345\214\273\345\230\261\345\215\225/\351\225\277\346\234\237\345\214\273\345\230\261.xml" +++ "b/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/\345\214\273\345\230\261\345\215\225/\345\214\273\345\230\261\345\215\225/\351\225\277\346\234\237\345\214\273\345\230\261.xml" @@ -9,7 +9,7 @@ B0EADC5F-D1A7-4C1D-8BFF-C30B4AB96B89 - 请输入医院名称 + 新致开源医疗医院 true zy_brjbxx @@ -22,7 +22,7 @@ yymc - 医院名称 + 新致开源医疗医院 diff --git "a/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/\345\214\273\345\230\261\345\215\225/\351\225\277\346\234\237\345\214\273\345\230\261.xml" "b/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/\345\214\273\345\230\261\345\215\225/\351\225\277\346\234\237\345\214\273\345\230\261.xml" index f107968b4c8cba2becd6b58b4e41d52339e8bf1a..c35851e279bac8cdc19baaf7570b217490fc736e 100644 --- "a/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/\345\214\273\345\230\261\345\215\225/\351\225\277\346\234\237\345\214\273\345\230\261.xml" +++ "b/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/\345\214\273\345\230\261\345\215\225/\351\225\277\346\234\237\345\214\273\345\230\261.xml" @@ -7,7 +7,7 @@ 23 B0EADC5F-D1A7-4C1D-8BFF-C30B4AB96B89 - 请输入医院名称 + 新致开源医疗医院 true zy_brjbxx @@ -18,7 +18,7 @@ ] yymc - 医院名称 + 新致开源医疗医院 24 diff --git "a/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/\346\212\244\347\220\206\346\226\207\344\271\246/\346\202\243\350\200\205\345\205\245\351\231\242\346\212\244\347\220\206\350\257\204\344\274\260\345\215\225/\346\202\243\350\200\205\345\205\245\351\231\242\346\212\244\347\220\206\350\257\204\344\274\260\345\215\225.xml" "b/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/\346\212\244\347\220\206\346\226\207\344\271\246/\346\202\243\350\200\205\345\205\245\351\231\242\346\212\244\347\220\206\350\257\204\344\274\260\345\215\225/\346\202\243\350\200\205\345\205\245\351\231\242\346\212\244\347\220\206\350\257\204\344\274\260\345\215\225.xml" index 9a81ad26141f76781ffa95465d5e53eeb02e786a..a7ec5b5cea1ca827fdebb9aeaa8cc5b4dd45af30 100644 --- "a/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/\346\212\244\347\220\206\346\226\207\344\271\246/\346\202\243\350\200\205\345\205\245\351\231\242\346\212\244\347\220\206\350\257\204\344\274\260\345\215\225/\346\202\243\350\200\205\345\205\245\351\231\242\346\212\244\347\220\206\350\257\204\344\274\260\345\215\225.xml" +++ "b/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/\346\212\244\347\220\206\346\226\207\344\271\246/\346\202\243\350\200\205\345\205\245\351\231\242\346\212\244\347\220\206\350\257\204\344\274\260\345\215\225/\346\202\243\350\200\205\345\205\245\351\231\242\346\212\244\347\220\206\350\257\204\344\274\260\345\215\225.xml" @@ -57,7 +57,7 @@ - 乌兰察布市德祐医院 + 新致开源医疗医院 diff --git "a/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/\346\212\244\347\220\206\346\226\207\344\271\246/\346\212\244\347\220\206\347\227\205\347\250\213\350\256\260\345\275\225\345\215\225/\346\212\244\347\220\206\347\227\205\347\250\213\350\256\260\345\275\225\345\215\225.xml" "b/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/\346\212\244\347\220\206\346\226\207\344\271\246/\346\212\244\347\220\206\347\227\205\347\250\213\350\256\260\345\275\225\345\215\225/\346\212\244\347\220\206\347\227\205\347\250\213\350\256\260\345\275\225\345\215\225.xml" index 772470e7d9d9a3496c7ff7b5b610bb5d021504bf..f87d99739f5465c83743254d98f47fc59894f48b 100644 --- "a/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/\346\212\244\347\220\206\346\226\207\344\271\246/\346\212\244\347\220\206\347\227\205\347\250\213\350\256\260\345\275\225\345\215\225/\346\212\244\347\220\206\347\227\205\347\250\213\350\256\260\345\275\225\345\215\225.xml" +++ "b/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/\346\212\244\347\220\206\346\226\207\344\271\246/\346\212\244\347\220\206\347\227\205\347\250\213\350\256\260\345\275\225\345\215\225/\346\212\244\347\220\206\347\227\205\347\250\213\350\256\260\345\275\225\345\215\225.xml" @@ -57,7 +57,7 @@ - 乌兰察布市德佑医院 + 新致开源医疗医院 diff --git "a/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/\346\212\244\347\220\206\346\226\207\344\271\246/\350\241\200\347\263\226\350\256\260\345\275\225\345\215\225/\350\241\200\347\263\226\350\256\260\345\275\225\345\215\225.xml" "b/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/\346\212\244\347\220\206\346\226\207\344\271\246/\350\241\200\347\263\226\350\256\260\345\275\225\345\215\225/\350\241\200\347\263\226\350\256\260\345\275\225\345\215\225.xml" index 2eb9e121fb6d14506caf562205bc6f0d1e1f2eb7..e1790012b130c49f4fa3ba4f9b0d613beaf116a7 100644 --- "a/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/\346\212\244\347\220\206\346\226\207\344\271\246/\350\241\200\347\263\226\350\256\260\345\275\225\345\215\225/\350\241\200\347\263\226\350\256\260\345\275\225\345\215\225.xml" +++ "b/Newtouch.HIS.EMR/Newtouch.EMR.Web/File/Template/\346\212\244\347\220\206\346\226\207\344\271\246/\350\241\200\347\263\226\350\256\260\345\275\225\345\215\225/\350\241\200\347\263\226\350\256\260\345\275\225\345\215\225.xml" @@ -13,7 +13,7 @@ - 隆安县城厢镇卫生院 + 新致开源医疗医院 diff --git a/Newtouch.HIS.EMR/Newtouch.EMR.Web/Newtouch.EMR.Web.csproj b/Newtouch.HIS.EMR/Newtouch.EMR.Web/Newtouch.EMR.Web.csproj index 50900f849882d2c7ffd6a72292362906568a3349..3df9a04aef68bf2e52809f2735660eaeb866a158 100644 --- a/Newtouch.HIS.EMR/Newtouch.EMR.Web/Newtouch.EMR.Web.csproj +++ b/Newtouch.HIS.EMR/Newtouch.EMR.Web/Newtouch.EMR.Web.csproj @@ -427,6 +427,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Designer @@ -674,7 +713,6 @@ - diff --git a/Newtouch.HIS.EMR/Newtouch.EMR.Web/Properties/PublishProfiles/PublishProfile.pubxml b/Newtouch.HIS.EMR/Newtouch.EMR.Web/Properties/PublishProfiles/PublishProfile.pubxml new file mode 100644 index 0000000000000000000000000000000000000000..faf476caba88ab4b9c51f1a2ba7e43a5ac309f52 --- /dev/null +++ b/Newtouch.HIS.EMR/Newtouch.EMR.Web/Properties/PublishProfiles/PublishProfile.pubxml @@ -0,0 +1,18 @@ + + + + + true + false + true + Release + Any CPU + FileSystem + ..\..\publish\EMR + FileSystem + <_TargetId>Folder + + + \ No newline at end of file diff --git a/Newtouch.HIS.Herp/Newtouch.Herp.API/Properties/PublishProfiles/PublishProfile.pubxml b/Newtouch.HIS.Herp/Newtouch.Herp.API/Properties/PublishProfiles/PublishProfile.pubxml new file mode 100644 index 0000000000000000000000000000000000000000..184b3fcec03ad56a4fa4ccd3f6158c15d765da9e --- /dev/null +++ b/Newtouch.HIS.Herp/Newtouch.Herp.API/Properties/PublishProfiles/PublishProfile.pubxml @@ -0,0 +1,18 @@ + + + + + true + false + true + Release + Any CPU + FileSystem + ..\..\publish\HerpAPI + FileSystem + <_TargetId>Folder + + + \ No newline at end of file diff --git a/Newtouch.HIS.Herp/Newtouch.Herp.Infrastructure/Log/AppLogger.cs b/Newtouch.HIS.Herp/Newtouch.Herp.Infrastructure/Log/AppLogger.cs new file mode 100644 index 0000000000000000000000000000000000000000..405d5d9eea87404c966eb64c137df8dcccc8d58c --- /dev/null +++ b/Newtouch.HIS.Herp/Newtouch.Herp.Infrastructure/Log/AppLogger.cs @@ -0,0 +1,28 @@ +using System; +using System.IO; + +namespace Newtouch.Herp.Infrastructure.Log +{ + /// + /// 日志组件 + /// + public class AppLogger + { + public static void Info(string message) + { + try + { + var root = "C:\\HISLog\\Herp"; + var date = DateTime.Now.ToString("yyyyMMddHHmm"); + var dirPath = string.Format("{0}\\{1}", root, date.Substring(0, 8)); + if (!Directory.Exists(dirPath)) + { + Directory.CreateDirectory(dirPath); + } + var filePath = string.Format("{0}\\{1}.txt", dirPath, date.Substring(8, 2)); + File.AppendAllText(filePath, string.Format("\r\n\r\n{0}.Info.{1}", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), message)); + } + catch { } + } + } +} \ No newline at end of file diff --git a/Newtouch.HIS.Herp/Newtouch.Herp.Infrastructure/Log/LogCore.cs b/Newtouch.HIS.Herp/Newtouch.Herp.Infrastructure/Log/LogCore.cs new file mode 100644 index 0000000000000000000000000000000000000000..894caf06b65ef8eed7295ad105fb725471907643 --- /dev/null +++ b/Newtouch.HIS.Herp/Newtouch.Herp.Infrastructure/Log/LogCore.cs @@ -0,0 +1,99 @@ +using System; +using System.Collections.Generic; +using Newtouch.Core.Common.Utils; +using NLog.Client; +using NLog.Contact.DTO; +using System.IO; +using System.Configuration; + +namespace Newtouch.Herp.Infrastructure.Log +{ + /// + /// 日志组件 + /// + public class LogCore + { + private static readonly ILog Logger = LogProxy.GetLogger(string.IsNullOrWhiteSpace(ConfigurationHelper.GetAppConfigValue("ServiceName")) ? "Newtouch.Herp" : ConfigurationHelper.GetAppConfigValue("ServiceName")); + + private static string LogAddress = + string.IsNullOrEmpty(ConfigurationManager.AppSettings["settLogAddress"]) + ? "C:\\HISLog\\log_herp_web" + : ConfigurationManager.AppSettings["settLogAddress"]; + public static void Info(string title, T message, Dictionary addInfo = null) + { + Logger.Info(title, message, tags: addInfo); + } + + internal static void Debug(string title, string message = "", Dictionary addInfo = null) + { + Logger.Debug(title, message, tags: addInfo); + } + + public static void Error(string title, Exception ex = null, string message = "", Dictionary addInfo = null) + { + if (ex != null && string.IsNullOrWhiteSpace(message)) + { + message = ex.InnerException != null ? ex.InnerException.Message : ex.Message; + } + Logger.Error(title, message, ex, addInfo); + } + + public static void Fatal(string title, Exception ex = null, string message = "", Dictionary addInfo = null) + { + if (ex != null && string.IsNullOrWhiteSpace(message)) + { + message = ex.InnerException != null ? ex.InnerException.Message : ex.Message; + } + Logger.Fatal(title, message, ex, addInfo); + } + + public static void Warn(string title, Exception ex = null, string message = "", Dictionary addInfo = null) + { + Logger.Warn(title, message, ex, addInfo); + } + + public static void Moniter(string title, object message, MoniterDTO moniter, Dictionary addInfo = null) + { + Logger.Moniter(title, message, moniter, addInfo); + } + + /// + /// 写本地日志 + /// + /// + public static void WriteInfo(string message) + { + try + { + var date = DateTime.Now.ToString("yyyyMMddHHmm"); + var dirPath = string.Format("{0}\\{1}", LogAddress, date.Substring(0, 8)); + if (!Directory.Exists(dirPath)) + { + Directory.CreateDirectory(dirPath); + } + var filePath = string.Format("{0}\\{1}.txt", dirPath, date.Substring(8, 3)); + File.AppendAllText(filePath, string.Format("\r\n\r\n{0}.Info.{1}", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), message)); + } + catch { } + } + /// + /// 写本地日志 + /// + /// + public static void WriteInfoWeb(string message) + { + try + { + var date = DateTime.Now.ToString("yyyyMMddHHmm"); + var dirPath = string.Format("{0}\\{1}", LogAddress, date.Substring(0, 8)); + if (!Directory.Exists(dirPath)) + { + Directory.CreateDirectory(dirPath); + } + var filePath = string.Format("{0}\\{1}.txt", dirPath, date.Substring(8, 3)); + File.AppendAllText(filePath, string.Format("\r\n\r\n{0}.Info.{1}", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), message)); + } + catch { } + } + } +} \ No newline at end of file diff --git a/Newtouch.HIS.Herp/Newtouch.Herp.Infrastructure/Log/LogProxy.cs b/Newtouch.HIS.Herp/Newtouch.Herp.Infrastructure/Log/LogProxy.cs new file mode 100644 index 0000000000000000000000000000000000000000..547c5d237f1790f101ecb75d5db8d2d0672e43eb --- /dev/null +++ b/Newtouch.HIS.Herp/Newtouch.Herp.Infrastructure/Log/LogProxy.cs @@ -0,0 +1,79 @@ +using System; +using System.Collections.Generic; +using Newtouch.Common.Operator; +using NLog.Client; +using NLog.Contact.DTO; + +namespace Newtouch.Herp.Infrastructure.Log +{ + /// + /// log proxy + /// + public class LogProxy : ILog + { + private static ILog _log; + #region 单例 + + /// + /// 服务名称 + /// + private static string _serviceName = string.Empty; + + private static readonly LogProxy Instance = new LogProxy(); + + private LogProxy() { } + + public static LogProxy GetLogger(string serviceName) + { + try + { + _serviceName = serviceName; + _log = LogManage.GetLogger(_serviceName, OperatorProvider.GetCurrent() != null ? OperatorProvider.GetCurrent().OrganizeId : ""); + return Instance; + } + catch (Exception e) + { + Console.WriteLine(e); + _log = LogManage.GetLogger(_serviceName, ""); + return Instance; + } + } + + #endregion + + public void Debug(string title, object message, System.Exception exception = null, Dictionary tags = null) + { + _log.Debug(title, message, exception, tags); + } + + public void Error(string title, object message, System.Exception exception = null, Dictionary tags = null) + { + _log.Error(title, message, exception, tags); + } + + public void Fatal(string title, object message, System.Exception exception = null, Dictionary tags = null) + { + _log.Fatal(title, message, exception, tags); + } + + public void Info(string title, object message, System.Exception exception = null, Dictionary tags = null) + { + _log.Info(title, message, exception, tags); + } + + public void Warn(string title, object message, System.Exception exception = null, Dictionary tags = null) + { + _log.Warn(title, message, exception, tags); + } + + public void Moniter(string title, object message, MoniterDTO moniter, Dictionary tags = null) + { + _log.Moniter(title, message, moniter, tags); + } + + public void ChangeRecord(string title, object message, Exception exception = null, Dictionary tags = null) + { + throw new NotImplementedException(); + } + } +} \ No newline at end of file diff --git a/Newtouch.HIS.Herp/Newtouch.Herp.Web/Properties/PublishProfiles/PublishProfile.pubxml b/Newtouch.HIS.Herp/Newtouch.Herp.Web/Properties/PublishProfiles/PublishProfile.pubxml new file mode 100644 index 0000000000000000000000000000000000000000..cd5b732f3dd604beb30d49aecc55cf1874d231d8 --- /dev/null +++ b/Newtouch.HIS.Herp/Newtouch.Herp.Web/Properties/PublishProfiles/PublishProfile.pubxml @@ -0,0 +1,18 @@ + + + + + true + false + true + Release + Any CPU + FileSystem + ..\..\publish\Herp + FileSystem + <_TargetId>Folder + + + \ No newline at end of file diff --git a/Newtouch.HIS.MRMS/Newtouch.MR.ManageSystem.Web/Newtouch.HIS.MRMS.Web.csproj b/Newtouch.HIS.MRMS/Newtouch.MR.ManageSystem.Web/Newtouch.HIS.MRMS.Web.csproj index 496d02b81a3a1079e1703d9e49a0a26b32e0236b..d8420d42907241855709433f23eec87c051e6ae3 100644 --- a/Newtouch.HIS.MRMS/Newtouch.MR.ManageSystem.Web/Newtouch.HIS.MRMS.Web.csproj +++ b/Newtouch.HIS.MRMS/Newtouch.MR.ManageSystem.Web/Newtouch.HIS.MRMS.Web.csproj @@ -55,8 +55,9 @@ ..\packages\Autofac.Mvc5.4.0.0\lib\net451\Autofac.Integration.Mvc.dll True - - ..\packages\DCSoft.Writer\DCSoft.Writer.dll + + False + ..\..\his-dll-common\dlls\DCSoft.Writer.ForASPNET.dll ..\..\his-dll-common\hiscommondlls\EntityFramework.dll @@ -107,6 +108,9 @@ ..\..\his-dll-common\dlls\Newtouch.Core.Redis.dll + + ..\..\his-dll-common\dlls\Newtouch.Core.RedisSession.dll + ..\..\his-dll-common\hiscommondlls\Newtouch.HIS.Web.Core.dll @@ -125,12 +129,10 @@ ..\..\his-dll-common\dlls\StackExchange.Redis.dll - - False + ..\..\his-dll-common\dlls\StackExchange.Redis.Extensions.Core.dll - - False + ..\..\his-dll-common\dlls\StackExchange.Redis.Extensions.MsgPack.dll @@ -397,6 +399,9 @@ + + + 10.0 $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) diff --git a/Newtouch.HIS.MRMS/Newtouch.MR.ManageSystem.Web/Properties/PublishProfiles/PublishProfile.pubxml b/Newtouch.HIS.MRMS/Newtouch.MR.ManageSystem.Web/Properties/PublishProfiles/PublishProfile.pubxml new file mode 100644 index 0000000000000000000000000000000000000000..63e1bc65ec644f533649d09f1bd6921da348db1f --- /dev/null +++ b/Newtouch.HIS.MRMS/Newtouch.MR.ManageSystem.Web/Properties/PublishProfiles/PublishProfile.pubxml @@ -0,0 +1,18 @@ + + + + + true + false + true + Release + Any CPU + FileSystem + ..\..\publish\MRMS + FileSystem + <_TargetId>Folder + + + \ No newline at end of file diff --git a/Newtouch.HIS.MRQC/Newtouch.MRQC.Web/Configs/database.config b/Newtouch.HIS.MRQC/Newtouch.MRQC.Web/Configs/database.config index 9c5189baf1cf45ec2ec2c47a5d39251748ed8457..84daa1272fb9e6a288222112fdf4b6722bc3fdee 100644 --- a/Newtouch.HIS.MRQC/Newtouch.MRQC.Web/Configs/database.config +++ b/Newtouch.HIS.MRQC/Newtouch.MRQC.Web/Configs/database.config @@ -1,21 +1,13 @@  + + + - - - - - - - - - - - + + \ No newline at end of file diff --git a/Newtouch.HIS.MRQC/Newtouch.MRQC.Web/Configs/system.config b/Newtouch.HIS.MRQC/Newtouch.MRQC.Web/Configs/system.config index fb340185f2ca7124379d1cb1150432ec02263b3b..343670b445d24a5f2ecc4ddcd7507aac4ade3fb1 100644 --- a/Newtouch.HIS.MRQC/Newtouch.MRQC.Web/Configs/system.config +++ b/Newtouch.HIS.MRQC/Newtouch.MRQC.Web/Configs/system.config @@ -1,102 +1,101 @@  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Newtouch.HIS.MRQC/Newtouch.MRQC.Web/Properties/PublishProfiles/PublishProfile.pubxml b/Newtouch.HIS.MRQC/Newtouch.MRQC.Web/Properties/PublishProfiles/PublishProfile.pubxml new file mode 100644 index 0000000000000000000000000000000000000000..fa5f85c4096ed6c2cb2d72559949c7817a6ce970 --- /dev/null +++ b/Newtouch.HIS.MRQC/Newtouch.MRQC.Web/Properties/PublishProfiles/PublishProfile.pubxml @@ -0,0 +1,18 @@ + + + + + true + false + true + Release + Any CPU + FileSystem + ..\..\publish\MRQC + FileSystem + <_TargetId>Folder + + + \ No newline at end of file diff --git a/Newtouch.HIS.OR/Newtouch.OR.ManageSystem.API/Properties/PublishProfiles/PublishProfile.pubxml b/Newtouch.HIS.OR/Newtouch.OR.ManageSystem.API/Properties/PublishProfiles/PublishProfile.pubxml new file mode 100644 index 0000000000000000000000000000000000000000..2ebbd6c4eaf5dc96627e24cc5190a6572187b5ec --- /dev/null +++ b/Newtouch.HIS.OR/Newtouch.OR.ManageSystem.API/Properties/PublishProfiles/PublishProfile.pubxml @@ -0,0 +1,18 @@ + + + + + true + false + true + Release + Any CPU + FileSystem + ..\..\publish\ORAPI + FileSystem + <_TargetId>Folder + + + \ No newline at end of file diff --git a/Newtouch.HIS.OR/Newtouch.OR.ManageSystem.Web/Properties/PublishProfiles/PublishProfile.pubxml b/Newtouch.HIS.OR/Newtouch.OR.ManageSystem.Web/Properties/PublishProfiles/PublishProfile.pubxml new file mode 100644 index 0000000000000000000000000000000000000000..908888c5e31a1979252004879b611732ce400b22 --- /dev/null +++ b/Newtouch.HIS.OR/Newtouch.OR.ManageSystem.Web/Properties/PublishProfiles/PublishProfile.pubxml @@ -0,0 +1,18 @@ + + + + + true + false + true + Release + Any CPU + FileSystem + ..\..\publish\OR + FileSystem + <_TargetId>Folder + + + \ No newline at end of file diff --git a/Newtouch.HIS.PDS/ConsoleApp/ConsoleApp.csproj b/Newtouch.HIS.PDS/ConsoleApp/ConsoleApp.csproj index 2f7696091374b7d04753c701939577239390884b..d200e49eae77cd3d15e60344bdf9c0aa97405ee8 100644 --- a/Newtouch.HIS.PDS/ConsoleApp/ConsoleApp.csproj +++ b/Newtouch.HIS.PDS/ConsoleApp/ConsoleApp.csproj @@ -32,25 +32,28 @@ prompt 4 + + bin\9_190\ + False - ..\..\..\..\his-dll-common\FrameworkBase\FrameworkBase.MultiOrg.Domain.dll + .\..\..\his-dll-common\FrameworkBase\FrameworkBase.MultiOrg.Domain.dll ..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll - ..\..\..\..\his-dll-common\hiscommondlls\Newtouch.Common.dll + .\..\..\his-dll-common\hiscommondlls\Newtouch.Common.dll False - ..\..\..\..\his-dll-common\webapicommondlls\Newtouch.HIS.API.Common.dll + .\..\..\his-dll-common\webapicommondlls\Newtouch.HIS.API.Common.dll - ..\..\..\..\his-dll-common\hiscommondlls\Newtouch.Tools.dll + .\..\..\his-dll-common\hiscommondlls\Newtouch.Tools.dll diff --git a/Newtouch.HIS.PDS/Newtouch.HIS.Application/Implementation/OutPatientDispensingApp.cs b/Newtouch.HIS.PDS/Newtouch.HIS.Application/Implementation/OutPatientDispensingApp.cs index 9653108d331f39efbd581724c56a56fe35859d79..af72ef06804ed0d7f9bf609476a0b6212d5fce2c 100644 --- a/Newtouch.HIS.PDS/Newtouch.HIS.Application/Implementation/OutPatientDispensingApp.cs +++ b/Newtouch.HIS.PDS/Newtouch.HIS.Application/Implementation/OutPatientDispensingApp.cs @@ -71,7 +71,7 @@ namespace Newtouch.HIS.Application.Implementation break; } - var deliveryResult = _fydeDmnService.ExecOutpatientDispensingDrugV2(p.cfh, deliveryInfo.yfbmCode, deliveryInfo.userCode, deliveryInfo.organizeId,p.zsm,p.sfcl); + var deliveryResult = _fydeDmnService.ExecOutpatientDispensingDrugV2(p.cfh, deliveryInfo.yfbmCode, deliveryInfo.userCode, deliveryInfo.organizeId,p.ypdm,p.zsm,p.sfcl); if (!string.IsNullOrWhiteSpace(deliveryResult)) { errorMsg.Append(deliveryResult + ";"); diff --git a/Newtouch.HIS.PDS/Newtouch.HIS.Application/Newtouch.HIS.Application.csproj b/Newtouch.HIS.PDS/Newtouch.HIS.Application/Newtouch.HIS.Application.csproj index f37912439e37fdf9e68d7efac192e0c4f9ce4c97..d4bf9e4812cec9d12885567b29eecb0d2327d520 100644 --- a/Newtouch.HIS.PDS/Newtouch.HIS.Application/Newtouch.HIS.Application.csproj +++ b/Newtouch.HIS.PDS/Newtouch.HIS.Application/Newtouch.HIS.Application.csproj @@ -30,6 +30,9 @@ prompt 4 + + bin\9_190\ + False diff --git a/Newtouch.HIS.PDS/Newtouch.HIS.Domain/DTO/Medicine/DzcfBrxxDTO.cs b/Newtouch.HIS.PDS/Newtouch.HIS.Domain/DTO/Medicine/DzcfBrxxDTO.cs new file mode 100644 index 0000000000000000000000000000000000000000..418a517ab698daa046654642a2a6b176a2f9f056 --- /dev/null +++ b/Newtouch.HIS.PDS/Newtouch.HIS.Domain/DTO/Medicine/DzcfBrxxDTO.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; + +namespace Newtouch.HIS.Domain.DTO.Medicine +{ + public class DzcfBrxxDTO + { + public string xm { get; set; } + public string mzh { get; set; } + public string nl { get; set; } + public string brxzmc { get; set; } + public string CardNo { get; set; } + public string cfh { get; set; } + public string cfhComplete { get; set; } + public string cfnm { get; set; } + public string Fph { get; set; } + public string FphComplete { get; set; } + public string fybz { get; set; } + public string ysmc { get; set; } + public string yscode { get; set; } + public string ksmc { get; set; } + public decimal Zje { get; set; } + public string xb { get; set; } + public string xyzd { get; set; } + public string zyzd { get; set; } + } +} \ No newline at end of file diff --git a/Newtouch.HIS.PDS/Newtouch.HIS.Domain/IDomainServices/Pharmacy/IfyDmnService.cs b/Newtouch.HIS.PDS/Newtouch.HIS.Domain/IDomainServices/Pharmacy/IfyDmnService.cs index 9b53890ca8268497e2fd4ca28322fd5b8f3560f2..f240aab3be40d60341354044546292e0c80fc1e0 100644 --- a/Newtouch.HIS.PDS/Newtouch.HIS.Domain/IDomainServices/Pharmacy/IfyDmnService.cs +++ b/Newtouch.HIS.PDS/Newtouch.HIS.Domain/IDomainServices/Pharmacy/IfyDmnService.cs @@ -95,7 +95,7 @@ namespace Newtouch.HIS.Domain.IDomainServices /// /// /// - string ExecOutpatientDispensingDrugV2(string cfh, string yfbmCode, string userCode, string organizeId, string zsm, int? sfcl); + string ExecOutpatientDispensingDrugV2(string cfh, string yfbmCode, string userCode, string organizeId, string ypdm,string zsm, int? sfcl); /// /// 门诊发药 @@ -234,5 +234,14 @@ namespace Newtouch.HIS.Domain.IDomainServices IList GetMzcfDetailList(Pagination pagination, MzcfcxVo req); #endregion + + #region 医保电子处方 + /// + /// 获取电子处方病人信息 + /// + /// + List GetElectronicPrescriptionCfInfo(string cfh, string xm, string organizeId = ""); + + #endregion } } diff --git a/Newtouch.HIS.PDS/Newtouch.HIS.Domain/IRepository/OutPatientPharmacy/IMzCfRepo.cs b/Newtouch.HIS.PDS/Newtouch.HIS.Domain/IRepository/OutPatientPharmacy/IMzCfRepo.cs index 43318930f9fa7d4716a61a217eef4e11bfd2a164..f9094af0cfaaa95115fa028257d89f19e1df8d23 100644 --- a/Newtouch.HIS.PDS/Newtouch.HIS.Domain/IRepository/OutPatientPharmacy/IMzCfRepo.cs +++ b/Newtouch.HIS.PDS/Newtouch.HIS.Domain/IRepository/OutPatientPharmacy/IMzCfRepo.cs @@ -160,5 +160,28 @@ namespace Newtouch.HIS.Domain.IRepository /// /// int UpdateGender(string cfh, string xb, string orgId); + + List SelectTfRpList(string cfh, string organizeId); + + #region 医保电子处方 + /// + /// 返回去重后的姓名和收费时间 + /// + /// + /// + /// + /// + /// + /// + IList GetElectronicPrescription(Pagination pagination, string organizeId, string isysh, string keyword = ""); + /// + /// 根绝处方号和姓名获取处方明细信息 + /// + /// + List QueryElectronicPrescriptionCfmx(string cfh, string xm, string organizeId); + Input_2203A GetCQjzdjInfo(string mzh, string orgId); + int UpdateCfYsshyj(string cfh, string ysshyj, string orgId); + + #endregion } } \ No newline at end of file diff --git a/Newtouch.HIS.PDS/Newtouch.HIS.Domain/Newtouch.HIS.Domain.csproj b/Newtouch.HIS.PDS/Newtouch.HIS.Domain/Newtouch.HIS.Domain.csproj index a41cd733a8eee24e95db96fd8089e48d211fe2ea..bdc9eb0023aff16fbb2e9c4adc680e10baa9b014 100644 --- a/Newtouch.HIS.PDS/Newtouch.HIS.Domain/Newtouch.HIS.Domain.csproj +++ b/Newtouch.HIS.PDS/Newtouch.HIS.Domain/Newtouch.HIS.Domain.csproj @@ -30,6 +30,9 @@ prompt 4 + + bin\9_190\ + .\..\..\his-dll-common\hiscommondlls\EntityFramework.dll @@ -76,6 +79,7 @@ + @@ -344,6 +348,7 @@ + diff --git a/Newtouch.HIS.PDS/Newtouch.HIS.Domain/VO/CfmxVO.cs b/Newtouch.HIS.PDS/Newtouch.HIS.Domain/VO/CfmxVO.cs index 29e01707f9b3ada68cb1cb86732445314c924a00..0658f500d36bbe9de10bcf5168ec892e0e022533 100644 --- a/Newtouch.HIS.PDS/Newtouch.HIS.Domain/VO/CfmxVO.cs +++ b/Newtouch.HIS.PDS/Newtouch.HIS.Domain/VO/CfmxVO.cs @@ -18,6 +18,7 @@ namespace Newtouch.HIS.Domain.VO public string cfh { get; set; } public string cfnm { get; set; } + public string ypCode { get; set; } /// /// 药品名称 /// diff --git a/Newtouch.HIS.PDS/Newtouch.HIS.Domain/VO/DzcfmxVO.cs b/Newtouch.HIS.PDS/Newtouch.HIS.Domain/VO/DzcfmxVO.cs new file mode 100644 index 0000000000000000000000000000000000000000..dc30accc996f489e97011d597c64c2adc5b67dfd --- /dev/null +++ b/Newtouch.HIS.PDS/Newtouch.HIS.Domain/VO/DzcfmxVO.cs @@ -0,0 +1,96 @@ +using System; + +namespace Newtouch.HIS.Domain.VO +{ + /// + /// 处方明细 + /// + public class DzcfmxVO + { + + /// + /// 处方号 + /// + public string cfh { get; set; } + + /// + /// 药品名称 + /// + public string ypmc { get; set; } + + /// + /// 规格 + /// + public string gg { get; set; } + + /// + /// 数量(部门单位) + /// + public decimal sl { get; set; } + + /// + /// 数量+单位 + /// + public string slStr { get; set; } + + /// + /// 部门单位 + /// + public string dw { get; set; } + + /// + /// 单价(部门单位) + /// + public decimal dj { get; set; } + + /// + /// 生产厂家 + /// + public string ycmc { get; set; } + + /// + /// 金额 + /// + public decimal je { get; set; } + + /// + /// 剂量 + /// + public decimal jl { get; set; } + + /// + /// 剂量单位 + /// + public string jldw { get; set; } + + /// + /// 用法 + /// + public string yfmc { get; set; } + + /// + /// 医生嘱托 + /// + public string yszt { get; set; } + + /// + /// 医生名称 + /// + public string ysmc { get; set; } + public string shr { get; set; } + public string shsj { get; set; } + public string pc { get; set; } + } + public class Input_2203A + { + public string mdtrt_id { get; set; } + public string psn_no { get; set; } + public string med_type { get; set; } + public string birctrl_type { get; set; } + public string birctrl_matn_date { get; set; } + public string matn_type { get; set; } + public string dise_codg { get; set; } + public string dise_name { get; set; } + public string insuplc_admdvs { get; set; } + } +} \ No newline at end of file diff --git a/Newtouch.HIS.PDS/Newtouch.HIS.Domain/ValueObjects/HospitalizationPharmacy/YPFYPatientInfoVO.cs b/Newtouch.HIS.PDS/Newtouch.HIS.Domain/ValueObjects/HospitalizationPharmacy/YPFYPatientInfoVO.cs index 48c04149381e7af2e523267993e001bf61934f04..4713378e89f9f7c63771a5de580be748309f0a59 100644 --- a/Newtouch.HIS.PDS/Newtouch.HIS.Domain/ValueObjects/HospitalizationPharmacy/YPFYPatientInfoVO.cs +++ b/Newtouch.HIS.PDS/Newtouch.HIS.Domain/ValueObjects/HospitalizationPharmacy/YPFYPatientInfoVO.cs @@ -15,6 +15,11 @@ namespace Newtouch.HIS.Domain.ValueObjects /// public string OrganizeId { get; set; } + /// + /// 医嘱号 + /// + public string yzh { get; set; } + /// /// 医嘱ID /// diff --git a/Newtouch.HIS.PDS/Newtouch.HIS.Domain/ValueObjects/OutPatientPharmacy/patientInfoVO.cs b/Newtouch.HIS.PDS/Newtouch.HIS.Domain/ValueObjects/OutPatientPharmacy/patientInfoVO.cs index 511d9876419230fdec3c2c98377e962a0438cb72..4410fafee037b63bbdd82ca36ff86d984b37a7b6 100644 --- a/Newtouch.HIS.PDS/Newtouch.HIS.Domain/ValueObjects/OutPatientPharmacy/patientInfoVO.cs +++ b/Newtouch.HIS.PDS/Newtouch.HIS.Domain/ValueObjects/OutPatientPharmacy/patientInfoVO.cs @@ -69,5 +69,9 @@ namespace Newtouch.HIS.Domain.ValueObjects /// 2: 否 /// public int? sfcl { get; set; } + + public string ypdm { get; set; } + public string zt { get; set; } + public string ysshyj { get; set; } } } diff --git a/Newtouch.HIS.PDS/Newtouch.HIS.DomainServices/HospitalizationPharmacy/DispenseIndexInfoDmnService.cs b/Newtouch.HIS.PDS/Newtouch.HIS.DomainServices/HospitalizationPharmacy/DispenseIndexInfoDmnService.cs index c9c3a36428e1e0b3817cd0e11628b8ed65363b68..d59e226b0432fd13560344a623c891afc5403f8a 100644 --- a/Newtouch.HIS.PDS/Newtouch.HIS.DomainServices/HospitalizationPharmacy/DispenseIndexInfoDmnService.cs +++ b/Newtouch.HIS.PDS/Newtouch.HIS.DomainServices/HospitalizationPharmacy/DispenseIndexInfoDmnService.cs @@ -379,12 +379,14 @@ SELECT o.*, dbo.f_getYfbmYpComplexYpSlandDw(o.zxdwsl, @yfbmCode, o.ypCode, @Orga FROM ( SELECT SUM(c.sl) zxdwsl, a.zyh, c.ypCode,a.yzId, a.zxId, a.patientName, a.cw, a.yl, a.yldw, a.pcmc, a.zh, a.zlff, a.dj, a.je, a.yzxz, CASE when a.yzxz = '1' then '临时' when a.yzxz = '2' then '长期' else '/' end yzxzmc, + CASE WHEN a.yzxz = '1' THEN lsyz.yzh WHEN a.yzxz = '2' THEN cqyz.yzh ELSE NULL END AS yzh, yp.ycmc,(case when cqyz.yzzt=4 then '[停]'+yp.ypmc else yp.ypmc end) ypmc, ypsx.ypgg,c.CreatorCode pyry, c.CreateTime pyrq, RTRIM(LTRIM(c.ph)) ph, RTRIM(LTRIM(c.pc)) pc,a.ts,ypsx.gjybdm FROM NewtouchHIS_PDS.dbo.zy_ypyzxx(NOLOCK) a INNER JOIN NewtouchHIS_PDS.dbo.zy_ypyzzxph(NOLOCK) c ON c.zxId=a.zxId AND c.yzId=a.yzId AND c.ypCode=a.ypCode AND c.zt='1' AND c.gjzt='0' AND c.OrganizeId=a.OrganizeId INNER JOIN NewtouchHIS_Base.dbo.v_s_xt_yp yp ON yp.ypCode=a.ypCode AND yp.OrganizeId=a.OrganizeId INNER JOIN NewtouchHIS_Base.dbo.V_S_xt_ypsx ypsx ON ypsx.ypId=yp.ypId AND ypsx.OrganizeId=a.OrganizeId - left join [Newtouch_CIS].dbo.zy_cqyz cqyz on a.yzId=cqyz.Id and a.OrganizeId=cqyz.OrganizeId + left join [Newtouch_CIS].dbo.zy_cqyz cqyz on a.yzId=cqyz.Id and a.OrganizeId=cqyz.OrganizeId and a.yzxz = '2' + left join [Newtouch_CIS].dbo.zy_lsyz lsyz on a.yzId=lsyz.Id and a.OrganizeId=lsyz.OrganizeId and a.yzxz = '1' WHERE a.organizeId=@OrganizeId AND a.fybz='1' AND ISNULL(c.zh,'')=ISNULL(a.zh,'') @@ -404,9 +406,9 @@ FROM ( AND ISNULL(a.cw, '') LIKE '%' + @cw + '%' AND(a.yzId = @yzId OR '' = @yzId) AND c.zyypxxId = a.Id - GROUP BY a.yzId,c.ypCode, a.zyh, a.zxId, a.patientName, a.cw, a.yl, a.yldw, a.pcmc, a.zh, a.zlff, a.dj, a.je, a.yzxz, yp.ycmc, yp.ypmc, ypsx.ypgg,c.CreatorCode, c.CreateTime, c.ph, c.pc, a.ts,cqyz.yzzt,ypsx.gjybdm + GROUP BY lsyz.yzh,cqyz.yzh, a.yzId,c.ypCode, a.zyh, a.zxId, a.patientName, a.cw, a.yl, a.yldw, a.pcmc, a.zh, a.zlff, a.dj, a.je, a.yzxz, yp.ycmc, yp.ypmc, ypsx.ypgg,c.CreatorCode, c.CreateTime, c.ph, c.pc, a.ts,cqyz.yzzt,ypsx.gjybdm ) o -ORDER BY o.zxId, o.ypmc"; +ORDER BY o.yzh, o.zxId, o.ypmc"; var param = new DbParameter[] { new SqlParameter("@yzId", req.yzId??""), diff --git a/Newtouch.HIS.PDS/Newtouch.HIS.DomainServices/Newtouch.HIS.DomainServices.csproj b/Newtouch.HIS.PDS/Newtouch.HIS.DomainServices/Newtouch.HIS.DomainServices.csproj index 28069dd439cbec683038dd0fff17e8a7c195ec81..560f10121a906757907748716880e2f244e9d816 100644 --- a/Newtouch.HIS.PDS/Newtouch.HIS.DomainServices/Newtouch.HIS.DomainServices.csproj +++ b/Newtouch.HIS.PDS/Newtouch.HIS.DomainServices/Newtouch.HIS.DomainServices.csproj @@ -30,6 +30,9 @@ prompt 4 + + bin\9_190\ + False diff --git a/Newtouch.HIS.PDS/Newtouch.HIS.DomainServices/OutPatientPharmacy/fyDmnService.cs b/Newtouch.HIS.PDS/Newtouch.HIS.DomainServices/OutPatientPharmacy/fyDmnService.cs index ded9e12fb119a5d35a57b2f831c1892f9c206ec6..b64622f1b8aa296842713dc9a698ade70072bd60 100644 --- a/Newtouch.HIS.PDS/Newtouch.HIS.DomainServices/OutPatientPharmacy/fyDmnService.cs +++ b/Newtouch.HIS.PDS/Newtouch.HIS.DomainServices/OutPatientPharmacy/fyDmnService.cs @@ -152,7 +152,7 @@ namespace Newtouch.HIS.DomainServices /// /// /// - public string ExecOutpatientDispensingDrugV2(string cfh, string yfbmCode, string userCode, string organizeId, string zsm, int? sfcl) + public string ExecOutpatientDispensingDrugV2(string cfh, string yfbmCode, string userCode, string organizeId, string ypdm,string zsm, int? sfcl) { var param = new DbParameter[] { @@ -160,6 +160,7 @@ namespace Newtouch.HIS.DomainServices new SqlParameter("@OrganizeId", organizeId), new SqlParameter("@yfbmCode", yfbmCode), new SqlParameter("@userCode",userCode ), + new SqlParameter("@ypdm",ypdm), new SqlParameter("@zsm",zsm??""), new SqlParameter("@sfcl",sfcl??null), }; @@ -1025,5 +1026,56 @@ where a.zt='1' and a.OrganizeId=@orgId return QueryWithPage(strsql, pagination, parms.ToArray()); } #endregion + + #region 电子处方信息获取病人信息 + /// + /// 根据卡号和姓名获取处方信息 + /// + /// + /// + /// + /// + /// + /// + public List GetElectronicPrescriptionCfInfo(string cfh, string xm, string organizeId = "") + { + const string sql = @" +select +jz.xm xm +,jz.nlshow nl +,jz.mzh mzh +,jz.brxzmc brxzmc +,jz.kh CardNo +,cf.cfh cfh +,cf.cfh cfhComplete +,'' cfnm +,'' Fph +,'' FphComplete +,'' fybz +,jz.jzysmc ysmc +,jz.jzys yscode +,jz.ghksmc ksmc +,cf.zje Zje , +jz.xb, +stuff(( select ','+ xyzd.zdmc from [Newtouch_CIS]..xt_xyzd xyzd where (xyzd.jzid=jz.jzId ) for xml path('')),1,1,'') xyzd, +stuff(( select ','+ zyzd.zdmc from [Newtouch_CIS]..xt_zyzd zyzd where (zyzd.jzid=jz.jzId ) for xml path('')),1,1,'') zyzd +from +[Newtouch_CIS]..xt_cf cf +inner join [Newtouch_CIS]..xt_jz jz on jz.jzId=cf.jzId and jz.OrganizeId=cf.OrganizeId and jz.zt='1' + where cf.isdzcf='1' + and cf.zt='1' +and cf.cfh=@cfh +and cf.OrganizeId=@OrganizeId +and jz.xm=@xm +"; + var param = new DbParameter[] + { + new SqlParameter("@cfh", cfh), + new SqlParameter("@OrganizeId", organizeId), + new SqlParameter("@xm", xm), + }; + return FindList(sql, param); + } + #endregion } } diff --git a/Newtouch.HIS.PDS/Newtouch.HIS.PDS.sln b/Newtouch.HIS.PDS/Newtouch.HIS.PDS.sln index 169e7b53fe63575e18d008202285cac7eec86439..949ffa528a689ea20f186fc6df2051bbc4ee1984 100644 --- a/Newtouch.HIS.PDS/Newtouch.HIS.PDS.sln +++ b/Newtouch.HIS.PDS/Newtouch.HIS.PDS.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.28307.168 +# Visual Studio Version 17 +VisualStudioVersion = 17.11.35327.3 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "01 Common 基础结构层", "01 Common 基础结构层", "{738D738F-2946-4DF5-BDA3-F9E0DBE53674}" EndProject @@ -39,69 +39,69 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "07 Bill", "07 Bill", "{C790 EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution + 9_190|Any CPU = 9_190|Any CPU Debug|Any CPU = Debug|Any CPU - DebugLocal|Any CPU = DebugLocal|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution + {F6432F41-A7DF-4536-8171-9B620D3C24F1}.9_190|Any CPU.ActiveCfg = 9_190|Any CPU + {F6432F41-A7DF-4536-8171-9B620D3C24F1}.9_190|Any CPU.Build.0 = 9_190|Any CPU {F6432F41-A7DF-4536-8171-9B620D3C24F1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {F6432F41-A7DF-4536-8171-9B620D3C24F1}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F6432F41-A7DF-4536-8171-9B620D3C24F1}.DebugLocal|Any CPU.ActiveCfg = Debug|Any CPU - {F6432F41-A7DF-4536-8171-9B620D3C24F1}.DebugLocal|Any CPU.Build.0 = Debug|Any CPU {F6432F41-A7DF-4536-8171-9B620D3C24F1}.Release|Any CPU.ActiveCfg = Release|Any CPU {F6432F41-A7DF-4536-8171-9B620D3C24F1}.Release|Any CPU.Build.0 = Release|Any CPU + {1B351E9A-E65B-43FA-BAF3-F7F99947553F}.9_190|Any CPU.ActiveCfg = 9_190|Any CPU + {1B351E9A-E65B-43FA-BAF3-F7F99947553F}.9_190|Any CPU.Build.0 = 9_190|Any CPU {1B351E9A-E65B-43FA-BAF3-F7F99947553F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1B351E9A-E65B-43FA-BAF3-F7F99947553F}.Debug|Any CPU.Build.0 = Debug|Any CPU - {1B351E9A-E65B-43FA-BAF3-F7F99947553F}.DebugLocal|Any CPU.ActiveCfg = Debug|Any CPU - {1B351E9A-E65B-43FA-BAF3-F7F99947553F}.DebugLocal|Any CPU.Build.0 = Debug|Any CPU {1B351E9A-E65B-43FA-BAF3-F7F99947553F}.Release|Any CPU.ActiveCfg = Release|Any CPU {1B351E9A-E65B-43FA-BAF3-F7F99947553F}.Release|Any CPU.Build.0 = Release|Any CPU + {5A95A82A-1B2F-4E0E-B94F-0DBE638F93DF}.9_190|Any CPU.ActiveCfg = 9_190|Any CPU + {5A95A82A-1B2F-4E0E-B94F-0DBE638F93DF}.9_190|Any CPU.Build.0 = 9_190|Any CPU {5A95A82A-1B2F-4E0E-B94F-0DBE638F93DF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5A95A82A-1B2F-4E0E-B94F-0DBE638F93DF}.Debug|Any CPU.Build.0 = Debug|Any CPU - {5A95A82A-1B2F-4E0E-B94F-0DBE638F93DF}.DebugLocal|Any CPU.ActiveCfg = Debug|Any CPU - {5A95A82A-1B2F-4E0E-B94F-0DBE638F93DF}.DebugLocal|Any CPU.Build.0 = Debug|Any CPU {5A95A82A-1B2F-4E0E-B94F-0DBE638F93DF}.Release|Any CPU.ActiveCfg = Release|Any CPU {5A95A82A-1B2F-4E0E-B94F-0DBE638F93DF}.Release|Any CPU.Build.0 = Release|Any CPU + {E508478F-3C0C-456F-BA2A-E73D5E51E439}.9_190|Any CPU.ActiveCfg = 9_190|Any CPU + {E508478F-3C0C-456F-BA2A-E73D5E51E439}.9_190|Any CPU.Build.0 = 9_190|Any CPU {E508478F-3C0C-456F-BA2A-E73D5E51E439}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {E508478F-3C0C-456F-BA2A-E73D5E51E439}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E508478F-3C0C-456F-BA2A-E73D5E51E439}.DebugLocal|Any CPU.ActiveCfg = Debug|Any CPU - {E508478F-3C0C-456F-BA2A-E73D5E51E439}.DebugLocal|Any CPU.Build.0 = Debug|Any CPU {E508478F-3C0C-456F-BA2A-E73D5E51E439}.Release|Any CPU.ActiveCfg = Release|Any CPU {E508478F-3C0C-456F-BA2A-E73D5E51E439}.Release|Any CPU.Build.0 = Release|Any CPU + {7EED4609-91FD-4BA5-8B2C-38C943168673}.9_190|Any CPU.ActiveCfg = 9_190|Any CPU + {7EED4609-91FD-4BA5-8B2C-38C943168673}.9_190|Any CPU.Build.0 = 9_190|Any CPU {7EED4609-91FD-4BA5-8B2C-38C943168673}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {7EED4609-91FD-4BA5-8B2C-38C943168673}.Debug|Any CPU.Build.0 = Debug|Any CPU - {7EED4609-91FD-4BA5-8B2C-38C943168673}.DebugLocal|Any CPU.ActiveCfg = Debug|Any CPU - {7EED4609-91FD-4BA5-8B2C-38C943168673}.DebugLocal|Any CPU.Build.0 = Debug|Any CPU {7EED4609-91FD-4BA5-8B2C-38C943168673}.Release|Any CPU.ActiveCfg = Release|Any CPU {7EED4609-91FD-4BA5-8B2C-38C943168673}.Release|Any CPU.Build.0 = Release|Any CPU + {573B0DBD-D631-4336-9F7B-58A2A9A0C911}.9_190|Any CPU.ActiveCfg = 9_190|Any CPU + {573B0DBD-D631-4336-9F7B-58A2A9A0C911}.9_190|Any CPU.Build.0 = 9_190|Any CPU {573B0DBD-D631-4336-9F7B-58A2A9A0C911}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {573B0DBD-D631-4336-9F7B-58A2A9A0C911}.Debug|Any CPU.Build.0 = Debug|Any CPU - {573B0DBD-D631-4336-9F7B-58A2A9A0C911}.DebugLocal|Any CPU.ActiveCfg = Debug|Any CPU - {573B0DBD-D631-4336-9F7B-58A2A9A0C911}.DebugLocal|Any CPU.Build.0 = Debug|Any CPU {573B0DBD-D631-4336-9F7B-58A2A9A0C911}.Release|Any CPU.ActiveCfg = Release|Any CPU {573B0DBD-D631-4336-9F7B-58A2A9A0C911}.Release|Any CPU.Build.0 = Release|Any CPU + {5F4D11F6-BCE1-4D4E-A0FD-CFCB5C3EF354}.9_190|Any CPU.ActiveCfg = 9_190|Any CPU + {5F4D11F6-BCE1-4D4E-A0FD-CFCB5C3EF354}.9_190|Any CPU.Build.0 = 9_190|Any CPU {5F4D11F6-BCE1-4D4E-A0FD-CFCB5C3EF354}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5F4D11F6-BCE1-4D4E-A0FD-CFCB5C3EF354}.Debug|Any CPU.Build.0 = Debug|Any CPU - {5F4D11F6-BCE1-4D4E-A0FD-CFCB5C3EF354}.DebugLocal|Any CPU.ActiveCfg = Debug|Any CPU - {5F4D11F6-BCE1-4D4E-A0FD-CFCB5C3EF354}.DebugLocal|Any CPU.Build.0 = Debug|Any CPU {5F4D11F6-BCE1-4D4E-A0FD-CFCB5C3EF354}.Release|Any CPU.ActiveCfg = Release|Any CPU {5F4D11F6-BCE1-4D4E-A0FD-CFCB5C3EF354}.Release|Any CPU.Build.0 = Release|Any CPU + {448B7152-AE78-456E-B4D1-74664A64700E}.9_190|Any CPU.ActiveCfg = 9_190|Any CPU + {448B7152-AE78-456E-B4D1-74664A64700E}.9_190|Any CPU.Build.0 = 9_190|Any CPU {448B7152-AE78-456E-B4D1-74664A64700E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {448B7152-AE78-456E-B4D1-74664A64700E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {448B7152-AE78-456E-B4D1-74664A64700E}.DebugLocal|Any CPU.ActiveCfg = Debug|Any CPU - {448B7152-AE78-456E-B4D1-74664A64700E}.DebugLocal|Any CPU.Build.0 = Debug|Any CPU {448B7152-AE78-456E-B4D1-74664A64700E}.Release|Any CPU.ActiveCfg = Release|Any CPU {448B7152-AE78-456E-B4D1-74664A64700E}.Release|Any CPU.Build.0 = Release|Any CPU + {0A74FF71-617E-4B90-B9AA-55C54342DB32}.9_190|Any CPU.ActiveCfg = 9_190|Any CPU + {0A74FF71-617E-4B90-B9AA-55C54342DB32}.9_190|Any CPU.Build.0 = 9_190|Any CPU {0A74FF71-617E-4B90-B9AA-55C54342DB32}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {0A74FF71-617E-4B90-B9AA-55C54342DB32}.Debug|Any CPU.Build.0 = Debug|Any CPU - {0A74FF71-617E-4B90-B9AA-55C54342DB32}.DebugLocal|Any CPU.ActiveCfg = Debug|Any CPU - {0A74FF71-617E-4B90-B9AA-55C54342DB32}.DebugLocal|Any CPU.Build.0 = Debug|Any CPU {0A74FF71-617E-4B90-B9AA-55C54342DB32}.Release|Any CPU.ActiveCfg = Release|Any CPU {0A74FF71-617E-4B90-B9AA-55C54342DB32}.Release|Any CPU.Build.0 = Release|Any CPU + {0B721ABD-4713-4DB6-9F9B-0BF3BFF68C17}.9_190|Any CPU.ActiveCfg = 9_190|Any CPU + {0B721ABD-4713-4DB6-9F9B-0BF3BFF68C17}.9_190|Any CPU.Build.0 = 9_190|Any CPU {0B721ABD-4713-4DB6-9F9B-0BF3BFF68C17}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {0B721ABD-4713-4DB6-9F9B-0BF3BFF68C17}.Debug|Any CPU.Build.0 = Debug|Any CPU - {0B721ABD-4713-4DB6-9F9B-0BF3BFF68C17}.DebugLocal|Any CPU.ActiveCfg = Debug|Any CPU - {0B721ABD-4713-4DB6-9F9B-0BF3BFF68C17}.DebugLocal|Any CPU.Build.0 = Debug|Any CPU {0B721ABD-4713-4DB6-9F9B-0BF3BFF68C17}.Release|Any CPU.ActiveCfg = Release|Any CPU {0B721ABD-4713-4DB6-9F9B-0BF3BFF68C17}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection diff --git a/Newtouch.HIS.PDS/Newtouch.HIS.Repository/Newtouch.HIS.Repository.csproj b/Newtouch.HIS.PDS/Newtouch.HIS.Repository/Newtouch.HIS.Repository.csproj index 44fb1b64cb2ac10989a074879db3f1da6f295078..68bc1f8ce64e0567bf66116bb80d2710d622a73c 100644 --- a/Newtouch.HIS.PDS/Newtouch.HIS.Repository/Newtouch.HIS.Repository.csproj +++ b/Newtouch.HIS.PDS/Newtouch.HIS.Repository/Newtouch.HIS.Repository.csproj @@ -30,6 +30,9 @@ prompt 4 + + bin\9_190\ + False diff --git a/Newtouch.HIS.PDS/Newtouch.HIS.Repository/OutPatientPharmacy/MzCfRepo.cs b/Newtouch.HIS.PDS/Newtouch.HIS.Repository/OutPatientPharmacy/MzCfRepo.cs index 4e8597861019e277307c1e7b7ef96a5be7869a27..9a7be3deb3d05ca42f4442543832c270c3a40f0d 100644 --- a/Newtouch.HIS.PDS/Newtouch.HIS.Repository/OutPatientPharmacy/MzCfRepo.cs +++ b/Newtouch.HIS.PDS/Newtouch.HIS.Repository/OutPatientPharmacy/MzCfRepo.cs @@ -589,5 +589,147 @@ WHERE s.sl>0 return ExecuteSqlCommand( "UPDATE dbo.mz_cf SET xb=@xb WHERE cfh=@cfh AND OrganizeId=@OrganizeId AND zt='1' ", param); } + + /// + /// 门诊退费退还冻结数量的处方信息 + /// + /// + /// + /// + public List SelectTfRpList(string cfh, string organizeId) + { + const string sql = "SELECT * FROM dbo.mz_cf(NOLOCK) WHERE cfh=@cfh AND OrganizeId=@OrganizeId "; + var param = new DbParameter[] + { + new SqlParameter("@cfh",cfh ), + new SqlParameter("@OrganizeId",organizeId ) + }; + return FindList(sql, param); + } + + #region 医保电子处方 + /// + /// 获取电子处方病人信息 + /// + /// + public IList GetElectronicPrescription(Pagination pagination, string organizeId, string isysh, string keyword = "") + { + var sql = new StringBuilder(@" +select jz.xm,cf.cfh,case isnull(cf.ysshyj,'') when '' then isnull(rxStasName,'未审核') else '未通过' end zt,cf.ysshyj from +[Newtouch_CIS]..xt_cf cf +inner join [Newtouch_CIS]..xt_jz jz on jz.jzId=cf.jzId and jz.OrganizeId=cf.OrganizeId and jz.zt='1' +left join [NewtouchHIS_Sett]..Dzcf_D003_output D003 on D003.cfh=cf.cfh and D003.zt='1' + where cf.isdzcf='1' + and cf.zt='1' +and cf.OrganizeId=@OrganizeId +"); + if (isysh == "1") + { + sql.AppendLine(" and rxStasName is not null "); + } + else if (isysh == "0") + { + sql.AppendLine(" and rxStasName is null and (cf.ysshyj is null or cf.ysshyj='')"); + } + else if (isysh == "2") + { + sql.AppendLine(" and cf.ysshyj is not null and cf.ysshyj!='' "); + } + var param = new List + { + new SqlParameter("@OrganizeId", organizeId), + }; + if (string.IsNullOrWhiteSpace(keyword)) return QueryWithPage(sql.ToString(), pagination, param.ToArray()); + sql.AppendLine("AND (jz.xm LIKE @xm OR jz.kh LIKE @cardNo OR cf.cfh LIKE @cfh)"); + param.Add(new SqlParameter("@xm", "%" + keyword + "%")); + param.Add(new SqlParameter("@cardNo", "%" + keyword + "%")); + param.Add(new SqlParameter("@cfh", "%" + keyword + "%")); + return QueryWithPage(sql.ToString(), pagination, param.ToArray()); + } + /// + /// 根据处方号和姓名获取处方明细信息 + /// + /// + public List QueryElectronicPrescriptionCfmx(string cfh, string xm, string organizeId) + { + var sql = new StringBuilder(@" select + cf.cfh cfh + ,cfmx.ypmc ypmc + ,isnull(ypsx.ypgg,cfyp.specName) gg +,convert(decimal(18,2), cfmx.sl) sl + ,convert(varchar(50),cfmx.sl)+cfmx.dw slStr + ,cfmx.dw dw + ,cfmx.dj dj + ,yp.ycmc ycmc + ,cfmx.je je + ,cfmx.mcjl jl + ,cfmx.mcjldw jldw + ,isnull(yf.yfmc,cf.cfyf) yfmc + ,cfmx.remark yszt + ,ys.Name ysmc + ,sf.Name shr + ,convert(varchar(50),d003.czrq,120) shsj + ,pc.yzpcmc pc + from + [Newtouch_CIS]..xt_cf cf + inner join [Newtouch_CIS]..xt_jz jz on jz.jzId=cf.jzId and jz.OrganizeId=cf.OrganizeId and jz.zt='1' + left join [Newtouch_CIS]..xt_cfmx cfmx on cfmx.cfid=cf.cfid and cfmx.organizeid=cf.OrganizeId and cfmx.zt='1' + left join [NewtouchHIS_Base]..xt_ypsx ypsx on cfmx.gjybdm=ypsx.gjybdm and cfmx.organizeid=ypsx.OrganizeId and ypsx.zt='1' + left join [NewtouchHIS_Base]..xt_yp yp on yp.ypId=ypsx.ypId and yp.organizeid=ypsx.OrganizeId and yp.zt='1' + left join [NewtouchHIS_Sett]..Dzcf_CFYP_output cfyp on cfmx.gjybdm=cfyp.medListCodg + left join [NewtouchHIS_Base]..xt_ypyf yf on (cfmx.yfCode=yf.yfCode or cf.cfyf=yf.yfCode) + left join [NewtouchHIS_Base]..[Sys_Staff] ys on ys.gh=cf.ys and ys.OrganizeId=cf.OrganizeId and ys.zt='1' + left join [NewtouchHIS_Sett]..Dzcf_D003_output d003 on d003.cfh=cf.cfh and d003.OrganizeId=cf.OrganizeId and d003.zt='1' + left join [NewtouchHIS_Base]..[Sys_Staff] sf on sf.gh=d003.czydm and sf.OrganizeId=d003.OrganizeId and sf.zt='1' + left join [NewtouchHIS_Base]..V_S_xt_yzpc pc on pc.yzpcCode=cfmx.pcCode and pc.OrganizeId=cfmx.OrganizeId and pc.zt='1' + where cf.isdzcf='1' + and cf.zt='1' and cf.cfh=@cfh + and cf.OrganizeId=@OrganizeId and jz.xm=@xm +"); + var param = new DbParameter[] + { + new SqlParameter("@xm",xm ??""), + new SqlParameter("@cfh",cfh), + new SqlParameter("@OrganizeId",organizeId ) + }; + return _dataContext.Database.SqlQuery(sql.ToString(), param).ToList(); + } + public Input_2203A GetCQjzdjInfo(string mzh, string orgId) + { + StringBuilder strSql = new StringBuilder(); + strSql.Append(@" +SELECT + b.jzid mdtrt_id, + grbh psn_no, + case b.mjzbz when '2' then '13' when '4' then '14' when '6' then '14' when '5' then '9901' + when '7' then '14' when '8' then '19' when '9' then '51' when '10' then '9906' when '12' then '1102' else '11' end med_type, + case b.mjzbz when '9' then '1' else '' end matn_type, + case b.mjzbz when '9' then '9' else '' end birctrl_type, case b.mjzbz when '9' then convert(varchar(10),getdate(),120) else '' + end birctrl_matn_date,b.bzbm dise_codg,b.bzmc dise_name,c.cbdbm insuplc_admdvs + FROM [NewtouchHIS_Sett].[dbo].[xt_brjbxx] a + LEFT JOIN [NewtouchHIS_Sett]..mz_gh b on a.patid=b.patid and b.OrganizeId = a.OrganizeId AND b.zt = '1' + LEFT JOIN [NewtouchHIS_Sett]..xt_card c on c.CardNo=b.kh and c.CardType=b.CardType and c.OrganizeId=b.OrganizeId and c.zt='1' + WHERE b.mzh = @mzh + AND a.OrganizeId = @OrganizeId + AND a.zt = '1'; "); + SqlParameter[] par = + { + new SqlParameter("@mzh", mzh), + new SqlParameter("@OrganizeId", orgId) + }; + return this.FindList(strSql.ToString(), par).FirstOrDefault(); + } + public int UpdateCfYsshyj(string cfh, string ysshyj, string orgId) + { + const string sql = " UPDATE [Newtouch_CIS]..xt_cf SET ysshyj=@ysshyj WHERE cfh=@cfh and organizeid=@orgId "; + DbParameter[] param = + { + new SqlParameter("@cfh", cfh), + new SqlParameter("@ysshyj", ysshyj), + new SqlParameter("@orgId", orgId) + }; + return ExecuteSqlCommand(sql, param); + } + #endregion } } diff --git a/Newtouch.HIS.PDS/Newtouch.HIS.Web/Configs/9_190/database.config b/Newtouch.HIS.PDS/Newtouch.HIS.Web/Configs/9_190/database.config new file mode 100644 index 0000000000000000000000000000000000000000..43cab1188d19c6d7ee85ae2034b30310ffcabeb8 --- /dev/null +++ b/Newtouch.HIS.PDS/Newtouch.HIS.Web/Configs/9_190/database.config @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/Newtouch.HIS.PDS/Newtouch.HIS.Web/Configs/9_190/system.config b/Newtouch.HIS.PDS/Newtouch.HIS.Web/Configs/9_190/system.config new file mode 100644 index 0000000000000000000000000000000000000000..c92cab40d833e0c7d537b2a2b26ad240128365be --- /dev/null +++ b/Newtouch.HIS.PDS/Newtouch.HIS.Web/Configs/9_190/system.config @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Newtouch.HIS.PDS/Newtouch.HIS.Web/Configs/database.config b/Newtouch.HIS.PDS/Newtouch.HIS.Web/Configs/database.config index 719ff089eda67473135404b2c98205650c4312f5..a5aba85168f72a46f3c3b51eeb85e2566566e543 100644 --- a/Newtouch.HIS.PDS/Newtouch.HIS.Web/Configs/database.config +++ b/Newtouch.HIS.PDS/Newtouch.HIS.Web/Configs/database.config @@ -1,10 +1,9 @@  - - - - - - - + + + + + + \ No newline at end of file diff --git a/Newtouch.HIS.PDS/Newtouch.HIS.Web/Configs/system.config b/Newtouch.HIS.PDS/Newtouch.HIS.Web/Configs/system.config index 1fb9f580b65d89af20cc2c61f78c841da4f064dd..e0ecddaaecd1888f0757d66a743211e74cdaa562 100644 --- a/Newtouch.HIS.PDS/Newtouch.HIS.Web/Configs/system.config +++ b/Newtouch.HIS.PDS/Newtouch.HIS.Web/Configs/system.config @@ -1,75 +1,74 @@  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Newtouch.HIS.PDS/Newtouch.HIS.Web/Controllers/OutPatientPharmacyController.cs b/Newtouch.HIS.PDS/Newtouch.HIS.Web/Controllers/OutPatientPharmacyController.cs index 9d9905906e224c45d7927bc75a98aa5bf7ceecba..5d5be99ed6cd18190f5105ae89cc3f528f50e31d 100644 --- a/Newtouch.HIS.PDS/Newtouch.HIS.Web/Controllers/OutPatientPharmacyController.cs +++ b/Newtouch.HIS.PDS/Newtouch.HIS.Web/Controllers/OutPatientPharmacyController.cs @@ -1412,5 +1412,70 @@ namespace Newtouch.HIS.Web.Controllers } #endregion + + #region 电子处方审核 + public ActionResult ElectronicPrescription() + { + return View(); + } + /// + /// 获取电子处方病人信息 + /// + /// + public ActionResult GetElectronicPrescription(Pagination pagination, string isysh, string keyword = "") + { + var result = _mzCfRepo.GetElectronicPrescription(pagination, OrganizeId, isysh, keyword); + var data = new + { + rows = result, + total = pagination.total, + page = pagination.page, + records = pagination.records + }; + return Content(data.ToJson()); + } + /// + /// 获取发药处方信息 + /// + /// + [HttpGet] + public ActionResult GetElectronicPrescriptionCfInfo(string cfh, string xm) + { + var rpList = _fyDmnService.GetElectronicPrescriptionCfInfo(cfh, xm, OrganizeId); + return Content(rpList.ToJson()); + } + /// + /// 获取处方明细信息 + /// + /// + [HttpGet] + public ActionResult QueryElectronicPrescriptionCfmx(string cfh, string xm) + { + var result = _mzCfRepo.QueryElectronicPrescriptionCfmx(cfh, xm, OrganizeId); + return Content(result.ToJson()); + } + /// + /// 门诊就诊登记修改获取 + /// + /// + /// + public ActionResult GetCQjzdjInfo(string mzh) + { + Input_2203A model = _mzCfRepo.GetCQjzdjInfo(mzh, this.OrganizeId); + return Content(model.ToJson()); + } + /// + /// 修改审核不通过意见 + /// + /// + /// + /// + public ActionResult UpdateCfYsshyj(string cfh, string ysshyj) + { + _mzCfRepo.UpdateCfYsshyj(cfh, ysshyj, this.OrganizeId); + return Content(""); + } + + #endregion } } \ No newline at end of file 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 1abb892e3bb9fabe53efd6ab35dea696e2ff40c3..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 @@ -260,6 +260,8 @@ + + @@ -376,6 +378,10 @@ + + + Web.config + Web.config @@ -516,6 +522,9 @@ 10.0 $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + + bin\ + diff --git a/Newtouch.HIS.PDS/Newtouch.HIS.Web/Properties/PublishProfiles/FolderProfile.pubxml b/Newtouch.HIS.PDS/Newtouch.HIS.Web/Properties/PublishProfiles/FolderProfile.pubxml index 59dc41bc5209c2a9477c3cb1f9d83643345cd511..bd8e185126937a614bbe2523a830f26f7b39bce7 100644 --- a/Newtouch.HIS.PDS/Newtouch.HIS.Web/Properties/PublishProfiles/FolderProfile.pubxml +++ b/Newtouch.HIS.PDS/Newtouch.HIS.Web/Properties/PublishProfiles/FolderProfile.pubxml @@ -4,14 +4,15 @@ https://go.microsoft.com/fwlink/?LinkID=208121. --> - false - false - true + True + False + True Release Any CPU FileSystem - bin\app.publish\ + D:\Pulish\PDS FileSystem <_TargetId>Folder + \ No newline at end of file diff --git a/Newtouch.HIS.PDS/Newtouch.HIS.Web/Properties/PublishProfiles/PublishProfile.pubxml b/Newtouch.HIS.PDS/Newtouch.HIS.Web/Properties/PublishProfiles/PublishProfile.pubxml new file mode 100644 index 0000000000000000000000000000000000000000..206de47e4bf3445176e9d387715c98e928cc7d96 --- /dev/null +++ b/Newtouch.HIS.PDS/Newtouch.HIS.Web/Properties/PublishProfiles/PublishProfile.pubxml @@ -0,0 +1,18 @@ + + + + + true + false + true + Release + Any CPU + FileSystem + ..\..\publish\PDS + FileSystem + <_TargetId>Folder + + + \ No newline at end of file diff --git a/Newtouch.HIS.PDS/Newtouch.HIS.Web/Views/HospitalizationPharmacy/DispenseIndex.cshtml b/Newtouch.HIS.PDS/Newtouch.HIS.Web/Views/HospitalizationPharmacy/DispenseIndex.cshtml index 546d20dc351683c216793780f35874f8bb27365a..15a6156856591c99d0bbb8ac98a68a2ab659835d 100644 --- a/Newtouch.HIS.PDS/Newtouch.HIS.Web/Views/HospitalizationPharmacy/DispenseIndex.cshtml +++ b/Newtouch.HIS.PDS/Newtouch.HIS.Web/Views/HospitalizationPharmacy/DispenseIndex.cshtml @@ -327,6 +327,7 @@ else return ""; } }, + { label: '医嘱号', name: 'yzh', width: 140, align: 'center' }, { label: '批号', name: 'ph', width: 110, align: 'center' }, { label: '批次', name: 'pc', width: 110, align: 'center' }, { label: '频次', name: 'pcmc', width: 50, align: 'center' }, diff --git a/Newtouch.HIS.PDS/Newtouch.HIS.Web/Views/OutPatientPharmacy/DrugDelivery2018.cshtml b/Newtouch.HIS.PDS/Newtouch.HIS.Web/Views/OutPatientPharmacy/DrugDelivery2018.cshtml index c88baa073b46da11bbb9760e76c470aa4e95b7c1..64307184265e84fd19049ba2794d925e5666464a 100644 --- a/Newtouch.HIS.PDS/Newtouch.HIS.Web/Views/OutPatientPharmacy/DrugDelivery2018.cshtml +++ b/Newtouch.HIS.PDS/Newtouch.HIS.Web/Views/OutPatientPharmacy/DrugDelivery2018.cshtml @@ -392,6 +392,7 @@ { label: '发票号', name: 'fph', align: 'left', width: 75 }, { label: 'cfnm', name: 'cfnm', hidden: true }, { label: '处方号', name: 'cfh', align: 'left', width: 110 }, + { label: 'ypCode', name: 'ypCode', hidden: true }, { label: '药品名称', name: 'ypmc', align: 'left', width: 120 }, { label: '国家医保码', name: 'gjybdm', align: 'left', width: 100 }, { label: '规格', name: 'gg', align: 'left', width: 80 }, @@ -474,6 +475,7 @@ "cfnm": rowdata.cfnm, "zsm": zsm, "sfcl": sfclValue, + "ypdm": rowdata.ypCode }); } if (patient.length <= 0) { @@ -538,6 +540,7 @@ "cfnm": rowdata.cfnm, "zsm": zsm, "sfcl": sfclValue, + "ypdm": rowdata.ypCode }); } }); diff --git a/Newtouch.HIS.PDS/Newtouch.HIS.Web/Views/OutPatientPharmacy/ElectronicPrescription.cshtml b/Newtouch.HIS.PDS/Newtouch.HIS.Web/Views/OutPatientPharmacy/ElectronicPrescription.cshtml new file mode 100644 index 0000000000000000000000000000000000000000..7a9932a881f6e079d888715e6da612cde9b079b9 --- /dev/null +++ b/Newtouch.HIS.PDS/Newtouch.HIS.Web/Views/OutPatientPharmacy/ElectronicPrescription.cshtml @@ -0,0 +1,622 @@ + +@{ + ViewBag.Title = "电子处方审核"; + Layout = "~/Views/Shared/_Index.cshtml"; + var opr = Newtouch.Common.Operator.OperatorProvider.GetCurrent(); +} + +
+
+
+ +
+
+
+
+
+
+
+
+
+ 处方信息 + +
+
+
    +
  • + 门诊号: + +
  • +
  • + 姓名: + +
  • +
  • + 性别: + +
  • +
  • + 年龄: + +
  • +
  • + 医生: + +
  • +
  • + 医生工号: + +
  • +
  • + 卡号: + +
  • +
  • + 总金额: + +
  • +
  • + 病人性质: + +
  • +
  • + 科室: + +
  • +
  • + 处方号: + +
  • +
  • + 西医诊断: + +
  • +
  • + 中医诊断: + +
  • +
+
+
+
+
+
+
+ + @**@ +
+ @Html.Partial("_BottomButtonsView", new Newtouch.HIS.Web.Core.Models.BottomButtonViewModel + { + ShowKeyList = new[] { 6,8 }, + F6Text = "不通过", + F8Text = "审核" + }) +
+
+ + \ No newline at end of file diff --git a/Newtouch.HIS.PDS/Newtouch.HIS.Web/Web.9_190.config b/Newtouch.HIS.PDS/Newtouch.HIS.Web/Web.9_190.config new file mode 100644 index 0000000000000000000000000000000000000000..305dc039a044166aa96b2871a778ce859730e28f --- /dev/null +++ b/Newtouch.HIS.PDS/Newtouch.HIS.Web/Web.9_190.config @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Newtouch.HIS.PDS/Newtouch.Infrastructure/Newtouch.Infrastructure.csproj b/Newtouch.HIS.PDS/Newtouch.Infrastructure/Newtouch.Infrastructure.csproj index e416c440588df0b796293f21d6eb1d3b01068db7..4bbfc856be85473071c10d39f751b3ac49d68471 100644 --- a/Newtouch.HIS.PDS/Newtouch.Infrastructure/Newtouch.Infrastructure.csproj +++ b/Newtouch.HIS.PDS/Newtouch.Infrastructure/Newtouch.Infrastructure.csproj @@ -30,6 +30,9 @@ prompt 4 + + bin\9_190\ + False diff --git a/Newtouch.HIS.PDS/Newtouch.Infrastructure/TSQL/TSqlDispensing.cs b/Newtouch.HIS.PDS/Newtouch.Infrastructure/TSQL/TSqlDispensing.cs index 55f89f5b6a0a002fbfe33c7d30e64666bb1d6589..fc28fce944aec63c192e6ad4af2637e38128b8e2 100644 --- a/Newtouch.HIS.PDS/Newtouch.Infrastructure/TSQL/TSqlDispensing.cs +++ b/Newtouch.HIS.PDS/Newtouch.Infrastructure/TSQL/TSqlDispensing.cs @@ -568,9 +568,9 @@ END CATCH /// 门诊发药处方明细查询 /// public const string mz_fy_cfmx = @" -SELECT a.czh, a.Fph, a.cfh,convert(varchar(50),a.cfnm) cfnm, a.ypmc, a.gg, CONVERT(INT,a.zxdwsl/a.zhyz) sl, a.dw, a.dj, a.ycmc, a.je, ISNULL(a.jl,0) jl, a.jldw, a.yfmc, a.yszt, a.ysmc, a.sfsj,a.gjybdm +SELECT a.czh, a.Fph, a.cfh,convert(varchar(50),a.cfnm) cfnm,a.ypCode, a.ypmc, a.gg, CONVERT(INT,a.zxdwsl/a.zhyz) sl, a.dw, a.dj, a.ycmc, a.je, ISNULL(a.jl,0) jl, a.jldw, a.yfmc, a.yszt, a.ysmc, a.sfsj,a.gjybdm FROM ( - SELECT cf.Fph, cf.cfh,cf.cfnm, cfmx.ypmc, cfmx.gg, SUM(mxph.sl) zxdwsl, cfmx.dw, cfmx.dj, cfmx.ycmc, cfmx.je, cfmx.jl, cfmx.jldw, cfmx.yfmc + SELECT cf.Fph, cf.cfh,cf.cfnm,cfmx.ypCode, cfmx.ypmc, cfmx.gg, SUM(mxph.sl) zxdwsl, cfmx.dw, cfmx.dj, cfmx.ycmc, cfmx.je, cfmx.jl, cfmx.jldw, cfmx.yfmc ,cfmx.bz yszt, cf.ysmc, cf.sfsj, cfmx.czh, cfmx.zhyz,xtyp.gjybdm FROM dbo.mz_cf(NOLOCK) cf INNER JOIN dbo.mz_cfmx(NOLOCK) cfmx ON cfmx.cfh = cf.cfh AND cfmx.OrganizeId=cf.OrganizeId AND cfmx.zt='1' @@ -584,13 +584,13 @@ FROM ( AND ISNULL(cf.cfh,'')=ISNULL(@cfh,'') AND ISNULL(mxph.czh,'')=ISNULL(cfmx.czh,'') AND mxph.cfmxId=cfmx.Id - GROUP BY cf.Fph, cf.cfh,cf.cfnm, cfmx.ypmc, cfmx.gg, cfmx.dw, cfmx.dj, cfmx.ycmc, cfmx.je, cfmx.jl, cfmx.jldw, cfmx.yfmc, cfmx.bz, cf.ysmc, cf.sfsj, cfmx.czh, cfmx.zhyz,xtyp.gjybdm + GROUP BY cf.Fph, cf.cfh,cf.cfnm, cfmx.ypCode, cfmx.ypmc, cfmx.gg, cfmx.dw, cfmx.dj, cfmx.ycmc, cfmx.je, cfmx.jl, cfmx.jldw, cfmx.yfmc, cfmx.bz, cf.ysmc, cf.sfsj, cfmx.czh, cfmx.zhyz,xtyp.gjybdm ) a "; public const string mz_fy_cfmx_new = @" -SELECT a.czh, a.Fph, a.cfh,convert(varchar(50),a.cfnm) cfnm, a.ypmc, a.gg, CONVERT(INT,a.zxdwsl/a.zhyz) sl, a.dw, a.dj, a.ycmc, a.je, ISNULL(a.jl,0) jl, a.jldw, a.yfmc, a.yszt, a.ysmc, a.sfsj,a.gjybdm +SELECT a.czh, a.Fph, a.cfh,convert(varchar(50),a.cfnm) cfnm,a.ypCode, a.ypmc, a.gg, CONVERT(INT,a.zxdwsl/a.zhyz) sl, a.dw, a.dj, a.ycmc, a.je, ISNULL(a.jl,0) jl, a.jldw, a.yfmc, a.yszt, a.ysmc, a.sfsj,a.gjybdm FROM ( - SELECT cf.Fph, cf.cfh,cf.cfnm, cfmx.ypmc, cfmx.gg, SUM(mxph.sl) zxdwsl, cfmx.dw, cfmx.dj, cfmx.ycmc, cfmx.je, cfmx.jl, cfmx.jldw, cfmx.yfmc + SELECT cf.Fph, cf.cfh,cf.cfnm,cfmx.ypCode, cfmx.ypmc, cfmx.gg, SUM(mxph.sl) zxdwsl, cfmx.dw, cfmx.dj, cfmx.ycmc, cfmx.je, cfmx.jl, cfmx.jldw, cfmx.yfmc ,cfmx.bz yszt, cf.ysmc, cf.sfsj, cfmx.czh, cfmx.zhyz,xtyp.gjybdm FROM dbo.mz_cf(NOLOCK) cf INNER JOIN dbo.mz_cfmx(NOLOCK) cfmx ON cfmx.cfh = cf.cfh AND cfmx.OrganizeId=cf.OrganizeId AND cfmx.zt='1' @@ -603,7 +603,7 @@ FROM ( AND cf.cfh in(select col from dbo.f_split(@cfh,',') where col>'') AND ISNULL(mxph.czh,'')=ISNULL(cfmx.czh,'') AND mxph.cfmxId=cfmx.Id - GROUP BY cf.Fph, cf.cfh,cf.cfnm, cfmx.ypmc, cfmx.gg, cfmx.dw, cfmx.dj, cfmx.ycmc, cfmx.je, cfmx.jl, cfmx.jldw, cfmx.yfmc, cfmx.bz, cf.ysmc, cf.sfsj, cfmx.czh, cfmx.zhyz,xtyp.gjybdm + GROUP BY cf.Fph, cf.cfh,cf.cfnm, cfmx.ypCode, cfmx.ypmc, cfmx.gg, cfmx.dw, cfmx.dj, cfmx.ycmc, cfmx.je, cfmx.jl, cfmx.jldw, cfmx.yfmc, cfmx.bz, cf.ysmc, cf.sfsj, cfmx.czh, cfmx.zhyz,xtyp.gjybdm ) a "; @@ -623,7 +623,7 @@ BEGIN END SELECT cfmxphId Id, sl, pc, ph, yp, cfmxId INTO #mxph -FROM dbo.mz_cfmxph(NOLOCK) WHERE cfh=@cfh AND OrganizeId=@OrganizeId AND zt='1' AND fyyf=@yfbmCode AND gjzt='0' +FROM dbo.mz_cfmxph(NOLOCK) WHERE cfh=@cfh and yp=@ypdm AND OrganizeId=@OrganizeId AND zt='1' AND fyyf=@yfbmCode AND gjzt='0' SET NOCOUNT ON SET TRANSACTION ISOLATION LEVEL READ COMMITTED diff --git a/Newtouch.HIS.PDS/Newtouch.PDS.API.Tests/Newtouch.Pds.Api.Tests.csproj b/Newtouch.HIS.PDS/Newtouch.PDS.API.Tests/Newtouch.Pds.Api.Tests.csproj index f295f13b070d93a1fa3986036fbbd495990d8697..c70d451d4c2766e806d5b20f465f501a13512806 100644 --- a/Newtouch.HIS.PDS/Newtouch.PDS.API.Tests/Newtouch.Pds.Api.Tests.csproj +++ b/Newtouch.HIS.PDS/Newtouch.PDS.API.Tests/Newtouch.Pds.Api.Tests.csproj @@ -35,6 +35,9 @@ prompt 4 + + bin\9_190\ + ..\packages\Autofac.4.0.0\lib\net451\Autofac.dll diff --git a/Newtouch.HIS.PDS/Newtouch.PDS.API/Newtouch.Pds.Api.csproj b/Newtouch.HIS.PDS/Newtouch.PDS.API/Newtouch.Pds.Api.csproj index 429fd0d94e84636fcc052af5e9374c2e7782ac7b..5cae91a8ec88873b52b6f13dc178d0f3c6fbee02 100644 --- a/Newtouch.HIS.PDS/Newtouch.PDS.API/Newtouch.Pds.Api.csproj +++ b/Newtouch.HIS.PDS/Newtouch.PDS.API/Newtouch.Pds.Api.csproj @@ -398,6 +398,9 @@ 10.0 $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + + bin\ + diff --git a/Newtouch.HIS.PDS/Newtouch.PDS.API/Properties/PublishProfiles/FolderProfile.pubxml b/Newtouch.HIS.PDS/Newtouch.PDS.API/Properties/PublishProfiles/FolderProfile.pubxml index 3169656044743bd874d955d4f7b43fea35362ea1..89bb05e7bfb60187c31167d2682142e494f37bb7 100644 --- a/Newtouch.HIS.PDS/Newtouch.PDS.API/Properties/PublishProfiles/FolderProfile.pubxml +++ b/Newtouch.HIS.PDS/Newtouch.PDS.API/Properties/PublishProfiles/FolderProfile.pubxml @@ -10,13 +10,13 @@ Release Any CPU - True - True - D:\Pulish\PDSAPI - True - True - True - False + true + true + ..\..\publish\PDSAPI + true + true + true + false DonotMerge \ No newline at end of file diff --git a/Newtouch.HIS.PDS/Newtouch.PDS.API/Properties/PublishProfiles/PublishProfile.pubxml b/Newtouch.HIS.PDS/Newtouch.PDS.API/Properties/PublishProfiles/PublishProfile.pubxml new file mode 100644 index 0000000000000000000000000000000000000000..67e6880d52df34ca92b656cd113bcadfa264e96e --- /dev/null +++ b/Newtouch.HIS.PDS/Newtouch.PDS.API/Properties/PublishProfiles/PublishProfile.pubxml @@ -0,0 +1,18 @@ + + + + + true + false + true + Release + Any CPU + FileSystem + ..\..\publish\PDSAPI + FileSystem + <_TargetId>Folder + + + \ No newline at end of file diff --git a/Newtouch.HIS.PDS/Newtouch.PDS.Requset/Newtouch.PDS.Requset.csproj b/Newtouch.HIS.PDS/Newtouch.PDS.Requset/Newtouch.PDS.Requset.csproj index 75150bcb47661811b9f0677f8e09931669afa91a..d8d95c305b771f9a81cb588fbb882c51a46cc15b 100644 --- a/Newtouch.HIS.PDS/Newtouch.PDS.Requset/Newtouch.PDS.Requset.csproj +++ b/Newtouch.HIS.PDS/Newtouch.PDS.Requset/Newtouch.PDS.Requset.csproj @@ -30,6 +30,9 @@ prompt 4 + + bin\9_190\ + diff --git a/Newtouch.HIS.SSO/HIS.BaseAPI/Properties/PublishProfiles/PublishProfile.pubxml b/Newtouch.HIS.SSO/HIS.BaseAPI/Properties/PublishProfiles/PublishProfile.pubxml new file mode 100644 index 0000000000000000000000000000000000000000..61145803858e99ca0b2097413bb278ff522ac152 --- /dev/null +++ b/Newtouch.HIS.SSO/HIS.BaseAPI/Properties/PublishProfiles/PublishProfile.pubxml @@ -0,0 +1,18 @@ + + + + + true + false + true + Release + Any CPU + FileSystem + ..\..\publish\his.baseapi + FileSystem + <_TargetId>Folder + + + \ No newline at end of file diff --git a/Newtouch.HIS.SSO/HIS.SSO/Properties/PublishProfiles/PublishProfile.pubxml b/Newtouch.HIS.SSO/HIS.SSO/Properties/PublishProfiles/PublishProfile.pubxml new file mode 100644 index 0000000000000000000000000000000000000000..a6f5aee41290ed446021c22f0a8b31dacd1b0d10 --- /dev/null +++ b/Newtouch.HIS.SSO/HIS.SSO/Properties/PublishProfiles/PublishProfile.pubxml @@ -0,0 +1,18 @@ + + + + + true + false + true + Release + Any CPU + FileSystem + ..\..\publish\Union + FileSystem + <_TargetId>Folder + + + \ No newline at end of file diff --git a/Newtouch.HIS.SSO/HIS.SSO/appsettings.json b/Newtouch.HIS.SSO/HIS.SSO/appsettings.json index 88d2641a53e550205353d339156178744dc05c2f..09e1a52b0885010e7216276b27472e62bcb5ec4a 100644 --- a/Newtouch.HIS.SSO/HIS.SSO/appsettings.json +++ b/Newtouch.HIS.SSO/HIS.SSO/appsettings.json @@ -7,7 +7,7 @@ }, "AllowedHosts": "*", "RedisConfig": { - "Connection": "61.172.179.6:32079,password=newtouch,syncTimeout=15000", + "Connection": "192.168.9.190:6379,password=newtouch,syncTimeout=15000", "Db": 0 }, "MessageCenter": { @@ -15,7 +15,7 @@ "GroupHub": "/grouphubs/msgcenter" }, "BusinessDB": { - "DefaultConn": "Data Source=61.172.179.6,30557;Initial Catalog={0};User ID=sa;Password=1qazxsw2#;", + "DefaultConn": "Data Source=192.168.9.183,1433;Initial Catalog={0};User ID=sa;Password=a1+b2*c3=d4;", "MainDB": "UnionDb", "MainDBFirstMode": true, //数据库初始化模式,true 默认当前上下文为MainDB,false 默认上下文为 EntityAttr标注 "EnabledMutiDB": true, //开启多库管理 @@ -74,8 +74,8 @@ //自定义扩展配置 AppSettings 默认查找目录 "AppConfigExt": { //菜单是否显示Description - "IS_ShowDescToMenuTitle": false, - + "IS_ShowDescToMenuTitle": false + }, "AccessConfig": { //"页面domain(嵌套其他域页面,并执行js" "要设置成同一域)" @@ -94,7 +94,7 @@ "AppId": "His.SSO", "AppName": "统一平台", "AppAPIHost": { - "SiteStaticHost": "http://61.172.179.73:41173/", + "SiteStaticHost": "http://61.172.179.73:41142/", "SiteBaseAPIHost": "http://192.168.122.159:7001/", "SiteBaseWebHost": "http://61.172.179.73:41133/", "SiteSettAPIHost": "http://192.168.122.159:7002/", @@ -105,18 +105,18 @@ "SiteYfykWebHost": "http://61.172.179.73:41136/", "SiteEmrWebHost": "http://61.172.179.73:41137/", "SiteMrmsWebHost": "http://61.172.179.73:41139/", - "SiteOrWebHost": "http://61.172.179.73:41138/", + "SiteOrWebHost": "http://61.172.179.73:8006/", "SiteHerpWebHost": "http://61.172.179.73:41141/", - "HisAppBaseAPIHost": "http://61.172.179.73:41144/", + "HisAppBaseAPIHost": "http://192.168.9.190:8017/", //任务调度系统 - "ScheduleJobHost": null, + "ScheduleJobHost": "http://61.172.179.73:8010/", //消息中心 - "SiteNoticeCenterHost": null, + "SiteNoticeCenterHost": "http://61.172.179.73:8011/", //接口中心 - "SiteApiManageHost": "http://61.172.179.73:41143/", + "SiteApiManageHost": "http://61.172.179.73:8016/", //鉴权中心 - "SiteAuthCenterHost": "http://61.172.179.73:41142/", - //外部站点 + "SiteAuthCenterHost": "http://61.172.179.73:8015/", + //外部站点 -- 废弃字段 "OuterMediaMeettingAPIHost": "https://61.172.179.30:17015/", //云诊所 "OuterClinicSystemAPIHost": "http://61.172.179.48:19020/" diff --git a/Newtouch.HIS.Sett/Newtouch.Domain/DTO/OutputDto/OutpatientManage/OutPatientRegistrationInfoDTO.cs b/Newtouch.HIS.Sett/Newtouch.Domain/DTO/OutputDto/OutpatientManage/OutPatientRegistrationInfoDTO.cs index 3562b807acfaafab8ab711da269ffc0b22f6f522..ea67b71eeb68c1eae6e2a5638146af703e3dc3d9 100644 --- a/Newtouch.HIS.Sett/Newtouch.Domain/DTO/OutputDto/OutpatientManage/OutPatientRegistrationInfoDTO.cs +++ b/Newtouch.HIS.Sett/Newtouch.Domain/DTO/OutputDto/OutpatientManage/OutPatientRegistrationInfoDTO.cs @@ -189,6 +189,6 @@ /// 挂号来源标签 2020-3-4 新增 /// public string ghlybz { get; set; } - public short queno { get; set; } + //public short? queno { get; set; } } } diff --git a/Newtouch.HIS.Sett/Newtouch.HIS.DomainServices/PatientManage/PatientBasicInfoDmnService.cs b/Newtouch.HIS.Sett/Newtouch.HIS.DomainServices/PatientManage/PatientBasicInfoDmnService.cs index c45b9c00f9bb30452472289c6b5af96670080244..3c3055b4dc0c5c567f412e1575d24cb94cd160d2 100644 --- a/Newtouch.HIS.Sett/Newtouch.HIS.DomainServices/PatientManage/PatientBasicInfoDmnService.cs +++ b/Newtouch.HIS.Sett/Newtouch.HIS.DomainServices/PatientManage/PatientBasicInfoDmnService.cs @@ -1513,6 +1513,7 @@ WHERE zybz NOT IN ( 0, 9 ) and a.OrganizeId=@OrganizeId"); paraList.Add(new SqlParameter("@mjzbz", mjzbz ?? "")); paraList.Add(new SqlParameter("@jiuzhenbz", jiuzhenbz ?? "")); paraList.Add(new SqlParameter("@keyword", "%" + (keyword ?? "") + "%")); + paraList.Add(new SqlParameter("@zzhz", "0")); // pagination = pagination ?? new Pagination(); pagination.page = pagination.page <= 0 ? 1 : pagination.page; @@ -1539,7 +1540,7 @@ WHERE zybz NOT IN ( 0, 9 ) and a.OrganizeId=@OrganizeId"); paraList.Add(outParameter4); var list = this.FindList(@"exec usp_interface_OutPatientRegistrationQuery @orgId, @lastUpdateTime -, @outpatientNumber, @ksCode, @ysgh, @mjzbz, @jiuzhenbz, @keyword +, @outpatientNumber, @ksCode, @ysgh, @mjzbz, @jiuzhenbz, @keyword,@zzhz -- ,@page ,@rows ,@sidx ,@sord -- @@ -2520,17 +2521,18 @@ WHERE a.zyh = @zyh { throw new FailedException("参数异常,身份证号为空"); } - if (string.IsNullOrWhiteSpace(patInfo.kh)) - { - throw new FailedException("参数异常,卡号为空"); - } + //if (string.IsNullOrWhiteSpace(patInfo.kh)) + //{ + // throw new FailedException("参数异常,卡号为空"); + //} using (var db = new EFDbTransaction(this._databaseFactory).BeginTrans()) { - if (patInfo.kh.Count() > 15) - { - // var sfsobj = _sysPatientBasicInfoRepo.IQueryable().Where(p => p.zjh == patInfo.kh && p.OrganizeId == orgId && p.brxz == "1" && p.zt == "1").FirstOrDefault(); - //patInfo.kh = sfsobj.sbbh; - } + //if (patInfo.kh.Count() > 15) + //{ + // var sfsobj = _sysPatientBasicInfoRepo.IQueryable().Where(p => p.zjh == patInfo.kh && p.OrganizeId == orgId && p.brxz == "1" && p.zt == "1").FirstOrDefault(); + //patInfo.kh = sfsobj.sbbh; + // } + var cardEnitty = db.IQueryable(p => p.patid == patid && p.OrganizeId==orgId && p.CardType==patInfo.jzpzlx).First(); var oldpatid = 0; var zybrxxEntity = db.IQueryable(p => p.zyh == zyh && p.OrganizeId == orgId).First(); //if (zybrxxEntity.patid != patid) @@ -2539,10 +2541,10 @@ WHERE a.zyh = @zyh //} oldpatid = zybrxxEntity.patid; //更新zy_brjbxx - zybrxxEntity.brxz = "1"; //普通医保 + zybrxxEntity.brxz = cardEnitty.brxz; //普通医保 zybrxxEntity.zjlx = ((int)EnumZJLX.sfz).ToString(); zybrxxEntity.zjh = patInfo.sfzh; - zybrxxEntity.kh = patInfo.kh; + zybrxxEntity.kh = cardEnitty.CardNo;//patInfo.kh; zybrxxEntity.CardType = patInfo.jzpzlx; zybrxxEntity.CardTypeName = ((EnumCardType)(Convert.ToInt32(patInfo.jzpzlx))).GetDescription(); zybrxxEntity.patid = patid; diff --git a/Newtouch.HIS.Sett/Newtouch.HIS.Sett.API/Configs/database.config b/Newtouch.HIS.Sett/Newtouch.HIS.Sett.API/Configs/database.config index 4475d2a4244718b44e1f15543a0fd4c56c68ece6..73822c711f8a4b03facea7575f86de4d0782b42e 100644 --- a/Newtouch.HIS.Sett/Newtouch.HIS.Sett.API/Configs/database.config +++ b/Newtouch.HIS.Sett/Newtouch.HIS.Sett.API/Configs/database.config @@ -3,17 +3,17 @@ - - - + + + - + + - - + diff --git a/Newtouch.HIS.Sett/Newtouch.HIS.Sett.API/Controllers/BookingRegisterController.cs b/Newtouch.HIS.Sett/Newtouch.HIS.Sett.API/Controllers/BookingRegisterController.cs index b61dac004b8411849cfe5f14b9d38b198d409d1a..f7273d4b9ba17b3c64f7638d38a616a9320cda4d 100644 --- a/Newtouch.HIS.Sett/Newtouch.HIS.Sett.API/Controllers/BookingRegisterController.cs +++ b/Newtouch.HIS.Sett/Newtouch.HIS.Sett.API/Controllers/BookingRegisterController.cs @@ -866,8 +866,8 @@ namespace Newtouch.HIS.Sett.API.Controllers } } } - //异步推送处方收费成功的通知给药房药库 - notifyPDS(jsnmList[0], DateTime.Now, cfnmlist, patInfo.fph, orgId, req.AppID); + //异步推送处方收费成功的通知给药房药库(取消mq的用法) + //notifyPDS(jsnmList[0], DateTime.Now, cfnmlist, patInfo.fph, orgId, req.AppID); resp.data = new SettResp() { RegId = jsnmList[0].ToString(), xjzf = req.TotalAmount, ybzf = 0.00.ToDecimal(), grzf = req.TotalAmount }; resp.msg = ""; resp.code = ResponseResultCode.SUCCESS; diff --git a/Newtouch.HIS.Sett/Newtouch.HIS.Sett.API/Newtouch.HIS.Sett.API.csproj b/Newtouch.HIS.Sett/Newtouch.HIS.Sett.API/Newtouch.HIS.Sett.API.csproj index cd83020f134d02005c5934ce173f275002ceb83d..f2af197624151c9ce7a76ab5dd90ac395ea9bf03 100644 --- a/Newtouch.HIS.Sett/Newtouch.HIS.Sett.API/Newtouch.HIS.Sett.API.csproj +++ b/Newtouch.HIS.Sett/Newtouch.HIS.Sett.API/Newtouch.HIS.Sett.API.csproj @@ -175,7 +175,6 @@
- Web.config diff --git a/Newtouch.HIS.Sett/Newtouch.HIS.Sett.API/Properties/PublishProfiles/PublishProfile.pubxml b/Newtouch.HIS.Sett/Newtouch.HIS.Sett.API/Properties/PublishProfiles/PublishProfile.pubxml new file mode 100644 index 0000000000000000000000000000000000000000..ed6ed5fa2687a9359e10f2872142aea72f03d02e --- /dev/null +++ b/Newtouch.HIS.Sett/Newtouch.HIS.Sett.API/Properties/PublishProfiles/PublishProfile.pubxml @@ -0,0 +1,18 @@ + + + + + true + false + true + Release + Any CPU + FileSystem + ..\..\publish\SettAPI + FileSystem + <_TargetId>Folder + + + \ No newline at end of file diff --git a/Newtouch.HIS.Sett/Newtouch.Infrastructure/EnumDB.cs b/Newtouch.HIS.Sett/Newtouch.Infrastructure/EnumDB.cs index 8e49e5406a4ac9bf6d2b196dfcc57d999c088f17..92361ce4fc395c40112b0b3a62ba1b71433f3854 100644 --- a/Newtouch.HIS.Sett/Newtouch.Infrastructure/EnumDB.cs +++ b/Newtouch.HIS.Sett/Newtouch.Infrastructure/EnumDB.cs @@ -326,7 +326,12 @@ namespace Newtouch.Infrastructure /// 儿童两病门诊 /// [Description("儿童两病门诊")] - etlbmz = 11 + etlbmz = 11, + /// + /// 简易门诊 + /// + [Description("简易门诊")] + jymz = 12 } /// diff --git a/Newtouch.HIS.Sett/Newtouch.Web/Areas/OutpatientManage/Views/OutpatCharge/Index2018.cshtml b/Newtouch.HIS.Sett/Newtouch.Web/Areas/OutpatientManage/Views/OutpatCharge/Index2018.cshtml index 1c95b7e981fb0c5f2a5ae76d6777559692493625..e20665a7eddab5d2fed9e764142f41992679fab2 100644 --- a/Newtouch.HIS.Sett/Newtouch.Web/Areas/OutpatientManage/Views/OutpatCharge/Index2018.cshtml +++ b/Newtouch.HIS.Sett/Newtouch.Web/Areas/OutpatientManage/Views/OutpatCharge/Index2018.cshtml @@ -224,12 +224,12 @@
@Html.Partial("_BottomButtonsView", new Newtouch.HIS.Web.Core.Models.BottomButtonViewModel() { - ShowKeyList = new[] { 4, 6, 7, 8, 9 }, + ShowKeyList = new[] { 4, 6, 7, 8, 9, 10 }, F6Text = "自费转医保", F7Text = "欠费预结", F8Text = "确认收费", F9Text = "转自费收费", - //F10Text = "医保退号", + F10Text = "医保退号", F6Hidden = true, F9Hidden = true, F10Hidden = true, @@ -1377,7 +1377,9 @@ MZJS.jzxx = { mdtrt_id: payoptype.mdtrt_id, psn_no: payoptype.psn_no, med_type: payoptype.med_type, dise_codg: payoptype.dise_codg, hisId: patModel.mzh, bzInfo: bzInfo }; rs = true; } - else { + else { + MZJS.jzxx = { mdtrt_id: payoptype.mdtrt_id, psn_no: payoptype.psn_no, med_type: payoptype.med_type, dise_codg: payoptype.dise_codg, hisId: patModel.mzh, bzInfo: bzInfo }; + rs = true; msg = "医保服务(门诊就诊信息上传A)失败:" + medicalReg.err_msg; } } @@ -1439,6 +1441,9 @@ } /* 逐一撤销 */ mxscobj.chrg_bchno = hcdata.data[i].pch; + if (cqPatInfo.xzqh.slice(0, 3) != "150") { + mxscobj.chrg_bchno = "0000"; + } if (cqPatInfo.ybVer == "shanghaiV5") { mxscobj.ishtqz = "N"; //入参后台取 $.ajax({ @@ -1467,11 +1472,15 @@ success: function (data) { var tfReturn = eval('(' + data + ')'); if (tfReturn) { - if (tfReturn.infcode == "0") { + if (tfReturn.infcode == "0" || tfReturn.infcode == 0) { + var cxpch = hcdata.data[i].pch; + if (cqPatInfo.xzqh.slice(0, 3) != "150") { + cxpch = "0000"; + } $.ajax({ type: "POST", url: "/OutpatientManage/OutpatCharge/UpDateUploadPch", - data: { zymzh: patModel.mzh, cfh: hcdata.data[i].cfh, pch: hcdata.data[i].pch }, + data: { zymzh: patModel.mzh, cfh: hcdata.data[i].cfh, pch: cxpch }, dataType: "json", async: false, success: function (resp) { @@ -1533,7 +1542,11 @@ operatorId: '@(opr.rygh)', operatorName: '@(opr.UserName)', insuplc_admdvs: cqPatInfo.xzqh }; - + if (cqPatInfo.xzqh.slice(0, 3) != "150") + { + jylsh = "0000"; + } + $.ajax({ type: 'POST', url: "/OutpatientManage/OutpatCharge/GetChongQingDetailsMzjsYb", diff --git a/Newtouch.HIS.Sett/Newtouch.Web/Areas/OutpatientManage/Views/OutpatientReg/OutpatientReg2018.cshtml b/Newtouch.HIS.Sett/Newtouch.Web/Areas/OutpatientManage/Views/OutpatientReg/OutpatientReg2018.cshtml index 9949e6be37fcd2bcc8dfc7201fbdb5d295c8299a..11c7480e5ba4cdc3aafe39b6e9fcade742d7d825 100644 --- a/Newtouch.HIS.Sett/Newtouch.Web/Areas/OutpatientManage/Views/OutpatientReg/OutpatientReg2018.cshtml +++ b/Newtouch.HIS.Sett/Newtouch.Web/Areas/OutpatientManage/Views/OutpatientReg/OutpatientReg2018.cshtml @@ -1219,7 +1219,7 @@ { $.loading(false); /* 收费确认及HIS结算入口 */ - ybjs_confirm(); + ybjs_confirm(regInfo); }else{ $.loading(true, '正在进行医保结算,请稍后...'); setTimeout(function () { @@ -1430,23 +1430,24 @@ MZJS.ybjyFeeReturn.pch = MZJS.ghxx.jylsh; MZJS.ybjyFeeReturn.yllb = "12"; } else { - delUploadDetail(ghxx); + delUploadDetail(MZJS.ghxx); $.modalAlert("医保服务(门诊结算)失败:"+ybjsSettReturn.err_msg, 'error'); } } else { - delUploadDetail(ghxx); + delUploadDetail(MZJS.ghxx); $.modalAlert("医保服务(门诊结算)返回信息为空", 'error'); } } else { - delUploadDetail(ghxx); + delUploadDetail(MZJS.ghxx); MZJS.msg="医保服务(门诊预结算)失败:"+ybjsSettReturn1.err_msg; } } else { - delUploadDetail(ghxx); + delUploadDetail(MZJS.ghxx); MZJS.msg="医保服务(门诊预结算)返回信息为空"; } } - function delUploadDetail(ghxx) { + function delUploadDetail(ghxx) { + debugger; var hcGhData = {hisId:ghxx.zymzh, mdtrt_id: ghxx.jzid, chrg_bchno: ghxx.jylsh, psn_no:$("#grbh").val() , operatorId:'@(opr.rygh)', operatorName:'@(opr.UserName)',insuplc_admdvs:$("#cbdbm").val() }; $.ajax({ type: "POST", @@ -1458,6 +1459,16 @@ //此处暂不再做异常提示 } }); + var payoptype = { 'mdtrt_id': ghxx.jzid, "psn_no": cqPatInfo.grbh, insuplc_admdvs: cqPatInfo.xzqh, "operatorId": '@(opr.rygh)', "operatorName": '@(opr.UserName)', 'hisId': ghxx.zymzh, 'ipt_otp_no': ghxx.zymzh }; + $.ajax({ + type: "POST", + url: "http://127.0.0.1:33333/api/YiBao/RegisteredUndo_2202", + dataType: "json", + data: payoptype, + async: false, + success: function (data) { + } + }); } //冲正交易 function gjybjscz(ybjyFeeReturn) @@ -1473,6 +1484,16 @@ async: false, success: function (data) { cqybjyDenySettleReturn = eval('(' + data + ')'); + var payoptype = { 'mdtrt_id': MZJS.ghxx.jzid, "psn_no": cqPatInfo.grbh, insuplc_admdvs: cqPatInfo.xzqh, "operatorId": '@(opr.rygh)', "operatorName": '@(opr.UserName)', 'hisId': MZJS.qzmzh, 'ipt_otp_no': MZJS.qzmzh }; + $.ajax({ + type: "POST", + url: "http://127.0.0.1:33333/api/YiBao/RegisteredUndo_2202", + dataType: "json", + data: payoptype, + async: false, + success: function (data) { + } + }); } }); if (cqybjyDenySettleReturn.infcode != "0"||cqybjyDenySettleReturn.infcode != 0) { diff --git a/Newtouch.HIS.Sett/Newtouch.Web/Areas/PatientManage/Controllers/HospiterResController.cs b/Newtouch.HIS.Sett/Newtouch.Web/Areas/PatientManage/Controllers/HospiterResController.cs index 1ceb1b913b6e0ae61dfcebf4e72ab370dce929e1..cf14bd4348c12bea6df344da46a20abd551c5820 100644 --- a/Newtouch.HIS.Sett/Newtouch.Web/Areas/PatientManage/Controllers/HospiterResController.cs +++ b/Newtouch.HIS.Sett/Newtouch.Web/Areas/PatientManage/Controllers/HospiterResController.cs @@ -500,10 +500,10 @@ namespace Newtouch.HIS.Web.Areas.PatientManage.Controllers { throw new FailedException("有未结算的住院费用记录,不能取消入院。"); } - if (_PatientBasicInfoDmnService.BoolRuQu(zyh, this.OrganizeId)) - { - throw new FailedException("该病人已在病区中,不能取消入院!"); - } + //if (_PatientBasicInfoDmnService.BoolRuQu(zyh, this.OrganizeId)) + //{ + // throw new FailedException("该病人已在病区中,不能取消入院!"); + //} _PatientBasicInfoDmnService.CancelAdmission(zyh, this.OrganizeId); return Success("取消入院成功!"); } @@ -517,10 +517,10 @@ namespace Newtouch.HIS.Web.Areas.PatientManage.Controllers { throw new FailedException("有未结算的住院费用记录,不能取消入院。"); } - if (_PatientBasicInfoDmnService.BoolRuQu(zyh, this.OrganizeId)) - { - throw new FailedException("该病人已在病区中,不能取消入院!"); - } + //if (_PatientBasicInfoDmnService.BoolRuQu(zyh, this.OrganizeId)) + //{ + // throw new FailedException("该病人已在病区中,不能取消入院!"); + //} return Success("取消入院成功!"); } /// diff --git a/Newtouch.HIS.Sett/Newtouch.Web/Areas/PatientManage/Views/Inpatient/InPatientQueryIndex.cshtml b/Newtouch.HIS.Sett/Newtouch.Web/Areas/PatientManage/Views/Inpatient/InPatientQueryIndex.cshtml index 3f048bbb6e3c1a1a0de63131126b9dc310617ee7..ebdd10bf719bc59abd71053dfcb231ebaca0cba2 100644 --- a/Newtouch.HIS.Sett/Newtouch.Web/Areas/PatientManage/Views/Inpatient/InPatientQueryIndex.cshtml +++ b/Newtouch.HIS.Sett/Newtouch.Web/Areas/PatientManage/Views/Inpatient/InPatientQueryIndex.cshtml @@ -620,16 +620,16 @@ var newzyh = $('#sel_newzyh').val(); var title = "读卡方式"; var url = "/PatientManage/Inpatient/dkfsxz?zyh=" + zyh + "&ryfs=" + ryfs + "&ydsfz=" + ydsfz + "&newzyh=" + newzyh; - if ('@YB_Jzpzl' === 'ON') { + @*if ('@YB_Jzpzl' === 'ON') { title = "自费转医保"; url = "/PatientManage/Inpatient/ZFToYBForm?zyh=" + zyh + "&ryfs=" + ryfs + "&ydsfz=" + ydsfz + "&newzyh=" + newzyh; - } + }*@ $.modalOpen({ id: "dqfsxz", title: title, url: url, - width: "380px", - height: "380px", + width: "480px", + height: "480px", btn: ['', '关闭'], btnclass: ['', 'btn btn-danger'], callBack: function (iframeId) { diff --git a/Newtouch.HIS.Sett/Newtouch.Web/Areas/PatientManage/Views/Inpatient/ZFToYBForm.cshtml b/Newtouch.HIS.Sett/Newtouch.Web/Areas/PatientManage/Views/Inpatient/ZFToYBForm.cshtml index ad8208853892204627e0833dd09e378256f21e90..8647d30d7a1a11247cf11ab9e2f4190b3be451cc 100644 --- a/Newtouch.HIS.Sett/Newtouch.Web/Areas/PatientManage/Views/Inpatient/ZFToYBForm.cshtml +++ b/Newtouch.HIS.Sett/Newtouch.Web/Areas/PatientManage/Views/Inpatient/ZFToYBForm.cshtml @@ -111,6 +111,8 @@ var newzyh = $.request('newzyh'); var zffs = $.request('zffs'); var khxx = $.request('khxx'); + var patName = $.request('patName'); + var patsfz = $.request('patsfz'); var jzh = ""; var _psn_cert_type = ""; var _mdtrt_cert_no = ""; @@ -134,6 +136,7 @@ var cardInfo2; var cardInfo3; var yibaoCardInfo; + var brxzobj = { brxz: "1", brxzmc: "普通医保" }; var cqPatInfo = {};//患者读卡信息 //入院办理信息(医保接口返回) var ryblInfo; @@ -274,7 +277,9 @@ return; } + function funcStep4(nextStepCallback) { + debugger; $.loading(true, '正在医保入院办理...'); setTimeout(function () { if(cqPatInfo.ybVer == "shanghaiV5") { @@ -338,7 +343,7 @@ dise_codg: "", dise_name: "" }; - + $.ajax({ type: "POST", url: "http://127.0.0.1:33333/api/YiBao/HospitaMdtrtinfo_2401", @@ -541,11 +546,32 @@ } function gjyb() { + debugger; var res = { "success": "true", "msg": "" }; - setTimeout(function () { - var url = "http://127.0.0.1:33333/api/YiBao/CardecInfo_1161";; - var payoptype = { "mdtrt_cert_type": "03", "operatorId": '@(opr.rygh)', "operatorName": '@(opr.UserName)', "businessType": "01101", "officeId": "0201", "officeName": "内科" }; - if ('@YB_Jzpzl' != 'ON') { + // setTimeout(function () { + var url = "http://127.0.0.1:33333/api/YiBao/CardecInfo_1161"; + var payoptype = { "mdtrt_cert_type": "03", "mdtrt_cert_no": patsfz, "operatorId": '@(opr.rygh)', "operatorName": '@(opr.UserName)', "businessType": "01101", "officeId": "0201", "officeName": "内科" }; + if (zffs === "sm")//电子凭证 + { + payoptype.mdtrt_cert_type = "01"; + url = "http://127.0.0.1:33333/api/YiBao/CardecInfo_1162"; + } + if (zffs === "sfz") {//身份证 + payoptype.mdtrt_cert_type = "02"; + payoptype.mdtrt_cert_no = patsfz; + payoptype.psn_name = patName; + url = "http://127.0.0.1:33333/api/YiBao/CardecInfo_1163"; + } + if (zffs === "ck") {//医保磁卡 + payoptype.mdtrt_cert_type = "00"; + payoptype.mdtrt_cert_no = patsfz; + url = "http://127.0.0.1:33333/api/YiBao/CardecInfo_1101"; + } + if (zffs === "sl") {//刷脸 + payoptype.mdtrt_cert_type = "02"; + url = "http://127.0.0.1:33333/api/YiBao/CardecInfo_1164"; + } + @*if ('@YB_Jzpzl' != 'ON') { if (zffs === "sm") { url = "http://127.0.0.1:33333/api/YiBao/CardecInfo_1162"; } @@ -559,7 +585,7 @@ payoptype.mdtrt_cert_no = khxx; url = "http://127.0.0.1:33333/api/YiBao/CardecInfo_1101"; } - } + }*@ $.ajax({ type: "POST", url: url, @@ -571,8 +597,9 @@ } }); $.loading(false); + debugger; if (yibaoCardInfo) { - if (yibaoCardInfo.infcode == "0") { + if (yibaoCardInfo.infcode == "0" || yibaoCardInfo.infcode == 0) { if ('@YB_Jzpzl' === 'ON') { var cardecinfo = yibaoCardInfo.output.cardecinfo; switch (cardecinfo.mdtrt_cert_type) { @@ -598,8 +625,13 @@ cqPatInfo.sbkh = cardInfo3.cardno; } if (zffs == "3") { + cardInfo3 = yibaoCardInfo.output.cardecinfo;//卡信息 cqPatInfo.ecToken = cardInfo3.ecToken; } + getbrxz(cardInfo2.insutype); + yibaoCardInfo.brxzdm = brxzobj.brxz; + yibaoCardInfo.brxzmc = brxzobj.brxzmc; + cqPatInfo.xm = cardInfo1.psn_name; cqPatInfo.sfzh = cardInfo1.certno; cqPatInfo.xzqh = cardInfo2.insuplc_admdvs; @@ -608,8 +640,11 @@ cqPatInfo.grbh = cardInfo1.psn_no; cqPatInfo.jzlx = zffs; cqPatInfo.ybVer = "gjyb"; + cqPatInfo.mdtrt_cert_type = payoptype.mdtrt_cert_type; + cqPatInfo.mdtrt_cert_no = cqPatInfo.ecToken; yibaoCardInfo.readCardCardType = payoptype.mdtrt_cert_type; + //yibaoCardInfo.kh = jzpzlx != "3" ? sbkobj.sbkh : null; yibaoCardInfo.kh = payoptype.mdtrt_cert_type == "01" ? cardInfo3.ecToken : (payoptype.mdtrt_cert_type == "02" ? cardInfo1.certno : cardInfo3.cardno); yibaoCardInfo.qtjz = zffs != "2" ? cardInfo1.certno : null; yibaoCardInfo.ybVer = "gjyb"; @@ -642,18 +677,43 @@ // dataType: "json", // }); //} - + return res; } else { res.success = false; - res.msg = "刷卡失败:" + yibaoCardInfo.err_ms; + res.msg = "医保服务【1101】(获取医保病人信息失败):" + yibaoCardInfo.err_msg; + return res; } } else { res.success = false; res.msg = "刷卡获取医保信息失败!失败原因:医保中心无信息返回,请重试!"; + return res; } - }, 50); + // }, 50); - return res; + } + function getbrxz(brlx) { + $.ajax({ + url: "/PatientManage/HospiterRes/GetBrxzbyxzlx", + data: { xzlx: brlx }, + dataType: "json", + async: false, + cache: false, + success: function (data) { + if (!!data) { + $.each(data, function (idx, val) { + if (val.insutype && val.insutype == brlx) { + brxzobj.brxz = val.brxz; + brxzobj.brxzmc = val.brxzmc; + } + }); + } + return brxzobj; + }, + error: function (request, error, ex) { + return brxzobj; + } + }); + } \ No newline at end of file diff --git a/Newtouch.HIS.Sett/Newtouch.Web/Areas/PatientManage/Views/Inpatient/dkfsxz.cshtml b/Newtouch.HIS.Sett/Newtouch.Web/Areas/PatientManage/Views/Inpatient/dkfsxz.cshtml index d0163e1149c10902380dd36c62dc817f35696ad9..12c0015fa748f744fe2e3462ce4d25ea7940e730 100644 --- a/Newtouch.HIS.Sett/Newtouch.Web/Areas/PatientManage/Views/Inpatient/dkfsxz.cshtml +++ b/Newtouch.HIS.Sett/Newtouch.Web/Areas/PatientManage/Views/Inpatient/dkfsxz.cshtml @@ -9,6 +9,8 @@

+
+

@@ -20,8 +22,9 @@ var newzyh = $.request('newzyh'); var medicalInsurance = '@medicalInsurance'; var zffs; + //医保卡 function skOnClick(patid) { - + debugger; zffs = "sk" $.modalOpen({ id: "ZFToYBForm", @@ -37,23 +40,57 @@ }); }; + //刷脸 + function slOnClick(patid) { + debugger; + zffs = "sl" + $.modalOpen({ + id: "ZFToYBForm", + title: "自费转医保", + url: "/PatientManage/Inpatient/ZFToYBForm?zyh=" + zyh + "&ryfs=" + ryfs + "&ydsfz=" + ydsfz + "&newzyh=" + newzyh + "&zffs=" + zffs, + width: "550px", + height: "380px", + btn: ['', '关闭'], + btnclass: ['', 'btn btn-danger'], + success: function (iframeId) { + $.modalClose(); + } + }); + }; + //电子凭证 function smOnClick(patid) { + debugger; zffs = "sm"; $.modalOpen({ - id: "sbkhInput", - title: "卡号输入", - url: "/OutpatientManage/OutpatientReg/OutPatientSbkhInput?t=" + Math.random() + "&medicalInsurance=" + medicalInsurance, - width: "300px", - height: "150px", - callBack: function (iframeId) { - top.frames[iframeId].PatSbkhData(); + id: "ZFToYBForm", + title: "自费转医保", + url: "/PatientManage/Inpatient/ZFToYBForm?zyh=" + zyh + "&ryfs=" + ryfs + "&ydsfz=" + ydsfz + "&newzyh=" + newzyh + "&zffs=" + zffs, + width: "550px", + height: "380px", + btn: ['', '关闭'], + btnclass: ['', 'btn btn-danger'], + success: function (iframeId) { + $.modalClose(); } + }); + //$.modalOpen({ + // id: "sbkhInput", + // title: "卡号输入", + // url: "/OutpatientManage/OutpatientReg/OutPatientSbkhInput?t=" + Math.random() + "&medicalInsurance=" + medicalInsurance, + // width: "300px", + // height: "150px", + // callBack: function (iframeId) { + // top.frames[iframeId].PatSbkhData(); + // } + //}); //openform(); }; + //医保磁卡 function ckOnClick(patid) { + debugger; zffs = "ck"; $.modalOpen({ id: "sbkhInput", @@ -67,11 +104,29 @@ }); //openform(); }; + //身份证读卡 + function sfzOnClick(patid) { + debugger; + zffs = "sfz"; + $.modalOpen({ + id: "sfzhInput", + title: "身份证号输入", + url: "/OutpatientManage/OutpatientReg/OutPatientSfzhInput?t=" + Math.random() + "&medicalInsurance=" + medicalInsurance + "&topform=" + "1", + width: "300px", + height: "150px", + callBack: function (iframeId) { + top.frames[iframeId].PatSfzhData(); + } + }); + //openform(); + }; + function openform(khxx) { + debugger; $.modalOpen({ id: "ZFToYBForm", title: "自费转医保", - url: "/PatientManage/Inpatient/ZFToYBForm?zyh=" + zyh + "&ryfs=" + ryfs + "&ydsfz=" + ydsfz + "&newzyh=" + newzyh + "&zffs=" + zffs + "&khxx=" + khxx, + url: "/PatientManage/Inpatient/ZFToYBForm?zyh=" + zyh + "&ryfs=" + ryfs + "&ydsfz=" + ydsfz + "&newzyh=" + newzyh + "&zffs=" + zffs + "&patsfz=" + khxx.sfzh + "&patName=" + khxx.name, width: "550px", height: "380px", btn: ['', '关闭'], @@ -81,7 +136,12 @@ } }); } + function GetReadCardInfo(khxx) { + debugger; + openform(khxx); + } function readCard(khxx) { + debugger; switch (medicalInsurance) { case "shanghai": openform(khxx.sbkh); diff --git a/Newtouch.HIS.Sett/Newtouch.Web/Areas/ReportManage/Views/Report/Hospitalizationcost.cshtml b/Newtouch.HIS.Sett/Newtouch.Web/Areas/ReportManage/Views/Report/Hospitalizationcost.cshtml index 9fb78a947409993136ee8f9abc831cdd2cef2529..07784c26967cf071896cb6af44e0ff3e0a444bc7 100644 --- a/Newtouch.HIS.Sett/Newtouch.Web/Areas/ReportManage/Views/Report/Hospitalizationcost.cshtml +++ b/Newtouch.HIS.Sett/Newtouch.Web/Areas/ReportManage/Views/Report/Hospitalizationcost.cshtml @@ -78,6 +78,7 @@ // $('#jsrq').val($.getDate()); //} $('#zyh').val($thistr.attr('data-zyh')); + $('#ksrq').val($thistr.attr('data-ryrq')); //submit(); } }, diff --git a/Newtouch.HIS.Sett/Newtouch.Web/Areas/SystemManage/Controllers/FinancialInvoiceController.cs b/Newtouch.HIS.Sett/Newtouch.Web/Areas/SystemManage/Controllers/FinancialInvoiceController.cs index c6f7155ebe50336fe922afe4dff104d1af9655b9..7972b715d75191cff05dc14e2da4e078566e5b18 100644 --- a/Newtouch.HIS.Sett/Newtouch.Web/Areas/SystemManage/Controllers/FinancialInvoiceController.cs +++ b/Newtouch.HIS.Sett/Newtouch.Web/Areas/SystemManage/Controllers/FinancialInvoiceController.cs @@ -19,6 +19,11 @@ namespace Newtouch.HIS.Web.Areas.SystemManage.Controllers return View(); } + public ActionResult InvoiceQuery() + { + return View(); + } + //[HandlerAuthorize] public override ActionResult Form() { diff --git a/Newtouch.HIS.Sett/Newtouch.Web/Configs/database.config b/Newtouch.HIS.Sett/Newtouch.Web/Configs/database.config index 7bc43f52c3e2517776efd31978f23346e299f267..f3b722e28cd746fae221ec7599e660fccbba0253 100644 --- a/Newtouch.HIS.Sett/Newtouch.Web/Configs/database.config +++ b/Newtouch.HIS.Sett/Newtouch.Web/Configs/database.config @@ -1,21 +1,10 @@ + + + - - - - - - - - - - - - - - - - + + \ No newline at end of file diff --git a/Newtouch.HIS.Sett/Newtouch.Web/Configs/dyyy/database.config b/Newtouch.HIS.Sett/Newtouch.Web/Configs/dyyy/database.config new file mode 100644 index 0000000000000000000000000000000000000000..7bc43f52c3e2517776efd31978f23346e299f267 --- /dev/null +++ b/Newtouch.HIS.Sett/Newtouch.Web/Configs/dyyy/database.config @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Newtouch.HIS.Sett/Newtouch.Web/Configs/dyyy/system.config b/Newtouch.HIS.Sett/Newtouch.Web/Configs/dyyy/system.config new file mode 100644 index 0000000000000000000000000000000000000000..323976a033d2e63546b5825590f591ccc6fcb38c --- /dev/null +++ b/Newtouch.HIS.Sett/Newtouch.Web/Configs/dyyy/system.config @@ -0,0 +1,108 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Newtouch.HIS.Sett/Newtouch.Web/Configs/system.config b/Newtouch.HIS.Sett/Newtouch.Web/Configs/system.config index 323976a033d2e63546b5825590f591ccc6fcb38c..fcfbd1d6bf7c9004e11afeb80f6375ba37937907 100644 --- a/Newtouch.HIS.Sett/Newtouch.Web/Configs/system.config +++ b/Newtouch.HIS.Sett/Newtouch.Web/Configs/system.config @@ -1,108 +1,107 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Newtouch.HIS.Sett/Newtouch.Web/Newtouch.HIS.Sett.Web.csproj b/Newtouch.HIS.Sett/Newtouch.Web/Newtouch.HIS.Sett.Web.csproj index b4e7a4940c4ecaa50c4af92519dde8556e7357e0..26d5e2baf03afa742e06d84cfc0477c6f3d6e18d 100644 --- a/Newtouch.HIS.Sett/Newtouch.Web/Newtouch.HIS.Sett.Web.csproj +++ b/Newtouch.HIS.Sett/Newtouch.Web/Newtouch.HIS.Sett.Web.csproj @@ -963,12 +963,11 @@ + + - - - diff --git a/Newtouch.HIS.Sett/Newtouch.Web/Properties/PublishProfiles/FolderProfile.pubxml b/Newtouch.HIS.Sett/Newtouch.Web/Properties/PublishProfiles/FolderProfile.pubxml index 87b8181272167e445227b3665f3ac341fb5f94c6..9c4acfdc7c6634120eb5ae2c6f3ce08c821caee6 100644 --- a/Newtouch.HIS.Sett/Newtouch.Web/Properties/PublishProfiles/FolderProfile.pubxml +++ b/Newtouch.HIS.Sett/Newtouch.Web/Properties/PublishProfiles/FolderProfile.pubxml @@ -4,13 +4,13 @@ https://go.microsoft.com/fwlink/?LinkID=208121. --> - true - false - true + True + False + True Release Any CPU FileSystem - ..\..\publish\Sett + D:\Pulish\his FileSystem <_TargetId>Folder diff --git a/Newtouch.HIS.Sett/Newtouch.Web/Properties/PublishProfiles/PublishProfile.pubxml b/Newtouch.HIS.Sett/Newtouch.Web/Properties/PublishProfiles/PublishProfile.pubxml new file mode 100644 index 0000000000000000000000000000000000000000..87b8181272167e445227b3665f3ac341fb5f94c6 --- /dev/null +++ b/Newtouch.HIS.Sett/Newtouch.Web/Properties/PublishProfiles/PublishProfile.pubxml @@ -0,0 +1,18 @@ + + + + + true + false + true + Release + Any CPU + FileSystem + ..\..\publish\Sett + FileSystem + <_TargetId>Folder + + + \ No newline at end of file diff --git a/Newtouch.HIS.Static/Newtouch.HIS.Static/Newtouch.HIS.Static.csproj b/Newtouch.HIS.Static/Newtouch.HIS.Static/Newtouch.HIS.Static.csproj index f061add6a5fc1ffa1be0b2b74bdc857ce4ebe414..9f043c6612660658e0aaa0f8d28200fff2e666e9 100644 --- a/Newtouch.HIS.Static/Newtouch.HIS.Static/Newtouch.HIS.Static.csproj +++ b/Newtouch.HIS.Static/Newtouch.HIS.Static/Newtouch.HIS.Static.csproj @@ -80,6 +80,7 @@ + diff --git a/Newtouch.HIS.Static/Newtouch.HIS.Static/Properties/PublishProfiles/PublishProfile.pubxml b/Newtouch.HIS.Static/Newtouch.HIS.Static/Properties/PublishProfiles/PublishProfile.pubxml new file mode 100644 index 0000000000000000000000000000000000000000..4ee8fd3acdb6146f484eef1842c36163e276e088 --- /dev/null +++ b/Newtouch.HIS.Static/Newtouch.HIS.Static/Properties/PublishProfiles/PublishProfile.pubxml @@ -0,0 +1,18 @@ + + + + + true + false + true + Release + Any CPU + FileSystem + ..\..\publish\Static + FileSystem + <_TargetId>Folder + + + \ No newline at end of file diff --git a/Newtouch.HIS.Static/Newtouch.HIS.Static/img/ophislogo.ico b/Newtouch.HIS.Static/Newtouch.HIS.Static/img/ophislogo.ico new file mode 100644 index 0000000000000000000000000000000000000000..e16766d4e91327e4e1088c88e184be63b3de3042 Binary files /dev/null and b/Newtouch.HIS.Static/Newtouch.HIS.Static/img/ophislogo.ico differ diff --git a/Newtouch.HIS.WebAPI.Manage/NewtouchHIS.AuthenticationCenter/Properties/PublishProfiles/PublishProfile.pubxml b/Newtouch.HIS.WebAPI.Manage/NewtouchHIS.AuthenticationCenter/Properties/PublishProfiles/PublishProfile.pubxml new file mode 100644 index 0000000000000000000000000000000000000000..ce7476861d744d913f884b574b803c9091bb42a0 --- /dev/null +++ b/Newtouch.HIS.WebAPI.Manage/NewtouchHIS.AuthenticationCenter/Properties/PublishProfiles/PublishProfile.pubxml @@ -0,0 +1,18 @@ + + + + + true + false + true + Release + Any CPU + FileSystem + ..\..\publish\AuthCenterAPI + FileSystem + <_TargetId>Folder + + + \ No newline at end of file diff --git a/Newtouch.HIS.WebAPI.Manage/NewtouchHIS.WebAPI.Manage/Properties/PublishProfiles/PublishProfile.pubxml b/Newtouch.HIS.WebAPI.Manage/NewtouchHIS.WebAPI.Manage/Properties/PublishProfiles/PublishProfile.pubxml new file mode 100644 index 0000000000000000000000000000000000000000..7295ce854c8f331df8bbe1480c73ac8be4029abe --- /dev/null +++ b/Newtouch.HIS.WebAPI.Manage/NewtouchHIS.WebAPI.Manage/Properties/PublishProfiles/PublishProfile.pubxml @@ -0,0 +1,18 @@ + + + + + true + false + true + Release + Any CPU + FileSystem + ..\..\publish\ApiManage + FileSystem + <_TargetId>Folder + + + \ No newline at end of file diff --git a/SqlServer/ADDDataBase/CreateDDLChangeLogTable.sql b/SqlServer/ADDDataBase/CreateDDLChangeLogTable.sql new file mode 100644 index 0000000000000000000000000000000000000000..4199965b1729645fe537f53e66808a775a1868d6 Binary files /dev/null and b/SqlServer/ADDDataBase/CreateDDLChangeLogTable.sql differ diff --git a/SqlServer/ADDDataBase/CreateTrackDDLChanges.sql b/SqlServer/ADDDataBase/CreateTrackDDLChanges.sql new file mode 100644 index 0000000000000000000000000000000000000000..e6064a862f8b1947b92b3e4f3f9e4f7717777a6b --- /dev/null +++ b/SqlServer/ADDDataBase/CreateTrackDDLChanges.sql @@ -0,0 +1,26 @@ +CREATE TRIGGER TrackDDLChanges +ON DATABASE +FOR CREATE_PROCEDURE, ALTER_PROCEDURE, DROP_PROCEDURE, + CREATE_FUNCTION, ALTER_FUNCTION, DROP_FUNCTION, + CREATE_TABLE, ALTER_TABLE, DROP_TABLE +AS +BEGIN + DECLARE @EventData XML = EVENTDATA(); + + INSERT INTO DDLChangeLog ( + EventType, + ObjectName, + ObjectType, + TSQLCommand, + LoginName, + ChangeDate + ) + VALUES ( + @EventData.value('(/EVENT_INSTANCE/EventType)[1]', 'NVARCHAR(100)'), + @EventData.value('(/EVENT_INSTANCE/ObjectName)[1]', 'NVARCHAR(256)'), + @EventData.value('(/EVENT_INSTANCE/ObjectType)[1]', 'NVARCHAR(100)'), + @EventData.query('(/EVENT_INSTANCE/TSQLCommand)[1]').value('.', 'NVARCHAR(MAX)'), -- ԭʼз + @EventData.value('(/EVENT_INSTANCE/LoginName)[1]', 'NVARCHAR(256)'), + GETDATE() + ); +END; diff --git a/SqlServer/README.md b/SqlServer/README.md new file mode 100644 index 0000000000000000000000000000000000000000..30117c6862d0b1775ae26bd021e4f1b64457b287 --- /dev/null +++ b/SqlServer/README.md @@ -0,0 +1,30 @@ +# HIS数据库的操作规范 + 注意: 本教程使用的是SQL Server 2022版本 + +## 使用 +1. V1.8版本使用 `./V1.8/V1.8.zip` 进行还原 + +## 备份还原 +1. 备份使用 `./Script/Backup.ps1` 该文件按天,一次性备份所有的数据库和定时脚本 + 1. 修改备份路径为自己想要的path + 2. 放在数据库服务器上执行 +2. 还原使用 `./Script/Restore.ps1` + 1. 放在数据库服务器上执行 + 2. BackupFolder 是备份的源数据 + 3. DataFolder 是SQLServer的安装路径(脚本中的安装路径是`C:\Program Files\Microsoft SQL Server`自行寻找自己的路径) +3. `./Script/SqlServer全量备份和还原.md` 该数据库脚本可以直接在SSMS执行,但是只能备份/还原 数据库。 +4. 数据库的管理员账号 000000/000000 + +## 新增数据库要求 + 新增的数据库库必须执行 `./ADDDataBase/CreateDDLChangeLogTable.sql` 和 `./ADDDataBase/CreateTrackDDLChanges.sql` 保存表结构/存储过程变更的表和触发器 + +## 数据库的变更 + 1. 以1.8为数据库原型,后续版本不提供数据库的完整备份,都是使用数据库变更文件进行执行 + 2. 使用脚本 `./Script/GetChange.ps1` 进行对数据库变更的收集 + 1. 修改文件的生成目录 + 2. 修改获取的时间段 + 3. 会获得一个如 `20241101_20241110`的文件夹,直接拖入对应的版本目录下提交即可。(如直接拖入V1.8文件夹) + 3. 使用脚本 `./Script/ExecSqlInFolder.ps1` 执行一个文件夹下的所有文件 + +## 数据库的清理(敬请期待) + 为方便用户体验查看,当前数据库有少量业务数据,可使用如下脚本进行清理 \ No newline at end of file diff --git a/SqlServer/Script/Backup.ps1 b/SqlServer/Script/Backup.ps1 new file mode 100644 index 0000000000000000000000000000000000000000..6d0fffecc437879eeec77f21f3b0595c358f8e7a --- /dev/null +++ b/SqlServer/Script/Backup.ps1 @@ -0,0 +1,74 @@ +# SQL Server 实例名称 +$ServerName = "." # 替换为你的服务器名称 +$BaseBackupFolder = "C:\SQLBackup" # 基本备份路径 +$DateFolder = (Get-Date -Format "yyyyMMdd") # 生成带日期的文件夹名称 + +# 生成数据库备份路径 +$BackupFolder = Join-Path -Path $BaseBackupFolder -ChildPath $DateFolder + +# 确保备份目录存在 +if (!(Test-Path -Path $BackupFolder)) { + New-Item -ItemType Directory -Path $BackupFolder +} + +# 获取所有数据库名称并过滤空白行 +$query = "SELECT name FROM sys.databases WHERE state_desc = 'ONLINE' AND name NOT IN ('master', 'tempdb', 'model', 'msdb','DWDiagnostics','DWConfiguration','DWQueue')" +$Databases = sqlcmd -S $ServerName -Q $query | Select-Object -Skip 2 | Where-Object { $_ -ne "" } # 跳过空白行 + +foreach ($Database in $Databases) { + $DatabaseName = $Database.Trim() + if ($DatabaseName) { # 确保数据库名称不为空 + $BackupFile = Join-Path -Path $BackupFolder -ChildPath "$($DatabaseName)_$(Get-Date -Format 'yyyyMMdd').bak" + + # 备份数据库的 T-SQL 脚本 + $backupQuery = "BACKUP DATABASE [$DatabaseName] TO DISK = N'$BackupFile' WITH NOFORMAT, INIT, NAME = N'$DatabaseName-Full Database Backup', SKIP, NOREWIND, NOUNLOAD, STATS = 10" + + Write-Host "正在备份数据库: $DatabaseName 到 $BackupFile" + try { + sqlcmd -S $ServerName -Q $backupQuery + Write-Host "成功备份数据库: $DatabaseName" + } catch { + Write-Host "备份数据库 $DatabaseName 时出错: $_" + } + } +} + +Write-Host "所有数据库已备份至 $BackupFolder" +Write-Host " " +Write-Host "==========开始备份数据库作业==========" +$JobBackupFolderName = "BackUpJobs" + +# 生成数据库备份路径 +$JobBackupFolder = Join-Path -Path $BackupFolder -ChildPath $JobBackupFolderName + +# 确保备份目录存在 +if (!(Test-Path -Path $JobBackupFolder)) { + New-Item -ItemType Directory -Path $JobBackupFolder +} + +# 加载 SQL Server SMO 依赖项 +[System.Reflection.Assembly]::LoadWithPartialName('Microsoft.SqlServer.Smo') | Out-Null + +# 创建 SQL Server 对象 +$Server = New-Object Microsoft.SqlServer.Management.Smo.Server $ServerName + +# 遍历所有作业并生成脚本 +foreach ($Job in $Server.JobServer.Jobs) { + $JobNameClean = $Job.Name -replace '[\\/:*?"<>|]', '_' # 清理作业名称 + $FilePath = Join-Path -Path $JobBackupFolder -ChildPath "$JobNameClean.sql" + + Write-Host "正在备份作业: $Job.Name 到 $FilePath" # 输出路径检查 + + # 添加 USE [msdb] 和 GO 到每个作业脚本 + $Header = @" +USE [msdb] +GO + +"@ + + # 将作业脚本保存到文件 + $Header | Out-File -FilePath $FilePath -Encoding utf8 + $Job.Script() | Out-File -FilePath $FilePath -Encoding utf8 -Append +} + +Write-Host "所有作业已备份至 $JobBackupFolder" diff --git a/SqlServer/Script/BackupJobs.ps1 b/SqlServer/Script/BackupJobs.ps1 new file mode 100644 index 0000000000000000000000000000000000000000..d923d587b1a43e1394f1ac2e9e8814d28c25d31f --- /dev/null +++ b/SqlServer/Script/BackupJobs.ps1 @@ -0,0 +1,35 @@ +# SQL Server ʵ +$ServerName = "." # 滻Ϊʵʷ +$BackupFolder = "C:\Backup\BackUpJobs" + +# ȷĿ¼ +if (!(Test-Path -Path $BackupFolder)) { + New-Item -ItemType Directory -Path $BackupFolder +} + +# SQL Server SMO +[System.Reflection.Assembly]::LoadWithPartialName('Microsoft.SqlServer.Smo') | Out-Null + +# SQL Server +$Server = New-Object Microsoft.SqlServer.Management.Smo.Server $ServerName + +# ҵɽű +foreach ($Job in $Server.JobServer.Jobs) { + $JobNameClean = $Job.Name -replace '[\\/:*?"<>|]', '_' # ҵ + $FilePath = Join-Path -Path $BackupFolder -ChildPath "$JobNameClean.sql" + + Write-Host "ڱҵ: $Job.Name $FilePath" # · + + # USE [msdb] GO ÿҵű + $Header = @" +USE [msdb] +GO + +"@ + + # ҵű浽ļ + $Header | Out-File -FilePath $FilePath -Encoding utf8 + $Job.Script() | Out-File -FilePath $FilePath -Encoding utf8 -Append +} + +Write-Host "ҵѱ $BackupFolder" diff --git a/SqlServer/Script/ExecSqlInFolder.ps1 b/SqlServer/Script/ExecSqlInFolder.ps1 new file mode 100644 index 0000000000000000000000000000000000000000..3db70f110726c3570601b5ceab60f85a0b5d12eb --- /dev/null +++ b/SqlServer/Script/ExecSqlInFolder.ps1 @@ -0,0 +1,37 @@ +# 设置 SQL Server 实例和文件夹路径 +$SqlServerInstance = "." # 替换为你的 SQL Server 实例 +$SqlFilesDirectory = "C:\Users\Administrator\Desktop\test" # 替换为你的 SQL 文件所在路径 +$ErrorDirectory = "$SqlFilesDirectory\err" + +# 创建错误目录,如果不存在 +if (-not (Test-Path -Path $ErrorDirectory)) { + New-Item -ItemType Directory -Path $ErrorDirectory +} + +# 获取所有 SQL 文件 +$sqlFiles = Get-ChildItem -Path $SqlFilesDirectory -Filter *.sql + +foreach ($file in $sqlFiles) { + # 读取 SQL 文件内容 + $sqlContent = Get-Content -Path $file.FullName -Raw + + try { + # 执行 SQL 语句 + Invoke-Sqlcmd -ServerInstance $SqlServerInstance -Database "Newtouch_His_Log" -Query $sqlContent + Write-Host "成功执行: $($file.Name)" + } catch { + # 记录错误文件 + $errorMessage = $_.Exception.Message + $errorFilePath = Join-Path -Path $ErrorDirectory -ChildPath $file.Name + + # 将错误信息写入到错误文件中 + $errorLog = "Error executing $($file.Name): $errorMessage`r`n" + Add-Content -Path $errorFilePath -Value $errorLog + + # 复制出错的 SQL 文件到错误目录 + Copy-Item -Path $file.FullName -Destination $ErrorDirectory -Force + + Write-Host "执行失败: $($file.Name)。错误信息已记录到: $errorFilePath" + Write-Host "出错的文件已复制到错误目录: $ErrorDirectory" + } +} diff --git a/SqlServer/Script/GetChange.ps1 b/SqlServer/Script/GetChange.ps1 new file mode 100644 index 0000000000000000000000000000000000000000..f98b009f776d1dca5c4e5124d944d1998525f35a --- /dev/null +++ b/SqlServer/Script/GetChange.ps1 @@ -0,0 +1,70 @@ +# 设置 SQL Server 实例名称 +$ServerName = "." # 替换为你的 SQL Server 实例名称 +$OutputFolder = "C:\Users\Administrator\Desktop\SQLChange" " # 输出目录路径 +$StartDate = "2024-11-01" # 起始日期 +$EndDate = "2024-11-10" # 结束日期 + +# 创建输出目录(如果不存在) +$DateFolderName = "$($StartDate.Replace('-', ''))_$($EndDate.Replace('-', ''))" +$DateOutputFolder = Join-Path -Path $OutputFolder -ChildPath $DateFolderName +if (!(Test-Path -Path $DateOutputFolder)) { + New-Item -ItemType Directory -Path $DateOutputFolder | Out-Null +} + +# 获取所有非系统数据库 +$databases = Invoke-Sqlcmd -ServerInstance $ServerName -Query " +SELECT name +FROM sys.databases +WHERE state_desc = 'ONLINE' +AND name NOT IN ('master', 'tempdb', 'model', 'msdb'); +" | Select-Object -ExpandProperty name + +# 遍历所有数据库 +foreach ($DatabaseName in $databases) { + Write-Host "处理数据库: $DatabaseName" + + # SQL 查询,获取指定时间段内的变更记录 + $query = @" + SELECT [ID], [EventType], [ObjectName], [TSQLCommand], [ChangeDate] + FROM [$DatabaseName].[dbo].[DDLChangeLog] + WHERE [ChangeDate] BETWEEN '$StartDate' AND '$EndDate' + ORDER BY [ChangeDate]; +"@ +try { + # 执行查询并获取变更记录 + $Changes = Invoke-Sqlcmd -ServerInstance $ServerName -Database $DatabaseName -Query $query + + # 遍历每条变更记录并生成 SQL 文件 + foreach ($Change in $Changes) { + $EventID = $Change.ID + $ObjectName = $Change.ObjectName -replace '[\\/:*?"<>|]', '_' # 清理文件名 + $EventType = $Change.EventType + $TSQLCommand = $Change.TSQLCommand + $ChangeDate = $Change.ChangeDate + + # 创建文件名,如 ObjectName_EventID.sql + $FileName = "${ObjectName}_${EventID}.sql" + $FilePath = Join-Path -Path $DateOutputFolder -ChildPath $FileName + + # 构造 SQL 内容,包含 USE 语句和事件信息 + $Content = @" +USE [$DatabaseName] +GO + +-- 事件类型: $EventType +-- 变更时间: $ChangeDate +$TSQLCommand +"@ + + # 将内容写入文件 + $Content | Out-File -FilePath $FilePath -Encoding utf8 + + Write-Host "已生成文件: $FilePath" + } + + } catch { + Write-Host "在数据库 $DatabaseName 中获取变更记录时出错: $($_.Exception.Message)" + } +} + +Write-Host "所有变更记录已保存至 $DateOutputFolder" diff --git a/SqlServer/Script/Restore.ps1 b/SqlServer/Script/Restore.ps1 new file mode 100644 index 0000000000000000000000000000000000000000..2d3fbffd9f38642b959f8c13f450195f152a3a65 --- /dev/null +++ b/SqlServer/Script/Restore.ps1 @@ -0,0 +1,115 @@ +# SQL Server 实例名称 +$ServerName = "." # 替换为 SQL Server 实例名称 +$BackupFolder = "C:\SQLBackup" # 备份文件目录 +$DataFolder = "C:\Program Files\Microsoft SQL Server\MSSQL16.MSSQLSERVER\MSSQL\DATA" # 数据文件路径 +$LogFolder = $DataFolder # 如果日志文件路径相同 + +# 确保目录存在 +if (!(Test-Path -Path $BackupFolder)) { + Write-Host "备份文件夹不存在: $BackupFolder" + exit +} + +# 获取所有备份文件 +Get-ChildItem -Path $BackupFolder -Filter *.bak | ForEach-Object { + $FilePath = $_.FullName + $fileNameWithoutExtension = [System.IO.Path]::GetFileNameWithoutExtension($_.Name) + + # 截取数据库名称 + $dbName = $fileNameWithoutExtension.Substring(0, $fileNameWithoutExtension.LastIndexOf('_')) + Write-Host "准备还原的数据库: $dbName 从备份文件: $FilePath" + + # 获取备份文件中逻辑文件名列表 + $restoreFileList = sqlcmd -S $ServerName -Q "RESTORE FILELISTONLY FROM DISK = N'$FilePath'" | Out-String + + # Write-Host "restoreFileList is: $restoreFileList" + + # 提取数据文件和日志文件的逻辑名称 + $dataFile = $null + $logFile = $null + + # 正则表达式匹配行首的逻辑文件名称 +$restoreFileList -split "`r?`n" | ForEach-Object { + $line = $_.Trim() + if ($line -match "^(?\S+)\s+.*\s+D\s") { + $dataFile = $matches['LogicalName'] + Write-Host "数据文件逻辑名称: $dataFile" + } + elseif ($line -match "^(?\S+)\s+.*\s+L\s") { + $logFile = $matches['LogicalName'] + Write-Host "日志文件逻辑名称: $logFile" + } +} + + # 设置还原的物理文件路径 + $dataFilePath = Join-Path -Path $DataFolder -ChildPath "$dbName.mdf" + $logFilePath = Join-Path -Path $LogFolder -ChildPath "$dbName.ldf" + + # 输出变量内容 + Write-Host "备份文件路径: $FilePath" + Write-Host "数据库名称: $dbName" + Write-Host "数据文件逻辑名称: $dataFile" + Write-Host "日志文件逻辑名称: $logFile" + Write-Host "数据文件物理路径: $dataFilePath" + Write-Host "日志文件物理路径: $logFilePath" + + # 构建还原命令 + $restoreQuery = @" + RESTORE DATABASE [$dbName] + FROM DISK = N'$FilePath' + WITH MOVE '$dataFile' TO '$dataFilePath', + MOVE '$logFile' TO '$logFilePath', + REPLACE, RECOVERY, STATS = 10; +"@ + + # 执行还原命令 + try { + sqlcmd -S $ServerName -Q $restoreQuery + Write-Host "成功还原数据库: $dbName" + Write-Host "---------------------------------------------" + } catch { + Write-Host "还原数据库 $dbName 时出错: $_" + Write-Host "---------------------------------------------" + } +} + +Write-Host "~~~~~~~~~~~~~~所有数据库还原完成~~~~~~~~~~~~" +Write-Host " " +Write-Host "==========开始还原数据库作业==========" +$JobBackupFolder = "C:\SQLBackup\BackUpJobs" # 替换为备份文件所在目录 + +# 加载 SQL Server SMO 依赖项 +[System.Reflection.Assembly]::LoadWithPartialName('Microsoft.SqlServer.Smo') | Out-Null + +# 创建 SQL Server 对象 +$Server = New-Object Microsoft.SqlServer.Management.Smo.Server $ServerName + +# 获取现有作业名称列表 +$ExistingJobNames = $Server.JobServer.Jobs | ForEach-Object { $_.Name } + +# 遍历备份目录中的所有 .sql 文件 +Get-ChildItem -Path $JobBackupFolder -Filter *.sql | ForEach-Object { + $FilePath = $_.FullName + $JobName = $_.BaseName # 从文件名中获取作业名称 + Write-Host "正在恢复作业脚本: $FilePath" + Write-Host "提取的 JobName 是: '$JobName'" # 输出提取的作业名称 + + # 检查作业是否已存在 + if ($ExistingJobNames -contains $JobName) { + Write-Host "作业 '$JobName' 已存在,跳过恢复。" + return # 跳过恢复此作业 + } + + # 读取文件内容 + $Script = Get-Content -Path $FilePath -Raw + + # 执行脚本内容 + try { + $Server.ConnectionContext.ExecuteNonQuery($Script) + Write-Host "成功恢复作业 '$JobName'" + } catch { + Write-Host "恢复作业 '$JobName' 时出错: $_" + } +} + +Write-Host "所有作业已成功恢复" diff --git a/SqlServer/Script/RestoreJobs.ps1 b/SqlServer/Script/RestoreJobs.ps1 new file mode 100644 index 0000000000000000000000000000000000000000..d7a2c163ea943063e93bbdb38cd2768960d3fd19 --- /dev/null +++ b/SqlServer/Script/RestoreJobs.ps1 @@ -0,0 +1,39 @@ +# SQL Server ʵ +$ServerName = "." # 滻Ϊ SQL Server ʵ +$BackupFolder = "C:\Backup\BackUpJobs" # 滻ΪļĿ¼ + +# SQL Server SMO +[System.Reflection.Assembly]::LoadWithPartialName('Microsoft.SqlServer.Smo') | Out-Null + +# SQL Server +$Server = New-Object Microsoft.SqlServer.Management.Smo.Server $ServerName + +# ȡҵб +$ExistingJobNames = $Server.JobServer.Jobs | ForEach-Object { $_.Name } + +# Ŀ¼е .sql ļ +Get-ChildItem -Path $BackupFolder -Filter *.sql | ForEach-Object { + $FilePath = $_.FullName + $JobName = $_.BaseName # ļлȡҵ + Write-Host "ڻָҵű: $FilePath" + Write-Host "ȡ JobName : '$JobName'" # ȡҵ + + # ҵǷѴ + if ($ExistingJobNames -contains $JobName) { + Write-Host "ҵ '$JobName' Ѵڣָ" + return # ָҵ + } + + # ȡļ + $Script = Get-Content -Path $FilePath -Raw + + # ִнű + try { + $Server.ConnectionContext.ExecuteNonQuery($Script) + Write-Host "ɹָҵ '$JobName'" + } catch { + Write-Host "ָҵ '$JobName' ʱ: $_" + } +} + +Write-Host "ҵѳɹָ $ServerName" diff --git "a/SqlServer/Script/SqlServer\345\205\250\351\207\217\345\244\207\344\273\275\345\222\214\350\277\230\345\216\237.md" "b/SqlServer/Script/SqlServer\345\205\250\351\207\217\345\244\207\344\273\275\345\222\214\350\277\230\345\216\237.md" new file mode 100644 index 0000000000000000000000000000000000000000..8ff62d374f085b9c51394790656aaaca6b635210 --- /dev/null +++ "b/SqlServer/Script/SqlServer\345\205\250\351\207\217\345\244\207\344\273\275\345\222\214\350\277\230\345\216\237.md" @@ -0,0 +1,173 @@ +# Sql Server全量备份和还原 + +## 备份 +```sql + +DECLARE @name VARCHAR(50) -- 数据库名称 +DECLARE @path VARCHAR(256) -- 备份文件路径 +DECLARE @fileName VARCHAR(256) -- 完整备份文件路径 +DECLARE @fileDate VARCHAR(20) -- 用于备份文件名称的日期格式 +DECLARE @backupName VARCHAR(100) -- 备份名称 + +-- 指定备份文件的存储路径 +SET @path = 'C:\Backup\' -- 修改为你需要的备份目录路径 + +-- 获取当前日期并转换为字符串格式 +SET @fileDate = CONVERT(VARCHAR(20), GETDATE(), 112) + +-- 使用游标遍历所有数据库 +DECLARE db_cursor CURSOR FOR +SELECT name +FROM master.dbo.sysdatabases +WHERE name NOT IN ('master', 'tempdb', 'model', 'msdb','DWDiagnostics','DWConfiguration','DWQueue') -- 排除系统数据库 + +OPEN db_cursor +FETCH NEXT FROM db_cursor INTO @name + +WHILE @@FETCH_STATUS = 0 +BEGIN + -- 构建备份文件的完整路径和名称 + SET @fileName = @path + @name + '_' + @fileDate + '.bak' + + -- 设置备份名称 + SET @backupName = @name + '_FullBackup' + + -- 执行备份命令 + BACKUP DATABASE @name TO DISK = @fileName + WITH NOFORMAT, NOINIT, + NAME = @backupName, SKIP, NOREWIND, NOUNLOAD, STATS = 10 + + FETCH NEXT FROM db_cursor INTO @name +END + +CLOSE db_cursor +DEALLOCATE db_cursor +``` + + +## 还原 +```sql + +DECLARE @path NVARCHAR(256) -- 备份文件路径 +DECLARE @fileName NVARCHAR(256) -- 备份文件名 +DECLARE @dbName NVARCHAR(50) -- 数据库名称 +DECLARE @backupFile NVARCHAR(256) +DECLARE @logicalDataName NVARCHAR(128) +DECLARE @logicalLogName NVARCHAR(128) +DECLARE @dataFilePath NVARCHAR(256) -- 数据文件路径 +DECLARE @logFilePath NVARCHAR(256) -- 日志文件路径 + +-- 备份文件存储路径 +SET @path = 'C:\Backup\' -- 修改为备份文件所在的目录 + +-- 临时表存储目录中的备份文件名 +CREATE TABLE #BackupFiles (FileName NVARCHAR(256) NULL) + +-- 填充临时表,读取备份目录中的所有 .bak 文件 +INSERT INTO #BackupFiles (FileName) +EXEC xp_cmdshell 'dir C:\Backup\*.bak /b' + +-- 去除 NULL 值的文件名(可能是 xp_cmdshell 返回的空行) +DELETE FROM #BackupFiles WHERE FileName IS NULL + +DECLARE db_cursor CURSOR FOR +SELECT FileName FROM #BackupFiles + +OPEN db_cursor +FETCH NEXT FROM db_cursor INTO @fileName + +WHILE @@FETCH_STATUS = 0 +BEGIN + -- 构建完整的备份文件路径 + SET @backupFile = @path + @fileName + + -- 获取数据库名称,截取最后一个下划线前的部分 + SET @dbName = LEFT(@fileName, LEN(@fileName) - CHARINDEX('_', REVERSE(@fileName))) + + -- 创建临时表来存储 FILELISTONLY 的输出 + CREATE TABLE #FileList ( + LogicalName NVARCHAR(128), + PhysicalName NVARCHAR(260), + Type CHAR(1), + FileGroupName NVARCHAR(128), + Size BIGINT, + MaxSize BIGINT, + FileId BIGINT, + CreateLSN NUMERIC(25,0), + DropLSN NUMERIC(25,0), + UniqueId UNIQUEIDENTIFIER, + ReadOnlyLSN NUMERIC(25,0), + ReadWriteLSN NUMERIC(25,0), + BackupSizeInBytes BIGINT, + SourceBlockSize INT, + FileGroupId INT, + LogGroupGUID UNIQUEIDENTIFIER, + DifferentialBaseLSN NUMERIC(25,0), + DifferentialBaseGUID UNIQUEIDENTIFIER, + IsReadOnly BIT, + IsPresent BIT, + TDEThumbprint NVARCHAR(32), + SnapshortUrl NVARCHAR(32) + ) + + -- 插入 RESTORE FILELISTONLY 的结果到临时表中 + INSERT INTO #FileList + EXEC ('RESTORE FILELISTONLY FROM DISK = ''' + @backupFile + '''') + + -- 从临时表中获取数据文件和日志文件的逻辑名称 + SELECT + @logicalDataName = LogicalName + FROM #FileList + WHERE Type = 'D' + + SELECT + @logicalLogName = LogicalName + FROM #FileList + WHERE Type = 'L' + + -- 设置还原文件的物理路径 + SET @dataFilePath = 'C:\Program Files\Microsoft SQL Server\MSSQL16.MSSQLSERVER\MSSQL\DATA\' + @dbName + '.mdf' + SET @logFilePath = 'C:\Program Files\Microsoft SQL Server\MSSQL16.MSSQLSERVER\MSSQL\DATA\' + @dbName + '.ldf' + + -- 输出变量内容 + PRINT N'备份文件路径: ' + @backupFile + PRINT N'数据库名称: ' + @dbName + PRINT N'数据文件逻辑名称: ' + ISNULL(@logicalDataName, N'未找到数据文件逻辑名称') + PRINT N'日志文件逻辑名称: ' + ISNULL(@logicalLogName, N'未找到日志文件逻辑名称') + PRINT N'数据文件物理路径: ' + @dataFilePath + PRINT N'日志文件物理路径: ' + @logFilePath + PRINT N'---------------------------------------------' + + -- 还原数据库 + RESTORE DATABASE @dbName + FROM DISK = @backupFile + WITH MOVE @logicalDataName TO @dataFilePath, + MOVE @logicalLogName TO @logFilePath, + REPLACE, + RECOVERY, + STATS = 10 + + -- 删除临时表,以便下次循环重新创建 + DROP TABLE #FileList + + FETCH NEXT FROM db_cursor INTO @fileName +END + +CLOSE db_cursor +DEALLOCATE db_cursor +DROP TABLE #BackupFiles + + + +--问题1:如果出现行数对应不上执行下面的命令,对比临时表#FileList的字段 +--RESTORE FILELISTONLY FROM DISK = 'C:\Backup\NewtouchHIS_Base_20241017.bak' + +--问题2:SQL Server 阻止了对组件 'xp_cmdshell' 的 过程 'sys.xp_cmdshell' 的访问,因为此组件已作为此服务器安全配置的一部分而被关闭。 +--sp_configure 'show advanced options',1 +--reconfigure +--go +--sp_configure 'xp_cmdshell',1 +--reconfigure +--go + +``` \ No newline at end of file diff --git a/SqlServer/V1.8/V1.8.zip b/SqlServer/V1.8/V1.8.zip new file mode 100644 index 0000000000000000000000000000000000000000..1090e7acd706472c8044ed8ea5d7e8cdf6692999 Binary files /dev/null and b/SqlServer/V1.8/V1.8.zip differ diff --git a/WinServiceAPI/NeiMengGuYiBaoApp/App.config b/WinServiceAPI/NeiMengGuYiBaoApp/App.config index beac09f5e595d06b336250c3c7bab38dba3a1827..a68fb6cebc968bad7d02b4242fa446cccd3b9d9e 100644 --- a/WinServiceAPI/NeiMengGuYiBaoApp/App.config +++ b/WinServiceAPI/NeiMengGuYiBaoApp/App.config @@ -31,9 +31,18 @@ - - + + + + + + + + + + + diff --git a/WinServiceAPI/NeiMengGuYiBaoApp/Config/Assets/PrescriptionToPDF/R20241104N000007.PDF b/WinServiceAPI/NeiMengGuYiBaoApp/Config/Assets/PrescriptionToPDF/R20241104N000007.PDF new file mode 100644 index 0000000000000000000000000000000000000000..83777a7f5d4ea15c18a8f584a36f9f090f7b7663 Binary files /dev/null and b/WinServiceAPI/NeiMengGuYiBaoApp/Config/Assets/PrescriptionToPDF/R20241104N000007.PDF differ diff --git a/WinServiceAPI/NeiMengGuYiBaoApp/Config/Assets/dzcf.pdf b/WinServiceAPI/NeiMengGuYiBaoApp/Config/Assets/dzcf.pdf new file mode 100644 index 0000000000000000000000000000000000000000..65dcef9341e208967844d1317902449dc5c44431 Binary files /dev/null and b/WinServiceAPI/NeiMengGuYiBaoApp/Config/Assets/dzcf.pdf differ diff --git a/WinServiceAPI/NeiMengGuYiBaoApp/Config/Assets/dzcfbak.pdf b/WinServiceAPI/NeiMengGuYiBaoApp/Config/Assets/dzcfbak.pdf new file mode 100644 index 0000000000000000000000000000000000000000..326a3eaa5f7340110d97218488b0cec4bf0c18c6 Binary files /dev/null and b/WinServiceAPI/NeiMengGuYiBaoApp/Config/Assets/dzcfbak.pdf differ diff --git "a/WinServiceAPI/NeiMengGuYiBaoApp/Config/Assets/\345\214\273\345\270\210/000000.jpg" "b/WinServiceAPI/NeiMengGuYiBaoApp/Config/Assets/\345\214\273\345\270\210/000000.jpg" new file mode 100644 index 0000000000000000000000000000000000000000..fcf97e4fb191f0a227cc380762fd63b1a6ffb744 Binary files /dev/null and "b/WinServiceAPI/NeiMengGuYiBaoApp/Config/Assets/\345\214\273\345\270\210/000000.jpg" differ diff --git "a/WinServiceAPI/NeiMengGuYiBaoApp/Config/Assets/\350\215\257\345\270\210/000000.jpg" "b/WinServiceAPI/NeiMengGuYiBaoApp/Config/Assets/\350\215\257\345\270\210/000000.jpg" new file mode 100644 index 0000000000000000000000000000000000000000..ec736a9be14c758bf8fb98f9dc03e0c55de19c38 Binary files /dev/null and "b/WinServiceAPI/NeiMengGuYiBaoApp/Config/Assets/\350\215\257\345\270\210/000000.jpg" differ diff --git "a/WinServiceAPI/NeiMengGuYiBaoApp/Config/Assets/\350\215\257\345\270\210/000001.jpg" "b/WinServiceAPI/NeiMengGuYiBaoApp/Config/Assets/\350\215\257\345\270\210/000001.jpg" new file mode 100644 index 0000000000000000000000000000000000000000..fcf97e4fb191f0a227cc380762fd63b1a6ffb744 Binary files /dev/null and "b/WinServiceAPI/NeiMengGuYiBaoApp/Config/Assets/\350\215\257\345\270\210/000001.jpg" differ diff --git a/WinServiceAPI/NeiMengGuYiBaoApp/Controllers/PDFSharpController.cs b/WinServiceAPI/NeiMengGuYiBaoApp/Controllers/PDFSharpController.cs new file mode 100644 index 0000000000000000000000000000000000000000..a42ba981d8cc8af5244baa701a5bbef7cd091c0a --- /dev/null +++ b/WinServiceAPI/NeiMengGuYiBaoApp/Controllers/PDFSharpController.cs @@ -0,0 +1,298 @@ +using PdfSharp.Drawing; +using PdfSharp.Pdf; +using PdfSharp.Pdf.AcroForms; +using PdfSharp.Pdf.IO; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Net.Http; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; + +namespace NeiMengGuYiBaoApp.Controllers +{ + public class PDFSharpController + { + public static PdfDocument ExportDocxByObject(Stream templateStream, object data) + { + var doc = PdfReader.Open(templateStream, PdfDocumentOpenMode.Modify); + ReplaceKeyObjetAsync(doc, data); + return doc; + } + + public static PdfDocument ExportDocxByObject(string templatePath, object data) + { + var doc = PdfReader.Open(templatePath, PdfDocumentOpenMode.Modify); + ReplaceKeyObjetAsync(doc, data); + return doc; + } + + private static void ReplaceKeyObjetAsync(PdfDocument doc, object model) + { + PdfAcroForm form = doc.AcroForm; + if (form.Elements.ContainsKey("/NeedAppearances")) + { + form.Elements["/NeedAppearances"] = new PdfBoolean(true); + } + else + { + form.Elements.Add("/NeedAppearances", new PdfBoolean(true)); + } + string text = ""; + Type t = model.GetType(); + PropertyInfo[] pi = t.GetProperties(); + var pfc = new System.Drawing.Text.InstalledFontCollection(); + foreach (var fieldName in form.Fields.Names) + { + var run = form.Fields[fieldName] as PdfTextField; + text = run.Name; + foreach (PropertyInfo p in pi) + { + string key = $"${p.Name}$"; + if (text.Contains(key)) + { + var value = ""; + try + { + value = p.GetValue(model, null).ToString(); + } + catch (Exception ex) + { + } + + if (value.Contains("\n")) + { + run.MultiLine = true; + + } + + run.Value = new PdfString(value, PdfStringEncoding.Unicode); + run.ReadOnly = true; + using (var xGraphics1 = XGraphics.FromPdfPage(doc.Pages[0])) + { + var rectangle1 = run.Elements.GetRectangle("/Rect"); + if (text == "$kb$"|| text == "$xm$"|| text == "$xb$"|| text == "$nl$" || text == "$fb$") + { + xGraphics1.DrawString(value, new PdfSharp.Drawing.XFont(pfc.Families[113], 12, PdfSharp.Drawing.XFontStyle.Regular), + PdfSharp.Drawing.XBrushes.Black, rectangle1.X1+5, 180); + } + else if (text == "$lczd$") + { + xGraphics1.DrawString(value, new PdfSharp.Drawing.XFont(pfc.Families[113], 12, PdfSharp.Drawing.XFontStyle.Regular), + PdfSharp.Drawing.XBrushes.Black, rectangle1.X1+5, 210); + } + else if(text == "$cfxx$") + { + int hight = 280; + var cfxxarr = value.Split('\n'); + foreach (var item in cfxxarr) + { + xGraphics1.DrawString(item, new PdfSharp.Drawing.XFont(pfc.Families[113], 12, PdfSharp.Drawing.XFontStyle.Regular), + PdfSharp.Drawing.XBrushes.Black, rectangle1.X1+8, hight); + hight = hight + 30; + } + } + else if(text == "$shys$"|| text == "$kfys$") + { + var ss1 = rectangle1.ToXRect() + new XPoint(0, 0); + xGraphics1.DrawString(value, new PdfSharp.Drawing.XFont(pfc.Families[113], 12, PdfSharp.Drawing.XFontStyle.Regular), + PdfSharp.Drawing.XBrushes.Black, rectangle1.X1+15, 600); + } + else if (text == "$kjrq$"||text == "$mzh$" || text == "$cfh$") + { + xGraphics1.DrawString(value, new PdfSharp.Drawing.XFont(pfc.Families[113], 12, PdfSharp.Drawing.XFontStyle.Regular), + PdfSharp.Drawing.XBrushes.Black, rectangle1.X1+5, 144); + } + else if (text == "$orgName$") + { + xGraphics1.DrawString(value, new PdfSharp.Drawing.XFont(pfc.Families[113], 15, PdfSharp.Drawing.XFontStyle.Regular), + PdfSharp.Drawing.XBrushes.Black, rectangle1.X1+6, 60); + } + //else { + // xGraphics1.DrawString(value, new PdfSharp.Drawing.XFont(pfc.Families[113], 12, PdfSharp.Drawing.XFontStyle.Regular), + // PdfSharp.Drawing.XBrushes.Black, rectangle1.X1, rectangle1.Y1); + //} + //xGraphics1.DrawString(value, new PdfSharp.Drawing.XFont(pfc.Families[113], 12, PdfSharp.Drawing.XFontStyle.Regular), + // PdfSharp.Drawing.XBrushes.Black, 10, 10); + + //xGraphics1.DrawString(value, new PdfSharp.Drawing.XFont(pfc.Families[113], 12, PdfSharp.Drawing.XFontStyle.Regular), + // PdfSharp.Drawing.XBrushes.Black, rectangle1.ToXRect() + new XPoint(0, 0)); + } + + if (key == "$shys$" || key == "$kfys$") + { + try + { + var pathparam = key == "$shys$" ? pi[16] : pi[15]; + var filePath = pathparam.GetValue(model, null) as string; + if (string.IsNullOrEmpty(filePath)) + { + continue; + } + if (File.Exists(filePath)) + { + using (var fileStream = new FileStream(filePath.ToString(), FileMode.Open, FileAccess.Read)) + { + var rectangle = run.Elements.GetRectangle("/Rect"); + //var xForm = new XForm(doc, rectangle.Size); + using (var xGraphics = XGraphics.FromPdfPage(doc.Pages[0])) + { + var image = XImage.FromStream(fileStream); + xGraphics.DrawImage(image, rectangle.ToXRect() + new XPoint(85, 455)); + //xGraphics.DrawString(value, new PdfSharp.Drawing.XFont(pfc.Families[113], 12, PdfSharp.Drawing.XFontStyle.Regular), PdfSharp.Drawing.XBrushes.Black, 10, 10); + //XGraphics.FromPdfPage(doc.Pages[0]).DrawString(value, new PdfSharp.Drawing.XFont(pfc.Families[113], 12, + // PdfSharp.Drawing.XFontStyle.Regular), PdfSharp.Drawing.XBrushes.Black, 10,10); + //xGraphics.DrawImage(image, rectangle.ToXRect() + new XPoint(0, 530)); + var state = xGraphics.Save(); + xGraphics.Restore(state); + } + + } + } + else + { + HttpClient _httpClient = new HttpClient(); + using (var fileStream = _httpClient.GetStreamAsync(filePath.ToString()).Result) + { + var rectangle = run.Elements.GetRectangle("/Rect"); + var xForm = new XForm(doc, rectangle.Size); + using (var xGraphics = XGraphics.FromPdfPage(doc.Pages[0])) + { + var image = XImage.FromStream(fileStream); + xGraphics.DrawImage(image, rectangle.ToXRect() + new XPoint(0, 400)); + var state = xGraphics.Save(); + xGraphics.Restore(state); + } + } + + } + run.ReadOnly = true; + + + } + catch (Exception e) + { + Console.WriteLine(e); + } + } + } + + } + + + + } + } + /// + /// pdf表单字段替换 + /// + /// + /// + private static void ReplaceKeyObjetAsyncV2(PdfDocument doc, object model) + { + PdfAcroForm form = doc.AcroForm; + if (form.Elements.ContainsKey("/NeedAppearances")) + { + form.Elements["/NeedAppearances"] = new PdfBoolean(true); + } + else + { + form.Elements.Add("/NeedAppearances", new PdfBoolean(true)); + } + string text = ""; + Type t = model.GetType(); + PropertyInfo[] pi = t.GetProperties(); + + foreach (var fieldName in form.Fields.Names) + { + var run = form.Fields[fieldName] as PdfTextField; + text = run.Name; + foreach (PropertyInfo p in pi) + { + string key = $"${p.Name}$"; + if (text.Contains(key)) + { + var value = ""; + try + { + value = p.GetValue(model, null).ToString(); + } + catch (Exception ex) + { + } + + if (value.Contains("\n")) + { + run.MultiLine = true; + + } + + run.Value = new PdfString(value, PdfStringEncoding.Unicode); + run.ReadOnly = true; + + if (key == "$shys$" || key == "$kfys$") + { + + try + { + var pathparam = key == "$shys$" ? pi[16] : pi[15]; + var filePath = pathparam.GetValue(model, null) as string; + if (string.IsNullOrEmpty(filePath)) + { + continue; + } + if (File.Exists(filePath)) + { + using (var fileStream = new FileStream(filePath.ToString(), FileMode.Open, FileAccess.Read)) + { + var rectangle = run.Elements.GetRectangle("/Rect"); + var xForm = new XForm(doc, rectangle.Size); + using (var xGraphics = XGraphics.FromPdfPage(doc.Pages[0])) + { + var image = XImage.FromStream(fileStream); + xGraphics.DrawImage(image, rectangle.ToXRect() + new XPoint(85, 408)); + //xGraphics.DrawImage(image, rectangle.ToXRect() + new XPoint(0, 530)); + var state = xGraphics.Save(); + xGraphics.Restore(state); + } + + } + } + else + { + HttpClient _httpClient = new HttpClient(); + using (var fileStream = _httpClient.GetStreamAsync(filePath.ToString()).Result) + { + var rectangle = run.Elements.GetRectangle("/Rect"); + var xForm = new XForm(doc, rectangle.Size); + using (var xGraphics = XGraphics.FromPdfPage(doc.Pages[0])) + { + var image = XImage.FromStream(fileStream); + xGraphics.DrawImage(image, rectangle.ToXRect() + new XPoint(0, 400)); + var state = xGraphics.Save(); + xGraphics.Restore(state); + } + } + + } + run.ReadOnly = true; + + + } + catch (Exception e) + { + Console.WriteLine(e); + } + } + } + + } + + + + } + } + } +} diff --git a/WinServiceAPI/NeiMengGuYiBaoApp/Controllers/YiBaoController.cs b/WinServiceAPI/NeiMengGuYiBaoApp/Controllers/YiBaoController.cs index a404f855fec74a1859d0d271a1c43bfbed7bd925..ceb2ed9b4f0da211d11a4e0079eb87bfc5909e0c 100644 --- a/WinServiceAPI/NeiMengGuYiBaoApp/Controllers/YiBaoController.cs +++ b/WinServiceAPI/NeiMengGuYiBaoApp/Controllers/YiBaoController.cs @@ -18,6 +18,7 @@ using System.Configuration; using System.Data; using System.IO; using System.Linq; +using System.Reflection; using System.Runtime.InteropServices; using System.Web.Http; using System.Web.Http.Results; @@ -4090,6 +4091,9 @@ namespace NeiMengGuYiBaoApp.Controllers post.tradiNumber = "3507"; post.insuplc_admdvs = ConfigurationManager.AppSettings["mdtrtarea_admvs"]; post.inModel = 0; + post.operatorId = post3507.operatorId; + post.operatorName = post3507.operatorName; + Input_3507 input3507 = new Input_3507(); input3507.data = new Data3507(); input3507.data.fixmedins_bchno = post3507.fixmedins_bchno; @@ -4131,7 +4135,7 @@ namespace NeiMengGuYiBaoApp.Controllers } #endregion - #region 3508 3509 3510 3511 3512 3513 定点医药机构商品信息查询 3607 结算清单质控结果查询 + #region 3508 3509 3510 3511 3512 3513 定点医药机构商品信息查询 /// /// 【3508】定点医药机构商品库存信息查询 /// @@ -4294,31 +4298,7 @@ namespace NeiMengGuYiBaoApp.Controllers return json; } - /// - /// 【3607】结算清单质控结果查询 - /// - /// - /// - [HttpPost] - public string GetSettlementQualityControlResults_3607(Post_3607 post3607) - { - PostBase post = new PostBase(); - post.hisId = post3607.hisId; - post.tradiNumber = "3607"; - post.inModel = 0; - post.operatorId = post3607.operatorId; - post.operatorName = post3607.operatorName; - - var config = new MapperConfiguration(cfg => cfg.CreateMap()); - var mapper = config.CreateMapper(); - Input_3607 input3607 = new Input_3607(); - input3607.data = mapper.Map(post3607); - - Output_3607 output3607 = new Output_3607(); - string code = "1"; - string json = YiBaoHelper.CallAndSaveLog(input3607, out output3607, post, out code); - return json; - } + #endregion #region 4101 4102 4103 4104 4105 医疗保证基金结算清单信息 @@ -5999,5 +5979,455 @@ namespace NeiMengGuYiBaoApp.Controllers } #endregion + #region 分组付费【3606】DIP 分组结果查询 3607 结算清单质控结果查询 + /// + /// 【3606】DIP 分组结果查询 + /// + /// + /// + [HttpPost] + public string GetSettlementQualityControlResults_3606(Post_3607 post3607) + { + PostBase post = new PostBase(); + post.hisId = post3607.hisId; + post.tradiNumber = "3606"; + post.inModel = 0; + post.operatorId = post3607.operatorId; + post.operatorName = post3607.operatorName; + + var config = new MapperConfiguration(cfg => cfg.CreateMap()); + var mapper = config.CreateMapper(); + Input_3607 input3607 = new Input_3607(); + input3607.data = mapper.Map(post3607); + + Output_3607 output3607 = new Output_3607(); + string code = "1"; + string json = YiBaoHelper.CallAndSaveLog(input3607, out output3607, post, out code); + return json; + } + /// + /// 【3607】结算清单质控结果查询 + /// + /// + /// + [HttpPost] + public string GetSettlementQualityControlResults_3607(Post_3607 post3607) + { + PostBase post = new PostBase(); + post.hisId = post3607.hisId; + post.tradiNumber = "3607"; + post.inModel = 0; + post.operatorId = post3607.operatorId; + post.operatorName = post3607.operatorName; + + var config = new MapperConfiguration(cfg => cfg.CreateMap()); + var mapper = config.CreateMapper(); + Input_3607 input3607 = new Input_3607(); + input3607.data = mapper.Map(post3607); + + Output_3607 output3607 = new Output_3607(); + string code = "1"; + string json = YiBaoHelper.CallAndSaveLog(input3607, out output3607, post, out code); + return json; + } + #endregion + + #region 电子处方 核验上传撤销 【Ld7801】【Ld7802】【Ld7101】 【Ld7104】 + /// + /// 【Ld7801】电子处方上传预核验 + /// + /// + /// + public string ElectronicPrescription_D001(Post_D001 post) + { + post.inModel = 1; + post.tradiNumber = "Ld7801"; + string orgId = ConfigurationManager.AppSettings["orgId"]; + Input_D001 inputd001 = new Input_D001(); + List list = Function.ToList(ClassSqlHelper.ElectronicPrescription_D001_PrescriptionData(post.hisId, orgId, post.cfh)); + inputd001 = list[0]; + inputd001.rxdrugdetail = Function.ToList(ClassSqlHelper.ElectronicPrescription_D001_Prescription_DetailData(post.hisId, orgId, post.cfh)); + List listmdtrtinfo = Function.ToList(ClassSqlHelper.ElectronicPrescription_D001_Prescription_mdtrtData(post.hisId, orgId, post.cfh)); + inputd001.mdtrtinfo = listmdtrtinfo[0]; + inputd001.diseinfo = Function.ToList(ClassSqlHelper.ElectronicPrescription_D001_Prescription_diseData(post.hisId, orgId, post.cfh)); + Output_D001 output = new Output_D001(); + string code = "1"; + string json = ElectronicCSHelper.CallAndSaveLog(inputd001, out output, post, out code); + if (code == "0")//如果成功则更新本地信息表 + { + try + { + DateTime date = ClassSqlHelper.GetServerTime(); + int eeor = 0; + List sqlList = new List(); + Dzcf_D001_output D001 = new Dzcf_D001_output(); + D001.mzh = post.hisId;// + D001.cfh = post.cfh;// + D001.OrganizeId = orgId; + D001.InputContent = JsonConvert.SerializeObject(inputd001); + D001.rxTraceCode = output.rxTraceCode; + D001.hiRxno = output.hiRxno; + D001.czydm = post.operatorId; + D001.czrq = date; + D001.zt = 1; + sqlList.Add(D001.ToAddSql()); + ClassSqlHelper.Merge(sqlList, out eeor); + } + catch (Exception ex) + { + YiBaoCallLogHelper.Info("电子处方上传预核验上传成功,本地保存失败,数据异常:" + ex.Message); + return YiBaoHelper.BuildReturnJson("-99", "电子处方上传预核验上传成功,HIS上传数据失败:" + ex.Message); + } + } + return json; + } + + /// + /// 【Ld7802】电子处方医保电子签名 + /// + /// + /// + public string ElectronicPrescription_D002(Post_D002 post) + { + string templatePath_Pdf = System.IO.Path.Combine(new FileInfo(Assembly.GetExecutingAssembly().Location).Directory.FullName, "Assets", $"dzcf.pdf"); + string outputPath_Pdf = System.IO.Path.Combine(new FileInfo(Assembly.GetExecutingAssembly().Location).Directory.FullName, $"Assets/PrescriptionToPDF/" + post.cfh + ".PDF"); + post.inModel = 1; + post.tradiNumber = "Ld7802"; + string orgId = ConfigurationManager.AppSettings["orgId"]; + var docinfo = GetRecipeDocInfo(post); + var result = PDFSharpController.ExportDocxByObject(templatePath_Pdf, docinfo); + result.Save(outputPath_Pdf); + Input_D002 input = new Input_D002(); + string fixmedins_code = ConfigurationManager.AppSettings["fixmedins_code"]; + input.fixmedinsCode = fixmedins_code;//机构编码 + Input_D003_Data top20originalValue = new Input_D003_Data(); + top20originalValue = Function.ToList(ClassSqlHelper.ElectronicPrescription_D003_Prescription_top20(post.hisId, orgId, post.cfh, post.shks, post.shysgh, post.shrq))[0]; + string originalValue = JsonConvert.SerializeObject(top20originalValue).GetBytes().ToBase64String();//电子处方上传前二十个字段的base64编码值 + input.originalValue = originalValue;//电子处方上传前二十个字段的base64编码值 + string originalRxFile = DocumentToBase64Str(outputPath_Pdf);//生成的处方文件转换为base64编码 + input.originalRxFile = originalRxFile;//文件转base64编码值 + Output_D002 output = new Output_D002(); + string code = "1"; + string json = ElectronicCSHelper.CallAndSaveLog(input, out output, post, out code); + if (code == "0")//如果成功则更新本地信息表 + { + try + { + DateTime date = ClassSqlHelper.GetServerTime(); + int eeor = 0; + List sqlList = new List(); + Dzcf_D002_output D002 = new Dzcf_D002_output(); + D002.mzh = post.hisId;// + D002.cfh = post.cfh;// + D002.OrganizeId = orgId; + D002.InputContent = JsonConvert.SerializeObject(input); + D002.originalValue = originalValue; + D002.originalRxFile = originalRxFile; + D002.rxFile = output.rxFile; + D002.signDigest = output.signDigest; + D002.signCertSn = output.signCertSn; + D002.signCertDn = output.signCertDn; + D002.czydm = post.operatorId; + D002.czrq = date; + D002.zt = 1; + sqlList.Add(D002.ToAddSql()); + ClassSqlHelper.Merge(sqlList, out eeor); + } + catch (Exception ex) + { + YiBaoCallLogHelper.Info("电子处方医保电子签名成功,本地保存失败,数据异常:" + ex.Message); + return YiBaoHelper.BuildReturnJson("-99", "电子处方医保电子签名成功,HIS上传数据失败:" + ex.Message); + } + //post.rxFile = originalRxFile; + //post.signDigest = output.signDigest; + //ElectronicPrescription_D003(post); + } + return json; + } + /// + /// pdf所需数据信息 + /// + /// + /// + public static PDFinput GetRecipeDocInfo(Post_D002 post) + { + var docinfo = new PDFinput(); + string orgId = ConfigurationManager.AppSettings["orgId"]; + mdtrtinfoV0 mdtrtinfoV0 = Function.ToList(ClassSqlHelper.ElectronicPrescription_D001_Prescription_mdtrtData(post.hisId, orgId, post.cfh))[0]; + List cfxxdetail = Function.ToList(ClassSqlHelper.ElectronicPrescription_D001_Prescription_DetailData(post.hisId, orgId, post.cfh)); + docinfo.mzh = mdtrtinfoV0.iptOtpNo; + docinfo.cfh = post.cfh; + docinfo.kjrq = mdtrtinfoV0.mdtrtTime; + docinfo.kb = mdtrtinfoV0.prscDeptName; + docinfo.xm = mdtrtinfoV0.patnName; + docinfo.xb = mdtrtinfoV0.gend == "1" ? "男" : "女"; + docinfo.nl = mdtrtinfoV0.patnAge; + docinfo.fb = "医保"; + docinfo.orgName = ConfigurationManager.AppSettings["fixmedins_name"]; + docinfo.lczd = mdtrtinfoV0.maindiagName; + docinfo.kfysImgUrl = System.IO.Path.Combine(new FileInfo(Assembly.GetExecutingAssembly().Location).Directory.FullName, "Assets/医师", $"" + post.kfysgh + ".jpg"); + docinfo.shysImgUrl = System.IO.Path.Combine(new FileInfo(Assembly.GetExecutingAssembly().Location).Directory.FullName, "Assets/药师", $"" + post.shysgh + ".jpg"); + + docinfo.kfys = post.kfys; + docinfo.shys = post.shys; + List cfxxlist = new List(); + int rows = 1; + string cfxxstr = ""; + foreach (var item in cfxxdetail) + { + cfxxstr = rows + "." + item.drugGenname + " " + item.drugSpec + " " + item.drugCnt + item.drugDosunt + "\n" + "用法用量:" + item.medcWayDscr + " " + item.usedFrquName + " 一次" + item.sinDoscnt + item.sinDosunt; + cfxxlist.Add(cfxxstr); + rows += 1; + } + docinfo.cfxxList = cfxxlist; + //docinfo.cfxxList = new List() + //{ + // "1.苯磺酸氨氯地平片(京新)(省采)\n 规格:2mg*28片\t×10片\n用法用量:2片/次,每日三次,口服。", + // "2.苯磺酸氨氯地平片(络活喜)(非省采)\n 规格:5mg*28片\t×20片\n用法用量:1片/次,每日两次,口服。", + //}; + docinfo.cfxx = string.Join("\n", docinfo.cfxxList); + return docinfo; + } + public string DocumentToBase64Str(string fileName) + { + //FileStream filestream = new FileStream(fileName, FileMode.Open); + YiBaoCallLogHelper.Info("生成的电子处方文件地址:" + fileName); + byte[] bytes = File.ReadAllBytes(fileName);//测试pdf文件 + + //string strResult = byteToHexStr(bytes);//将pdf byte[]数组转16进制字符串 + //byte[] byteArray = StrToHexByte(strResult);//将16进制的字符串 转为byte[] + // byte[] bt = new byte[filestream.Length]; + //调用read读取方法 + //filestream.Read(byteArray, 0, byteArray.Length); + string base64Str = Convert.ToBase64String(bytes); + YiBaoCallLogHelper.Info("生成的电子处方文件转换为Base64格式内容:" + base64Str); + + + //byte[] imageBytes = Convert.FromBase64String(base64Str); + //File.WriteAllBytes(@"D:\test.Pdf", imageBytes); + //filestream.Close(); + return base64Str; + } + + /// + /// 【Ld7101】电子处方上传 + /// + /// + /// + public string ElectronicPrescription_D003(Post_D002 post) + { + post.inModel = 1; + post.tradiNumber = "Ld7101"; + string orgId = ConfigurationManager.AppSettings["orgId"]; + Input_D003 input = new Input_D003(); + List list = Function.ToList(ClassSqlHelper.ElectronicPrescription_D003_Prescription(post.hisId, orgId, post.cfh, post.shks, post.shysgh, post.rxFile, post.signDigest, post.shrq)); + input = list[0]; + Output_D003 output = new Output_D003(); + string code = "1"; + string json = ElectronicCSHelper.CallAndSaveLog(input, out output, post, out code); + if (code == "0")//如果成功则更新本地信息表 + { + try + { + DateTime date = ClassSqlHelper.GetServerTime(); + int eeor = 0; + List sqlList = new List(); + Dzcf_D003_output D003 = new Dzcf_D003_output(); + D003.mzh = post.hisId; + D003.cfh = post.cfh; + D003.OrganizeId = orgId; + D003.InputContent = JsonConvert.SerializeObject(input); + D003.rxTraceCode = input.rxTraceCode; + D003.hiRxno = output.hiRxno; + D003.rxStasCodg = output.rxStasCodg; + D003.rxStasName = output.rxStasName; + D003.czydm = post.operatorId; + D003.czrq = date; + D003.zt = 1; + sqlList.Add(D003.ToAddSql()); + ClassSqlHelper.Merge(sqlList, out eeor); + } + catch (Exception ex) + { + YiBaoCallLogHelper.Info("电子处方上传成功,本地保存失败,数据异常:" + ex.Message); + return YiBaoHelper.BuildReturnJson("-99", "电子处方上传成功,HIS上传数据失败:" + ex.Message); + } + } + return json; + } + + /// + /// 【Ld7104】电子处方撤销 + /// + /// + /// + public string ElectronicPrescription_D004(Post_D004 post) + { + post.inModel = 1; + post.tradiNumber = "Ld7104"; + string orgId = ConfigurationManager.AppSettings["orgId"]; + Input_D004 input = new Input_D004(); + List list = Function.ToList(ClassSqlHelper.ElectronicPrescription_D004_Prescription(post.hisId, orgId, post.cfh, post.cxys)); + input = list[0]; + input.undoRea = post.cxyy; + Output_D003 output = new Output_D003(); + string code = "1"; + string json = ElectronicCSHelper.CallAndSaveLog(input, out output, post, out code); + if (code == "0")//如果成功更新本地D003 电子处方上传落地表 + { + try + { + int errorNo = 0; + ClassSqlHelper.RevokePrescriptionToD003(input.hiRxno, post.cxyy, output.rxStasCodg, output.rxStasName, out errorNo); + } + catch (Exception ex) + { + YiBaoCallLogHelper.Info("撤销电子处方成功,HIS更新电子处方数据表状态异常:" + ex.Message); + return YiBaoHelper.BuildReturnJson("-99", "撤销电子处方成功,HIS更新电子处方数据表状态失败:" + ex.Message); + } + } + return json; + } + + #endregion + + #region 电子处方查询 【Ld7202】 【Ld7805】 【Ld7804】 【Ld7806】 + /// + /// 【Ld7202】电子处方信息查询 + /// + /// + /// + public string ElectronicPrescription_D005(Post_D006 post) + { + post.inModel = 0; + post.tradiNumber = "Ld7202"; + string orgId = ConfigurationManager.AppSettings["orgId"]; + Input_D006 input = new Input_D006(); + List list = Function.ToList(ClassSqlHelper.ElectronicPrescription_D006_Prescription(post.hisId, orgId, post.cfh)); + input = list[0]; + Output_D005 output = new Output_D005(); + string code = "1"; + string json = ElectronicCSHelper.CallAndSaveLog(input, out output, post, out code); + return json; + } + /// + /// 【Ld7805】电子处方审核结果查询 + /// + /// + /// + public string ElectronicPrescription_D006(Post_D006 post) + { + post.inModel = 1; + post.tradiNumber = "Ld7805"; + string orgId = ConfigurationManager.AppSettings["orgId"]; + Input_D006 input = new Input_D006(); + List list = Function.ToList(ClassSqlHelper.ElectronicPrescription_D006_Prescription(post.hisId, orgId, post.cfh)); + input = list[0]; + Output_D006 output = new Output_D006(); + string code = "1"; + string json = ElectronicCSHelper.CallAndSaveLog(input, out output, post, out code); + if (code == "0")//如果成功更新本地D003 电子处方上传落地表 + { + try + { + int errorNo = 0; + ClassSqlHelper.D006UpdatePrescriptionToD003(input.hiRxno, output.rxStasCodg, output.rxStasName, output.rxChkStasCodg, output.rxChkOpnn, output.rxChkTime, output.rxChkStasName, out errorNo); + } + catch (Exception ex) + { + YiBaoCallLogHelper.Info("电子处方审核结果查询成功,HIS更新电子处方数据表状态异常:" + ex.Message); + return YiBaoHelper.BuildReturnJson("-99", "电子处方审核结果查询成功,HIS更新电子处方数据表状态失败:" + ex.Message); + } + } + return json; + } + /// + /// 【Ld7804】电子处方取药结果查询 + /// + /// + /// + public string ElectronicPrescription_D007(Post_D006 post) + { + post.inModel = 1; + post.tradiNumber = "Ld7804"; + string orgId = ConfigurationManager.AppSettings["orgId"]; + Input_D006 input = new Input_D006(); + List list = Function.ToList(ClassSqlHelper.ElectronicPrescription_D006_Prescription(post.hisId, orgId, post.cfh)); + input = list[0]; + Output_D007 output = new Output_D007(); + string code = "1"; + string json = ElectronicCSHelper.CallAndSaveLog(input, out output, post, out code); + if (code == "0")//如果成功更新本地D003 电子处方上传落地表 + { + try + { + int errorNo = 0; + ClassSqlHelper.D007UpdatePrescriptionToD003(input.hiRxno, output.rxStasCodg, output.rxStasName, output.rxUsedStasCodg, output.rxUsedStasName, out errorNo); + } + catch (Exception ex) + { + YiBaoCallLogHelper.Info("电子处方审核结果查询成功,HIS更新电子处方数据表状态异常:" + ex.Message); + return YiBaoHelper.BuildReturnJson("-99", "电子处方审核结果查询成功,HIS更新电子处方数据表状态失败:" + ex.Message); + } + } + return json; + } + /// + /// 【Ld7806】电子处方药品目录査询 + /// + /// + /// + public string ElectronicPrescription_D008(Post_D002 post) + { + post.inModel = 1; + post.tradiNumber = "Ld7806"; + string fixmedins_code = ConfigurationManager.AppSettings["fixmedins_code"]; + Input_D008 input = new Input_D008(); + input.fixmedinsCode = fixmedins_code; + int errorNo = 0; + ClassSqlHelper.DelPrescriptionToD008(out errorNo);//删除原有内容 重新添加 + + bool isloop = true; + int i = 0; + string json = ""; + while (isloop) + { + Output_D008 output = new Output_D008(); + string code = "1"; + input.pageNum = ++i; + input.pageSize = 100; + json = ElectronicCSHelper.CallAndSaveLog(input, out output, post, out code); + if (code == "0") + { + int eeor = 0; + if (output.list.Count > 0) + { + try + { + foreach (listd008 data in output.list) + { + List sqlList = new List(); + Dzcf_CFYP_output opdata = new Dzcf_CFYP_output(); + opdata = Function.Mapping(data);//通过函数根据属性名称 自动给值 + sqlList.Add(opdata.ToAddSql()); + ClassSqlHelper.Merge(sqlList, out eeor); + } + } + catch (Exception ex) { + YiBaoCallLogHelper.Info("电子处方药品目录查询成功,本地保存失败,数据异常:" + ex.Message); + json=YiBaoHelper.BuildReturnJson("-99", "电子处方药品目录查询成功,HIS落地数据失败:" + ex.Message); + } + } + else { + isloop = false; + } + } + else { + isloop = false; + } + } + return json; + } + #endregion } } \ No newline at end of file diff --git a/WinServiceAPI/NeiMengGuYiBaoApp/Models/Input/YiBao/InputPost2.cs b/WinServiceAPI/NeiMengGuYiBaoApp/Models/Input/YiBao/InputPost2.cs index 3509c2a8a8885c272f556d1bde39ed790401e566..a6569b6496f930498792f90ba2d5d8aeaf5dc39e 100644 --- a/WinServiceAPI/NeiMengGuYiBaoApp/Models/Input/YiBao/InputPost2.cs +++ b/WinServiceAPI/NeiMengGuYiBaoApp/Models/Input/YiBao/InputPost2.cs @@ -7,7 +7,7 @@ using System.Threading.Tasks; namespace NeiMengGuYiBaoApp.Models.Input.YiBao { - public class InputPost2 + public class InputPost2 { [Description("应用ID")] public string appId { get; set; } @@ -22,4 +22,106 @@ namespace NeiMengGuYiBaoApp.Models.Input.YiBao [Description("签名报文")] public string signData { get; set; } } + + public class DzcfInputPost + { + /// + /// 1 infno 交易编号 字符型 6 Y 交易编号详见接口列表 + /// + [Description("交易编号")] + public string infno { get; set; } + /// + /// 2 msgid 发送方报文 ID 字符型 30 Y定点医药机构编号(12)+时间(14)+顺序号(4)时间格式:yyyyMMddHHmmss + /// + [Description("发送方报文")] + public string msgid { get; set; } + /// + /// 3 mdtrtarea_admvs 就医地医保区划 字符型 6 Y + /// + [Description("就医地医保区划")] + public string mdtrtarea_admvs { get; set; } + /// + /// 4 insuplc_admdvs 参保地医保区划 字符型 6 如果交易输入中含有人员编号,此项必填,可通过【1101】人员信息获取交易取得 + /// + [Description("参保地医保区划")] + public string insuplc_admdvs { get; set; } + // 5 recer_sys_code 接收方系统代码 字符型 10 Y普通交易传 YBXT, 与人相关的交易时离休人员业务传 LXXT,工伤人员业务传 GSX + [Description("接收方系统代码")] + public string recer_sys_code { get; set; } + /// + /// 6 dev_no 设备编号 字符型 100 + /// + [Description("设备编号")] + public string dev_no { get; set; } + /// + /// 7 dev_safe_info 设备安全信息 字符型 2000 + /// + [Description("设备安全信息")] + public string dev_safe_info { get; set; } + /// + /// 8 cainfo 数字签名信息 字符型 1024 + /// + [Description("数字签名信息")] + public string cainfo { get; set; } + /// + /// 9 signtype 签名类型 字符型 10 建议使用 SM2、SM3 + /// + [Description("签名类型")] + public string signtype { get; set; } + /// + /// 10 infver 接口版本号 字符型 6 Y例如:“V1.0”,版本号由医保下发通知。 + /// + [Description("接口版本号")] + public string infver { get; set; } + /// + /// 11 opter_type 经办人类别 3 Y Y1-经办人;2-自助终端;3-移动终端 + /// + [Description("经办人类别")] + public string opter_type { get; set; } + /// + /// 12 opter 经办人 字符型 30 Y 按地方要求传入经办人/终端编号 + /// + [Description("经办人")] + public string opter { get; set; } + /// + /// 13 opter_name 经办人姓名 字符型 50 Y按地方要求传入经办人姓名/终端名称 + /// + [Description("经办人姓名")] + public string opter_name { get; set; } + /// + /// 14 inf_time 交易时间日期时间型19 Y + /// + [Description("交易时间日期时间型")] + public string inf_time { get; set; } + /// + /// 15 fixmedins_code 定点医药机构编号字符型 30 Y + /// + [Description("定点医药机构编号")] + public string fixmedins_code { get; set; } + /// + /// 16 fixmedins_name定点医药机构名称字符型 200 Y + /// + [Description("定点医药机构名称")] + public string fixmedins_name { get; set; } + /// + /// 17 sign_no 交易签到流水号 字符型 30 通过签到【9001】交易获取 + /// + [Description("交易签到流水号")] + public string sign_no { get; set; } + /// + /// 18 input 交易输入 字符型 40000 Y + /// + // [Description("交易输入")] + // public string input { get; set; } + //[Description("服务商代码")] + //public string serv_code { get; set; } + //[Description("服务商识别码")] + //public string serv_sign { get; set; } + /// + /// 18 input 交易输入 字符型 40000 Y + /// + [Description("交易输入")] + public string input { get; set; } + + } } diff --git a/WinServiceAPI/NeiMengGuYiBaoApp/Models/Input/YiBao/Input_D001.cs b/WinServiceAPI/NeiMengGuYiBaoApp/Models/Input/YiBao/Input_D001.cs index 3ddd3e762cb5b1f5f6b04caacf7fe105a710d0f0..37e34a1fe2049e894e44785ca170c14f233bf5fd 100644 --- a/WinServiceAPI/NeiMengGuYiBaoApp/Models/Input/YiBao/Input_D001.cs +++ b/WinServiceAPI/NeiMengGuYiBaoApp/Models/Input/YiBao/Input_D001.cs @@ -37,10 +37,16 @@ namespace NeiMengGuYiBaoApp.Models.Input.YiBao public string rxCotnFlag { get; set; }// 续方标志 字符型 3 Y 0否、1-是 默认否;(预留字段,当前未使用) public string longRxFlag { get; set; }// 长期处方标志 字符型 3 Y 0-否、1-是,默认为否; /// - /// + /// 处方明细信息 /// public List rxdrugdetail { get; set; } + /// + /// 就诊信息 + /// public mdtrtinfoV0 mdtrtinfo { get; set; } + /// + /// 诊断信息 + /// public List diseinfo { get; set; } } public class rxdrugdetail @@ -85,51 +91,187 @@ namespace NeiMengGuYiBaoApp.Models.Input.YiBao } public class mdtrtinfoV0 { + /// + /// 定点医疗机构名称 + /// public string fixmedinsName { get; set; } + /// + /// 定点医疗机构编码 + /// public string fixmedinsCode { get; set; } + /// + /// 医保就诊ID + /// public string mdtrtId { get; set; } + /// + /// 医疗类别 + /// public string medType { get; set; } + /// + /// 住院/门诊号 + /// public string iptOtpNo { get; set; } + /// + /// 门诊住院标识1-门诊、2-住院 + /// public string otpIptFlag { get; set; } + /// + /// 医保人员编号 + /// public string psnNo { get; set; } + /// + /// 患者姓名 + /// public string patnName { get; set; } + /// + /// 人员证件类型 + /// public string psnCertType { get; set; } + /// + /// 证件号码 + /// public string certno { get; set; } + /// + /// 年龄 + /// public string patnAge { get; set; } + /// + /// 患者身高 + /// public string patnHgt { get; set; } + /// + /// 患者体重 + /// public string patnWt { get; set; } + /// + /// 性别 + /// public string gend { get; set; } + /// + /// + /// public string birctrlType { get; set; } + /// + /// + /// public string birctrlMatnDate { get; set; } + /// + /// + /// public string matnType { get; set; } + /// + /// 妊娠(孕周) + /// public string gesoVal { get; set; } + /// + /// 新生儿标志 + /// public string nwbFlag { get; set; } + /// + /// 新生儿日、月龄 + /// public string nwbAge { get; set; } + /// + /// 哺乳期标志 + /// public string suckPrdFlag { get; set; } + /// + /// 过敏史 + /// public string algsHis { get; set; } + /// + /// 开方科室名称 + /// public string prscDeptName { get; set; } + /// + /// 开方科室编号 + /// public string prscDeptCode { get; set; } + /// + /// 开方医保医师代码 国家医保医师代码 + /// public string drCode { get; set; } + /// + /// 开方医师姓名 + /// public string prscDrName { get; set; } + /// + /// 开方医师证件类型 + /// public string prscDrCertType { get; set; } + /// + /// 开方医师证件号码 + /// public string prscDrCertno { get; set; } + /// + /// 医生职称编码 + /// public string drProfttlCodg { get; set; } + /// + /// 医生职称名称 + /// public string drProfttlName { get; set; } + /// + /// 医生科室编码 + /// public string drDeptCode { get; set; } + /// + /// 医生科室名称 + /// public string drDeptName { get; set; } + public string caty { get; set; } + /// + /// 就诊时间 + /// public string mdtrtTime { get; set; } + /// + /// 病种编码 + /// public string diseCodg { get; set; } + /// + /// 病种名称 + /// public string diseName { get; set; } + /// + /// 特殊病种标志 + /// public string spDiseFlag { get; set; } + /// + /// 主诊断代码 + /// public string maindiagCode { get; set; } + /// + /// 主诊断名称 + /// public string maindiagName { get; set; } + /// + /// 疾病病情描述 + /// public string diseCondDscr { get; set; } + /// + /// 医保费用结算类型 + /// public string hiFeesetlType { get; set; } + /// + /// 医保费用类别名称 + /// public string hiFeesetlName { get; set; } + /// + /// 挂号费 + /// public string rgstFee { get; set; } + /// + /// 医疗费总额 + /// public string medfeeSumamt { get; set; } + /// + /// 是否初诊0-否、1-是 + /// public string fstdiagFlag { get; set; } + /// + /// 扩展数据 + /// public string extras { get; set; } } public class diseinfoVO diff --git a/WinServiceAPI/NeiMengGuYiBaoApp/Models/Input/YiBao/Input_D008.cs b/WinServiceAPI/NeiMengGuYiBaoApp/Models/Input/YiBao/Input_D008.cs new file mode 100644 index 0000000000000000000000000000000000000000..f9c29952f98e1b7264629558af172bed5f4dcdb8 --- /dev/null +++ b/WinServiceAPI/NeiMengGuYiBaoApp/Models/Input/YiBao/Input_D008.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace NeiMengGuYiBaoApp.Models.Input.YiBao +{ + public class Input_D008: InputBase + { + public string hiRxno { get; set; }//医保处方编号 字符型 30 Y + public string fixmedinsCode { get; set; }//定点医疗机构编号 字符型 20 Y + public string medListCodg { get; set; }//医疗目录编码 字符型 50 + public string medListCodgs { get; set; }//医疗目录编码列表 字符串数组 支持指定查询多个药品 + public string begntime { get; set; }//开始时间 日期时间型 开始执行时间,或按批次发布的时间 + public string endtime { get; set; }// 结束时间 日期时间型 yyyy-MM-dd HH:mm:ss + public int pageNum { get; set; }//分页码值 数值型 3 Y + public int pageSize { get; set; }// 分页大小 数值型 3 Y + } +} diff --git a/WinServiceAPI/NeiMengGuYiBaoApp/Models/Input/YiBao/PDFinput.cs b/WinServiceAPI/NeiMengGuYiBaoApp/Models/Input/YiBao/PDFinput.cs index 402489df003c3dce334b834b99f59d2e66b25925..431d9c0001e8edddc46b6d212a367565c59aca34 100644 --- a/WinServiceAPI/NeiMengGuYiBaoApp/Models/Input/YiBao/PDFinput.cs +++ b/WinServiceAPI/NeiMengGuYiBaoApp/Models/Input/YiBao/PDFinput.cs @@ -6,22 +6,82 @@ using System.Threading.Tasks; namespace NeiMengGuYiBaoApp.Models.Input.YiBao { + /// + /// 处方pdf文件参数 + /// public class PDFinput { + /// + /// 门诊号 + /// public string mzh { get; set; } + /// + /// 处方号 + /// public string cfh { get; set; } + /// + /// 开具日期 + /// public string kjrq { get; set; } + /// + /// 科别 + /// public string kb { get; set; } + /// + /// 姓名 + /// public string xm { get; set; } + /// + /// 性别 + /// public string xb { get; set; } + /// + /// 年龄 + /// public string nl { get; set; } + /// + /// 费用类别 + /// public string fb { get; set; } + /// + /// 临床诊断 + /// public string lczd { get; set; } + /// + /// 处方信息 + /// public string cfxx { get; set; } + /// + /// 处方list + /// public List cfxxList { get; set; } + /// + /// 开方医师 + /// public string kfys { get; set; } + /// + /// 审核医师 + /// public string shys { get; set; } + /// + /// + /// public string fhys { get; set; } + /// + /// 发药人 + /// public string fyr { get; set; } + /// + /// 开发医师签名图片url + /// + public string kfysImgUrl { get; set; } + /// + /// 审核医师签名图片url + /// + public string shysImgUrl { get; set; } + /// + /// 机构名称 + /// + public string orgName { get; set; } } } diff --git a/WinServiceAPI/NeiMengGuYiBaoApp/Models/Output/YiBao/OutputElectromicReturn.cs b/WinServiceAPI/NeiMengGuYiBaoApp/Models/Output/YiBao/OutputElectromicReturn.cs new file mode 100644 index 0000000000000000000000000000000000000000..25526c09829c5152d79bba9b460ed2f26b24ae9a --- /dev/null +++ b/WinServiceAPI/NeiMengGuYiBaoApp/Models/Output/YiBao/OutputElectromicReturn.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace NeiMengGuYiBaoApp.Models.Output.YiBao +{ + public class OutputElectromicReturn + { + public string appId { get; set; } + public string encData { get; set; } + public string encType { get; set; } + public string signData { get; set; } + public string code { get; set; } + public string message { get; set; } + public string signType { get; set; } + public string timestamp { get; set; } + } +} diff --git a/WinServiceAPI/NeiMengGuYiBaoApp/Models/Output/YiBao/OutputReturn_Dzcf.cs b/WinServiceAPI/NeiMengGuYiBaoApp/Models/Output/YiBao/OutputReturn_Dzcf.cs new file mode 100644 index 0000000000000000000000000000000000000000..b1a6c33e07890745a8c1a351c237100b8a002396 --- /dev/null +++ b/WinServiceAPI/NeiMengGuYiBaoApp/Models/Output/YiBao/OutputReturn_Dzcf.cs @@ -0,0 +1,40 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace NeiMengGuYiBaoApp.Models.Output.YiBao +{ + public class OutputReturn_Dzcf + { + /// + /// infcode 交易状态码 数值型 4 Y 详见下节 0 成功 -1 失败 + /// + public string infcode { get; set; } + /// + /// inf_refmsgid 接收方报文 ID 字符型 30 Y接收方返回,接收方医保区划代码(6)+时间(14)+流水号(10)时间格式:yyyyMMddHHmmss + /// + public string inf_refmsgid { get; set; } + /// + /// refmsg_time 接收报文时间 字符型 17 格式:yyyyMMddHHmmssSSS + /// + public string refmsg_time { get; set; } + /// + /// respond_time 响应报文时间 字符型 17 格式:yyyyMMddHHmmssSSS + /// + public string respond_time { get; set; } + + /// + /// err_msg 错误信息 字符型 200 交易失败状态下,业务返回的错误信息 + /// + public string err_msg { get; set; } + + /// + /// output 交易输出 字符型 40000 + /// + public string output { get; set; } + } + + +} diff --git a/WinServiceAPI/NeiMengGuYiBaoApp/Models/Output/YiBao/Output_D001.cs b/WinServiceAPI/NeiMengGuYiBaoApp/Models/Output/YiBao/Output_D001.cs index 31c2d5c746bfee65f8635cff083cf3b41d6d685a..379080c82aad6352ebfb2568590b67c776dcd2e5 100644 --- a/WinServiceAPI/NeiMengGuYiBaoApp/Models/Output/YiBao/Output_D001.cs +++ b/WinServiceAPI/NeiMengGuYiBaoApp/Models/Output/YiBao/Output_D001.cs @@ -8,7 +8,13 @@ namespace NeiMengGuYiBaoApp.Models.Output.YiBao { public class Output_D001 : OutputBase { + /// + /// 处方追溯码 + /// public string rxTraceCode { get; set; } + /// + /// 医保处方编号 + /// public string hiRxno { get; set; } } } diff --git a/WinServiceAPI/NeiMengGuYiBaoApp/Models/Output/YiBao/Output_D002.cs b/WinServiceAPI/NeiMengGuYiBaoApp/Models/Output/YiBao/Output_D002.cs index 73eb40aa44e571f40aa442f0cbb9e079d2eb0f40..2b86b2920a21a12888cd62ec9aae025253859586 100644 --- a/WinServiceAPI/NeiMengGuYiBaoApp/Models/Output/YiBao/Output_D002.cs +++ b/WinServiceAPI/NeiMengGuYiBaoApp/Models/Output/YiBao/Output_D002.cs @@ -8,9 +8,21 @@ namespace NeiMengGuYiBaoApp.Models.Output.YiBao { public class Output_D002 : OutputBase { + /// + /// 处方文件 医保电子签名后处方文件originalRxFile的base64值 + /// public string rxFile { get; set; } + /// + /// 签名/章摘要值 医保电子签名后处方信息originalValue的签名结果值 + /// public string signDigest { get; set; } + /// + /// 签名机构证书SN + /// public string signCertSn { get; set; } + /// + /// 签名机构证书DN + /// public string signCertDn { get; set; } } } diff --git a/WinServiceAPI/NeiMengGuYiBaoApp/Models/Output/YiBao/Output_D008.cs b/WinServiceAPI/NeiMengGuYiBaoApp/Models/Output/YiBao/Output_D008.cs new file mode 100644 index 0000000000000000000000000000000000000000..7e62bdc688667212b9c0e95f2fc589537e0c2c80 --- /dev/null +++ b/WinServiceAPI/NeiMengGuYiBaoApp/Models/Output/YiBao/Output_D008.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace NeiMengGuYiBaoApp.Models.Output.YiBao +{ + public class Output_D008: OutputBase + { + public string total { get; set; }//总数 + public string size { get; set; }//当前条数 + public List list { get; set; }// + } + + public class listd008 + { + public string medListCodg { get; set; }//医疗目录编码 字符型 50 Y + public string natDrugNo { get; set; }//国家药品编号 字符型 20 + public string genname { get; set; }//通用名 字符型 100 + public string prodname { get; set; }//商品名 字符型 100 + public string regName { get; set; }//注册名 字符型 500 Y + public string listType { get; set; }// 目录类别 字符型 6 101-西药中成药,102-中药饮片,103-自制剂,104-民族药 + public string listTypeName { get; set; }// 目录类别名称 字符型 50 + public string specName { get; set; }//规格名称 字符型 500 Y + public string prdrName { get; set; }// 生厂厂家 字符型 200 Y + public string aprvno { get; set; }// 批准文号 字符型 100 + public string dosformName { get; set; }//剂型名称 字符型 200 Y + public string minPacunt { get; set; }//最小包装单位 字符型 50 + public string minPacCnt { get; set; }//最小包装数量 字符型 50 + public string minPrepunt { get; set; }//最小制剂单位 字符型 10 + public string poolareaNo { get; set; }//统筹区编号 字符型 6 + public string poolareaName { get; set; }//统筹区名称 字符型 50 + public string dualchnlFlag { get; set; }//是否双通道标志 字符型 3 0-否 1-是 + public string oppoolFlag { get; set; }//是否门诊统筹标志 字符型 3 0-否 1-是 + public string begntime { get; set; }//开始时间 日期时间型 yyyy-MM-ddHH:mm:ss + public string endtime { get; set; }//结束时间 日期时间型 yyyy-MM-ddHH:mm:ss + } +} diff --git a/WinServiceAPI/NeiMengGuYiBaoApp/Models/Post/YiBao/Post_D002.cs b/WinServiceAPI/NeiMengGuYiBaoApp/Models/Post/YiBao/Post_D002.cs index d740364b4baa088bb0656211468668a6e661ae81..baa975936a430c9f2532d8bf7c0ba032c888854b 100644 --- a/WinServiceAPI/NeiMengGuYiBaoApp/Models/Post/YiBao/Post_D002.cs +++ b/WinServiceAPI/NeiMengGuYiBaoApp/Models/Post/YiBao/Post_D002.cs @@ -8,11 +8,32 @@ namespace NeiMengGuYiBaoApp.Models.Post.YiBao { public class Post_D002 : PostBase { + /// + /// 处方号 + /// public string cfh { get; set; } + /// + /// 开方医师 + /// public string kfys { get; set; } + /// + /// 开方医师工号 + /// + public string kfysgh { get; set; } + /// + /// 审核科室 + /// public string shks { get; set; } + /// + /// 审核医师 + /// public string shys { get; set; } + /// + /// 审核医师工号 + /// + public string shysgh { get; set; } public string rxFile { get; set; } public string signDigest { get; set; }//电子签名返回的处方信息签名值 + public string shrq { get; set; } } } diff --git a/WinServiceAPI/NeiMengGuYiBaoApp/Models/SQL/Dzcf_CFYP_output.cs b/WinServiceAPI/NeiMengGuYiBaoApp/Models/SQL/Dzcf_CFYP_output.cs new file mode 100644 index 0000000000000000000000000000000000000000..4b5f4465c95fc31d4094f47f1ed74234385ae981 --- /dev/null +++ b/WinServiceAPI/NeiMengGuYiBaoApp/Models/SQL/Dzcf_CFYP_output.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace NeiMengGuYiBaoApp.Models.SQL +{ + public class Dzcf_CFYP_output: SqlBase + { + public string medListCodg { get; set; }//医疗目录编码 字符型 50 Y + public string natDrugNo { get; set; }//国家药品编号 字符型 20 + public string genname { get; set; }//通用名 字符型 100 + public string prodname { get; set; }//商品名 字符型 100 + public string regName { get; set; }//注册名 字符型 500 Y + public string listType { get; set; }// 目录类别 字符型 6 101-西药中成药,102-中药饮片,103-自制剂,104-民族药 + public string listTypeName { get; set; }// 目录类别名称 字符型 50 + public string specName { get; set; }//规格名称 字符型 500 Y + public string prdrName { get; set; }// 生厂厂家 字符型 200 Y + public string aprvno { get; set; }// 批准文号 字符型 100 + public string dosformName { get; set; }//剂型名称 字符型 200 Y + public string minPacunt { get; set; }//最小包装单位 字符型 50 + public string minPacCnt { get; set; }//最小包装数量 字符型 50 + public string minPrepunt { get; set; }//最小制剂单位 字符型 10 + public string poolareaNo { get; set; }//统筹区编号 字符型 6 + public string poolareaName { get; set; }//统筹区名称 字符型 50 + public string dualchnlFlag { get; set; }//是否双通道标志 字符型 3 0-否 1-是 + public string oppoolFlag { get; set; }//是否门诊统筹标志 字符型 3 0-否 1-是 + public string begntime { get; set; }//开始时间 日期时间型 yyyy-MM-ddHH:mm:ss + public string endtime { get; set; }//结束时间 日期时间型 yyyy-MM-ddHH:mm:ss + } +} diff --git a/WinServiceAPI/NeiMengGuYiBaoApp/NeiMengGuYiBaoApp.csproj b/WinServiceAPI/NeiMengGuYiBaoApp/NeiMengGuYiBaoApp.csproj index 2227b3409f8645a6cdf63c3b1b174ccecfee1e43..789717c4544ef76b3e0d0e51ce5cda5489f3f637 100644 --- a/WinServiceAPI/NeiMengGuYiBaoApp/NeiMengGuYiBaoApp.csproj +++ b/WinServiceAPI/NeiMengGuYiBaoApp/NeiMengGuYiBaoApp.csproj @@ -55,6 +55,10 @@ ..\packages\AutoMapper.10.1.1\lib\net461\AutoMapper.dll + + False + ..\YiBaoInterface\dlls\BouncyCastle.Crypto.dll + @@ -73,9 +77,19 @@ ..\packages\Owin.1.0\lib\net40\Owin.dll + + ..\packages\PDFsharp.1.50.5147\lib\net20\PdfSharp.dll + + + ..\packages\PDFsharp.1.50.5147\lib\net20\PdfSharp.Charting.dll + + + ..\packages\STTech.CodePlus.1.6.5.1\lib\net45\STTech.CodePlus.dll + + @@ -110,6 +124,7 @@ + @@ -157,6 +172,7 @@ + @@ -167,6 +183,8 @@ + + @@ -190,6 +208,7 @@ + @@ -222,11 +241,16 @@ + + + + + @@ -516,6 +540,13 @@ + + Form + + + WaitForm.cs + + @@ -523,6 +554,8 @@ + + @@ -553,6 +586,9 @@ + + + @@ -568,6 +604,11 @@ wqsj_PlatForm_DAS + + + WaitForm.cs + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/WinServiceAPI/NeiMengGuYiBaoApp/WaitFormService.cs b/WinServiceAPI/NeiMengGuYiBaoApp/WaitFormService.cs new file mode 100644 index 0000000000000000000000000000000000000000..66ee939076cbab3b36748011ca1d086f8970287a --- /dev/null +++ b/WinServiceAPI/NeiMengGuYiBaoApp/WaitFormService.cs @@ -0,0 +1,124 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading; +using System.Threading.Tasks; + +namespace NeiMengGuYiBaoApp +{ + internal class WaitFormService + { + private static WaitFormService _instance; + private static readonly Object syncLock = new Object(); + private Thread waitThread; + private static WaitForm waitForm; + + ///      +  /// 为了单例模式防止new 实例化..     + ///      + private WaitFormService() + { + } + /// + /// 单例模式 + /// + public static WaitFormService Instance + { + get + { + if (WaitFormService._instance == null) + { + lock (syncLock) + { + if (WaitFormService._instance == null) + { + WaitFormService._instance = new WaitFormService(); + } + } + } + return WaitFormService._instance; + } + } + + ///      +        /// 显示等待窗体     +        ///      + public static void Show(Int16 i_time) + { + WaitFormService.Instance._CreateForm(i_time); + } + /// + /// 创建等待窗体 + /// + public void _CreateForm(Int16 i_time) + { + waitForm = null; + waitThread = new Thread(new ThreadStart(this.ShowWaitForm)); + waitThread.Start(); + Thread.Sleep(i_time); + } + /// + /// 显示窗体 + /// + private void ShowWaitForm() + { + try + { + waitForm = new WaitForm(); + waitForm.ShowDialog(); + } + catch (ThreadAbortException e) + { + waitForm.Close(); + Thread.ResetAbort(); + } + } + ///      +        /// 关闭等待窗体     +        ///      +        public static void Close(Int16 i_time) + { + + if (i_time < 0) { i_time = 0; } + Thread.Sleep(i_time); + WaitFormService.Instance._CloseForm(); + + } + ///      +        /// 关闭窗体     +        ///      +        private void _CloseForm() + { + + if (waitThread != null) + { + waitForm.Close(); + } + + } + ///      + /// 设置等待窗体标题     + ///      + ///  + public static void SetText(string text, Int16 i_time) + { + + WaitFormService.Instance.SetWaiteText(text); + Thread.Sleep(i_time); + + } + /// + /// + /// + /// + public void SetWaiteText(string text) + { + if (waitForm != null) + { + waitForm.Show(); + waitForm.SetText(text); + } + } + } +} diff --git a/WinServiceAPI/NeiMengGuYiBaoApp/sm2sm4/EasyGmUtils.cs b/WinServiceAPI/NeiMengGuYiBaoApp/sm2sm4/EasyGmUtils.cs new file mode 100644 index 0000000000000000000000000000000000000000..56c0c2eedd452a7d8e3e21ae713a8ed309e66830 --- /dev/null +++ b/WinServiceAPI/NeiMengGuYiBaoApp/sm2sm4/EasyGmUtils.cs @@ -0,0 +1,464 @@ +using Org.BouncyCastle.Asn1; +using Org.BouncyCastle.Asn1.GM; +using Org.BouncyCastle.Asn1.X9; +using Org.BouncyCastle.Crypto; +using Org.BouncyCastle.Crypto.Digests; +using Org.BouncyCastle.Crypto.Engines; +using Org.BouncyCastle.Crypto.Parameters; +using Org.BouncyCastle.Math; +using Org.BouncyCastle.Security; +using Org.BouncyCastle.Utilities; +using Org.BouncyCastle.Utilities.Encoders; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace NeiMengGuYiBaoApp.sm2sm4 +{ + class EasyGmUtils + { + private static X9ECParameters x9ECParameters = GMNamedCurves.GetByName("sm2p256v1"); + private static ECDomainParameters ecDomainParameters = new ECDomainParameters(x9ECParameters.Curve, x9ECParameters.G, x9ECParameters.N); + + + /** + * + * @param msg + * @param userId + * @param privateKey + * @return r||s,直接拼接byte数组的rs + */ + public static byte[] signSm3WithSm2(byte[] msg, byte[] userId, byte[] privateKeyBytes) + { + ECPrivateKeyParameters privateKeyParameters = getPrivatekeyFromD(new BigInteger(1, privateKeyBytes)); + return rsAsn1ToPlainByteArray(signSm3WithSm2Asn1Rs(msg, userId, privateKeyParameters)); + } + + + /** + * @param msg + * @param userId + * @param privateKey + * @return rs in asn1 format + */ + public static byte[] signSm3WithSm2Asn1Rs(byte[] msg, byte[] userId, AsymmetricKeyParameter privateKey) + { + try + { + ISigner signer = SignerUtilities.InitSigner("SM3withSM2", true, privateKey, new SecureRandom()); + signer.BlockUpdate(msg, 0, msg.Length); + byte[] sig = signer.GenerateSignature(); + return sig; + } + catch (Exception e) + { + //log.Error("SignSm3WithSm2Asn1Rs error: " + e.Message, e); + return null; + } + } + + + /** + * + * @param msg + * @param userId + * @param rs r||s,直接拼接byte数组的rs + * @param publicKey + * @return + */ + public static bool verifySm3WithSm2(byte[] msg, byte[] userId, byte[] rs, byte[] publicKeyBytes) + { + if (rs == null || msg == null || userId == null) return false; + if (rs.Length != RS_LEN * 2) return false; + + if (publicKeyBytes.Length != 64 && publicKeyBytes.Length != 65) throw new ArgumentException("err key length"); + BigInteger x, y; + if (publicKeyBytes.Length > 64) + { + x = fromUnsignedByteArray(publicKeyBytes, 1, 32); + y = fromUnsignedByteArray(publicKeyBytes, 33, 32); + } + else + { + x = fromUnsignedByteArray(publicKeyBytes, 0, 32); + y = fromUnsignedByteArray(publicKeyBytes, 32, 32); + } + ECPublicKeyParameters publicKey = getPublickeyFromXY(x, y); + return verifySm3WithSm2Asn1Rs(msg, userId, rsPlainByteArrayToAsn1(rs), publicKey); + } + + public static BigInteger fromUnsignedByteArray(byte[] var0, int var1, int var2) + { + byte[] var3 = var0; + if (var1 != 0 || var2 != var0.Length) + { + var3 = new byte[var2]; + Array.Copy(var0, var1, var3, 0, var2); + } + + return new BigInteger(1, var3); + } + + /** + * + * @param msg + * @param userId + * @param rs in asn1 format + * @param publicKey + * @return + */ + + public static bool verifySm3WithSm2Asn1Rs(byte[] msg, byte[] userId, byte[] sign, AsymmetricKeyParameter publicKey) + { + try + { + ISigner signer = SignerUtilities.GetSigner("SM3withSM2"); + signer.Init(false, publicKey); + signer.BlockUpdate(msg, 0, msg.Length); + return signer.VerifySignature(sign); + } + catch (Exception e) + { + //log.Error("VerifySm3WithSm2Asn1Rs error: " + e.Message, e); + return false; + } + } + + + /** + * bc加解密使用旧标c1||c2||c3,此方法在加密后调用,将结果转化为c1||c3||c2 + * @param c1c2c3 + * @return + */ + private static byte[] changeC1C2C3ToC1C3C2(byte[] c1c2c3) + { + int c1Len = (x9ECParameters.Curve.FieldSize + 7) / 8 * 2 + 1; //sm2p256v1的这个固定65。可看GMNamedCurves、ECCurve代码。 + const int c3Len = 32; //new SM3Digest().getDigestSize(); + byte[] result = new byte[c1c2c3.Length]; + Buffer.BlockCopy(c1c2c3, 0, result, 0, c1Len); //c1 + Buffer.BlockCopy(c1c2c3, c1c2c3.Length - c3Len, result, c1Len, c3Len); //c3 + Buffer.BlockCopy(c1c2c3, c1Len, result, c1Len + c3Len, c1c2c3.Length - c1Len - c3Len); //c2 + return result; + } + + + /** + * bc加解密使用旧标c1||c3||c2,此方法在解密前调用,将密文转化为c1||c2||c3再去解密 + * @param c1c3c2 + * @return + */ + private static byte[] changeC1C3C2ToC1C2C3(byte[] c1c3c2) + { + int c1Len = (x9ECParameters.Curve.FieldSize + 7) / 8 * 2 + 1; //sm2p256v1的这个固定65。可看GMNamedCurves、ECCurve代码。 + const int c3Len = 32; //new SM3Digest().GetDigestSize(); + byte[] result = new byte[c1c3c2.Length]; + Buffer.BlockCopy(c1c3c2, 0, result, 0, c1Len); //c1: 0->65 + Buffer.BlockCopy(c1c3c2, c1Len + c3Len, result, c1Len, c1c3c2.Length - c1Len - c3Len); //c2 + Buffer.BlockCopy(c1c3c2, c1Len, result, c1c3c2.Length - c3Len, c3Len); //c3 + return result; + } + + /** + * c1||c3||c2 + * @param data + * @param key + * @return + */ + public static byte[] sm2Decrypt(byte[] data, AsymmetricKeyParameter key) + { + return sm2DecryptOld(changeC1C3C2ToC1C2C3(data), key); + } + + /** + * c1||c3||c2 + * @param data + * @param key + * @return + */ + + public static byte[] sm2Encrypt(byte[] data, AsymmetricKeyParameter key) + { + return changeC1C2C3ToC1C3C2(sm2EncryptOld(data, key)); + } + + /** + * c1||c2||c3 + * @param data + * @param key + * @return + */ + public static byte[] sm2EncryptOld(byte[] data, AsymmetricKeyParameter pubkey) + { + try + { + SM2Engine sm2Engine = new SM2Engine(); + sm2Engine.Init(true, new ParametersWithRandom(pubkey, new SecureRandom())); + return sm2Engine.ProcessBlock(data, 0, data.Length); + } + catch (Exception e) + { + //log.Error("Sm2EncryptOld error: " + e.Message, e); + return null; + } + } + + /** + * c1||c2||c3 + * @param data + * @param key + * @return + */ + public static byte[] sm2DecryptOld(byte[] data, AsymmetricKeyParameter key) + { + try + { + SM2Engine sm2Engine = new SM2Engine(); + sm2Engine.Init(false, key); + return sm2Engine.ProcessBlock(data, 0, data.Length); + } + catch (Exception e) + { + //log.Error("Sm2DecryptOld error: " + e.Message, e); + return null; + } + } + + /** + * @param bytes + * @return + */ + public static byte[] sm3(byte[] bytes) + { + try + { + SM3Digest digest = new SM3Digest(); + digest.BlockUpdate(bytes, 0, bytes.Length); + byte[] result = DigestUtilities.DoFinal(digest); + return result; + } + catch (Exception e) + { + //log.Error("Sm3 error: " + e.Message, e); + return null; + } + } + + private const int RS_LEN = 32; + + private static byte[] bigIntToFixexLengthBytes(BigInteger rOrS) + { + // for sm2p256v1, n is 00fffffffeffffffffffffffffffffffff7203df6b21c6052b53bbf40939d54123, + // r and s are the result of mod n, so they should be less than n and have length<=32 + byte[] rs = rOrS.ToByteArray(); + if (rs.Length == RS_LEN) return rs; + else if (rs.Length == RS_LEN + 1 && rs[0] == 0) return Arrays.CopyOfRange(rs, 1, RS_LEN + 1); + else if (rs.Length < RS_LEN) + { + byte[] result = new byte[RS_LEN]; + Arrays.Fill(result, (byte)0); + Buffer.BlockCopy(rs, 0, result, RS_LEN - rs.Length, rs.Length); + return result; + } + else + { + throw new ArgumentException("err rs: " + Hex.ToHexString(rs)); + } + } + + /** + * BC的SM3withSM2签名得到的结果的rs是asn1格式的,这个方法转化成直接拼接r||s + * @param rsDer rs in asn1 format + * @return sign result in plain byte array + */ + private static byte[] rsAsn1ToPlainByteArray(byte[] rsDer) + { + Asn1Sequence seq = Asn1Sequence.GetInstance(rsDer); + byte[] r = bigIntToFixexLengthBytes(DerInteger.GetInstance(seq[0]).Value); + byte[] s = bigIntToFixexLengthBytes(DerInteger.GetInstance(seq[1]).Value); + byte[] result = new byte[RS_LEN * 2]; + Buffer.BlockCopy(r, 0, result, 0, r.Length); + Buffer.BlockCopy(s, 0, result, RS_LEN, s.Length); + return result; + } + + /** + * BC的SM3withSM2验签需要的rs是asn1格式的,这个方法将直接拼接r||s的字节数组转化成asn1格式 + * @param sign in plain byte array + * @return rs result in asn1 format + */ + private static byte[] rsPlainByteArrayToAsn1(byte[] sign) + { + if (sign.Length != RS_LEN * 2) throw new ArgumentException("err rs. "); + BigInteger r = new BigInteger(1, Arrays.CopyOfRange(sign, 0, RS_LEN)); + BigInteger s = new BigInteger(1, Arrays.CopyOfRange(sign, RS_LEN, RS_LEN * 2)); + Asn1EncodableVector v = new Asn1EncodableVector(); + v.Add(new DerInteger(r)); + v.Add(new DerInteger(s)); + try + { + return new DerSequence(v).GetEncoded("DER"); + } + catch (IOException e) + { + //log.Error("RsPlainByteArrayToAsn1 error: " + e.Message, e); + return null; + } + } + + public static byte[] sm4DecryptCBC(byte[] keyBytes, byte[] cipher, byte[] iv, String algo) + { + if (keyBytes.Length != 16) throw new ArgumentException("err key length"); + if (cipher.Length % 16 != 0) throw new ArgumentException("err data length"); + + try + { + KeyParameter key = ParameterUtilities.CreateKeyParameter("SM4", keyBytes); + IBufferedCipher c = CipherUtilities.GetCipher(algo); + if (iv == null) iv = zeroIv(algo); + c.Init(false, new ParametersWithIV(key, iv)); + return c.DoFinal(cipher); + } + catch (Exception e) + { + //log.Error("Sm4DecryptCBC error: " + e.Message, e); + return null; + } + } + + + public static byte[] sm4EncryptCBC(byte[] keyBytes, byte[] plain, byte[] iv, String algo) + { + if (keyBytes.Length != 16) throw new ArgumentException("err key length"); + if (plain.Length % 16 != 0) throw new ArgumentException("err data length"); + + try + { + KeyParameter key = ParameterUtilities.CreateKeyParameter("SM4", keyBytes); + IBufferedCipher c = CipherUtilities.GetCipher(algo); + if (iv == null) iv = zeroIv(algo); + c.Init(true, new ParametersWithIV(key, iv)); + return c.DoFinal(plain); + } + catch (Exception e) + { + //log.Error("Sm4EncryptCBC error: " + e.Message, e); + return null; + } + } + + + public static byte[] sm4EncryptECB(byte[] keyBytes, byte[] plain, string algo) + { + if (keyBytes.Length != 16) throw new ArgumentException("err key length"); + if (plain.Length % 16 != 0) throw new ArgumentException("err data length"); + + try + { + KeyParameter key = ParameterUtilities.CreateKeyParameter("SM4", keyBytes); + IBufferedCipher c = CipherUtilities.GetCipher(algo); + c.Init(true, key); + return c.DoFinal(plain); + } + catch (Exception e) + { + //log.Error("Sm4EncryptECB error: " + e.Message, e); + return null; + } + } + + public static byte[] sm4DecryptECB(byte[] keyBytes, byte[] cipher, string algo) + { + if (keyBytes.Length != 16) throw new ArgumentException("err key length"); + if (cipher.Length % 16 != 0) throw new ArgumentException("err data length"); + + try + { + KeyParameter key = ParameterUtilities.CreateKeyParameter("SM4", keyBytes); + IBufferedCipher c = CipherUtilities.GetCipher(algo); + c.Init(false, key); + return c.DoFinal(cipher); + } + catch (Exception e) + { + //log.Error("Sm4DecryptECB error: " + e.Message, e); + return null; + } + } + + + public static ECPrivateKeyParameters getPrivatekeyFromD(BigInteger d) + { + return new ECPrivateKeyParameters(d, ecDomainParameters); + } + + public static ECPublicKeyParameters getPublickeyFromXY(BigInteger x, BigInteger y) + { + return new ECPublicKeyParameters(x9ECParameters.Curve.CreatePoint(x, y), ecDomainParameters); + } + + public static byte[] sm4Encrypt(byte[] keyBytes, byte[] plain) + { + if (keyBytes.Length != 16) throw new ArgumentException("err key length"); + // if (plain.length % 16 != 0) throw new RuntimeException("err data length"); + + try + { + KeyParameter key = ParameterUtilities.CreateKeyParameter("SM4", keyBytes); + IBufferedCipher c = CipherUtilities.GetCipher("SM4/ECB/PKCS7Padding"); + c.Init(true, key); + + return c.DoFinal(plain); + } + catch (Exception e) + { + return null; + } + } + + public static byte[] sm4Decrypt(byte[] keyBytes, byte[] cipher) + { + // if (keyBytes.length != 16) throw new RuntimeException("err key length"); + if (cipher.Length % 16 != 0) throw new ArgumentException("err data length"); + + try + { + KeyParameter key = ParameterUtilities.CreateKeyParameter("SM4", keyBytes); + IBufferedCipher c = CipherUtilities.GetCipher("SM4/ECB/PKCS7Padding"); + c.Init(false, key); + return c.DoFinal(cipher); + + } + catch (Exception e) + { + return null; + } + } + + public const String SM4_ECB_NOPADDING = "SM4/ECB/NoPadding"; + public const String SM4_CBC_NOPADDING = "SM4/CBC/NoPadding"; + public const String SM4_CBC_PKCS7PADDING = "SM4/CBC/PKCS7Padding"; + + public static byte[] zeroIv(String algo) + { + + try + { + IBufferedCipher cipher = CipherUtilities.GetCipher(algo); + int blockSize = cipher.GetBlockSize(); + byte[] iv = new byte[blockSize]; + Arrays.Fill(iv, (byte)0); + return iv; + } + catch (Exception e) + { + //log.Error("ZeroIv error: " + e.Message, e); + return null; + } + } + + + } +} diff --git a/WinServiceAPI/NeiMengGuYiBaoApp/sm2sm4/SMUtil.cs b/WinServiceAPI/NeiMengGuYiBaoApp/sm2sm4/SMUtil.cs new file mode 100644 index 0000000000000000000000000000000000000000..14fada7daa4366135b1c286b376602de702e5952 --- /dev/null +++ b/WinServiceAPI/NeiMengGuYiBaoApp/sm2sm4/SMUtil.cs @@ -0,0 +1,127 @@ +using Newtonsoft.Json.Linq; +using Org.BouncyCastle.Utilities.Encoders; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace NeiMengGuYiBaoApp.sm2sm4 +{ + public class SMUtil + { + /** + * 加密 + * + * @param data + * @param appId + * @param appSecret + * @return + */ + public static String encrypt(String data, String appId, String appSecret) + { + //加密流程 + //用appId加密appSecret获取新秘钥 + byte[] appSecretEncData = EasyGmUtils.sm4Encrypt(Encoding.UTF8.GetBytes(appId.Substring(0, 16)), Encoding.UTF8.GetBytes(appSecret)); + //新秘钥串 + byte[] secKey = Encoding.UTF8.GetBytes(Hex.ToHexString(appSecretEncData).ToUpper().Substring(0, 16)); + //加密0数据 + String encryptDataStr = Hex.ToHexString(EasyGmUtils.sm4Encrypt(secKey, Encoding.UTF8.GetBytes(data))).ToUpper(); + return encryptDataStr; + } + + /** + * 解密 + * + * @param data + * @param appId + * @param appSecret + * @return + */ + public static String decrypt(String data, String appId, String appSecret) + { + byte[] appSecretEncDataDecode = EasyGmUtils.sm4Encrypt(Encoding.UTF8.GetBytes(appId.Substring(0, 16)), Encoding.UTF8.GetBytes(appSecret)); + byte[] secKeyDecode = Encoding.UTF8.GetBytes(Hex.ToHexString(appSecretEncDataDecode).ToUpper().Substring(0, 16)); + String decryptDataStr = Encoding.UTF8.GetString(EasyGmUtils.sm4Decrypt(secKeyDecode, Hex.Decode(data))); + return decryptDataStr; + } + + /** + * 签名 + * + * @param jsonObject + * @param appSecret + * @param privateKey + * @return + */ + public static String sign(JObject jsonObject, String appSecret, String privateKey) + { + // 获取签名串 + byte[] signText = Encoding.UTF8.GetBytes(SignUtil.getSignText(jsonObject, appSecret)); + byte[] userId = Encoding.UTF8.GetBytes(appSecret); + byte[] prvkey = Base64.Decode(privateKey); + String responseSign = Base64.ToBase64String(EasyGmUtils.signSm3WithSm2(signText, userId, prvkey)); + return responseSign; + } + + /** + * 验签 + * + * @param jsonObject + * @param appSecret + * @param publicKey + * @param responseSign + * @return + */ + public static Boolean verify(JObject jsonObject, String appSecret, String publicKey, String responseSign) + { + //验签 + byte[] msg = Encoding.UTF8.GetBytes(SignUtil.getSignText(jsonObject, appSecret)); + byte[] userIdDecode = Encoding.UTF8.GetBytes(appSecret); + byte[] pubkey = Base64.Decode(publicKey); + byte[] signData = Base64.Decode(responseSign); + return EasyGmUtils.verifySm3WithSm2(msg, userIdDecode, signData, pubkey); + } + + + + /** + * 签名 + * + * @param jsonObject + * @param appSecret + * @param privateKey + * @return + */ + public static String sign(String jsonString, String appSecret, String privateKey) + { + JObject jsonObject = (JObject)JObject.Parse(jsonString); + // 获取签名串 + byte[] signText = Encoding.UTF8.GetBytes(SignUtil.getSignText(jsonObject, appSecret)); + byte[] userId = Encoding.UTF8.GetBytes(appSecret); + byte[] prvkey = Base64.Decode(privateKey); + String responseSign = Base64.ToBase64String(EasyGmUtils.signSm3WithSm2(signText, userId, prvkey)); + return responseSign; + } + + /** + * 验签 + * + * @param jsonObject + * @param appSecret + * @param publicKey + * @param responseSign + * @return + */ + public static Boolean verify(String jsonString, String appSecret, String publicKey, String responseSign) + { + JObject jsonObject = (JObject)JObject.Parse(jsonString); + //验签 + byte[] msg = Encoding.UTF8.GetBytes(SignUtil.getSignText(jsonObject, appSecret)); + byte[] userIdDecode = Encoding.UTF8.GetBytes(appSecret); + byte[] pubkey = Base64.Decode(publicKey); + byte[] signData = Base64.Decode(responseSign); + return EasyGmUtils.verifySm3WithSm2(msg, userIdDecode, signData, pubkey); + } + } +} diff --git a/WinServiceAPI/NeiMengGuYiBaoApp/sm2sm4/SignUtil.cs b/WinServiceAPI/NeiMengGuYiBaoApp/sm2sm4/SignUtil.cs new file mode 100644 index 0000000000000000000000000000000000000000..6024d4632b0e1b27fef7a47ebafdc78274a01052 --- /dev/null +++ b/WinServiceAPI/NeiMengGuYiBaoApp/sm2sm4/SignUtil.cs @@ -0,0 +1,295 @@ +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace NeiMengGuYiBaoApp.sm2sm4 +{ + class SignUtil + { + private static List ignoreSign = new List() { "signData", "encData", "extra" }; + + public static String getSignText(JObject jsonObject, String appSecret) + { + SortedDictionary signMap = new SortedDictionary(StringComparer.Ordinal); + + foreach (var entry in jsonObject) + { + if (!String.IsNullOrEmpty(entry.Value.ToString()) && !ignoreSign.Contains(entry.Key)) + { + signMap.Add(entry.Key, getValue(entry.Value)); + } + } + + + List list = new List(); + + foreach (var entry in signMap) + { + if (!String.IsNullOrEmpty(getObjString(entry.Value))) + { + list.Add((String)entry.Key + "=" + (String)entry.Value + "&"); + } + } + + int size = list.Count(); + String[] arrayToSort = (String[])list.ToArray(); + Array.Sort(arrayToSort, new CaseInsensitiveComparer()); + StringBuilder sb = new StringBuilder(); + + for (int i = 0; i < size; ++i) + { + sb.Append(arrayToSort[i]); + } + + String signText = sb.Append("key=").Append(appSecret).ToString(); + return signText; + } + + public static String getObjString(Object obj) + { + return obj == null ? "" : (String)obj; + } + + private static String getValue(Object value) + { + return value is String ? getObjString(value) : treeJsonParam(value); + } + + private static String treeJsonParam(Object value) + { + String jsonParam = null; + if (value is Dictionary) + { + SortedDictionary treeNestedMap = new SortedDictionary(StringComparer.Ordinal); + Dictionary nestedMap = (Dictionary)value; + + foreach (var entry in nestedMap) + { + treeNestedMap.Add(entry.Key.ToString(), entry.Value); + } + jsonParam = JsonConvert.SerializeObject(treeParams(treeNestedMap), Formatting.None); + } + else if (value is List) + { + List ar = (List)value; + if (ar != null && ar.Count() != 0) + jsonParam = JsonConvert.SerializeObject(treeList(ar), Formatting.None); + } + else if (value is JObject) + { + SortedDictionary treeNestedMap = new SortedDictionary(StringComparer.Ordinal); + JObject nestedMap = (JObject)value; + foreach (var entry in nestedMap) + { + treeNestedMap.Add(entry.Key.ToString(), entry.Value); + } + jsonParam = JsonConvert.SerializeObject(treeParams(treeNestedMap), Formatting.None); + } + else if (value is JArray) + { + JArray ar = (JArray)value; + if (ar != null && ar.Count() != 0) + jsonParam = JsonConvert.SerializeObject(treeJsonArray(ar), Formatting.None); + } + else if (value is JValue) + { + JValue jval = (JValue)value; + if (jval != null && !String.IsNullOrEmpty(jval.ToString())) + { + if (jval.ToString().ToLower().Trim().Equals("true") || jval.ToString().ToLower().Trim().Equals("false")) + jsonParam = jval.ToString().ToLower().Trim(); + else + jsonParam = jval.Value.ToString(); + } + + + } + else if (value is JProperty) + { + SortedDictionary treeNestedMap = new SortedDictionary(StringComparer.Ordinal); + JProperty nestedMap = (JProperty)value; + treeNestedMap.Add(nestedMap.Name, nestedMap.Value); + jsonParam = JsonConvert.SerializeObject(treeParams(treeNestedMap), Formatting.None); + } + else + { + jsonParam = value.ToString(); + } + + return jsonParam; + } + + private static SortedDictionary treeParams(SortedDictionary param) + { + if (param == null) + { + return new SortedDictionary(StringComparer.Ordinal); + } + else + { + SortedDictionary treeParam = new SortedDictionary(StringComparer.Ordinal); + + while (true) + { + foreach (var entry in param) + { + + String key = (String)entry.Key; + Object value = entry.Value; + if (value is Dictionary) + { + SortedDictionary treeNestedMap = new SortedDictionary(StringComparer.Ordinal); + Dictionary nestedMap = (Dictionary)value; + + foreach (var nestedEntry in nestedMap) + { + treeNestedMap.Add(nestedEntry.Key.ToString(), nestedEntry.Value); + } + + treeParam.Add(key, treeParams(treeNestedMap)); + } + else if (value is List) + { + List ar = (List)value; + if (ar != null && ar.Count() != 0) + treeParam.Add(key, treeList(ar)); + } + else if (value is JArray) + { + JArray ar = (JArray)value; + if (ar != null && ar.Count() != 0) + treeParam.Add(key, treeJsonArray(ar)); + } + else if (value is JObject) + { + SortedDictionary treeNestedMap = new SortedDictionary(StringComparer.Ordinal); + JObject nestedMap = (JObject)value; + foreach (var nestedEntry in nestedMap) + { + treeNestedMap.Add(nestedEntry.Key.ToString(), nestedEntry.Value); + } + treeParam.Add(key, treeParams(treeNestedMap)); + } + else if (value is JValue) + { + JValue jval = (JValue)value; + if (jval != null && !String.IsNullOrEmpty(jval.ToString())) + { + if (jval.ToString().ToLower().Trim().Equals("true") || jval.ToString().ToLower().Trim().Equals("false")) + treeParam.Add(key, jval.ToString().ToLower().Trim()); + else + treeParam.Add(key, jval.ToString()); + } + } + else if (value is JProperty) + { + SortedDictionary treeNestedMap = new SortedDictionary(StringComparer.Ordinal); + JProperty nestedMap = (JProperty)value; + treeNestedMap.Add(nestedMap.Name, nestedMap.Value); + treeParam.Add(key, treeParams(treeNestedMap)); + } + else if (!"".Equals(value) && value != null) + { + treeParam.Add(key, value.ToString()); + } + } + return treeParam; + } + } + } + + private static List treeList(List list) + { + if (list != null && list.Count() != 0) + { + JArray jsonArray = new JArray(); + int size = list.Count(); + + for (int i = 0; i < size; ++i) + { + jsonArray.Add(list[i]); + } + + return treeJsonArray(jsonArray); + } + else + { + return null; + } + } + + private static List treeJsonArray(JArray jarr) + { + if (jarr != null && jarr.Count() != 0) + { + List jsonArray = new List(); + int size = jarr.Count(); + + for (int i = 0; i < size; ++i) + { + Object value = jarr[i]; + if (value is List) + { + List ar = (List)value; + if (ar != null && ar.Count() != 0) + jsonArray.Add(treeList(ar)); + } + else if (value is JArray) + { + JArray ar = (JArray)value; + if (ar != null && ar.Count() != 0) + jsonArray.Add(treeJsonArray(ar)); + } + else if (value is JObject) + { + SortedDictionary treeNestedMap = new SortedDictionary(StringComparer.Ordinal); + JObject nestedMap = (JObject)value; + foreach (var nestedEntry in nestedMap) + { + treeNestedMap.Add(nestedEntry.Key.ToString(), nestedEntry.Value); + } + jsonArray.Add(treeParams(treeNestedMap)); + + } + else if (value is JValue) + { + JValue jval = (JValue)value; + if (jval != null && !String.IsNullOrEmpty(jval.ToString())) + { + if (jval.ToString().ToLower().Trim().Equals("true") || jval.ToString().ToLower().Trim().Equals("false")) + jsonArray.Add(jval.ToString().ToLower().Trim()); + else + jsonArray.Add(jval.ToString()); + } + } + else if (value is JProperty) + { + SortedDictionary treeNestedMap = new SortedDictionary(StringComparer.Ordinal); + JProperty nestedMap = (JProperty)value; + treeNestedMap.Add(nestedMap.Name, nestedMap.Value); + jsonArray.Add(treeParams(treeNestedMap)); + } + else if (!"".Equals(value)) + { + jsonArray.Add(value.ToString()); + } + + } + + return jsonArray; + } + else + { + return null; + } + } + + + + } +} diff --git a/WinServiceAPI/YiBaoBase/App.config b/WinServiceAPI/YiBaoBase/App.config index caf979ea99b316fb50f46c870d4c24ce8c511fb3..2a924f65ad7fcdbc3ee135f7a7193f66255f9f76 100644 --- a/WinServiceAPI/YiBaoBase/App.config +++ b/WinServiceAPI/YiBaoBase/App.config @@ -2,7 +2,7 @@ - + @@ -10,10 +10,10 @@ - + - + @@ -24,8 +24,8 @@ - - + + diff --git a/build.ps1 b/build.ps1 index ed2820de168dd3404fe980281246e2246090353f..0667d524fa632da7eb5223b4844255d78edcdc1c 100644 --- a/build.ps1 +++ b/build.ps1 @@ -2,10 +2,13 @@ ## eg: C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin ## 뻷Чpowershell ./build.ps1 +$OutputEncoding = [System.Text.Encoding]::UTF8 + +[Console]::OutputEncoding = [System.Text.Encoding]::UTF8 Write-Host "ʼ벢Static" -MSBuild.exe .\Newtouch.HIS.Static/Newtouch.HIS.Static/Newtouch.HIS.Static.csproj /p:Configuration=Release /p:DeployOnBuild=true /p:PublishProfile=FolderProfile +MSBuild.exe .\Newtouch.HIS.Static/Newtouch.HIS.Static/Newtouch.HIS.Static.csproj /p:Configuration=Release /p:DeployOnBuild=true /p:PublishProfile=PublishProfile if ($LASTEXITCODE -ne 0) { Write-Host "Staticʧܣ." -ForegroundColor Red exit $LASTEXITCODE @@ -13,14 +16,14 @@ if ($LASTEXITCODE -ne 0) { Write-Host "ʼ벢Base" -MSBuild.exe .\Newtouch.HIS.Base\Newtouch.HIS.Base.HOSP\Newtouch.HIS.Base.HOSP.csproj /p:Configuration=Release /p:DeployOnBuild=true /p:PublishProfile=FolderProfile +MSBuild.exe .\Newtouch.HIS.Base\Newtouch.HIS.Base.HOSP\Newtouch.HIS.Base.HOSP.csproj /p:Configuration=Release /p:DeployOnBuild=true /p:PublishProfile=PublishProfile if ($LASTEXITCODE -ne 0) { Write-Host "Baseʧܣ." -ForegroundColor Red exit $LASTEXITCODE } Write-Host "ʼ벢BaseAPI" -MSBuild.exe .\Newtouch.HIS.Base\Newtouch.HIS.Base.HOSP.API\Newtouch.HIS.Base.HOSP.API.csproj /p:Configuration=Release /p:DeployOnBuild=true /p:PublishProfile=FolderProfile +MSBuild.exe .\Newtouch.HIS.Base\Newtouch.HIS.Base.HOSP.API\Newtouch.HIS.Base.HOSP.API.csproj /p:Configuration=Release /p:DeployOnBuild=true /p:PublishProfile=PublishProfile if ($LASTEXITCODE -ne 0) { Write-Host "BaseAPIʧܣ." -ForegroundColor Red exit $LASTEXITCODE @@ -28,112 +31,112 @@ if ($LASTEXITCODE -ne 0) { Write-Host "ʼ벢Sett" -MSBuild.exe .\Newtouch.HIS.Sett\Newtouch.Web\Newtouch.HIS.Sett.Web.csproj /p:Configuration=Release /p:DeployOnBuild=true /p:PublishProfile=FolderProfile +MSBuild.exe .\Newtouch.HIS.Sett\Newtouch.Web\Newtouch.HIS.Sett.Web.csproj /p:Configuration=Release /p:DeployOnBuild=true /p:PublishProfile=PublishProfile if ($LASTEXITCODE -ne 0) { Write-Host "Settʧܣ." -ForegroundColor Red exit $LASTEXITCODE } Write-Host "ʼ벢SettAPI" -MSBuild.exe .\Newtouch.HIS.Sett\Newtouch.HIS.Sett.API\Newtouch.HIS.Sett.API.csproj /p:Configuration=Release /p:DeployOnBuild=true /p:PublishProfile=FolderProfile +MSBuild.exe .\Newtouch.HIS.Sett\Newtouch.HIS.Sett.API\Newtouch.HIS.Sett.API.csproj /p:Configuration=Release /p:DeployOnBuild=true /p:PublishProfile=PublishProfile if ($LASTEXITCODE -ne 0) { Write-Host "SettAPIʧܣ." -ForegroundColor Red exit $LASTEXITCODE } Write-Host "ʼ벢CIS" -MSBuild.exe .\Newtouch.HIS.CIS\Newtouch.CIS.Web\Newtouch.CIS.Web.csproj /p:Configuration=Release /p:DeployOnBuild=true /p:PublishProfile=FolderProfile +MSBuild.exe .\Newtouch.HIS.CIS\Newtouch.CIS.Web\Newtouch.CIS.Web.csproj /p:Configuration=Release /p:DeployOnBuild=true /p:PublishProfile=PublishProfile if ($LASTEXITCODE -ne 0) { Write-Host "CISʧܣ." -ForegroundColor Red exit $LASTEXITCODE } Write-Host "ʼ벢CISAPI" -MSBuild.exe Newtouch.HIS.CIS/NewtouchCIS.API/NewtouchCIS.API.csproj /p:Configuration=Release /p:DeployOnBuild=true /p:PublishProfile=FolderProfile +MSBuild.exe Newtouch.HIS.CIS/NewtouchCIS.API/NewtouchCIS.API.csproj /p:Configuration=Release /p:DeployOnBuild=true /p:PublishProfile=PublishProfile if ($LASTEXITCODE -ne 0) { Write-Host "CISAPIʧܣ." -ForegroundColor Red exit $LASTEXITCODE } Write-Host "ʼ벢PDS" -MSBuild.exe Newtouch.HIS.PDS/Newtouch.HIS.Web/Newtouch.HIS.PDS.Web.csproj /p:Configuration=Release /p:DeployOnBuild=true /p:PublishProfile=publish +MSBuild.exe Newtouch.HIS.PDS/Newtouch.HIS.Web/Newtouch.HIS.PDS.Web.csproj /p:Configuration=Release /p:DeployOnBuild=true /p:PublishProfile=PublishProfile if ($LASTEXITCODE -ne 0) { Write-Host "PDSʧܣ." -ForegroundColor Red exit $LASTEXITCODE } Write-Host "ʼ벢PDSAPI" -MSBuild.exe Newtouch.HIS.PDS/Newtouch.PDS.API/Newtouch.Pds.Api.csproj /p:Configuration=Release /p:DeployOnBuild=true /p:PublishProfile=publish +MSBuild.exe Newtouch.HIS.PDS/Newtouch.PDS.API/Newtouch.Pds.Api.csproj /p:Configuration=Release /p:DeployOnBuild=true /p:PublishProfile=PublishProfile if ($LASTEXITCODE -ne 0) { Write-Host "PDSAPIʧܣ." -ForegroundColor Red exit $LASTEXITCODE } Write-Host "ʼ벢EMR" -MSBuild.exe Newtouch.HIS.EMR/Newtouch.EMR.Web/Newtouch.EMR.Web.csproj /p:Configuration=Release /p:DeployOnBuild=true /p:PublishProfile=FolderProfile +MSBuild.exe Newtouch.HIS.EMR/Newtouch.EMR.Web/Newtouch.EMR.Web.csproj /p:Configuration=Release /p:DeployOnBuild=true /p:PublishProfile=PublishProfile if ($LASTEXITCODE -ne 0) { Write-Host "EMRʧܣ." -ForegroundColor Red exit $LASTEXITCODE } Write-Host "ʼ벢OR" -MSBuild.exe Newtouch.HIS.OR/Newtouch.OR.ManageSystem.Web/Newtouch.HIS.OR.Web.csproj /p:Configuration=Release /p:DeployOnBuild=true /p:PublishProfile=FolderProfile +MSBuild.exe Newtouch.HIS.OR/Newtouch.OR.ManageSystem.Web/Newtouch.HIS.OR.Web.csproj /p:Configuration=Release /p:DeployOnBuild=true /p:PublishProfile=PublishProfile if ($LASTEXITCODE -ne 0) { Write-Host "ORʧܣ." -ForegroundColor Red exit $LASTEXITCODE } Write-Host "ʼ벢ORAPI" -MSBuild.exe Newtouch.HIS.OR/Newtouch.OR.ManageSystem.API/Newtouch.HIS.OR.API.csproj /p:Configuration=Release /p:DeployOnBuild=true /p:PublishProfile=FolderProfile +MSBuild.exe Newtouch.HIS.OR/Newtouch.OR.ManageSystem.API/Newtouch.HIS.OR.API.csproj /p:Configuration=Release /p:DeployOnBuild=true /p:PublishProfile=PublishProfile if ($LASTEXITCODE -ne 0) { Write-Host "ORAPIʧܣ." -ForegroundColor Red exit $LASTEXITCODE } Write-Host "ʼ벢Herp" -MSBuild.exe Newtouch.HIS.Herp/Newtouch.Herp.Web/Newtouch.Herp.Web.csproj /p:Configuration=Release /p:DeployOnBuild=true /p:PublishProfile=FolderProfile +MSBuild.exe Newtouch.HIS.Herp/Newtouch.Herp.Web/Newtouch.Herp.Web.csproj /p:Configuration=Release /p:DeployOnBuild=true /p:PublishProfile=PublishProfile if ($LASTEXITCODE -ne 0) { Write-Host "Herpʧܣ." -ForegroundColor Red exit $LASTEXITCODE } Write-Host "ʼ벢MRMS" -MSBuild.exe Newtouch.HIS.MRMS/Newtouch.MR.ManageSystem.Web/Newtouch.HIS.MRMS.Web.csproj /p:Configuration=Release /p:DeployOnBuild=true /p:PublishProfile=FolderProfile +MSBuild.exe Newtouch.HIS.MRMS/Newtouch.MR.ManageSystem.Web/Newtouch.HIS.MRMS.Web.csproj /p:Configuration=Release /p:DeployOnBuild=true /p:PublishProfile=PublishProfile if ($LASTEXITCODE -ne 0) { Write-Host "MRMSʧܣ." -ForegroundColor Red exit $LASTEXITCODE } Write-Host "ʼ벢MRQC" -MSBuild.exe Newtouch.HIS.MRQC/Newtouch.MRQC.Web/Newtouch.MRQC.Web.csproj /p:Configuration=Release /p:DeployOnBuild=true /p:PublishProfile=FolderProfile +MSBuild.exe Newtouch.HIS.MRQC/Newtouch.MRQC.Web/Newtouch.MRQC.Web.csproj /p:Configuration=Release /p:DeployOnBuild=true /p:PublishProfile=PublishProfile if ($LASTEXITCODE -ne 0) { Write-Host "MRQCʧܣ." -ForegroundColor Red exit $LASTEXITCODE } Write-Host "ʼ벢AuthCenterAPI" -MSBuild.exe Newtouch.HIS.WebAPI.Manage/NewtouchHIS.AuthenticationCenter/NewtouchHIS.AuthenticationCenter.csproj /p:Configuration=Release /p:DeployOnBuild=true /p:PublishProfile=FolderProfile +MSBuild.exe Newtouch.HIS.WebAPI.Manage/NewtouchHIS.AuthenticationCenter/NewtouchHIS.AuthenticationCenter.csproj /p:Configuration=Release /p:DeployOnBuild=true /p:PublishProfile=PublishProfile if ($LASTEXITCODE -ne 0) { Write-Host "AuthCenterAPIʧܣ." -ForegroundColor Red exit $LASTEXITCODE } Write-Host "ʼ벢ApiManage" -MSBuild.exe Newtouch.HIS.WebAPI.Manage/NewtouchHIS.WebAPI.Manage/NewtouchHIS.WebAPI.Manage.csproj /p:Configuration=Release /p:DeployOnBuild=true /p:PublishProfile=FolderProfile +MSBuild.exe Newtouch.HIS.WebAPI.Manage/NewtouchHIS.WebAPI.Manage/NewtouchHIS.WebAPI.Manage.csproj /p:Configuration=Release /p:DeployOnBuild=true /p:PublishProfile=PublishProfile if ($LASTEXITCODE -ne 0) { Write-Host "ApiManageʧܣ." -ForegroundColor Red exit $LASTEXITCODE } Write-Host "ʼ벢his.baseapi" -MSBuild.exe Newtouch.HIS.SSO/HIS.BaseAPI/HIS.BaseAPI.csproj /p:Configuration=Release /p:DeployOnBuild=true /p:PublishProfile=FolderProfile +MSBuild.exe Newtouch.HIS.SSO/HIS.BaseAPI/HIS.BaseAPI.csproj /p:Configuration=Release /p:DeployOnBuild=true /p:PublishProfile=PublishProfile if ($LASTEXITCODE -ne 0) { Write-Host "his.baseapiʧܣ." -ForegroundColor Red exit $LASTEXITCODE } Write-Host "ʼ벢Union" -MSBuild.exe Newtouch.HIS.SSO/HIS.SSO/HIS.SSO.csproj /p:Configuration=Release /p:DeployOnBuild=true /p:PublishProfile=FolderProfile +MSBuild.exe Newtouch.HIS.SSO/HIS.SSO/HIS.SSO.csproj /p:Configuration=Release /p:DeployOnBuild=true /p:PublishProfile=PublishProfile if ($LASTEXITCODE -ne 0) { Write-Host "Unionʧܣ." -ForegroundColor Red exit $LASTEXITCODE diff --git a/his-dll-common/FrameworkBase/FrameworkBase.MultiOrg.Domain.dll b/his-dll-common/FrameworkBase/FrameworkBase.MultiOrg.Domain.dll index 1abea759e1ce82103ea79dbf771111460219cdeb..857b0b527a41dcfad3c7c0eff275b69bc580e306 100644 Binary files a/his-dll-common/FrameworkBase/FrameworkBase.MultiOrg.Domain.dll and b/his-dll-common/FrameworkBase/FrameworkBase.MultiOrg.Domain.dll differ diff --git a/publish/Report/Resources/lite.db b/publish/Report/Resources/lite.db index 3068c5bce1a765d5d51720580be2be92c9168098..623c4db34d3c23ff6548dd59a4d3fb652845d784 100644 Binary files a/publish/Report/Resources/lite.db and b/publish/Report/Resources/lite.db differ diff --git a/publish/Report/appsettings.json b/publish/Report/appsettings.json index e735543832390587a9bd6c57229276034309ac91..3f49f0f92a812bbef4d7ec64a62d61dfb66fca5c 100644 --- a/publish/Report/appsettings.json +++ b/publish/Report/appsettings.json @@ -1,7 +1,7 @@ { "ConnectionStrings": { - "KyTemplateConnection": "Data Source=192.168.9.190,1433;Initial Catalog=NewtouchHIS_Base;User ID=sa;Password=Abcd1234;MultipleActiveResultSets=true;" + "KyTemplateConnection": "Data Source=.;Initial Catalog=NewtouchHIS_Base;User ID=sa;Password=a1b2c3d4*;MultipleActiveResultSets=true;" } }