Skip to content
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

Integrate MS Health Check Service #130

Merged
merged 17 commits into from
Sep 6, 2022
Merged
Show file tree
Hide file tree
Changes from 13 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
1 change: 1 addition & 0 deletions .github/.gitversion.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

next-version: 0.2.0
assembly-versioning-scheme: MajorMinorPatchTag
mode: ContinuousDelivery
branches:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ jobs:
needs: [build]
strategy:
matrix:
feature: [AcrApi, DicomDimseScp, DicomDimseScu, DicomWebExport, DicomWebStow, HealthLevel7]
feature: [AcrApi, DicomDimseScp, DicomDimseScu, DicomWebExport, DicomWebStow, HealthLevel7, Fhir]
fail-fast: false
env:
TAG: ${{ needs.build.outputs.TAG }}
Expand Down
1 change: 1 addition & 0 deletions .licenserc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ header:
- 'demos/**/.env/**'
- 'docs/templates/**'
- 'tests/Integration.Test/*.dev'
- 'tests/Integration.Test/data/**'

comment: on-failure

Expand Down
8 changes: 3 additions & 5 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,11 @@
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build-cli",
"program": "${workspaceFolder}/src/CLI/bin/Debug/net5.0/linux-x64/mig-cli",
"program": "${workspaceFolder}/src/CLI/bin/Debug/net6.0/linux-x64/mig-cli",
"args": [
"config",
"endpoint",
"http://localhost:4500"
"start"
],
"cwd": "${workspaceFolder}/src/CLI/bin/Debug/net5.0/linux-x64",
"cwd": "${workspaceFolder}/src/CLI/bin/Debug/net6.0/linux-x64",
"stopAtEntry": true,
"console": "internalConsole"
},
Expand Down
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ RUN apt-get clean \
libssl1.1 \
openssl \
sqlite3 \
curl \
&& rm -rf /var/lib/apt/lists

WORKDIR /opt/monai/ig
Expand All @@ -48,6 +49,8 @@ EXPOSE 104
EXPOSE 2575
EXPOSE 5000

HEALTHCHECK --interval=10s --retries=10 CMD curl --fail http://localhost:5000/health || exit 1

RUN ls -lR /opt/monai/ig
ENV PATH="/opt/dotnetcore-tools:${PATH}"

