Skip to content

Commit

Permalink
Merge pull request #314 from HicServices/develop
Browse files Browse the repository at this point in the history
Release v6.0.2
  • Loading branch information
jas88 authored Nov 4, 2022
2 parents 6060e29 + 8a53af3 commit c807c02
Show file tree
Hide file tree
Showing 16 changed files with 120 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/dotnet-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-dotnet@v2
- uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
- name: Get version
Expand Down
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [6.0.2] 2022-11-04

- Documentation updates
- Updated to target RDMP version 8.0.5
- Update for changed CsvHelper API from RDMP

## [6.0.1] 2022-09-27

- Fixed issue running `ExecuteCommandCreateNewImagingDatasetSuite` when using a YamlRepository
Expand Down Expand Up @@ -382,7 +388,8 @@ Updated to be compatible with RDMP 4.2

- Initial commit from private repo

[Unreleased]: https://github.com/HicServices/RdmpDicom/compare/v6.0.1...develop
[Unreleased]: https://github.com/HicServices/RdmpDicom/compare/v6.0.2...develop
[6.0.2]: https://github.com/HicServices/RdmpDicom/compare/v6.0.1...v6.0.2
[6.0.1]: https://github.com/HicServices/RdmpDicom/compare/v6.0.0...v6.0.1
[6.0.0]: https://github.com/HicServices/RdmpDicom/compare/v5.0.12...v6.0.0
[5.0.12]: https://github.com/HicServices/RdmpDicom/compare/v5.0.11...v5.0.12
Expand Down
Binary file added Documentation/Images/AddSemEHRCatalogue.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Documentation/Images/AddSemEHRCatalogueToCic.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Documentation/Images/SemEHRError.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Documentation/Images/SemEhrConfigUI.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
61 changes: 61 additions & 0 deletions Documentation/NlpPlugin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# NLP Cohort Building

