Ferenje Clinic Hospital & Clinical Management System (HCMS)
Full-Stack Hospital & Clinical Management System (EHR / HealthTech) • Enterprise Electronic Health Records & Clinical Workflow Platform
Built collaboratively at Wawmox Technologies (team of 3) where I co-engineered core full-stack features, schema architecture, and automated test suites. The platform transitioned a high-volume outpatient healthcare facility with over 36,000 historical patient records from fragile paper charting, manual lab slips, and unverified billing to a high-throughput, digitized clinical system with zero record loss, automated triage queues, sub-second diagnostic lookups, and compliant HMIS reporting.

Transforming Paper Intake into High-Throughput Clinical Workflows
Outpatient polyclinics and ambulatory centers operating under Ethiopian Ministry of Health (MOH) standards handle heavy patient volumes daily. Relying on physical paper binders led to misplaced patient cards, slow nurse-to-doctor handoffs, diagnostic record desynchronization, and unverified medication billing.
The Ferenje Clinic HCMS replaces paper charting with an end-to-end, multi-role digital platform connecting 5 departments in real-time. With continuous card sequencing starting seamlessly from card #36,187, staff operate with zero record loss and strict role-based data boundaries.
Unified relational schema with contiguous sequence tracking & atomic creation locks.
Local WHO ICD-11 microservice daemon with 300+ medical prefix expansions.
Full support for English, Amharic (አማርኛ), and Afaan Oromoo across forms and /help SOPs.
PHP 8.3 • Laravel 13 LTS
PHP 8.3.35 with strict types and JIT optimization. Built on Laravel 13.17 with robust domain services, policies, and background queue workers.
- •Laravel Fortify 1.37 Headless Auth
- •WebAuthn / Passkeys (FIDO2 Biometrics)
- •2FA TOTP with encrypted recovery keys
- •Granular RBAC (TeamRole / TeamPermission)
- •Laravel Wayfinder 0.1 Typed RPC SDKs
- •dompdf 3.1 • phpword 1.4 • excel 3.1
React 19 • Inertia.js v3
React 19.3.0 compiled with Babel React Compiler for auto-memoization, coupled with Inertia.js v3 to eliminate client-side REST boilerplate.
- •TypeScript 5.9.3 Type Enforcement
- •Vite 8.3.3 + LightningCSS + Rollup
- •Tailwind CSS v4.3.3 (@tailwindcss/oxide)
- •Radix UI Accessible Primitives
- •Recharts 3.10 Clinical KPI Visualizations
- •Lucide React Iconography
WHO Daemon & Cloud Queue
Dedicated local microservices and external gateways engineered for offline resilience and automated emergency backup.
- •WHO ICD-11 Local Linux Microservice (:8382)
- •AfroMessage & SMSEthiopia Dual SMS Engine
- •Google Drive API Nightly DB Backups
- •Telegram Bot Administrative Critical Alerts
- •Julian Day Number (JDN) Dual-Calendar API
- •GoogleDrivePendingUpload Offline Queue
03 // Codebase Metrics
By the Numbers (Measured Codebase Telemetry)
| METRIC CATEGORY | MEASURED VALUE | ARCHITECTURAL SIGNIFICANCE / CONTEXT |
|---|---|---|
| Total Lines of Code | ~146,300+ LOC | Enterprise-grade medical management system |
| Frontend Codebase | 282 TSX/TS files (~63k LOC) | Interactive clinical charting, real-time queues, modals |
| Backend Codebase | 197 PHP files (~29.5k LOC) | Domain services, policies, controllers, jobs, commands |
| Database Migrations | 85 Migration Files | Complex evolving schema, legacy realignment, indexes |
| Database Seeders | 49 Seeders (896 KB data) | Full HMIS indicators, lab test catalogs, realistic records |
| Eloquent Domain Models | 40 Domain Models | Rich clinical relationships, audit trails, soft deletes |
| Registered API Routes | 303 Routes | Multi-role dashboards, APIs, exports, settings |
| Custom Artisan Commands | 17 Artisan Commands | Automated backup, holiday SMS, card expiry, DB repair |
| Automated Test Coverage | 905+ Total Tests (100% Pass) | Comprehensive testing pyramid: 640 Pest PHP, 181 Vitest, 296 Selenium E2E |
04 // Clinical Progression State Machine
End-to-End Patient Flow & Departmental Routing
05 // User Personas & Workstations
Five Specialized Clinical Departmental Portals
Strict Role-Based Access Control (TeamRole / EnsureRole) delivers purpose-built workstations for each healthcare professional.
Patient Intake, Card Sequencing & Cashier Settlement
Operational Capabilities & System Responsibilities:
06 // Functional Modules & Clinical Capabilities
11 Comprehensive Clinical Subsystems
01 // Patient Registration & Medical Card Lifecycle
Captures multi-generational Ethiopian patronymics, validates Ethiopian telecom prefixes (+251 09... / 07...), aligns sequence numbers with 36,187 historical records, and enforces configurable 30/90/180-day card validity with background expiration daemons (php artisan app:update-expired-cards).
02 // Live Queue Management & Nurse Triage
Synchronized worklists routing waiting patients across 5 departments. Captures systolic/diastolic blood pressure, pulse, SpO2, respiratory rate, temperature, weight, height, and automatically calculates BMI with urgent emergency triaging.
03 // Physician EMR & WHO ICD-11 Autocomplete
Full clinical documentation interface with sub-50ms diagnostic search powered by a local Linux systemd daemon on port 8382. Features 300+ medical prefix expansions, MOH HMIS indicator tagging, digital canvas doctor signatures, and .docx/.pdf exports.
04 // Laboratory & Ultrasound Diagnostic Suite
Comprehensive diagnostic worklist supporting complete hematology panels, urinalysis, stool microscopy, clinical chemistry, and obstetric/gynecological ultrasound biometry (GA, BPD, FL, AC, AFI) with protected media streaming.
05 // Pharmacy Inventory & Digital Prescription Paper
Skeuomorphic digital paper interface (EditablePrescriptionPaper.jsx) replicating traditional physical slips. Real-time batch-level inventory tracking by manufacturing and expiry dates preventing expired dispensing with automatic stock deduction.
06 // Outpatient Injections & Nursing Treatments
Dedicated clinical queue for prescribed antibiotic, analgesic, and intravenous therapies. Nurses log administration timestamps, injection anatomical sites, batch numbers, and adverse reaction observations.
07 // Family Planning & Maternal Health Registry
Specialized client registration for reproductive healthcare tracking contraceptive modalities (Depo-Provera, Implanon, IUCD, Oral Contraceptives, Barrier methods) with longitudinal appointment follow-ups and side-effect logging.
08 // Dynamic Patient Loyalty & VIP Tiering
Automated engine classifying frequent patients into Silver, Gold, and Platinum VIP tiers based on visit history and cumulative healthcare spend. Configurable percentage discounts applied automatically across billing with CLI recalculation (php artisan app:recalculate-loyalty).
09 // Multi-Channel SMS & Ethiopian Holiday Broadcast
Automated event-driven clinical alerts (triage notifications, lab ready) and high-volume Ethiopian holiday broadcast engine (Enkutatash, Meskel, Genna, Timkat, Eid) with Amharic personalization, chunk jobs, and AfroMessage + SMSEthiopia fallback.
10 // Financial Auditing, Pricing & MOH HMIS Reporting
Centralized pricing rules across consultations, procedures, lab panels, and pharmaceuticals. Cashier reconciliation across Cash, Telebirr, CBE Birr, and CBHI insurance. Generates automated monthly disease tally sheets in Excel and Word for MOH submission.
11 // In-App Trilingual SOPs & Operational Manuals (/help)
Built-in operational knowledge base embedded directly into the platform, providing comprehensive standard operating procedure (SOP) manuals for all 5 roles localized in English, Amharic (አማርኛ), and Afaan Oromoo.
07 // Quality Engineering
Three-Tier Testing Pyramid (905+ Automated Tests)
Backend Pest PHP & PHPUnit Suite (95.03% Code Coverage)
640 Test Cases • 4,394 Assertions • 100% Pass RateValidates backend domain services, database transactions, atomic patient registration, queue transitions, loyalty calculations, and strict RBAC authorization gates across all 5 clinical roles.
08 // DevOps & CI/CD Pipeline
Automated Multi-Stage Jenkins Pipeline
PHP Pint (PSR-12), Larastan Level 5+, ESLint 9 & Prettier, TypeScript strict check.
Automated migrations & seeders run against dedicated ferenje_hcms_testing database.
Pest PHP suite with Clover XML coverage and Vitest suite with V8 engine coverage.
Spawns background artisan serve, runs 20 Selenium Chrome suites, records failures to screenshots.
09 // Technical Highlights & Deep Dives
Key Engineering Challenges & Solutions
Astronomical Julian Day Number (JDN) Dual-Calendar Conversion
The Problem:
Ethiopian clinical operations, cashier billing, patient birthdays, and MOH health reporting utilize the Ethiopian Ge'ez calendar (12 months of 30 days + Pagume of 5 or 6 days), whereas underlying Linux servers, database timestamps, and React libraries strictly rely on Gregorian timestamps.
The Engineering Solution:
Engineered EthiopianDateService.php based on astronomical Julian Day Number (JDN) mathematics. By establishing the astronomical epoch (1 Meskerem 1 E.C. = JDN 1724221), the algorithm achieves deterministic bidirectional conversion with complete support for Ethiopian leap years ($year \pmod 4 = 3$). On the frontend, seamlessly synchronized with ethiopian-calendar-new in React 19.
Measured Clinical Impact:
Zero scheduling desync across 36,000+ patient records and automated generation of MOH-compliant disease tally sheets in both calendars.