From 565143cbf1e08d55d77bff8f41fcaf636e605ace Mon Sep 17 00:00:00 2001 From: Neil South Date: Wed, 13 Dec 2023 15:05:16 +0000 Subject: [PATCH] adding more logging around HL7 message received Signed-off-by: Neil South --- .../Logging/Log.800.Hl7Service.cs | 3 ++ .../Services/HealthLevel7/MllpService.cs | 1 + src/Monai.Deploy.InformaticsGateway.sln | 28 ------------------- 3 files changed, 4 insertions(+), 28 deletions(-) diff --git a/src/InformaticsGateway/Logging/Log.800.Hl7Service.cs b/src/InformaticsGateway/Logging/Log.800.Hl7Service.cs index f94317880..363597fc8 100755 --- a/src/InformaticsGateway/Logging/Log.800.Hl7Service.cs +++ b/src/InformaticsGateway/Logging/Log.800.Hl7Service.cs @@ -105,5 +105,8 @@ public static partial class Log [LoggerMessage(EventId = 827, Level = LogLevel.Warning, Message = "HL7 plugin loading exceptions")] public static partial void HL7PluginLoadingExceptions(this ILogger logger, Exception ex); + [LoggerMessage(EventId = 828, Level = LogLevel.Information, Message = "HL7 message recieved. {message}")] + public static partial void Hl7MessageReceieved(this ILogger logger, string message); + } } diff --git a/src/InformaticsGateway/Services/HealthLevel7/MllpService.cs b/src/InformaticsGateway/Services/HealthLevel7/MllpService.cs index 599b8987c..0fc952e3d 100755 --- a/src/InformaticsGateway/Services/HealthLevel7/MllpService.cs +++ b/src/InformaticsGateway/Services/HealthLevel7/MllpService.cs @@ -186,6 +186,7 @@ private async Task OnDisconnect(IMllpClient client, MllpClientResult result) foreach (var message in result.Messages) { var newMessage = message; + _logger.Hl7MessageReceieved(message.HL7Message); var hl7Filemetadata = new Hl7FileStorageMetadata(client.ClientId.ToString(), DataService.HL7, client.ClientIp); var configItem = await _mIIpExtract.GetConfigItem(message).ConfigureAwait(false); if (configItem is not null) diff --git a/src/Monai.Deploy.InformaticsGateway.sln b/src/Monai.Deploy.InformaticsGateway.sln index 726202484..d851e6255 100644 --- a/src/Monai.Deploy.InformaticsGateway.sln +++ b/src/Monai.Deploy.InformaticsGateway.sln @@ -62,10 +62,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Monai.Deploy.InformaticsGat EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Monai.Deploy.InformaticsGateway.Test.PlugIns", "InformaticsGateway\Test\Plug-ins\Monai.Deploy.InformaticsGateway.Test.PlugIns.csproj", "{6C83469B-4B8A-416E-ACA7-09454D721352}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AnswerDicomTools", "..\..\..\AIDE-dicom-toolkit\src\AnswerDicomTools\AnswerDicomTools.csproj", "{0480D65D-9016-4AD1-AD6C-000577667BBB}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "monai-deploy-informatics-gateway-pseudonymisation", "..\..\..\monai-deploy-informatics-gateway-pseudonymisation\monai-deploy-informatics-gateway-pseudonymisation.csproj", "{E67F5E6E-8845-421A-BE16-74F28863EAB3}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -412,30 +408,6 @@ Global {6C83469B-4B8A-416E-ACA7-09454D721352}.Release|x64.Build.0 = Release|Any CPU {6C83469B-4B8A-416E-ACA7-09454D721352}.Release|x86.ActiveCfg = Release|Any CPU {6C83469B-4B8A-416E-ACA7-09454D721352}.Release|x86.Build.0 = Release|Any CPU - {0480D65D-9016-4AD1-AD6C-000577667BBB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {0480D65D-9016-4AD1-AD6C-000577667BBB}.Debug|Any CPU.Build.0 = Debug|Any CPU - {0480D65D-9016-4AD1-AD6C-000577667BBB}.Debug|x64.ActiveCfg = Debug|Any CPU - {0480D65D-9016-4AD1-AD6C-000577667BBB}.Debug|x64.Build.0 = Debug|Any CPU - {0480D65D-9016-4AD1-AD6C-000577667BBB}.Debug|x86.ActiveCfg = Debug|Any CPU - {0480D65D-9016-4AD1-AD6C-000577667BBB}.Debug|x86.Build.0 = Debug|Any CPU - {0480D65D-9016-4AD1-AD6C-000577667BBB}.Release|Any CPU.ActiveCfg = Release|Any CPU - {0480D65D-9016-4AD1-AD6C-000577667BBB}.Release|Any CPU.Build.0 = Release|Any CPU - {0480D65D-9016-4AD1-AD6C-000577667BBB}.Release|x64.ActiveCfg = Release|Any CPU - {0480D65D-9016-4AD1-AD6C-000577667BBB}.Release|x64.Build.0 = Release|Any CPU - {0480D65D-9016-4AD1-AD6C-000577667BBB}.Release|x86.ActiveCfg = Release|Any CPU - {0480D65D-9016-4AD1-AD6C-000577667BBB}.Release|x86.Build.0 = Release|Any CPU - {E67F5E6E-8845-421A-BE16-74F28863EAB3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E67F5E6E-8845-421A-BE16-74F28863EAB3}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E67F5E6E-8845-421A-BE16-74F28863EAB3}.Debug|x64.ActiveCfg = Debug|Any CPU - {E67F5E6E-8845-421A-BE16-74F28863EAB3}.Debug|x64.Build.0 = Debug|Any CPU - {E67F5E6E-8845-421A-BE16-74F28863EAB3}.Debug|x86.ActiveCfg = Debug|Any CPU - {E67F5E6E-8845-421A-BE16-74F28863EAB3}.Debug|x86.Build.0 = Debug|Any CPU - {E67F5E6E-8845-421A-BE16-74F28863EAB3}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E67F5E6E-8845-421A-BE16-74F28863EAB3}.Release|Any CPU.Build.0 = Release|Any CPU - {E67F5E6E-8845-421A-BE16-74F28863EAB3}.Release|x64.ActiveCfg = Release|Any CPU - {E67F5E6E-8845-421A-BE16-74F28863EAB3}.Release|x64.Build.0 = Release|Any CPU - {E67F5E6E-8845-421A-BE16-74F28863EAB3}.Release|x86.ActiveCfg = Release|Any CPU - {E67F5E6E-8845-421A-BE16-74F28863EAB3}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE