diff --git a/src/Shentun.Peis.Application/ImportLisResults/ImportLisResultAppService.cs b/src/Shentun.Peis.Application/ImportLisResults/ImportLisResultAppService.cs index e58e48d..bfa9c54 100644 --- a/src/Shentun.Peis.Application/ImportLisResults/ImportLisResultAppService.cs +++ b/src/Shentun.Peis.Application/ImportLisResults/ImportLisResultAppService.cs @@ -18,6 +18,7 @@ using System; using System.Collections.Generic; using System.Linq; using System.Text; +using System.Text.Json; using System.Threading.Tasks; using Volo.Abp; using Volo.Abp.Application.Services; @@ -32,6 +33,7 @@ namespace Shentun.Peis.ImportLisResults [Authorize] public class ImportLisResultAppService : ApplicationService, IImportLisResultAppService { + private readonly IRepository _thirdInterfaceRepository; private readonly IRepository _registerCheckItemRepository; private readonly IRepository _patientRegisterRepository; private readonly IRepository _referenceRangeRepository; @@ -83,7 +85,8 @@ namespace Shentun.Peis.ImportLisResults IRepository itemRepository, ItemManager itemManager, UnitManager unitManager, - RegisterCheckAppService registerCheckAppService) + RegisterCheckAppService registerCheckAppService, + IRepository thirdInterfaceRepository) { _registerCheckRepository = registerCheckRepository; _userRepository = userRepository; @@ -110,7 +113,7 @@ namespace Shentun.Peis.ImportLisResults _units = _unitRepository.GetListAsync().Result; _unitManager = unitManager; _registerCheckAppService = registerCheckAppService; - + _thirdInterfaceRepository = thirdInterfaceRepository; } [HttpPost("api/app/ImportLisResult/ImportResult")] @@ -273,6 +276,17 @@ namespace Shentun.Peis.ImportLisResults public async Task ImportResultByPatientRegisterIdAsync(PatientRegisterIdInputDto input) { + var thirdInterfaces = await _thirdInterfaceRepository.GetListAsync(o => + o.ThirdInterfaceType == ThirdInterfaceTypeFlag.ImportLisResult + && o.IsActive == 'Y'); + foreach (var thirdInterface in thirdInterfaces) + { + var parmValue = thirdInterface.ParmValue; + JsonDocument doc = JsonDocument.Parse(parmValue); + var assemblyName = doc.RootElement.GetProperty("Interface").GetProperty("AssemblyName").ToString(); + var className = doc.RootElement.GetProperty("Interface").GetProperty("ClassName").ToString(); + } + }