diff --git a/src/Shentun.ColumnReferencePlugIns/WebAppoints/WebAppointPlugInsBase.cs b/src/Shentun.ColumnReferencePlugIns/WebAppoints/WebAppointPlugInsBase.cs index cce4c8f..608c278 100644 --- a/src/Shentun.ColumnReferencePlugIns/WebAppoints/WebAppointPlugInsBase.cs +++ b/src/Shentun.ColumnReferencePlugIns/WebAppoints/WebAppointPlugInsBase.cs @@ -42,6 +42,12 @@ namespace Shentun.Peis.PlugIns.WebAppoints } + public virtual async Task GetByPatientRegisterIdAsync(AppointPatientRegisterIdInputDto input) + { + throw new NotImplementedException(); + + } + /// /// 获取需要同步到web的人员ID /// diff --git a/src/Shentun.ColumnReferencePlugIns/WebAppoints/WebAppointWebPeisPlugIns.cs b/src/Shentun.ColumnReferencePlugIns/WebAppoints/WebAppointWebPeisPlugIns.cs index 026116d..fe28448 100644 --- a/src/Shentun.ColumnReferencePlugIns/WebAppoints/WebAppointWebPeisPlugIns.cs +++ b/src/Shentun.ColumnReferencePlugIns/WebAppoints/WebAppointWebPeisPlugIns.cs @@ -29,6 +29,7 @@ namespace Shentun.Peis.PlugIns.WebAppoints private static string _webPeisToken; private string _webPeisGetAppointPatientRegisterListByFilterUrl; private string _webPeisGetAppointRegisterAsbitemListByIdUrl; + private string _webPeisGetByPatientRegisterIdUrl; private Guid _medicalCenterId; public WebAppointWebPeisPlugIns(Guid thirdInterfaceId) : base(thirdInterfaceId) { @@ -46,6 +47,7 @@ namespace Shentun.Peis.PlugIns.WebAppoints _webPeisBaseAddress = InterfaceConfig.GetSection("Interface").GetSection("BaseAddress").Value; _webPeisGetAppointPatientRegisterListByFilterUrl = InterfaceConfig.GetSection("Interface").GetSection("GetAppointPatientRegisterListByFilterUrl").Value; _webPeisGetAppointRegisterAsbitemListByIdUrl = InterfaceConfig.GetSection("Interface").GetSection("GetAppointRegisterAsbitemListByIdUrl").Value; + _webPeisGetByPatientRegisterIdUrl = InterfaceConfig.GetSection("Interface").GetSection("GetByPatientRegisterId").Value; } /// /// 获取预约人员列表 @@ -70,7 +72,7 @@ namespace Shentun.Peis.PlugIns.WebAppoints } /// - /// 获取组合项目列表 + /// 获取组合项目列表通过预约ID /// /// /// @@ -85,7 +87,22 @@ namespace Shentun.Peis.PlugIns.WebAppoints (_webPeisGetAppointRegisterAsbitemListByIdUrl, webAppointPatientRegisterIdInput); return appointRegisterAsbitemDtos; } - + /// + /// 获取预约信息人员通过登记ID + /// + /// + /// + public override async Task GetByPatientRegisterIdAsync(AppointPatientRegisterIdInputDto input) + { + var webAppointPatientRegisterIdInput = new WebPatientRegisterIdInput() + { + PatientRegisterId = input.PatientRegisterId + }; + var appointPatientRegisterDto = await CallWePeisAppServiceAsync + (_webPeisGetByPatientRegisterIdUrl, webAppointPatientRegisterIdInput); + return appointPatientRegisterDto; + } /// /// 获取需要同步到web的人员ID /// diff --git a/src/Shentun.ColumnReferencePlugIns/WebAppoints/WebPatientRegisterIdInput.cs b/src/Shentun.ColumnReferencePlugIns/WebAppoints/WebPatientRegisterIdInput.cs new file mode 100644 index 0000000..4eb1a41 --- /dev/null +++ b/src/Shentun.ColumnReferencePlugIns/WebAppoints/WebPatientRegisterIdInput.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Shentun.Peis.PlugIns.WebAppoints +{ + public class WebPatientRegisterIdInput + { + public Guid PatientRegisterId { get; set; } + } +} diff --git a/src/Shentun.Peis.Application.Contracts/AppointPatientRegisters/AppointPatientRegisterIdInputDto.cs b/src/Shentun.Peis.Application.Contracts/AppointPatientRegisters/AppointPatientRegisterIdInputDto.cs index e2a788c..626b2ce 100644 --- a/src/Shentun.Peis.Application.Contracts/AppointPatientRegisters/AppointPatientRegisterIdInputDto.cs +++ b/src/Shentun.Peis.Application.Contracts/AppointPatientRegisters/AppointPatientRegisterIdInputDto.cs @@ -10,5 +10,7 @@ namespace Shentun.Peis.PlugIns { public Guid ThirdInterFaceId { get; set; } public string AppointPatientRegisterId { get; set; } + + public Guid PatientRegisterId { get; set; } } } diff --git a/src/Shentun.Peis.Application/AppointPatientRegisters/AppointPatientRegisterAppService.cs b/src/Shentun.Peis.Application/AppointPatientRegisters/AppointPatientRegisterAppService.cs index 44099ff..d29515b 100644 --- a/src/Shentun.Peis.Application/AppointPatientRegisters/AppointPatientRegisterAppService.cs +++ b/src/Shentun.Peis.Application/AppointPatientRegisters/AppointPatientRegisterAppService.cs @@ -5,6 +5,7 @@ using NUglify.JavaScript.Syntax; using Shentun.Peis.AppointRegisterAsbitems; using Shentun.Peis.Enums; using Shentun.Peis.Models; +using Shentun.Peis.PatientRegisters; using Shentun.Peis.PlugIns; using System; using System.Collections.Generic; @@ -66,6 +67,12 @@ namespace Shentun.Peis.AppointPatientRegisters return pluginsOut; } + /// + /// 获取预约组合项目通过预约ID + /// + /// + /// + /// [HttpPost("api/app/AppointPatientRegister/GetAppointRegisterAsbitemListById")] public async Task> GetAppointRegisterAsbitemListByIdAsync(AppointPatientRegisterIdInputDto input) { @@ -88,5 +95,33 @@ namespace Shentun.Peis.AppointPatientRegisters return pluginsOut; } + /// + /// 获取预约人员信息通过人员登记ID + /// + /// + /// + /// + [HttpPost("api/app/AppointPatientRegister/GetByPatientRegisterId")] + public async Task GetByPatientRegisterIdAsync(AppointPatientRegisterIdInputDto input) + { + var thirdInterface = await _thirdInterfaceRepository.GetAsync(input.ThirdInterFaceId); + if (thirdInterface.IsActive != 'Y') + { + throw new UserFriendlyException("该接口已禁用"); + } + + object[] objects = [input]; + var parmValue = thirdInterface.ParmValue; + var configurationBuilder = new ConfigurationBuilder() + .AddJsonStream(new MemoryStream(System.Text.Encoding.UTF8.GetBytes(parmValue))); + var config = configurationBuilder.Build(); + var assemblyName = config.GetSection("Interface").GetSection("AssemblyName").Value; + var className = config.GetSection("Interface").GetSection("ClassName").Value; + + var pluginsOut = await Utilities.ReflectionHelper.InvokeAsync(assemblyName, + className, [thirdInterface.Id], "GetByPatientRegisterIdAsync", objects); + return pluginsOut; + + } } }