Skip to content

Update documentation for HL7 support #114

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Aug 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 18 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ jobs:
working-directory: ./src

- name: NuGetDefense Scanning
continue-on-error: true
run: |
sed -i "s/OSSINDEXAPI_TOKEN/$OSSINDEXAPI_TOKEN/g" NuGetDefense.json
sed -i "s/OSSINDEXAPI_USERNAME/$OSSINDEXAPI_USERNAME/g" NuGetDefense.json
Expand Down Expand Up @@ -382,7 +383,7 @@ jobs:
run: echo "::set-output name=${{ matrix.os }}-TAG::${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.version'] }}"

docs:
runs-on: ubuntu-latest
runs-on: windows-latest
needs: [calc-version]
env:
SEMVER: ${{ needs.calc-version.outputs.semVer }}
Expand All @@ -403,27 +404,34 @@ jobs:
restore-keys: |
${{ runner.os }}-nuget

- name: Setup DocFX
uses: crazy-max/ghaction-chocolatey@v1
with:
args: install docfx

- name: Restore dependencies
run: dotnet restore
working-directory: ./src

- name: Build Solution
run: dotnet build -c ${{ env.BUILD_CONFIG }} --nologo ${{ env.SOLUTION }}
working-directory: ./src

- name: Update docs version
run: |
sed -i -e "s,v0.0.0,v$SEMVER,g" ./docs/docfx.json
sed -i -e "s,v0.0.0,v$SEMVER,g" ./docs/index.md

- uses: nikeee/[email protected]
name: Build Docs
with:
args: docs/docfx.json
- name: Build Docs
working-directory: docs
run: docfx docfx.json
continue-on-error: false

- name: Package docs
run: |
mkdir ~/release
pushd docs/_site
zip -r ~/release/mig-docs-${{ env.SEMVER }}.zip *
popd
ls -lR ~/release
mkdir ~\release
Compress-Archive -Path docs\_site\* -DestinationPath ~\release\mig-docs-${{ env.SEMVER }}.zip
Get-ChildItem ~\release -Recurse

