Team Mythix Logo

Forensic Medical Records Management System

CO2050 / CO226 β€” Database Systems Project
Department of Computer Engineering | Faculty of Engineering | University of Peradeniya

Designed and engineered by Team Mythix (Group 03)


Project Cover Page


πŸ‘₯ Team

S.H.S. Hansara

S.H.S. Hansara
E/22/130
e22130@eng.pdn.ac.lk
T.H. Abeywickrama

T.H. Abeywickrama
E/22/008
e22008@eng.pdn.ac.lk
H.P.J. Gunawardhana

H.P.J. Gunawardhana
E/22/126
e22126@eng.pdn.ac.lk
H.T.D. Hatharasinghe

H.T.D. Hatharasinghe
E/22/135
e22135@eng.pdn.ac.lk

πŸ“‘ Table of Contents

  1. Introduction
  2. Problem Domain & Background
  3. Solution & Core Objectives
  4. System Architecture
  5. Database Architecture & Relational Design
  6. Role-Based Access Control (RBAC)
  7. Medico-Legal Form Pipelines
  8. Technology Stack
  9. DevOps & Automated CI/CD Pipeline
  10. Testing & Quality Assurance
  11. Links & Resources

Introduction

In Sri Lanka’s healthcare and judicial ecosystem, forensic medical recordsβ€”including Medico-Legal Examination Forms (MLEF), Medico-Legal Reports (MLR), Post-Mortem Reports (PMR), and anatomical Autopsy reportsβ€”have traditionally depended on physical registries, manual paper documentation, and decentralized departmental archives.

The Forensic Medical Records Management System is an enterprise-grade, paperless, tamper-evident digital solution built specifically to transform this mission-critical workflow. Developed for the Database Systems module at the Department of Computer Engineering, University of Peradeniya, the platform bridges hospitals, Judicial Medical Officers (JMOs), police stations, and diagnostic laboratories into a unified, secure relational environment.


Problem Domain & Background

The conventional paper-based management of forensic and medico-legal records introduces significant systemic vulnerabilities:


Solution & Core Objectives

Our system addresses these challenges through five core pillars:

  1. Relational Integrity & Legal Compliance: Strict relational schema normalization (3NF/BCNF) with foreign-key cascades and checks enforcing Sri Lankan legal and medical standards.
  2. Chain of Custody & Tamper Evidence: End-to-end auditability from initial police intake, through post-mortem dissection, specimen collection, to final legal deposition.
  3. Role-Based Access Security: Granular, cryptographically secure separation of duties for Doctors, JMOs, Police/Clerks, and Lab Technicians with JWT authentication and 2FA protection.
  4. Court-Ready Legal Document Generation: Instantaneous automated generation of standardized, formatted legal PDF reports containing SLMC registration details, hospital seals, and chronological injury maps.
  5. Cloud-Native Automated Operations: Multi-container Dockerized deployment on AWS EC2 orchestrated by automated Jenkins CI/CD quality gates.

System Architecture

The application adopts a high-availability multi-tier architecture with clear separation of presentation, business logic, persistence, and continuous deployment.

System Architecture Flow Diagram

Architecture Highlights:


Database Architecture & Relational Design

The relational database schema is normalized to 3NF/BCNF to eliminate data redundancy and insertion/deletion anomalies while handling interconnected medico-legal documents:


Role-Based Access Control (RBAC)

The system implements strict separation of duties across 4 specialized roles:

Role System Scope & Responsibilities
Medical Officer (Doctor / MO) Examines living clinical examinees, completes Part B of MLEF, drafts and submits MLR reports, catalogs injury details, and orders laboratory investigations.
Judicial Medical Officer (JMO) Conducts inquest examinations, oversees post-mortem inquests (PMR), performs systemic anatomical Autopsy examinations, records causes of death, and logs evidentiary articles.
Police Officer / Hospital Clerk (Admin) Registers new examinees and demographic records (NIC, address, contact), files Part A of MLEF police requisitions, and manages staff administrative accounts.
Forensic Lab Technician (Lab) Processes lab diagnostic queues, logs specimen intake (Toxicology, Blood Alcohol Content, Drug Screening), updates processing states, and certifies forensic test reports.

The platform digitizes Sri Lanka’s standard legal and forensic documentation workflows:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”       β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”       β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Police Intake  β”‚ ───►  β”‚  Clinical Examination  β”‚ ───►  β”‚  Legal Certification β”‚
β”‚  (MLEF Part A)  β”‚       β”‚  (MLEF Part B / MLR)   β”‚       β”‚  (Court-Ready PDF)   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜       β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜       β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                      β”‚
                                      β–Ό
                          β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                          β”‚   Lab Investigation    β”‚
                          β”‚ (Routine/Urgent/STAT)  β”‚
                          β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
  1. MLEF (Medico-Legal Examination Form): Two-stage clinical intake. Part A captures police station details and alleged assault circumstances; Part B captures clinical harm, weapon correlation, alcohol/substance influence, and danger-to-life assessment.
  2. MLR (Medico-Legal Report): Comprehensive legal injury report classifying non-grievous and grievous injuries under the Sri Lankan Penal Code.
  3. PMR (Post-Mortem Report): Magistrate court inquest documentation including identifier witnesses and external post-mortem observations.
  4. Detailed Autopsy Form: Full systemic anatomical dissection recording findings across cranial, thoracic, abdominal, cardiovascular, and skeletal systems, as well as articles preserved for trial evidence.
  5. Forensic Lab Requests: Diagnostic ordering pipeline categorized by urgency (routine, urgent, stat) with real-time feedback into clinical records.

Technology Stack

Layer Technologies
Database PostgreSQL 15+ (Relational Database, B-Tree Indexing, Cascades)
Backend REST API Node.js (v18+), Express.js 5, pg (Connection Pool), JWT, Bcrypt
Frontend UI React 18, TypeScript 5, Vite, Tailwind CSS v4, Lucide Icons
DevOps & Containers Docker, Docker Compose, Nginx Reverse Proxy
CI/CD Automation Jenkins Pipeline (Automated Build, Test, and Zero-Downtime Rolling Deploy)
Cloud Hosting AWS EC2 (Ubuntu Linux)
Automated Testing Jest & Supertest (Backend), Vitest & React Testing Library (Frontend)

DevOps & Automated CI/CD Pipeline


Testing & Quality Assurance

The system maintains high code quality through rigorous automated testing:



Β© 2026 Team Mythix β€” Built for academic evaluation under Database Systems module.