Using the CTP EmailService Pipeline Stage

From MircWiki
Revision as of 19:16, 20 May 2014 by Johnperry (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This article describes how to configure the CTP EmailService pipeline stage to send emails when studies are processed. The intended audience for this article is CTP administrators configuring pipelines for clinical trials.

The EmailService is a processor stage. For each DicomObject it receives, it stores the identifier of the study (StudyInstanceUID) and the time the object was encountered. If no object is encountered for a study after 10 minutes, the stage considers the study to be complete, and it then sends an email to the recipients identified in the stage's configuration element.

The EmailService is only capable of sending to SMTP email servers.

The recommended way to configure the EmailService into a pipeline is to use the Configuration editor in the Launcher program. See The CTP Launcher Configuration Editor for details.

Like all pipeline stages, the EmailService stage is configured by a single XML element in the config.xml file. The details of the element are described in the main CTP article Although the Configuration Editor obviates the need to edit or even read the XML, the default XML element is shown below for reference:

<EmailService
    name="EmailService"
    class="org.rsna.ctp.stdstages.EmailService"
    root="roots/EmailService"
    script="scripts/EmailService.script"
    smtpServer=""
    username=""
    password=""
    to=""
    from=""
    cc=""
    subject=""
    includeModality="no"
    includePatientID="no"
    includePatientName="no"
    includeStudyDate="no"
    includeAccessionNumber="no"
    logSentEmails="no"
    quarantine="quarantines/EmailService"/>

The emails sent by the stage contain the numbers of objects, series, and images in the study, plus any additional information specified by the include... attributes.

The placement of the pipeline stage in the pipeline determines whether the additional information will be PHI. To be specific, if the object received has not been de-identified, either before receipt by the pipeline or by a preceding anonymizer in the pipeline itself, then the values included in the emails will be PHI. This may be appropriate in some circumstances, but care must be taken because email transmission should not be considered to be secure.

The emails have the MIME type multipart/alternative, and include both HTML and plain text parts.

The script attribute can be used to select which studies are tracked by the EmailService stage. For details on the script language, see The CTP DICOM Filter.

In the unusual situation where email notifications are to be sent to different destinations depending on the characteristics of the study, the best configuration is to include multiple EmailService stages in the pipe and use different scripts to select which EmailService stage will track which study.