- name: Upload docs
uses: actions/[email protected]
Expand Down
3 changes: 2 additions & 1 deletion docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,13 @@
## 0.3.0
[Github Milestone 0.3.0](https://github.com/Project-MONAI/monai-deploy-informatics-gateway/milestone/3)

- Adds HL7 (MLLP) service to enable triggering of workflow requests using HL7 messages.
- Breaking changes with how Informatics Gateway handles incoming data and uploading to the storage service.
All incoming data are now immediately queued for upload to the storage service instead of saving to the local disk.
Therefore, if Informatics Gateway restarts or crashes during upload, any queued or incomplete uploads are lost.
In addition, during the Informatics Gateway startup, the payload assembly service removes any payloads containing
any pending files. Files that were successfully uploaded to the temporary location (`storage>temporary`) in the
bucket (`storage>temporaryBucketName`) are then moved to the payload bucket (`storage>bucketName`) before sending a workflow request.
bucket (`storage>temporaryBucketName`) are then moved to the payload bucket (`storage>bucketName`) before sending a workflow request.

## 0.2.0

Expand Down
46 changes: 46 additions & 0 deletions docs/compliance/hl7.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<!--
~ 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.
-->

# HL7 (Health Level 7)

The following reference describes the connectivity capabilities of MONAI Deploy SDK out of the box.
Users implementing the MONAI Deploy SDK must update their HL7 Conformance Statement according
to the actual capabilities of their application.

## HL7 MLLP Listener

The HL7 listener adheres to the Minimal Lower Layer Protocol (MLLP) which accepts Health Level 7
messages via TCP/IP connections at port 2575 (default). The Informatics Gateway provides basic syntax validation
based on [HL7-dotnetcore](https://github.com/Efferent-Health/HL7-dotnetcore) toolkit. All validated messages are stored
regardless of the message types.

### Communication

The Informatics Gateway allows concurrent connections for the HL7 listener and allows multiple messages to be transmitted
in a single connection or in a single command. Messages received are immediately assembled into a payload for the
[MONAI Deploy Workflow Manager](https://github.com/Project-MONAI/monai-deploy-workflow-manager) to consume.

### Configurations

The HL7 listener can be configured in the `appsettings.json` file. Refer to [Configuration](../setup/schema.md) for additional details.

### Acknowledgement Mode

The listener supports the acknowledgment mode dictated in the MSH.15 field. If no value is specified, the listener defaults to the configuration option `sendAck`.

### Supported Character Sets

The HL7 listener supports Unicode UTF8 or any 8-bit character sets.
1 change: 1 addition & 0 deletions docs/compliance/toc.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@
-->

# [DICOM](dicom.md)
# [HL7](hl7.md)
# [Open Source Licenses](open-source-licenses.md)
69 changes: 39 additions & 30 deletions docs/docfx.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,34 @@
{
"metadata": [{
"src": [{
"files": [
"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",
"DicomWebClient/Monai.Deploy.InformaticsGateway.DicomWeb.Client.csproj"
"metadata": [
{
"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",
"DicomWebClient/bin/Release/net6.0/Monai.Deploy.InformaticsGateway.DicomWeb.Client.dll"
],
"exclude": [
"**/obj/**",
"**Test/**",
"_site/**"
],
"src": "../src"
}
],
"exclude": [
"**/bin/**",
"**/obj/**",
"Test/**",
"_site/**"
],
"src": "../src"
}],
"dest": "obj/api/dotnet",
"filter": "filterConfig.yml"
}],
"dest": "obj/api/dotnet",
"filter": "filterConfig.yml",
"properties": {
"TargetFramework": "net6.0"
}
}
],
"build": {
"content": [{
"content": [
{
"files": [
"**/*.yml"
],
Expand All @@ -36,15 +43,17 @@
]
}
],
"resource": [{
"files": [
"images/**"
],
"exclude": [
"obj/**",
"_site/**"
]
}],
"resource": [
{
"files": [
"images/**"
],
"exclude": [
"obj/**",
"_site/**"
]
}
],
"globalMetadata": {
"_appTitle": "MONAI Deploy Informatics Gateway v0.0.0",
"_enableSearch": true,
Expand Down
16 changes: 10 additions & 6 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,21 +29,21 @@ After inference completes, MIG receives notifications for exporting the results

## Services

MIG contains the following standard protocols to communicate with medical devices:
MIG contains the following standard protocols for communicating with medical devices:

* **DICOM SCP**: C-ECHO, C-STORE
* **DICOM SCU**: C-STORE
* **HL7 Server**: A HL7 MLLP listener.
* **ACR DSI API**: [The American College of Radiology’s Data Science Institute API](https://www.acrdsi.org/-/media/DSI/Files/ACR-DSI-Model-API.pdf)
* **DICOMweb client**: QIDO-RS, WADO-RS, STOW-RS
* **FHIR client**: GET

[!Note]
The DICOMweb client and FHIR client are called using the ACR DSI API.
The ACR DSI API uses the DICOMweb client and FHIR client.

### DICOM SCP

The *DICOM SCP Service* accepts standard DICOM C-ECHO and C-STORE commands, which receive DICOM instances for processing. The received instances are stored immediately to the configured temporary storage location (`InformaticsGateway>storage>temporary`) and then uploaded to the shared storage for the [MONAI Deploy Workflow Manager](https://github.com/Project-MONAI/monai-deploy-workflow-manager) to consume. All DICOM instances are stored on disk as-is using the original transfer syntax described in
the [DICOM Interface](./compliance/dicom.md#dicom-scp) section. The MONAI Deploy application developer must handle any encoding/decoding of the DICOM files within the applications. Please refer to the [MONAI Deploy App SDK](https://github.com/Project-MONAI/monai-deploy-app-sdk) for further information.
The *DICOM SCP Service* accepts standard DICOM C-ECHO and C-STORE commands, which receive DICOM instances for processing. In addition, the Informatics Gateway groups received DICOM instances by the study or series based on the configuration. Once DICOM instances are grouped, they are assembled into a payload for the [MONAI Deploy Workflow Manager](https://github.com/Project-MONAI/monai-deploy-workflow-manager) to consume.

### DICOM SCU

Expand All @@ -55,18 +55,22 @@ The *DICOM SCU Service* enables users to export application-generated DICOM resu

### DICOMWeb STOW-RS

The *DICOMWeb STOW-RS Service* allows users to trigger a new workflow request by uploading a DICOM dataset.
The *DICOMWeb STOW-RS Service* allows users to trigger a new workflow request by uploading a DICOM dataset. The entire DICOM dataset is assembled into a payload for the [MONAI Deploy Workflow Manager](https://github.com/Project-MONAI/monai-deploy-workflow-manager) to consume.
It provides options to trigger a workflow with or without specifying a workflow ID/name. See the
[DICOMWeb STOW-RS](./api/rest/dicomweb-stow.md) section for more information.

### HL7 MLLP Server

The *HL7 MLLP Server* accepts Health Level 7 messages via the MLLP (Minimal Lower Layer Protocol). The received messages are validated and assembled into a payload for the [MONAI Deploy Workflow Manager](https://github.com/Project-MONAI/monai-deploy-workflow-manager) to consume.

### ACR DSI API

The ACR DSI API allows users to trigger inference requests via RESTful calls, utilizing DICOMweb and FHIR to
retrieve data specified in the request. Upon data retrieval, the Informatics Gateway uploads the data to the
shared storage and generates an `md.workflow.request` event, which notifies the
[MONAI Deploy Workflow Manager](https://github.com/Project-MONAI/monai-deploy-workflow-manager) for processing.

#### DICOMweb Export
### DICOMweb Export

A DICOMweb export agent can export any user-generated DICOM content to configured DICOM destinations. The agent
subscribes to the `md.export.request.monaidicomweb` events generated by the [MONAI Deploy Workflow Manager](https://github.com/Project-MONAI/monai-deploy-workflow-manager)
Expand Down
20 changes: 16 additions & 4 deletions docs/setup/schema.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ The `InformaticsGateway` configuration section contains the following sub-sectio
| dicomWeb | DICOMweb service configuration options | [DicomWebConfiguration](xref:Monai.Deploy.InformaticsGateway.Configuration.DicomWebConfiguration) |
| export | Export service configuration options | [DataExportConfiguration](xref:Monai.Deploy.InformaticsGateway.Configuration.DataExportConfiguration) |
| fhir | FHIR service configuration options | [FhirConfiguration](xref:Monai.Deploy.InformaticsGateway.Configuration.FhirConfiguration) |
| hl7 | HL7 listener configuration options | [Hl7Configuration](xref:Monai.Deploy.InformaticsGateway.Configuration.Hl7Configuration) |
| storage | Storage configuration options, including storage service and disk usage monitoring | [StorageConfiguration](xref:Monai.Deploy.InformaticsGateway.Configuration.StorageConfiguration) |
| messaging | Message broker configuration options | [MessageBrokerConfiguration](xref:Monai.Deploy.InformaticsGateway.Configuration.MessageBrokerConfiguration) |
| Cli | The configuration used by the CLI | - |
Expand Down Expand Up @@ -73,15 +74,15 @@ The `InformaticsGateway` configuration section contains the following sub-sectio
}
},
"messaging": {
"publisherServiceAssemblyName":"Monai.Deploy.Messaging.RabbitMQ.RabbitMQMessagePublisherService, Monai.Deploy.Messaging.RabbitMQ",
"publisherServiceAssemblyName": "Monai.Deploy.Messaging.RabbitMQ.RabbitMQMessagePublisherService, Monai.Deploy.Messaging.RabbitMQ",
"publisherSettings": {
"endpoint": "localhost",
"username": "username",
"password": "password",
"virtualHost": "monaideploy",
"exchange": "monaideploy"
},
"subscriberServiceAssemblyName":"Monai.Deploy.Messaging.RabbitMQ.RabbitMQMessageSubscriberService, Monai.Deploy.Messaging.RabbitMQ",
"subscriberServiceAssemblyName": "Monai.Deploy.Messaging.RabbitMQ.RabbitMQMessageSubscriberService, Monai.Deploy.Messaging.RabbitMQ",
"subscriberSettings": {
"endpoint": "localhost",
"username": "username",
Expand All @@ -95,16 +96,27 @@ The `InformaticsGateway` configuration section contains the following sub-sectio
}
},
"storage": {
"temporary": "/payloads",
"bufferRootPath": "./temp",
"tempStorageRootPath": "/incoming",
"bucketName": "monaideploy",
"storageRootPath": "/payloads",
"temporaryBucketName": "monaideploy",
"serviceAssemblyName": "Monai.Deploy.Storage.MinIO.MinIoStorageService, Monai.Deploy.Storage.MinIO",
"settings": {
"endpoint": "localhost:9000",
"accessKey": "admin",
"accessToken": "password",
"securedConnection": false,
"region": "local"
"region": "local",
"executableLocation": "/bin/mc",
"serviceName": "MinIO"
}
},
"hl7": {
"port": 2575,
"maximumNumberOfConnections": 10,
"clientTimeout": 60000,
"sendAck": true
}
},
"Logging": {
Expand Down
2 changes: 1 addition & 1 deletion tests/Integration.Test/Features/HealthLevel7.feature
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Feature: Health Level 7
| 2.6 |
| 2.8 |

@messaging_workflow_request @messaging
@messaging_workflow_request @messaging @retry(10)
Scenario Outline: Ability to receive and store multiple messages in a single batch
Given HL7 messages in version <version>
When the message are sent to Informatics Gateway in one batch
Expand Down