~/xferdx

a radiology information system.

xferDx is the software a small imaging clinic would run to move a scan from the front desk to a signed report. The front desk books the procedure, a technologist uploads the DICOM file once the scan is done, and a radiologist opens it in the browser to read it and write the findings.

Most of it is a Django app with server-rendered pages. The viewer is the one part that runs in the browser.

The brief and the frontend came from the client, a master's student. Joseph, Deshny, and I built the backend for a software engineering course. The DICOM viewer is the only frontend piece we wrote, on Cornerstone.js.

Sep 2025 – Jan 2026
A study open in the viewer: window width / center and zoom on the sliders, findings and impression on the right. The scan is Cornerstone's CTImage.dcm, a public test file, not patient data.

booking a procedure

A study starts at the front desk. Someone picks the patient, the exam type (X-ray, CT, MRI, ultrasound, or mammography), and a date and time. The patient gets an email with the appointment, and the booking is given a study ID made from the patient's initials and a running count.

Each booking carries a status: scheduled until the DICOM arrives, then uploaded, then finalized once a report is saved against it.

The scheduling form and the procedure list. Status is tracked per booking.

uploading the scan

The technologist uploads through a four-step form: choose the DICOM files, match them to a patient and one of that patient's bookings, add any supporting files like a prior report, then confirm. Each file's size and type show in a list before anything is sent, and a booking can hold more than one study.

Step one of the upload. Files are listed with their size and type before the upload starts.

reading it

The viewer is the screenshot at the top. It renders the DICOM with Cornerstone.js and its WADO image loader, so nothing is converted to a regular image first. The radiologist can pan, zoom, reset the view, and drag the window width and center to change the contrast. Study and patient details sit next to the image, and the findings and impression boxes write straight onto the study.

When a patient has more than one study on the same booking, a dropdown switches between them without a page load.

roles

Every page checks the signed-in user's role before it renders.

staff
register patients, book procedures, upload studies
technologist
upload studies and match them to a booking
radiologist
open the viewer, read studies, write and save reports
admin
all of the above, plus the Django admin

stack

backend
Django 5, server-rendered templates
viewer
Cornerstone.js, cornerstone-wado-image-loader, dicom-parser
database
SQLite
reports
WeasyPrint, renders the report to PDF
email
Django SMTP, appointment notices
serving
Gunicorn, WhiteNoise for static files
madarang.dev