- Add OpenSpec experimental workflow with commands (opsx-apply, opsx-archive, opsx-explore, opsx-propose) - Add Serena memory system for project context - Implement User API (UserController, UserModel, routes) - Add Specimen delete endpoint - Update Test definitions and Routes - Sync API documentation (OpenAPI) - Archive completed 2026-03-08-backend-specs change
56 lines
2.8 KiB
Markdown
56 lines
2.8 KiB
Markdown
# CLQMS Project Overview
|
|
|
|
## Project Purpose
|
|
|
|
CLQMS (Clinical Laboratory Quality Management System) is a **headless REST API backend** designed for modern clinical laboratory workflows. This API-only system provides comprehensive JSON endpoints for laboratory operations without any view layer. Frontend applications (web, mobile, desktop) consume these REST endpoints to build laboratory information systems.
|
|
|
|
### Core Features
|
|
- Patient registration and management
|
|
- Laboratory test ordering and tracking
|
|
- Specimen lifecycle management (collection → transport → reception → prep → analysis)
|
|
- Result entry with reference range validation
|
|
- Multi-level result verification (Technical → Clinical → Reporting)
|
|
- Instrument integration via Edge API (tiny-edge middleware)
|
|
- Master data management (value sets, test definitions, reference ranges)
|
|
- Quality control and calibration tracking
|
|
|
|
### Product Vision
|
|
To provide a headless, API-first laboratory information system serving as the backend for any frontend client while streamlining laboratory operations, ensuring regulatory compliance, and integrating seamlessly with laboratory instruments.
|
|
|
|
## Technology Stack
|
|
|
|
| Component | Specification |
|
|
|-----------|---------------|
|
|
| **Language** | PHP 8.1+ (PSR-compliant) |
|
|
| **Framework** | CodeIgniter 4 (API-only mode) |
|
|
| **Database** | MySQL 8.0+ |
|
|
| **Security** | JWT (JSON Web Tokens) via firebase/php-jwt |
|
|
| **Testing** | PHPUnit 10.5+ |
|
|
| **API Format** | RESTful JSON |
|
|
| **Architecture** | Clean architecture, API-first design |
|
|
|
|
### Key Dependencies
|
|
- `codeigniter4/framework` - Main framework
|
|
- `firebase/php-jwt` - JWT authentication
|
|
- `fakerphp/faker` - Test data generation
|
|
- `phpunit/phpunit` - Unit/feature testing
|
|
|
|
## Strategic Pillars
|
|
- **Precision & Accuracy**: Strict validation for all laboratory parameters and reference ranges
|
|
- **Scalability**: Optimized for high-volume diagnostic environments
|
|
- **Compliance**: Built-in audit trails and status history for full traceability
|
|
- **Interoperability**: Modular architecture designed for LIS, HIS, and analyzer integrations
|
|
|
|
## Key Characteristics
|
|
- **API-Only**: No view layer, no server-side rendering
|
|
- **Frontend Agnostic**: Any client can consume these APIs
|
|
- **JSON-First**: All requests/responses use JSON format
|
|
- **Stateless**: Each API request is independent with JWT authentication
|
|
- **UTC Normalization**: Automatic UTC timestamp handling via BaseModel
|
|
|
|
## Current Architecture Status
|
|
The system is undergoing an **Architectural Redesign** to consolidate legacy structures into a high-performance, maintainable schema focusing on:
|
|
- Unified Test Definitions (consolidating technical, calculated, and site-specific test data)
|
|
- Reference Range Centralization (unified engine for numeric, threshold, text, and coded results)
|
|
- Ordered Workflow Management (precise tracking of orders from collection to verification)
|