diff --git a/src/InformaticsGateway/Services/Connectors/PayloadNotificationActionHandler.cs b/src/InformaticsGateway/Services/Connectors/PayloadNotificationActionHandler.cs index 1aa2a848..cae010ec 100755 --- a/src/InformaticsGateway/Services/Connectors/PayloadNotificationActionHandler.cs +++ b/src/InformaticsGateway/Services/Connectors/PayloadNotificationActionHandler.cs @@ -16,6 +16,7 @@ using System; using System.Linq; +using System.Text.Json; using System.Threading; using System.Threading.Tasks; using System.Threading.Tasks.Dataflow; @@ -169,6 +170,8 @@ private async Task SendArtifactRecievedEvent(Payload payload) }; artifiactRecievedEvent.DataOrigins.AddRange(payload.DataOrigins); + _logger.LogTrace($"Adding files to ArtifactsReceivedEvent files {JsonSerializer.Serialize(payload)}"); + artifiactRecievedEvent.Artifacts = payload.Files.Select(f => new Artifact { Type = f.DataOrigin.ArtifactType, Path = f.File.UploadPath }).ToList(); var message = new JsonMessage( diff --git a/src/InformaticsGateway/Test/Plug-ins/TestInputHL7DataPlugs.cs b/src/InformaticsGateway/Test/Plug-ins/TestInputHL7DataPlugs.cs index 5e103212..c3b45c8f 100755 --- a/src/InformaticsGateway/Test/Plug-ins/TestInputHL7DataPlugs.cs +++ b/src/InformaticsGateway/Test/Plug-ins/TestInputHL7DataPlugs.cs @@ -30,8 +30,10 @@ public class TestInputHL7DataPlugInAddWorkflow : IInputHL7DataPlugIn public Task<(Message hl7Message, FileStorageMetadata fileMetadata)> ExecuteAsync(Message hl7File, FileStorageMetadata fileMetadata) { hl7File.SetValue("MSH.3", TestString); + hl7File = new Message(hl7File.SerializeMessage(false)); + hl7File.ParseMessage(); fileMetadata.Workflows.Add(TestString); - return Task.FromResult((new Message(hl7File.SerializeMessage(false)), fileMetadata)); + return Task.FromResult((hl7File, fileMetadata)); } } } diff --git a/src/InformaticsGateway/Test/Services/Common/InputHL7DataPlugInEngineTest.cs b/src/InformaticsGateway/Test/Services/Common/InputHL7DataPlugInEngineTest.cs index e67dc61c..746e06b4 100755 --- a/src/InformaticsGateway/Test/Services/Common/InputHL7DataPlugInEngineTest.cs +++ b/src/InformaticsGateway/Test/Services/Common/InputHL7DataPlugInEngineTest.cs @@ -124,12 +124,6 @@ public async Task GivenAnInputHL7DataPlugInEngine_WhenExecutePlugInsIsCalledWith public async Task GivenAnInputHL7DataPlugInEngine_WhenExecutePlugInsIsCalled_ExpectDataIsProcessedByPlugInAsync() { - var mess = new Message("MSH|^~\\&|Vendor INSIGHT CXR |Vendor Inc.|||20231130091315||ORU^R01|ORU20231130091315834|P|2.4||||||UNICODE UTF-8\r\nPID|1||2.25.82866891564990604580806081805518233357\r\nPV1|1|O\r\nORC|RE||||SC\r\nOBR|1|||CXR0001^Chest X-ray Report|||20230418142212.134||||||||||||||||||P|||||||Vendor\r\nNTE|1||Bilateral lungs are clear without remarkable opacity.\\X0A\\Cardiomediastinal contour appears normal.\\X0A\\Pneumothorax is not seen.\\X0A\\Pleural Effusion is present on the bilateral sides.\\X0A\\\\X0A\\Threshold value\\X0A\\Atelectasis: 15\\X0A\\Calcification: 15\\X0A\\Cardiomegaly: 15\\X0A\\Consolidation: 15\\X0A\\Fibrosis: 15\\X0A\\Mediastinal Widening: 15\\X0A\\Nodule: 15\\X0A\\Pleural Effusion: 15\\X0A\\Pneumoperitoneum: 15\\X0A\\Pneumothorax: 15\\X0A\\\r\nZDS|2.25.97606619386020057921123852316852071139||2.25.337759261491022538565548360794987622189|Vendor INSIGHT CXR|v3.1.5.3\r\nOBX|1|NM|RAB0001^Abnormality Score||50.82||||||P|||20230418142212.134||Vendor"); - mess.ParseMessage(); - mess.SetValue("PID.3", "MD Test111"); - var ser = mess.SerializeMessage(false); - - var pluginEngine = new InputHL7DataPlugInEngine(_serviceProvider, _logger.Object); var assemblies = new List() { diff --git a/tests/Integration.Test/Common/DataProvider.cs b/tests/Integration.Test/Common/DataProvider.cs index c3ffd66f..2748a16a 100755 --- a/tests/Integration.Test/Common/DataProvider.cs +++ b/tests/Integration.Test/Common/DataProvider.cs @@ -312,6 +312,7 @@ internal async Task GenerateHl7Messages(string version) message.ParseMessage(); message.SetValue("MSH.10", file); HL7Specs.Files[file] = new HL7.Dotnetcore.Message(message.SerializeMessage(false)); + HL7Specs.Files[file].ParseMessage(); } } }