polyseminar

Home / Video labs / CIIP

Follow an exam through the modality worklist

Two copies of the same CT scan can sit in the same PACS. One has the patient ID the hospital registered and an accession number that ties it to its order. The other has an ID someone typed at the scanner and no accession number. Orthanc runs with its worklists plugin, a script plays the RIS, and DCMTK plays the scanner. You follow one exam from the order to the worklist to the PACS, then skip the worklist and make the second copy yourself.

Playing loads the video from YouTube, which then receives your IP address and may store data on your device. See the privacy notice, or watch on YouTube.

Get the lab files on GitHub →

Published

Never load real patient data, including your own scans, and never point these tools at a hospital system without permission.

What you will do

  • Read an HL7 version 2 ORM^O01 order: its PID, ORC, and OBR segments and the accession number.
  • Query a modality worklist with C-FIND as the scanner, and read the entry's tags.
  • Check that the images carry the patient ID, accession number, and Study Instance UID from the order.
  • Explain why a study scanned without the worklist matches no order, and what to check when the worklist goes wrong.

What you need

  • Docker: Docker Desktop on Windows 11 or macOS, or Docker Engine with the Compose plugin on Linux. Docker Desktop is free for personal use, education, and small businesses, and larger organizations need a paid subscription, so ask your IT team before you install it on a work computer.
  • At least 8 GB of RAM and about 3.5 GB of free disk space.
  • Stop any earlier lab first, with docker compose down in its folder. All the labs use ports 8042 and 4242.

Who does what

A doctor orders the exam in the electronic health record (EHR). The radiology information system (RIS) schedules it and gives the order an accession number. The scanner, which DICOM calls a modality, makes the images, and the PACS stores them.

Orders travel as HL7 messages and images as DICOM. The modality worklist is where the two meet: the scanner asks which exams are scheduled for it and copies their details into every image. The PACS, the radiologist's reading list, and the report all use the accession number to find the order again.

Start the lab

Start the PACS and download the study

download saves a public CT study in a Docker volume. It ends with a list of folders: one collection, one patient, two studies, and one series in each study.

docker compose up -d
docker compose run --rm download

Open http://localhost:8042 and sign in with user orthanc and password orthanc. The study list is empty, and so is **Worklists** in the menu on the left.

The order

Send the order

order plays the RIS. It prints the order the RIS sends, an HL7 version 2 message.

docker compose run --rm tools order
The RIS sends an order (HL7 ORM^O01):
  MSH|^~\&|RIS|RADIOLOGY|BROKER|RADIOLOGY|202611061400||ORM^O01|202611061400|P|2.5.1
  PID|1||PAN_03||PAN_03|||F
  ORC|NW|A1001|||SC||^^^202611061400
  OBR|1|A1001||CTABDC^CT abdomen with contrast||||||||||||||A1001||||||CT

Worklist entry for CT1: patient PAN_03, accession A1001, CT abdomen with contrast

Each line is a segment, and | separates its fields. PID is the patient, ORC says this is a new order (NW), and OBR is the exam: the procedure, the accession number A1001, and the modality CT. Then order does what a broker does in a hospital: it turns the message into a DICOM worklist entry for the scanner whose AE title is CT1. Refresh **Worklists** in the browser to see it.

The worklist

Ask for the worklist as the scanner

worklist plays the scanner. It sends a C-FIND to the PACS as CT1 with DCMTK's findscu, asking which CT exams are scheduled for that station.

docker compose run --rm tools worklist
I: Find Response: 1 (Pending)
...
I: (0008,0050) SH [A1001 ]          AccessionNumber
I: (0010,0010) PN [PAN_03]          PatientName
I: (0010,0020) LO [PAN_03]          PatientID
I: (0020,000d) UI [1.2.276.0.7230010.3.1.2...]  StudyInstanceUID
I: (0040,0100) SQ                   ScheduledProcedureStepSequence
I:     (0008,0060) CS [CT]                         Modality
I:     (0040,0001) AE [CT1 ]                       ScheduledStationAETitle
I:     (0040,0002) DA [20261106]                   ScheduledProcedureStepStartDate
I:     (0040,0007) LO [CT abdomen with contrast]   ScheduledProcedureStepDescription

The answer is the entry, as DICOM tags: the accession number, the patient's name and ID, and a Study Instance UID assigned before any image exists. Below them is the scheduled step. On a real scanner, the technologist sees these entries as a list, picks the patient on the table, and the scanner copies the details into every image, so nobody types the name. Your UID and date differ.

The scan

As a shortcut, this PACS removes an entry once a complete study with its Study Instance UID has arrived. In a hospital, the scanner reports the exam itself with another DICOM service, Modality Performed Procedure Step (MPPS): in progress when the scan starts, and completed when it ends. Images in the PACS don't prove that the exam was completed.

Scan from the worklist

scan takes the entry, writes the patient, the accession number, and the Study Instance UID into a copy of each image, and sends all 226 to the PACS as CT1.

docker compose run --rm tools scan
From the worklist: patient PAN_03, accession A1001, CT abdomen with contrast
Sent 226 CT images to the PACS

Refresh the study list: patient PAN_03, CT abdomen with contrast, accession A1001. The study matches its order. Wait about 15 seconds and refresh **Worklists**: the entry is no longer there.

Without the worklist

Type the ID by hand

With an ID after it, scan skips the worklist and uses that ID as if the technologist had typed it at the console, without the underscore and with no accession number.

docker compose run --rm tools scan PAN03
No worklist: patient ID typed by hand as PAN03, no accession number
Sent 226 CT images to the PACS

Refresh the study list. It now shows two patients, PAN_03 and PAN03. The second study matches no order. When the radiologist opens exam A1001 from the reading list, this study isn't part of it, and someone has to find it and fix it by hand before it can be reported.

When the worklist goes wrong

CheckWhy
The scanner's AE title and the station on the orderAn entry for CT1 doesn't show on CT2.
The dateThe scanner's query may ask only for today's exams.
The accession number in the imagesWithout it, nothing after the scanner can find the order.

If it doesn't work

What you seeWhat to do
worklist prints nothingThe worklist is empty. Run order first. After a scan, the entry closes by itself.
The worklist for CT1 is empty from scanRun order first.
scan fails at once, before SentDownload the study first, with docker compose run --rm download.
Accession A1001 is already on the worklist from orderThe entry from an earlier order is still open. Run scan, or reset with docker compose down -v.
The entry stays on **Worklists** after scanWait 15 seconds and refresh. It closes only once the PACS has the whole study.
port is already allocatedAnother program uses port 8042 or 4242, often the PACS from an earlier lab. Run docker compose down in that lab's folder.
no configuration file provided: not foundThe terminal is not in the lab folder. Open it in the folder with compose.yaml.
Cannot connect to the Docker daemonStart Docker Desktop and wait until the engine is running. On Linux, start the Docker service.

Sources: The current DICOM standard, PS3.4 Annex K (Basic Worklist Management) and Annex F (MPPS); IHE Radiology Technical Framework, Scheduled Workflow; Orthanc worklists plugin; DCMTK documentation: findscu, dcmodify, storescu; Chen, L., et al. (2022). CTpred-Sunitinib-panNET. The Cancer Imaging Archive; Docker Desktop license terms. Polyseminar is an independent publisher. See the independence notice.