[DTOSS 12685] Emulate modality workflow - #112
Merged
Merged
Conversation
steventux
force-pushed
the
DTOSS-12685-emulate-modality-workflow
branch
from
May 18, 2026 13:43
77f5080 to
f6d4ff4
Compare
steventux
force-pushed
the
DTOSS-12685-emulate-modality-workflow
branch
3 times, most recently
from
May 18, 2026 15:42
1a8b888 to
4ccc345
Compare
steventux
marked this pull request as ready for review
May 18, 2026 15:42
steventux
force-pushed
the
DTOSS-12685-emulate-modality-workflow
branch
from
May 18, 2026 15:46
4ccc345 to
80a4e1a
Compare
steventux
force-pushed
the
DTOSS-12685-emulate-modality-workflow
branch
from
May 19, 2026 13:59
f74c30f to
065f784
Compare
steventux
force-pushed
the
DTOSS-12685-emulate-modality-workflow
branch
from
May 19, 2026 14:06
065f784 to
afb3ba7
Compare
steventux
force-pushed
the
DTOSS-12685-emulate-modality-workflow
branch
from
May 19, 2026 14:23
afb3ba7 to
c346dd7
Compare
steventux
force-pushed
the
DTOSS-12685-emulate-modality-workflow
branch
from
May 20, 2026 09:55
c346dd7 to
cefa9be
Compare
steventux
force-pushed
the
DTOSS-12685-emulate-modality-workflow
branch
from
May 20, 2026 11:44
7216da1 to
512fcfd
Compare
steventux
force-pushed
the
DTOSS-12685-emulate-modality-workflow
branch
from
May 28, 2026 13:28
1572d87 to
2888bfe
Compare
steventux
force-pushed
the
DTOSS-12685-emulate-modality-workflow
branch
from
May 29, 2026 09:02
2888bfe to
b9ad112
Compare
steventux
force-pushed
the
DTOSS-12685-emulate-modality-workflow
branch
from
May 29, 2026 15:11
66376c0 to
24e6e1a
Compare
steventux
force-pushed
the
DTOSS-12685-emulate-modality-workflow
branch
from
June 1, 2026 08:23
24e6e1a to
a23d5ff
Compare
There's no point in returning worklist items for a C-FIND query when they have been completed or discontinued.
This standalone python script polls the worklist database every 5 seconds for new worklist items scheduled for today. It creates a DICOM dataset with the standard 4 images and the worklist patient info and then performs a C-STORE. The C-STORE will then be picked up by the dicom uploader and the sample images sent back to Manage.
Package the 2 required sample images we use to send to Manage from the modality emulator
| @@ -0,0 +1,36 @@ | |||
| # ADR-006: Use a modality emulator for non-production environments | |||
|
|
|||
| Date: 2026-06-15 | |||
Contributor
There was a problem hiding this comment.
date in the future seems arbitrary?
| try: | ||
| time.sleep(EMULATED_PROCEDURE_DURATION_SECONDS) | ||
| emulator.process_worklist_items(ae) | ||
| except KeyboardInterrupt: |
Contributor
There was a problem hiding this comment.
worth catching Exception as well, to recover from network blip or whatever?
carlosmartinez
previously approved these changes
Jun 4, 2026
carlosmartinez
left a comment
Contributor
There was a problem hiding this comment.
minor comments. good to go.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Description
Adds a standalone automated modality emulator python process which can also be run as a docker container.
The emulator retrieves recent worklist items from the gateway's MWL server via the C-FIND query class.
The query is scoped to MG modality worklist items scheduled today.
It creates dicom datasets using patient data from the worklist items for each laterality + view position and includes sample images for pixel data.
It then calls the gateway's C-STORE implementation to store the dicom datasets on the gateway PACS storage.
The existing compression and upload services then send the dicom files back to Manage.
Deploy scripts ensure that the emulator is not started in preprod or production environments.
emulator-demo-2026-05-14_17.18.32.mp4
Jira link
https://nhsd-jira.digital.nhs.uk/browse/DTOSS-12685
Review notes
Review checklist