Guru Track Anon

Aug 26, 2014 at 3:29 PM
Hi,

I am quite new to API. The anonymization tool looks really useful. However, when I load up and run the sript.cs from Eclipse I get a message looking for the DICOMUI with (are you missing a using directive or assembly reference?). Any help would be appreciated or is there is something obvious that I should have done?

Regards,
Conor
Coordinator
Aug 26, 2014 at 6:16 PM
Hi Conor,

You cannot run a single cs-file of this complex script. The tool can be run as standalone (Cardan.ESAPI.Bootstrap.exe) or as binary plug-in (ESAPIAnon.esapi.dll) from Eclipse.

In both cases, you will have to build the solution yourself. As a prerequisite, you will need a DBDaemon installed.

1) Download the source code
2) Open the solution in Visual Studio. Correct the references in both projects: expand the References-folder, delete VMS.TPS.Common.Model.API and VMS.TPS.Common.Model.Types, right-click references folder and select Add Reference, select browse-tab, browse to your Eclipse installation binaries folder (e.g. C:\Program Files (x86)\Varian\Vision\11.0\Bin64), select VMS.TPS.Common.Model.API.dll and VMS.TPS.Common.Model.Types.dll and click OK.
3) Correct the IP, port number and AE title to match your DBDaemon configuration in MainViewModel.cs
4) CMove.cs has this tool's AE title "Anon" and port 106. Configure your DBDaemon to accept connections from this AE.
5) Build. If yout get errors about read-only files, delete obj- and bin-folders inside Cardan.ESAPI.Bootstrap and ESAPIAnon -folders and rebuild

Seppo
Coordinator
Aug 26, 2014 at 6:59 PM
I added a readme to the source directory : ESAPIAnon Readme.rtf. It might help with some more details. It is not complete (I have been trying to make it in my spare time, but it might get you started).
Marked as answer by rexcardan on 8/26/2014 at 12:12 PM
Coordinator
Aug 27, 2014 at 3:56 PM
Rex,

The standalone version works fine for me. When I use it as a plug-in, the UpdateStatus() function crashes with Object reference not set to an instance of an object.

Seppo
Coordinator
Aug 27, 2014 at 4:44 PM
You are the coordinator. I am just a lowly developer;)

Unfortunately, I didn't have time to get the whole plugin thing polished at the meeting. I think that System.Windows.Application crashes. Unless you have control of the calling app (eg. Bootstrap), it throws an exception. Just comment out that dispatcher call and it should work.
        private void UpdateStatus(string status)
        {
            //System.Windows.Application.Current.Dispatcher.BeginInvoke((Action)(() =>
            //{
            //    this.Status = status;
            //    RaisePropertyChanged(() => Status);
            //}), null);
        }
Aug 28, 2014 at 12:36 PM
Hi,

Thanks for the tips. It all seemed to work until I checked the folder that they were written to and it was empty.

I typed in the patient ID, selected update patient context and the current context came up with that patient name. The dropdown had a '1' in it. I typed in the new patient names, clicked anonymise, selected a folder (on the descktop) and it came up as complete. I went to the folder and there was nothing there. So close!!

I am not using the DB_Daemon and the version of visual studio that I am using is v12. I also didn't comment anything out as I wasn't sure which file required this.

Anything further I can provide, please let me know.

Best Regards,
Conor
Coordinator
Aug 28, 2014 at 3:07 PM
Conor,

The ESAPI Anon app is not an ESAPI app alone but a gateway between ESAPI and the DB Daemon. You don't have an option of "not using the DB_Daemon" to use that app. It is performing a DICOM C-Move request to the daemon based on patient ID that is accessible through the API.

In short, you have to configure the Daemon. Check out the ESAPIAnon Readme.rtf to figure out how.