DICOM Modality Worklist (MWL) and Modality Performed Procedure Step (MPPS) server with REST API and web interface, development version.
- ✅ DICOM MWL C-FIND SCP
- ✅ FastAPI REST Interface
- ✅ Web Dashboard - HTML interface for viewing MWL/MPPS entries
- ✅ MySQL Database Backend - Persistent storage with proper schema
- ✅ Docker Containerizedfessional Testing Suite** - pytest-based integration tests
- ✅ Development Tools
- Docker and Docker Compose
make(optional, but recommended)
git clone <repository-url>
cd dicom-mwl-mpps
# Quick development setup (includes debugging and live reload)
make dev-setup# Check service health
make health
# View the web interface
open http://localhost:8000
# Create a test MWL entry and test DICOM functionality
make test-manual# Run the full test suite
make test- dicom-mwl-mpps: Python DICOM service (pynetdicom/pydicom) - handles MWL/MPPS DIMSE operations
- mwl-api: FastAPI REST service - provides HTTP API and web interface
- mysql_db: MySQL database - persistent storage for MWL/MPPS data
- worklist/: Shared volume - DICOM .wl files accessible by both services
| Endpoint | Method | Description |
|---|---|---|
/ |
GET | Web dashboard with statistics |
/health |
GET | Service health check |
/mwl |
GET | List MWL entries (web interface) |
/mpps |
GET | List MPPS entries (web interface) |
/mwl/create_from_json |
POST | Create MWL entry via JSON |
/docs |
GET | Interactive API documentation |
The project includes a comprehensive Makefile for easy development:
# Get help with all available commands
make help
# Development workflow
make dev-setup # Start with development settings
make logs # View all service logs
make shell # Get shell access to DICOM service
make db-shell # MySQL shell access
# Testing
make test # Run integration tests
make test-manual # Create test data and run manual DICOM tests
# Database operations
make db-reset # Reset database (WARNING: destroys data)
make db-backup # Backup current database
# Production
make production # Start in production mode
make health # Check all service healthCreate a .env file or set these environment variables:
# Database Configuration
DB_HOST=mysql_db
DB_USER=root
DB_PASSWORD=root
DB_NAME=orthanc_ris
DB_PORT=3306
# DICOM Service Configuration
DICOM_AE_TITLE=MWL-MPPS-SCP
DICOM_PORT=104
DICOM_BIND_ADDRESS=0.0.0.0
DICOM_MAX_ASSOC=10
# API Configuration
API_HOST=0.0.0.0
API_PORT=8000
API_DEBUG=false
API_CORS_ORIGINS=*
# Worklist Configuration
WORKLIST_DIR=/worklist
WORKLIST_MAX_AGE_DAYS=30
# Logging
LOG_LEVEL=INFO
ENVIRONMENT=developmentThe project supports different environments:
- Development: Use
make dev-setup- includes debugging, live reload, verbose logging - Production: Use
make production- optimized settings, no debug ports
curl -X POST http://localhost:8000/mwl/create_from_json \
-H "Content-Type: application/json" \
-d '{
"AccessionNumber": "TEST123",
"PatientID": "P1",
"PatientName": "DOE^JOHN",
"PatientBirthDate": "19800101",
"PatientSex": "M",
"StudyInstanceUID": "1.2.3.4.5",
"ScheduledProcedureStepSequence": [{
"ScheduledProcedureStepStartDate": "20240625",
"ScheduledStationAETitle": "ORTHANC"
}]
}'# Using findscu (if available)
findscu localhost 4104 -W -v -d \
-k "AccessionNumber" \
-k "PatientName" \
-k "PatientID"# The test suite includes automated MPPS testing
make test
# Or create and run manual MPPS tests
python3 docker/mwl-mpps/create_test_mpps.py
python3 docker/mwl-mpps/test_mpps/test_mpps_client.py localhost 4104 test_mpps/mpps_create.dcmThe project includes a comprehensive pytest-based test suite:
# Run all tests
make test
# Run tests with verbose output
docker compose --profile test run --rm test-runner -v
# Test specific functionality
pytest docker/mwl-mpps/tests/test_mpps_integration.py::TestMWLMPPS::test_mpps_ncreate -v# Create test data and verify DICOM functionality
make test-manual
# Check service health
make health
# View logs for debugging
make logsThe system uses a clean, normalized MySQL schema:
mwl- Modality Worklist entries with patient and procedure informationmpps- Modality Performed Procedure Step trackingdicom_tags- Complete DICOM tag reference (4900+ entries)
- Health endpoint:
GET /health- Database connectivity check - Service logs:
make logs- View real-time logs from all services - Database monitoring:
make db-shell- Direct MySQL access - Web dashboard: Shows MWL/MPPS statistics and system status
# Production deployment
make production
# With custom configuration
docker compose -f docker-compose.yml up -d- DICOM Server:
4104(mapped from container port 104) - REST API:
8000 - MySQL:
3306(development only)
- Empty database errors: Fixed! The API now handles empty databases gracefully
- Schema conflicts: Fixed! Removed conflicting table definitions
- Port conflicts: Use different ports in
.envif needed - Database initialization: Use
make db-resetto reinitialize
# Check service health
make health
# View recent logs
make logs
# Reset everything (nuclear option)
make clean && make dev-setupThis project is licensed under the GNU General Public License v3.0 (GPLv3).
Medical imaging software - See LICENSE for full details.
- Fork the repository
- Create a feature branch:
git checkout -b feature-name - Make changes and test:
make test - Submit a pull request
DICOM MWL-MPPS implementation ready for medical imaging workflows.