Skip to content

Configuration

DICOM Printer 2 is configured through an XML file named config.xml located in the config/ subdirectory of the base installation path.

Configuration File Location

Default Path: %ProgramData%\Flux Inc\DICOM Printer 2\config\config.xml

If using a custom base directory (via --path), the configuration file will be at:

<base-path>\config\config.xml

Configuration Structure

The config.xml file contains three main sections:

1. General Settings

General settings control the overall behavior of the DICOM Printer 2 service, including:

  • Job checking intervals
  • Suspension time for failed jobs
  • Logging verbosity and rotation
  • License registration

See Settings Reference for a complete list of general settings.

2. Actions

Actions define the processing steps that are applied to each print job or file. DICOM Printer 2 supports multiple action types:

  • Query - Query DICOM worklists or studies for patient data
  • Store - Send DICOM objects to remote PACS or storage systems
  • Print - Send images to DICOM film printers
  • Parse - Extract data from filenames or text files
  • SetTag - Add, modify, or delete DICOM tags
  • SetSequence - Write DICOM sequence structures into the job dataset
  • Save - Save DICOM files to local directories
  • Image Manipulation - Trim, rotate, or resize images
  • Run (Plugins) - Execute external console or GUI applications
  • Notify - Send notifications

See Actions Reference for detailed information about each action type.

3. Workflow

The workflow section defines the sequence and conditional logic for executing actions. Workflows support:

See Workflow Reference for workflow configuration details.

Configuration Example

Here's a basic configuration structure:

xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE DicomPrinter SYSTEM "config.dtd">
<DicomPrinter>
  <General>
    <CheckingInterval>1000</CheckingInterval>
    <SuspensionTime>15</SuspensionTime>
    <Verbosity>35</Verbosity>
  </General>

  <Actions>
    <Query name="FindPatient">
      <!-- Query configuration -->
    </Query>
    <Store name="SendToPACS">
      <!-- Store configuration -->
    </Store>
  </Actions>

  <Workflow>
    <Perform action="FindPatient"/>
    <If field="QUERY_FOUND" value="true">
      <Perform action="SendToPACS"/>
    </If>
  </Workflow>
</DicomPrinter>

XML Validation

The configuration file must conform to the config.dtd Document Type Definition. The DTD is located in the installation directory and defines:

  • Valid elements and attributes
  • Required and optional elements
  • Element nesting rules
  • Attribute data types

Invalid configuration files will cause the service to fail to start. Check the log files for detailed validation errors.

Editing Configuration

Important: Stop the DICOM Printer 2 service before editing the configuration file.

  1. Stop the service (see Starting and Stopping the Service)
  2. Edit config.xml with a text editor
  3. Validate the XML structure
  4. Start the service
  5. Check the logs for any configuration errors

The service will log an error and fail to start if the configuration file contains XML syntax errors or DTD validation failures.

Tag Placeholders

Throughout the configuration, you can use tag placeholders to reference DICOM tag values dynamically:

  • #{GGGG,EEEE} - Tag value by group/element numbers
  • #{PatientName} - Tag value by tag name
  • #{Date} - Current date
  • #{Date,offset} - Date with offset
  • #{Date,offset,range} - Date with offset and range

See Placeholders for complete placeholder syntax and examples.

Environment Variable Interpolation

Configuration values can reference environment variables using shell-style syntax:

xml
<Host>${PACS_HOST:-192.168.1.100}</Host>
<Port>${PACS_PORT:-104}</Port>

Syntax

FormatDescription
${VAR_NAME}Replaced with the value of the environment variable. Empty if not set.
${VAR_NAME:-default}Replaced with the variable value, or default if not set.

Resolution Order

Variables are resolved in this order:

  1. System environment variables
  2. Values from config/.env file (if present)
  3. Inline default value (after :-)

.env File

Place a .env file in the config/ directory alongside config.xml:

PACS_HOST=192.168.1.200
PACS_PORT=11112
WORKLIST_AE=RIS_SERVER

This is useful for deploying the same config.xml across multiple sites with different connection parameters.