Appearance
Manual Matching
DICOM Printer 2 supports operator-driven worklist matching for jobs that cannot be matched automatically. The workflow uses a parked-job directory, a .match companion file, and the DICOM Printer Console for the operator UI.
Where is the manual-matching UI? Manual matching is handled by the DICOM Printer Console (
DICOMPrinterConsole.exeWebView2 desktop +DICOMPrinterApi.exeHTTP service,DICOMPrinterApiService). Thedicom-printer-2-queue/install directory andOpenQueueDashboard.exelauncher are compatibility aliases for the Console. See DICOM Printer Console for the UI.
This page documents the on-disk contract that makes manual matching work — the directory layout, the .match companion file, and how DicomPrinter.exe consumes them. Use it when integrating other tooling or when troubleshooting matches that do not get picked up.
How it works
- The workflow performs a Manual query action. Many configs name that action
ManualMatch, but it is still just<Query type="Manual">. The Manual query parks the job's files intoqueue/manual/and sets the Held flag so file deletion is suppressed and workflow execution stops. - The Console (or another tool that follows the same contract) presents the parked job to the operator, runs a worklist or PACS query, and writes a
.matchcompanion file beside the job's.dxi. - The job is moved from
queue/manual/back toqueue/. DicomPrinter.exepicks the job up on the next checking interval, reads the.matchfile, applies the tag values to the job's DICOM dataset, and resumes the workflow after the Manual query action.
The Held flag also clears the .meta retry counter, so a job that has exhausted its retry budget regains a fresh budget on resume.
Operator workflow
See DICOM Printer Console § Manual matching for the UI walkthrough. The user-facing flow is:
- Open the Console; the parked job appears in the Review tab.
- Review page previews of the original document.
- Query a configured Worklist, Study, or PACS endpoint. The Console deduplicates endpoints by host/port/peer AE/local AE and labels each with the contributing config element.
- Select a candidate and (optionally) edit values; Apply Match is enabled when the form holds enough exam data and proposed values differ materially from the seeded values.
- The Console writes the
.matchcompanion file and returns the job toqueue/.
Directory layout
DP2's runtime root (default %ProgramData%\Flux Inc\DICOM Printer 2) has these queue-related directories:
<root>/
.env Environment-variable values (optional)
.env.local Local environment overrides (optional)
config/
config.xml DP2 configuration (parse rules + Query endpoints)
.env Environment-variable overrides (optional)
.env.local Config-local environment overrides (optional)
queue/ Active jobs awaiting processing
manual/ Jobs parked by ManualQuery for manual matching
queue_expired/ Expired jobs
queue_removed/ Jobs removed via the ConsoleEach job is a set of files sharing a stem and described by its .dxi manifest:
| File | Role |
|---|---|
<jobId>.dxi | Job descriptor / manifest. Lists the payload files (PDF, images, text) that belong to the job. |
<jobId>.txt | Extracted text content used by ParseJobTextFile. |
<jobId>_*.png | Rendered page images displayed by the Console preview. |
<jobId>.match | DICOM tag assignments applied on resume. Created by the Console (or any compatible matcher). |
<jobId>.match.json | Optional JSON-shaped sidecar containing the matched dataset, used by <Query type="Manual"> to round-trip private tags safely. |
<jobId>.meta | Retry counter and timestamps used by <Suspend>. Deleted by ManualQuery so the job restarts with a fresh budget. |
.match file format
The .match file is a plain-text companion that contains one DICOM tag assignment per line in (GGGG,EEEE)=value format:
(0010,0010)=EXAMPLE^PATIENT
(0010,0020)=EXAMPLE-MRN
(0008,0050)=EXAMPLE-001
(0008,1030)=Example Study
(0020,000D)=2.25.291177441910621254982660527575177645719- Tag numbers are written in the canonical
(GGGG,EEEE)form with hexadecimal group/element. - Values are written as the raw UTF-8 string DCMTK expects for the tag's VR.
- One assignment per line; lines that fail to parse are skipped with a log warning.
Private tags
Private tags require the private creator block to exist before the private-data slot is populated. The .match.json sidecar (used by the Manual query round-trip) registers the private creator before insertion. When writing a .match text file by hand, register the creator first (e.g. via a preceding SetTag) or use the JSON sidecar.
StudyInstanceUID
For matches that need to land on an existing study, populate (0020,000D) in the .match file. The Console fills this from the selected worklist or Study Root record when applicable.
Required configuration
The matching surface (Console or third-party tool) reads config/config.xml from the runtime root and extracts:
ParseJobTextFilerules — regex patterns used to seed the form from the job's extracted text. These are the same rulesDicomPrinter.exeuses, so seeded values stay consistent across the two.- Query endpoints — host, port, AE titles, and timeout settings for each
<Query>action defined in the config. Worklist, Study, and PACS endpoints are all enumerated and deduplicated.
Environment variable interpolation
config.xml values support ${VAR:-default} interpolation:
- Root
.envand.env.localare loaded from the DP2 runtime root. config/.envandconfig/.env.localare loaded next.- Process environment variables override all file values.
- The inline default is used as a fallback.
Example root .env or config/.env:
WORKLIST_HOST=192.168.1.50
WORKLIST_PORT=11112
WORKLIST_AE=DIMODThe Console/API uses this same resolver when it reads query endpoints for manual matching, storage endpoint listing, inline C-ECHO, and query-test actions.
Endpoint configuration (<Query type="Manual">)
ConnectionParameters on a Manual query are optional — DP2 itself does not perform a C-FIND when it sees type="Manual". The Console uses the other <Query> actions in the config (Worklist, Study, Patient) as the endpoints it can query when the operator needs to look something up.
A minimal Manual query that does nothing but park the job:
xml
<Query name="ParkForManualMatch" type="Manual" />A typical workflow performs that Manual query action when automatic matching fails:
xml
<Workflow>
<Perform action="FindWorklistEntry"/>
<If field="QUERY_FOUND" value="0">
<Statements>
<Perform action="ParkForManualMatch"/>
</Statements>
</If>
<Perform action="SendToPACS"/>
</Workflow>The Manual query action parks the job. When DP2 sees the matched job back in queue/, it applies the file's assignments and continues after that action.
Auto-refresh and detection
The API service watches the queue/, queue/manual/, and queue_expired/ directories with filesystem watchers and the Console polls every 30 seconds as a fallback. DicomPrinter.exe polls queue/ on its configured <CheckingInterval> (default 1 second), so a returned-from-manual job is normally picked up within one or two seconds of the move.