Skip to content

Display DICOM thumbnails for an appointment#993

Merged
carlosmartinez merged 3 commits intomainfrom
feat/display-thumbnails
Feb 10, 2026
Merged

Display DICOM thumbnails for an appointment#993
carlosmartinez merged 3 commits intomainfrom
feat/display-thumbnails

Conversation

@carlosmartinez
Copy link
Contributor

Display DICOM thumbnails for an appointment

Description

When the radiographer takes scans using the modality, and these are saved to the gateway and sent to the Manage API, we want to display them – more-or-less in real time – in the "take images" page.

CleanShot 2026-02-05 at 15 39 11@2x

Jira link

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

Review notes

Since this is our first time doing "SSE type stuff" in Manage, it should be sufficiently sensible that we might consider following a similar pattern in future.

Also, the polling in appointment_images_stream might not be to everyone's liking. We could use Django Channels or similar, but that would be a bit more infra. Happy to give this a try if you think it's a good idea.

Review checklist

  • Check database queries are correctly scoped to current_provider

constructor($root) {
super($root)

const streamUrl = this.$root.getAttribute('data-stream-url')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you can extend ConfigurableComponent instead?

There's a defaults and schema which automatically read data-* attributes, making this.config.streamUrl available for you automatically

Just needs a config @typedef and @augments tag too

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, good call!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you remove element and stick an informative identifier in you'll get a simpler "not found" error rather than something odd about HTMLElement 😆

Before

app-image-stream: data-stream-url attribute is not of type 'HTMLElement'

After

app-image-stream: Root element ($root) attribute (data-stream-url) not found

-       element: $root,
        component: ImageStream,
-       identifier: 'data-stream-url attribute'
+       identifier: `Root element (`$root`) attribute (\`data-stream-url\`)`

@carlosmartinez carlosmartinez force-pushed the feat/display-thumbnails branch 2 times, most recently from bf32f28 to 5c5c5f9 Compare February 9, 2026 18:21
Copy link
Contributor

@steventux steventux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💾

@carlosmartinez carlosmartinez force-pushed the feat/display-thumbnails branch from 5c5c5f9 to ab691bb Compare February 10, 2026 11:46
@sonarqubecloud
Copy link

@carlosmartinez carlosmartinez merged commit cd8cbbe into main Feb 10, 2026
14 checks passed
@carlosmartinez carlosmartinez deleted the feat/display-thumbnails branch February 10, 2026 12:05
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.

3 participants