Configure DCM4CHEE for multiple clients

DCM4CHEE is able to separate the storage of images from multiple clients into different filesystems (use case would be that you have multiple clients sending to the same DCM4CHEE instance and you want to separate the storage for them so that they are independent).

To achieve this you will need to deploy multiple instances of the FileSystemMgt service and specify for each Calling AET where the images should get stored.

In this document I will use 2 clients names CLIENT1 and CLIENT2 (those will be used as Called AET):

1. Copy the required config files:

Go to your dcm4chee deploy directory and create 2 copies of the FileSystemMgt:

cd /opt/dcm4chee/server/default/deploy
cp dcm4chee-fsmgt-online-service.xml dcm4chee-fsmgt-client1-online-service.xml

cp dcm4chee-fsmgt-online-service.xml dcm4chee-fsmgt-client2-online-service.xml

cp dcm4chee-onswitchfs-service.xml dcm4chee-onswitchfs-client1-service.xml
cp dcm4chee-onswitchfs-service.xml dcm4chee-onswitchfs-client2-service.xml

2. Edit the Filesystem files:

Change the following line in dcm4chee-fsmgt-client1-online-service.xml from:

 name="dcm4chee.archive:service=FileSystemMgt,group=ONLINE_STORAGE"

to

 name="dcm4chee.archive:service=FileSystemMgt,group=ONLINE_STORAGE-CLIENT1"

Change the following lines in dcm4chee-onswitchfs-client1-service.xml from:

 name="dcm4chee.archive:service=OnSwitchStorageFileSystem"

to

name="dcm4chee.archive:service=OnSwitchStorageFileSystem-CLIENT1"

and

dcm4chee.archive:service=FileSystemMgt,group=ONLINE_STORAGE</depends>

to

dcm4chee.archive:service=FileSystemMgt,group=ONLINE_STORAGE-CLIENT1</depends>

Do the same for dcm4chee-fsmgt-client2-online-service.xml and dcm4chee-onswitchfs-client2-service.xml .

3. Startup DCM4CHEE

After starting up you should have 2 additional filesystem groups in the jmx-console named: group=ONLINE_STORAGE-CLIENT1,service=FileSystemMgt and group=ONLINE_STORAGE-CLIENT2,service=FileSystemMgt
Goto dcm4chee-web AE Management and add 2 new AETs called CLIENT1 and CLIENT2 for localhost and your DICOM port (default 11112). Return to the jmx-console and add the 2 new AETs to the StoreScp Service CalledAETitles Attribute like this:

CalledAETitles=CLIENT1\CLIENT2

Enter the group=ONLINE_STORAGE-CLIENT1,service=FileSystemMgt service and change the following attribute and apply them:

DefaultRetrieveAETitle=CLIENT1

After applying you can add a new filesystem by invoking addRWFileSystem() with your storage path (e.g. /srv/dcm4chee/archive/client1).
Invoke listFileSystems() to display the new added filesystem:

FileSystem[pk=2, /srv/dcm4chee/archive/client1, groupID=ONLINE_STORAGE-CLIENT1, aet=CLIENT1, ONLINE, RW+, userinfo=null]

Do the same for group=ONLINE_STORAGE-CLIENT2,service=FileSystemMgt and invoke listAllFileSystems() should display:

FileSystem[pk=2, /srv/dcm4chee/archive/client1, groupID=ONLINE_STORAGE-CLIENT1, aet=CLIENT1, ONLINE, RW+, userinfo=null]
FileSystem[pk=3, /srv/dcm4chee/archive/client2, groupID=ONLINE_STORAGE-CLIENT2, aet=CLIENT2, ONLINE, RW+, userinfo=null]

4. Adding client SCUs:
For linking the C-STORE SCUs to the right client we need to add every C-STORE SCU AET to dcm4chee and specifiy the FS Group ID the SCU should be linked to (we will use DCMSND_CLIENT1 and DCMSND_CLIENT2 as example C-STORE SCUs).
Goto dcm4chee-web AE Managment and add 2 new AETs called DCMSND_CLIENT1 and DCMSND_CLIENT2 and specify for FS Group ID for DCMSND_CLIENT1 = ONLINE_STORAGE-CLIENT1 and for DCMSND_CLIENT2 = ONLINE_STORAGE-CLIENT2
This will bind a Storage SCU with Calling AET = DCMSND_CLIENT1 to the ONLINE_STORAGE-CLIENT1 Filesystem Group.

To test your setup do the following with 2 different studies:

/opt/dcm4che2/bin/dcmsnd -L DCMSND_CLIENT1 CLIENT1@localhost:11112 demo_study_directory_for_client1/
/opt/dcm4che2/bin/dcmsnd -L DCMSND_CLIENT2 CLIENT2@localhost:11112 demo_study_directory_for_client2/

This will send the dicom files in demo_study_directory_for_client1 and demo_study_directory_for_client2 to the linked filesystem group.