Repository navigation
Add a RADIS_URL setting and an "Open report in RADIS" link on study pages #421
Copy link
Copy link
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Motivation
A user looking at a study in ADIT -- in the DICOM Explorer, a selective transfer result, a batch query result or a transfer task -- cannot get to the report for that study in RADIS, although both systems know the Study Instance UID and Accession Number. From the September 2026 ADIT/RADIS brainstorming ("Be able to open up a report in RADIS from a study in ADIT ... GENERAL ISSUE IN ADIT"). This is the ADIT half; RADIS gets the lookup URL in openradx/radis#310.
Current behaviour
- ADIT has no notion of RADIS: no setting, template or URL mentions it. A grep over
adit/,docs/,example.envandCLAUDE.mdonly finds references to theadit-radis-sharedlibrary and a dev spec underdocs/superpowers/specs/that cites a RADIS PR as prior art. - Both identifiers are already on every study result:
adit/core/utils/dicom_operator.py:177-189always requestsStudyInstanceUIDandAccessionNumber, and the explorer goes through the samefind_studies(adit/dicom_explorer/utils/dicom_data_collector.py:23-24). - Where they are shown today:
adit/dicom_explorer/templates/dicom_explorer/_study_infos.html:4-15(both);_studies_table.html:18,25-29(accession in a cell, UID on the action link);adit/core/templates/core/_transfer_task_detail.html:59-69(task.study_uidwith a "Show in DICOM Explorer" link --TransferTaskhas no accession number,adit/core/models.py:465-490);adit/selective_transfer/templates/selective_transfer/_query_results_table.html:23,43(UID only, in the checkbox value and download link).BatchQueryResultstores both (adit/batch_query/models.py:149,195) but the table hides them (adit/batch_query/tables.py:31-38); only the Excel export has them (adit/batch_query/utils/exporters.py:47-48,90-91). - Templates reach settings only through
adit_radis_shared.common.site.base_context_processor(adit/settings/base.py:144), which exposes project version, URL and support email. A settings-readingsimple_tagexists as precedent (base_url,adit_radis_shared/common/templatetags/common_extras.py:21-34), andexplorer_url(adit/dicom_explorer/templatetags/dicom_explorer_extras.py:9-15) is the in-app cross-link precedent.
Proposal
RADIS_URL = env.str("RADIS_URL", default="")inadit/settings/base.py, next to the other deployment settings (CALLING_AE_TITLE:389,EXCLUDE_MODALITIES:517); documented inexample.env, the "Environment Variables" section ofdocs/user-docs/admin-guide.md(:18) andCLAUDE.md(:165).- A
simple_tagradis_report_url(study_uid, accession_number=None)inadit/core/templatetags/core_extras.pythat returns""whenRADIS_URLis unset and otherwise<RADIS_URL>/reports/lookup/?study_instance_uid=...&accession_number=...(values URL-encoded; the parameter names are the contract settled in Add a lookup URL that opens a report by Study Instance UID or Accession Number radis#310). - An "Open report in RADIS" link with
target="_blank" rel="noopener noreferrer"(as RADIS's own PACS button does), rendered only when the tag returns a URL, so deployments without RADIS see no change. First in_study_infos.htmlnext to the Study Instance UID and in_transfer_task_detail.htmlnext to the explorer link; the three row/table templates (_studies_table.html,_query_results_table.html, aTemplateColumninbatch_query/tables.py) as a follow-up.
URL contract proposed in openradx/radis#310 (not settled there yet): one match redirects to the report, several show a chooser, none gives a 404, all scoped to the user's active RADIS group.
Open questions
- Product-specific
RADIS_URL, or a generic external study link setting (a list of{label, url template}with{StudyInstanceUID}/{AccessionNumber}placeholders)? The generic form also serves a PACS web viewer (the "viewer for images" bullet) and mirrors RADIS's genericpacs_link.RADIS_URLis the smaller change and the sibling interoperability items (batch transfer file from a collection, start a transfer from RADIS) can reuse it; recommended for now, the maintainer's view on product coupling decides. - Env setting or admin-editable
DicomAppSettingsfield? Env matches every other deployment setting and needs no migration; there is no precedent for URLs in app settings, but env cannot be changed without a redeploy. - Which pages: the two detail pages only, or also the three tables? A column in
batch_query/tables.pyalso surfaces identifiers the table hides today, and_query_results_table.htmlmay be touched by Add series level search and transfer to SelectiveTransfer #141. - Pass
pacs_aet=<server.ae_title>(DicomServer.ae_title,adit/core/models.py:136)? Only useful when the ETL feeding RADIS uses the same AE title string; RADIS treats it as optional narrowing. - Show the link on pseudonymised transfer tasks (
TransferTask.pseudonym)? RADIS's own access control applies either way, but the task page is shown to users who may only be allowed pseudonymised data.
Implementation notes
- Identity is separate: ADIT and RADIS have their own user tables and group models (ADIT groups gate
DicomServeraccess viaaccessible_by_user,adit/dicom_explorer/views.py:135; RADIS groups gate reports). The link only works for a user who also has a RADIS account whose active group contains the report; RADIS'sLoginRequiredMixinpreserves the query string across login. Replace django-registration-redux with django-allauth (OIDC login + invitations) adit-radis-shared#244 (OIDC) is what would make this seamless; it is not a prerequisite. - Quasi-identifiers in the query string match current practice (
explorer_urlputsPatientIDinto the query string,dicom_explorer_extras.py:40-41).rel="noreferrer"keeps the ADIT URL, which may carryPatientID, out of RADIS logs, and the RADIS redirect to/reports/<pk>/keeps the identifiers out of the final URL. - Tests: a template tag test (empty
RADIS_URLgives"", a set value gives the encoded URL) and a view test inadit/dicom_explorer/tests/asserting the link is present or absent underoverride_settings.
Related
- Add a lookup URL that opens a report by Study Instance UID or Accession Number radis#310 -- the lookup URL this link targets.
- Add series level search and transfer to SelectiveTransfer #141 -- series-level search in SelectiveTransfer; coordinate if the row-level link is added to
_query_results_table.html(that issue has no body, so the overlap is inferred). - Replace django-registration-redux with django-allauth (OIDC login + invitations) adit-radis-shared#244 -- OIDC login, relevant to the identity gap.
- Sibling brainstorming items (batch transfer file from a RADIS collection, start transfers from RADIS) share the
RADIS_URL/ADIT_URLgroundwork; reuse this setting rather than adding a second one.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request
Activity