Conversation
Helps us to track the status changes for a worklist item.
Moving the status update for a worklist item to the service class which creates the item de-couples the C-STORE operation from worklist state transitions. This is a commonly used workaround when a modality does not make MPPS N-CREATE and N-SET operations on the worklist. The update now occurs as soon as the item is created. This reflects the point in the Rubie appointment workflow where the appointment starts, the immediate transition to IN PROGRESS makes sense. This also has the benefit of being able to DISCONTINUE items which never received any images from the modality. There is a case for this where an identity check may fail and no screening takes place.
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Fix the invalid exception syntax and make status advancement retry-safe.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 1
Open (3)
What changed in this PR
Moves the worklist status transition from C-STORE handling into worklist item creation.
Changes:
- Marks newly created items as
IN PROGRESS. - Removes C-STORE status updates.
- Updates related tests and logging.
| File | Summary |
|---|---|
tests/test_relay_listener.py |
Updates status-action expectations. |
tests/services/mwl/test_create_worklist_item.py |
Tests creation-time status behavior; contains a documentation typo. |
tests/services/dicom/test_c_store.py |
Removes obsolete status tests. |
tests/integration/test_relay_listener_processes_actions.py |
Verifies created item status. |
tests/integration/test_c_store_saves_metadata.py |
Removes obsolete integration coverage. |
src/services/storage.py |
Adjusts query formatting. |
src/services/mwl/create_worklist_item.py |
Adds the status transition; retry behavior can leave items permanently scheduled. |
src/services/mwl/__init__.py |
Adds transition logging; contains invalid Python exception syntax preventing import. |
src/services/dicom/c_store.py |
Removes C-STORE status updates. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Contributor
Author
|
Closing in favour of another approach, making status changes more flexible with allow us to preserve MPPS N-CREATE compatibility. |
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
This PR changes the default status of a worklist item to
IN PROGRESSon creation.This de-couples the
C-STOREoperation from worklist status update.We originally updated from
C-STOREas a commonly used workaround when a modality does not make MPPSN-CREATEandN-SEToperations on the worklist.This reflects the point in the Rubie appointment workflow where the appointment starts with the benefit that all workflow transitions are now initiated by Rubie and not a side effect of a modality operation.
This also has the benefit of being able to discontinue items which never received any images from the modality. There is currently a bug preventing this update if no images were stored.
We should be able to discontinue a worklist item when an identity check fails before any screening takes place.
Jira link
https://nhsd-jira.digital.nhs.uk/browse/DTOSS-12567
Review notes
Review checklist