From 83bfe783defab45039a632a7b0eeaa5e54e3e921 Mon Sep 17 00:00:00 2001
From: wxd <123@qq.com>
Date: Wed, 12 Jun 2024 19:30:03 +0800
Subject: [PATCH] =?UTF-8?q?=E5=BF=83=E7=94=B5=E5=9B=BE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../ImportPacsResultAppService.cs | 28 +++++++++++++++++++
.../Enums/ThirdInterfaceTypeFlag.cs | 3 ++
2 files changed, 31 insertions(+)
diff --git a/src/Shentun.Peis.Application/ImportPacsResults/ImportPacsResultAppService.cs b/src/Shentun.Peis.Application/ImportPacsResults/ImportPacsResultAppService.cs
index 19efd3a..7d1df31 100644
--- a/src/Shentun.Peis.Application/ImportPacsResults/ImportPacsResultAppService.cs
+++ b/src/Shentun.Peis.Application/ImportPacsResults/ImportPacsResultAppService.cs
@@ -331,5 +331,33 @@ namespace Shentun.Peis.ImportPacsResults
}
}
+
+ ///
+ /// 导入心电图
+ ///
+ ///
+ ///
+ [HttpPost("api/app/ImportElectrocardiogramResult/ImportElectrocardiogramResultByPatientRegisterId")]
+ public async Task ImportElectrocardiogramResultByPatientRegisterIdAsync(PatientRegisterIdInputDto input)
+ {
+ var patientRegister = await _patientRegisterRepository.GetAsync(input.PatientRegisterId);
+ var thirdInterfaces = await _thirdInterfaceRepository.GetListAsync(o =>
+ o.ThirdInterfaceType == ThirdInterfaceTypeFlag.Electrocardiogram
+ && o.MedicalCenterId == patientRegister.MedicalCenterId
+ && o.IsActive == 'Y');
+ foreach (var thirdInterface in thirdInterfaces)
+ {
+ 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;
+ object[] objects = new object[] { input.PatientRegisterId };
+ var pluginsOut = await Utilities.ReflectionHelper.InvokeAsync(assemblyName,
+ className, [thirdInterface.Id], "ImportResultByPatientRegisterIdAsync", objects);
+
+ }
+ }
}
}
diff --git a/src/Shentun.Peis.Domain.Shared/Enums/ThirdInterfaceTypeFlag.cs b/src/Shentun.Peis.Domain.Shared/Enums/ThirdInterfaceTypeFlag.cs
index 56e7b29..c4c8b7c 100644
--- a/src/Shentun.Peis.Domain.Shared/Enums/ThirdInterfaceTypeFlag.cs
+++ b/src/Shentun.Peis.Domain.Shared/Enums/ThirdInterfaceTypeFlag.cs
@@ -29,5 +29,8 @@ namespace Shentun.Peis.Enums
[Description("网上预约查询")]
public const string WebAppoint = "07";
+
+ [Description("心电图")]
+ public const string Electrocardiogram = "08";
}
}