Skip to content

Commit

Permalink
temp logging
Browse files Browse the repository at this point in the history
Signed-off-by: Neil South <[email protected]>
  • Loading branch information
neildsouth committed Dec 18, 2023
1 parent 71ce67c commit 4ea59dc
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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<ArtifactsReceivedEvent>(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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<string>()
{
Expand Down
1 change: 1 addition & 0 deletions tests/Integration.Test/Common/DataProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}
}
Expand Down

0 comments on commit 4ea59dc

Please sign in to comment.