DICOM Modality Worklist Server
The DICOM Server, DSRSVC, is in use for many years in my custom software projects. It's a windows based service that is easily installed and configured. I've been using it since 2008 for various purposes and it is now a very stable and reliable software.
In this post I'm going to present its use as a Modality Worklist Server (or in short MWL SCP), explain how to install the software and how to configure the database to match your needs. Then, on the next post, I'm going to combine it together with processing HL7 order message to schedule a new work item. This will close the gap between HL7 and DICOM and we'll have most of the parts of IHE's radiology schedule workflow (SWF) integration profile.
In this post I'm going to present its use as a Modality Worklist Server (or in short MWL SCP), explain how to install the software and how to configure the database to match your needs. Then, on the next post, I'm going to combine it together with processing HL7 order message to schedule a new work item. This will close the gap between HL7 and DICOM and we'll have most of the parts of IHE's radiology schedule workflow (SWF) integration profile.
What's the difference between a DICOM Server and a PACS?
Throughout the years, as PACS evolved, there were many debates about what is the feature set that makes a PACS? Does it have to have a Viewer? Does it have to provide all DICOM services? Should it have HL7? Many questions and even more answers. Calling it a DICOM Server is a laundry cleaning bypass of all that. It's a DICOM Server meaning it serves requests for DICOM Clients. What services does it provide? DSRSVC is a Storage SCP by default and you can add more services to it as you like using a plugin API. In the download page you'll find two plugins. The INI file plugin provides configuration for the storage service. The MS SQL Server DICOM Database Plugin adds:
- Query/Retrieve SCP,
- Storage Commitment SCP and
- Modality Worklist SCP
Throughout the years it was used in all kind of applications, as an inbox for web viewer, as a CAD engine, as a departmental archive, as a proxy, as a bridge, and many more.
If you're looking to speed up development and use an off-the-shelf software product that you can easily extend, customize and integrate with your system, read on.
If you're looking to speed up development and use an off-the-shelf software product that you can easily extend, customize and integrate with your system, read on.
Installing the basic Server
You can use the DICOM server without any configuration just to store incoming DICOM files on port 104.
- Download the DICOM Server from (updated version, thanks Igor) here (win32 version) or from here (x64 version).
- Extract the content of the Zip file,
- CD to DSRSVC\DistWin32 and Copy DicomServer.EXE to your desired folder. Make sure not to copy DicomServer.INI because it is part of the DB plugin.
- From command line run DicomServer.EXE -i
This will install it as a service. You can also run it from command line with DicomServer.EXE -r
To uninstall, first stop it and than run DicomServer.EXE -u
After doing that you should see a new service installed in you services control panel (Start services.msc) called "Storage DICOM Service"
The DICOM Storage Service in the services control panel |
By default it will start and stop with your system, listen on port 104 and save new DICOM files into \DSRSVC i.e. if your system is on C:\ then it will be in C:\DSRSVC
Adding Q/R SCP and MWL SCP
To add Modality Worklist, Storage Commitment and Query/Retrieve we'll need a database to record the images, key attributes and worklist records. The DicomDBPlugin.DLL adds this functionality.
As a start you'll need a MS SQL Server. An express version will do.
Database Creation Scripts |
Follow these steps:
- Run DicomDB_CREATE_SCRIPT.sql to create the RZ_DICOM schema,
- Run DicomDB_INSERT_STATIC_DATA_SCRIPT.sql,
- Copy DicomDBPlugin.DLL to the folder where the DicomServer.EXE is and rename it to DSRSVCP.DLL
- Copy DicomServer.INI to the same folder and change the connection string to match your database server and credentials.
- Restart the service or install it and start it if you didn't already do so.
Now you have the same service but every file is processed and recorded in the database and you have Q/R SCP for that and you can configure it as you like in the configuration table.
The Plugin Model
DSRSVC has a plugin API model. The behavior of the service is fully controlled and configurable using the plugin DLL DSRSVCP.DLL. When you license the software, you can get the API header files and source files for the two plugins in the package. In the coming posts, I'll release the full source code of the INI file plugin project that can be used as an example.
How to configure the Q/R SCP and MWL SCP of the Database Plugin
The supported tags for Q/R and MWL are all dynamic and controlled using the column names of the database views.
Database Views to control Q/R and MWL |
Each of these views has column names identical to DICOM attribute names. The C-FIND and C-MOVE views has also Q/R level in their name so a patient level query will be made from the CFIND_PATIENT_VIEW. There's no distinction between the query models and all are mapped to the same views. To add a supported column, all you need to do is to add the appropriate column name to the view that is mapped to the query and that's it. Oh, and you need to get the data for it. If you implement the plugin API that's easy.
Mapping Sequence Matching to Database Views
The MWL C-FIND command makes extensive use of sequence matching. In sequence matching, a sequence element in the query is matched to database tables. The DB plugin does this mapping by using a column named as the sequence tag as the relationship key between the parent and child tables.
The root view is CFIND_MWL_VIEW that has a column names ScheduledProcedureStepSequence that is the name of the DICOM tag. The child view is CFIND_ScheduledProcedureStepSequence_VIEW that also has the same field name.
Adding more sequences for example for codes is done dynamically in the same way and no software change is required other than adding the views to the database.
To test the MWL SCP you can run the SQL script DicomDB_INSERT_MWL_TEST_DATA_SCRIPT.sql and run the modality worklist client for the Modality Worklist SCU post.
Promises
In the next post I'm going to show how to use HL7Kit Pro to receive a HL7 message with imaging service order and populate the database with the information from it to have a new Modality Worklist item and then use the Modality Worklist example to query the DICOM server and get this work entry.'메모' 카테고리의 다른 글
경심, 부심, 중심...펌 (0) | 2014.04.28 |
---|---|
윈도우8 smartscreen 스마트스크린 끄기...펌. (0) | 2014.04.12 |
Creation of a DICOMDIR File...펌 (0) | 2014.04.08 |
DICOM Server Configuration...펌 (0) | 2014.04.07 |
DICOM Client Configuration...펌 (0) | 2014.04.07 |