diff --git a/docs/api/rest/config.md b/docs/api/rest/config.md index 9aa45867b..e61b6d1b6 100644 --- a/docs/api/rest/config.md +++ b/docs/api/rest/config.md @@ -285,6 +285,41 @@ curl --location --request DELETE 'http://localhost:5000/config/ae/breast-tumor' --- +## GET /config/ae/plug-ins + +Returns a list of data input plug-ins that can be used with SCP Application Entity. + +### Parameters + +N/A + +### Responses + +Response Content Type: JSON - An object containing zero or more key-value pairs where the key is the name of the plug-in and the value is the fully qualified assembly type name of the plug-in. + +| Code | Description | +| ---- | --------------------------------------------------------------------------------------------------------------------------------------- | +| 200 | Plug-ins retrieved successfully. | +| 500 | Server error. The response will be a [Problem details](https://datatracker.ietf.org/doc/html/rfc7807) object with server error details. | + +### Example Request + +```bash +curl --location --request GET 'http://localhost:5000/config/ae/plug-ins' +``` + +### Example Response + +```json +{ + "testInputDataPluginAddWorkflow": "Monai.Deploy.InformaticsGateway.Test.Plugins.TestInputDataPluginAddWorkflow, Monai.Deploy.InformaticsGateway.Test.Plugins, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null", + "testInputDataPluginResumeWorkflow": "Monai.Deploy.InformaticsGateway.Test.Plugins.TestInputDataPluginResumeWorkflow, Monai.Deploy.InformaticsGateway.Test.Plugins, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null", + "testInputDataPluginModifyDicomFile": "Monai.Deploy.InformaticsGateway.Test.Plugins.TestInputDataPluginModifyDicomFile, Monai.Deploy.InformaticsGateway.Test.Plugins, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" +} +``` + +--- + ## GET /config/source Returns a list of calling (source) AE Titles configured on the Informatics Gateway. @@ -768,3 +803,38 @@ curl --location --request DELETE 'http://localhost:5000/config/destination/USEAS "hostIp": "10.20.3.4" } ``` +--- + +## GET /config/destination/plug-ins + +Returns a list of data output plug-ins that can be used with SCP Application Entity. + +### Parameters + +N/A + +### Responses + +Response Content Type: JSON - An object containing zero or more key-value pairs where the key is the name of the plug-in and the value is the fully qualified assembly type name of the plug-in. + +| Code | Description | +| ---- | --------------------------------------------------------------------------------------------------------------------------------------- | +| 200 | Plug-ins retrieved successfully. | +| 500 | Server error. The response will be a [Problem details](https://datatracker.ietf.org/doc/html/rfc7807) object with server error details. | + +### Example Request + +```bash +curl --location --request GET 'http://localhost:5000/config/destination/plug-ins' +``` + +### Example Response + +```json +{ + "testOutputDataPluginAddMessage": "Monai.Deploy.InformaticsGateway.Test.Plugins.TestOutputDataPluginAddMessage, Monai.Deploy.InformaticsGateway.Test.Plugins, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null", + "testOutputDataPluginModifyDicomFile": "Monai.Deploy.InformaticsGateway.Test.Plugins.TestOutputDataPluginModifyDicomFile, Monai.Deploy.InformaticsGateway.Test.Plugins, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" +} +``` + +--- diff --git a/docs/docfx.json b/docs/docfx.json index b5a761955..ae61f080d 100644 --- a/docs/docfx.json +++ b/docs/docfx.json @@ -4,14 +4,14 @@ "src": [ { "files": [ - "Api/bin/Release/net6.0/Monai.Deploy.InformaticsGateway.Api.dll", - "Client/bin/Release/net6.0/Monai.Deploy.InformaticsGateway.Client.dll", - "Client.Common/bin/Release/net6.0/Monai.Deploy.InformaticsGateway.Client.Common.dll", - "Common/bin/Release/net6.0/Monai.Deploy.InformaticsGateway.Common.dll", - "Configuration/bin/Release/net6.0/Monai.Deploy.InformaticsGateway.Configuration.dll", - "Database/bin/Release/net6.0/Monai.Deploy.InformaticsGateway.Database.dll", - "Database/Api/bin/Release/net6.0/Monai.Deploy.InformaticsGateway.Database.Api.dll", - "DicomWebClient/bin/Release/net6.0/Monai.Deploy.InformaticsGateway.DicomWeb.Client.dll" + "Api/Monai.Deploy.InformaticsGateway.Api.csproj", + "Client/Monai.Deploy.InformaticsGateway.Client.csproj", + "Client.Common/Monai.Deploy.InformaticsGateway.Client.Common.csproj", + "Common/Monai.Deploy.InformaticsGateway.Common.csproj", + "Configuration/Monai.Deploy.InformaticsGateway.Configuration.csproj", + "Database/Monai.Deploy.InformaticsGateway.Database.csproj", + "Database/Api/Monai.Deploy.InformaticsGateway.Database.Api.csproj", + "DicomWebClient/Monai.Deploy.InformaticsGateway.DicomWeb.Client.csproj" ], "exclude": [ "**/obj/**", @@ -61,7 +61,7 @@ "_enableSearch": true, "_appFaviconPath": "images/favicon.ico", "_appLogoPath": "images/MONAI-logo-color.svg", - "_appFooter": "Copyright © 2022 Project MONAI
Generated by DocFX", + "_appFooter": "Copyright © 2022-2023 Project MONAI
Generated by DocFX", "_gitContribute": { "repo": "https://github.com/Project-MONAI/monai-deploy-informatics-gateway.git", "branch": "main", diff --git a/docs/index.md b/docs/index.md index 60b82eacc..7bc5181be 100644 --- a/docs/index.md +++ b/docs/index.md @@ -38,8 +38,8 @@ MIG contains the following standard protocols for communicating with medical dev * **DICOMweb client**: QIDO-RS, WADO-RS, STOW-RS * **FHIR client**: GET -[!Note] -The ACR DSI API uses the DICOMweb client and FHIR client. +> [!Note] +> The ACR DSI API uses the DICOMweb client and FHIR client. ### DICOM SCP diff --git a/docs/setup/setup.md b/docs/setup/setup.md index 4eea52ec8..2752d89eb 100644 --- a/docs/setup/setup.md +++ b/docs/setup/setup.md @@ -20,9 +20,20 @@ This section outlines the steps to download and install the Informatics Gateway ## Runtime Requirements * Docker 20.10.12 or higher +* [Database service](#database-configuration) +* [Message Broker service](#message-broker) +* [Storage service](#storage-service) For development requirements, refer to the [Informatics Gateway README.md](https://github.com/Project-MONAI/monai-deploy-informatics-gateway). +> [!Note] +> Use [MONAI Deploy Express](https://github.com/Project-MONAI/monai-deploy/tree/main/deploy/monai-deploy-express) to quickly +> bring up all required services, including the Informatics Gateway. +> +> Skip to [Configure Informatics Gateway](#configure-informatics-gateway) if you are using MONAI Deploy Express. + + + ## Installation ### Informatics Gateway CLI @@ -30,6 +41,9 @@ For development requirements, refer to the [Informatics Gateway README.md](https Download and install the Informatics Gateway CLI from the [Releases](https://github.com/Project-MONAI/monai-deploy-informatics-gateway/releases) section of the repository and install it. +> [!Note] +> We use `v0.2.0` release as an example here, always download the latest from the [Releases](https://github.com/Project-MONAI/monai-deploy-informatics-gateway/releases) section. + #### On Linux ```bash @@ -80,6 +94,9 @@ mig-cli.exe config init mig-cli.exe config endpoint http://localhost:5000 #skip if running locally ``` +> [!Note] +> For [MONAI Deploy Express](https://github.com/Project-MONAI/monai-deploy/tree/main/deploy/monai-deploy-express), use `http://localhost:5003`. + The first command extracts the default `appsettings.json` file into the home directory: * Linux: `~/.mig/appsettings.json` @@ -144,6 +161,27 @@ If the database system is supported by [Microsoft Entity Framework](https://lear For other database systems that are not listed in the link above, simply implement the [Repository APIs](xref:Monai.Deploy.InformaticsGateway.Database.Api.Repositories), update the [Database Manager](xref:Monai.Deploy.InformaticsGateway.Database.DatabaseManager) to support the new database type and optionally, implement the [IDabaseMigrationManager](xref:Monai.Deploy.InformaticsGateway.Database.Api.IDatabaseMigrationManager). +## Authentication + +Authentication is disabled by default. To enable authentication using OpenID, edit the `appsettings.json` file and set `bypassAuthentication` to `true`: + +```json +{ + "MonaiDeployAuthentication": { + "bypassAuthentication": true, + "openId": { + "realm": "{realm}", + "realmKey": "{realm-secret-key}", + "clientId": "{client-id}", + "audiences": [ "{audiences}" ], + "roleClaimType": "{roles}", + ... +} +``` + +Refer to [Authentication Setup Using Keycloak](https://github.com/Project-MONAI/monai-deploy-workflow-manager/blob/develop/guidelines/mwm-auth.md) for additional details. + + ## Storage Consideration & Configuration The Informatics Gateway operates on two storage locations. In the first location, the incoming data for data grouping is temporarily stored. In the second location, the Informatics Gateway uploads grouped datasets to final storage shared by other MONAI Deploy sub-systems. @@ -358,3 +396,12 @@ The command adds a DICOM export destination with AE Title `WORKSTATION1` at IP ` ## Logging See [schema](./schema.md#logging) page for additional information on logging. + +## Data Plug-ins + +You may write your own data plug-ins to manipulate incoming data before they are saved to the storage service or outgoing data right before they are exported. + +To write an input data plug-in, implement the [IInputDataPlugin](xref:Monai.Deploy.InformaticsGateway.Api.IInputDataPlugin) interface and put the assmblye dll in the +plug-ins directories. Similarly for output data plug-ins, implement the [IOutputDataPlugin](xref:Monai.Deploy.InformaticsGateway.Api.IOutputDataPlugin) interface. + +Refer to [Configuration API](../api/rest/config.md) page to retrieve available [input](../api/rest/config.md#get-configaeplug-ins) and [output](../api/rest/config.md#get-configdestinationplug-ins) data plug-ins. diff --git a/src/Api/Storage/DicomFileStorageMetadata.cs b/src/Api/Storage/DicomFileStorageMetadata.cs index 2c3dfd17f..d48bdd0d4 100644 --- a/src/Api/Storage/DicomFileStorageMetadata.cs +++ b/src/Api/Storage/DicomFileStorageMetadata.cs @@ -34,7 +34,7 @@ public sealed record DicomFileStorageMetadata : FileStorageMetadata /// /// The calling AE title of the DICOM instance. /// For ACR, this is the Transaction ID of the original request. - /// Note: this value is same as + /// Note: this value is same as /// [JsonIgnore] public string CallingAeTitle { get => Source; } diff --git a/src/Api/Storage/FhirFileStorageMetadata.cs b/src/Api/Storage/FhirFileStorageMetadata.cs index 425ef0626..bf437a61a 100644 --- a/src/Api/Storage/FhirFileStorageMetadata.cs +++ b/src/Api/Storage/FhirFileStorageMetadata.cs @@ -32,7 +32,7 @@ public sealed record FhirFileStorageMetadata : FileStorageMetadata /// /// The transaction ID of the original ACR request. - /// Note: this value is same as + /// Note: this value is same as /// [JsonIgnore] public string TransactionId { get => Source; } diff --git a/src/Configuration/DicomWebConfiguration.cs b/src/Configuration/DicomWebConfiguration.cs index 62cdbcf34..55b4f914c 100644 --- a/src/Configuration/DicomWebConfiguration.cs +++ b/src/Configuration/DicomWebConfiguration.cs @@ -30,8 +30,9 @@ public class DicomWebConfiguration /// /// Gets or sets the (postfix) name of the DICOMweb export agent used for receiving messages. - /// The agent name is combine with - /// for subscribing messages from the message broker service. + /// This value is appended to + /// as the name for subscribing to messages from the message broker service. + /// [ConfigurationKeyName("agentName")] public string AgentName { get; set; } = "monaidicomweb"; diff --git a/src/Configuration/ScuConfiguration.cs b/src/Configuration/ScuConfiguration.cs index a2ae5ab23..87acc75d3 100644 --- a/src/Configuration/ScuConfiguration.cs +++ b/src/Configuration/ScuConfiguration.cs @@ -32,8 +32,8 @@ public class ScuConfiguration /// /// Gets or sets the (postfix) name of the DIMSE export agent used for receiving messages. - /// The agent name is combine with - /// for subscribing messages from the message broker service. + /// This value is appended to + /// as the name for subscribing to messages from the message broker service. /// [ConfigurationKeyName("agentName")] public string AgentName { get; set; } = "monaiscu"; diff --git a/src/InformaticsGateway/appsettings.json b/src/InformaticsGateway/appsettings.json index 0b825c562..8341177e9 100644 --- a/src/InformaticsGateway/appsettings.json +++ b/src/InformaticsGateway/appsettings.json @@ -2,11 +2,11 @@ "MonaiDeployAuthentication": { "bypassAuthentication": false, "openId": { - "realm": "http://localhost:8080/realms/monai-test/", - "realmKey": "G6GIR03BEJMlevUtAuZ1ao1SN6IHyUXR", - "clientId": "monai-app", - "audiences": [ "monai-app-test" ], - "roleClaimType": "roles", + "realm": "{realm}", + "realmKey": "{realm-secret-key}", + "clientId": "{client-id}", + "audiences": [ "{audiences}" ], + "roleClaimType": "{roles}", "claimMappings": { "userClaims": [ {