1. [Background](#Background)
1. [Loading Data](#loading-data)
1. [Starting the REST API](#starting-the-rest-api)
1. [Adding the API endpoint in RDMP](#adding-the-api-endpoint-in-rdmp)

## Background
Imaging studies are often accompanied by a clinical report of findings. This is typically
stored in a 'Structured Report' (SR). The text stored in these reports can be very helpful
for cohort building. The free text and tree structure of SRs make them difficult to process
into a relational database. A better approach is to use a dedicated NLP framework and query
it from the Cohort Builder. One such NLP tool is [SemEHR]

RDMP supports [cohort building plugins](https://github.com/HicServices/RDMP/blob/develop/Documentation/CodeTutorials/CohortBuildingApiPlugins.md#cohort-building-api-plugins).
A plugin has been created to interface with SR data held in a [SemEHR] instance.

## Loading Data
Before you can use the plugin you must first load your data into a SemEHR instance.

https://github.com/SMI/SmiServices/tree/master/src/applications/SRAnonTool

## Starting the REST API
The REST API must be configured and accessible over HTTPS. Test that you are able
to get a response from the API with your web browser

## Adding the API endpoint in RDMP

In RDMP API endpoints are modelled as [Catalogue] objects in the same way as regular relational database datasets. Create a new one by right clicking any existing [Catalogue] and selecting 'Create New Sem EHR Catalogue':

![Adding SemEHR Catalogue](Images/AddSemEHRCatalogue.png)

Alternatively from the command line you can run:

```
./rdmp CreateNewSemEHRCatalogue
```

## Using the API endpoint in Cohort Builder
Create a new [CohortIdentificationConfiguration]. Ensure you have [enabled query caching](https://github.com/HicServices/RDMP/blob/develop/Rdmp.Core/CohortCreation/Readme.md#creating-a-cache).

Add your new 'Sem EHR Catalogue' to the root container of the configuration

![Adding SemEHR Catalogue to Cohort Identification Configuration](Images/AddSemEHRCatalogueToCic.png)

Double click the added cohort set to launch the configuration screen.

![Configure SemEHR Query](Images/SemEhrConfigUI.png)

Enter a search term, negation (optional), date range (optional) and Modality.

Ensure the Settings are correct and run the query. If the 'Working' column changes to 'Crashed' then you can double click the row to view the error:

![SemEHR Run Error](Images/SemEHRError.png)

To get back to the settings/query screen after error right click the cohort set and choose 'Edit'


[SemEHR]: https://github.com/CogStack/CogStack-SemEHR
[Catalogue]: https://github.com/HicServices/RDMP/blob/develop/Documentation/CodeTutorials/Glossary.md#catalogue
[CohortIdentificationConfiguration]: https://github.com/HicServices/RDMP/blob/develop/Documentation/CodeTutorials/Glossary.md#cohortidentificationconfiguration
2 changes: 1 addition & 1 deletion Packages.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
| Package | Source Code | Version | License | Purpose | Additional Risk Assessment |
| ------- | ------------| --------| ------- | ------- | -------------------------- |
| HIC.DicomTypeTranslation | [GitHub](https://github.com/HicServices/DicomTypeTranslation) | [4.0.1](https://www.nuget.org/packages/HIC.DicomTypeTranslation/4.0.1) | [GPL 3.0](https://www.gnu.org/licenses/gpl-3.0.html) | Translate dicom types into C# / database types | |
| HIC.RDMP.Plugin | [GitHub](https://github.com/HicServices/RDMP) | [8.0.0](https://www.nuget.org/packages/HIC.RDMP.Plugin/8.0.0) | [GPL 3.0](https://www.gnu.org/licenses/gpl-3.0.html) | Interact with RDMP objects, base classes for plugin components etc | |
| HIC.RDMP.Plugin | [GitHub](https://github.com/HicServices/RDMP) | [8.0.5](https://www.nuget.org/packages/HIC.RDMP.Plugin/8.0.5) | [GPL 3.0](https://www.gnu.org/licenses/gpl-3.0.html) | Interact with RDMP objects, base classes for plugin components etc | |
| SharpCompress | [GitHub](https://github.com/adamhathcock/sharpcompress) | [0.32.2](https://www.nuget.org/packages/SharpCompress/0.32.2) | [MIT] | Access diverse archive formats including RAR, 7zip | |
| Terminal.Gui | [GitHub](https://github.com/migueldeicaza/gui.cs) | [1.8.2](https://www.nuget.org/packages/Terminal.Gui/1.8.2) | [MIT] | UIs compatible with RDMP gui command line | |
38 changes: 38 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Once installed the following functionality is available:
- [Data Load](./Documentation/DataLoad.md)
- [Data Extraction](./Documentation/DataExtraction.md)
- [Caching (Fetching images from a DicomServer)](./Documentation/Caching.md)
- [NLP Cohort Building Plugin](./Documentation/NlpPlugin.md)

# Building

Expand All @@ -37,6 +38,31 @@ nuget pack ./Rdmp.Dicom.nuspec -Properties Configuration=Release -IncludeReferen

This will produce a nupkg file (e.g. Rdmp.Dicom.0.0.1.nupkg) which can be consumed by both the RDMP client and dot net core RDMP CLI.

# Debugging
Since it is annoying to have to upload a new version of the plugin to test changes you can instead publish directly to the RDMP bin directory.

For example imagine that you have RDMP checked out and building in the following directory:
```
D:\Repos\RDMP\Application\ResearchDataManagementPlatform\bin\Debug\net6.0-windows
```

Build the RdmpDicom project to this directory:

```
cd D:\Repos\RdmpDicom
dotnet publish -o D:\Repos\RDMP\Application\ResearchDataManagementPlatform\bin\Debug\net6.0-windows -r win-x64
cd D:\Repos\RdmpDicom\Rdmp.Dicom.UI
dotnet publish -o D:\Repos\RDMP\Application\ResearchDataManagementPlatform\bin\Debug\net6.0-windows -r win-x64
```

Now run RDMP:
```
D:\Repos\RDMP\Application\ResearchDataManagementPlatform\bin\Debug\net6.0-windows\ResearchDataManagementPlatform.exe
```

Attach the visual studio debugger with `Debug=>Attach To Process...`



# New CLI Commands

Expand All @@ -53,3 +79,15 @@ _Connects to the given PACS and writes CFind response for date range into output
```
_Connects to the given PACS and fetches all images between the date ranges (requires firewall allows incomming connections from destination server)_

# Troubleshooting
Ensure that you have the Rdmp.Dicom plugin installed and that it has loaded correctly. Search for it with `Ctrl+F` and enter "Plugin". If it is not appearing at all then it is not installed. If it appears under 'Old Plugins' then your Rdmp.Dicom version is out of date and you will need to get the latest version from GitHub Releases.

Check the messages that appear when starting RDMP from the command line, e.g.:

`./rdmp.exe listsupportedcommands --logstartup > out.txt`

If using the RDMP Windows Client you can check that Rdmp.Dicom has loaded correctly by looking at the Types loaded. Use the menu `Diagnostics=>Plugins=>List All Types`. This will generate a file with all the Types RDMP sees (~33,000) you should see all plugin Types here too, for example:

- Rdmp.Dicom.ExternalApis.SemEHRApiCaller
- Rdmp.Dicom.ExternalApis.SemEHRConfiguration
- Rdmp.Dicom.ExternalApis.SemEHRResponse
2 changes: 1 addition & 1 deletion Rdmp.Dicom.Library.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<copyright>Copyright 2018-2019</copyright>
<dependencies>
<dependency id="HIC.DicomTypeTranslation" version="4.0.1" />
<dependency id="HIC.RDMP.Plugin" version="8.0.0" />
<dependency id="HIC.RDMP.Plugin" version="8.0.5" />
<dependency id="SharpCompress" version="0.32.2" />
<dependency id="Terminal.Gui" version="1.8.2" />
</dependencies>
Expand Down
6 changes: 3 additions & 3 deletions Rdmp.Dicom.Tests/Rdmp.Dicom.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@
<ProjectReference Include="..\Rdmp.Dicom\Rdmp.Dicom.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="HIC.BadMedicine.Dicom" Version="0.0.14" />
<PackageReference Include="HIC.RDMP.Plugin.Test" Version="8.0.0" />
<PackageReference Include="HIC.BadMedicine.Dicom" Version="0.0.15" />
<PackageReference Include="HIC.RDMP.Plugin.Test" Version="8.0.5" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.2" />
<PackageReference Include="NUnit" Version="3.13.3" />
<PackageReference Include="NUnit3TestAdapter" Version="4.2.1" />
<PackageReference Include="NUnit3TestAdapter" Version="4.3.0" />
<PackageReference Include="NunitXml.TestLogger" Version="3.0.127" />
</ItemGroup>
<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion Rdmp.Dicom.UI/Rdmp.Dicom.UI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<ProjectReference Include="..\Rdmp.Dicom\Rdmp.Dicom.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="HIC.RDMP.Plugin.UI" Version="8.0.0" />
<PackageReference Include="HIC.RDMP.Plugin.UI" Version="8.0.5" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
</ItemGroup>
<ItemGroup>
Expand Down
3 changes: 1 addition & 2 deletions Rdmp.Dicom.sln
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
Databases.Integration.yaml = Databases.Integration.yaml
.github\workflows\dotnet-core.yml = .github\workflows\dotnet-core.yml
Packages.md = Packages.md
rakeconfig.rb = rakeconfig.rb
rakefile.rb = rakefile.rb
Rdmp.Dicom.Library.nuspec = Rdmp.Dicom.Library.nuspec
Rdmp.Dicom.nuspec = Rdmp.Dicom.nuspec
README.md = README.md
Expand All @@ -33,6 +31,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Documentation", "Documentat
Documentation\Caching.md = Documentation\Caching.md
Documentation\DataExtraction.md = Documentation\DataExtraction.md
Documentation\DataLoad.md = Documentation\DataLoad.md
Documentation\NlpPlugin.md = Documentation\NlpPlugin.md
EndProjectSection
EndProject
Global
Expand Down
2 changes: 1 addition & 1 deletion Rdmp.Dicom/Cache/Pipeline/CFindSource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public override SMIDataChunk DoGetChunk(ICacheFetchRequest cacheRequest, IDataLo
var filepath = Path.Combine(workingDirectory.FullName, filename);

var sw = new StreamWriter(filepath);
var writer = new CsvWriter(sw,new(CultureInfo.CurrentCulture));
var writer = new CsvWriter(sw,CultureInfo.CurrentCulture);

WriteHeaders(writer);

Expand Down
2 changes: 1 addition & 1 deletion Rdmp.Dicom/Rdmp.Dicom.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="HIC.DicomTypeTranslation" Version="4.0.1" />
<PackageReference Include="HIC.RDMP.Plugin" Version="8.0.0" />
<PackageReference Include="HIC.RDMP.Plugin" Version="8.0.5" />
<PackageReference Include="SharpCompress" Version="0.32.2" />
<PackageReference Include="Terminal.Gui" Version="1.8.2" />
</ItemGroup>
Expand Down
6 changes: 3 additions & 3 deletions SharedAssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
[assembly: AssemblyCulture("")]

// These should be replaced with correct values by the release process
[assembly: AssemblyVersion("6.0.1")]
[assembly: AssemblyFileVersion("6.0.1")]
[assembly: AssemblyInformationalVersion("6.0.1")]
[assembly: AssemblyVersion("6.0.2")]
[assembly: AssemblyFileVersion("6.0.2")]
[assembly: AssemblyInformationalVersion("6.0.2")]
[assembly: InternalsVisibleTo("Rdmp.Dicom.Tests")]

0 comments on commit c807c02

Please sign in to comment.