Skip to content

Spike Import exported clinic - #192

Draft
steventux wants to merge 11 commits into
mainfrom
DTOSS-13327-import-exported-clinic
Draft

Spike Import exported clinic#192
steventux wants to merge 11 commits into
mainfrom
DTOSS-13327-import-exported-clinic

Conversation

@steventux

@steventux steventux commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Description

Here's a demo of how we could export a clinic's worklist from Rubie and import it using a minimal UI on the Gateway.
This decouples the connection between the two applications allowing for offline mobile van processing.

rubie-export-gateway-import-ui-2026-08-13_15.22.42.mp4

The counterpart export worklist and import resulting offline DICOM zip archive is here: https://github.com/NHSDigital/dtos-manage-breast-screening/pull/1921

The spiked worklfow steps are:

  1. While online, an admin/clinical user exports the clinic worklist from Rubie.
  2. The worklist file is saved somewhere that can be used in a mobile screening van.
  3. The worklist file is imported using the Gateway UI, this populates the Modality Worklist Server on the Gateway in the same way that sending individual worklist items over a Relay would.
  4. Screening takes place in the mobile unit.
  5. Assuming the mobile unit does NOT have internet connectivity, the resulting DICOM files remain on the Gateway's PACS server, they are not sent back to Rubie.
  6. The user can then export these DICOM files as a zip archive and save them.
  7. The zip archive can then be uploaded back into Rubie when an internet connection is available.

The spike enables an airgapped export -> import -> export -> import of Worklist and DICOM files emulating some of the offline NBSS behavour.

It comes with some significant caveats:

  • We do not handle the transport of data which would normally be persisted in Rubie as the appointment progresses eg. recording additional medical information.
  • It is necessary to run a web server on the Gateway for the UI enabling import and export of data.
  • The addition of the NHSUK frontend toolkit and other webserver dependencies more than double the size of the Gateway release package.
  • We could possibly achieve the same import/export functionality without UI at the cost of a steeper learning curve for admins or clinicians.
  • Moving data in a disconnected state like this means that the Gateway would need to be deployed within the mobile unit itself. This presents some technical challenges with how we would install/update Mobile Gateways.

Jira link

https://nhsd-jira.digital.nhs.uk/browse/DTOSS-13327

Review notes

Review checklist

  • Check database queries are correctly scoped to current_provider

This service class can import clinics from file or api and calls out to CreateWorklistItem for each appointment in the clinic.
Adds a service which monitors a directory for clinic import files and
calls ClinicImporter to process them.
@steventux steventux changed the title Dtoss 13327 import exported clinic Import exported clinic Aug 11, 2026
There are a few hacks here to get something working, file upload and database paths are all wrong and should come from gateway config.
@steventux
steventux force-pushed the DTOSS-13327-import-exported-clinic branch from 8f40e5e to b888c3e Compare August 13, 2026 14:34
Comment thread src/ui/__init__.py Fixed
Comment thread src/ui/__init__.py Fixed
Comment thread src/ui/__init__.py Fixed
@steventux steventux changed the title Import exported clinic Spike Import exported clinic Aug 13, 2026
Comment thread src/ui/__init__.py Fixed
Comment thread src/ui/__init__.py Fixed
@steventux
steventux force-pushed the DTOSS-13327-import-exported-clinic branch from 738d336 to 4e9874c Compare August 18, 2026 16:06
@steventux
steventux force-pushed the DTOSS-13327-import-exported-clinic branch from 4e9874c to e80c030 Compare August 19, 2026 09:29
This will enable us to export completed worklist items with dicom data in a batch relative to the exported worklist/clinic.
Comment thread src/ui/__init__.py Fixed
@steventux
steventux force-pushed the DTOSS-13327-import-exported-clinic branch from 2de40b2 to f1553b8 Compare September 1, 2026 15:01
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants