NHS England Devices RAP Documentation
Welcome to the Devices RAP (Reproducible Analytical Pipeline) documentation. This project is a modern RAP implementation of the NHS England Direct Commissioning Specialised Services Devices Programming (SSDP) reporting pipeline.
Project Overview
The Devices RAP processes and analyzes medical device data across NHS England regions, generating comprehensive reports that track device deployment, migration status, and performance metrics. The pipeline supports commissioning decisions by providing insights into device categories, provider performance, and regional variations.
Key Features
- Multi-format Reporting: Generates Excel workbooks with multiple specialized worksheets
- Data Processing Pipeline: Automated ETL processes for device data cleansing and transformation
- RAG Status Analysis: Red, Amber, Green status tracking for device categories
- Regional Analysis: Provider-level and regional-level reporting capabilities
- Migration Tracking: Monitors device category migration status across the system
What This Pipeline Does
The Devices RAP pipeline:
- Ingests raw device data from multiple sources (CSV files, SQL databases)
- Cleanses and normalizes data using standardized taxonomies
- Joins datasets including provider lookups, exceptions, and device taxonomies
- Analyzes device performance using RAG (Red/Amber/Green) status indicators
- Generates comprehensive Excel reports with multiple specialized worksheets:
- AMBER Summary/Detailed: Devices requiring attention
- RED Summary/Detailed: High-priority devices needing immediate action
- NON-MIGRATED Summary/Detailed: Devices not yet migrated to new systems
- Data: Complete raw data export
Quick Start
Prerequisites
- Python 3.12+
- Access to NHS England device databases
- Linux-based development environment (recommended)
Installation
# Clone the repository
git clone https://github.com/nhsengland/devices_rap.git
cd devices_rap
# Set up environment
make create-environment
source .venv/bin/activate
make requirements
# Set up development tools (for contributors)
make pre-commits
Running the Pipeline
# Run the complete pipeline
make run-pipeline
# Generate documentation
make docs-serve
# Run tests
make test
Report Outputs
The pipeline generates Excel workbooks containing multiple worksheets tailored for different analytical needs:
Worksheet Type | Purpose | Focus |
---|---|---|
AMBER Summary | High-level overview of amber status devices | Regional summaries |
AMBER Detailed | Detailed amber device information | Device-level analysis |
RED Summary | Critical and yellow status device overview | Priority actions |
RED Detailed | Detailed critical device information | Urgent interventions |
NON-MIGRATED Summary | Non-migrated device categories overview | Migration planning |
NON-MIGRATED Detailed | Detailed non-migrated device data | Migration execution |
Data | Complete dataset export | Raw data analysis |
Architecture
The pipeline follows RAP (Reproducible Analytical Pipeline) principles with a modular design:
data_in/
: Data ingestion from CSV and SQL sourcesclean_data.py
: Data cleansing and normalization functionsjoins.py
: Dataset joining and merging operationscreate_cuts.py
: Regional and categorical data segmentationsummary_tables.py
: Aggregation and summary table generationdata_out.py
: Excel report generation and formattingpipeline.py
: Main orchestration and workflow management
Documentation Structure
- Usage Guide: Step-by-step instructions for running the pipeline
- API Reference: Comprehensive code documentation
- Worksheet Documentation: Detailed Excel output specifications
Contributing
This project follows NHS England RAP standards and coding practices:
- Code Quality: Pre-commit hooks with linting and security scanning
- Testing: Comprehensive unit and end-to-end test coverage
- Documentation: Auto-generated API docs from NumPy-style docstrings
- Version Control: Git workflows with protected main branch
RAP Compliance
This project implements Reproducible Analytical Pipeline (RAP) principles. Learn more about RAP at the NHS Digital RAP Community of Practice.
Support
- Project Repository: GitHub - nhsengland/devices_rap
- Issues: Use GitHub Issues for bug reports and feature requests