Expand Down
88 changes: 44 additions & 44 deletions doc/dependency_decisions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,8 @@
- :who: mocsharp
:why: Apache-2.0 (https://github.com/aws/aws-sdk-net/raw/master/License.txt)
:versions:
- 3.7.12
:when: 2022-08-16 23:05:22.203089302 Z
- - :approve
- AWSSDK.Core
- :who: mocsharp
:why: Apache-2.0 (https://github.com/aws/aws-sdk-net/raw/master/License.txt)
:versions:
- 3.7.12
:when: 2022-08-16 23:05:27.554306178 Z
- - :approve
- AWSSDK.Core
- :who: mocsharp
:why: Apache-2.0 (https://github.com/aws/aws-sdk-net/raw/master/License.txt)
:versions:
- 3.7.12.21
:when: 2022-08-16 23:05:27.995041369 Z
- 3.7.12.26
:when: 2022-09-01 23:05:22.203089302 Z
- - :approve
- AWSSDK.S3
- :who: mocsharp
Expand All @@ -46,15 +32,8 @@
- :who: mocsharp
:why: Apache-2.0 (https://github.com/aws/aws-sdk-net/raw/master/License.txt)
:versions:
- 3.7.1.165
:when: 2022-08-16 23:05:28.920368903 Z
- - :approve
- AWSSDK.SecurityToken
- :who: mocsharp
:why: Apache-2.0 (https://github.com/aws/aws-sdk-net/raw/master/License.txt)
:versions:
- 3.7.1.185
:when: 2022-08-16 23:05:29.352541363 Z
- 3.7.1.190
:when: 2022-09-01 23:05:28.920368903 Z
- - :approve
- BoDi
- :who: mocsharp
Expand Down Expand Up @@ -109,15 +88,15 @@
- :who: mocsharp
:why: MIT (https://github.com/dotnet/dotNext/raw/master/LICENSE)
:versions:
- 4.7.0
:when: 2022-08-16 23:05:32.857032968 Z
- 4.7.1
:when: 2022-09-01 23:05:32.857032968 Z
- - :approve
- DotNext.Threading
- :who: mocsharp
:why: MIT (https://github.com/dotnet/dotNext/raw/master/LICENSE)
:versions:
- 4.7.0
:when: 2022-08-16 23:05:33.298402277 Z
- 4.7.1
:when: 2022-09-01 23:05:33.298402277 Z
- - :approve
- FluentAssertions
- :who: mocsharp
Expand Down Expand Up @@ -368,8 +347,8 @@
- :who: mocsharp
:why: MIT (https://github.com/microsoft/vstest/raw/main/LICENSE)
:versions:
- 17.3.0
:when: 2022-08-16 23:05:49.229587689 Z
- 17.3.1
:when: 2022-09-01 23:05:49.229587689 Z
- - :approve
- Microsoft.Data.Sqlite.Core
- :who: mocsharp
Expand Down Expand Up @@ -566,6 +545,27 @@
:versions:
- 6.0.0
:when: 2022-08-16 23:06:02.270628975 Z
- - :approve
- Microsoft.Extensions.Diagnostics.HealthChecks
- :who: mocsharp
:why: MIT (https://github.com/dotnet/aspnetcore/raw/main/LICENSE.txt)
:versions:
- 6.0.8
:when: 2022-08-29 18:11:22.090772006 Z
- - :approve
- Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions
- :who: mocsharp
:why: MIT (https://github.com/dotnet/aspnetcore/raw/main/LICENSE.txt)
:versions:
- 6.0.8
:when: 2022-08-29 18:11:22.090772006 Z
- - :approve
- Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions.EntityFrameworkCore
- :who: mocsharp
:why: MIT (https://github.com/dotnet/aspnetcore/raw/main/LICENSE.txt)
:versions:
- 6.0.8
:when: 2022-08-29 18:11:22.090772006 Z
- - :approve
- Microsoft.Extensions.FileProviders.Abstractions
- :who: mocsharp
Expand Down Expand Up @@ -732,8 +732,8 @@
- :who: mocsharp
:why: MIT ( https://aka.ms/deprecateLicenseUrl)
:versions:
- 17.3.0
:when: 2022-08-16 23:06:13.008314524 Z
- 17.3.1
:when: 2022-09-01 23:06:13.008314524 Z
- - :approve
- Microsoft.NETCore.Platforms
- :who: mocsharp
Expand Down Expand Up @@ -793,10 +793,10 @@
- - :approve
- Microsoft.TestPlatform.ObjectModel
- :who: mocsharp
:why: MIT (https://github.com/microsoft/vstest/raw/v17.3.0/LICENSE)
:why: MIT (https://github.com/microsoft/vstest/raw/v17.3.1/LICENSE)
:versions:
- 17.3.0
:when: 2022-08-16 23:06:17.198633634 Z
- 17.3.1
:when: 2022-09-01 23:06:17.198633634 Z
- - :approve
- Microsoft.TestPlatform.TestHost
- :who: mocsharp
Expand All @@ -814,10 +814,10 @@
- - :approve
- Microsoft.TestPlatform.TestHost
- :who: mocsharp
:why: MIT (https://github.com/microsoft/vstest/raw/v17.3.0/LICENSE)
:why: MIT (https://github.com/microsoft/vstest/raw/v17.3.1/LICENSE)
:versions:
- 17.3.0
:when: 2022-08-16 23:06:18.619013325 Z
- 17.3.1
:when: 2022-09-01 23:06:18.619013325 Z
- - :approve
- Microsoft.Win32.Primitives
- :who: mocsharp
Expand Down Expand Up @@ -851,35 +851,35 @@
- :who: mocsharp
:why: Apache-2.0 (https://github.com/Project-MONAI/monai-deploy-messaging/raw/main/LICENSE)
:versions:
- 0.1.3
- 0.1.4
:when: 2022-08-16 23:06:21.051573547 Z
- - :approve
- Monai.Deploy.Messaging.RabbitMQ
- :who: mocsharp
:why: Apache-2.0 (https://github.com/Project-MONAI/monai-deploy-messaging/raw/main/LICENSE)
:versions:
- 0.1.3
- 0.1.4
:when: 2022-08-16 23:06:21.511789690 Z
- - :approve
- Monai.Deploy.Storage
- :who: mocsharp
:why: Apache-2.0 (https://github.com/Project-MONAI/monai-deploy-storage/raw/main/LICENSE)
:versions:
- 0.2.0
- 0.2.5
:when: 2022-08-16 23:06:21.988183476 Z
- - :approve
- Monai.Deploy.Storage.MinIO
- :who: mocsharp
:why: Apache-2.0 (https://github.com/Project-MONAI/monai-deploy-storage/raw/main/LICENSE)
:versions:
- 0.2.0
- 0.2.5
:when: 2022-08-16 23:06:22.426838304 Z
- - :approve
- Monai.Deploy.Storage.S3Policy
- :who: mocsharp
:why: Apache-2.0 (https://github.com/Project-MONAI/monai-deploy-storage/raw/main/LICENSE)
:versions:
- 0.2.0
- 0.2.5
:when: 2022-08-16 23:06:22.881956546 Z
- - :approve
- Moq
Expand Down
66 changes: 66 additions & 0 deletions docs/api/rest/fhir.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
<!--
~ 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.
-->

# DICOMWeb STOW-RS APIs

The `fhir/` endpoint implements the specifications defined in [section 3.1.0 RESTful API](http://hl7.org/implement/standards/fhir/http.html)
defined by HL7 (Health Level 7 International) to enable triggering new workflows. The FHIR service supports multiple versions of the Fast Healthcare Interoperability Resources (FHIR) specifications published by Health Level 7 International (HL7).

[!Note]
The service does not support `CapabilityStatement` at this moment and does not group the incoming FHIR resources. Therefore, each incoming FHIR resource will trigger a new workflow request.

The *FHIR* service provides the following endpoint.

## POST /fhir/[resource]

Triggers a new workflow request with the posted FHIR resource.

> [!IMPORTANT]
> Refer to [section 1.2 Resource Index](http://hl7.org/fhir/resourcelist.html) for a list of HL7 resources. The endpoint is designed to accept any resource and provides only syntax validation either in XML or JSON.

### Parameters

#### Query Parameters:

| Name | Type | Description |
| -------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| resource | string | (Optional) resouce type of the FHIR document. The services reject the request if the `Resource` value in the URL differs from the `Resource` value described in the posted document. |

#### Request Body:

Supported Content-Types:

- `application/fhir+json`
- `application/fhir+xml`

### Responses

Depending on the `Accept` header or the original document, the response supports the following content types:

- `application/fhir+json`
- `application/fhir+xml`

If the `Accept` header is missing or a none supported value exists, the service will return the same type as the posted document.

| Code | Data Type | Description |
| ---- | ------------------------------------------------------------- | --------------------------------------------------------------------- |
| 201 | Original JSON or XML document. | Resource created & stored successfully. |
| 400 | [OperationOutcome](http://hl7.org/fhir/operationoutcome.html) | Unable to parse the resource or mismatching resource type specified.. |
| 415 | `none` | Unsupported media type |
| 500 | [OperationOutcome](http://hl7.org/fhir/operationoutcome.html) | Server error. |

[!Note]
The `Location` header in the response given that the resources created are for inference only.
Loading