diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
old mode 100644
new mode 100755
index ca6a5527c..51a009a7b
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -183,11 +183,11 @@ jobs:
ports:
- 27017:27017
steps:
- - name: Set up JDK 11
+ - name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: zulu
- java-version: '11'
+ java-version: '17'
- uses: actions/setup-dotnet@v3
with:
diff --git a/.gitignore b/.gitignore
index 8c4eb593b..990b81827 100644
--- a/.gitignore
+++ b/.gitignore
@@ -560,3 +560,4 @@ FodyWeavers.xsd
# Additional files built by Visual Studio
# End of https://www.toptal.com/developers/gitignore/api/aspnetcore,dotnetcore,visualstudio,visualstudiocode
+/src/InformaticsGateway/Properties/launchSettings.json
diff --git a/doc/dependency_decisions.yml b/doc/dependency_decisions.yml
index bee058ae7..dc7dcac0a 100755
--- a/doc/dependency_decisions.yml
+++ b/doc/dependency_decisions.yml
@@ -314,13 +314,15 @@
:why: MIT (https://raw.githubusercontent.com/dotnet/efcore/release/6.0/LICENSE.txt)
:versions:
- 6.0.22
- :when: 2022-08-16 23:05:49.698463427 Z
+ - 6.0.25
+ - :when: 2022-08-16 23:05:49.698463427 Z
- - :approve
- Microsoft.EntityFrameworkCore
- :who: mocsharp
:why: MIT (https://raw.githubusercontent.com/dotnet/efcore/release/6.0/LICENSE.txt)
:versions:
- 6.0.22
+ - 6.0.25
:when: 2022-08-16 23:05:50.137694970 Z
- - :approve
- Microsoft.EntityFrameworkCore.Abstractions
@@ -328,41 +330,53 @@
:why: MIT (https://raw.githubusercontent.com/dotnet/efcore/release/6.0/LICENSE.txt)
:versions:
- 6.0.22
- :when: 2022-08-16 23:05:51.008105271 Z
+ - 6.0.25
+ - :when: 2022-08-16 23:05:51.008105271 Z
- - :approve
- Microsoft.EntityFrameworkCore.Analyzers
- :who: mocsharp
:why: MIT (https://raw.githubusercontent.com/dotnet/efcore/release/6.0/LICENSE.txt)
:versions:
- 6.0.22
- :when: 2022-08-16 23:05:51.445711308 Z
+ - 6.0.25
+ - :when: 2022-08-16 23:05:51.445711308 Z
- - :approve
- Microsoft.EntityFrameworkCore.Design
- :who: mocsharp
:why: MIT (https://raw.githubusercontent.com/dotnet/efcore/release/6.0/LICENSE.txt)
:versions:
- 6.0.22
- :when: 2022-08-16 23:05:51.922790944 Z
+ - 6.0.25
+ - :when: 2022-08-16 23:05:51.922790944 Z
- - :approve
- Microsoft.EntityFrameworkCore.InMemory
- :who: mocsharp
:why: MIT (https://raw.githubusercontent.com/dotnet/efcore/release/6.0/LICENSE.txt)
:versions:
- 6.0.22
- :when: 2022-08-16 23:05:52.375150938 Z
+ - 6.0.25
+ - :when: 2022-08-16 23:05:52.375150938 Z
- - :approve
- Microsoft.EntityFrameworkCore.Relational
- :who: mocsharp
:why: MIT (https://raw.githubusercontent.com/dotnet/efcore/release/6.0/LICENSE.txt)
:versions:
- 6.0.22
- :when: 2022-08-16 23:05:52.828879230 Z
+ - 6.0.25
+ - :when: 2022-08-16 23:05:52.828879230 Z
+- - :approve
+ - Microsoft.EntityFrameworkCore.Tools
+ - :who: ndsouth
+ :why: MIT (https://raw.githubusercontent.com/dotnet/efcore/release/6.0/LICENSE.txt)
+ :versions:
+ - 6.0.25
+ - :when: 2022-08-16 23:05:52.828879230 Z
- - :approve
- Microsoft.EntityFrameworkCore.Sqlite
- :who: mocsharp
:why: MIT (https://raw.githubusercontent.com/dotnet/efcore/release/6.0/LICENSE.txt)
:versions:
- - 6.0.22
+ - 6.0.25
:when: 2022-08-16 23:05:53.270526921 Z
- - :approve
- Microsoft.EntityFrameworkCore.Sqlite.Core
@@ -370,6 +384,7 @@
:why: MIT (https://raw.githubusercontent.com/dotnet/efcore/release/6.0/LICENSE.txt)
:versions:
- 6.0.22
+ - 6.0.25
:when: 2022-08-16 23:05:53.706997823 Z
- - :approve
- Microsoft.Extensions.ApiDescription.Server
@@ -512,7 +527,8 @@
:versions:
- 6.0.21
- 6.0.22
- :when: 2022-08-29 18:11:22.090772006 Z
+ - 6.0.25
+ - :when: 2022-08-29 18:11:22.090772006 Z
- - :approve
- Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions
- :who: mocsharp
@@ -520,14 +536,16 @@
:versions:
- 6.0.21
- 6.0.22
- :when: 2022-08-29 18:11:22.090772006 Z
+ - 6.0.25
+ - :when: 2022-08-29 18:11:22.090772006 Z
- - :approve
- Microsoft.Extensions.Diagnostics.HealthChecks.EntityFrameworkCore
- :who: mocsharp
:why: MIT (https://github.com/dotnet/aspnetcore/raw/main/LICENSE.txt)
:versions:
- 6.0.22
- :when: 2022-08-29 18:11:22.090772006 Z
+ - 6.0.25
+ - :when: 2022-08-29 18:11:22.090772006 Z
- - :approve
- Microsoft.Extensions.FileProviders.Abstractions
- :who: mocsharp
@@ -774,16 +792,16 @@
- :who: neilsouth
:why: Apache-2.0 (https://github.com/Project-MONAI/monai-deploy-messaging/raw/main/LICENSE)
:versions:
- - 1.0.3
- - 1.0.4
+ - 1.0.5-rc0006
+ - 1.0.5
:when: 2023-10-13 18:06:21.511789690 Z
- - :approve
- Monai.Deploy.Messaging.RabbitMQ
- :who: neilsouth
:why: Apache-2.0 (https://github.com/Project-MONAI/monai-deploy-messaging/raw/main/LICENSE)
:versions:
- - 1.0.3
- - 1.0.4
+ - 1.0.5-rc0006
+ - 1.0.5
:when: 2023-10-13 18:06:21.511789690 Z
- - :approve
- Monai.Deploy.Storage
diff --git a/src/Api/HL7DestinationEntity.cs b/src/Api/HL7DestinationEntity.cs
new file mode 100644
index 000000000..33655bdde
--- /dev/null
+++ b/src/Api/HL7DestinationEntity.cs
@@ -0,0 +1,40 @@
+/*
+ * Copyright 2021-2022 MONAI Consortium
+ * Copyright 2019-2020 NVIDIA Corporation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+namespace Monai.Deploy.InformaticsGateway.Api.Models
+{
+ ///
+ /// HL7 Destination Entity
+ ///
+ ///
+ ///
+ /// {
+ /// "name": "MYPACS",
+ /// "hostIp": "10.20.100.200",
+ /// "aeTitle": "MONAIPACS",
+ /// "port": 1104
+ /// }
+ ///
+ ///
+ public class HL7DestinationEntity : BaseApplicationEntity
+ {
+ ///
+ /// Gets or sets the port to connect to.
+ ///
+ public int Port { get; set; }
+ }
+}
diff --git a/src/Api/Hl7ApplicationConfigEntity.cs b/src/Api/Hl7ApplicationConfigEntity.cs
new file mode 100755
index 000000000..3025cb967
--- /dev/null
+++ b/src/Api/Hl7ApplicationConfigEntity.cs
@@ -0,0 +1,170 @@
+/*
+ * Copyright 2022 MONAI Consortium
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using System.Linq;
+using FellowOakDicom;
+using Monai.Deploy.InformaticsGateway.Api.Storage;
+using Monai.Deploy.InformaticsGateway.Common;
+using Newtonsoft.Json;
+
+namespace Monai.Deploy.InformaticsGateway.Api
+{
+ public class Hl7ApplicationConfigEntity : MongoDBEntityBase
+ {
+ ///
+ /// Gets or sets the name of a Hl7 application entity.
+ /// This value must be unique.
+ ///
+ [Key, Column(Order = 0)]
+ public string Name { get; set; } = default!;
+
+ ///
+ /// Gets or sets the sending identifier.
+ ///
+ [JsonProperty("sending_identifier")]
+ public StringKeyValuePair SendingId { get; set; } = new();
+
+ ///
+ /// Gets or sets the data link.
+ /// Value is either PatientId or StudyInstanceUid
+ ///
+ [JsonProperty("data_link")]
+ public DataKeyValuePair DataLink { get; set; } = new();
+
+ ///
+ /// Gets or sets the data mapping.
+ /// Value is a DICOM Tag
+ ///
+ [JsonProperty("data_mapping")]
+ public List DataMapping { get; set; } = new();
+
+ ///
+ /// Optional list of data input plug-in type names to be executed by the .
+ ///
+ public List PlugInAssemblies { get; set; } = default!;
+
+ public DateTime LastModified { get; set; } = DateTime.UtcNow;
+
+ public IEnumerable Validate()
+ {
+ var errors = new List();
+ if (string.IsNullOrWhiteSpace(SendingId.Key))
+ errors.Add($"{nameof(SendingId.Key)} is missing.");
+ if (string.IsNullOrWhiteSpace(SendingId.Value))
+ errors.Add($"{nameof(SendingId.Value)} is missing.");
+
+ if (string.IsNullOrWhiteSpace(DataLink.Key))
+ errors.Add($"{nameof(DataLink.Key)} is missing.");
+
+ if (DataMapping.IsNullOrEmpty())
+ errors.Add($"{nameof(DataMapping)} is missing values.");
+
+ ValidateDataMapping(errors);
+
+ return errors;
+ }
+
+ private void ValidateDataMapping(List errors)
+ {
+ for (var idx = 0; idx < DataMapping.Count; idx++)
+ {
+ var dataMapKvp = DataMapping[idx];
+
+ if (string.IsNullOrWhiteSpace(dataMapKvp.Key) || dataMapKvp.Value.Length < 8)
+ {
+ if (string.IsNullOrWhiteSpace(dataMapKvp.Key))
+ errors.Add($"{nameof(DataMapping)} is missing a name at index {idx}.");
+
+ if (string.IsNullOrWhiteSpace(dataMapKvp.Value) || dataMapKvp.Value.Length < 8)
+ errors.Add($"{nameof(DataMapping)} ({dataMapKvp.Key}) @ index {idx} is not a valid DICOM Tag.");
+
+ continue;
+ }
+
+ try
+ {
+ DicomTag.Parse(dataMapKvp.Value);
+ }
+ catch (Exception e)
+ {
+ errors.Add($"DataMapping.Value is not a valid DICOM Tag. {e.Message}");
+ }
+ }
+ }
+
+ public override string ToString()
+ {
+ return JsonConvert.SerializeObject(this);
+ }
+ }
+
+ //string key, string value
+ public class StringKeyValuePair : IKeyValuePair
+ {
+ [Key]
+ public string Key { get; set; } = string.Empty;
+ public string Value { get; set; } = string.Empty;
+
+ public static implicit operator StringKeyValuePair(KeyValuePair kvp)
+ {
+ return new StringKeyValuePair { Key = kvp.Key, Value = kvp.Value };
+ }
+
+ public static List FromDictionary(Dictionary dictionary) =>
+ dictionary.Select(kvp => new StringKeyValuePair { Key = kvp.Key, Value = kvp.Value }).ToList();
+
+ public override bool Equals(object? obj) => Equals(obj as StringKeyValuePair);
+
+ public bool Equals(StringKeyValuePair? other) => other != null && Key == other.Key && Value == other.Value;
+
+ public override int GetHashCode() => HashCode.Combine(Key, Value);
+
+ }
+
+ public class DataKeyValuePair : IKeyValuePair
+ {
+ [Key]
+ public string Key { get; set; } = string.Empty;
+ public DataLinkType Value { get; set; }
+
+ public static implicit operator DataKeyValuePair(KeyValuePair kvp)
+ {
+ return new DataKeyValuePair { Key = kvp.Key, Value = kvp.Value };
+ }
+
+ public override bool Equals(object? obj) => Equals(obj as DataKeyValuePair);
+
+ public bool Equals(DataKeyValuePair? other) => other != null && Key == other.Key && Value == other.Value;
+
+ public override int GetHashCode() => HashCode.Combine(Key, Value);
+ }
+
+ public interface IKeyValuePair
+ {
+ public TKey Key { get; set; }
+ public TValue Value { get; set; }
+ }
+
+ public enum DataLinkType
+ {
+ PatientId,
+ StudyInstanceUid
+ }
+}
diff --git a/src/InformaticsGateway/Services/HealthLevel7/IMllpClient.cs b/src/Api/Mllp/IMllpClient.cs
old mode 100644
new mode 100755
similarity index 88%
rename from src/InformaticsGateway/Services/HealthLevel7/IMllpClient.cs
rename to src/Api/Mllp/IMllpClient.cs
index 8e38ac846..e8c631c32
--- a/src/InformaticsGateway/Services/HealthLevel7/IMllpClient.cs
+++ b/src/Api/Mllp/IMllpClient.cs
@@ -18,9 +18,9 @@
using System.Threading;
using System.Threading.Tasks;
-namespace Monai.Deploy.InformaticsGateway.Services.HealthLevel7
+namespace Monai.Deploy.InformaticsGateway.Api.Mllp
{
- internal interface IMllpClient : IDisposable
+ public interface IMllpClient : IDisposable
{
Guid ClientId { get; }
@@ -28,4 +28,4 @@ internal interface IMllpClient : IDisposable
Task Start(Func onDisconnect, CancellationToken cancellationToken);
}
-}
\ No newline at end of file
+}
diff --git a/src/Api/Mllp/IMllpExtract.cs b/src/Api/Mllp/IMllpExtract.cs
new file mode 100755
index 000000000..2c82fee46
--- /dev/null
+++ b/src/Api/Mllp/IMllpExtract.cs
@@ -0,0 +1,30 @@
+/*
+ * Copyright 2023 MONAI Consortium
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+using System.Threading.Tasks;
+using HL7.Dotnetcore;
+using Monai.Deploy.InformaticsGateway.Api.Storage;
+
+namespace Monai.Deploy.InformaticsGateway.Api.Mllp
+{
+ public interface IMllpExtract
+ {
+ Task ExtractInfo(Hl7FileStorageMetadata meta, Message message, Hl7ApplicationConfigEntity configItem);
+
+ Task GetConfigItem(Message message);
+ }
+}
diff --git a/src/Api/Mllp/IMllpService.cs b/src/Api/Mllp/IMllpService.cs
new file mode 100755
index 000000000..d12e1fd28
--- /dev/null
+++ b/src/Api/Mllp/IMllpService.cs
@@ -0,0 +1,27 @@
+/*
+ * Copyright 2023 MONAI Consortium
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using System.Net;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace Monai.Deploy.InformaticsGateway.Api.Mllp
+{
+ public interface IMllpService
+ {
+ Task SendMllp(IPAddress address, int port, string hl7Message, CancellationToken cancellationToken);
+ }
+}
diff --git a/src/InformaticsGateway/Services/HealthLevel7/MllpClientResult.cs b/src/Api/Mllp/MllpClientResult.cs
similarity index 91%
rename from src/InformaticsGateway/Services/HealthLevel7/MllpClientResult.cs
rename to src/Api/Mllp/MllpClientResult.cs
index 401875804..36db3b65f 100755
--- a/src/InformaticsGateway/Services/HealthLevel7/MllpClientResult.cs
+++ b/src/Api/Mllp/MllpClientResult.cs
@@ -18,9 +18,9 @@
using System.Collections.Generic;
using HL7.Dotnetcore;
-namespace Monai.Deploy.InformaticsGateway.Services.HealthLevel7
+namespace Monai.Deploy.InformaticsGateway.Api.Mllp
{
- internal class MllpClientResult
+ public class MllpClientResult
{
public IList Messages { get; }
public AggregateException? AggregateException { get; }
diff --git a/src/Api/BaseApplicationEntity.cs b/src/Api/Models/BaseApplicationEntity.cs
old mode 100644
new mode 100755
similarity index 96%
rename from src/Api/BaseApplicationEntity.cs
rename to src/Api/Models/BaseApplicationEntity.cs
index ba0199ee6..0de7a3e39
--- a/src/Api/BaseApplicationEntity.cs
+++ b/src/Api/Models/BaseApplicationEntity.cs
@@ -17,8 +17,9 @@
using System;
using System.Security.Claims;
+using Monai.Deploy.InformaticsGateway.Api.Storage;
-namespace Monai.Deploy.InformaticsGateway.Api
+namespace Monai.Deploy.InformaticsGateway.Api.Models
{
///
/// DICOM Application Entity or AE.
diff --git a/src/Api/DestinationApplicationEntity.cs b/src/Api/Models/DestinationApplicationEntity.cs
old mode 100644
new mode 100755
similarity index 95%
rename from src/Api/DestinationApplicationEntity.cs
rename to src/Api/Models/DestinationApplicationEntity.cs
index 6599591fa..4a7069edd
--- a/src/Api/DestinationApplicationEntity.cs
+++ b/src/Api/Models/DestinationApplicationEntity.cs
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-namespace Monai.Deploy.InformaticsGateway.Api
+namespace Monai.Deploy.InformaticsGateway.Api.Models
{
///
/// Destination Application Entity
diff --git a/src/Api/DicomAssociationInfo.cs b/src/Api/Models/DicomAssociationInfo.cs
old mode 100644
new mode 100755
similarity index 94%
rename from src/Api/DicomAssociationInfo.cs
rename to src/Api/Models/DicomAssociationInfo.cs
index d3a3eb775..e4f119ca6
--- a/src/Api/DicomAssociationInfo.cs
+++ b/src/Api/Models/DicomAssociationInfo.cs
@@ -16,8 +16,9 @@
using System;
using System.Collections.Generic;
+using Monai.Deploy.InformaticsGateway.Api.Storage;
-namespace Monai.Deploy.InformaticsGateway.Api
+namespace Monai.Deploy.InformaticsGateway.Api.Models
{
public class DicomAssociationInfo : MongoDBEntityBase
{
diff --git a/src/Api/ExportRequestDataMessage.cs b/src/Api/Models/ExportRequestDataMessage.cs
similarity index 98%
rename from src/Api/ExportRequestDataMessage.cs
rename to src/Api/Models/ExportRequestDataMessage.cs
index 891b1a8d8..9fd79d578 100755
--- a/src/Api/ExportRequestDataMessage.cs
+++ b/src/Api/Models/ExportRequestDataMessage.cs
@@ -20,7 +20,7 @@
using Monai.Deploy.InformaticsGateway.Api.PlugIns;
using Monai.Deploy.Messaging.Events;
-namespace Monai.Deploy.InformaticsGateway.Api
+namespace Monai.Deploy.InformaticsGateway.Api.Models
{
public class ExportRequestDataMessage
{
diff --git a/src/Api/Models/ExternalAppDetails.cs b/src/Api/Models/ExternalAppDetails.cs
new file mode 100755
index 000000000..6353bc648
--- /dev/null
+++ b/src/Api/Models/ExternalAppDetails.cs
@@ -0,0 +1,39 @@
+/*
+ * Copyright 2023 MONAI Consortium
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using Monai.Deploy.InformaticsGateway.Api.Storage;
+
+namespace Monai.Deploy.InformaticsGateway.Api.Models
+{
+ public class ExternalAppDetails : MongoDBEntityBase
+ {
+ public string StudyInstanceUid { get; set; } = string.Empty;
+
+ public string StudyInstanceUidOutBound { get; set; } = string.Empty;
+
+ public string WorkflowInstanceId { get; set; } = string.Empty;
+
+ public string ExportTaskID { get; set; } = string.Empty;
+
+ public string CorrelationId { get; set; } = string.Empty;
+
+ public string? DestinationFolder { get; set; }
+
+ public string PatientId { get; set; } = string.Empty;
+
+ public string PatientIdOutBound { get; set; } = string.Empty;
+ }
+}
diff --git a/src/Api/MonaiApplicationEntity.cs b/src/Api/Models/MonaiApplicationEntity.cs
similarity index 98%
rename from src/Api/MonaiApplicationEntity.cs
rename to src/Api/Models/MonaiApplicationEntity.cs
index 9e2929147..8ec95e37d 100755
--- a/src/Api/MonaiApplicationEntity.cs
+++ b/src/Api/Models/MonaiApplicationEntity.cs
@@ -21,8 +21,9 @@
using System.ComponentModel.DataAnnotations.Schema;
using System.Security.Claims;
using Monai.Deploy.InformaticsGateway.Api.PlugIns;
+using Monai.Deploy.InformaticsGateway.Api.Storage;
-namespace Monai.Deploy.InformaticsGateway.Api
+namespace Monai.Deploy.InformaticsGateway.Api.Models
{
///
/// MONAI Application Entity
diff --git a/src/Api/Monai.Deploy.InformaticsGateway.Api.csproj b/src/Api/Monai.Deploy.InformaticsGateway.Api.csproj
index ed19368f5..181306f97 100755
--- a/src/Api/Monai.Deploy.InformaticsGateway.Api.csproj
+++ b/src/Api/Monai.Deploy.InformaticsGateway.Api.csproj
@@ -53,10 +53,11 @@
+
-
-
-
+
+
+
diff --git a/src/Api/PlugIns/IInputHL7DataPlugIn.cs b/src/Api/PlugIns/IInputHL7DataPlugIn.cs
new file mode 100755
index 000000000..b44d0f736
--- /dev/null
+++ b/src/Api/PlugIns/IInputHL7DataPlugIn.cs
@@ -0,0 +1,35 @@
+/*
+ * Copyright 2023 MONAI Consortium
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using System.Threading.Tasks;
+using HL7.Dotnetcore;
+using Monai.Deploy.InformaticsGateway.Api.Storage;
+
+namespace Monai.Deploy.InformaticsGateway.Api.PlugIns
+{
+ ///
+ /// IInputDataPlugIn enables lightweight data processing over incoming data received from supported data ingestion
+ /// services.
+ /// Refer to for additional details.
+ ///
+ public interface IInputHL7DataPlugIn
+ {
+ string Name { get; }
+
+ Task<(Message hl7Message, FileStorageMetadata fileMetadata)> ExecuteAsync(Message hl7File, FileStorageMetadata fileMetadata);
+ }
+
+}
diff --git a/src/Api/PlugIns/IInputHL7DataPlugInEngine.cs b/src/Api/PlugIns/IInputHL7DataPlugInEngine.cs
new file mode 100755
index 000000000..dc34b976d
--- /dev/null
+++ b/src/Api/PlugIns/IInputHL7DataPlugInEngine.cs
@@ -0,0 +1,42 @@
+/*
+ * Copyright 2023 MONAI Consortium
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using System;
+using System.Collections.Generic;
+using System.Threading.Tasks;
+using HL7.Dotnetcore;
+using Monai.Deploy.InformaticsGateway.Api.Storage;
+
+namespace Monai.Deploy.InformaticsGateway.Api.PlugIns
+{
+ ///
+ /// IInputDataPlugInEngine processes incoming data receivied from various supported services through
+ /// a list of plug-ins based on .
+ /// Rules:
+ ///
+ /// - SCP: A list of plug-ins can be configured with each AET, and each plug-in is executed in the order stored, enabling piping of the incoming data before each file is uploaded to the storage service.
+ /// - Incoming data is processed one file at a time and SHALL not wait for the entire study to arrive.
+ /// - Plug-ins MUST be lightweight and not hinder the upload process.
+ /// - Plug-ins SHALL not accumulate files in memory or storage for bulk processing.
+ ///
+ ///
+ public interface IInputHL7DataPlugInEngine
+ {
+ void Configure(IReadOnlyList pluginAssemblies);
+
+ Task> ExecutePlugInsAsync(Message hl7File, FileStorageMetadata fileMetadata, Hl7ApplicationConfigEntity configItem);
+ }
+}
diff --git a/src/Api/PlugIns/IOutputDataPlugin.cs b/src/Api/PlugIns/IOutputDataPlugin.cs
old mode 100644
new mode 100755
index 47d36da12..8bd695108
--- a/src/Api/PlugIns/IOutputDataPlugin.cs
+++ b/src/Api/PlugIns/IOutputDataPlugin.cs
@@ -16,6 +16,7 @@
using System.Threading.Tasks;
using FellowOakDicom;
+using Monai.Deploy.InformaticsGateway.Api.Models;
namespace Monai.Deploy.InformaticsGateway.Api.PlugIns
{
diff --git a/src/Api/PlugIns/IOutputDataPluginEngine.cs b/src/Api/PlugIns/IOutputDataPluginEngine.cs
old mode 100644
new mode 100755
index 07e62ccd0..080717a3d
--- a/src/Api/PlugIns/IOutputDataPluginEngine.cs
+++ b/src/Api/PlugIns/IOutputDataPluginEngine.cs
@@ -16,6 +16,7 @@
using System.Collections.Generic;
using System.Threading.Tasks;
+using Monai.Deploy.InformaticsGateway.Api.Models;
namespace Monai.Deploy.InformaticsGateway.Api.PlugIns
{
diff --git a/src/Api/SourceApplicationEntity.cs b/src/Api/SourceApplicationEntity.cs
index 604bf2eae..b46a61b8c 100755
--- a/src/Api/SourceApplicationEntity.cs
+++ b/src/Api/SourceApplicationEntity.cs
@@ -15,6 +15,8 @@
* limitations under the License.
*/
+using Monai.Deploy.InformaticsGateway.Api.Models;
+
namespace Monai.Deploy.InformaticsGateway.Api
{
///
diff --git a/src/Api/Storage/DicomFileStorageMetadata.cs b/src/Api/Storage/DicomFileStorageMetadata.cs
old mode 100644
new mode 100755
index c6b0f4b39..9a01fda52
--- a/src/Api/Storage/DicomFileStorageMetadata.cs
+++ b/src/Api/Storage/DicomFileStorageMetadata.cs
@@ -36,7 +36,7 @@ public sealed record DicomFileStorageMetadata : FileStorageMetadata
/// Gets or set the Study Instance UID of the DICOM instance.
///
[JsonPropertyName("studyInstanceUid")]
- public string StudyInstanceUid { get; init; } = default!;
+ public string StudyInstanceUid { get; set; } = default!;
///
/// Gets or set the Series Instance UID of the DICOM instance.
@@ -93,6 +93,15 @@ public DicomFileStorageMetadata(string associationId, string identifier, string
StudyInstanceUid = studyInstanceUid;
SeriesInstanceUid = seriesInstanceUid;
SopInstanceUid = sopInstanceUid;
+ SetupFilePaths(associationId);
+
+ DataOrigin.DataService = dataService;
+ DataOrigin.Source = callingAeTitle;
+ DataOrigin.Destination = calledAeTitle;
+ }
+
+ private void SetupFilePaths(string associationId)
+ {
File = new StorageObjectMetadata(FileExtension)
{
TemporaryPath = string.Join(PathSeparator, associationId, DataTypeDirectoryName, $"{Guid.NewGuid()}{FileExtension}"),
@@ -106,16 +115,45 @@ public DicomFileStorageMetadata(string associationId, string identifier, string
UploadPath = $"{File.UploadPath}{DicomJsonFileExtension}",
ContentType = DicomJsonContentType,
};
+ }
- DataOrigin.DataService = dataService;
- DataOrigin.Source = callingAeTitle;
- DataOrigin.Destination = calledAeTitle;
+ public void SetupGivenFilePaths(string? DestinationFolder)
+ {
+ if (DestinationFolder is null)
+ {
+ return;
+ }
+
+ if (DestinationFolder.EndsWith('/'))
+ {
+ DestinationFolder = DestinationFolder.Remove(DestinationFolder.Length - 1);
+ }
+
+ File = new StorageObjectMetadata(FileExtension)
+ {
+ TemporaryPath = string.Join(PathSeparator, DestinationFolder, $"Temp{PathSeparator}{Guid.NewGuid()}{FileExtension}"),
+ UploadPath = string.Join(PathSeparator, DestinationFolder, $"{SopInstanceUid}{FileExtension}"),
+ ContentType = DicomContentType,
+ DestinationFolderOverride = true,
+ };
+
+ JsonFile = new StorageObjectMetadata(DicomJsonFileExtension)
+ {
+ TemporaryPath = $"{File.TemporaryPath}{DicomJsonFileExtension}",
+ UploadPath = $"{File.UploadPath}{DicomJsonFileExtension}",
+ ContentType = DicomJsonContentType,
+ DestinationFolderOverride = true,
+ };
+
+ //DestinationFolderNeil = DestinationFolder;
}
+ public void SetStudyInstanceUid(string newStudyInstanceUid) => StudyInstanceUid = newStudyInstanceUid;
+
public override void SetFailed()
{
base.SetFailed();
JsonFile.SetFailed();
}
}
-}
\ No newline at end of file
+}
diff --git a/src/Api/Storage/FileStorageMetadata.cs b/src/Api/Storage/FileStorageMetadata.cs
old mode 100644
new mode 100755
index 302612d07..62a530f1d
--- a/src/Api/Storage/FileStorageMetadata.cs
+++ b/src/Api/Storage/FileStorageMetadata.cs
@@ -104,6 +104,9 @@ public abstract record FileStorageMetadata
[JsonPropertyName("payloadId")]
public string? PayloadId { get; set; }
+ // [JsonPropertyName("destinationFolder")]
+ //public string? DestinationFolderNeil { get; set; }
+
///
/// DO NOT USE
/// This constructor is intended for JSON serializer.
@@ -162,4 +165,4 @@ public static string IpAddress()
return "127.0.0.1";
}
}
-}
\ No newline at end of file
+}
diff --git a/src/Api/Storage/Hl7FileStorageMetadata.cs b/src/Api/Storage/Hl7FileStorageMetadata.cs
old mode 100644
new mode 100755
index 2356f7738..576f88ae3
--- a/src/Api/Storage/Hl7FileStorageMetadata.cs
+++ b/src/Api/Storage/Hl7FileStorageMetadata.cs
@@ -54,6 +54,7 @@ public Hl7FileStorageMetadata(string connectionId, DataService dataType, string
DataOrigin.DataService = dataType;
DataOrigin.Source = dataOrigin;
DataOrigin.Destination = IpAddress();
+ DataOrigin.ArtifactType = Messaging.Common.ArtifactType.HL7;
File = new StorageObjectMetadata(FileExtension)
{
@@ -63,4 +64,4 @@ public Hl7FileStorageMetadata(string connectionId, DataService dataType, string
};
}
}
-}
\ No newline at end of file
+}
diff --git a/src/Api/MongoDBEntityBase.cs b/src/Api/Storage/MongoDBEntityBase.cs
old mode 100644
new mode 100755
similarity index 95%
rename from src/Api/MongoDBEntityBase.cs
rename to src/Api/Storage/MongoDBEntityBase.cs
index 41b206a6e..1d2a38443
--- a/src/Api/MongoDBEntityBase.cs
+++ b/src/Api/Storage/MongoDBEntityBase.cs
@@ -16,7 +16,7 @@
using System;
-namespace Monai.Deploy.InformaticsGateway.Api
+namespace Monai.Deploy.InformaticsGateway.Api.Storage
{
public abstract class MongoDBEntityBase
{
diff --git a/src/Api/Storage/Payload.cs b/src/Api/Storage/Payload.cs
index d88ffce7c..c390625a1 100755
--- a/src/Api/Storage/Payload.cs
+++ b/src/Api/Storage/Payload.cs
@@ -86,6 +86,8 @@ public TimeSpan Elapsed
public int FilesFailedToUpload { get => Files.Count(p => p.IsUploadFailed); }
+ public string DestinationFolder { get; set; } = string.Empty;
+
public Payload(string key, string correlationId, string? workflowInstanceId, string? taskId, DataOrigin dataTrigger, uint timeout)
{
Guard.Against.NullOrWhiteSpace(key, nameof(key));
@@ -106,7 +108,7 @@ public Payload(string key, string correlationId, string? workflowInstanceId, str
DataTrigger = dataTrigger;
}
- public Payload(string key, string correlationId, string? workflowInstanceId, string? taskId, DataOrigin dataTrigger, uint timeout, string? payloadId = null) :
+ public Payload(string key, string correlationId, string? workflowInstanceId, string? taskId, DataOrigin dataTrigger, uint timeout, string? payloadId = null, string? DestinationFolder = null) :
this(key, correlationId, workflowInstanceId, taskId, dataTrigger, timeout)
{
Guard.Against.NullOrWhiteSpace(key, nameof(key));
@@ -119,6 +121,7 @@ public Payload(string key, string correlationId, string? workflowInstanceId, str
{
PayloadId = Guid.Parse(payloadId);
}
+ DestinationFolder ??= string.Empty;
}
public void Add(FileStorageMetadata value)
@@ -132,6 +135,11 @@ public void Add(FileStorageMetadata value)
DataOrigins.Add(value.DataOrigin);
}
+ //if (string.IsNullOrWhiteSpace(value.DestinationFolderNeil) is false)
+ //{
+ // DestinationFolder = value.DestinationFolderNeil;
+ //}
+
_lastReceived.Reset();
_lastReceived.Start();
}
diff --git a/src/Api/Storage/StorageObjectMetadata.cs b/src/Api/Storage/StorageObjectMetadata.cs
index 93badfbf1..074463f2e 100755
--- a/src/Api/Storage/StorageObjectMetadata.cs
+++ b/src/Api/Storage/StorageObjectMetadata.cs
@@ -88,6 +88,9 @@ public class StorageObjectMetadata
[JsonPropertyName("isMoveCompleted"), JsonInclude]
public bool IsMoveCompleted { get; private set; } = default!;
+ [JsonPropertyName("destinationFolderOverride")]
+ public bool DestinationFolderOverride { get; set; } = false;
+
public StorageObjectMetadata(string fileExtension)
{
Guard.Against.NullOrWhiteSpace(fileExtension, nameof(fileExtension));
@@ -111,7 +114,11 @@ public string GetPayloadPath(Guid payloadId)
{
Guard.Against.Null(payloadId, nameof(payloadId));
- return $"{payloadId}{FileStorageMetadata.PathSeparator}{UploadPath}";
+ if (DestinationFolderOverride is false)
+ {
+ return $"{payloadId}{FileStorageMetadata.PathSeparator}{UploadPath}";
+ }
+ return $"{UploadPath}";
}
public void SetUploaded(string bucketName)
diff --git a/src/Api/Test/BaseApplicationEntityTest.cs b/src/Api/Test/BaseApplicationEntityTest.cs
old mode 100644
new mode 100755
index ef9b14808..6fcfd032c
--- a/src/Api/Test/BaseApplicationEntityTest.cs
+++ b/src/Api/Test/BaseApplicationEntityTest.cs
@@ -14,6 +14,7 @@
* limitations under the License.
*/
+using Monai.Deploy.InformaticsGateway.Api.Models;
using Xunit;
namespace Monai.Deploy.InformaticsGateway.Api.Test
@@ -21,7 +22,7 @@ namespace Monai.Deploy.InformaticsGateway.Api.Test
public class BaseApplicationEntityTest
{
[Fact]
- public void GivenABaseApplicationEntity_WhenNameIsNotSet_ExepectSetDefaultValuesToSetName()
+ public void GivenABaseApplicationEntity_WhenNameIsNotSet_ExpectSetDefaultValuesToSetName()
{
var entity = new BaseApplicationEntity
{
@@ -35,7 +36,7 @@ public void GivenABaseApplicationEntity_WhenNameIsNotSet_ExepectSetDefaultValues
}
[Fact]
- public void GivenABaseApplicationEntity_WhenNameIsSet_ExepectSetDefaultValuesToNotSetName()
+ public void GivenABaseApplicationEntity_WhenNameIsSet_ExpectSetDefaultValuesToNotSetName()
{
var entity = new BaseApplicationEntity
{
diff --git a/src/Api/Test/DestinationApplicationEntityTest.cs b/src/Api/Test/DestinationApplicationEntityTest.cs
old mode 100644
new mode 100755
index 9e8287842..ec1cfe9be
--- a/src/Api/Test/DestinationApplicationEntityTest.cs
+++ b/src/Api/Test/DestinationApplicationEntityTest.cs
@@ -14,6 +14,7 @@
* limitations under the License.
*/
+using Monai.Deploy.InformaticsGateway.Api.Models;
using Xunit;
namespace Monai.Deploy.InformaticsGateway.Api.Test
@@ -21,7 +22,7 @@ namespace Monai.Deploy.InformaticsGateway.Api.Test
public class MonaiApplicationEntityTest
{
[Fact]
- public void GivenAMonaiApplicationEntity_WhenNameIsNotSet_ExepectSetDefaultValuesToBeUsed()
+ public void GivenAMonaiApplicationEntity_WhenNameIsNotSet_ExpectSetDefaultValuesToBeUsed()
{
var entity = new MonaiApplicationEntity
{
@@ -41,7 +42,7 @@ public void GivenAMonaiApplicationEntity_WhenNameIsNotSet_ExepectSetDefaultValue
}
[Fact]
- public void GivenAMonaiApplicationEntity_WhenNameIsSet_ExepectSetDefaultValuesToNotOverwrite()
+ public void GivenAMonaiApplicationEntity_WhenNameIsSet_ExpectSetDefaultValuesToNotOverwrite()
{
var entity = new MonaiApplicationEntity
{
diff --git a/src/Api/Test/HL7DestinationEntityTest.cs b/src/Api/Test/HL7DestinationEntityTest.cs
new file mode 100644
index 000000000..181f1fd9e
--- /dev/null
+++ b/src/Api/Test/HL7DestinationEntityTest.cs
@@ -0,0 +1,54 @@
+/*
+ * Copyright 2022 MONAI Consortium
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using Monai.Deploy.InformaticsGateway.Api.Models;
+using Xunit;
+
+namespace Monai.Deploy.InformaticsGateway.Api.Test
+{
+ public class HL7DestinationEntityTest
+ {
+ [Fact]
+ public void GivenAMonaiApplicationEntity_WhenNameIsNotSet_ExepectSetDefaultValuesToBeUsed()
+ {
+ var entity = new HL7DestinationEntity
+ {
+ AeTitle = "AET",
+ };
+
+ entity.SetDefaultValues();
+
+ Assert.Equal(entity.AeTitle, entity.Name);
+ }
+
+ [Fact]
+ public void GivenAMonaiApplicationEntity_WhenNameIsSet_ExepectSetDefaultValuesToNotOverwrite()
+ {
+ var entity = new HL7DestinationEntity
+ {
+ AeTitle = "AET",
+ HostIp = "IP",
+ Name = "Name"
+ };
+
+ entity.SetDefaultValues();
+
+ Assert.Equal("AET", entity.AeTitle);
+ Assert.Equal("IP", entity.HostIp);
+ Assert.Equal("Name", entity.Name);
+ }
+ }
+}
diff --git a/src/Api/Test/Hl7ApplicationConfigEntityTest.cs b/src/Api/Test/Hl7ApplicationConfigEntityTest.cs
new file mode 100644
index 000000000..ae1a1bc2c
--- /dev/null
+++ b/src/Api/Test/Hl7ApplicationConfigEntityTest.cs
@@ -0,0 +1,190 @@
+/*
+ * Copyright 2021-2023 MONAI Consortium
+ * Copyright 2019-2021 NVIDIA Corporation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using System;
+using System.Collections.Generic;
+using Newtonsoft.Json;
+using Xunit;
+
+namespace Monai.Deploy.InformaticsGateway.Api.Test
+{
+ public class Hl7ApplicationConfigEntityTest
+ {
+ [Fact]
+ public void GivenAHl7ApplicationConfigEntity_WhenSendingIdKeyIsNotSet_ExpectValidateToReturnError()
+ {
+ var entity = new Hl7ApplicationConfigEntity
+ {
+ SendingId = new KeyValuePair(string.Empty, "SendingIdValue"),
+ DataLink = new KeyValuePair("DataLinkKey", DataLinkType.PatientId),
+ DataMapping = StringKeyValuePair.FromDictionary(new Dictionary { { "DataMappingKey", "DataMappingValue" } })
+ };
+
+ var errors = entity.Validate();
+
+ Assert.NotEmpty(errors);
+ Assert.Contains($"{nameof(entity.SendingId.Key)} is missing.", errors);
+ }
+
+ [Fact]
+ public void GivenAHl7ApplicationConfigEntity_WhenSendingIdValueIsNotSet_ExpectValidateToReturnError()
+ {
+ var entity = new Hl7ApplicationConfigEntity
+ {
+ SendingId = new KeyValuePair("SendingIdKey", string.Empty),
+ DataLink = new KeyValuePair("DataLinkKey", DataLinkType.PatientId),
+ DataMapping = StringKeyValuePair.FromDictionary(new Dictionary { { "DataMappingKey", "DataMappingValue" } })
+ };
+
+ var errors = entity.Validate();
+
+ Assert.NotEmpty(errors);
+ Assert.Contains($"{nameof(entity.SendingId.Value)} is missing.", errors);
+ }
+
+ [Fact]
+ public void GivenAHl7ApplicationConfigEntity_WhenDataLinkKeyIsNotSet_ExpectValidateToReturnError()
+ {
+ var entity = new Hl7ApplicationConfigEntity
+ {
+ SendingId = new KeyValuePair("SendingIdKey", "SendingIdValue"),
+ DataLink = new KeyValuePair(string.Empty, DataLinkType.PatientId),
+ DataMapping = StringKeyValuePair.FromDictionary(new Dictionary { { "DataMappingKey", "DataMappingValue" } })
+ };
+
+ var errors = entity.Validate();
+
+ Assert.NotEmpty(errors);
+ Assert.Contains($"{nameof(entity.DataLink.Key)} is missing.", errors);
+ }
+
+ [Fact]
+ public void GivenAHl7ApplicationConfigEntity_WhenDataMappingIsNotSet_ExpectValidateToReturnError()
+ {
+ var entity = new Hl7ApplicationConfigEntity
+ {
+ SendingId = new KeyValuePair("SendingIdKey", "SendingIdValue"),
+ DataLink = new KeyValuePair("DataLinkKey", DataLinkType.PatientId),
+ DataMapping = StringKeyValuePair.FromDictionary(new Dictionary())
+ };
+
+ var errors = entity.Validate();
+
+ Assert.NotEmpty(errors);
+ Assert.Contains($"{nameof(entity.DataMapping)} is missing values.", errors);
+ }
+
+ [Fact]
+ public void GivenAHl7ApplicationConfigEntity_WhenDataMappingKeyIsNotSet_ExpectValidateToReturnError()
+ {
+ var entity = new Hl7ApplicationConfigEntity
+ {
+ SendingId = new KeyValuePair("SendingIdKey", "SendingIdValue"),
+ DataLink = new KeyValuePair("DataLinkKey", DataLinkType.PatientId),
+ DataMapping = StringKeyValuePair.FromDictionary(new Dictionary { { string.Empty, "DataMappingValue" } })
+ };
+
+ var errors = entity.Validate();
+
+ Assert.NotEmpty(errors);
+ Assert.Contains($"{nameof(entity.DataMapping)} is missing a name at index 0.", errors);
+ }
+
+ [Fact]
+ public void GivenAHl7ApplicationConfigEntity_WhenDataMappingValueIsNotSet_ExpectValidateToReturnError()
+ {
+ var entity = new Hl7ApplicationConfigEntity
+ {
+ SendingId = new KeyValuePair("SendingIdKey", "SendingIdValue"),
+ DataLink = new KeyValuePair("DataLinkKey", DataLinkType.PatientId),
+ DataMapping = StringKeyValuePair.FromDictionary(new Dictionary { { "DataMappingKey", string.Empty } })
+ };
+
+ var errors = entity.Validate();
+
+ Assert.NotEmpty(errors);
+ Assert.Contains($"{nameof(entity.DataMapping)} (DataMappingKey) @ index 0 is not a valid DICOM Tag.", errors);
+ }
+
+ [Fact]
+ public void GivenAHl7ApplicationConfigEntity_WhenDataMappingValueIsNotAValidDicomTag_ExpectValidateToReturnError()
+ {
+ var entity = new Hl7ApplicationConfigEntity
+ {
+ SendingId = new KeyValuePair("SendingIdKey", "SendingIdValue"),
+ DataLink = new KeyValuePair("DataLinkKey", DataLinkType.PatientId),
+ DataMapping = StringKeyValuePair.FromDictionary(new Dictionary { { "DataMappingKey", "DataMappingValue" } })
+ };
+
+ var errors = entity.Validate();
+
+ Assert.NotEmpty(errors);
+ Assert.Contains("DataMapping.Value is not a valid DICOM Tag. Error parsing DICOM tag ['DataMappingValue']", errors);
+ }
+
+ [Fact]
+ public void GivenAHl7ApplicationConfigEntity_WhenDataMappingValueIsAValidDicomTag_ExpectValidateToReturnNoErrors()
+ {
+ var entity = new Hl7ApplicationConfigEntity
+ {
+ SendingId = new KeyValuePair("SendingIdKey", "SendingIdValue"),
+ DataLink = new KeyValuePair("DataLinkKey", DataLinkType.PatientId),
+ DataMapping = StringKeyValuePair.FromDictionary(new Dictionary { { "DataMappingKey", "0020,000D" } })
+ };
+
+ var errors = entity.Validate();
+
+ Assert.Empty(errors);
+ }
+
+ [Fact]
+ public void GivenAHl7ApplicationConfigEntity_WhenDataMappingValueIsEmpty_ExpectValidateToReturnError()
+ {
+ var entity = new Hl7ApplicationConfigEntity
+ {
+ SendingId = new KeyValuePair("SendingIdKey", "SendingIdValue"),
+ DataLink = new KeyValuePair("DataLinkKey", DataLinkType.PatientId),
+ DataMapping = StringKeyValuePair.FromDictionary(new Dictionary { { "DataMappingKey", "" } })
+ };
+
+ var errors = entity.Validate();
+
+ Assert.NotEmpty(errors);
+ Assert.Contains($"{nameof(entity.DataMapping)} (DataMappingKey) @ index 0 is not a valid DICOM Tag.", errors);
+ }
+
+ [Fact]
+ public void GivenAHl7ApplicationConfigEntity_WhenToStringIsCalled_ExpectToStringToReturnExpectedValue()
+ {
+ var guid = Guid.NewGuid();
+ var dt = DateTime.UtcNow;
+ var entity = new Hl7ApplicationConfigEntity
+ {
+ Id = guid,
+ DateTimeCreated = dt,
+ SendingId = new KeyValuePair("SendingIdKey", "SendingIdValue"),
+ DataLink = new KeyValuePair("DataLinkKey", DataLinkType.PatientId),
+ DataMapping = StringKeyValuePair.FromDictionary(new Dictionary { { "DataMappingKey", "0020,000D" } })
+ };
+
+ var result = entity.ToString();
+
+ var expected = JsonConvert.SerializeObject(entity);
+ Assert.Equal(expected, result);
+ }
+ }
+}
diff --git a/src/Api/Test/MonaiApplicationEntityTest.cs b/src/Api/Test/MonaiApplicationEntityTest.cs
old mode 100644
new mode 100755
index d91dd1166..1712d2690
--- a/src/Api/Test/MonaiApplicationEntityTest.cs
+++ b/src/Api/Test/MonaiApplicationEntityTest.cs
@@ -14,6 +14,7 @@
* limitations under the License.
*/
+using Monai.Deploy.InformaticsGateway.Api.Models;
using Xunit;
namespace Monai.Deploy.InformaticsGateway.Api.Test
@@ -21,7 +22,7 @@ namespace Monai.Deploy.InformaticsGateway.Api.Test
public class DestinationApplicationEntityTest
{
[Fact]
- public void GivenADestinationApplicationEntity_WhenNameIsNotSet_ExepectSetDefaultValuesToSetName()
+ public void GivenADestinationApplicationEntity_WhenNameIsNotSet_ExpectSetDefaultValuesToSetName()
{
var entity = new DestinationApplicationEntity
{
@@ -36,7 +37,7 @@ public void GivenADestinationApplicationEntity_WhenNameIsNotSet_ExepectSetDefaul
}
[Fact]
- public void GivenADestinationApplicationEntity_WhenNameIsSet_ExepectSetDefaultValuesToNotSetName()
+ public void GivenADestinationApplicationEntity_WhenNameIsSet_ExpectSetDefaultValuesToNotSetName()
{
var entity = new DestinationApplicationEntity
{
diff --git a/src/Api/Test/Storage/DicomFileStorageMetadataTest.cs b/src/Api/Test/Storage/DicomFileStorageMetadataTest.cs
old mode 100644
new mode 100755
index 3753ddb59..836fd75c0
--- a/src/Api/Test/Storage/DicomFileStorageMetadataTest.cs
+++ b/src/Api/Test/Storage/DicomFileStorageMetadataTest.cs
@@ -89,5 +89,40 @@ public void GivenDicomFileStorageMetadata_WhenGetPayloadPathIsCalled_APayyloadPa
Assert.Equal($"{payloadId}/{metadata.File.UploadPath}", metadata.File.GetPayloadPath(payloadId));
Assert.Equal($"{payloadId}/{metadata.JsonFile.UploadPath}", metadata.JsonFile.GetPayloadPath(payloadId));
}
+
+
+ [Fact]
+ public void StudyInstanceUid_Set_ValidValue()
+ {
+ // Arrange
+ var metadata = new DicomFileStorageMetadata();
+
+ // Act
+ metadata.StudyInstanceUid = "12345";
+
+ // Assert
+ Assert.Equal("12345", metadata.StudyInstanceUid);
+ }
+
+ [Fact]
+ public void SeriesInstanceUid_Set_ValidValue()
+ {
+ // Arrange
+ var metadata = new DicomFileStorageMetadata { SeriesInstanceUid = "67890" };
+
+ // Assert
+ Assert.Equal("67890", metadata.SeriesInstanceUid);
+ }
+
+ [Fact]
+ public void SopInstanceUid_Set_ValidValue()
+ {
+ // Arrange
+ var metadata = new DicomFileStorageMetadata { SopInstanceUid = "ABCDE" };
+
+ // Assert
+ Assert.Equal("ABCDE", metadata.SopInstanceUid);
+ }
+
}
-}
\ No newline at end of file
+}
diff --git a/src/Api/Test/packages.lock.json b/src/Api/Test/packages.lock.json
index edc489b7e..903cc6b49 100755
--- a/src/Api/Test/packages.lock.json
+++ b/src/Api/Test/packages.lock.json
@@ -94,6 +94,11 @@
"System.Threading.Channels": "6.0.0"
}
},
+ "HL7-dotnetcore": {
+ "type": "Transitive",
+ "resolved": "2.36.0",
+ "contentHash": "N1HLMeIqYuY+4O69ItgZJoDBnnpNkK5N2pClceTJ2nFJxsP48iCsA4iz3tm43Yszi4r/vaThoc3UoLBfGP3vKw=="
+ },
"Macross.Json.Extensions": {
"type": "Transitive",
"resolved": "3.0.0",
@@ -116,8 +121,8 @@
},
"Microsoft.EntityFrameworkCore.Abstractions": {
"type": "Transitive",
- "resolved": "6.0.22",
- "contentHash": "3ycEYrtWoa4kv5mUECU2LNBbWiYh345b1uQLvg4pHCEICXoJZ8Sfu/2yGloKiMNgMdDc02gFYCRHxsqQNZpnWA=="
+ "resolved": "6.0.25",
+ "contentHash": "DalO25C96LsIfAPlyizyun9y1XrIquRugPEGXC8+z7dFo+GyU0LRd0R11JDd3rJWjR18NOFYwqNenjyDpNRO3A=="
},
"Microsoft.Extensions.Configuration.Abstractions": {
"type": "Transitive",
@@ -249,8 +254,8 @@
},
"Monai.Deploy.Messaging": {
"type": "Transitive",
- "resolved": "1.0.4",
- "contentHash": "K6RrbDh7upokvt+sKuKEhQ+B1Xj46DF4sHxqwE6ymZazwmRULzsD0u/1IeDDJCGuRs3iG64QWwCt32j30PSZLg==",
+ "resolved": "1.0.5",
+ "contentHash": "J8Lskfy8PSVQLDE2uLqh53uaPpqpRJuSGVHpR2jrw+GYnTTDv21j/2gxwG8Hq2NgNOkWLNVi+fFnyWd6WFiUTA==",
"dependencies": {
"Ardalis.GuardClauses": "4.1.1",
"Microsoft.Extensions.Diagnostics.HealthChecks": "6.0.21",
@@ -260,10 +265,10 @@
},
"Monai.Deploy.Messaging.RabbitMQ": {
"type": "Transitive",
- "resolved": "1.0.4",
- "contentHash": "2llZ4XbE91Km2Q+JEKSSeTyhZLWRq3lN5xQ6+Klqow3V8SXBAlOQQ+b5//BEm6x0QdoycFberMOVAsZYYM0j7g==",
+ "resolved": "1.0.5",
+ "contentHash": "L+BWU5Xq1ARjFRcpnefDJGuG52Zw4Iz3qql1tn8lYfqoC4B37fAUVz6k7Ar7v1OUwPo/JR8q4OP2IIMpqpKRRA==",
"dependencies": {
- "Monai.Deploy.Messaging": "1.0.4",
+ "Monai.Deploy.Messaging": "1.0.5",
"Polly": "7.2.4",
"RabbitMQ.Client": "6.5.0"
}
@@ -1277,11 +1282,12 @@
"monai.deploy.informaticsgateway.api": {
"type": "Project",
"dependencies": {
+ "HL7-dotnetcore": "[2.36.0, )",
"Macross.Json.Extensions": "[3.0.0, )",
- "Microsoft.EntityFrameworkCore.Abstractions": "[6.0.22, )",
+ "Microsoft.EntityFrameworkCore.Abstractions": "[6.0.25, )",
"Monai.Deploy.InformaticsGateway.Common": "[1.0.0, )",
- "Monai.Deploy.Messaging": "[1.0.4, )",
- "Monai.Deploy.Messaging.RabbitMQ": "[1.0.4, )",
+ "Monai.Deploy.Messaging": "[1.0.5, )",
+ "Monai.Deploy.Messaging.RabbitMQ": "[1.0.5, )",
"Monai.Deploy.Storage": "[0.2.18, )",
"fo-dicom": "[5.1.1, )"
}
diff --git a/src/Api/VirtualApplicationEntity.cs b/src/Api/VirtualApplicationEntity.cs
old mode 100644
new mode 100755
index 9a6545999..4fd33ffd1
--- a/src/Api/VirtualApplicationEntity.cs
+++ b/src/Api/VirtualApplicationEntity.cs
@@ -20,6 +20,7 @@
using System.ComponentModel.DataAnnotations.Schema;
using System.Security.Claims;
using Monai.Deploy.InformaticsGateway.Api.PlugIns;
+using Monai.Deploy.InformaticsGateway.Api.Storage;
namespace Monai.Deploy.InformaticsGateway.Api
{
diff --git a/src/Api/packages.lock.json b/src/Api/packages.lock.json
index 898a7a74c..1a4adf62a 100755
--- a/src/Api/packages.lock.json
+++ b/src/Api/packages.lock.json
@@ -21,6 +21,12 @@
"System.Threading.Channels": "6.0.0"
}
},
+ "HL7-dotnetcore": {
+ "type": "Direct",
+ "requested": "[2.36.0, )",
+ "resolved": "2.36.0",
+ "contentHash": "N1HLMeIqYuY+4O69ItgZJoDBnnpNkK5N2pClceTJ2nFJxsP48iCsA4iz3tm43Yszi4r/vaThoc3UoLBfGP3vKw=="
+ },
"Macross.Json.Extensions": {
"type": "Direct",
"requested": "[3.0.0, )",
@@ -29,15 +35,15 @@
},
"Microsoft.EntityFrameworkCore.Abstractions": {
"type": "Direct",
- "requested": "[6.0.22, )",
- "resolved": "6.0.22",
- "contentHash": "3ycEYrtWoa4kv5mUECU2LNBbWiYh345b1uQLvg4pHCEICXoJZ8Sfu/2yGloKiMNgMdDc02gFYCRHxsqQNZpnWA=="
+ "requested": "[6.0.25, )",
+ "resolved": "6.0.25",
+ "contentHash": "DalO25C96LsIfAPlyizyun9y1XrIquRugPEGXC8+z7dFo+GyU0LRd0R11JDd3rJWjR18NOFYwqNenjyDpNRO3A=="
},
"Monai.Deploy.Messaging": {
"type": "Direct",
- "requested": "[1.0.4, )",
- "resolved": "1.0.4",
- "contentHash": "K6RrbDh7upokvt+sKuKEhQ+B1Xj46DF4sHxqwE6ymZazwmRULzsD0u/1IeDDJCGuRs3iG64QWwCt32j30PSZLg==",
+ "requested": "[1.0.5, )",
+ "resolved": "1.0.5",
+ "contentHash": "J8Lskfy8PSVQLDE2uLqh53uaPpqpRJuSGVHpR2jrw+GYnTTDv21j/2gxwG8Hq2NgNOkWLNVi+fFnyWd6WFiUTA==",
"dependencies": {
"Ardalis.GuardClauses": "4.1.1",
"Microsoft.Extensions.Diagnostics.HealthChecks": "6.0.21",
@@ -47,11 +53,11 @@
},
"Monai.Deploy.Messaging.RabbitMQ": {
"type": "Direct",
- "requested": "[1.0.4, )",
- "resolved": "1.0.4",
- "contentHash": "2llZ4XbE91Km2Q+JEKSSeTyhZLWRq3lN5xQ6+Klqow3V8SXBAlOQQ+b5//BEm6x0QdoycFberMOVAsZYYM0j7g==",
+ "requested": "[1.0.5, )",
+ "resolved": "1.0.5",
+ "contentHash": "L+BWU5Xq1ARjFRcpnefDJGuG52Zw4Iz3qql1tn8lYfqoC4B37fAUVz6k7Ar7v1OUwPo/JR8q4OP2IIMpqpKRRA==",
"dependencies": {
- "Monai.Deploy.Messaging": "1.0.4",
+ "Monai.Deploy.Messaging": "1.0.5",
"Polly": "7.2.4",
"RabbitMQ.Client": "6.5.0"
}
diff --git a/src/CLI/Commands/AetCommand.cs b/src/CLI/Commands/AetCommand.cs
old mode 100644
new mode 100755
index 3c2f27c04..d47094b7c
--- a/src/CLI/Commands/AetCommand.cs
+++ b/src/CLI/Commands/AetCommand.cs
@@ -26,7 +26,7 @@
using Ardalis.GuardClauses;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
-using Monai.Deploy.InformaticsGateway.Api;
+using Monai.Deploy.InformaticsGateway.Api.Models;
using Monai.Deploy.InformaticsGateway.CLI.Services;
using Monai.Deploy.InformaticsGateway.Client;
using Monai.Deploy.InformaticsGateway.Common;
diff --git a/src/CLI/Commands/DestinationCommand.cs b/src/CLI/Commands/DestinationCommand.cs
old mode 100644
new mode 100755
index 0205153f8..819cd18cf
--- a/src/CLI/Commands/DestinationCommand.cs
+++ b/src/CLI/Commands/DestinationCommand.cs
@@ -26,7 +26,7 @@
using Ardalis.GuardClauses;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
-using Monai.Deploy.InformaticsGateway.Api;
+using Monai.Deploy.InformaticsGateway.Api.Models;
using Monai.Deploy.InformaticsGateway.CLI.Services;
using Monai.Deploy.InformaticsGateway.Client;
using Monai.Deploy.InformaticsGateway.Common;
diff --git a/src/CLI/Services/ConfigurationOptionAccessor.cs b/src/CLI/Services/ConfigurationOptionAccessor.cs
old mode 100644
new mode 100755
index c61ae761c..a086c6ece
--- a/src/CLI/Services/ConfigurationOptionAccessor.cs
+++ b/src/CLI/Services/ConfigurationOptionAccessor.cs
@@ -30,6 +30,11 @@ public interface IConfigurationOptionAccessor
///
int DicomListeningPort { get; set; }
+ ///
+ /// Gets or sets the ExternalApp DICOM SCP listening port from appsettings.json.
+ ///
+ int ExternalAppDicomListeningPort { get; set; }
+
///
/// Gets or sets the HL7 listening port from appsettings.json.
///
@@ -112,6 +117,21 @@ public int DicomListeningPort
}
}
+ public int ExternalAppDicomListeningPort
+ {
+ get
+ {
+ return GetValueFromJsonPath("InformaticsGateway.dicom.scp.externalAppPort");
+ }
+ set
+ {
+ Guard.Against.OutOfRangePort(value, nameof(ExternalAppDicomListeningPort));
+ var jObject = ReadConfigurationFile();
+ jObject["InformaticsGateway"]["dicom"]["scp"]["externalAppPort"] = value;
+ SaveConfigurationFile(jObject);
+ }
+ }
+
public int Hl7ListeningPort
{
get
diff --git a/src/CLI/Test/AetCommandTest.cs b/src/CLI/Test/AetCommandTest.cs
old mode 100644
new mode 100755
index 473f02426..9852ccf0a
--- a/src/CLI/Test/AetCommandTest.cs
+++ b/src/CLI/Test/AetCommandTest.cs
@@ -28,7 +28,7 @@
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
-using Monai.Deploy.InformaticsGateway.Api;
+using Monai.Deploy.InformaticsGateway.Api.Models;
using Monai.Deploy.InformaticsGateway.CLI.Services;
using Monai.Deploy.InformaticsGateway.Client;
using Monai.Deploy.InformaticsGateway.SharedTest;
diff --git a/src/CLI/Test/DestinationCommandTest.cs b/src/CLI/Test/DestinationCommandTest.cs
old mode 100644
new mode 100755
index 4212a7e0d..0d9dd4cd0
--- a/src/CLI/Test/DestinationCommandTest.cs
+++ b/src/CLI/Test/DestinationCommandTest.cs
@@ -29,7 +29,7 @@
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
-using Monai.Deploy.InformaticsGateway.Api;
+using Monai.Deploy.InformaticsGateway.Api.Models;
using Monai.Deploy.InformaticsGateway.CLI.Services;
using Monai.Deploy.InformaticsGateway.Client;
using Monai.Deploy.InformaticsGateway.SharedTest;
diff --git a/src/CLI/Test/packages.lock.json b/src/CLI/Test/packages.lock.json
index 15a8c0324..dbdd6f20e 100755
--- a/src/CLI/Test/packages.lock.json
+++ b/src/CLI/Test/packages.lock.json
@@ -137,6 +137,11 @@
"System.Threading.Channels": "6.0.0"
}
},
+ "HL7-dotnetcore": {
+ "type": "Transitive",
+ "resolved": "2.36.0",
+ "contentHash": "N1HLMeIqYuY+4O69ItgZJoDBnnpNkK5N2pClceTJ2nFJxsP48iCsA4iz3tm43Yszi4r/vaThoc3UoLBfGP3vKw=="
+ },
"Macross.Json.Extensions": {
"type": "Transitive",
"resolved": "3.0.0",
@@ -164,8 +169,8 @@
},
"Microsoft.EntityFrameworkCore.Abstractions": {
"type": "Transitive",
- "resolved": "6.0.22",
- "contentHash": "3ycEYrtWoa4kv5mUECU2LNBbWiYh345b1uQLvg4pHCEICXoJZ8Sfu/2yGloKiMNgMdDc02gFYCRHxsqQNZpnWA=="
+ "resolved": "6.0.25",
+ "contentHash": "DalO25C96LsIfAPlyizyun9y1XrIquRugPEGXC8+z7dFo+GyU0LRd0R11JDd3rJWjR18NOFYwqNenjyDpNRO3A=="
},
"Microsoft.Extensions.Configuration": {
"type": "Transitive",
@@ -497,8 +502,8 @@
},
"Monai.Deploy.Messaging": {
"type": "Transitive",
- "resolved": "1.0.4",
- "contentHash": "K6RrbDh7upokvt+sKuKEhQ+B1Xj46DF4sHxqwE6ymZazwmRULzsD0u/1IeDDJCGuRs3iG64QWwCt32j30PSZLg==",
+ "resolved": "1.0.5",
+ "contentHash": "J8Lskfy8PSVQLDE2uLqh53uaPpqpRJuSGVHpR2jrw+GYnTTDv21j/2gxwG8Hq2NgNOkWLNVi+fFnyWd6WFiUTA==",
"dependencies": {
"Ardalis.GuardClauses": "4.1.1",
"Microsoft.Extensions.Diagnostics.HealthChecks": "6.0.21",
@@ -508,10 +513,10 @@
},
"Monai.Deploy.Messaging.RabbitMQ": {
"type": "Transitive",
- "resolved": "1.0.4",
- "contentHash": "2llZ4XbE91Km2Q+JEKSSeTyhZLWRq3lN5xQ6+Klqow3V8SXBAlOQQ+b5//BEm6x0QdoycFberMOVAsZYYM0j7g==",
+ "resolved": "1.0.5",
+ "contentHash": "L+BWU5Xq1ARjFRcpnefDJGuG52Zw4Iz3qql1tn8lYfqoC4B37fAUVz6k7Ar7v1OUwPo/JR8q4OP2IIMpqpKRRA==",
"dependencies": {
- "Monai.Deploy.Messaging": "1.0.4",
+ "Monai.Deploy.Messaging": "1.0.5",
"Polly": "7.2.4",
"RabbitMQ.Client": "6.5.0"
}
@@ -1560,11 +1565,12 @@
"monai.deploy.informaticsgateway.api": {
"type": "Project",
"dependencies": {
+ "HL7-dotnetcore": "[2.36.0, )",
"Macross.Json.Extensions": "[3.0.0, )",
- "Microsoft.EntityFrameworkCore.Abstractions": "[6.0.22, )",
+ "Microsoft.EntityFrameworkCore.Abstractions": "[6.0.25, )",
"Monai.Deploy.InformaticsGateway.Common": "[1.0.0, )",
- "Monai.Deploy.Messaging": "[1.0.4, )",
- "Monai.Deploy.Messaging.RabbitMQ": "[1.0.4, )",
+ "Monai.Deploy.Messaging": "[1.0.5, )",
+ "Monai.Deploy.Messaging.RabbitMQ": "[1.0.5, )",
"Monai.Deploy.Storage": "[0.2.18, )",
"fo-dicom": "[5.1.1, )"
}
diff --git a/src/CLI/packages.lock.json b/src/CLI/packages.lock.json
index f45d6d7b6..22c1f3e80 100755
--- a/src/CLI/packages.lock.json
+++ b/src/CLI/packages.lock.json
@@ -93,6 +93,11 @@
"System.Threading.Channels": "6.0.0"
}
},
+ "HL7-dotnetcore": {
+ "type": "Transitive",
+ "resolved": "2.36.0",
+ "contentHash": "N1HLMeIqYuY+4O69ItgZJoDBnnpNkK5N2pClceTJ2nFJxsP48iCsA4iz3tm43Yszi4r/vaThoc3UoLBfGP3vKw=="
+ },
"Macross.Json.Extensions": {
"type": "Transitive",
"resolved": "3.0.0",
@@ -115,8 +120,8 @@
},
"Microsoft.EntityFrameworkCore.Abstractions": {
"type": "Transitive",
- "resolved": "6.0.22",
- "contentHash": "3ycEYrtWoa4kv5mUECU2LNBbWiYh345b1uQLvg4pHCEICXoJZ8Sfu/2yGloKiMNgMdDc02gFYCRHxsqQNZpnWA=="
+ "resolved": "6.0.25",
+ "contentHash": "DalO25C96LsIfAPlyizyun9y1XrIquRugPEGXC8+z7dFo+GyU0LRd0R11JDd3rJWjR18NOFYwqNenjyDpNRO3A=="
},
"Microsoft.Extensions.Configuration": {
"type": "Transitive",
@@ -399,8 +404,8 @@
},
"Monai.Deploy.Messaging": {
"type": "Transitive",
- "resolved": "1.0.4",
- "contentHash": "K6RrbDh7upokvt+sKuKEhQ+B1Xj46DF4sHxqwE6ymZazwmRULzsD0u/1IeDDJCGuRs3iG64QWwCt32j30PSZLg==",
+ "resolved": "1.0.5",
+ "contentHash": "J8Lskfy8PSVQLDE2uLqh53uaPpqpRJuSGVHpR2jrw+GYnTTDv21j/2gxwG8Hq2NgNOkWLNVi+fFnyWd6WFiUTA==",
"dependencies": {
"Ardalis.GuardClauses": "4.1.1",
"Microsoft.Extensions.Diagnostics.HealthChecks": "6.0.21",
@@ -410,10 +415,10 @@
},
"Monai.Deploy.Messaging.RabbitMQ": {
"type": "Transitive",
- "resolved": "1.0.4",
- "contentHash": "2llZ4XbE91Km2Q+JEKSSeTyhZLWRq3lN5xQ6+Klqow3V8SXBAlOQQ+b5//BEm6x0QdoycFberMOVAsZYYM0j7g==",
+ "resolved": "1.0.5",
+ "contentHash": "L+BWU5Xq1ARjFRcpnefDJGuG52Zw4Iz3qql1tn8lYfqoC4B37fAUVz6k7Ar7v1OUwPo/JR8q4OP2IIMpqpKRRA==",
"dependencies": {
- "Monai.Deploy.Messaging": "1.0.4",
+ "Monai.Deploy.Messaging": "1.0.5",
"Polly": "7.2.4",
"RabbitMQ.Client": "6.5.0"
}
@@ -541,11 +546,12 @@
"monai.deploy.informaticsgateway.api": {
"type": "Project",
"dependencies": {
+ "HL7-dotnetcore": "[2.36.0, )",
"Macross.Json.Extensions": "[3.0.0, )",
- "Microsoft.EntityFrameworkCore.Abstractions": "[6.0.22, )",
+ "Microsoft.EntityFrameworkCore.Abstractions": "[6.0.25, )",
"Monai.Deploy.InformaticsGateway.Common": "[1.0.0, )",
- "Monai.Deploy.Messaging": "[1.0.4, )",
- "Monai.Deploy.Messaging.RabbitMQ": "[1.0.4, )",
+ "Monai.Deploy.Messaging": "[1.0.5, )",
+ "Monai.Deploy.Messaging.RabbitMQ": "[1.0.5, )",
"Monai.Deploy.Storage": "[0.2.18, )",
"fo-dicom": "[5.1.1, )"
}
diff --git a/src/Client/IInformaticsGatewayClient.cs b/src/Client/IInformaticsGatewayClient.cs
old mode 100644
new mode 100755
index cf9e8ef7d..3db89516e
--- a/src/Client/IInformaticsGatewayClient.cs
+++ b/src/Client/IInformaticsGatewayClient.cs
@@ -17,6 +17,7 @@
using System;
using System.Net.Http.Headers;
using Monai.Deploy.InformaticsGateway.Api;
+using Monai.Deploy.InformaticsGateway.Api.Models;
using Monai.Deploy.InformaticsGateway.Client.Services;
namespace Monai.Deploy.InformaticsGateway.Client
@@ -53,6 +54,11 @@ public interface IInformaticsGatewayClient
///
IAeTitleService VirtualAeTitle { get; }
+ ///
+ /// Provides APIs to list, create, delete Virtual AE Titles.
+ ///
+ IAeTitleService HL7Destinations { get; }
+
///
/// Configures the service URI of the DICOMweb service.
///
diff --git a/src/Client/InformaticsGatewayClient.cs b/src/Client/InformaticsGatewayClient.cs
old mode 100644
new mode 100755
index 9f48dac6c..fe9a81145
--- a/src/Client/InformaticsGatewayClient.cs
+++ b/src/Client/InformaticsGatewayClient.cs
@@ -20,6 +20,7 @@
using Ardalis.GuardClauses;
using Microsoft.Extensions.Logging;
using Monai.Deploy.InformaticsGateway.Api;
+using Monai.Deploy.InformaticsGateway.Api.Models;
using Monai.Deploy.InformaticsGateway.Client.Common;
using Monai.Deploy.InformaticsGateway.Client.Services;
@@ -48,6 +49,9 @@ public class InformaticsGatewayClient : IInformaticsGatewayClient
///
public IAeTitleService VirtualAeTitle { get; }
+ ///
+ public IAeTitleService HL7Destinations { get; }
+
///
/// Initializes a new instance of the InformaticsGatewayClient class that connects to the specified URI using the credentials provided.
///
@@ -66,6 +70,7 @@ public InformaticsGatewayClient(HttpClient httpClient, ILogger("config/source", _httpClient, _logger);
DicomDestinations = new AeTitleService("config/destination", _httpClient, _logger);
VirtualAeTitle = new AeTitleService("config/vae", _httpClient, _logger);
+ HL7Destinations = new AeTitleService("config/hl7-destination", _httpClient, _logger);
}
///
diff --git a/src/Client/Services/AeTitle{T}Service.cs b/src/Client/Services/AeTitle{T}Service.cs
old mode 100644
new mode 100755
index 43a2e7f3d..e9df749ec
--- a/src/Client/Services/AeTitle{T}Service.cs
+++ b/src/Client/Services/AeTitle{T}Service.cs
@@ -23,7 +23,7 @@
using System.Threading.Tasks;
using Ardalis.GuardClauses;
using Microsoft.Extensions.Logging;
-using Monai.Deploy.InformaticsGateway.Api;
+using Monai.Deploy.InformaticsGateway.Api.Models;
namespace Monai.Deploy.InformaticsGateway.Client.Services
{
diff --git a/src/Client/Test/AeTitleServiceTest.cs b/src/Client/Test/AeTitleServiceTest.cs
old mode 100644
new mode 100755
index 646f03a44..df852a205
--- a/src/Client/Test/AeTitleServiceTest.cs
+++ b/src/Client/Test/AeTitleServiceTest.cs
@@ -24,6 +24,7 @@
using System.Threading.Tasks;
using Microsoft.Extensions.Logging;
using Monai.Deploy.InformaticsGateway.Api;
+using Monai.Deploy.InformaticsGateway.Api.Models;
using Monai.Deploy.InformaticsGateway.Client.Common;
using Monai.Deploy.InformaticsGateway.Client.Services;
using Moq;
diff --git a/src/Client/Test/packages.lock.json b/src/Client/Test/packages.lock.json
index 36843f9e7..2bbd6ee7a 100755
--- a/src/Client/Test/packages.lock.json
+++ b/src/Client/Test/packages.lock.json
@@ -176,19 +176,19 @@
},
"Microsoft.Data.Sqlite.Core": {
"type": "Transitive",
- "resolved": "6.0.22",
- "contentHash": "gtIGHbGnRq/h4mFSJYr9BdMObvJV/a67nBubs50VjPDusQARtWJzeVTirDWsbL1qTvGzbbZCD7VE7+s2ixZfow==",
+ "resolved": "6.0.25",
+ "contentHash": "rbXNoMg/ylGyJxLcyetojuXFzvDG85M31DfFbqL8veN4P8oG6wmnPwWNn3/bDIEDVvdw15R092dxpobQeQcjGg==",
"dependencies": {
"SQLitePCLRaw.core": "2.1.2"
}
},
"Microsoft.EntityFrameworkCore": {
"type": "Transitive",
- "resolved": "6.0.22",
- "contentHash": "vNe+y8ZsEf1CsfmfYttfKAz/IgCCtphgguvao0HWNJNdjZf9cabD288nZJ17b/WaQMWXhLwYAsofk8vNVkfTOA==",
+ "resolved": "6.0.25",
+ "contentHash": "txcqw2xrmvMoTIgzAdUk8JHLELofGgTK3i6glswVZs4SC8BOU1M/iSAtwMIVtAtfzxuBIUAbHPx+Ly6lfkYe7g==",
"dependencies": {
- "Microsoft.EntityFrameworkCore.Abstractions": "6.0.22",
- "Microsoft.EntityFrameworkCore.Analyzers": "6.0.22",
+ "Microsoft.EntityFrameworkCore.Abstractions": "6.0.25",
+ "Microsoft.EntityFrameworkCore.Analyzers": "6.0.25",
"Microsoft.Extensions.Caching.Memory": "6.0.1",
"Microsoft.Extensions.DependencyInjection": "6.0.1",
"Microsoft.Extensions.Logging": "6.0.0",
@@ -198,39 +198,39 @@
},
"Microsoft.EntityFrameworkCore.Abstractions": {
"type": "Transitive",
- "resolved": "6.0.22",
- "contentHash": "3ycEYrtWoa4kv5mUECU2LNBbWiYh345b1uQLvg4pHCEICXoJZ8Sfu/2yGloKiMNgMdDc02gFYCRHxsqQNZpnWA=="
+ "resolved": "6.0.25",
+ "contentHash": "DalO25C96LsIfAPlyizyun9y1XrIquRugPEGXC8+z7dFo+GyU0LRd0R11JDd3rJWjR18NOFYwqNenjyDpNRO3A=="
},
"Microsoft.EntityFrameworkCore.Analyzers": {
"type": "Transitive",
- "resolved": "6.0.22",
- "contentHash": "82SZfdrLe7bdDB8/3INV0UULvlUzsdHkrEYylDCrzFXRWHXG9eO5jJQjRHU8j9XkGIN+MSPgIlczBnqeDvB36A=="
+ "resolved": "6.0.25",
+ "contentHash": "i6UpdWqWxSBbIFOkaMoubM40yIjTZO+0rIUkY5JRltSeFI4PzncBBQcNVNXXjAmiLXF/xY0xTS+ykClbkV46Yg=="
},
"Microsoft.EntityFrameworkCore.Relational": {
"type": "Transitive",
- "resolved": "6.0.22",
- "contentHash": "W7yfdEbEuS1OPPxU0EOA6haqI4uvzs7OwHKh81DiJFn3NFNP2ztSovkOzBDhTwHX0j+OySsAj3BEJhuzTVYIVw==",
+ "resolved": "6.0.25",
+ "contentHash": "ci2lR++x7R7LR71+HoeRnB9Z5VeOQ1ILLbFRhsjjWZyLrAMkdq7TK9Ll47jo1TXDWF8Ddeap1JgcptgPKkWSRA==",
"dependencies": {
- "Microsoft.EntityFrameworkCore": "6.0.22",
+ "Microsoft.EntityFrameworkCore": "6.0.25",
"Microsoft.Extensions.Configuration.Abstractions": "6.0.0"
}
},
"Microsoft.EntityFrameworkCore.Sqlite": {
"type": "Transitive",
- "resolved": "6.0.22",
- "contentHash": "EDKnYZtxq7P131xxLsEokda86WnFRiVAveLVAYR8kzyWl/UwTpf/RS2m2FrbH/U8vX3A+IQNpabtxcjtCUrY0g==",
+ "resolved": "6.0.25",
+ "contentHash": "vaQNuXgUN0nIzFXQiPSb9iAaJqLvZA164Sx9mjF5rFQS5cwQ/AiymF0e4J0QH3P07Mf3zEVZE5u2fTO0NacuMQ==",
"dependencies": {
- "Microsoft.EntityFrameworkCore.Sqlite.Core": "6.0.22",
+ "Microsoft.EntityFrameworkCore.Sqlite.Core": "6.0.25",
"SQLitePCLRaw.bundle_e_sqlite3": "2.1.2"
}
},
"Microsoft.EntityFrameworkCore.Sqlite.Core": {
"type": "Transitive",
- "resolved": "6.0.22",
- "contentHash": "xSU77ORQgwlD+s5Cmlk9DzoSCu5oxlHLuQl+v5zAZ0Uv5yH17hp02TBfz3x9nBA+CrIsqaLjGEuyZmLDf/5ATw==",
+ "resolved": "6.0.25",
+ "contentHash": "IU4E8I9FS2sUVxJJ0w/4jogLQ8C0zvu/SO6b1tRmiiCtTrHhjUB0tqhxjrFnDXZ/mpCJOElw50+qhbcElm0CYw==",
"dependencies": {
- "Microsoft.Data.Sqlite.Core": "6.0.22",
- "Microsoft.EntityFrameworkCore.Relational": "6.0.22",
+ "Microsoft.Data.Sqlite.Core": "6.0.25",
+ "Microsoft.EntityFrameworkCore.Relational": "6.0.25",
"Microsoft.Extensions.DependencyModel": "6.0.0"
}
},
@@ -336,10 +336,10 @@
},
"Microsoft.Extensions.Diagnostics.HealthChecks": {
"type": "Transitive",
- "resolved": "6.0.22",
- "contentHash": "HB1Zp1NY9m+HwYKLZBgUfNIt0xXzm4APARDuAIPODl8pT4g10oOiEDN8asOzx/sfL9xM+Sse5Zne9L+6qYi/iA==",
+ "resolved": "6.0.25",
+ "contentHash": "9vz47iGkzqhh0bGqomOTxaJNEEajeNcbSTSWwhh9Soo9lWm0UdPbw04CxXCQJPhc0aw9OaMnOxx7sCcde8/adA==",
"dependencies": {
- "Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions": "6.0.22",
+ "Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions": "6.0.25",
"Microsoft.Extensions.Hosting.Abstractions": "6.0.0",
"Microsoft.Extensions.Logging.Abstractions": "6.0.4",
"Microsoft.Extensions.Options": "6.0.0"
@@ -347,17 +347,17 @@
},
"Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions": {
"type": "Transitive",
- "resolved": "6.0.22",
- "contentHash": "yvz+0r3qAt6gNEKlGSBO1BXMhtD3Tt8yzU59dHASolpwlSHvgqy0tEP6KXn3MPoKlPr0CiAHUdzOwYSoljzRSg=="
+ "resolved": "6.0.25",
+ "contentHash": "9sd1K/rp/vlxrBWNa0i8fgHCBPg94cocGMsJr7z9e2zQGQxMHNGpspdcy/FRGPAh2CINQet/RrM6Ef196xI20w=="
},
"Microsoft.Extensions.Diagnostics.HealthChecks.EntityFrameworkCore": {
"type": "Transitive",
- "resolved": "6.0.22",
- "contentHash": "PNj+/e/GCJh3ZNzxEGhkMpKJgmmbuGar6Uk/R3mPFZacTx6lBdLs4Ev7uf4XQWqTdJe56rK+2P3oF/9jIGbxgw==",
+ "resolved": "6.0.25",
+ "contentHash": "Cmhq0sgb53+dh9xHOlBEQUhi13vsZeQ4fcYC9JYO4med7pabj9x3100opCdUv+7UX+tUC1GPm/nco+1skJdLFA==",
"dependencies": {
- "Microsoft.EntityFrameworkCore.Relational": "6.0.22",
- "Microsoft.Extensions.Diagnostics.HealthChecks": "6.0.22",
- "Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions": "6.0.22"
+ "Microsoft.EntityFrameworkCore.Relational": "6.0.25",
+ "Microsoft.Extensions.Diagnostics.HealthChecks": "6.0.25",
+ "Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions": "6.0.25"
}
},
"Microsoft.Extensions.FileProviders.Abstractions": {
@@ -559,8 +559,8 @@
},
"Monai.Deploy.Messaging": {
"type": "Transitive",
- "resolved": "1.0.4",
- "contentHash": "K6RrbDh7upokvt+sKuKEhQ+B1Xj46DF4sHxqwE6ymZazwmRULzsD0u/1IeDDJCGuRs3iG64QWwCt32j30PSZLg==",
+ "resolved": "1.0.5",
+ "contentHash": "J8Lskfy8PSVQLDE2uLqh53uaPpqpRJuSGVHpR2jrw+GYnTTDv21j/2gxwG8Hq2NgNOkWLNVi+fFnyWd6WFiUTA==",
"dependencies": {
"Ardalis.GuardClauses": "4.1.1",
"Microsoft.Extensions.Diagnostics.HealthChecks": "6.0.21",
@@ -570,10 +570,10 @@
},
"Monai.Deploy.Messaging.RabbitMQ": {
"type": "Transitive",
- "resolved": "1.0.4",
- "contentHash": "2llZ4XbE91Km2Q+JEKSSeTyhZLWRq3lN5xQ6+Klqow3V8SXBAlOQQ+b5//BEm6x0QdoycFberMOVAsZYYM0j7g==",
+ "resolved": "1.0.5",
+ "contentHash": "L+BWU5Xq1ARjFRcpnefDJGuG52Zw4Iz3qql1tn8lYfqoC4B37fAUVz6k7Ar7v1OUwPo/JR8q4OP2IIMpqpKRRA==",
"dependencies": {
- "Monai.Deploy.Messaging": "1.0.4",
+ "Monai.Deploy.Messaging": "1.0.5",
"Polly": "7.2.4",
"RabbitMQ.Client": "6.5.0"
}
@@ -1816,7 +1816,7 @@
"Monai.Deploy.InformaticsGateway.Database.EntityFramework": "[1.0.0, )",
"Monai.Deploy.InformaticsGateway.DicomWeb.Client": "[1.0.0, )",
"Monai.Deploy.InformaticsGateway.PlugIns.RemoteAppExecution": "[1.0.0, )",
- "Monai.Deploy.Messaging.RabbitMQ": "[1.0.4, )",
+ "Monai.Deploy.Messaging.RabbitMQ": "[1.0.5, )",
"Monai.Deploy.Security": "[0.1.3, )",
"Monai.Deploy.Storage.MinIO": "[0.2.18, )",
"NLog.Web.AspNetCore": "[5.3.4, )",
@@ -1826,11 +1826,12 @@
"monai.deploy.informaticsgateway.api": {
"type": "Project",
"dependencies": {
+ "HL7-dotnetcore": "[2.36.0, )",
"Macross.Json.Extensions": "[3.0.0, )",
- "Microsoft.EntityFrameworkCore.Abstractions": "[6.0.22, )",
+ "Microsoft.EntityFrameworkCore.Abstractions": "[6.0.25, )",
"Monai.Deploy.InformaticsGateway.Common": "[1.0.0, )",
- "Monai.Deploy.Messaging": "[1.0.4, )",
- "Monai.Deploy.Messaging.RabbitMQ": "[1.0.4, )",
+ "Monai.Deploy.Messaging": "[1.0.5, )",
+ "Monai.Deploy.Messaging.RabbitMQ": "[1.0.5, )",
"Monai.Deploy.Storage": "[0.2.18, )",
"fo-dicom": "[5.1.1, )"
}
@@ -1866,7 +1867,7 @@
"type": "Project",
"dependencies": {
"AspNetCore.HealthChecks.MongoDb": "[6.0.2, )",
- "Microsoft.Extensions.Diagnostics.HealthChecks.EntityFrameworkCore": "[6.0.22, )",
+ "Microsoft.Extensions.Diagnostics.HealthChecks.EntityFrameworkCore": "[6.0.25, )",
"Microsoft.Extensions.Options.ConfigurationExtensions": "[6.0.0, )",
"Monai.Deploy.InformaticsGateway.Api": "[0.4.1, )",
"Monai.Deploy.InformaticsGateway.Configuration": "[1.0.0, )",
@@ -1886,8 +1887,8 @@
"monai.deploy.informaticsgateway.database.entityframework": {
"type": "Project",
"dependencies": {
- "Microsoft.EntityFrameworkCore": "[6.0.22, )",
- "Microsoft.EntityFrameworkCore.Sqlite": "[6.0.22, )",
+ "Microsoft.EntityFrameworkCore": "[6.0.25, )",
+ "Microsoft.EntityFrameworkCore.Sqlite": "[6.0.25, )",
"Microsoft.Extensions.Configuration.FileExtensions": "[6.0.0, )",
"Microsoft.Extensions.Configuration.Json": "[6.0.0, )",
"Monai.Deploy.InformaticsGateway.Api": "[0.4.1, )",
@@ -1916,9 +1917,9 @@
"monai.deploy.informaticsgateway.plugins.remoteappexecution": {
"type": "Project",
"dependencies": {
- "Microsoft.EntityFrameworkCore": "[6.0.22, )",
- "Microsoft.EntityFrameworkCore.Relational": "[6.0.22, )",
- "Microsoft.EntityFrameworkCore.Sqlite": "[6.0.22, )",
+ "Microsoft.EntityFrameworkCore": "[6.0.25, )",
+ "Microsoft.EntityFrameworkCore.Relational": "[6.0.25, )",
+ "Microsoft.EntityFrameworkCore.Sqlite": "[6.0.25, )",
"Microsoft.Extensions.Configuration": "[6.0.1, )",
"Microsoft.Extensions.Configuration.FileExtensions": "[6.0.0, )",
"Microsoft.Extensions.Configuration.Json": "[6.0.0, )",
diff --git a/src/Client/packages.lock.json b/src/Client/packages.lock.json
index 8ecf03f09..2a3e704e0 100755
--- a/src/Client/packages.lock.json
+++ b/src/Client/packages.lock.json
@@ -43,6 +43,11 @@
"System.Threading.Channels": "6.0.0"
}
},
+ "HL7-dotnetcore": {
+ "type": "Transitive",
+ "resolved": "2.36.0",
+ "contentHash": "N1HLMeIqYuY+4O69ItgZJoDBnnpNkK5N2pClceTJ2nFJxsP48iCsA4iz3tm43Yszi4r/vaThoc3UoLBfGP3vKw=="
+ },
"Macross.Json.Extensions": {
"type": "Transitive",
"resolved": "3.0.0",
@@ -60,8 +65,8 @@
},
"Microsoft.EntityFrameworkCore.Abstractions": {
"type": "Transitive",
- "resolved": "6.0.22",
- "contentHash": "3ycEYrtWoa4kv5mUECU2LNBbWiYh345b1uQLvg4pHCEICXoJZ8Sfu/2yGloKiMNgMdDc02gFYCRHxsqQNZpnWA=="
+ "resolved": "6.0.25",
+ "contentHash": "DalO25C96LsIfAPlyizyun9y1XrIquRugPEGXC8+z7dFo+GyU0LRd0R11JDd3rJWjR18NOFYwqNenjyDpNRO3A=="
},
"Microsoft.Extensions.Configuration.Abstractions": {
"type": "Transitive",
@@ -155,8 +160,8 @@
},
"Monai.Deploy.Messaging": {
"type": "Transitive",
- "resolved": "1.0.4",
- "contentHash": "K6RrbDh7upokvt+sKuKEhQ+B1Xj46DF4sHxqwE6ymZazwmRULzsD0u/1IeDDJCGuRs3iG64QWwCt32j30PSZLg==",
+ "resolved": "1.0.5",
+ "contentHash": "J8Lskfy8PSVQLDE2uLqh53uaPpqpRJuSGVHpR2jrw+GYnTTDv21j/2gxwG8Hq2NgNOkWLNVi+fFnyWd6WFiUTA==",
"dependencies": {
"Ardalis.GuardClauses": "4.1.1",
"Microsoft.Extensions.Diagnostics.HealthChecks": "6.0.21",
@@ -166,10 +171,10 @@
},
"Monai.Deploy.Messaging.RabbitMQ": {
"type": "Transitive",
- "resolved": "1.0.4",
- "contentHash": "2llZ4XbE91Km2Q+JEKSSeTyhZLWRq3lN5xQ6+Klqow3V8SXBAlOQQ+b5//BEm6x0QdoycFberMOVAsZYYM0j7g==",
+ "resolved": "1.0.5",
+ "contentHash": "L+BWU5Xq1ARjFRcpnefDJGuG52Zw4Iz3qql1tn8lYfqoC4B37fAUVz6k7Ar7v1OUwPo/JR8q4OP2IIMpqpKRRA==",
"dependencies": {
- "Monai.Deploy.Messaging": "1.0.4",
+ "Monai.Deploy.Messaging": "1.0.5",
"Polly": "7.2.4",
"RabbitMQ.Client": "6.5.0"
}
@@ -274,11 +279,12 @@
"monai.deploy.informaticsgateway.api": {
"type": "Project",
"dependencies": {
+ "HL7-dotnetcore": "[2.36.0, )",
"Macross.Json.Extensions": "[3.0.0, )",
- "Microsoft.EntityFrameworkCore.Abstractions": "[6.0.22, )",
+ "Microsoft.EntityFrameworkCore.Abstractions": "[6.0.25, )",
"Monai.Deploy.InformaticsGateway.Common": "[1.0.0, )",
- "Monai.Deploy.Messaging": "[1.0.4, )",
- "Monai.Deploy.Messaging.RabbitMQ": "[1.0.4, )",
+ "Monai.Deploy.Messaging": "[1.0.5, )",
+ "Monai.Deploy.Messaging.RabbitMQ": "[1.0.5, )",
"Monai.Deploy.Storage": "[0.2.18, )",
"fo-dicom": "[5.1.1, )"
}
diff --git a/src/Configuration/MessageBrokerConfigurationKeys.cs b/src/Configuration/MessageBrokerConfigurationKeys.cs
index 846a24c5f..54c4da5a3 100755
--- a/src/Configuration/MessageBrokerConfigurationKeys.cs
+++ b/src/Configuration/MessageBrokerConfigurationKeys.cs
@@ -47,5 +47,27 @@ public class MessageBrokerConfigurationKeys
///
[ConfigurationKeyName("artifactrecieved")]
public string ArtifactRecieved { get; set; } = "md.workflow.artifactrecieved";
+
+
+ ///
+ /// Gets or sets the topic for publishing export requests.
+ /// Defaults to `md_export_request`.
+ ///
+ [ConfigurationKeyName("externalAppRequest")]
+ public string ExternalAppRequest { get; set; } = "md.externalapp.request";
+
+ ///
+ /// Gets or sets the topic for publishing workflow requests.
+ /// Defaults to `md.export.request`.
+ ///
+ [ConfigurationKeyName("exportHl7")]
+ public string ExportHL7 { get; set; } = "md.export.hl7";
+
+ ///
+ /// Gets or sets the topic for publishing export complete requests.
+ /// Defaults to `md_export_complete`.
+ ///
+ [ConfigurationKeyName("exportHl7Complete")]
+ public string ExportHl7Complete { get; set; } = "md.export.hl7complete";
}
}
diff --git a/src/Configuration/ScpConfiguration.cs b/src/Configuration/ScpConfiguration.cs
old mode 100644
new mode 100755
index 6b66626ee..bac9a2952
--- a/src/Configuration/ScpConfiguration.cs
+++ b/src/Configuration/ScpConfiguration.cs
@@ -34,6 +34,12 @@ public class ScpConfiguration
[ConfigurationKeyName("port")]
public int Port { get; set; } = 104;
+ ///
+ /// Gets or sets Port number to be used for SCP service.
+ ///
+ [ConfigurationKeyName("externalAppPort")]
+ public int ExternalAppPort { get; set; } = 105;
+
///
/// Gets or sets maximum number of simultaneous DICOM associations for the SCP service.
///
diff --git a/src/Configuration/Test/ValidationExtensionsTest.cs b/src/Configuration/Test/ValidationExtensionsTest.cs
old mode 100644
new mode 100755
index 986922e4a..9e00e5dbb
--- a/src/Configuration/Test/ValidationExtensionsTest.cs
+++ b/src/Configuration/Test/ValidationExtensionsTest.cs
@@ -18,6 +18,7 @@
using System.Collections.Generic;
using FellowOakDicom;
using Monai.Deploy.InformaticsGateway.Api;
+using Monai.Deploy.InformaticsGateway.Api.Models;
using Xunit;
namespace Monai.Deploy.InformaticsGateway.Configuration.Test
diff --git a/src/Configuration/Test/packages.lock.json b/src/Configuration/Test/packages.lock.json
index d87a39e6c..02e67b1eb 100755
--- a/src/Configuration/Test/packages.lock.json
+++ b/src/Configuration/Test/packages.lock.json
@@ -102,6 +102,11 @@
"System.Threading.Channels": "6.0.0"
}
},
+ "HL7-dotnetcore": {
+ "type": "Transitive",
+ "resolved": "2.36.0",
+ "contentHash": "N1HLMeIqYuY+4O69ItgZJoDBnnpNkK5N2pClceTJ2nFJxsP48iCsA4iz3tm43Yszi4r/vaThoc3UoLBfGP3vKw=="
+ },
"Macross.Json.Extensions": {
"type": "Transitive",
"resolved": "3.0.0",
@@ -124,8 +129,8 @@
},
"Microsoft.EntityFrameworkCore.Abstractions": {
"type": "Transitive",
- "resolved": "6.0.22",
- "contentHash": "3ycEYrtWoa4kv5mUECU2LNBbWiYh345b1uQLvg4pHCEICXoJZ8Sfu/2yGloKiMNgMdDc02gFYCRHxsqQNZpnWA=="
+ "resolved": "6.0.25",
+ "contentHash": "DalO25C96LsIfAPlyizyun9y1XrIquRugPEGXC8+z7dFo+GyU0LRd0R11JDd3rJWjR18NOFYwqNenjyDpNRO3A=="
},
"Microsoft.Extensions.Configuration.Abstractions": {
"type": "Transitive",
@@ -257,8 +262,8 @@
},
"Monai.Deploy.Messaging": {
"type": "Transitive",
- "resolved": "1.0.4",
- "contentHash": "K6RrbDh7upokvt+sKuKEhQ+B1Xj46DF4sHxqwE6ymZazwmRULzsD0u/1IeDDJCGuRs3iG64QWwCt32j30PSZLg==",
+ "resolved": "1.0.5",
+ "contentHash": "J8Lskfy8PSVQLDE2uLqh53uaPpqpRJuSGVHpR2jrw+GYnTTDv21j/2gxwG8Hq2NgNOkWLNVi+fFnyWd6WFiUTA==",
"dependencies": {
"Ardalis.GuardClauses": "4.1.1",
"Microsoft.Extensions.Diagnostics.HealthChecks": "6.0.21",
@@ -268,10 +273,10 @@
},
"Monai.Deploy.Messaging.RabbitMQ": {
"type": "Transitive",
- "resolved": "1.0.4",
- "contentHash": "2llZ4XbE91Km2Q+JEKSSeTyhZLWRq3lN5xQ6+Klqow3V8SXBAlOQQ+b5//BEm6x0QdoycFberMOVAsZYYM0j7g==",
+ "resolved": "1.0.5",
+ "contentHash": "L+BWU5Xq1ARjFRcpnefDJGuG52Zw4Iz3qql1tn8lYfqoC4B37fAUVz6k7Ar7v1OUwPo/JR8q4OP2IIMpqpKRRA==",
"dependencies": {
- "Monai.Deploy.Messaging": "1.0.4",
+ "Monai.Deploy.Messaging": "1.0.5",
"Polly": "7.2.4",
"RabbitMQ.Client": "6.5.0"
}
@@ -1290,11 +1295,12 @@
"monai.deploy.informaticsgateway.api": {
"type": "Project",
"dependencies": {
+ "HL7-dotnetcore": "[2.36.0, )",
"Macross.Json.Extensions": "[3.0.0, )",
- "Microsoft.EntityFrameworkCore.Abstractions": "[6.0.22, )",
+ "Microsoft.EntityFrameworkCore.Abstractions": "[6.0.25, )",
"Monai.Deploy.InformaticsGateway.Common": "[1.0.0, )",
- "Monai.Deploy.Messaging": "[1.0.4, )",
- "Monai.Deploy.Messaging.RabbitMQ": "[1.0.4, )",
+ "Monai.Deploy.Messaging": "[1.0.5, )",
+ "Monai.Deploy.Messaging.RabbitMQ": "[1.0.5, )",
"Monai.Deploy.Storage": "[0.2.18, )",
"fo-dicom": "[5.1.1, )"
}
diff --git a/src/Configuration/ValidationExtensions.cs b/src/Configuration/ValidationExtensions.cs
index da29ce249..09e7bc932 100755
--- a/src/Configuration/ValidationExtensions.cs
+++ b/src/Configuration/ValidationExtensions.cs
@@ -22,6 +22,7 @@
using Ardalis.GuardClauses;
using FellowOakDicom;
using Monai.Deploy.InformaticsGateway.Api;
+using Monai.Deploy.InformaticsGateway.Api.Models;
namespace Monai.Deploy.InformaticsGateway.Configuration
{
@@ -57,6 +58,21 @@ public static bool IsValid(this DestinationApplicationEntity destinationApplicat
return valid;
}
+ public static bool IsValid(this HL7DestinationEntity hl7destinationEntity, out IList validationErrors)
+ {
+ Guard.Against.Null(hl7destinationEntity, nameof(hl7destinationEntity));
+
+ validationErrors = new List();
+
+ var valid = true;
+ valid &= !string.IsNullOrWhiteSpace(hl7destinationEntity.Name);
+ valid &= IsAeTitleValid(hl7destinationEntity.GetType().Name, hl7destinationEntity.AeTitle, validationErrors);
+ valid &= IsValidHostNameIp(hl7destinationEntity.AeTitle, hl7destinationEntity.HostIp, validationErrors);
+ valid &= IsPortValid(hl7destinationEntity.GetType().Name, hl7destinationEntity.Port, validationErrors);
+
+ return valid;
+ }
+
public static bool IsValid(this SourceApplicationEntity sourceApplicationEntity, out IList validationErrors)
{
Guard.Against.Null(sourceApplicationEntity, nameof(sourceApplicationEntity));
diff --git a/src/Configuration/packages.lock.json b/src/Configuration/packages.lock.json
index a05767d6a..2b5691080 100755
--- a/src/Configuration/packages.lock.json
+++ b/src/Configuration/packages.lock.json
@@ -43,6 +43,11 @@
"System.Threading.Channels": "6.0.0"
}
},
+ "HL7-dotnetcore": {
+ "type": "Transitive",
+ "resolved": "2.36.0",
+ "contentHash": "N1HLMeIqYuY+4O69ItgZJoDBnnpNkK5N2pClceTJ2nFJxsP48iCsA4iz3tm43Yszi4r/vaThoc3UoLBfGP3vKw=="
+ },
"Macross.Json.Extensions": {
"type": "Transitive",
"resolved": "3.0.0",
@@ -60,8 +65,8 @@
},
"Microsoft.EntityFrameworkCore.Abstractions": {
"type": "Transitive",
- "resolved": "6.0.22",
- "contentHash": "3ycEYrtWoa4kv5mUECU2LNBbWiYh345b1uQLvg4pHCEICXoJZ8Sfu/2yGloKiMNgMdDc02gFYCRHxsqQNZpnWA=="
+ "resolved": "6.0.25",
+ "contentHash": "DalO25C96LsIfAPlyizyun9y1XrIquRugPEGXC8+z7dFo+GyU0LRd0R11JDd3rJWjR18NOFYwqNenjyDpNRO3A=="
},
"Microsoft.Extensions.Configuration.Abstractions": {
"type": "Transitive",
@@ -155,8 +160,8 @@
},
"Monai.Deploy.Messaging": {
"type": "Transitive",
- "resolved": "1.0.4",
- "contentHash": "K6RrbDh7upokvt+sKuKEhQ+B1Xj46DF4sHxqwE6ymZazwmRULzsD0u/1IeDDJCGuRs3iG64QWwCt32j30PSZLg==",
+ "resolved": "1.0.5",
+ "contentHash": "J8Lskfy8PSVQLDE2uLqh53uaPpqpRJuSGVHpR2jrw+GYnTTDv21j/2gxwG8Hq2NgNOkWLNVi+fFnyWd6WFiUTA==",
"dependencies": {
"Ardalis.GuardClauses": "4.1.1",
"Microsoft.Extensions.Diagnostics.HealthChecks": "6.0.21",
@@ -166,10 +171,10 @@
},
"Monai.Deploy.Messaging.RabbitMQ": {
"type": "Transitive",
- "resolved": "1.0.4",
- "contentHash": "2llZ4XbE91Km2Q+JEKSSeTyhZLWRq3lN5xQ6+Klqow3V8SXBAlOQQ+b5//BEm6x0QdoycFberMOVAsZYYM0j7g==",
+ "resolved": "1.0.5",
+ "contentHash": "L+BWU5Xq1ARjFRcpnefDJGuG52Zw4Iz3qql1tn8lYfqoC4B37fAUVz6k7Ar7v1OUwPo/JR8q4OP2IIMpqpKRRA==",
"dependencies": {
- "Monai.Deploy.Messaging": "1.0.4",
+ "Monai.Deploy.Messaging": "1.0.5",
"Polly": "7.2.4",
"RabbitMQ.Client": "6.5.0"
}
@@ -274,11 +279,12 @@
"monai.deploy.informaticsgateway.api": {
"type": "Project",
"dependencies": {
+ "HL7-dotnetcore": "[2.36.0, )",
"Macross.Json.Extensions": "[3.0.0, )",
- "Microsoft.EntityFrameworkCore.Abstractions": "[6.0.22, )",
+ "Microsoft.EntityFrameworkCore.Abstractions": "[6.0.25, )",
"Monai.Deploy.InformaticsGateway.Common": "[1.0.0, )",
- "Monai.Deploy.Messaging": "[1.0.4, )",
- "Monai.Deploy.Messaging.RabbitMQ": "[1.0.4, )",
+ "Monai.Deploy.Messaging": "[1.0.5, )",
+ "Monai.Deploy.Messaging.RabbitMQ": "[1.0.5, )",
"Monai.Deploy.Storage": "[0.2.18, )",
"fo-dicom": "[5.1.1, )"
}
diff --git a/src/Database/Api/Repositories/IDestinationApplicationEntityRepository.cs b/src/Database/Api/Repositories/IDestinationApplicationEntityRepository.cs
old mode 100644
new mode 100755
index ffc58fa17..dd84793fa
--- a/src/Database/Api/Repositories/IDestinationApplicationEntityRepository.cs
+++ b/src/Database/Api/Repositories/IDestinationApplicationEntityRepository.cs
@@ -15,7 +15,7 @@
*/
using System.Linq.Expressions;
-using Monai.Deploy.InformaticsGateway.Api;
+using Monai.Deploy.InformaticsGateway.Api.Models;
namespace Monai.Deploy.InformaticsGateway.Database.Api.Repositories
{
diff --git a/src/Database/Api/Repositories/IDicomAssociationInfoRepository.cs b/src/Database/Api/Repositories/IDicomAssociationInfoRepository.cs
old mode 100644
new mode 100755
index 2457dcb7e..796ff43bc
--- a/src/Database/Api/Repositories/IDicomAssociationInfoRepository.cs
+++ b/src/Database/Api/Repositories/IDicomAssociationInfoRepository.cs
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-using Monai.Deploy.InformaticsGateway.Api;
+using Monai.Deploy.InformaticsGateway.Api.Models;
namespace Monai.Deploy.InformaticsGateway.Database.Api.Repositories
{
diff --git a/src/Database/Api/Repositories/IExternalAppDeatilsRepository.cs b/src/Database/Api/Repositories/IExternalAppDeatilsRepository.cs
new file mode 100755
index 000000000..51668aefd
--- /dev/null
+++ b/src/Database/Api/Repositories/IExternalAppDeatilsRepository.cs
@@ -0,0 +1,31 @@
+/*
+ * Copyright 2022 MONAI Consortium
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using Monai.Deploy.InformaticsGateway.Api.Models;
+
+namespace Monai.Deploy.InformaticsGateway.Database.Api.Repositories
+{
+ public interface IExternalAppDetailsRepository
+ {
+ Task AddAsync(ExternalAppDetails details, CancellationToken cancellationToken);
+
+ Task> GetAsync(string studyInstanceId, CancellationToken cancellationToken);
+
+ Task GetByPatientIdOutboundAsync(string patientId, CancellationToken cancellationToken);
+
+ Task GetByStudyIdOutboundAsync(string studyInstanceId, CancellationToken cancellationToken);
+ }
+}
diff --git a/src/Database/Api/Repositories/IHL7DestinationEntityRepository.cs b/src/Database/Api/Repositories/IHL7DestinationEntityRepository.cs
new file mode 100644
index 000000000..c46dc3503
--- /dev/null
+++ b/src/Database/Api/Repositories/IHL7DestinationEntityRepository.cs
@@ -0,0 +1,36 @@
+/*
+ * Copyright 2022 MONAI Consortium
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using System.Linq.Expressions;
+using Monai.Deploy.InformaticsGateway.Api.Models;
+
+namespace Monai.Deploy.InformaticsGateway.Database.Api.Repositories
+{
+ public interface IHL7DestinationEntityRepository
+ {
+ Task> ToListAsync(CancellationToken cancellationToken = default);
+
+ Task FindByNameAsync(string name, CancellationToken cancellationToken = default);
+
+ Task AddAsync(HL7DestinationEntity item, CancellationToken cancellationToken = default);
+
+ Task UpdateAsync(HL7DestinationEntity entity, CancellationToken cancellationToken = default);
+
+ Task RemoveAsync(HL7DestinationEntity entity, CancellationToken cancellationToken = default);
+
+ Task ContainsAsync(Expression> predicate, CancellationToken cancellationToken = default);
+ }
+}
diff --git a/src/Database/Api/Repositories/IHl7ApplicationConfigRepository.cs b/src/Database/Api/Repositories/IHl7ApplicationConfigRepository.cs
new file mode 100644
index 000000000..b381d4da6
--- /dev/null
+++ b/src/Database/Api/Repositories/IHl7ApplicationConfigRepository.cs
@@ -0,0 +1,35 @@
+/*
+ * Copyright 2023 MONAI Consortium
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using Monai.Deploy.InformaticsGateway.Api;
+
+namespace Monai.Deploy.InformaticsGateway.Database.Api.Repositories
+{
+ public interface IHl7ApplicationConfigRepository
+ {
+ Task> GetAllAsync(CancellationToken cancellationToken = default);
+
+ Task GetByIdAsync(string id);
+
+ Task DeleteAsync(string id, CancellationToken cancellationToken = default);
+
+ Task CreateAsync(Hl7ApplicationConfigEntity configEntity,
+ CancellationToken cancellationToken = default);
+
+ Task UpdateAsync(Hl7ApplicationConfigEntity configEntity,
+ CancellationToken cancellationToken = default);
+ }
+}
diff --git a/src/Database/Api/Repositories/IMonaiApplicationEntityRepository.cs b/src/Database/Api/Repositories/IMonaiApplicationEntityRepository.cs
old mode 100644
new mode 100755
index 1b803385e..ccfbd6567
--- a/src/Database/Api/Repositories/IMonaiApplicationEntityRepository.cs
+++ b/src/Database/Api/Repositories/IMonaiApplicationEntityRepository.cs
@@ -15,7 +15,7 @@
*/
using System.Linq.Expressions;
-using Monai.Deploy.InformaticsGateway.Api;
+using Monai.Deploy.InformaticsGateway.Api.Models;
namespace Monai.Deploy.InformaticsGateway.Database.Api.Repositories
{
diff --git a/src/Database/Api/Repositories/InferenceRequestRepositoryBase.cs b/src/Database/Api/Repositories/InferenceRequestRepositoryBase.cs
index 157f703b8..8775eb688 100755
--- a/src/Database/Api/Repositories/InferenceRequestRepositoryBase.cs
+++ b/src/Database/Api/Repositories/InferenceRequestRepositoryBase.cs
@@ -17,7 +17,6 @@
using Ardalis.GuardClauses;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
-using Monai.Deploy.InformaticsGateway.Api;
using Monai.Deploy.InformaticsGateway.Api.Rest;
using Monai.Deploy.InformaticsGateway.Configuration;
using Monai.Deploy.InformaticsGateway.Database.Api.Logging;
@@ -63,7 +62,7 @@ public async Task UpdateAsync(InferenceRequest inferenceRequest, InferenceReques
{
Guard.Against.Null(inferenceRequest, nameof(inferenceRequest));
- using var loggerScope = _logger.BeginScope(new LoggingDataDictionary { { "TransactionId", inferenceRequest.TransactionId } });
+ using var loggerScope = _logger.BeginScope(new InformaticsGateway.Api.LoggingDataDictionary { { "TransactionId", inferenceRequest.TransactionId } });
if (status == InferenceRequestStatus.Success)
{
diff --git a/src/Database/Api/StorageMetadataWrapper.cs b/src/Database/Api/StorageMetadataWrapper.cs
index 326cce2cf..dac5fb729 100755
--- a/src/Database/Api/StorageMetadataWrapper.cs
+++ b/src/Database/Api/StorageMetadataWrapper.cs
@@ -17,7 +17,6 @@
using System.Text.Json;
using System.Text.Json.Serialization;
using Ardalis.GuardClauses;
-using Monai.Deploy.InformaticsGateway.Api;
using Monai.Deploy.InformaticsGateway.Api.Storage;
namespace Monai.Deploy.InformaticsGateway.Database.Api
diff --git a/src/Database/Api/Test/packages.lock.json b/src/Database/Api/Test/packages.lock.json
index dd4d34036..65aff269f 100755
--- a/src/Database/Api/Test/packages.lock.json
+++ b/src/Database/Api/Test/packages.lock.json
@@ -76,6 +76,11 @@
"System.Threading.Channels": "6.0.0"
}
},
+ "HL7-dotnetcore": {
+ "type": "Transitive",
+ "resolved": "2.36.0",
+ "contentHash": "N1HLMeIqYuY+4O69ItgZJoDBnnpNkK5N2pClceTJ2nFJxsP48iCsA4iz3tm43Yszi4r/vaThoc3UoLBfGP3vKw=="
+ },
"Macross.Json.Extensions": {
"type": "Transitive",
"resolved": "3.0.0",
@@ -98,8 +103,8 @@
},
"Microsoft.EntityFrameworkCore.Abstractions": {
"type": "Transitive",
- "resolved": "6.0.22",
- "contentHash": "3ycEYrtWoa4kv5mUECU2LNBbWiYh345b1uQLvg4pHCEICXoJZ8Sfu/2yGloKiMNgMdDc02gFYCRHxsqQNZpnWA=="
+ "resolved": "6.0.25",
+ "contentHash": "DalO25C96LsIfAPlyizyun9y1XrIquRugPEGXC8+z7dFo+GyU0LRd0R11JDd3rJWjR18NOFYwqNenjyDpNRO3A=="
},
"Microsoft.Extensions.Configuration.Abstractions": {
"type": "Transitive",
@@ -231,8 +236,8 @@
},
"Monai.Deploy.Messaging": {
"type": "Transitive",
- "resolved": "1.0.4",
- "contentHash": "K6RrbDh7upokvt+sKuKEhQ+B1Xj46DF4sHxqwE6ymZazwmRULzsD0u/1IeDDJCGuRs3iG64QWwCt32j30PSZLg==",
+ "resolved": "1.0.5",
+ "contentHash": "J8Lskfy8PSVQLDE2uLqh53uaPpqpRJuSGVHpR2jrw+GYnTTDv21j/2gxwG8Hq2NgNOkWLNVi+fFnyWd6WFiUTA==",
"dependencies": {
"Ardalis.GuardClauses": "4.1.1",
"Microsoft.Extensions.Diagnostics.HealthChecks": "6.0.21",
@@ -242,10 +247,10 @@
},
"Monai.Deploy.Messaging.RabbitMQ": {
"type": "Transitive",
- "resolved": "1.0.4",
- "contentHash": "2llZ4XbE91Km2Q+JEKSSeTyhZLWRq3lN5xQ6+Klqow3V8SXBAlOQQ+b5//BEm6x0QdoycFberMOVAsZYYM0j7g==",
+ "resolved": "1.0.5",
+ "contentHash": "L+BWU5Xq1ARjFRcpnefDJGuG52Zw4Iz3qql1tn8lYfqoC4B37fAUVz6k7Ar7v1OUwPo/JR8q4OP2IIMpqpKRRA==",
"dependencies": {
- "Monai.Deploy.Messaging": "1.0.4",
+ "Monai.Deploy.Messaging": "1.0.5",
"Polly": "7.2.4",
"RabbitMQ.Client": "6.5.0"
}
@@ -1264,11 +1269,12 @@
"monai.deploy.informaticsgateway.api": {
"type": "Project",
"dependencies": {
+ "HL7-dotnetcore": "[2.36.0, )",
"Macross.Json.Extensions": "[3.0.0, )",
- "Microsoft.EntityFrameworkCore.Abstractions": "[6.0.22, )",
+ "Microsoft.EntityFrameworkCore.Abstractions": "[6.0.25, )",
"Monai.Deploy.InformaticsGateway.Common": "[1.0.0, )",
- "Monai.Deploy.Messaging": "[1.0.4, )",
- "Monai.Deploy.Messaging.RabbitMQ": "[1.0.4, )",
+ "Monai.Deploy.Messaging": "[1.0.5, )",
+ "Monai.Deploy.Messaging.RabbitMQ": "[1.0.5, )",
"Monai.Deploy.Storage": "[0.2.18, )",
"fo-dicom": "[5.1.1, )"
}
diff --git a/src/Database/Api/packages.lock.json b/src/Database/Api/packages.lock.json
index 9e1f1f4de..53e07aa40 100755
--- a/src/Database/Api/packages.lock.json
+++ b/src/Database/Api/packages.lock.json
@@ -49,6 +49,11 @@
"System.Threading.Channels": "6.0.0"
}
},
+ "HL7-dotnetcore": {
+ "type": "Transitive",
+ "resolved": "2.36.0",
+ "contentHash": "N1HLMeIqYuY+4O69ItgZJoDBnnpNkK5N2pClceTJ2nFJxsP48iCsA4iz3tm43Yszi4r/vaThoc3UoLBfGP3vKw=="
+ },
"Macross.Json.Extensions": {
"type": "Transitive",
"resolved": "3.0.0",
@@ -66,8 +71,8 @@
},
"Microsoft.EntityFrameworkCore.Abstractions": {
"type": "Transitive",
- "resolved": "6.0.22",
- "contentHash": "3ycEYrtWoa4kv5mUECU2LNBbWiYh345b1uQLvg4pHCEICXoJZ8Sfu/2yGloKiMNgMdDc02gFYCRHxsqQNZpnWA=="
+ "resolved": "6.0.25",
+ "contentHash": "DalO25C96LsIfAPlyizyun9y1XrIquRugPEGXC8+z7dFo+GyU0LRd0R11JDd3rJWjR18NOFYwqNenjyDpNRO3A=="
},
"Microsoft.Extensions.Configuration.Abstractions": {
"type": "Transitive",
@@ -161,8 +166,8 @@
},
"Monai.Deploy.Messaging": {
"type": "Transitive",
- "resolved": "1.0.4",
- "contentHash": "K6RrbDh7upokvt+sKuKEhQ+B1Xj46DF4sHxqwE6ymZazwmRULzsD0u/1IeDDJCGuRs3iG64QWwCt32j30PSZLg==",
+ "resolved": "1.0.5",
+ "contentHash": "J8Lskfy8PSVQLDE2uLqh53uaPpqpRJuSGVHpR2jrw+GYnTTDv21j/2gxwG8Hq2NgNOkWLNVi+fFnyWd6WFiUTA==",
"dependencies": {
"Ardalis.GuardClauses": "4.1.1",
"Microsoft.Extensions.Diagnostics.HealthChecks": "6.0.21",
@@ -172,10 +177,10 @@
},
"Monai.Deploy.Messaging.RabbitMQ": {
"type": "Transitive",
- "resolved": "1.0.4",
- "contentHash": "2llZ4XbE91Km2Q+JEKSSeTyhZLWRq3lN5xQ6+Klqow3V8SXBAlOQQ+b5//BEm6x0QdoycFberMOVAsZYYM0j7g==",
+ "resolved": "1.0.5",
+ "contentHash": "L+BWU5Xq1ARjFRcpnefDJGuG52Zw4Iz3qql1tn8lYfqoC4B37fAUVz6k7Ar7v1OUwPo/JR8q4OP2IIMpqpKRRA==",
"dependencies": {
- "Monai.Deploy.Messaging": "1.0.4",
+ "Monai.Deploy.Messaging": "1.0.5",
"Polly": "7.2.4",
"RabbitMQ.Client": "6.5.0"
}
@@ -280,11 +285,12 @@
"monai.deploy.informaticsgateway.api": {
"type": "Project",
"dependencies": {
+ "HL7-dotnetcore": "[2.36.0, )",
"Macross.Json.Extensions": "[3.0.0, )",
- "Microsoft.EntityFrameworkCore.Abstractions": "[6.0.22, )",
+ "Microsoft.EntityFrameworkCore.Abstractions": "[6.0.25, )",
"Monai.Deploy.InformaticsGateway.Common": "[1.0.0, )",
- "Monai.Deploy.Messaging": "[1.0.4, )",
- "Monai.Deploy.Messaging.RabbitMQ": "[1.0.4, )",
+ "Monai.Deploy.Messaging": "[1.0.5, )",
+ "Monai.Deploy.Messaging.RabbitMQ": "[1.0.5, )",
"Monai.Deploy.Storage": "[0.2.18, )",
"fo-dicom": "[5.1.1, )"
}
diff --git a/src/Database/DatabaseManager.cs b/src/Database/DatabaseManager.cs
index 2efe60d8d..cb40c9a0d 100755
--- a/src/Database/DatabaseManager.cs
+++ b/src/Database/DatabaseManager.cs
@@ -84,6 +84,7 @@ public static IServiceCollection ConfigureDatabase(this IServiceCollection servi
ServiceLifetime.Transient);
services.AddScoped();
services.AddScoped(typeof(IDestinationApplicationEntityRepository), typeof(EntityFramework.Repositories.DestinationApplicationEntityRepository));
+ services.AddScoped(typeof(IHL7DestinationEntityRepository), typeof(EntityFramework.Repositories.HL7DestinationEntityRepository));
services.AddScoped(typeof(IInferenceRequestRepository), typeof(EntityFramework.Repositories.InferenceRequestRepository));
services.AddScoped(typeof(IMonaiApplicationEntityRepository), typeof(EntityFramework.Repositories.MonaiApplicationEntityRepository));
services.AddScoped(typeof(ISourceApplicationEntityRepository), typeof(EntityFramework.Repositories.SourceApplicationEntityRepository));
@@ -91,6 +92,8 @@ public static IServiceCollection ConfigureDatabase(this IServiceCollection servi
services.AddScoped(typeof(IPayloadRepository), typeof(EntityFramework.Repositories.PayloadRepository));
services.AddScoped(typeof(IDicomAssociationInfoRepository), typeof(EntityFramework.Repositories.DicomAssociationInfoRepository));
services.AddScoped(typeof(IVirtualApplicationEntityRepository), typeof(EntityFramework.Repositories.VirtualApplicationEntityRepository));
+ services.AddScoped(typeof(IHl7ApplicationConfigRepository), typeof(EntityFramework.Repositories.Hl7ApplicationConfigRepository));
+ services.AddSingleton(typeof(IExternalAppDetailsRepository), typeof(EntityFramework.Repositories.ExternalAppDetailsRepository));
services.ConfigureDatabaseFromPlugIns(DatabaseType.EntityFramework, fileSystem, connectionStringConfigurationSection, pluginsConfigurationSection, loggerFactory);
return services;
@@ -99,6 +102,7 @@ public static IServiceCollection ConfigureDatabase(this IServiceCollection servi
services.AddSingleton(s => new MongoClient(connectionStringConfigurationSection[SR.DatabaseConnectionStringKey]));
services.AddScoped();
services.AddScoped(typeof(IDestinationApplicationEntityRepository), typeof(MongoDB.Repositories.DestinationApplicationEntityRepository));
+ services.AddScoped(typeof(IHL7DestinationEntityRepository), typeof(MongoDB.Repositories.HL7DestinationEntityRepository));
services.AddScoped(typeof(IInferenceRequestRepository), typeof(MongoDB.Repositories.InferenceRequestRepository));
services.AddScoped(typeof(IMonaiApplicationEntityRepository), typeof(MongoDB.Repositories.MonaiApplicationEntityRepository));
services.AddScoped(typeof(ISourceApplicationEntityRepository), typeof(MongoDB.Repositories.SourceApplicationEntityRepository));
@@ -106,6 +110,8 @@ public static IServiceCollection ConfigureDatabase(this IServiceCollection servi
services.AddScoped(typeof(IPayloadRepository), typeof(MongoDB.Repositories.PayloadRepository));
services.AddScoped(typeof(IDicomAssociationInfoRepository), typeof(MongoDB.Repositories.DicomAssociationInfoRepository));
services.AddScoped(typeof(IVirtualApplicationEntityRepository), typeof(MongoDB.Repositories.VirtualApplicationEntityRepository));
+ services.AddScoped(typeof(IHl7ApplicationConfigRepository), typeof(MongoDB.Repositories.Hl7ApplicationConfigRepository));
+ services.AddSingleton(typeof(IExternalAppDetailsRepository), typeof(MongoDB.Repositories.ExternalAppDetailsRepository));
services.ConfigureDatabaseFromPlugIns(DatabaseType.MongoDb, fileSystem, connectionStringConfigurationSection, pluginsConfigurationSection, loggerFactory);
diff --git a/src/Database/DatabaseMigrationManager.cs b/src/Database/DatabaseMigrationManager.cs
old mode 100644
new mode 100755
index da35c17a4..72acb2cd8
--- a/src/Database/DatabaseMigrationManager.cs
+++ b/src/Database/DatabaseMigrationManager.cs
@@ -61,7 +61,7 @@ private static Type[] FindMatchingTypesFromAssemblies(Assembly[] assemblies)
var matchingTypes = new List();
foreach (var assembly in assemblies)
{
- var types = assembly.ExportedTypes.Where(p => p.IsAssignableFrom(typeof(IDatabaseMigrationManager)));
+ var types = assembly.ExportedTypes.Where(p => p.IsAssignableFrom(typeof(IDatabaseMigrationManager)) && p.Name != nameof(IDatabaseMigrationManager));
if (types.Any())
{
matchingTypes.AddRange(types);
diff --git a/src/Database/EntityFramework/Configuration/DestinationApplicationEntityConfiguration.cs b/src/Database/EntityFramework/Configuration/DestinationApplicationEntityConfiguration.cs
old mode 100644
new mode 100755
index ad0688719..33d7ff2f5
--- a/src/Database/EntityFramework/Configuration/DestinationApplicationEntityConfiguration.cs
+++ b/src/Database/EntityFramework/Configuration/DestinationApplicationEntityConfiguration.cs
@@ -17,7 +17,7 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
-using Monai.Deploy.InformaticsGateway.Api;
+using Monai.Deploy.InformaticsGateway.Api.Models;
namespace Monai.Deploy.InformaticsGateway.Database.EntityFramework.Configuration
{
diff --git a/src/Database/EntityFramework/Configuration/DicomAssociationInfoConfiguration.cs b/src/Database/EntityFramework/Configuration/DicomAssociationInfoConfiguration.cs
index 67bda9b8d..d8b2c45f5 100755
--- a/src/Database/EntityFramework/Configuration/DicomAssociationInfoConfiguration.cs
+++ b/src/Database/EntityFramework/Configuration/DicomAssociationInfoConfiguration.cs
@@ -20,7 +20,7 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.ChangeTracking;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
-using Monai.Deploy.InformaticsGateway.Api;
+using Monai.Deploy.InformaticsGateway.Api.Models;
namespace Monai.Deploy.InformaticsGateway.Database.EntityFramework.Configuration
{
diff --git a/src/Database/EntityFramework/Configuration/ExternalAppDetailsConfiguration.cs b/src/Database/EntityFramework/Configuration/ExternalAppDetailsConfiguration.cs
new file mode 100755
index 000000000..cfdcf8d9d
--- /dev/null
+++ b/src/Database/EntityFramework/Configuration/ExternalAppDetailsConfiguration.cs
@@ -0,0 +1,44 @@
+/*
+ * Copyright 2023 MONAI Consortium
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+using System.Text.Json.Serialization;
+using System.Text.Json;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Metadata.Builders;
+using Monai.Deploy.InformaticsGateway.Api.Models;
+
+namespace Monai.Deploy.InformaticsGateway.Database.EntityFramework.Configuration
+{
+ internal class ExternalAppDetailsConfiguration : IEntityTypeConfiguration
+ {
+ public void Configure(EntityTypeBuilder builder)
+ {
+ var jsonSerializerSettings = new JsonSerializerOptions
+ {
+ DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull
+ };
+
+ builder.HasKey(j => j.Id);
+
+ builder.Property(j => j.StudyInstanceUid).IsRequired();
+ builder.Property(j => j.WorkflowInstanceId).IsRequired();
+ builder.Property(j => j.DateTimeCreated).IsRequired();
+ builder.Property(j => j.CorrelationId).IsRequired();
+ builder.Property(j => j.ExportTaskID).IsRequired();
+ }
+ }
+}
diff --git a/src/Database/EntityFramework/Configuration/HL7DestinationEntityConfiguration.cs b/src/Database/EntityFramework/Configuration/HL7DestinationEntityConfiguration.cs
new file mode 100644
index 000000000..703dad6f3
--- /dev/null
+++ b/src/Database/EntityFramework/Configuration/HL7DestinationEntityConfiguration.cs
@@ -0,0 +1,43 @@
+/*
+ * Copyright 2021-2022 MONAI Consortium
+ * Copyright 2021 NVIDIA Corporation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Metadata.Builders;
+using Monai.Deploy.InformaticsGateway.Api.Models;
+
+namespace Monai.Deploy.InformaticsGateway.Database.EntityFramework.Configuration
+{
+ internal class HL7DestinationEntityConfiguration : IEntityTypeConfiguration
+ {
+ public void Configure(EntityTypeBuilder builder)
+ {
+ builder.HasKey(j => j.Name);
+ builder.Property(j => j.AeTitle).IsRequired();
+ builder.Property(j => j.Port).IsRequired();
+ builder.Property(j => j.HostIp).IsRequired();
+ builder.Property(j => j.CreatedBy).IsRequired(false);
+ builder.Property(j => j.UpdatedBy).IsRequired(false);
+ builder.Property(j => j.DateTimeCreated).IsRequired();
+ builder.Property(j => j.DateTimeUpdated).IsRequired(false);
+
+ builder.HasIndex(p => p.Name, "idx_destination_name").IsUnique();
+ builder.HasIndex(p => new { p.Name, p.AeTitle, p.HostIp, p.Port }, "idx_source_all").IsUnique();
+
+ builder.Ignore(p => p.Id);
+ }
+ }
+}
diff --git a/src/Database/EntityFramework/Configuration/Hl7ApplicationConfigConfiguration.cs b/src/Database/EntityFramework/Configuration/Hl7ApplicationConfigConfiguration.cs
new file mode 100755
index 000000000..cfd9a186b
--- /dev/null
+++ b/src/Database/EntityFramework/Configuration/Hl7ApplicationConfigConfiguration.cs
@@ -0,0 +1,86 @@
+/*
+ * Copyright 2023 MONAI Consortium
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using System.Text.Json.Serialization;
+using System.Text.Json;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.ChangeTracking;
+using Microsoft.EntityFrameworkCore.Metadata.Builders;
+using Monai.Deploy.InformaticsGateway.Api;
+
+namespace Monai.Deploy.InformaticsGateway.Database.EntityFramework.Configuration
+{
+ internal class Hl7ApplicationConfigConfiguration : IEntityTypeConfiguration
+ {
+ public void Configure(EntityTypeBuilder builder)
+ {
+ var valueComparer = new ValueComparer>(
+ (c1, c2) => c1!.SequenceEqual(c2!),
+ c => c.Aggregate(0, (a, v) => HashCode.Combine(a, v.GetHashCode())),
+ c => c.ToList());
+
+ var jsonSerializerSettings = new JsonSerializerOptions
+ {
+ DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull
+ };
+
+ builder.HasKey(j => j.Name);
+ builder.Property(j => j.SendingId).HasConversion(
+ v => JsonSerializer.Serialize(v, jsonSerializerSettings),
+ v => JsonSerializer.Deserialize(v, jsonSerializerSettings)!)
+ .IsRequired()
+ .Metadata
+ .SetValueComparer(
+ new ValueComparer(
+ (c1, c2) => c1 == c2,
+ c => c.GetHashCode(),
+ c => c));
+
+ builder.Property(j => j.DataLink).HasConversion(
+ v => JsonSerializer.Serialize(v, jsonSerializerSettings),
+ v => JsonSerializer.Deserialize(v, jsonSerializerSettings)!)
+ .IsRequired()
+ .Metadata
+ .SetValueComparer(
+ new ValueComparer(
+ (c1, c2) => c1 == c2,
+ c => c.GetHashCode(),
+ c => c));
+
+ builder.Property(j => j.DateTimeCreated).IsRequired();
+ builder.Property(j => j.PlugInAssemblies)
+ .HasConversion(
+ v => JsonSerializer.Serialize(v, jsonSerializerSettings),
+ v => JsonSerializer.Deserialize>(v, jsonSerializerSettings)!)
+ .Metadata.SetValueComparer(valueComparer);
+
+ builder.Property(j => j.DataMapping)
+ .HasConversion(
+ v => JsonSerializer.Serialize(v, jsonSerializerSettings),
+ v => JsonSerializer.Deserialize>(v, jsonSerializerSettings)!)
+ .Metadata
+ .SetValueComparer(
+ new ValueComparer>(
+ (c1, c2) => c1!.SequenceEqual(c2!),
+ c => c.Aggregate(0, (a, v) => HashCode.Combine(a, v.GetHashCode())),
+ c => c.ToList()));
+
+ builder.HasIndex(p => p.Name, "idx_hl7_name").IsUnique();
+
+ builder.Ignore(p => p.Id);
+ }
+ }
+}
diff --git a/src/Database/EntityFramework/Configuration/MonaiApplicationEntityConfiguration.cs b/src/Database/EntityFramework/Configuration/MonaiApplicationEntityConfiguration.cs
old mode 100644
new mode 100755
index 3e78d3ad9..fc9f1666c
--- a/src/Database/EntityFramework/Configuration/MonaiApplicationEntityConfiguration.cs
+++ b/src/Database/EntityFramework/Configuration/MonaiApplicationEntityConfiguration.cs
@@ -20,7 +20,7 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.ChangeTracking;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
-using Monai.Deploy.InformaticsGateway.Api;
+using Monai.Deploy.InformaticsGateway.Api.Models;
namespace Monai.Deploy.InformaticsGateway.Database.EntityFramework.Configuration
{
diff --git a/src/Database/EntityFramework/InformaticsGatewayContext.cs b/src/Database/EntityFramework/InformaticsGatewayContext.cs
index 52b410c39..40af12bde 100755
--- a/src/Database/EntityFramework/InformaticsGatewayContext.cs
+++ b/src/Database/EntityFramework/InformaticsGatewayContext.cs
@@ -18,6 +18,7 @@
using Microsoft.EntityFrameworkCore.Diagnostics;
using Microsoft.Extensions.Logging;
using Monai.Deploy.InformaticsGateway.Api;
+using Monai.Deploy.InformaticsGateway.Api.Models;
using Monai.Deploy.InformaticsGateway.Api.Rest;
using Monai.Deploy.InformaticsGateway.Api.Storage;
using Monai.Deploy.InformaticsGateway.Database.Api;
@@ -36,11 +37,15 @@ public InformaticsGatewayContext(DbContextOptions opt
public virtual DbSet MonaiApplicationEntities { get; set; }
public virtual DbSet SourceApplicationEntities { get; set; }
public virtual DbSet DestinationApplicationEntities { get; set; }
+ public virtual DbSet HL7DestinationEntities { get; set; }
public virtual DbSet InferenceRequests { get; set; }
public virtual DbSet Payloads { get; set; }
public virtual DbSet StorageMetadataWrapperEntities { get; set; }
public virtual DbSet DicomAssociationHistories { get; set; }
public virtual DbSet VirtualApplicationEntities { get; set; }
+ public virtual DbSet ExternalAppDetails { get; set; }
+
+ public virtual DbSet Hl7ApplicationConfig { get; set; }
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
@@ -49,11 +54,13 @@ protected override void OnModelCreating(ModelBuilder modelBuilder)
modelBuilder.ApplyConfiguration(new MonaiApplicationEntityConfiguration());
modelBuilder.ApplyConfiguration(new SourceApplicationEntityConfiguration());
modelBuilder.ApplyConfiguration(new DestinationApplicationEntityConfiguration());
+ modelBuilder.ApplyConfiguration(new HL7DestinationEntityConfiguration());
modelBuilder.ApplyConfiguration(new InferenceRequestConfiguration());
modelBuilder.ApplyConfiguration(new PayloadConfiguration());
modelBuilder.ApplyConfiguration(new StorageMetadataWrapperEntityConfiguration());
modelBuilder.ApplyConfiguration(new DicomAssociationInfoConfiguration());
modelBuilder.ApplyConfiguration(new VirtualApplicationEntityConfiguration());
+ modelBuilder.ApplyConfiguration(new Hl7ApplicationConfigConfiguration());
}
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
diff --git a/src/Database/EntityFramework/Migrations/20231120161347_202311201611.Designer.cs b/src/Database/EntityFramework/Migrations/20231120161347_202311201611.Designer.cs
new file mode 100755
index 000000000..cecea913d
--- /dev/null
+++ b/src/Database/EntityFramework/Migrations/20231120161347_202311201611.Designer.cs
@@ -0,0 +1,431 @@
+//
+using System;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+using Monai.Deploy.InformaticsGateway.Database.EntityFramework;
+
+#nullable disable
+
+namespace Monai.Deploy.InformaticsGateway.Database.Migrations
+{
+ [DbContext(typeof(InformaticsGatewayContext))]
+ [Migration("20231120161347_202311201611")]
+ partial class _202311201611
+ {
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder.HasAnnotation("ProductVersion", "6.0.22");
+
+ modelBuilder.Entity("Monai.Deploy.InformaticsGateway.Api.Models.DestinationApplicationEntity", b =>
+ {
+ b.Property("Name")
+ .HasColumnType("TEXT");
+
+ b.Property("AeTitle")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("CreatedBy")
+ .HasColumnType("TEXT");
+
+ b.Property("DateTimeCreated")
+ .HasColumnType("TEXT");
+
+ b.Property("DateTimeUpdated")
+ .HasColumnType("TEXT");
+
+ b.Property("HostIp")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("Port")
+ .HasColumnType("INTEGER");
+
+ b.Property("UpdatedBy")
+ .HasColumnType("TEXT");
+
+ b.HasKey("Name");
+
+ b.HasIndex(new[] { "Name" }, "idx_destination_name")
+ .IsUnique();
+
+ b.HasIndex(new[] { "Name", "AeTitle", "HostIp", "Port" }, "idx_source_all")
+ .IsUnique();
+
+ b.ToTable("DestinationApplicationEntities");
+ });
+
+ modelBuilder.Entity("Monai.Deploy.InformaticsGateway.Api.Models.DicomAssociationInfo", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("TEXT");
+
+ b.Property("CalledAeTitle")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("CallingAeTitle")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("CorrelationId")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("DateTimeCreated")
+ .HasColumnType("TEXT");
+
+ b.Property("DateTimeDisconnected")
+ .HasColumnType("TEXT");
+
+ b.Property("Duration")
+ .HasColumnType("TEXT");
+
+ b.Property("Errors")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("FileCount")
+ .HasColumnType("INTEGER");
+
+ b.Property("PayloadIds")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("RemoteHost")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("RemotePort")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("Id");
+
+ b.ToTable("DicomAssociationHistories");
+ });
+
+ modelBuilder.Entity("Monai.Deploy.InformaticsGateway.Api.Models.ExternalAppDetails", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("TEXT");
+
+ b.Property("CorrelationId")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("DateTimeCreated")
+ .HasColumnType("TEXT");
+
+ b.Property("DestinationFolder")
+ .HasColumnType("TEXT");
+
+ b.Property("ExportTaskID")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("PatientId")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("PatientIdOutBound")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("StudyInstanceUid")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("StudyInstanceUidOutBound")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("WorkflowInstanceId")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.HasKey("Id");
+
+ b.ToTable("ExternalAppDetails");
+ });
+
+ modelBuilder.Entity("Monai.Deploy.InformaticsGateway.Api.Models.MonaiApplicationEntity", b =>
+ {
+ b.Property("Name")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(0);
+
+ b.Property("AeTitle")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("AllowedSopClasses")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("CreatedBy")
+ .HasColumnType("TEXT");
+
+ b.Property("DateTimeCreated")
+ .HasColumnType("TEXT");
+
+ b.Property("DateTimeUpdated")
+ .HasColumnType("TEXT");
+
+ b.Property("Grouping")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("IgnoredSopClasses")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("PlugInAssemblies")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("Timeout")
+ .HasColumnType("INTEGER");
+
+ b.Property("UpdatedBy")
+ .HasColumnType("TEXT");
+
+ b.Property("Workflows")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.HasKey("Name");
+
+ b.HasIndex(new[] { "Name" }, "idx_monaiae_name")
+ .IsUnique();
+
+ b.ToTable("MonaiApplicationEntities");
+ });
+
+ modelBuilder.Entity("Monai.Deploy.InformaticsGateway.Api.Rest.InferenceRequest", b =>
+ {
+ b.Property("InferenceRequestId")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("TEXT");
+
+ b.Property("CreatedBy")
+ .HasColumnType("TEXT");
+
+ b.Property("DateTimeCreated")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("InputMetadata")
+ .HasColumnType("TEXT");
+
+ b.Property("InputResources")
+ .HasColumnType("TEXT");
+
+ b.Property("OutputResources")
+ .HasColumnType("TEXT");
+
+ b.Property("Priority")
+ .HasColumnType("INTEGER");
+
+ b.Property("State")
+ .HasColumnType("INTEGER");
+
+ b.Property("Status")
+ .HasColumnType("INTEGER");
+
+ b.Property("TransactionId")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("TryCount")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("InferenceRequestId");
+
+ b.HasIndex(new[] { "InferenceRequestId" }, "idx_inferencerequest_inferencerequestid")
+ .IsUnique();
+
+ b.HasIndex(new[] { "State" }, "idx_inferencerequest_state");
+
+ b.HasIndex(new[] { "TransactionId" }, "idx_inferencerequest_transactionid")
+ .IsUnique();
+
+ b.ToTable("InferenceRequests");
+ });
+
+ modelBuilder.Entity("Monai.Deploy.InformaticsGateway.Api.SourceApplicationEntity", b =>
+ {
+ b.Property("Name")
+ .HasColumnType("TEXT");
+
+ b.Property("AeTitle")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("CreatedBy")
+ .HasColumnType("TEXT");
+
+ b.Property("DateTimeCreated")
+ .HasColumnType("TEXT");
+
+ b.Property("DateTimeUpdated")
+ .HasColumnType("TEXT");
+
+ b.Property("HostIp")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("UpdatedBy")
+ .HasColumnType("TEXT");
+
+ b.HasKey("Name");
+
+ b.HasIndex(new[] { "Name", "AeTitle", "HostIp" }, "idx_source_all")
+ .IsUnique()
+ .HasDatabaseName("idx_source_all1");
+
+ b.HasIndex(new[] { "Name" }, "idx_source_name")
+ .IsUnique();
+
+ b.ToTable("SourceApplicationEntities");
+ });
+
+ modelBuilder.Entity("Monai.Deploy.InformaticsGateway.Api.Storage.Payload", b =>
+ {
+ b.Property("PayloadId")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("TEXT");
+
+ b.Property("CorrelationId")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("DataOrigins")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("DataTrigger")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("DateTimeCreated")
+ .HasColumnType("TEXT");
+
+ b.Property("DestinationFolder")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("Files")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("Key")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("MachineName")
+ .HasColumnType("TEXT");
+
+ b.Property("RetryCount")
+ .HasColumnType("INTEGER");
+
+ b.Property("State")
+ .HasColumnType("INTEGER");
+
+ b.Property("TaskId")
+ .HasColumnType("TEXT");
+
+ b.Property("Timeout")
+ .HasColumnType("INTEGER");
+
+ b.Property("WorkflowInstanceId")
+ .HasColumnType("TEXT");
+
+ b.HasKey("PayloadId");
+
+ b.HasIndex(new[] { "CorrelationId", "PayloadId" }, "idx_payload_ids")
+ .IsUnique();
+
+ b.HasIndex(new[] { "State" }, "idx_payload_state");
+
+ b.ToTable("Payloads");
+ });
+
+ modelBuilder.Entity("Monai.Deploy.InformaticsGateway.Api.VirtualApplicationEntity", b =>
+ {
+ b.Property("Name")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(0);
+
+ b.Property("CreatedBy")
+ .HasColumnType("TEXT");
+
+ b.Property("DateTimeCreated")
+ .HasColumnType("TEXT");
+
+ b.Property("DateTimeUpdated")
+ .HasColumnType("TEXT");
+
+ b.Property("PlugInAssemblies")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("UpdatedBy")
+ .HasColumnType("TEXT");
+
+ b.Property("VirtualAeTitle")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("Workflows")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.HasKey("Name");
+
+ b.HasIndex(new[] { "Name" }, "idx_virtualae_name")
+ .IsUnique();
+
+ b.ToTable("VirtualApplicationEntities");
+ });
+
+ modelBuilder.Entity("Monai.Deploy.InformaticsGateway.Database.Api.StorageMetadataWrapper", b =>
+ {
+ b.Property("CorrelationId")
+ .HasColumnType("TEXT");
+
+ b.Property("Identity")
+ .HasColumnType("TEXT");
+
+ b.Property("DateTimeCreated")
+ .HasColumnType("TEXT");
+
+ b.Property("IsUploaded")
+ .HasColumnType("INTEGER");
+
+ b.Property("TypeName")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("Value")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.HasKey("CorrelationId", "Identity");
+
+ b.HasIndex(new[] { "CorrelationId" }, "idx_storagemetadata_correlation");
+
+ b.HasIndex(new[] { "CorrelationId", "Identity" }, "idx_storagemetadata_ids");
+
+ b.HasIndex(new[] { "IsUploaded" }, "idx_storagemetadata_uploaded");
+
+ b.ToTable("StorageMetadataWrapperEntities");
+ });
+#pragma warning restore 612, 618
+ }
+ }
+}
diff --git a/src/Database/EntityFramework/Migrations/20231120161347_202311201611.cs b/src/Database/EntityFramework/Migrations/20231120161347_202311201611.cs
new file mode 100755
index 000000000..182e05f68
--- /dev/null
+++ b/src/Database/EntityFramework/Migrations/20231120161347_202311201611.cs
@@ -0,0 +1,50 @@
+using System;
+using Microsoft.EntityFrameworkCore.Migrations;
+
+#nullable disable
+
+namespace Monai.Deploy.InformaticsGateway.Database.Migrations
+{
+ public partial class _202311201611 : Migration
+ {
+ protected override void Up(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.AddColumn(
+ name: "DestinationFolder",
+ table: "Payloads",
+ type: "TEXT",
+ nullable: false,
+ defaultValue: "");
+
+ migrationBuilder.CreateTable(
+ name: "ExternalAppDetails",
+ columns: table => new
+ {
+ Id = table.Column(type: "TEXT", nullable: false),
+ StudyInstanceUid = table.Column(type: "TEXT", nullable: false),
+ StudyInstanceUidOutBound = table.Column(type: "TEXT", nullable: false),
+ WorkflowInstanceId = table.Column(type: "TEXT", nullable: false),
+ ExportTaskID = table.Column(type: "TEXT", nullable: false),
+ CorrelationId = table.Column(type: "TEXT", nullable: false),
+ DestinationFolder = table.Column(type: "TEXT", nullable: true),
+ PatientId = table.Column(type: "TEXT", nullable: false),
+ PatientIdOutBound = table.Column(type: "TEXT", nullable: false),
+ DateTimeCreated = table.Column(type: "TEXT", nullable: false)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_ExternalAppDetails", x => x.Id);
+ });
+ }
+
+ protected override void Down(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.DropTable(
+ name: "ExternalAppDetails");
+
+ migrationBuilder.DropColumn(
+ name: "DestinationFolder",
+ table: "Payloads");
+ }
+ }
+}
diff --git a/src/Database/EntityFramework/Migrations/20231204113501_Hl7DEstinationAndConfig.Designer.cs b/src/Database/EntityFramework/Migrations/20231204113501_Hl7DEstinationAndConfig.Designer.cs
new file mode 100755
index 000000000..742aec068
--- /dev/null
+++ b/src/Database/EntityFramework/Migrations/20231204113501_Hl7DEstinationAndConfig.Designer.cs
@@ -0,0 +1,505 @@
+//
+using System;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+using Monai.Deploy.InformaticsGateway.Database.EntityFramework;
+
+#nullable disable
+
+namespace Monai.Deploy.InformaticsGateway.Database.Migrations
+{
+ [DbContext(typeof(InformaticsGatewayContext))]
+ [Migration("20231204113501_Hl7DEstinationAndConfig")]
+ partial class Hl7DEstinationAndConfig
+ {
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder.HasAnnotation("ProductVersion", "6.0.25");
+
+ modelBuilder.Entity("Monai.Deploy.InformaticsGateway.Api.Hl7ApplicationConfigEntity", b =>
+ {
+ b.Property("Name")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(0);
+
+ b.Property("DataLink")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("DataMapping")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("DateTimeCreated")
+ .HasColumnType("TEXT");
+
+ b.Property("PlugInAssemblies")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("SendingId")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.HasKey("Name");
+
+ b.HasIndex(new[] { "Name" }, "idx_hl7_name")
+ .IsUnique();
+
+ b.ToTable("Hl7ApplicationConfig");
+ });
+
+ modelBuilder.Entity("Monai.Deploy.InformaticsGateway.Api.Models.DestinationApplicationEntity", b =>
+ {
+ b.Property("Name")
+ .HasColumnType("TEXT");
+
+ b.Property("AeTitle")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("CreatedBy")
+ .HasColumnType("TEXT");
+
+ b.Property("DateTimeCreated")
+ .HasColumnType("TEXT");
+
+ b.Property("DateTimeUpdated")
+ .HasColumnType("TEXT");
+
+ b.Property("HostIp")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("Port")
+ .HasColumnType("INTEGER");
+
+ b.Property("UpdatedBy")
+ .HasColumnType("TEXT");
+
+ b.HasKey("Name");
+
+ b.HasIndex(new[] { "Name" }, "idx_destination_name")
+ .IsUnique();
+
+ b.HasIndex(new[] { "Name", "AeTitle", "HostIp", "Port" }, "idx_source_all")
+ .IsUnique();
+
+ b.ToTable("DestinationApplicationEntities");
+ });
+
+ modelBuilder.Entity("Monai.Deploy.InformaticsGateway.Api.Models.DicomAssociationInfo", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("TEXT");
+
+ b.Property("CalledAeTitle")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("CallingAeTitle")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("CorrelationId")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("DateTimeCreated")
+ .HasColumnType("TEXT");
+
+ b.Property("DateTimeDisconnected")
+ .HasColumnType("TEXT");
+
+ b.Property("Duration")
+ .HasColumnType("TEXT");
+
+ b.Property("Errors")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("FileCount")
+ .HasColumnType("INTEGER");
+
+ b.Property("PayloadIds")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("RemoteHost")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("RemotePort")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("Id");
+
+ b.ToTable("DicomAssociationHistories");
+ });
+
+ modelBuilder.Entity("Monai.Deploy.InformaticsGateway.Api.Models.ExternalAppDetails", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("TEXT");
+
+ b.Property("CorrelationId")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("DateTimeCreated")
+ .HasColumnType("TEXT");
+
+ b.Property("DestinationFolder")
+ .HasColumnType("TEXT");
+
+ b.Property("ExportTaskID")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("PatientId")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("PatientIdOutBound")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("StudyInstanceUid")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("StudyInstanceUidOutBound")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("WorkflowInstanceId")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.HasKey("Id");
+
+ b.ToTable("ExternalAppDetails");
+ });
+
+ modelBuilder.Entity("Monai.Deploy.InformaticsGateway.Api.Models.HL7DestinationEntity", b =>
+ {
+ b.Property("Name")
+ .HasColumnType("TEXT");
+
+ b.Property("AeTitle")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("CreatedBy")
+ .HasColumnType("TEXT");
+
+ b.Property("DateTimeCreated")
+ .HasColumnType("TEXT");
+
+ b.Property("DateTimeUpdated")
+ .HasColumnType("TEXT");
+
+ b.Property("HostIp")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("Port")
+ .HasColumnType("INTEGER");
+
+ b.Property("UpdatedBy")
+ .HasColumnType("TEXT");
+
+ b.HasKey("Name");
+
+ b.HasIndex(new[] { "Name" }, "idx_destination_name")
+ .IsUnique()
+ .HasDatabaseName("idx_destination_name1");
+
+ b.HasIndex(new[] { "Name", "AeTitle", "HostIp", "Port" }, "idx_source_all")
+ .IsUnique()
+ .HasDatabaseName("idx_source_all1");
+
+ b.ToTable("HL7DestinationEntities");
+ });
+
+ modelBuilder.Entity("Monai.Deploy.InformaticsGateway.Api.Models.MonaiApplicationEntity", b =>
+ {
+ b.Property("Name")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(0);
+
+ b.Property("AeTitle")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("AllowedSopClasses")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("CreatedBy")
+ .HasColumnType("TEXT");
+
+ b.Property("DateTimeCreated")
+ .HasColumnType("TEXT");
+
+ b.Property("DateTimeUpdated")
+ .HasColumnType("TEXT");
+
+ b.Property("Grouping")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("IgnoredSopClasses")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("PlugInAssemblies")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("Timeout")
+ .HasColumnType("INTEGER");
+
+ b.Property("UpdatedBy")
+ .HasColumnType("TEXT");
+
+ b.Property("Workflows")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.HasKey("Name");
+
+ b.HasIndex(new[] { "Name" }, "idx_monaiae_name")
+ .IsUnique();
+
+ b.ToTable("MonaiApplicationEntities");
+ });
+
+ modelBuilder.Entity("Monai.Deploy.InformaticsGateway.Api.Rest.InferenceRequest", b =>
+ {
+ b.Property("InferenceRequestId")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("TEXT");
+
+ b.Property("CreatedBy")
+ .HasColumnType("TEXT");
+
+ b.Property("DateTimeCreated")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("InputMetadata")
+ .HasColumnType("TEXT");
+
+ b.Property("InputResources")
+ .HasColumnType("TEXT");
+
+ b.Property("OutputResources")
+ .HasColumnType("TEXT");
+
+ b.Property("Priority")
+ .HasColumnType("INTEGER");
+
+ b.Property("State")
+ .HasColumnType("INTEGER");
+
+ b.Property("Status")
+ .HasColumnType("INTEGER");
+
+ b.Property("TransactionId")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("TryCount")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("InferenceRequestId");
+
+ b.HasIndex(new[] { "InferenceRequestId" }, "idx_inferencerequest_inferencerequestid")
+ .IsUnique();
+
+ b.HasIndex(new[] { "State" }, "idx_inferencerequest_state");
+
+ b.HasIndex(new[] { "TransactionId" }, "idx_inferencerequest_transactionid")
+ .IsUnique();
+
+ b.ToTable("InferenceRequests");
+ });
+
+ modelBuilder.Entity("Monai.Deploy.InformaticsGateway.Api.SourceApplicationEntity", b =>
+ {
+ b.Property("Name")
+ .HasColumnType("TEXT");
+
+ b.Property("AeTitle")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("CreatedBy")
+ .HasColumnType("TEXT");
+
+ b.Property("DateTimeCreated")
+ .HasColumnType("TEXT");
+
+ b.Property("DateTimeUpdated")
+ .HasColumnType("TEXT");
+
+ b.Property("HostIp")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("UpdatedBy")
+ .HasColumnType("TEXT");
+
+ b.HasKey("Name");
+
+ b.HasIndex(new[] { "Name", "AeTitle", "HostIp" }, "idx_source_all")
+ .IsUnique()
+ .HasDatabaseName("idx_source_all2");
+
+ b.HasIndex(new[] { "Name" }, "idx_source_name")
+ .IsUnique();
+
+ b.ToTable("SourceApplicationEntities");
+ });
+
+ modelBuilder.Entity("Monai.Deploy.InformaticsGateway.Api.Storage.Payload", b =>
+ {
+ b.Property("PayloadId")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("TEXT");
+
+ b.Property("CorrelationId")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("DataOrigins")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("DataTrigger")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("DateTimeCreated")
+ .HasColumnType("TEXT");
+
+ b.Property("DestinationFolder")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("Files")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("Key")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("MachineName")
+ .HasColumnType("TEXT");
+
+ b.Property("RetryCount")
+ .HasColumnType("INTEGER");
+
+ b.Property("State")
+ .HasColumnType("INTEGER");
+
+ b.Property("TaskId")
+ .HasColumnType("TEXT");
+
+ b.Property("Timeout")
+ .HasColumnType("INTEGER");
+
+ b.Property