A comprehensive Java-based desktop application designed to automate pharmacy operations, streamline inventory tracking, and manage patient prescriptions using fundamental Data Structures.
Pharmacies often face challenges in managing dynamic inventories and tracking patient prescriptions accurately, leading to potential delays or human errors. This system provides an automated, reliable solution that organizes stock management, records sales, and ensures sequential prescription processing.
To maximize system efficiency and ensure reliable data handling, the following structures were implemented:
| Data Structure | Use Case | Justification |
|---|---|---|
| Singly Linked List | Patient Medicine Logs | Allows flexible, dynamic memory allocation for adding and removing medications without fixed-size constraints. |
| Stack (LLStack) | Inventory Tracking | Follows the Last-In-First-Out (LIFO) principle, which is ideal for tracking recent stock adjustments and inventory logs in reverse order. |
| Queue (LLQueue) | Prescription Handling | Implements a First-In-First-Out (FIFO) approach, ensuring patient prescriptions are fulfilled fairly and in the exact order they are received. |
The system is divided into modular classes based on structural responsibilities:
LLStack: Handles inventory history management and state tracking.LLQueue: Manages the incoming flow of prescriptions waiting to be processed.SinglyLinkedList: Manages individual patient files and active medication items.InventoryandSales: Implements business logic for sales, checkout, and pricing updates.PharmacyProject(Main Class): Holds the execution driver and coordinates interactions between data structures.
- Dynamic medicine lookup and interactive search (
searchById,searchMedicine). - Automatic billing and total cost calculations (
calculateTotal). - Sequential prescription processing controls (
NextPrescription,prescriptionInfo). - Real-time metrics highlighting critical data (
highestMedicine).
Developed as part of the Data Structures (CS 212T) course at Princess Noura bint Abdulrahman University.