Skip to content

A set of services deployed in Breast Screening Office VMs, providing a means of communication between on-premises DICOM modalities (mammography systems) and the cloud-based NHS Manage Breast Screening platform. It handles DICOM protocol communication, image processing, and secure data transmission.

License

Notifications You must be signed in to change notification settings

NHSDigital/manage-breast-screening-gateway

Repository files navigation

NHS Manage Breast Screening Gateway

NHS Digital Breast Screening Service - Gateway services for on-premises DICOM modalities

Overview

This service provides a gateway between on-premises DICOM modalities (mammography systems) and the cloud-based Manage Breast Screening platform.

Features

  • DICOM Worklist (C-FIND) support
  • DICOM Storage (C-STORE)
  • MPPS (Modality Performed Procedure Step) tracking
  • Secure communication via Azure Relay
  • Image thumbnail generation

Prerequisites

Quick Start

git clone [email protected]:NHSDigital/manage-breast-screening-gateway.git
cd manage-breast-screening-gateway

# 2. Set up development environment
make config

# 3. Run tests
make test

Development

Available Make Commands

make help          # Show all available commands
make config        # Set up development environment
make test          # Run all tests (unit + lint)
make test-unit     # Run unit tests only
make test-lint     # Run linting only
make clean         # Clean up build artifacts
make githooks-run  # Run pre-commit hooks manually

Project Structure

manage-breast-screening-gateway/
├── docs/                      # Documentation
│   ├── adr/                   # Architecture Decision Records
│   ├── developer-guides/      # Developer documentation
│   └── user-guides/           # User documentation
├── scripts/                   # Build and utility scripts
├── src/                       # Source code
├── tests/                     # Test files
├── .github/                   # GitHub Actions CI/CD
├── Makefile                   # Development commands
├── pyproject.toml             # Python project configuration
└── README.md                  # This file

Running Tests

# All tests
make test

# Unit tests
make test-unit

# Linting (ruff + pyright)
make test-lint
# Verbose output

make test-unit ARGS="-v"

Code Quality

Pre-commit hooks run automatically on commit:

  • Secrets scanning (gitleaks)
  • Code formatting (ruff format)
  • Linting (ruff check)

Run manually:

make githooks-run

Architecture

This gateway implements a lightweight DICOM service architecture:

  1. DICOM Worklist Server - Provides scheduled procedure information to modalities
  2. DICOM PACS Server - Receives and stores medical images
  3. Event Processing - Processes MPPS status updates and image metadata
  4. Azure Relay Communication - Bidirectional communication with cloud service

Testing

This project uses:

  • pytest for unit testing
  • pytest-cov for coverage reporting
  • ruff for linting and formatting
  • pyright for static type checking

Contributing

  • Make sure you have pre-commit running so that pre-commit hooks run automatically when you commit - this should have been set up automatically when you ran make config.
  • Consider switching on format-on-save in your editor (e.g. Black for python)
  • (Internal contributions only) contact the #screening-manage team on slack with any questions

More documentation

Explore the docs directory.

Licence

Unless stated otherwise, the codebase is released under the MIT License. This covers both the codebase and any sample code in the documentation. See LICENCE.md.

Any HTML or Markdown documentation is © Crown Copyright and available under the terms of the Open Government Licence v3.0.

Support

For issues or questions:

  • Create a GitHub issue
  • Contact the NHS Digital Breast Screening team

About

A set of services deployed in Breast Screening Office VMs, providing a means of communication between on-premises DICOM modalities (mammography systems) and the cloud-based NHS Manage Breast Screening platform. It handles DICOM protocol communication, image processing, and secure data transmission.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published