Skip to content

Commit

Permalink
gh-434 Update documentation
Browse files Browse the repository at this point in the history
Signed-off-by: Victor Chang <[email protected]>
  • Loading branch information
mocsharp committed Aug 9, 2023
1 parent 4cc4b0d commit 0330077
Show file tree
Hide file tree
Showing 9 changed files with 140 additions and 22 deletions.
70 changes: 70 additions & 0 deletions docs/api/rest/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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"
}
```

---
18 changes: 9 additions & 9 deletions docs/docfx.json
Original file line number Diff line number Diff line change
Expand Up @@ -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/**",
Expand Down Expand Up @@ -61,7 +61,7 @@
"_enableSearch": true,
"_appFaviconPath": "images/favicon.ico",
"_appLogoPath": "images/MONAI-logo-color.svg",
"_appFooter": "Copyright © 2022 <a href=\"https://monai.io/\">Project MONAI</a><br>Generated by <strong>DocFX</strong>",
"_appFooter": "Copyright © 2022-2023 <a href=\"https://monai.io/\">Project MONAI</a><br>Generated by <strong>DocFX</strong>",
"_gitContribute": {
"repo": "https://github.com/Project-MONAI/monai-deploy-informatics-gateway.git",
"branch": "main",
Expand Down
4 changes: 2 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
47 changes: 47 additions & 0 deletions docs/setup/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,30 @@ 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

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
Expand Down Expand Up @@ -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`
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
2 changes: 1 addition & 1 deletion src/Api/Storage/DicomFileStorageMetadata.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public sealed record DicomFileStorageMetadata : FileStorageMetadata
/// <summary>
/// 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 <seealso cref="Source"></c>
/// Note: this value is same as <see cref="FileStorageMetadata.Source"/>
/// </summary>
[JsonIgnore]
public string CallingAeTitle { get => Source; }
Expand Down
2 changes: 1 addition & 1 deletion src/Api/Storage/FhirFileStorageMetadata.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public sealed record FhirFileStorageMetadata : FileStorageMetadata

/// <summary>
/// The transaction ID of the original ACR request.
/// Note: this value is same as <seealso cref="Source"></c>
/// Note: this value is same as <see cref="FileStorageMetadata.Source"/>
/// </summary>
[JsonIgnore]
public string TransactionId { get => Source; }
Expand Down
5 changes: 3 additions & 2 deletions src/Configuration/DicomWebConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ public class DicomWebConfiguration

/// <summary>
/// Gets or sets the (postfix) name of the DICOMweb export agent used for receiving messages.
/// The agent name is combine with <see cref="MessageBrokerConfigurationKeys.ExportRequestPrefix"/>
/// for subscribing messages from the message broker service.
/// This value is appended to <see cref="MessageBrokerConfigurationKeys.ExportRequestPrefix"/>
/// as the name for subscribing to messages from the message broker service.
/// </summary>
[ConfigurationKeyName("agentName")]
public string AgentName { get; set; } = "monaidicomweb";

Expand Down
4 changes: 2 additions & 2 deletions src/Configuration/ScuConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ public class ScuConfiguration

/// <summary>
/// Gets or sets the (postfix) name of the DIMSE export agent used for receiving messages.
/// The agent name is combine with <see cref="MessageBrokerConfigurationKeys.ExportRequestPrefix"/>
/// for subscribing messages from the message broker service.
/// This value is appended to <see cref="MessageBrokerConfigurationKeys.ExportRequestPrefix"/>
/// as the name for subscribing to messages from the message broker service.
/// </summary>
[ConfigurationKeyName("agentName")]
public string AgentName { get; set; } = "monaiscu";
Expand Down
10 changes: 5 additions & 5 deletions src/InformaticsGateway/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
{
Expand Down

0 comments on commit 0330077

Please sign in to comment.