RADIS ETL TKHD is a Dagster pipeline to extract radiological reports (inside SR Modality instances) from a PACS (by using ADIT) and transfer them to RADIS for creating a full-text search index. The pipeline contains two jobs. collect_reports_job collects all reports since the year 2014 (by using Dagster backfills) and also has a schedule to collect reports during the night from the previous day to send them to RADIS. revise_reports_job has a schedule to collect the reports of the day 8 days before again (that is 7 days before the partition of the previous day) to catch reports that were changed or added in the meantime and to send those to RADIS.
- Both development and production uses Docker Compose to setup the Dagster server
dagster_home_devresp.dagster_home_prodfolder in the workspace is mounted asDAGSTER_HOMEfolder. Every data output by the pipelines is stored in those folders.- Copy
example.envto.env.devor resp..env.prodand edit the settings in there. - Artifacts are stored according to
ARTIFACTS_DIR. IfARTIFACTS_DIRis not set then the files are stored in theDAGSTER_HOMEfolder understorage. - A relative
ARTIFACTS_DIRpath is stored relative toDAGSTER_HOMEwhich isdagster_home_devfolder in development anddagster_home_prodfolder in production. - The schedules start automatically in production (the production Compose file sets
DAGSTER_DEPLOYMENT=prod). In development they stay stopped until turned on in the Dagster UI. A schedule that is stopped manually in the UI stays stopped in both environments until it is started again. - Production uses Nginx for basic auth and SSL encryption.
- Generate a password file for basic authentication by using
htpasswd -c .htpasswd <username>(needs apache2-utils to be installed). - Generate SSL certificate with
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout ssl.key -out ssl.crt(nothing has to be filled out)
- Generate a password file for basic authentication by using
- Install the dependencies with
uv sync(orjust sync) and activate the virtual environment withsource .venv/bin/activate. Then start the stack withjust uporjust up prod. - Run
justto list the most common commands.just checkruns ruff, pyright and pytest and should pass before committing changes. The same tasks are also available as invoke tasks (inv --list). - Forward port
3500in development resp.3600in production to Dagster UI in VS Code ports tab. - Alternatively (for testing purposes), run a single job from command line, e.g.
python ./scripts/materialize_assets.py -d ./artifacts/ 2023-01-01.