Skip to content

Commit ff677ce

Browse files
authored
Add support for MongoDB (#238)
* Refactor DB repositories for EF * Add MongoDB support Signed-off-by: Victor Chang <[email protected]>
1 parent cd14949 commit ff677ce

File tree

245 files changed

+32150
-2755
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

245 files changed

+32150
-2755
lines changed

.github/workflows/ci.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -230,14 +230,16 @@ jobs:
230230
verbose: true
231231

232232
integration-test:
233-
runs-on: ubuntu-22.04
233+
runs-on: ubuntu-latest
234234
timeout-minutes: 30
235235
strategy:
236236
matrix:
237237
feature: [AcrApi, DicomDimseScp, DicomDimseScu, DicomWebExport, DicomWebStow, HealthLevel7, Fhir]
238+
database: [ef, mongodb]
238239
fail-fast: false
239240
env:
240241
TAG: ${{ needs.build.outputs.TAG }}
242+
DOTNET_TEST: ${{ matrix.database }}
241243
steps:
242244
- name: Checkout repository
243245
uses: actions/checkout@v3

doc/dependency_decisions.yml

+90-14
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@
102102
- :who: mocsharp
103103
:why: MIT (https://github.com/GitTools/GitVersion/raw/main/LICENSE)
104104
:versions:
105-
- 5.10.3
105+
- 5.11.1
106106
:when: 2022-08-16 23:05:34.633372053 Z
107107
- - :approve
108108
- HL7-dotnetcore
@@ -328,63 +328,63 @@
328328
- :who: mocsharp
329329
:why: MIT (https://raw.githubusercontent.com/dotnet/efcore/release/6.0/LICENSE.txt)
330330
:versions:
331-
- 6.0.10
331+
- 6.0.11
332332
:when: 2022-08-16 23:05:49.698463427 Z
333333
- - :approve
334334
- Microsoft.EntityFrameworkCore
335335
- :who: mocsharp
336336
:why: MIT (https://raw.githubusercontent.com/dotnet/efcore/release/6.0/LICENSE.txt)
337337
:versions:
338-
- 6.0.10
338+
- 6.0.11
339339
:when: 2022-08-16 23:05:50.137694970 Z
340340
- - :approve
341341
- Microsoft.EntityFrameworkCore.Abstractions
342342
- :who: mocsharp
343343
:why: MIT (https://raw.githubusercontent.com/dotnet/efcore/release/6.0/LICENSE.txt)
344344
:versions:
345-
- 6.0.10
345+
- 6.0.11
346346
:when: 2022-08-16 23:05:51.008105271 Z
347347
- - :approve
348348
- Microsoft.EntityFrameworkCore.Analyzers
349349
- :who: mocsharp
350350
:why: MIT (https://raw.githubusercontent.com/dotnet/efcore/release/6.0/LICENSE.txt)
351351
:versions:
352-
- 6.0.10
352+
- 6.0.11
353353
:when: 2022-08-16 23:05:51.445711308 Z
354354
- - :approve
355355
- Microsoft.EntityFrameworkCore.Design
356356
- :who: mocsharp
357357
:why: MIT (https://raw.githubusercontent.com/dotnet/efcore/release/6.0/LICENSE.txt)
358358
:versions:
359-
- 6.0.10
359+
- 6.0.11
360360
:when: 2022-08-16 23:05:51.922790944 Z
361361
- - :approve
362362
- Microsoft.EntityFrameworkCore.InMemory
363363
- :who: mocsharp
364364
:why: MIT (https://raw.githubusercontent.com/dotnet/efcore/release/6.0/LICENSE.txt)
365365
:versions:
366-
- 6.0.10
366+
- 6.0.11
367367
:when: 2022-08-16 23:05:52.375150938 Z
368368
- - :approve
369369
- Microsoft.EntityFrameworkCore.Relational
370370
- :who: mocsharp
371371
:why: MIT (https://raw.githubusercontent.com/dotnet/efcore/release/6.0/LICENSE.txt)
372372
:versions:
373-
- 6.0.10
373+
- 6.0.11
374374
:when: 2022-08-16 23:05:52.828879230 Z
375375
- - :approve
376376
- Microsoft.EntityFrameworkCore.Sqlite
377377
- :who: mocsharp
378378
:why: MIT (https://raw.githubusercontent.com/dotnet/efcore/release/6.0/LICENSE.txt)
379379
:versions:
380-
- 6.0.10
380+
- 6.0.11
381381
:when: 2022-08-16 23:05:53.270526921 Z
382382
- - :approve
383383
- Microsoft.EntityFrameworkCore.Sqlite.Core
384384
- :who: mocsharp
385385
:why: MIT (https://raw.githubusercontent.com/dotnet/efcore/release/6.0/LICENSE.txt)
386386
:versions:
387-
- 6.0.10
387+
- 6.0.11
388388
:when: 2022-08-16 23:05:53.706997823 Z
389389
- - :approve
390390
- Microsoft.Extensions.ApiDescription.Server
@@ -526,20 +526,22 @@
526526
:why: MIT (https://github.com/dotnet/aspnetcore/raw/main/LICENSE.txt)
527527
:versions:
528528
- 6.0.10
529+
- 6.0.11
529530
:when: 2022-08-29 18:11:22.090772006 Z
530531
- - :approve
531532
- Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions
532533
- :who: mocsharp
533534
:why: MIT (https://github.com/dotnet/aspnetcore/raw/main/LICENSE.txt)
534535
:versions:
535536
- 6.0.10
537+
- 6.0.11
536538
:when: 2022-08-29 18:11:22.090772006 Z
537539
- - :approve
538540
- Microsoft.Extensions.Diagnostics.HealthChecks.EntityFrameworkCore
539541
- :who: mocsharp
540542
:why: MIT (https://github.com/dotnet/aspnetcore/raw/main/LICENSE.txt)
541543
:versions:
542-
- 6.0.10
544+
- 6.0.11
543545
:when: 2022-08-29 18:11:22.090772006 Z
544546
- - :approve
545547
- Microsoft.Extensions.FileProviders.Abstractions
@@ -605,6 +607,7 @@
605607
- 6.0.0
606608
- 6.0.1
607609
- 6.0.2
610+
- 6.0.3
608611
:when: 2022-08-16 23:06:06.728283354 Z
609612
- - :approve
610613
- Microsoft.Extensions.Logging.Configuration
@@ -703,6 +706,7 @@
703706
:why: MIT (https://github.com/dotnet/corefx/raw/master/LICENSE.TXT)
704707
:versions:
705708
- 3.0.0
709+
- 5.0.0
706710
:when: 2022-08-16 23:06:13.902743611 Z
707711
- - :approve
708712
- Microsoft.NETCore.Targets
@@ -791,14 +795,14 @@
791795
- :who: neilsouth
792796
:why: Apache-2.0 (https://github.com/Project-MONAI/monai-deploy-messaging/raw/main/LICENSE)
793797
:versions:
794-
- 0.1.17-rc0020
798+
- 0.1.16
795799
:when: 2022-08-16 23:06:21.051573547 Z
796800
- - :approve
797801
- Monai.Deploy.Messaging.RabbitMQ
798802
- :who: neilsouth
799803
:why: Apache-2.0 (https://github.com/Project-MONAI/monai-deploy-messaging/raw/main/LICENSE)
800804
:versions:
801-
- 0.1.17-rc0020
805+
- 0.1.16
802806
:when: 2022-08-16 23:06:21.511789690 Z
803807
- - :approve
804808
- Monai.Deploy.Storage
@@ -1543,6 +1547,7 @@
15431547
:why: MIT (https://github.com/dotnet/corefx/raw/master/LICENSE.TXT)
15441548
:versions:
15451549
- 4.5.0
1550+
- 5.0.0
15461551
:when: 2022-08-16 23:07:11.063425328 Z
15471552
- - :approve
15481553
- System.Security.Claims
@@ -1634,6 +1639,7 @@
16341639
:why: MIT (https://github.com/dotnet/runtime/raw/main/LICENSE.TXT)
16351640
:versions:
16361641
- 4.5.0
1642+
- 5.0.0
16371643
:when: 2022-08-16 23:07:17.059464936 Z
16381644
- - :approve
16391645
- System.Text.Encoding
@@ -1684,7 +1690,7 @@
16841690
:versions:
16851691
- 6.0.0
16861692
- 6.0.5
1687-
- 6.0.6
1693+
- 6.0.7
16881694
:when: 2022-08-16 23:07:20.787263056 Z
16891695
- - :approve
16901696
- System.Text.RegularExpressions
@@ -2380,3 +2386,73 @@
23802386
:versions:
23812387
- 5.0.3
23822388
:when: 2022-10-12 03:14:08.789273776 Z
2389+
- - :approve
2390+
- DnsClient
2391+
- :who: mocsharp
2392+
:why: Apache-2.0 (https://github.com/MichaCo/DnsClient.NET/raw/dev/LICENSE)
2393+
:versions:
2394+
- 1.6.1
2395+
:when: 2022-11-16 23:33:33.315560769 Z
2396+
- - :approve
2397+
- Snappier
2398+
- :who: mocsharp
2399+
:why: BSD-3-Clause (https://github.com/brantburnett/Snappier/raw/main/COPYING.txt)
2400+
:versions:
2401+
- 1.0.0
2402+
:when: 2022-10-14 23:37:36.642306800 Z
2403+
- - :approve
2404+
- ZstdSharp.Port
2405+
- :who: mocsharp
2406+
:why: MIT (https://github.com/oleg-st/ZstdSharp/raw/master/LICENSE)
2407+
:versions:
2408+
- 0.6.2
2409+
:when: 2022-10-14 23:38:32.685243680 Z
2410+
- - :approve
2411+
- Microsoft.Win32.Registry
2412+
- :who: mocsharp
2413+
:why: MIT (https://github.com/dotnet/runtime/raw/main/LICENSE.TXT)
2414+
:versions:
2415+
- 5.0.0
2416+
:when: 2022-11-16 23:38:53.540718932 Z
2417+
- - :approve
2418+
- MongoDB.Bson
2419+
- :who: mocsharp
2420+
:why: Apache-2.0 (https://github.com/mongodb/mongo-csharp-driver/raw/master/License.txt)
2421+
:versions:
2422+
- 2.18.0
2423+
:when: 2022-11-16 23:38:53.891380809 Z
2424+
- - :approve
2425+
- MongoDB.Driver
2426+
- :who: mocsharp
2427+
:why: Apache-2.0 (https://github.com/mongodb/mongo-csharp-driver/raw/master/License.txt)
2428+
:versions:
2429+
- 2.18.0
2430+
:when: 2022-11-16 23:38:54.213853364 Z
2431+
- - :approve
2432+
- MongoDB.Driver.Core
2433+
- :who: mocsharp
2434+
:why: Apache-2.0 (https://github.com/mongodb/mongo-csharp-driver/raw/master/License.txt)
2435+
:versions:
2436+
- 2.18.0
2437+
:when: 2022-11-16 23:38:54.553730219 Z
2438+
- - :approve
2439+
- MongoDB.Libmongocrypt
2440+
- :who: mocsharp
2441+
:why: Apache-2.0 (https://github.com/mongodb/mongo-csharp-driver/raw/master/License.txt)
2442+
:versions:
2443+
- 1.6.0
2444+
:when: 2022-11-16 23:38:54.863359236 Z
2445+
- - :approve
2446+
- SharpCompress
2447+
- :who: mocsharp
2448+
:why: MIT (https://github.com/adamhathcock/sharpcompress/raw/master/LICENSE.txt)
2449+
:versions:
2450+
- 0.30.1
2451+
:when: 2022-11-16 23:38:55.192078193 Z
2452+
- - :approve
2453+
- SharpCompress
2454+
- :who: mocsharp
2455+
:why: MIT (https://github.com/adamhathcock/sharpcompress/raw/master/LICENSE.txt)
2456+
:versions:
2457+
- 0.30.1
2458+
:when: 2022-11-16 23:38:55.532789254 Z

docker-compose/docker-compose.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ services:
6868
networks:
6969
- monaideploy
7070
healthcheck:
71-
test: echo 'db.runCommand("ping").ok' | mongo localhost:27017/productiondb --quiet
71+
test: echo 'db.runCommand("ping").ok' | mongosh localhost:27017/productiondb --quiet
7272
interval: 10s
7373
timeout: 10s
7474
retries: 5

docs/compliance/third-party-licenses.md

+15-15
Original file line numberDiff line numberDiff line change
@@ -1072,14 +1072,14 @@ SOFTWARE.
10721072

10731073

10741074
<details>
1075-
<summary>GitVersion.MsBuild 5.10.3</summary>
1075+
<summary>GitVersion.MsBuild 5.11.1</summary>
10761076

10771077
## GitVersion.MsBuild
10781078

1079-
- Version: 5.10.3
1079+
- Version: 5.11.1
10801080
- Authors: GitTools and Contributors
10811081
- Project URL: https://github.com/GitTools/GitVersion
1082-
- Source: [NuGet](https://www.nuget.org/packages/GitVersion.MsBuild/5.10.3)
1082+
- Source: [NuGet](https://www.nuget.org/packages/GitVersion.MsBuild/5.11.1)
10831083
- License: [MIT](https://github.com/GitTools/GitVersion/raw/main/LICENSE)
10841084

10851085

@@ -3015,14 +3015,14 @@ SOFTWARE.
30153015

30163016

30173017
<details>
3018-
<summary>Microsoft.EntityFrameworkCore 6.0.10</summary>
3018+
<summary>Microsoft.EntityFrameworkCore 6.0.11</summary>
30193019

30203020
## Microsoft.EntityFrameworkCore
30213021

3022-
- Version: 6.0.10
3022+
- Version: 6.0.11
30233023
- Authors: Microsoft
30243024
- Project URL: https://docs.microsoft.com/ef/core/
3025-
- Source: [NuGet](https://www.nuget.org/packages/Microsoft.EntityFrameworkCore/6.0.10)
3025+
- Source: [NuGet](https://www.nuget.org/packages/Microsoft.EntityFrameworkCore/6.0.11)
30263026
- License: [MIT](https://raw.githubusercontent.com/dotnet/efcore/release/6.0/LICENSE.txt)
30273027

30283028

@@ -3056,14 +3056,14 @@ SOFTWARE.
30563056

30573057

30583058
<details>
3059-
<summary>Microsoft.EntityFrameworkCore.Abstractions 6.0.10</summary>
3059+
<summary>Microsoft.EntityFrameworkCore.Abstractions 6.0.11</summary>
30603060

30613061
## Microsoft.EntityFrameworkCore.Abstractions
30623062

3063-
- Version: 6.0.10
3063+
- Version: 6.0.11
30643064
- Authors: Microsoft
30653065
- Project URL: https://docs.microsoft.com/ef/core/
3066-
- Source: [NuGet](https://www.nuget.org/packages/Microsoft.EntityFrameworkCore.Abstractions/6.0.10)
3066+
- Source: [NuGet](https://www.nuget.org/packages/Microsoft.EntityFrameworkCore.Abstractions/6.0.11)
30673067
- License: [MIT](https://raw.githubusercontent.com/dotnet/efcore/release/6.0/LICENSE.txt)
30683068

30693069

@@ -4680,14 +4680,14 @@ SOFTWARE.
46804680

46814681

46824682
<details>
4683-
<summary>Microsoft.Extensions.Logging.Abstractions 6.0.2</summary>
4683+
<summary>Microsoft.Extensions.Logging.Abstractions 6.0.3</summary>
46844684

46854685
## Microsoft.Extensions.Logging.Abstractions
46864686

4687-
- Version: 6.0.2
4687+
- Version: 6.0.3
46884688
- Authors: Microsoft
46894689
- Project URL: https://dot.net/
4690-
- Source: [NuGet](https://www.nuget.org/packages/Microsoft.Extensions.Logging.Abstractions/6.0.2)
4690+
- Source: [NuGet](https://www.nuget.org/packages/Microsoft.Extensions.Logging.Abstractions/6.0.3)
46914691
- License: [MIT](https://github.com/dotnet/runtime/raw/main/LICENSE.TXT)
46924692

46934693

@@ -24897,14 +24897,14 @@ SOFTWARE.
2489724897

2489824898

2489924899
<details>
24900-
<summary>System.Text.Json 6.0.6</summary>
24900+
<summary>System.Text.Json 6.0.7</summary>
2490124901

2490224902
## System.Text.Json
2490324903

24904-
- Version: 6.0.6
24904+
- Version: 6.0.7
2490524905
- Authors: Microsoft
2490624906
- Project URL: https://dot.net/
24907-
- Source: [NuGet](https://www.nuget.org/packages/System.Text.Json/6.0.6)
24907+
- Source: [NuGet](https://www.nuget.org/packages/System.Text.Json/6.0.7)
2490824908
- License: [MIT](https://github.com/dotnet/runtime/raw/main/LICENSE.TXT)
2490924909

2491024910

src/Api/BaseApplicationEntity.cs

+6-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ namespace Monai.Deploy.InformaticsGateway.Api
2323
/// <remarks>
2424
/// * [Application Entity](http://www.otpedia.com/entryDetails.cfm?id=137)
2525
/// </remarks>
26-
public class BaseApplicationEntity
26+
public class BaseApplicationEntity : MongoDBEntityBase
2727
{
2828
/// <summary>
2929
/// Gets or sets the unique name used to identify a DICOM application entity.
@@ -51,5 +51,10 @@ public void SetDefaultValues()
5151
if (string.IsNullOrWhiteSpace(Name))
5252
Name = AeTitle;
5353
}
54+
55+
public override string ToString()
56+
{
57+
return $"Name: {Name}/AET: {AeTitle}/Host: {HostIp}";
58+
}
5459
}
5560
}

src/Api/Monai.Deploy.InformaticsGateway.Api.csproj

+4-3
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,16 @@
2222
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
2323
<IsTrimmable>true</IsTrimmable>
2424
<CodeAnalysisRuleSet>..\.sonarlint\project-monai_monai-deploy-informatics-gatewaycsharp.ruleset</CodeAnalysisRuleSet>
25+
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
2526
</PropertyGroup>
2627

2728
<ItemGroup>
28-
<PackageReference Include="GitVersion.MsBuild" Version="5.10.3">
29+
<PackageReference Include="GitVersion.MsBuild" Version="5.11.1">
2930
<PrivateAssets>All</PrivateAssets>
3031
</PackageReference>
3132
<PackageReference Include="Macross.Json.Extensions" Version="3.0.0" />
32-
<PackageReference Include="Microsoft.EntityFrameworkCore.Abstractions" Version="6.0.10" />
33-
<PackageReference Include="Monai.Deploy.Messaging" Version="0.1.17-rc0020" />
33+
<PackageReference Include="Microsoft.EntityFrameworkCore.Abstractions" Version="6.0.11" />
34+
<PackageReference Include="Monai.Deploy.Messaging" Version="0.1.16" />
3435
<PackageReference Include="Monai.Deploy.Storage" Version="0.2.10" />
3536
</ItemGroup>
3637

0 commit comments

Comments
 (0)