Medical Payments Information System

Complete Documentation - Version 2.0

Developed by: 8705 W. Warnapura - lemonox.net

Overview

The Medical Payments Information System is a comprehensive web-based application designed specifically for the Road Development Authority - Finance Division to manage employee medical payments efficiently.

Purpose: The system streamlines the process of managing medical payments, prevents duplicate claims, and provides comprehensive reporting capabilities.

Key Capabilities

  • Manage employee information and dependents
  • Process medical payments with duplicate prevention
  • Monthly finalization and rollback
  • Export data in TEXTMAST.TXT format for banks
  • Generate comprehensive reports
  • User management with role-based access
  • Database backup and restore

Features

Employee Management

Add, edit, delete, and search employees with photo upload

Dependent Management

Manage employee dependents with full CRUD operations

Payment Processing

Process payments with automatic duplicate prevention

Monthly Finalization

Finalize months to prevent further entries with rollback

Export Functionality

Export data in TEXTMAST.TXT format for bank processing

Advanced Reports

Multiple report types: monthly, yearly, employee-wise, item-wise

User Management

Admin and user roles with secure authentication

Database Backup

Automated backup and restore functionality

Dark/Light Mode

Toggle between dark and light themes

Quick Search

Search employees by PF number or NIC from dashboard

System Requirements

Component Requirement
PHP Version 7.4 or higher
Database SQLite 3
Web Server Apache / Nginx
PHP Extensions PDO, SQLite3, GD (for images)
Browser Modern browser (Chrome, Firefox, Edge)
PHP Settings upload_max_filesize: 2M
post_max_size: 8M

Installation Guide

Step-by-Step Installation

1 Download and Extract

Extract the ZIP file to your web server directory (e.g., /var/www/html/ or C:\xampp\htdocs\).

2 Set Directory Permissions

Ensure the following directories have write permissions:

chmod 755 uploads/ chmod 755 backups/ chmod 664 medical_payments.db
3 Access the Application

Open your browser and navigate to:

http://localhost/medical_payments/
4 Login

Use the default admin credentials to login:

Username: admin
Password: admin123

Important: Change the default admin password immediately after first login.

5 Configure System

Navigate to System Settings to configure:

  • Medical items
  • Database backups
  • User management

Database Schema

The application uses SQLite database with the following main tables:

Users

Column Type Description
idINTEGERPrimary Key
usernameTEXTUnique username
passwordTEXTUser password (plain text)
user_typeTEXTadmin or user
created_atDATETIMECreation timestamp

Employees

Column Type Description
emp_idINTEGERPrimary Key
emp_pfTEXTUnique PF Number
emp_pictureTEXTProfile photo filename
emp_nameTEXTFull name
emp_NICTEXTUnique NIC
emp_Date_of_JoinDATEJoin date
emp_designationTEXTJob title
emp_divisionTEXTDivision
emp_emailTEXTEmail address
emp_phoneTEXTUnique phone number
emp_bank_accountTEXTBank account number
StatusINTEGER1=Active, 0=Inactive

Payments

Column Type Description
payment_idINTEGERPrimary Key
emp_idINTEGERForeign Key (employees)
item_codeINTEGERForeign Key (medical_items)
amountREALPayment amount
payment_monthINTEGER1-12
payment_yearINTEGERYear
payment_dateDATEPayment date
finalizedINTEGER0=No, 1=Yes
created_byINTEGERUser ID who created
created_atDATETIMECreation timestamp

Medical Items

Column Type Description
item_codeINTEGERPrimary Key
item_nameTEXTItem name
item_entitlementREALMaximum amount

User Guide

1. Managing Employees

Access: Employees menu → Employee Management
  • Add Employee: Click "Add Employee" button, fill in required fields (PF Number, Name, NIC, etc.), upload photo if desired
  • Edit Employee: Click the edit icon (✏️) on any employee row
  • Delete Employee: Click the delete icon (🗑️) - note: employees with dependents or payments cannot be deleted
  • Search: Use the search box to find employees by name, PF number, NIC, or phone
  • View Details: Click the eye icon to see complete employee information
  • Manage Dependents: Click the dependents icon (👥) to manage dependents for that employee

2. Managing Dependents

Access: Dependents menu → Dependent Management
  • Add Dependent: Search for employee by PF number, then fill in dependent details
  • NIC is optional for dependents
  • Edit/Delete: Use the action buttons on each dependent row

3. Processing Payments

Access: Payments menu → Payment Processing
  • New Payment: Click "New Payment" button
  • Search Employee: Type PF number to find employee
  • Select Item: Choose medical item from dropdown
  • Enter Amount: Must not exceed item entitlement
  • Duplicate Prevention: System automatically checks if employee already claimed this year
  • Monthly Finalization: After all payments for a month are done, finalize to prevent further entries
  • Rollback: Administrators can rollback finalization if needed

4. Quick Employee Search

Access: Dashboard → Quick Employee Search
  • Enter PF number or NIC to quickly find employee
  • View employee summary including dependents, payments, and total amount
  • Click "View Details" for complete information

Reports

Access: Reports menu → Report Center

Report Types

  • Monthly Summary: View payments by month for a selected year
  • Yearly Summary: View annual payment statistics
  • Employee Wise: See payment history by employee
  • Item Wise: Analyze payments by medical item type

Export Functionality

  • Text File Export: Export data in TEXTMAST.TXT format for bank processing
  • Format: Item Code (3 digits) + PF Number (6 digits) + 0000 + Amount (7.3) + 20 spaces + 00000000
  • Use: Select month and year, then click "Export Text File"

Backup & Restore

Access: System Settings → Database Backup & Restore

Creating Backups

  • Click "Create New Backup" button
  • Backup files are saved in the backups/ directory
  • Filename format: backup_YYYY-MM-DD_HH-MM-SS.sql

Managing Backups

  • Download: Click download icon to save backup file
  • Restore: Click restore icon to restore from backup (overwrites current data)
  • Delete: Click delete icon to remove backup file
Warning: Restoring a backup will overwrite all current data. Always create a backup before restoring.

Troubleshooting

Common Issues and Solutions

Solution: Check file permissions for medical_payments.db. The web server needs write access. On Linux:
chmod 664 medical_payments.db

Solution: Ensure the uploads/ directory has write permissions. Check PHP upload limits in php.ini.

Solution: PF Number and NIC must be unique. Check if the employee already exists in the system.

Solution: Month has been finalized. Either rollback the finalization (admin only) or add payment for a different month.

Security Considerations

Important: Password hashing is disabled as per requirements. Take extra precautions in production.

Recommended Security Measures

  • Change the default admin password immediately after installation
  • Use HTTPS in production environments
  • Regularly backup the database
  • Limit user accounts to only those who need access
  • Monitor user activity regularly
  • Keep the application updated
  • Use strong passwords for all user accounts
  • Regularly review and clean up inactive users

File Protection

The .htaccess file protects sensitive directories:

  • uploads/ - Direct access blocked
  • backups/ - Direct access blocked
  • .sql and .db files - Access denied

Support

Email Support

support@lemonox.net

Website

lemonox.net

System Version: 2.0
Last Updated:

Medical Payments Information System
Developed by: 8705 W. Warnapura - lemonox.net Available on Codester