The application in this article will allow easy storing of electrocariographs (ECGs) to a DICOM PACS.
Many ECG Cart manufacturers have got their own closed format. For Medical Images, the DICOM standard has provided hospitals with manufacturer independent solutions. Some manufacturers recently started adopting DICOM for ECG systems.
In 2008, an ECG Toolkit has been released which provides support for 3 major open ECG formats: SCP-ECG, HL7 aECG and DICOM-ECG. The Toolkit is available here.
Besides providing an ECG Library, the ECG Toolkit also has got some handy applications including a basic ECG viewer:
Using the Application
The application can be used as a Service or as a command line application.
To use the application as a service, use installutil to register the service. Start application manually from the management console.
To use the application from the command line, use:
> ECGtoPACS.exe runcmd
To configure the application, change the values specified in ECGtoPACS.exe.config:
<add key="ImportDir" value="C:\ecg2pacs" />
<add key="EraseOnSuccess" value="true" />
<add key="Mortara Compatibility" value="true" />
<add key="Server" value="127.0.0.1" />
<add key="AESCU" value="ANYSCU" />
<add key="AESCP" value="STORESCP" />
<add key="Port" value="104" />
Place a SCP-ECG, HL7 aECG or DICOM-ECG file into the ImportDir. Example ECG files can be found here.
Using the Code
Reading an ECG of unknown type can be done by:
UnknownReader reader = new UnknownReader();
IECGFormat src = reader.Read(sFilePath);
if (reader.getError() != 0)
ServiceLogger.Instance.Log("Reading ECG error: " +
reader.getErrorMessage() + "!", EventLogEntryType.FailureAudit);
if ((src == null)
ServiceLogger.Instance.Log("Unknown error during reading of ECG!",
Sending ECG to PACs is performed by:
IECGManagementSystem pacs = ECGConverter.Instance.getECGManagementSystem("PACS");
if (pacs.SaveECG(src, null, _FormatConfig) != 0)
ServiceLogger.Instance.Log("Storing ECG to PACS failed!",
Points of Interest
Retrieving of ECG information can be achieved by using five properties provided by
IECGFormat interface. The five properties are:
- 13th October, 2008: First version of