CREATE TABLE `medicine_low_stock` (
`id` int(100)
,`name` varchar(100)
,`generic` varchar(100)
,`category` varchar(100)
,`current_total_stock` int(100)
,`total_batch_stock` decimal(32,0)
,`total_batches` bigint(21)
,`hospital_id` varchar(100)
);

-- --------------------------------------------------------

--
-- Table structure for table `medicine_purchases`
--

CREATE TABLE `medicine_purchases` (
  `id` int(11) NOT NULL,
  `purchase_order_no` varchar(50) NOT NULL,
  `supplier_id` int(11) NOT NULL,
  `purchase_date` date NOT NULL,
  `expected_delivery_date` date DEFAULT NULL,
  `actual_delivery_date` date DEFAULT NULL,
  `invoice_number` varchar(100) DEFAULT NULL,
  `invoice_date` date DEFAULT NULL,
  `total_amount` decimal(15,2) DEFAULT 0.00,
  `tax_amount` decimal(15,2) DEFAULT 0.00,
  `discount_amount` decimal(15,2) DEFAULT 0.00,
  `net_amount` decimal(15,2) DEFAULT 0.00,
  `paid_amount` decimal(15,2) DEFAULT 0.00,
  `balance_amount` decimal(15,2) DEFAULT 0.00,
  `payment_status` enum('pending','partial','paid','cancelled') DEFAULT 'pending',
  `purchase_status` enum('pending','ordered','received','partial','cancelled') DEFAULT 'pending',
  `payment_terms` varchar(255) DEFAULT NULL,
  `transport_charges` decimal(10,2) DEFAULT 0.00,
  `other_charges` decimal(10,2) DEFAULT 0.00,
  `notes` text DEFAULT NULL,
  `received_by` int(11) DEFAULT NULL,
  `verified_by` int(11) DEFAULT NULL,
  `approved_by` int(11) DEFAULT NULL,
  `hospital_id` int(11) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `created_by` int(11) DEFAULT NULL,
  `updated_by` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `medicine_purchases`
--

INSERT INTO `medicine_purchases` (`id`, `purchase_order_no`, `supplier_id`, `purchase_date`, `expected_delivery_date`, `actual_delivery_date`, `invoice_number`, `invoice_date`, `total_amount`, `tax_amount`, `discount_amount`, `net_amount`, `paid_amount`, `balance_amount`, `payment_status`, `purchase_status`, `payment_terms`, `transport_charges`, `other_charges`, `notes`, `received_by`, `verified_by`, `approved_by`, `hospital_id`, `created_at`, `updated_at`, `created_by`, `updated_by`) VALUES
(1, 'PO-20250827-5088', 1, '2025-08-27', '2025-08-28', NULL, '1234', '2025-08-27', 10000.00, 0.00, 0.00, 11000.00, 0.00, 11000.00, 'pending', 'received', '30', 500.00, 500.00, 'dsfsfsf', NULL, NULL, NULL, 98, '2025-08-27 07:14:46', '2025-08-27 07:16:13', NULL, NULL),
(2, 'PO-20250904-2364', 1, '2025-09-04', '2025-09-04', NULL, '324324', '2025-09-04', 1000.00, 0.00, 0.00, 1000.00, 0.00, 1000.00, 'pending', 'received', '30', 0.00, 0.00, 'dfgdgfdg', NULL, NULL, NULL, 98, '2025-09-04 04:18:47', '2025-09-04 04:19:18', NULL, NULL);

-- --------------------------------------------------------

--
-- Table structure for table `medicine_purchase_items`
--

CREATE TABLE `medicine_purchase_items` (
  `id` int(11) NOT NULL,
  `purchase_id` int(11) NOT NULL,
  `medicine_id` int(11) NOT NULL,
  `quantity_ordered` int(11) NOT NULL,
  `quantity_received` int(11) DEFAULT 0,
  `unit_cost` decimal(10,2) NOT NULL,
  `total_cost` decimal(15,2) NOT NULL,
  `tax_rate` decimal(5,2) DEFAULT 0.00,
  `tax_amount` decimal(10,2) DEFAULT 0.00,
  `discount_rate` decimal(5,2) DEFAULT 0.00,
  `discount_amount` decimal(10,2) DEFAULT 0.00,
  `net_amount` decimal(15,2) NOT NULL,
  `expiry_date` date DEFAULT NULL,
  `batch_number` varchar(100) DEFAULT NULL,
  `manufacturing_date` date DEFAULT NULL,
  `manufacturer` varchar(255) DEFAULT NULL,
  `mrp` decimal(10,2) DEFAULT 0.00,
  `free_quantity` int(11) DEFAULT 0,
  `bonus_quantity` int(11) DEFAULT 0,
  `damaged_quantity` int(11) DEFAULT 0,
  `notes` text DEFAULT NULL,
  `received_status` enum('pending','partial','received','cancelled') DEFAULT 'pending',
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `medicine_purchase_items`
--

INSERT INTO `medicine_purchase_items` (`id`, `purchase_id`, `medicine_id`, `quantity_ordered`, `quantity_received`, `unit_cost`, `total_cost`, `tax_rate`, `tax_amount`, `discount_rate`, `discount_amount`, `net_amount`, `expiry_date`, `batch_number`, `manufacturing_date`, `manufacturer`, `mrp`, `free_quantity`, `bonus_quantity`, `damaged_quantity`, `notes`, `received_status`, `created_at`, `updated_at`) VALUES
(1, 1, 35, 500, 500, 10.00, 5000.00, 0.00, 0.00, 0.00, 0.00, 5000.00, '2025-09-30', 'sdfsdfsf', NULL, NULL, 0.00, 0, 0, 0, NULL, 'received', '2025-08-27 07:14:46', '2025-08-27 07:16:13'),
(2, 1, 33, 500, 500, 10.00, 5000.00, 0.00, 0.00, 0.00, 0.00, 5000.00, '2025-09-27', 'werwerwr', NULL, NULL, 0.00, 0, 0, 0, NULL, 'received', '2025-08-27 07:14:46', '2025-08-27 07:16:13'),
(3, 2, 33, 100, 100, 10.00, 1000.00, 0.00, 0.00, 0.00, 0.00, 1000.00, '2025-10-31', 'dsfsdfdsf', NULL, NULL, 0.00, 0, 0, 0, NULL, 'received', '2025-09-04 04:18:47', '2025-09-04 04:19:18');

-- --------------------------------------------------------

--
-- Table structure for table `medicine_purchase_payments`
--

CREATE TABLE `medicine_purchase_payments` (
  `id` int(11) NOT NULL,
  `purchase_id` int(11) NOT NULL,
  `payment_date` date NOT NULL,
  `amount` decimal(15,2) NOT NULL,
  `payment_method` enum('cash','cheque','bank_transfer','card','online','upi') NOT NULL,
  `reference_number` varchar(100) DEFAULT NULL,
  `bank_name` varchar(255) DEFAULT NULL,
  `cheque_number` varchar(50) DEFAULT NULL,
  `cheque_date` date DEFAULT NULL,
  `transaction_id` varchar(100) DEFAULT NULL,
  `notes` text DEFAULT NULL,
  `status` enum('pending','cleared','bounced','cancelled') DEFAULT 'cleared',
  `hospital_id` int(11) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `created_by` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `medicine_stock_movements`
--

CREATE TABLE `medicine_stock_movements` (
  `id` int(11) NOT NULL,
  `medicine_id` int(11) NOT NULL,
  `batch_id` int(11) DEFAULT NULL,
  `movement_type` enum('purchase','sale','adjustment','return','damaged','expired','transfer') NOT NULL,
  `quantity` int(11) NOT NULL,
  `unit_cost` decimal(10,2) DEFAULT 0.00,
  `selling_price` decimal(10,2) DEFAULT 0.00,
  `reference_type` enum('purchase','prescription','adjustment','return','damage','expiry','transfer') DEFAULT NULL,
  `reference_id` int(11) DEFAULT NULL,
  `movement_date` timestamp NOT NULL DEFAULT current_timestamp(),
  `notes` text DEFAULT NULL,
  `performed_by` int(11) DEFAULT NULL,
  `hospital_id` int(11) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `medicine_stock_movements`
--

INSERT INTO `medicine_stock_movements` (`id`, `medicine_id`, `batch_id`, `movement_type`, `quantity`, `unit_cost`, `selling_price`, `reference_type`, `reference_id`, `movement_date`, `notes`, `performed_by`, `hospital_id`, `created_at`) VALUES
(1, 35, 1, 'adjustment', -1, 10.00, 0.00, NULL, NULL, '2025-09-02 13:46:49', 'Stock adjusted from 500 to 499', NULL, 98, '2025-09-02 13:46:49'),
(2, 35, 1, 'sale', 1, 0.00, 0.00, 'prescription', 21, '2025-09-02 13:46:49', 'Pharmacy sale - FIFO batch reduction', 992, 98, '2025-09-02 13:46:49'),
(3, 35, 1, 'adjustment', -10, 10.00, 0.00, NULL, NULL, '2025-09-02 13:56:53', 'Stock adjusted from 499 to 489', NULL, 98, '2025-09-02 13:56:53'),
(4, 35, 1, 'sale', 10, 0.00, 0.00, 'prescription', 22, '2025-09-02 13:56:53', 'Pharmacy sale - FIFO batch reduction', 992, 98, '2025-09-02 13:56:53'),
(5, 33, 2, 'adjustment', -12, 10.00, 0.00, NULL, NULL, '2025-09-02 13:56:53', 'Stock adjusted from 500 to 488', NULL, 98, '2025-09-02 13:56:53'),
(6, 33, 2, 'sale', 12, 0.00, 0.00, 'prescription', 22, '2025-09-02 13:56:53', 'Pharmacy sale - FIFO batch reduction', 992, 98, '2025-09-02 13:56:53'),
(7, 35, 1, 'adjustment', -10, 10.00, 0.00, NULL, NULL, '2025-09-04 04:20:36', 'Stock adjusted from 489 to 479', NULL, 98, '2025-09-04 04:20:36'),
(8, 35, 1, 'sale', 10, 0.00, 0.00, 'prescription', 23, '2025-09-04 04:20:36', 'Pharmacy sale - FIFO batch reduction', 992, 98, '2025-09-04 04:20:36'),
(9, 35, 1, 'adjustment', -9, 10.00, 0.00, NULL, NULL, '2025-09-04 04:23:00', 'Stock adjusted from 479 to 470', NULL, 98, '2025-09-04 04:23:00'),
(10, 35, 1, 'sale', 9, 0.00, 0.00, 'prescription', 24, '2025-09-04 04:23:00', 'Pharmacy sale - FIFO batch reduction', 992, 98, '2025-09-04 04:23:00'),
(11, 35, 1, 'adjustment', -10, 10.00, 0.00, NULL, NULL, '2025-09-06 08:11:21', 'Stock adjusted from 470 to 460', NULL, 98, '2025-09-06 08:11:21'),
(12, 35, 1, 'sale', 10, 0.00, 0.00, 'prescription', 22, '2025-09-06 08:11:21', 'Pharmacy sale - FIFO batch reduction', 992, 98, '2025-09-06 08:11:21'),
(13, 33, 2, 'adjustment', -12, 10.00, 0.00, NULL, NULL, '2025-09-06 08:11:21', 'Stock adjusted from 488 to 476', NULL, 98, '2025-09-06 08:11:21'),
(14, 33, 2, 'sale', 12, 0.00, 0.00, 'prescription', 22, '2025-09-06 08:11:21', 'Pharmacy sale - FIFO batch reduction', 992, 98, '2025-09-06 08:11:21'),
(15, 35, 1, 'adjustment', -1, 10.00, 0.00, NULL, NULL, '2025-09-06 08:24:14', 'Stock adjusted from 460 to 459', NULL, 98, '2025-09-06 08:24:14'),
(16, 35, 1, 'sale', 1, 0.00, 0.00, 'prescription', 25, '2025-09-06 08:24:14', 'Pharmacy sale - FIFO batch reduction', 992, 98, '2025-09-06 08:24:14'),
(17, 35, 1, 'adjustment', -1, 10.00, 0.00, NULL, NULL, '2025-09-06 08:27:27', 'Stock adjusted from 459 to 458', NULL, 98, '2025-09-06 08:27:27'),
(18, 35, 1, 'sale', 1, 0.00, 0.00, 'prescription', 26, '2025-09-06 08:27:27', 'Pharmacy sale - FIFO batch reduction', 992, 98, '2025-09-06 08:27:27');

-- --------------------------------------------------------

--
-- Stand-in structure for view `medicine_stock_with_batches`
-- (See below for the actual view)
--
CREATE TABLE `medicine_stock_with_batches` (
`medicine_id` int(100)
,`medicine_name` varchar(100)
,`generic` varchar(100)
,`category` varchar(100)
,`company` varchar(100)
,`batch_id` int(11)
,`batch_number` varchar(100)
,`expiry_date` date
,`manufacturing_date` date
,`batch_stock` int(11)
,`batch_cost` decimal(10,2)
,`batch_selling_price` decimal(10,2)
,`batch_mrp` decimal(10,2)
,`batch_status` varchar(12)
,`days_to_expiry` int(8)
,`expiry_status` varchar(13)
,`hospital_id` varchar(100)
);

-- --------------------------------------------------------

--
-- Table structure for table `medicine_suppliers`
--

CREATE TABLE `medicine_suppliers` (
  `id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `company_name` varchar(255) DEFAULT NULL,
  `contact_person` varchar(255) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `phone` varchar(20) DEFAULT NULL,
  `mobile` varchar(20) DEFAULT NULL,
  `address` text DEFAULT NULL,
  `city` varchar(100) DEFAULT NULL,
  `state` varchar(100) DEFAULT NULL,
  `country` varchar(100) DEFAULT NULL,
  `postal_code` varchar(20) DEFAULT NULL,
  `tax_number` varchar(50) DEFAULT NULL,
  `bank_name` varchar(255) DEFAULT NULL,
  `bank_account` varchar(50) DEFAULT NULL,
  `payment_terms` varchar(255) DEFAULT NULL,
  `credit_limit` decimal(15,2) DEFAULT 0.00,
  `current_balance` decimal(15,2) DEFAULT 0.00,
  `license_number` varchar(100) DEFAULT NULL,
  `drug_license` varchar(100) DEFAULT NULL,
  `gst_number` varchar(50) DEFAULT NULL,
  `status` enum('active','inactive') DEFAULT 'active',
  `notes` text DEFAULT NULL,
  `hospital_id` int(11) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `created_by` int(11) DEFAULT NULL,
  `updated_by` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `medicine_suppliers`
--

INSERT INTO `medicine_suppliers` (`id`, `name`, `company_name`, `contact_person`, `email`, `phone`, `mobile`, `address`, `city`, `state`, `country`, `postal_code`, `tax_number`, `bank_name`, `bank_account`, `payment_terms`, `credit_limit`, `current_balance`, `license_number`, `drug_license`, `gst_number`, `status`, `notes`, `hospital_id`, `created_at`, `updated_at`, `created_by`, `updated_by`) VALUES
(1, 'Md Opu', 'Codearistos', 'Md Opu', 'info@codearistos.net342423423', '01749335508', '01749335508', 'Bashundhara, Dhaka', 'Dhaka', 'sdfsdfsdfsdfsdf', 'Bangladesh', '1200', '234234234324', 'sdfsdf', '234234234234', '30', 100.00, 0.00, '234234234234', '234234', '234324', 'active', '234234234234', 98, '2025-08-27 07:12:03', '2025-08-27 07:12:30', NULL, NULL);

-- --------------------------------------------------------

--
-- Table structure for table `meeting`
--

CREATE TABLE `meeting` (
  `id` int(100) NOT NULL,
  `patient` varchar(100) DEFAULT NULL,
  `doctor` varchar(100) DEFAULT NULL,
  `topic` varchar(1000) DEFAULT NULL,
  `type` varchar(100) DEFAULT NULL,
  `start_time` varchar(100) DEFAULT NULL,
  `duration` varchar(100) DEFAULT NULL,
  `timezone` varchar(100) DEFAULT NULL,
  `meeting_id` varchar(100) DEFAULT NULL,
  `meeting_password` varchar(100) DEFAULT NULL,
  `date` varchar(100) DEFAULT NULL,
  `time_slot` varchar(100) DEFAULT NULL,
  `s_time` varchar(100) DEFAULT NULL,
  `e_time` varchar(100) DEFAULT NULL,
  `remarks` varchar(500) DEFAULT NULL,
  `add_date` varchar(100) DEFAULT NULL,
  `registration_time` varchar(100) DEFAULT NULL,
  `s_time_key` varchar(100) DEFAULT NULL,
  `status` varchar(100) DEFAULT NULL,
  `user` varchar(100) DEFAULT NULL,
  `request` varchar(100) DEFAULT NULL,
  `patientname` varchar(1000) DEFAULT NULL,
  `doctorname` varchar(1000) DEFAULT NULL,
  `ion_user_id` varchar(100) DEFAULT NULL,
  `doctor_ion_id` varchar(100) DEFAULT NULL,
  `patient_ion_id` varchar(100) DEFAULT NULL,
  `hospital_id` varchar(100) DEFAULT NULL,
  `start_url` varchar(1000) DEFAULT NULL,
  `join_url` varchar(1000) DEFAULT NULL,
  `appointment_id` varchar(100) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

--
-- Dumping data for table `meeting`
--

INSERT INTO `meeting` (`id`, `patient`, `doctor`, `topic`, `type`, `start_time`, `duration`, `timezone`, `meeting_id`, `meeting_password`, `date`, `time_slot`, `s_time`, `e_time`, `remarks`, `add_date`, `registration_time`, `s_time_key`, `status`, `user`, `request`, `patientname`, `doctorname`, `ion_user_id`, `doctor_ion_id`, `patient_ion_id`, `hospital_id`, `start_url`, `join_url`, `appointment_id`) VALUES
(14, '53', '44', 'Doctor Appointment', '2', '2023-10-25T10:00:00', '60', 'UTC', '82011236547', 'x95kj0', NULL, NULL, NULL, NULL, NULL, '03/04/25', '1741064823', NULL, NULL, '1131', NULL, 'Mr Patient', 'Mr Doctor', NULL, '1131', '1141', '98', 'https://us05web.zoom.us/s/82011236547?zak=eyJ0eXAiOiJKV1QiLCJzdiI6IjAwMDAwMSIsInptX3NrbSI6InptX28ybSIsImFsZyI6IkhTMjU2In0.eyJpc3MiOiJ3ZWIiLCJjbHQiOjAsIm1udW0iOiI4MjAxMTIzNjU0NyIsImF1ZCI6ImNsaWVudHNtIiwidWlkIjoiVHRCeTZKVEZRaHFJUTNENXZBaDN3ZyIsInppZCI6ImFmYjY3ZDE2NDA3NDQ3Y2ZhZTY4MTk4N2NmNzg3ZjY3Iiwic2siOiI3OTU4MzM1NTAzMzU3OTE5MzQxIiwic3R5IjoxLCJ3Y2QiOiJ1czA1IiwiZXhwIjoxNzQxMDcyMDIzLCJpYXQiOjE3NDEwNjQ4MjMsImFpZCI6IkpBeVp4TmdQUlVxalJFTUdwOG16cmciLCJjaWQiOiIifQ.Eq2XtP0J_OmhZxwIDVo2MQtwF5c8JrfLG00nnlVrlcU', 'https://us05web.zoom.us/j/82011236547?pwd=d5xDudIDxHEKoCxOnbr6EBaC9Hbtq8.1', '440'),
(13, '53', '44', 'Doctor Appointment', '2', '2023-10-25T10:00:00', '60', 'UTC', '83538920357', '93mTmE', NULL, NULL, NULL, NULL, NULL, '03/03/25', '1741012832', NULL, NULL, '1131', NULL, 'Mr Patient', 'Mr Doctor', NULL, '1131', '1141', '98', 'https://us05web.zoom.us/s/83538920357?zak=eyJ0eXAiOiJKV1QiLCJzdiI6IjAwMDAwMSIsInptX3NrbSI6InptX28ybSIsImFsZyI6IkhTMjU2In0.eyJpc3MiOiJ3ZWIiLCJjbHQiOjAsIm1udW0iOiI4MzUzODkyMDM1NyIsImF1ZCI6ImNsaWVudHNtIiwidWlkIjoiVHRCeTZKVEZRaHFJUTNENXZBaDN3ZyIsInppZCI6ImE4ZTNhMTg1NjJkOTRjMmQ4MzJjYzNkMmFiZjg1YTZkIiwic2siOiI3OTU4MzM1NTAzMzU3OTE5MzQxIiwic3R5IjoxLCJ3Y2QiOiJ1czA1IiwiZXhwIjoxNzQxMDIwMDMyLCJpYXQiOjE3NDEwMTI4MzIsImFpZCI6IkpBeVp4TmdQUlVxalJFTUdwOG16cmciLCJjaWQiOiIifQ.gpcR70RX_ycUyhOWkENv2CTmjrzdsGRA5DcW1shO6eE', 'https://us05web.zoom.us/j/83538920357?pwd=G6NFMVC7IOaVXa4DamaHJq2ZtHzEnV.1', '437'),
(12, '53', '44', 'Doctor Appointment', '2', '2023-10-25T10:00:00', '60', 'UTC', '85895648727', 'KM6q12', NULL, NULL, NULL, NULL, NULL, '03/03/25', '1741011268', NULL, NULL, '1131', NULL, 'Mr Patient', 'Mr Doctor', NULL, '1131', '1141', '98', 'https://us05web.zoom.us/s/85895648727?zak=eyJ0eXAiOiJKV1QiLCJzdiI6IjAwMDAwMSIsInptX3NrbSI6InptX28ybSIsImFsZyI6IkhTMjU2In0.eyJpc3MiOiJ3ZWIiLCJjbHQiOjAsIm1udW0iOiI4NTg5NTY0ODcyNyIsImF1ZCI6ImNsaWVudHNtIiwidWlkIjoiVHRCeTZKVEZRaHFJUTNENXZBaDN3ZyIsInppZCI6IjM2YTVjYjJjNDdkZTRjMTc5OWY1YzlhOTA5NzJjYTE4Iiwic2siOiI3OTU4MzM1NTAzMzU3OTE5MzQxIiwic3R5IjoxLCJ3Y2QiOiJ1czA1IiwiZXhwIjoxNzQxMDE4NDY3LCJpYXQiOjE3NDEwMTEyNjcsImFpZCI6IkpBeVp4TmdQUlVxalJFTUdwOG16cmciLCJjaWQiOiIifQ.X4BR7Uwz2fn-fBJbug_swT5vVQKNKKebImVWvRZRqyc', 'https://us05web.zoom.us/j/85895648727?pwd=aZvDytH2dqQqeppuffCpXlThbzuvod.1', '438'),
(11, '53', '44', 'Doctor Appointment', '2', '2023-10-25T10:00:00', '60', 'UTC', '82586459984', 'wG3cKq', NULL, NULL, NULL, NULL, NULL, '03/03/25', '1741011112', NULL, NULL, '1131', NULL, 'Mr Patient', 'Mr Doctor', NULL, '1131', '1141', '98', 'https://us05web.zoom.us/s/82586459984?zak=eyJ0eXAiOiJKV1QiLCJzdiI6IjAwMDAwMSIsInptX3NrbSI6InptX28ybSIsImFsZyI6IkhTMjU2In0.eyJpc3MiOiJ3ZWIiLCJjbHQiOjAsIm1udW0iOiI4MjU4NjQ1OTk4NCIsImF1ZCI6ImNsaWVudHNtIiwidWlkIjoiVHRCeTZKVEZRaHFJUTNENXZBaDN3ZyIsInppZCI6IjEyYjhjYjI3N2E4NzRhMGJiODc3ZTBmZjY2Zjk5ZWU4Iiwic2siOiI3OTU4MzM1NTAzMzU3OTE5MzQxIiwic3R5IjoxLCJ3Y2QiOiJ1czA1IiwiZXhwIjoxNzQxMDE4MzEyLCJpYXQiOjE3NDEwMTExMTIsImFpZCI6IkpBeVp4TmdQUlVxalJFTUdwOG16cmciLCJjaWQiOiIifQ.V_o9Em_tEj7_bchm9Qvks6KnZY3knivqn5x2EZOwjjQ', 'https://us05web.zoom.us/j/82586459984?pwd=UOPSWqYF8ZvDOQPTrNZzXAn6HvyN4l.1', '439'),
(10, '53', '44', 'Doctor Appointment', '2', '2023-10-25T10:00:00', '60', 'UTC', '88391727862', 'vCyFb8', NULL, NULL, NULL, NULL, NULL, '03/03/25', '1741011108', NULL, NULL, '1131', NULL, 'Mr Patient', 'Mr Doctor', NULL, '1131', '1141', '98', 'https://us05web.zoom.us/s/88391727862?zak=eyJ0eXAiOiJKV1QiLCJzdiI6IjAwMDAwMSIsInptX3NrbSI6InptX28ybSIsImFsZyI6IkhTMjU2In0.eyJpc3MiOiJ3ZWIiLCJjbHQiOjAsIm1udW0iOiI4ODM5MTcyNzg2MiIsImF1ZCI6ImNsaWVudHNtIiwidWlkIjoiVHRCeTZKVEZRaHFJUTNENXZBaDN3ZyIsInppZCI6Ijg5MjA1OTM0NTRkODQxYTdhZWU1NGMyNTk4ZjQ1MmY3Iiwic2siOiI3OTU4MzM1NTAzMzU3OTE5MzQxIiwic3R5IjoxLCJ3Y2QiOiJ1czA1IiwiZXhwIjoxNzQxMDE4MzA4LCJpYXQiOjE3NDEwMTExMDgsImFpZCI6IkpBeVp4TmdQUlVxalJFTUdwOG16cmciLCJjaWQiOiIifQ.CtX2MkHh85UQd3oBJQOUHJxwRFkZBim-WXokgPpQjBg', 'https://us05web.zoom.us/j/88391727862?pwd=O7FtQFKqNvoauplrW5JKCKVPeUqpJi.1', '439'),
(9, '53', '44', 'Doctor Appointment', '2', '2023-10-25T10:00:00', '60', 'UTC', '81890542085', 'Y9ZTne', NULL, NULL, NULL, NULL, NULL, '03/03/25', '1741010847', NULL, NULL, '1131', NULL, 'Mr Patient', 'Mr Doctor', NULL, '1131', '1141', '98', 'https://us05web.zoom.us/s/81890542085?zak=eyJ0eXAiOiJKV1QiLCJzdiI6IjAwMDAwMSIsInptX3NrbSI6InptX28ybSIsImFsZyI6IkhTMjU2In0.eyJpc3MiOiJ3ZWIiLCJjbHQiOjAsIm1udW0iOiI4MTg5MDU0MjA4NSIsImF1ZCI6ImNsaWVudHNtIiwidWlkIjoiVHRCeTZKVEZRaHFJUTNENXZBaDN3ZyIsInppZCI6IjI1MGVkNjI2Y2E0YzRhMGNiZjRmZTU3ZjY0YjE4N2NmIiwic2siOiI3OTU4MzM1NTAzMzU3OTE5MzQxIiwic3R5IjoxLCJ3Y2QiOiJ1czA1IiwiZXhwIjoxNzQxMDE4MDQ3LCJpYXQiOjE3NDEwMTA4NDcsImFpZCI6IkpBeVp4TmdQUlVxalJFTUdwOG16cmciLCJjaWQiOiIifQ.7K1QUglIKiBA2YZN8n-Pa6xQ14twmkg0KpORk7g2Zo0', 'https://us05web.zoom.us/j/81890542085?pwd=rbCflrIbamfrdlvQg6w3ahXfQb9CV2.1', '439');

-- --------------------------------------------------------

--
-- Table structure for table `meeting_settings`
--

CREATE TABLE `meeting_settings` (
  `id` int(100) NOT NULL,
  `api_key` varchar(100) DEFAULT NULL,
  `secret_key` varchar(100) DEFAULT NULL,
  `ion_user_id` varchar(100) DEFAULT NULL,
  `url` varchar(500) DEFAULT NULL,
  `hospital_id` varchar(100) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

--
-- Dumping data for table `meeting_settings`
--

INSERT INTO `meeting_settings` (`id`, `api_key`, `secret_key`, `ion_user_id`, `url`, `hospital_id`) VALUES
(3, 'JAyZxNgPRU', 'iA7Jl6v9', '1131', 'aXZ3JuqEQ86', NULL),
(2, 'JAyZxNgPRUqjREMGp8mzrg', 'iA7Jl6v9Q2uWi0uUyA3pBw', NULL, 'aXZ3JuqEQ86uckLHswe6OzVVPDOVo8Ba', '98');

-- --------------------------------------------------------

--
-- Table structure for table `module`
--

CREATE TABLE `module` (
  `id` int(100) NOT NULL,
  `hospital_id` varchar(100) DEFAULT NULL,
  `modules` varchar(1000) DEFAULT NULL,
  `x` varchar(100) DEFAULT NULL,
  `y` varchar(100) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

-- --------------------------------------------------------

--
-- Stand-in structure for view `monthly_usage_summary`
-- (See below for the actual view)
--
CREATE TABLE `monthly_usage_summary` (
`inventory_item_id` int(11)
,`item_name` varchar(255)
,`category` varchar(100)
,`usage_year` int(5)
,`usage_month` int(3)
,`total_quantity_used` decimal(32,0)
,`total_cost` decimal(37,2)
,`avg_daily_usage` decimal(14,4)
,`hospital_id` int(11)
);

-- --------------------------------------------------------

--
-- Table structure for table `notice`
--

CREATE TABLE `notice` (
  `id` int(100) NOT NULL,
  `title` varchar(500) DEFAULT NULL,
  `description` varchar(100) DEFAULT NULL,
  `date` varchar(100) DEFAULT NULL,
  `type` varchar(100) DEFAULT NULL,
  `hospital_id` varchar(100) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

-- --------------------------------------------------------

--
-- Table structure for table `nurse`
--

CREATE TABLE `nurse` (
  `id` int(100) NOT NULL,
  `img_url` varchar(100) DEFAULT NULL,
  `name` varchar(100) DEFAULT NULL,
  `email` varchar(100) DEFAULT NULL,
  `address` varchar(100) DEFAULT NULL,
  `phone` varchar(100) DEFAULT NULL,
  `x` varchar(100) DEFAULT NULL,
  `y` varchar(100) DEFAULT NULL,
  `z` varchar(100) DEFAULT NULL,
  `ion_user_id` varchar(100) DEFAULT NULL,
  `hospital_id` varchar(100) DEFAULT NULL,
  `profile` varchar(1000) DEFAULT NULL,
  `signature` varchar(1000) DEFAULT NULL,
  `available` varchar(100) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

--
-- Dumping data for table `nurse`
--

INSERT INTO `nurse` (`id`, `img_url`, `name`, `email`, `address`, `phone`, `x`, `y`, `z`, `ion_user_id`, `hospital_id`, `profile`, `signature`, `available`) VALUES
(6, 'uploads/userIcon1.png', 'Mrs Nurse', 'nurse@hms.com', 'Ka/5, Bashundhara R/A Gate', '0123456789', NULL, NULL, NULL, '1037', '98', '<p>dckbkbkdc</p>\r\n<p>sdcsdjdscjhs</p>', 'uploads/Screenshot_from_2022-02-28_15-12-541.png', '1');

-- --------------------------------------------------------

--
-- Table structure for table `odontogram`
--

CREATE TABLE `odontogram` (
  `id` int(100) NOT NULL,
  `patient_id` int(100) NOT NULL,
  `Tooth32` varchar(30) NOT NULL,
  `Tooth31` varchar(30) NOT NULL,
  `Tooth30` varchar(30) NOT NULL,
  `Tooth29` varchar(30) NOT NULL,
  `Tooth28` varchar(30) NOT NULL,
  `Tooth27` varchar(30) NOT NULL,
  `Tooth26` varchar(30) NOT NULL,
  `Tooth25` varchar(30) NOT NULL,
  `Tooth24` varchar(30) NOT NULL,
  `Tooth23` varchar(30) NOT NULL,
  `Tooth22` varchar(30) NOT NULL,
  `Tooth21` varchar(30) NOT NULL,
  `Tooth20` varchar(30) NOT NULL,
  `Tooth19` varchar(30) NOT NULL,
  `Tooth18` varchar(30) NOT NULL,
  `Tooth17` varchar(30) NOT NULL,
  `Tooth16` varchar(30) NOT NULL,
  `Tooth15` varchar(30) NOT NULL,
  `Tooth14` varchar(30) NOT NULL,
  `Tooth13` varchar(30) NOT NULL,
  `Tooth12` varchar(30) NOT NULL,
  `Tooth11` varchar(30) NOT NULL,
  `Tooth10` varchar(30) NOT NULL,
  `Tooth9` varchar(30) NOT NULL,
  `Tooth8` varchar(30) NOT NULL,
  `Tooth7` varchar(30) NOT NULL,
  `Tooth6` varchar(30) NOT NULL,
  `Tooth5` varchar(30) NOT NULL,
  `Tooth4` varchar(30) NOT NULL,
  `Tooth3` varchar(30) NOT NULL,
  `Tooth2` varchar(30) NOT NULL,
  `Tooth1` varchar(30) NOT NULL,
  `description` varchar(500) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

--
-- Dumping data for table `odontogram`
--

INSERT INTO `odontogram` (`id`, `patient_id`, `Tooth32`, `Tooth31`, `Tooth30`, `Tooth29`, `Tooth28`, `Tooth27`, `Tooth26`, `Tooth25`, `Tooth24`, `Tooth23`, `Tooth22`, `Tooth21`, `Tooth20`, `Tooth19`, `Tooth18`, `Tooth17`, `Tooth16`, `Tooth15`, `Tooth14`, `Tooth13`, `Tooth12`, `Tooth11`, `Tooth10`, `Tooth9`, `Tooth8`, `Tooth7`, `Tooth6`, `Tooth5`, `Tooth4`, `Tooth3`, `Tooth2`, `Tooth1`, `description`) VALUES
(9, 11, 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'Descriptionn'),
(10, 21, 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', ''),
(11, 22, 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', ''),
(12, 23, 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'Description goes here ...'),
(13, 24, 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'Description'),
(14, 26, 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', ''),
(15, 27, 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', ''),
(16, 29, 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', ''),
(17, 32, 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', ''),
(18, 33, 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', ''),
(19, 44, 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', ''),
(20, 46, 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', ''),
(21, 47, 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', ''),
(22, 51, 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', ''),
(23, 50, 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', ''),
(24, 52, 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', ''),
(25, 53, 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', 'white', '');

-- --------------------------------------------------------

--
-- Table structure for table `ot_payment`
--

CREATE TABLE `ot_payment` (
  `id` int(100) NOT NULL,
  `patient` varchar(100) DEFAULT NULL,
  `doctor_c_s` varchar(100) DEFAULT NULL,
  `doctor_a_s_1` varchar(100) DEFAULT NULL,
  `doctor_a_s_2` varchar(100) DEFAULT NULL,
  `doctor_anaes` varchar(100) DEFAULT NULL,
  `n_o_o` varchar(100) DEFAULT NULL,
  `c_s_f` varchar(100) DEFAULT NULL,
  `a_s_f_1` varchar(100) DEFAULT NULL,
  `a_s_f_2` varchar(11) DEFAULT NULL,
  `anaes_f` varchar(100) DEFAULT NULL,
  `ot_charge` varchar(100) DEFAULT NULL,
  `cab_rent` varchar(100) DEFAULT NULL,
  `seat_rent` varchar(100) DEFAULT NULL,
  `others` varchar(100) DEFAULT NULL,
  `discount` varchar(100) DEFAULT NULL,
  `date` varchar(100) DEFAULT NULL,
  `amount` varchar(100) DEFAULT NULL,
  `doctor_fees` varchar(100) DEFAULT NULL,
  `hospital_fees` varchar(100) DEFAULT NULL,
  `gross_total` varchar(100) DEFAULT NULL,
  `flat_discount` varchar(100) DEFAULT NULL,
  `amount_received` varchar(100) DEFAULT NULL,
  `status` varchar(100) DEFAULT NULL,
  `user` varchar(100) DEFAULT NULL,
  `hospital_id` varchar(100) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

-- --------------------------------------------------------

--
-- Table structure for table `package`
--

CREATE TABLE `package` (
  `id` int(100) NOT NULL,
  `name` varchar(100) DEFAULT NULL,
  `monthly_price` varchar(100) DEFAULT NULL,
  `p_limit` varchar(100) DEFAULT NULL,
  `d_limit` varchar(100) DEFAULT NULL,
  `module` varchar(1000) DEFAULT NULL,
  `show_in_frontend` varchar(100) DEFAULT NULL,
  `frontend_order` varchar(100) DEFAULT NULL,
  `set_as_default` varchar(100) DEFAULT NULL,
  `yearly_price` varchar(1000) DEFAULT NULL,
  `recommended` varchar(1000) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

--
-- Dumping data for table `package`
--

INSERT INTO `package` (`id`, `name`, `monthly_price`, `p_limit`, `d_limit`, `module`, `show_in_frontend`, `frontend_order`, `set_as_default`, `yearly_price`, `recommended`) VALUES
(1, 'Premium ', '10000', '2000', '1000', 'accountant,appointment,lab,bed,department,doctor,donor,finance,pharmacy,laboratorist,medicine,nurse,patient,pharmacist,prescription,receptionist,report,notice,email,sms,file,payroll,attendance,leave,chat,site', 'Yes', NULL, NULL, '100000', 'Yes'),
(2, 'Standard', '5000', '1000', '500', 'accountant,appointment,lab,bed,department,doctor,donor,finance,pharmacy,laboratorist,medicine,nurse,patient,pharmacist,prescription,receptionist,report,notice,email,sms,file,payroll,attendance,leave,chat', 'Yes', NULL, NULL, '50000', 'Yes'),
(3, 'Starter', '3000', '100', '50', 'accountant,appointment,lab,bed,department,doctor,donor,finance,pharmacy,laboratorist,medicine,nurse,patient,pharmacist,prescription,receptionist,report,notice,email,sms,file,payroll', 'Yes', NULL, NULL, '30000', 'Yes');

-- --------------------------------------------------------

--
-- Table structure for table `patient`
--

CREATE TABLE `patient` (
  `id` int(100) NOT NULL,
  `img_url` varchar(100) DEFAULT NULL,
  `name` varchar(100) DEFAULT NULL,
  `email` varchar(1000) DEFAULT NULL,
  `doctor` varchar(100) DEFAULT NULL,
  `address` varchar(100) DEFAULT NULL,
  `phone` varchar(100) DEFAULT NULL,
  `sex` varchar(100) DEFAULT NULL,
  `birthdate` varchar(100) DEFAULT NULL,
  `age` varchar(100) DEFAULT NULL,
  `bloodgroup` varchar(100) DEFAULT NULL,
  `ion_user_id` varchar(100) DEFAULT NULL,
  `patient_id` varchar(100) DEFAULT NULL,
  `add_date` varchar(100) DEFAULT NULL,
  `registration_time` varchar(100) DEFAULT NULL,
  `how_added` varchar(100) DEFAULT NULL,
  `hospital_id` varchar(100) DEFAULT NULL,
  `appointment_confirmation` varchar(1000) DEFAULT NULL,
  `appointment_creation` varchar(1000) DEFAULT NULL,
  `payment_confirmation` varchar(1000) DEFAULT NULL,
  `meeting_schedule` varchar(1000) DEFAULT NULL,
  `language` varchar(300) DEFAULT NULL,
  `national_id` varchar(100) DEFAULT NULL,
  `height` varchar(100) DEFAULT NULL,
  `weight` varchar(100) DEFAULT NULL,
  `known_allergies` varchar(500) DEFAULT NULL,
  `medical_history` varchar(500) DEFAULT NULL,
  `emergency_contact_name` varchar(255) DEFAULT NULL,
  `emergency_contact_number` varchar(255) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

--
-- Dumping data for table `patient`
--

INSERT INTO `patient` (`id`, `img_url`, `name`, `email`, `doctor`, `address`, `phone`, `sex`, `birthdate`, `age`, `bloodgroup`, `ion_user_id`, `patient_id`, `add_date`, `registration_time`, `how_added`, `hospital_id`, `appointment_confirmation`, `appointment_creation`, `payment_confirmation`, `meeting_schedule`, `language`, `national_id`, `height`, `weight`, `known_allergies`, `medical_history`, `emergency_contact_name`, `emergency_contact_number`) VALUES
(25, NULL, 'caSoft', 'admin@example.commm', NULL, 'Ka, 3/I, Bashundhara Main Road, Baridhara', '01777024443', 'Male', '11-09-1987', '35-6-30', '', '1065', '631632', '04/10/23', '1681107777', NULL, '113', 'Active', 'Active', 'Active', 'Active', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(34, NULL, ' Rizvi Mahmud', 'rizvi@example.com', NULL, NULL, ' 012345678', 'Male', '05-10-2024', '0-0-2', NULL, '1113', '776677', '10/07/24', NULL, 'from_pos', '133', 'Active', 'Active', 'Active', 'Active', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(53, NULL, 'Mr Patient', 'patient@hms.com', '44,49', 'Bashundhara, Dhaka', '01749335508', 'Male', '01-01-2025', '0-0-13', 'A+', '1141', '734154', '01/14/25', '1736862254', NULL, '98', 'Active', 'Active', 'Active', 'Active', NULL, '123456', '156', '67', 'dfgdfg', 'dfgdfg', '', '');

-- --------------------------------------------------------

--
-- Table structure for table `patient_deposit`
--

CREATE TABLE `patient_deposit` (
  `id` int(10) NOT NULL,
  `patient` varchar(100) DEFAULT NULL,
  `payment_id` varchar(100) DEFAULT NULL,
  `date` varchar(100) DEFAULT NULL,
  `deposited_amount` varchar(100) DEFAULT NULL,
  `amount_received_id` varchar(100) DEFAULT NULL,
  `deposit_type` varchar(100) DEFAULT NULL,
  `gateway` varchar(100) DEFAULT NULL,
  `user` varchar(100) DEFAULT NULL,
  `hospital_id` varchar(100) DEFAULT NULL,
  `payment_from` varchar(1000) DEFAULT NULL,
  `insurance_company` varchar(100) DEFAULT NULL,
  `insurance_details` varchar(1000) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

-- --------------------------------------------------------

--
-- Table structure for table `patient_material`
--

CREATE TABLE `patient_material` (
  `id` int(100) NOT NULL,
  `date` varchar(100) DEFAULT NULL,
  `title` varchar(100) DEFAULT NULL,
  `category` varchar(100) DEFAULT NULL,
  `patient` varchar(100) DEFAULT NULL,
  `patient_name` varchar(100) DEFAULT NULL,
  `patient_address` varchar(100) DEFAULT NULL,
  `patient_phone` varchar(100) DEFAULT NULL,
  `url` varchar(1000) DEFAULT NULL,
  `date_string` varchar(100) DEFAULT NULL,
  `hospital_id` varchar(100) DEFAULT NULL,
  `folder` varchar(1000) DEFAULT NULL,
  `type` varchar(1000) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

--
-- Dumping data for table `patient_material`
--

INSERT INTO `patient_material` (`id`, `date`, `title`, `category`, `patient`, `patient_name`, `patient_address`, `patient_phone`, `url`, `date_string`, `hospital_id`, `folder`, `type`) VALUES
(49, '1742978889', 'rtetre', NULL, '53', 'Mr Patient', 'Bashundhara, Dhaka', '01749335508', 'uploads/documents/PatientHospitalManagementSystem.pdf', '26-03-25', '98', NULL, NULL);

-- --------------------------------------------------------

--
-- Table structure for table `payment`
--

CREATE TABLE `payment` (
  `id` int(10) NOT NULL,
  `category` varchar(100) DEFAULT NULL,
  `patient` varchar(100) DEFAULT NULL,
  `doctor` varchar(100) DEFAULT NULL,
  `date` varchar(100) DEFAULT NULL,
  `amount` varchar(100) DEFAULT NULL,
  `vat` varchar(100) NOT NULL DEFAULT '0',
  `x_ray` varchar(100) DEFAULT NULL,
  `flat_vat` varchar(100) DEFAULT NULL,
  `discount` varchar(100) NOT NULL DEFAULT '0',
  `flat_discount` varchar(100) DEFAULT NULL,
  `gross_total` varchar(100) DEFAULT NULL,
  `remarks` varchar(500) DEFAULT NULL,
  `hospital_amount` varchar(100) DEFAULT NULL,
  `doctor_amount` varchar(100) DEFAULT NULL,
  `category_amount` varchar(1000) DEFAULT NULL,
  `category_name` varchar(1000) DEFAULT NULL,
  `amount_received` varchar(100) DEFAULT NULL,
  `deposit_type` varchar(100) DEFAULT NULL,
  `status` varchar(100) DEFAULT NULL,
  `user` varchar(100) DEFAULT NULL,
  `patient_name` varchar(100) DEFAULT NULL,
  `patient_phone` varchar(100) DEFAULT NULL,
  `patient_address` varchar(100) DEFAULT NULL,
  `doctor_name` varchar(100) DEFAULT NULL,
  `date_string` varchar(100) DEFAULT NULL,
  `hospital_id` varchar(100) DEFAULT NULL,
  `payment_from` varchar(1000) DEFAULT NULL,
  `date_delivery` varchar(1000) DEFAULT NULL,
  `time_delivery` varchar(1000) DEFAULT NULL,
  `percent_discount` varchar(100) DEFAULT NULL,
  `vat_amount_percent` varchar(100) DEFAULT NULL,
  `appointment_id` varchar(50) DEFAULT NULL,
  `hospital_payment_id` varchar(100) DEFAULT NULL,
  `alloted_bed_id` varchar(100) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

-- --------------------------------------------------------

--
-- Table structure for table `paymentGateway`
--

CREATE TABLE `paymentGateway` (
  `id` int(100) NOT NULL,
  `name` varchar(100) DEFAULT NULL,
  `merchant_key` varchar(100) DEFAULT NULL,
  `salt` varchar(100) DEFAULT NULL,
  `x` varchar(100) DEFAULT NULL,
  `y` varchar(100) DEFAULT NULL,
  `APIUsername` varchar(100) DEFAULT NULL,
  `APIPassword` varchar(100) DEFAULT NULL,
  `APISignature` varchar(100) DEFAULT NULL,
  `status` varchar(1000) DEFAULT NULL,
  `publish` varchar(1000) DEFAULT NULL,
  `secret` varchar(1000) DEFAULT NULL,
  `hospital_id` varchar(100) DEFAULT NULL,
  `public_key` varchar(1000) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;



-- --------------------------------------------------------

--
-- Table structure for table `payment_category`
--

CREATE TABLE `payment_category` (
  `id` int(10) NOT NULL,
  `category` varchar(100) DEFAULT NULL,
  `description` varchar(100) DEFAULT NULL,
  `c_price` varchar(100) DEFAULT NULL,
  `type` varchar(100) DEFAULT NULL,
  `d_commission` int(100) DEFAULT NULL,
  `h_commission` int(100) DEFAULT NULL,
  `hospital_id` varchar(100) DEFAULT NULL,
  `code` varchar(1000) DEFAULT NULL,
  `payment_category` varchar(1000) DEFAULT NULL,
  `payment_category_name` varchar(1000) DEFAULT NULL,
  `report` varchar(1000) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

--
-- Dumping data for table `payment_category`
--

INSERT INTO `payment_category` (`id`, `category`, `description`, `c_price`, `type`, `d_commission`, `h_commission`, `hospital_id`, `code`, `payment_category`, `payment_category_name`, `report`) VALUES
(86, 'X-ray', 'dsfs', '500', 'diagnostic', 0, NULL, '98', 'K0001', NULL, NULL, NULL),
(83, 'Blood Test', 'Room 1207', '400', 'diagnostic', 0, NULL, '133', 'A90', '12', 'Pathology', NULL);

-- --------------------------------------------------------

--
-- Table structure for table `payroll`
--

CREATE TABLE `payroll` (
  `id` int(100) NOT NULL,
  `staff` varchar(100) DEFAULT NULL,
  `month` varchar(100) DEFAULT NULL,
  `year` varchar(100) DEFAULT NULL,
  `paid_on` varchar(100) DEFAULT NULL,
  `expense` varchar(100) DEFAULT NULL,
  `earning` mediumtext DEFAULT NULL,
  `deduction` mediumtext DEFAULT NULL,
  `status` varchar(100) DEFAULT NULL,
  `hospital_id` varchar(100) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

--
-- Dumping data for table `payroll`
--

INSERT INTO `payroll` (`id`, `staff`, `month`, `year`, `paid_on`, `expense`, `earning`, `deduction`, `status`, `hospital_id`) VALUES
(1, '882', 'September', '2021', NULL, NULL, 'Gross Salary_0', NULL, 'Generated', '1'),
(2, '881', 'September', '2021', NULL, NULL, 'Gross Salary_0', NULL, 'Generated', '1'),
(3, '883', 'September', '2021', NULL, NULL, 'Gross Salary_0', NULL, 'Generated', '1'),
(4, '880', 'September', '2021', NULL, NULL, 'Gross Salary_0', NULL, 'Generated', '1'),
(5, '879', 'September', '2021', NULL, NULL, 'Gross Salary_0', NULL, 'Generated', '1'),
(6, '878', 'September', '2021', NULL, NULL, 'Gross Salary_0', NULL, 'Generated', '1'),
(7, '998', 'April', '2022', NULL, NULL, 'Gross Salary_20000', NULL, 'Generated', '98'),
(8, '1011', 'April', '2022', NULL, NULL, 'Gross Salary_0', NULL, 'Generated', '98'),
(9, '997', 'April', '2022', NULL, NULL, 'Gross Salary_0', NULL, 'Generated', '98'),
(10, '1015', 'April', '2022', NULL, NULL, 'Gross Salary_0', NULL, 'Generated', '98'),
(11, '999', 'April', '2022', NULL, NULL, 'Gross Salary_0', NULL, 'Generated', '98'),
(12, '1013', 'April', '2022', NULL, NULL, 'Gross Salary_0', NULL, 'Generated', '98'),
(13, '996', 'April', '2022', NULL, NULL, 'Gross Salary_0', NULL, 'Generated', '98'),
(14, '1014', 'April', '2022', NULL, NULL, 'Gross Salary_0', NULL, 'Generated', '98'),
(15, '995', 'April', '2022', NULL, NULL, 'Gross Salary_0', NULL, 'Generated', '98'),
(16, '1012', 'April', '2022', NULL, NULL, 'Gross Salary_0', NULL, 'Generated', '98'),
(17, '994', 'April', '2022', NULL, NULL, 'Gross Salary_0', NULL, 'Generated', '98'),
(18, '1004', 'April', '2022', NULL, NULL, 'Gross Salary_0', NULL, 'Generated', '98'),
(19, '1005', 'April', '2022', NULL, NULL, 'Gross Salary_0', NULL, 'Generated', '98'),
(20, '1008', 'April', '2022', NULL, NULL, 'Gross Salary_0', NULL, 'Generated', '98'),
(21, '1009', 'April', '2022', NULL, NULL, 'Gross Salary_0', NULL, 'Generated', '98'),
(22, '1010', 'April', '2022', NULL, NULL, 'Gross Salary_0', NULL, 'Generated', '98'),
(23, '998', 'March', '2022', NULL, NULL, 'Gross Salary_0', NULL, 'Generated', '98'),
(24, '1011', 'March', '2022', NULL, NULL, 'Gross Salary_0', NULL, 'Generated', '98'),
(25, '997', 'March', '2022', NULL, NULL, 'Gross Salary_0', NULL, 'Generated', '98'),
(26, '1015', 'March', '2022', NULL, NULL, 'Gross Salary_0', NULL, 'Generated', '98'),
(27, '999', 'March', '2022', NULL, NULL, 'Gross Salary_0', NULL, 'Generated', '98'),
(28, '1013', 'March', '2022', NULL, NULL, 'Gross Salary_0', NULL, 'Generated', '98'),
(29, '996', 'March', '2022', NULL, NULL, 'Gross Salary_0', NULL, 'Generated', '98'),
(30, '1014', 'March', '2022', NULL, NULL, 'Gross Salary_0', NULL, 'Generated', '98'),
(31, '995', 'March', '2022', NULL, NULL, 'Gross Salary_0', NULL, 'Generated', '98'),
(32, '1012', 'March', '2022', NULL, NULL, 'Gross Salary_0', NULL, 'Generated', '98'),
(33, '994', 'March', '2022', NULL, NULL, 'Gross Salary_0', NULL, 'Generated', '98'),
(34, '1004', 'March', '2022', NULL, NULL, 'Gross Salary_0', NULL, 'Generated', '98'),
(35, '1005', 'March', '2022', NULL, NULL, 'Gross Salary_0', NULL, 'Generated', '98'),
(36, '1008', 'March', '2022', NULL, NULL, 'Gross Salary_0', NULL, 'Generated', '98'),
(37, '1009', 'March', '2022', NULL, NULL, 'Gross Salary_0', NULL, 'Generated', '98'),
(38, '1010', 'March', '2022', NULL, NULL, 'Gross Salary_0', NULL, 'Generated', '98'),
(39, '1020', 'March', '2022', NULL, NULL, 'Gross Salary_0', NULL, 'Generated', '98'),
(40, '1020', 'April', '2022', NULL, NULL, 'Gross Salary_0', NULL, 'Generated', '98'),
(41, '998', 'July', '2022', NULL, NULL, 'Gross Salary_0', NULL, 'Generated', '98'),
(42, '997', 'July', '2022', NULL, NULL, 'Gross Salary_0', NULL, 'Generated', '98'),
(43, '999', 'July', '2022', NULL, NULL, 'Gross Salary_0', NULL, 'Generated', '98'),
(44, '996', 'July', '2022', NULL, NULL, 'Gross Salary_0', NULL, 'Generated', '98'),
(45, '1037', 'July', '2022', NULL, NULL, 'Gross Salary_0', NULL, 'Generated', '98'),
(46, '994', 'July', '2022', NULL, NULL, 'Gross Salary_0', NULL, 'Generated', '98'),
(47, '1039', 'July', '2022', NULL, NULL, 'Gross Salary_0', NULL, 'Generated', '98'),
(48, '998', 'June', '2022', NULL, NULL, 'Gross Salary_0', NULL, 'Generated', '98'),
(49, '997', 'June', '2022', NULL, NULL, 'Gross Salary_0', NULL, 'Generated', '98'),
(50, '999', 'June', '2022', NULL, NULL, 'Gross Salary_0', NULL, 'Generated', '98'),
(51, '996', 'June', '2022', NULL, NULL, 'Gross Salary_0', NULL, 'Generated', '98'),
(52, '1037', 'June', '2022', NULL, NULL, 'Gross Salary_0', NULL, 'Generated', '98'),
(53, '994', 'June', '2022', NULL, NULL, 'Gross Salary_0', NULL, 'Generated', '98'),
(54, '1039', 'June', '2022', NULL, NULL, 'Gross Salary_0', NULL, 'Generated', '98'),
(55, '1040', 'July', '2022', '19-07-2022', '500', 'Gross Salary_20000#Sales Commission_2000', '', 'Generated', '98'),
(56, '1043', 'July', '2022', NULL, NULL, 'Gross Salary_0', NULL, 'Generated', '98'),
(57, '998', 'January', '2021', NULL, NULL, 'Gross Salary_0', NULL, 'Generated', '98'),
(58, '997', 'January', '2021', NULL, NULL, 'Gross Salary_0', NULL, 'Generated', '98'),
(59, '999', 'January', '2021', NULL, NULL, 'Gross Salary_0', NULL, 'Generated', '98'),
(60, '996', 'January', '2021', NULL, NULL, 'Gross Salary_0', NULL, 'Generated', '98'),
(61, '1040', 'January', '2021', NULL, NULL, 'Gross Salary_0', NULL, 'Generated', '98'),
(62, '1037', 'January', '2021', NULL, NULL, 'Gross Salary_0', NULL, 'Generated', '98'),
(63, '994', 'January', '2021', NULL, NULL, 'Gross Salary_0', NULL, 'Generated', '98'),
(64, '998', 'April', '2023', NULL, NULL, 'Gross Salary_0', NULL, 'Generated', '98'),
(65, '1062', 'April', '2023', NULL, NULL, 'Gross Salary_0', NULL, 'Generated', '98'),
(66, '997', 'April', '2023', NULL, NULL, 'Gross Salary_0', NULL, 'Generated', '98'),
(67, '1061', 'April', '2023', NULL, NULL, 'Gross Salary_0', NULL, 'Generated', '98'),
(68, '999', 'April', '2023', NULL, NULL, 'Gross Salary_0', NULL, 'Generated', '98'),
(69, '1063', 'April', '2023', NULL, NULL, 'Gross Salary_0', NULL, 'Generated', '98'),
(70, '996', 'April', '2023', NULL, NULL, 'Gross Salary_0', NULL, 'Generated', '98'),
(71, '1060', 'April', '2023', NULL, NULL, 'Gross Salary_0', NULL, 'Generated', '98'),
(72, '1059', 'April', '2023', NULL, NULL, 'Gross Salary_0', NULL, 'Generated', '98'),
(73, '1037', 'April', '2023', NULL, NULL, 'Gross Salary_0', NULL, 'Generated', '98'),
(74, '994', 'April', '2023', NULL, NULL, 'Gross Salary_0', NULL, 'Generated', '98'),
(75, '1067', 'August', '2023', NULL, NULL, 'Gross Salary_0', NULL, 'Generated', '98'),
(76, '997', 'August', '2023', NULL, NULL, 'Gross Salary_0', NULL, 'Generated', '98'),
(77, '999', 'August', '2023', NULL, NULL, 'Gross Salary_0', NULL, 'Generated', '98'),
(78, '996', 'August', '2023', NULL, NULL, 'Gross Salary_0', NULL, 'Generated', '98'),
(79, '1037', 'August', '2023', NULL, NULL, 'Gross Salary_0', NULL, 'Generated', '98'),
(80, '994', 'August', '2023', NULL, NULL, 'Gross Salary_0', NULL, 'Generated', '98'),
(81, '1067', 'January', '2024', '18-01-2024', '', 'Gross Salary_0', 'deduction_0', 'Paid', '98'),
(82, '997', 'January', '2024', '18-01-2024', '500', 'Gross Salary_1000#sdsad_100', 'fdgdfg_50', 'Paid', '98'),
(83, '999', 'January', '2024', '30-01-2024', '0', 'Gross Salary_0#sdsad_50', '', 'Paid', '98'),
(84, '996', 'January', '2024', '18-01-2024', '', 'Gross Salary_0', NULL, 'Generated', '98'),
(85, '1037', 'January', '2024', '28-01-2024', '100', 'Gross Salary_1000#sdsad_100', NULL, 'Paid', '98'),
(86, '994', 'January', '2024', '18-01-2024', '', 'Gross Salary_0', '', 'Paid', '98'),
(87, '1067', 'January', '2023', NULL, NULL, 'Gross Salary_0', NULL, 'Generated', '98'),
(88, '997', 'January', '2023', NULL, NULL, 'Gross Salary_0', NULL, 'Generated', '98'),
(89, '999', 'January', '2023', NULL, NULL, 'Gross Salary_0', NULL, 'Generated', '98'),
(90, '996', 'January', '2023', NULL, NULL, 'Gross Salary_0', NULL, 'Generated', '98'),
(91, '1037', 'January', '2023', NULL, NULL, 'Gross Salary_0', NULL, 'Generated', '98'),
(92, '994', 'January', '2023', NULL, NULL, 'Gross Salary_0', NULL, 'Generated', '98'),
(93, '1067', 'December', '2023', NULL, NULL, 'Gross Salary_0', NULL, 'Generated', '98'),
(94, '997', 'December', '2023', NULL, NULL, 'Gross Salary_0', NULL, 'Generated', '98'),
(95, '999', 'December', '2023', NULL, NULL, 'Gross Salary_0', NULL, 'Generated', '98'),
(96, '996', 'December', '2023', NULL, NULL, 'Gross Salary_0', NULL, 'Generated', '98'),
(97, '1037', 'December', '2023', NULL, NULL, 'Gross Salary_0', NULL, 'Generated', '98'),
(98, '994', 'December', '2023', NULL, NULL, 'Gross Salary_0', NULL, 'Generated', '98'),
(99, '1067', 'November', '2024', NULL, NULL, 'Gross Salary_0', NULL, 'Generated', '98'),
(100, '997', 'November', '2024', NULL, NULL, 'Gross Salary_0', NULL, 'Generated', '98'),
(101, '999', 'November', '2024', NULL, NULL, 'Gross Salary_0', NULL, 'Generated', '98'),
(102, '996', 'November', '2024', NULL, NULL, 'Gross Salary_0', NULL, 'Generated', '98'),
(103, '1037', 'November', '2024', NULL, NULL, 'Gross Salary_0', NULL, 'Generated', '98'),
(104, '994', 'November', '2024', NULL, NULL, 'Gross Salary_0', NULL, 'Generated', '98');

-- --------------------------------------------------------

--
-- Table structure for table `pharmacist`
--

CREATE TABLE `pharmacist` (
  `id` int(100) NOT NULL,
  `img_url` varchar(100) DEFAULT NULL,
  `name` varchar(100) DEFAULT NULL,
  `email` varchar(100) DEFAULT NULL,
  `address` varchar(100) DEFAULT NULL,
  `phone` varchar(100) DEFAULT NULL,
  `x` varchar(100) DEFAULT NULL,
  `y` varchar(100) DEFAULT NULL,
  `ion_user_id` varchar(100) DEFAULT NULL,
  `hospital_id` varchar(100) DEFAULT NULL,
  `profile` varchar(1000) DEFAULT NULL,
  `signature` varchar(1000) DEFAULT NULL,
  `available` varchar(100) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

--
-- Dumping data for table `pharmacist`
--

INSERT INTO `pharmacist` (`id`, `img_url`, `name`, `email`, `address`, `phone`, `x`, `y`, `ion_user_id`, `hospital_id`, `profile`, `signature`, `available`) VALUES
(3, 'uploads/userIcon2.png', 'Mr. Pharmacist', 'pharmacist@hms.com', 'Ka/5, Bashundhara R/A Gate', '123456789', NULL, NULL, '996', '98', '<p>bhjgjgj</p>', 'uploads/Screenshot_from_2022-03-23_16-27-062.png', '0');

-- --------------------------------------------------------

--
-- Table structure for table `pharmacy_expense`
--

CREATE TABLE `pharmacy_expense` (
  `id` int(10) NOT NULL,
  `category` varchar(100) DEFAULT NULL,
  `date` varchar(100) DEFAULT NULL,
  `amount` varchar(100) DEFAULT NULL,
  `user` varchar(100) DEFAULT NULL,
  `hospital_id` varchar(100) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

-- --------------------------------------------------------

--
-- Table structure for table `pharmacy_expense_category`
--

CREATE TABLE `pharmacy_expense_category` (
  `id` int(10) NOT NULL,
  `category` varchar(100) DEFAULT NULL,
  `description` varchar(100) DEFAULT NULL,
  `x` varchar(100) DEFAULT NULL,
  `y` varchar(100) DEFAULT NULL,
  `hospital_id` varchar(100) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

-- --------------------------------------------------------

--
-- Table structure for table `pharmacy_payment`
--

CREATE TABLE `pharmacy_payment` (
  `id` int(10) NOT NULL,
  `category` varchar(100) DEFAULT NULL,
  `patient` varchar(100) DEFAULT NULL,
  `doctor` varchar(100) DEFAULT NULL,
  `date` varchar(100) DEFAULT NULL,
  `amount` varchar(100) DEFAULT NULL,
  `vat` varchar(100) NOT NULL DEFAULT '0',
  `x_ray` varchar(100) DEFAULT NULL,
  `flat_vat` varchar(100) DEFAULT NULL,
  `discount` varchar(100) NOT NULL DEFAULT '0',
  `flat_discount` varchar(100) DEFAULT NULL,
  `gross_total` varchar(100) DEFAULT NULL,
  `hospital_amount` varchar(100) DEFAULT NULL,
  `doctor_amount` varchar(100) DEFAULT NULL,
  `category_amount` varchar(1000) DEFAULT NULL,
  `category_name` varchar(1000) DEFAULT NULL,
  `amount_received` varchar(100) DEFAULT NULL,
  `status` varchar(100) DEFAULT NULL,
  `hospital_id` varchar(100) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

--
-- Dumping data for table `pharmacy_payment`
--

INSERT INTO `pharmacy_payment` (`id`, `category`, `patient`, `doctor`, `date`, `amount`, `vat`, `x_ray`, `flat_vat`, `discount`, `flat_discount`, `gross_total`, `hospital_amount`, `doctor_amount`, `category_amount`, `category_name`, `amount_received`, `status`, `hospital_id`) VALUES
(20, NULL, NULL, NULL, '1754820327', '12', '0', NULL, NULL, '0', '0', '12', NULL, NULL, NULL, '33*12*1*10', NULL, 'unpaid', '98'),
(21, NULL, 'Walk-in Customer', NULL, '1756820809', '12', '0', NULL, NULL, '0', '0', '12', NULL, NULL, NULL, '35*12*1*10', '100', 'unpaid', '98'),
(22, NULL, 'Walk-in Customer', NULL, '1756821413', '264', '0', NULL, NULL, '0', '0', '264', NULL, NULL, NULL, '35*12*10*10,33*12*12*10', '500', 'unpaid', '98'),
(23, NULL, 'Walk-in Customer', NULL, '1756959636', '120', '0', NULL, NULL, '20', '20', '100', NULL, NULL, NULL, '35*12*10*10', '100', 'unpaid', '98'),
(24, NULL, 'Walk-in Customer', NULL, '1756959780', '108', '0', NULL, NULL, '8', '8', '100', NULL, NULL, NULL, '35*12*9*10', '100', 'unpaid', '98'),
(25, NULL, 'Walk-in Customer', NULL, '1757147054', '12', '0', NULL, NULL, '10', '10', '2', NULL, NULL, NULL, '35*12*1*10', '20', 'unpaid', '98'),
(26, NULL, 'Walk-in Customer', NULL, '1757147247', '12', '0', NULL, NULL, '10', '10', '2', NULL, NULL, NULL, '35*12*1*10', '', 'unpaid', '98');

-- --------------------------------------------------------

--
-- Table structure for table `pharmacy_payment_category`
--

CREATE TABLE `pharmacy_payment_category` (
  `id` int(10) NOT NULL,
  `category` varchar(100) DEFAULT NULL,
  `description` varchar(100) DEFAULT NULL,
  `c_price` varchar(100) DEFAULT NULL,
  `d_commission` int(100) DEFAULT NULL,
  `h_commission` int(100) DEFAULT NULL,
  `hospital_id` varchar(100) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

-- --------------------------------------------------------

--
-- Table structure for table `prescription`
--

CREATE TABLE `prescription` (
  `id` int(100) NOT NULL,
  `date` varchar(100) DEFAULT NULL,
  `patient` varchar(100) DEFAULT NULL,
  `doctor` varchar(100) DEFAULT NULL,
  `symptom` varchar(100) DEFAULT NULL,
  `advice` varchar(1000) DEFAULT NULL,
  `state` varchar(100) DEFAULT NULL,
  `dd` varchar(100) DEFAULT NULL,
  `medicine` varchar(1000) DEFAULT NULL,
  `validity` varchar(100) DEFAULT NULL,
  `note` varchar(1000) DEFAULT NULL,
  `patientname` varchar(1000) DEFAULT NULL,
  `doctorname` varchar(1000) DEFAULT NULL,
  `hospital_id` varchar(100) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

-- --------------------------------------------------------

--
-- Table structure for table `pservice`
--

CREATE TABLE `pservice` (
  `id` int(100) NOT NULL,
  `name` varchar(1000) DEFAULT NULL,
  `code` varchar(1000) DEFAULT NULL,
  `alpha_code` varchar(1000) DEFAULT NULL,
  `price` varchar(1000) DEFAULT NULL,
  `active` varchar(1000) DEFAULT NULL,
  `hospital_id` varchar(1000) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

-- --------------------------------------------------------

--
-- Table structure for table `purchase_orders`
--

CREATE TABLE `purchase_orders` (
  `id` int(11) NOT NULL,
  `po_number` varchar(50) NOT NULL,
  `supplier_id` int(11) NOT NULL,
  `order_date` date NOT NULL,
  `expected_delivery_date` date DEFAULT NULL,
  `delivery_date` date DEFAULT NULL,
  `status` enum('draft','sent','confirmed','partially_received','completed','cancelled') DEFAULT 'draft',
  `total_amount` decimal(15,2) DEFAULT 0.00,
  `tax_amount` decimal(15,2) DEFAULT 0.00,
  `discount_amount` decimal(15,2) DEFAULT 0.00,
  `shipping_amount` decimal(15,2) DEFAULT 0.00,
  `grand_total` decimal(15,2) DEFAULT 0.00,
  `payment_terms` varchar(255) DEFAULT NULL,
  `delivery_address` text DEFAULT NULL,
  `notes` text DEFAULT NULL,
  `approved_by` int(11) DEFAULT NULL,
  `approved_at` timestamp NULL DEFAULT NULL,
  `hospital_id` int(11) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `created_by` int(11) DEFAULT NULL,
  `updated_by` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `purchase_orders`
--

INSERT INTO `purchase_orders` (`id`, `po_number`, `supplier_id`, `order_date`, `expected_delivery_date`, `delivery_date`, `status`, `total_amount`, `tax_amount`, `discount_amount`, `shipping_amount`, `grand_total`, `payment_terms`, `delivery_address`, `notes`, `approved_by`, `approved_at`, `hospital_id`, `created_at`, `updated_at`, `created_by`, `updated_by`) VALUES
(8, 'PO20250001', 1, '2025-08-08', '2025-08-08', NULL, 'completed', 0.00, 0.00, 0.00, 0.00, 0.00, 'COD', '', 'sdfgfdg', NULL, NULL, 98, '2025-08-08 19:49:04', '2025-08-08 09:49:04', 992, NULL),
(9, 'PO20250002', 1, '2025-08-08', '2025-08-05', NULL, 'completed', 120.00, 0.00, 0.00, 0.00, 120.00, '', '', '', NULL, NULL, 98, '2025-08-08 22:10:57', '2025-08-08 12:10:57', 992, NULL),
(10, 'PO20250003', 1, '2025-08-08', '0000-00-00', NULL, 'completed', 1200.00, 0.00, 0.00, 0.00, 1200.00, 'COD', '', '', NULL, NULL, 98, '2025-08-08 22:25:04', '2025-08-08 12:25:04', 992, NULL),
(11, 'PO20250004', 3, '2025-08-27', '2025-08-29', NULL, 'completed', 240.00, 0.00, 0.00, 0.00, 240.00, 'Net 30', '', 'sdfsdfdsf', NULL, NULL, 98, '2025-08-27 17:43:17', '2025-08-27 07:43:17', 992, NULL),
(12, 'PO20250005', 2, '2025-09-04', '2025-09-04', NULL, 'completed', 1000.00, 0.00, 0.00, 0.00, 1000.00, 'Net 15', '', 'sdfdsf', NULL, NULL, 98, '2025-09-04 14:30:14', '2025-09-04 04:30:14', 992, NULL);

-- --------------------------------------------------------

--
-- Table structure for table `purchase_order_items`
--

CREATE TABLE `purchase_order_items` (
  `id` int(11) NOT NULL,
  `purchase_order_id` int(11) NOT NULL,
  `inventory_item_id` int(11) NOT NULL,
  `quantity_ordered` int(11) NOT NULL,
  `quantity_received` int(11) DEFAULT 0,
  `unit_price` decimal(10,2) NOT NULL,
  `total_price` decimal(15,2) NOT NULL,
  `expiry_date` date DEFAULT NULL,
  `batch_number` varchar(100) DEFAULT NULL,
  `notes` text DEFAULT NULL,
  `received_at` timestamp NULL DEFAULT NULL,
  `received_by` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `purchase_order_items`
--

INSERT INTO `purchase_order_items` (`id`, `purchase_order_id`, `inventory_item_id`, `quantity_ordered`, `quantity_received`, `unit_price`, `total_price`, `expiry_date`, `batch_number`, `notes`, `received_at`, `received_by`) VALUES
(4, 8, 1, 1500, 1500, 10.00, 15000.00, NULL, NULL, NULL, '2025-08-08 19:49:04', 992),
(5, 9, 3, 10, 10, 12.00, 120.00, NULL, NULL, NULL, '2025-08-08 22:10:57', 992),
(6, 10, 2, 100, 100, 12.00, 1200.00, NULL, NULL, NULL, '2025-08-08 22:25:04', 992),
(7, 11, 3, 10, 10, 12.00, 120.00, NULL, NULL, NULL, '2025-08-27 17:43:17', 992),
(8, 11, 2, 10, 10, 12.00, 120.00, NULL, NULL, NULL, '2025-08-27 17:43:17', 992),
(9, 12, 4, 100, 100, 10.00, 1000.00, NULL, NULL, NULL, '2025-09-04 14:30:14', 992);

--
-- Triggers `purchase_order_items`
--
DELIMITER $$
CREATE TRIGGER `tr_update_stock_on_purchase` AFTER UPDATE ON `purchase_order_items` FOR EACH ROW BEGIN
    IF NEW.quantity_received > OLD.quantity_received THEN
        UPDATE inventory_items 
        SET current_stock = current_stock + (NEW.quantity_received - OLD.quantity_received),
            updated_at = CURRENT_TIMESTAMP
        WHERE id = NEW.inventory_item_id;
        
        INSERT INTO stock_transactions (
            inventory_item_id, transaction_type, reference_type, reference_id, 
            quantity, unit_cost, total_cost, previous_stock, new_stock, 
            expiry_date, batch_number, hospital_id, created_by
        ) VALUES (
            NEW.inventory_item_id, 'purchase', 'purchase_order', NEW.purchase_order_id,
            (NEW.quantity_received - OLD.quantity_received), NEW.unit_price, 
            (NEW.quantity_received - OLD.quantity_received) * NEW.unit_price,
            (SELECT current_stock - (NEW.quantity_received - OLD.quantity_received) FROM inventory_items WHERE id = NEW.inventory_item_id),
            (SELECT current_stock FROM inventory_items WHERE id = NEW.inventory_item_id),
            NEW.expiry_date, NEW.batch_number,
            (SELECT hospital_id FROM inventory_items WHERE id = NEW.inventory_item_id),
            NEW.received_by
        );
    END IF;
END
$$
DELIMITER ;

-- --------------------------------------------------------

--
-- Stand-in structure for view `purchase_order_summary`
-- (See below for the actual view)
--
CREATE TABLE `purchase_order_summary` (
`id` int(11)
,`po_number` varchar(50)
,`supplier_name` varchar(255)
,`order_date` date
,`expected_delivery_date` date
,`status` enum('draft','sent','confirmed','partially_received','completed','cancelled')
,`grand_total` decimal(15,2)
,`total_items` bigint(21)
,`total_quantity_ordered` decimal(32,0)
,`total_quantity_received` decimal(32,0)
,`hospital_id` int(11)
);

-- --------------------------------------------------------

--
-- Table structure for table `receptionist`
--

CREATE TABLE `receptionist` (
  `id` int(100) NOT NULL,
  `img_url` varchar(100) DEFAULT NULL,
  `name` varchar(100) DEFAULT NULL,
  `email` varchar(100) DEFAULT NULL,
  `address` varchar(100) DEFAULT NULL,
  `phone` varchar(100) DEFAULT NULL,
  `x` varchar(100) DEFAULT NULL,
  `ion_user_id` varchar(100) DEFAULT NULL,
  `hospital_id` varchar(100) DEFAULT NULL,
  `signature` varchar(1000) DEFAULT NULL,
  `profile` varchar(1000) DEFAULT NULL,
  `available` varchar(100) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

--
-- Dumping data for table `receptionist`
--

INSERT INTO `receptionist` (`id`, `img_url`, `name`, `email`, `address`, `phone`, `x`, `ion_user_id`, `hospital_id`, `signature`, `profile`, `available`) VALUES
(3, 'uploads/userIcon4.png', 'Mr. Receptionist', 'receptionist@hms.com', 'Ka/5, Bashundhara R/A Gate', '112345678', NULL, '999', '98', 'uploads/Screenshot_from_2022-03-11_03-49-482.png', '<p>ghfghgfhfg</p>', '1');

-- --------------------------------------------------------

--
-- Table structure for table `report`
--

CREATE TABLE `report` (
  `id` int(100) NOT NULL,
  `report_type` varchar(100) DEFAULT NULL,
  `patient` varchar(100) DEFAULT NULL,
  `description` varchar(500) DEFAULT NULL,
  `doctor` varchar(100) DEFAULT NULL,
  `date` varchar(100) DEFAULT NULL,
  `add_date` varchar(100) DEFAULT NULL,
  `hospital_id` varchar(100) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

-- --------------------------------------------------------

--
-- Table structure for table `request`
--

CREATE TABLE `request` (
  `id` int(100) NOT NULL,
  `name` varchar(100) DEFAULT NULL,
  `address` varchar(500) DEFAULT NULL,
  `email` varchar(100) DEFAULT NULL,
  `phone` varchar(100) DEFAULT NULL,
  `other` varchar(100) DEFAULT NULL,
  `package` varchar(1000) DEFAULT NULL,
  `language` varchar(100) DEFAULT NULL,
  `remarks` varchar(500) DEFAULT NULL,
  `status` varchar(100) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

-- --------------------------------------------------------

--
-- Table structure for table `review`
--

CREATE TABLE `review` (
  `id` int(10) NOT NULL,
  `name` varchar(100) NOT NULL,
  `designation` varchar(500) NOT NULL,
  `review` varchar(1000) NOT NULL,
  `img` varchar(1000) NOT NULL,
  `status` varchar(100) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

--
-- Dumping data for table `review`
--

INSERT INTO `review` (`id`, `name`, `designation`, `review`, `img`, `status`) VALUES
(1, 'Test Reviewer 1', 'Reviewer, XYZ', '“ Lorem ipsum dolor sit amet consectetur adipisicing elit. Vero expedita cumque assumenda cum neque, atque nesciunt, molestiae architecto doloremque quis, placeat ipsam quidem provident in! Illum voluptas harum animi consequatur! ”', 'uploads/doctor-icon-avatar-white136162-581.jpg', 'Active'),
(3, 'Test Reviewer 2', 'Reviewer, ABC', '“ Lorem ipsum dolor sit amet consectetur adipisicing elit. Vero expedita cumque assumenda cum neque, atque nesciunt, molestiae architecto doloremque quis, placeat ipsam quidem provident in! Illum voluptas harum animi consequatur! ”', 'uploads/doctor-icon-avatar-white136162-582.jpg', 'Active'),
(4, 'Test Reviewer 3', 'Reviewer, NMP', '“ Lorem ipsum dolor sit amet consectetur adipisicing elit. Vero expedita cumque assumenda cum neque, atque nesciunt, molestiae architecto doloremque quis, placeat ipsam quidem provident in! Illum voluptas harum animi consequatur! ”', 'uploads/doctor-icon-avatar-white136162-583.jpg', 'Active'),
(5, 'Test Reviewer 4', 'Reviewer, TRP', '“ Lorem ipsum dolor sit amet consectetur adipisicing elit. Vero expedita cumque assumenda cum neque, atque nesciunt, molestiae architecto doloremque quis, placeat ipsam quidem provident in! Illum voluptas harum animi consequatur! ”', 'uploads/doctor-icon-avatar-white136162-584.jpg', 'Active'),
(6, 'Test Reviewer 5', 'Reviewer, CVB', '“ Lorem ipsum dolor sit amet consectetur adipisicing elit. Vero expedita cumque assumenda cum neque, atque nesciunt, molestiae architecto doloremque quis, placeat ipsam quidem provident in! Illum voluptas harum animi consequatur! ”', 'uploads/doctor-icon-avatar-white136162-585.jpg', 'Inactive');

-- --------------------------------------------------------

--
-- Table structure for table `salary`
--

CREATE TABLE `salary` (
  `id` int(100) NOT NULL,
  `staff` varchar(100) DEFAULT NULL,
  `salary` varchar(100) DEFAULT NULL,
  `hospital_id` varchar(100) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

-- --------------------------------------------------------

--
-- Table structure for table `service`
--

CREATE TABLE `service` (
  `id` int(100) NOT NULL,
  `img_url` varchar(1000) DEFAULT NULL,
  `title` varchar(100) DEFAULT NULL,
  `description` varchar(1000) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

--
-- Dumping data for table `service`
--

INSERT INTO `service` (`id`, `img_url`, `title`, `description`) VALUES
(1, 'uploads/handsome-smiling-medical-professional-examining-with-stethoscope-colored-background_1.png', 'Alex ', 'Maximize clinic efficiency with our customizable hospital management SaaS. Streamline operations, enhance care, and propel growth.'),
(2, 'uploads/Video_Consult.png', 'Steve', 'Elevate your hospital services with our comprehensive automation tools. Tailored for clinics big and small.'),
(3, 'uploads/Plan_Surgeries.png', 'Max', 'Immediate assistance and extensive resources at your fingertips, ensuring your clinic'),
(9, 'uploads/Video_Consult1.png', 'David', 'Maximize clinic efficiency with our customizable hospital management SaaS. Streamline operations, enhance care, and propel growth.');

-- --------------------------------------------------------

--
-- Table structure for table `settings`
--

CREATE TABLE `settings` (
  `id` int(10) NOT NULL,
  `system_vendor` varchar(100) DEFAULT NULL,
  `title` varchar(100) DEFAULT NULL,
  `address` varchar(100) DEFAULT NULL,
  `phone` varchar(100) DEFAULT NULL,
  `email` varchar(100) DEFAULT NULL,
  `facebook_id` varchar(100) DEFAULT NULL,
  `currency` varchar(100) DEFAULT NULL,
  `language` varchar(100) DEFAULT NULL,
  `discount` varchar(100) DEFAULT NULL,
  `time_format` varchar(100) DEFAULT NULL,
  `live_appointment_type` varchar(100) DEFAULT NULL,
  `vat` varchar(100) DEFAULT NULL,
  `login_title` varchar(100) DEFAULT NULL,
  `logo` varchar(500) DEFAULT NULL,
  `invoice_logo` varchar(500) DEFAULT NULL,
  `payment_gateway` varchar(100) DEFAULT NULL,
  `sms_gateway` varchar(100) DEFAULT NULL,
  `codec_username` varchar(100) DEFAULT NULL,
  `codec_purchase_code` varchar(100) DEFAULT NULL,
  `token` varchar(100) DEFAULT NULL,
  `hospital_id` varchar(100) DEFAULT NULL,
  `emailtype` varchar(1000) DEFAULT NULL,
  `remainder_appointment` varchar(1000) DEFAULT NULL,
  `footer_message` varchar(1000) DEFAULT NULL,
  `show_odontogram_in_history` varchar(1000) DEFAULT NULL,
  `invoice_choose` varchar(1000) DEFAULT NULL,
  `discount_percent` varchar(100) DEFAULT NULL,
  `footer_invoice_message` varchar(1000) DEFAULT NULL,
  `logo_title` varchar(1000) DEFAULT NULL,
  `chatgpt_api_key` varchar(1000) DEFAULT NULL,
  `show_tawkto_in_website` varchar(100) DEFAULT NULL,
  `feature_button` varchar(255) DEFAULT NULL,
  `hero_title` varchar(255) DEFAULT NULL,
  `hero_subtitle` varchar(500) DEFAULT NULL,
  `hero_image1` varchar(255) DEFAULT NULL,
  `hero_image2` varchar(255) DEFAULT NULL,
  `hero_image3` varchar(255) DEFAULT NULL,
  `s_title1` varchar(100) DEFAULT NULL,
  `s_title2` varchar(100) DEFAULT NULL,
  `s_title3` varchar(200) DEFAULT NULL,
  `s_value1` varchar(200) DEFAULT NULL,
  `s_value2` varchar(200) DEFAULT NULL,
  `s_value3` varchar(200) DEFAULT NULL,
  `timezone` varchar(500) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

--
-- Dumping data for table `settings`
--

INSERT INTO `settings` (`id`, `system_vendor`, `title`, `address`, `phone`, `email`, `facebook_id`, `currency`, `language`, `discount`, `time_format`, `live_appointment_type`, `vat`, `login_title`, `logo`, `invoice_logo`, `payment_gateway`, `sms_gateway`, `codec_username`, `codec_purchase_code`, `token`, `hospital_id`, `emailtype`, `remainder_appointment`, `footer_message`, `show_odontogram_in_history`, `invoice_choose`, `discount_percent`, `footer_invoice_message`, `logo_title`, `chatgpt_api_key`, `show_tawkto_in_website`, `feature_button`, `hero_title`, `hero_subtitle`, `hero_image1`, `hero_image2`, `hero_image3`, `s_title1`, `s_title2`, `s_title3`, `s_value1`, `s_value2`, `s_value3`, `timezone`) VALUES
(11, 'Hospital Saas', 'Hospital', 'Collegepara, Rajbari', '+880123456789', 'superadmin@hms.com', NULL, '$', 'english', 'flat', NULL, NULL, NULL, NULL, 'uploads/Code-Aristos-logo2.png', NULL, 'Stripe', 'Twilio', NULL, NULL, 'n2cJMp7r6kMjYcllDD4hqaFlryf0JFHl', 'superadmin', 'Domain Email', '', 'By Code Aristos', NULL, 'invoice1', NULL, NULL, 'uploads/504093.png', NULL, 'no', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(134, 'Code Aristos - Hospital management System', 'Tanvir Mahmud', 'Binodpur, Rajbari', '01749335505', 'tanvir.mahmud.opu@gmail.com', NULL, '$', 'english', 'flat', NULL, NULL, '0', NULL, NULL, NULL, NULL, 'Twilio', NULL, NULL, NULL, '119', 'Smtp', NULL, 'ByTanvir Mahmud', 'yes', 'invoice1', '0', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(62, 'Code Aristos - Hospital management System', 'Demo Hospital', 'Ka/5 Jagannathpur,Bashundhara', '+88017777024443', 'admin@hms.com', NULL, '$', 'english', 'flat', NULL, NULL, NULL, NULL, NULL, NULL, 'Stripe', 'Twilio', '', '', NULL, '1', 'Smtp', '', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(63, 'Code Aristos - Hospital management System', 'Demo Hospital2', 'House-11,Road-13,Nikunja-2', '+8801819636104', 'admin2@hms.com', NULL, '$', 'english', 'flat', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Twilio', NULL, NULL, NULL, '2', 'Smtp', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(64, 'Code Aristos - Hospital management System', 'Demo Hospital3', 'PLOT NO-120,BLOCK-D,BASHUNDHARA R/A', '01999949761', 'admin3@hms.com', NULL, '$', 'english', 'flat', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Twilio', NULL, NULL, NULL, '3', 'Smtp', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(65, 'Code Aristos - Hospital management System', 'Hospital', 'Ka/5, Bashundhara R/A Gate', '+8801777024443', 'admin@hms.com', NULL, '$', 'english', 'flat', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Twilio', '', '', NULL, '4', 'Smtp', '', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(66, 'Code Aristos - Hospital management System', 'testing Hospital', 'House-11,Road-13,NIkunja-2', '+8801819636109', 'testing@hms.com', NULL, '$', 'english', 'flat', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Twilio', NULL, NULL, NULL, '5', 'Smtp', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(67, 'Code Aristos - Hospital management System', 'testing1', 'House-11,Road-13,NIkunja-2', '+8801819636108', 'testing1@hms.com', NULL, '$', 'english', 'flat', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Twilio', NULL, NULL, NULL, '6', 'Smtp', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(68, 'Code Aristos - Hospital management System', 'asdasdas', 'asdsadasd', '32423423423', 'asd@hms.com', NULL, '$', 'english', 'flat', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Twilio', NULL, NULL, NULL, '7', 'Smtp', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(69, 'Code Aristos - Hospital management System', 'asdasdas', 'asdasdas', '35345645', 'tytty@hms.com', NULL, '$', 'english', 'flat', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Twilio', NULL, NULL, NULL, '8', 'Smtp', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(70, 'Code Aristos - Hospital management System', 'Testing Hospital', 'House-11,Road-13,NIkunja-2', '+8801819636104', 'sahashaibal22@gmail.com', NULL, '$', 'english', 'flat', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Twilio', NULL, NULL, NULL, '9', 'Smtp', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(71, 'Code Aristos - Hospital management System', 'adasda', 'sdasdasd', '32424234', 'adasdad@hms.com', NULL, '$', 'english', 'flat', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Twilio', NULL, NULL, NULL, '10', 'Smtp', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(72, 'Code Aristos - Hospital management System', 'weqweqwe', 'qwewqeweq', '12345', 'qwesadsad@gmail.com', NULL, '$', 'english', 'flat', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Twilio', NULL, NULL, NULL, '11', 'Smtp', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(73, 'Code Aristos - Hospital management System', 'asdsdasdas', 'asdsadas', '24234234', 'asdsd@gmail.com', NULL, '$', 'english', 'flat', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Twilio', NULL, NULL, NULL, '12', 'Smtp', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(74, 'Code Aristos - Hospital management System', 'Rizvi Mahmud', 'Road:24, Block: F', '+8801777024443', 'rizvi.mahmud.plabon@gmail.comibbu', NULL, '$', 'arabic', 'flat', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Twilio', NULL, NULL, NULL, '13', 'Smtp', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(75, 'Code Aristos - Hospital management System', 'Rizvi Mahmud', 'Road:24, Block: F', '+8801777024443', 'rizvi.mahmud.plabon@gmail.comgbfgbfgbgf', NULL, '$', 'arabic', 'flat', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Twilio', NULL, NULL, NULL, '14', 'Smtp', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(76, 'Code Aristos - Hospital management System', 'sdadas', 'dsadasd', '34324324', 'asdas@dfsdfsasdscom', NULL, '$', 'arabic', 'flat', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Twilio', NULL, NULL, NULL, '15', 'Smtp', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(77, 'Code Aristos - Hospital management System', 'asdsadsa', 'asdsadsad', '33423423', '', NULL, '$', 'english', 'flat', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Twilio', NULL, NULL, NULL, NULL, 'Smtp', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(78, 'Code Aristos - Hospital management System', 'dfsfsdfs', 'dfsfsdfs', '32323232', 'qwedf11@gmail.com', NULL, '$', 'arabic', 'flat', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Twilio', NULL, NULL, NULL, '64', 'Smtp', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(79, 'Code Aristos - Hospital management System', 'dfsdfdsfsdf', 'sfsfdsfdsf', '342343423423', 'fsdfdsfsdfdsf@gmail.com', NULL, '$', 'english', 'flat', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Twilio', NULL, NULL, NULL, '65', 'Smtp', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(80, 'Code Aristos - Hospital management System', 'jhjhkjhk', 'jhhkhk', '7005179958', 'sahashaibal22@gmail.com', NULL, '$', 'english', 'flat', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Twilio', NULL, NULL, NULL, NULL, 'Smtp', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(81, 'Code Aristos - Hospital management System', 'asdas asdasd', 'asdasdasdasdsa', '7005179958', 'sahashaibal22@gmail.com', NULL, '$', 'english', 'flat', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Twilio', NULL, NULL, NULL, NULL, 'Smtp', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(82, 'Code Aristos - Hospital management System', 'adsasad', 'asdsadsad', '4354354543', 'sadsads@hms.com', NULL, '$', 'arabic', 'flat', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Twilio', NULL, NULL, NULL, '69', 'Smtp', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(83, 'Code Aristos - Hospital management System', 'dgdfgfd fgfgdfgdf', 'dfgdfgdfgfdg', '324234234', 'fdfdfcvbcv@gmail.com', NULL, '$', 'arabic', 'flat', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Twilio', NULL, NULL, NULL, '70', 'Smtp', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(84, 'Code Aristos - Hospital management System', 'asdasdasd saassa', 'assaassaas', '2323423234', 'sxcx@gmail.com', NULL, '$', 'english', 'flat', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Twilio', NULL, NULL, NULL, '71', 'Smtp', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(85, 'Code Aristos - Hospital management System', 'qweerty', 'sfsfsdfs', '1232342342', 'vccccc@gmail.com', NULL, '$', 'english', 'flat', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Twilio', NULL, NULL, NULL, '72', 'Smtp', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(86, 'Code Aristos - Hospital management System', 'sdfsdfsd', 'sdfdsfsd', '34234234', 'sdfdsf@gmail.com', NULL, '$', 'english', 'flat', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Twilio', NULL, NULL, NULL, '73', 'Smtp', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(87, 'Code Aristos - Hospital management System', 'asjhdasd asdasd', 'asdasd asdsad', '344234324', 'asdsac@gmail.com', NULL, '$', 'arabic', 'flat', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Twilio', NULL, NULL, NULL, '74', 'Smtp', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(88, 'Code Aristos - Hospital management System', 'ncmzczx zxczxc', 'zxcxzcxz', '343453453', 'qwert444@hms.com', NULL, '$', 'arabic', 'flat', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Twilio', NULL, NULL, NULL, '75', 'Smtp', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(89, 'Code Aristos - Hospital management System', 'fdsfdsfds', 'sdfdsfdsfds', '34543554534', 'wqewewe@gmail.com', NULL, '$', 'english', 'flat', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Twilio', NULL, NULL, NULL, '76', 'Smtp', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(90, 'Code Aristos - Hospital management System', 'asdsaddas', 'asdsadasd', '34342423', 'sadds343@gmail.com', NULL, '$', 'arabic', 'flat', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Twilio', NULL, NULL, NULL, '77', 'Smtp', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(91, 'Code Aristos - Hospital management System', 'asdasdsa', 'sdsadasdas', '344234234', 'qwewqewq@gmail.com', NULL, '$', 'arabic', 'flat', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Twilio', NULL, NULL, NULL, '78', 'Smtp', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(92, 'Code Aristos - Hospital management System', 'fgdgdfgdfg', 'dfgdfgdfg', '35546464', 'rizvi.mahmud.plabon@gmail.com', NULL, '$', 'arabic', 'flat', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Twilio', NULL, NULL, NULL, '79', 'Smtp', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(93, 'Code Aristos - Hospital management System', 'gdgdgdfg', 'fgdfgdfgfdfdgdfgdf', '56456456456', 'customer@hms.com1', NULL, '$', 'arabic', 'flat', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Twilio', NULL, NULL, NULL, '82', 'Smtp', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(94, 'Code Aristos - Hospital management System', 'asdasd asdasd', 'asdasdas', '32213123123', 'qwsder@hms.com', NULL, '$', 'english', 'flat', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Twilio', NULL, NULL, NULL, NULL, 'Smtp', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(95, 'Code Aristos - Hospital management System', 'asdasd asdasd', 'asdasd ad', '34534534', 'asdxczc@gmail.com', NULL, '$', 'english', 'flat', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Twilio', NULL, NULL, NULL, NULL, 'Smtp', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(96, 'Code Aristos - Hospital management System', 'dsfsdfdsfs sdfdsf', 'dfsdf sdfdsf', '7005179958', 'sahashaibal22@gmail.com', NULL, '$', 'english', 'flat', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Twilio', NULL, NULL, NULL, NULL, 'Smtp', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(97, 'Code Aristos - Hospital management System', 'asdasdasd', 'asdasdas', '32423432', 'asda22sd@gmail.com', NULL, '$', 'english', 'flat', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Twilio', NULL, NULL, NULL, NULL, 'Smtp', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(98, 'Code Aristos - Hospital management System', 'sddsadasd', 'asdasdas', '32423432', 'asdasddsa@gmail.com', NULL, '$', 'english', 'flat', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Twilio', NULL, NULL, NULL, '83', 'Smtp', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(99, 'Code Aristos - Hospital management System', 'asdsadas', 'sadsadsad', '12312312213', 'sadasd1231s@hms.com', NULL, '$', 'english', 'flat', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Twilio', NULL, NULL, NULL, '84', 'Smtp', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(100, 'Code Aristos - Hospital management System', 'adasdsadas', 'asdsadsa', '432432423', 'sdasdsa@gmail.com', NULL, '$', 'english', 'flat', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Twilio', NULL, NULL, NULL, '85', 'Smtp', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(101, 'Code Aristos - Hospital management System', 'asdasda', 'asdsadsad', '345345343', 'asdasdasxzx@gmail.com', NULL, '$', 'english', 'flat', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Twilio', NULL, NULL, NULL, '86', 'Smtp', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(102, 'Code Aristos - Hospital management System', 'asdasdasd', 'asdasdasdadas', '2342343243242', 'asdasdasdsas@gmail.com', NULL, '$', 'english', 'flat', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Twilio', NULL, NULL, NULL, '87', 'Smtp', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(103, 'Code Aristos - Hospital management System', 'Rizvi Mahmud', 'Road:24, Block: F', '23432423', 'rizvi.mahmud.plabon@gmail.comsscdcsd', NULL, '$', 'english', 'flat', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Twilio', NULL, NULL, NULL, '88', 'Smtp', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(104, 'Code Aristos - Hospital management System', 'asdasdasd', 'asdasdasd', '32423423423', 'asdsadsad21321@gmail.com', NULL, '$', 'english', 'flat', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Twilio', NULL, NULL, NULL, '89', 'Smtp', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(105, 'Code Aristos - Hospital management System', 'adasdas', 'asdasdsadasd', '32432432432', 'asdsadsazccz@gmail.com', NULL, '$', 'english', 'flat', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Twilio', NULL, NULL, NULL, '90', 'Smtp', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(106, 'Code Aristos - Hospital management System', 'Rizvi Mahmud', 'Road:24, Block: F', '424242', 'rizvi.mahmud.plabon@gmail.comdcsdsdfsd', NULL, '$', 'english', 'flat', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Twilio', NULL, NULL, NULL, '91', 'Smtp', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(107, 'Code Aristos - Hospital management System', 'asdasdsad', 'asdsadsadas', '323423432432', 'asdsadasxzczx23@gmail.coom', NULL, '$', 'english', 'flat', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Twilio', NULL, NULL, NULL, '92', 'Smtp', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(108, 'Code Aristos - Hospital management System', 'asdasdasd', 'asdasdasd', '3423423423', 'asdasdasd212312@hms.com', NULL, '$', 'english', 'flat', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Twilio', NULL, NULL, NULL, '93', 'Smtp', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(109, 'Code Aristos - Hospital management System', 'asdasd asdsad', 'sadasdsa sadsad', '345435435', 'sdadzcxc@gmail.com', NULL, '$', 'english', 'flat', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Twilio', NULL, NULL, NULL, '94', 'Smtp', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(110, 'Code Aristos - Hospital management System', 'adasdasdas', 'adasdasdasdsa', '435345435', 'ascxvvc2232@gmail.coom', NULL, '$', 'english', 'flat', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Twilio', NULL, NULL, NULL, '95', 'Smtp', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(111, 'Code Aristos - Hospital management System', 'fhfhfh', 'bvvnvn', '675675798', 'gfhfhfh6665@gmail.com', NULL, '$', 'english', 'flat', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Twilio', NULL, NULL, NULL, '96', 'Smtp', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(112, 'Code Aristos - Hospital management System', 'adadsad', 'dfdsfsdf', '34324324234', 'asdasddcv34343@hms.com', NULL, '$', 'english', 'flat', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Twilio', NULL, NULL, NULL, '97', 'Smtp', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(113, 'Hospital management System', 'Hospital', 'Ka/5, Bashundhara R/A Gate', '+8801777024443', 'admin@hms.com', NULL, '$', 'english', 'flat', '12', NULL, '10', NULL, 'uploads/501455.png', NULL, 'Paystack', 'Twilio', NULL, NULL, NULL, '98', 'Smtp', '', 'By Code Aristos', 'yes', 'invoice1', '10', 'Report Delivery Service is Open from 9.00 am. to 9.00 pm.(2nd floor).Unclaimed Report will be held for 3 months Only.', 'uploads/50409310.png', 'sdgdfgfdgdgfdg', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Asia/Dhaka'),
(114, 'Code Aristos - Hospital management System', 'aasdsa', 'asdadasd', '45535435', 'asdsadas@hms.com', NULL, '$', 'english', 'flat', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Twilio', NULL, NULL, NULL, '99', 'Smtp', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(115, 'Code Aristos - Hospital management System', 'tester', 'India', '123456', 'tester@gmail.com', NULL, '$', 'english', 'flat', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Twilio', NULL, NULL, NULL, '100', 'Smtp', NULL, 'Bytester', 'yes', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(116, 'Code Aristos - Hospital management System', 'Demo 2 Hospital', 'Ka/5, Bashundhara R/A Gate', '+880123456789', 'demo@hms.com', NULL, '$', 'english', 'flat', NULL, NULL, '0', NULL, NULL, NULL, NULL, 'Twilio', NULL, NULL, NULL, '101', 'Smtp', NULL, 'ByDemo 2 Hospital', 'yes', 'invoice1', '0', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(117, 'Code Aristos - Hospital management System', 'Demo 3 Package', 'Ka/5, Bashundhara R/A Gate', '+880123456789', 'demo3@hms.com', NULL, '$', 'english', 'flat', NULL, NULL, '0', NULL, NULL, NULL, NULL, 'Twilio', NULL, NULL, NULL, '102', 'Smtp', NULL, 'ByDemo 3 Package', 'yes', 'invoice1', '0', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(118, 'Code Aristos - Hospital management System', 'Rajbari Clinic', 'Ka/5, Bashundhara R/A Gate', '+880123456789', 'rajbariclinic@gmail.com', NULL, '$', 'portuguese', 'flat', NULL, NULL, '0', NULL, NULL, NULL, 'PayPal', 'Twilio', NULL, NULL, NULL, '103', 'Smtp', NULL, 'ByRajbari Clinic', 'yes', 'invoice1', '0', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(119, 'Code Aristos - Hospital management System', 'Apollo Hospital', 'Ka/5, Bashundhara R/A Gate', '+8801777024443', 'rizvi@codearistos.net', NULL, '$', 'english', 'flat', NULL, NULL, '0', NULL, NULL, NULL, NULL, 'Twilio', NULL, NULL, NULL, '104', 'Smtp', NULL, 'ByApollo Hospital', 'yes', 'invoice1', '0', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(120, 'Code Aristos - Hospital management System', 'New Hospital', 'Ka, 3/I, Bashundhara Main Road', '01777024443', 'rizvi.mahmud.plabon@gmail.com1', NULL, '$', 'english', 'flat', NULL, NULL, '0', NULL, NULL, NULL, NULL, 'Twilio', NULL, NULL, NULL, '105', 'Smtp', NULL, 'ByNew Hospital', 'yes', 'invoice1', '0', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(121, 'Code Aristos - Hospital management System', 'Rizvi Hospital', 'Ka, 3/I, Bashundhara Main Road', '01777024443', 'rizvi@codearistos.net', NULL, '$', 'english', 'flat', NULL, NULL, '0', NULL, NULL, NULL, NULL, 'Twilio', NULL, NULL, NULL, '106', 'Smtp', NULL, 'By Rizvi Hospital', 'yes', 'invoice1', '0', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(122, 'Code Aristos - Hospital management System', 'Rizvi Mahmud', 'Ka, 3/I, Bashundhara Main Road', '01777024443', 'RizviMahmud@example.com', NULL, '$', 'english', 'flat', NULL, NULL, '0', NULL, NULL, NULL, NULL, 'Twilio', NULL, NULL, NULL, '107', 'Smtp', NULL, 'By Rizvi Mahmud', 'yes', 'invoice1', '0', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(123, 'Code Aristos - Hospital management System', 'fsgdfgdf', 'Ka, 3/I, Bashundhara Main Road', '01777024443', 'rizvi.mahmud.plabon@gmail.comgdfgdfg', NULL, '$', 'english', 'flat', NULL, NULL, '0', NULL, NULL, NULL, NULL, 'Twilio', NULL, NULL, NULL, '108', 'Smtp', NULL, 'By fsgdfgdf', 'yes', 'invoice1', '0', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(127, 'Code Aristos - Hospital management System', 'Rizvi Mahmud Plabon', 'Ka, 3/I, Bashundhara Main Road', '01777024443', 'admin@example.commmm', NULL, '$', 'english', 'flat', NULL, NULL, '0', NULL, NULL, NULL, NULL, 'Twilio', NULL, NULL, NULL, '112', 'Smtp', NULL, 'ByRizvi Mahmud Plabon', 'yes', 'invoice1', '0', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(124, 'Code Aristos - Hospital management System', 'Tanvir Mahmud', 'dfgdfgdfgopu', '01749335505', 'tanvir@gmail.comsdfsdfdsf', NULL, '$', 'english', 'flat', NULL, NULL, '0', NULL, NULL, NULL, NULL, 'Twilio', NULL, NULL, NULL, '109', 'Smtp', NULL, 'By Tanvir Mahmud', 'yes', 'invoice1', '0', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(125, 'Code Aristos - Hospital management System', 'Tanvir Mahmud', 'dfgdfgdfgopu', '01749335505', 'tanvir@gmail.comsdfsf', NULL, '$', 'english', 'flat', NULL, NULL, '0', NULL, NULL, NULL, NULL, 'Twilio', NULL, NULL, NULL, '110', 'Smtp', NULL, 'By Tanvir Mahmud', 'yes', 'invoice1', '0', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(126, 'Code Aristos - Hospital management System', 'United Hospital', 'Bashundhara', '0174933550500', 'united@hms.com', NULL, '$', 'english', 'flat', NULL, NULL, '0', NULL, NULL, NULL, NULL, 'Twilio', NULL, NULL, NULL, '111', 'Smtp', NULL, 'By United Hospital', 'yes', 'invoice1', '0', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(128, 'Code Aristos - Hospital management System', 'New Hospital', 'Ka, 3/I, Bashundhara Main Road, Baridhara', '01777024443', 'newhospital@hms.com', NULL, '$', 'english', 'flat', NULL, NULL, '0', NULL, NULL, NULL, NULL, 'Twilio', NULL, NULL, NULL, '113', 'Smtp', NULL, 'By New Hospital', 'yes', 'invoice1', '0', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(129, 'Code Aristos - Hospital management System', 'Demo Hospital', 'Bashundhara', '01749335505', 'demo@hms.com', NULL, '$', 'english', 'flat', NULL, NULL, '0', NULL, NULL, NULL, NULL, 'Twilio', NULL, NULL, NULL, '114', 'Smtp', NULL, 'By Demo Hospital', 'yes', 'invoice1', '0', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(130, 'Code Aristos - Hospital management System', 'Demo Hospital', 'Binodpur, Rajbarii', '01716278932', 'demo@hms.com', NULL, '$', 'english', 'flat', NULL, NULL, '0', NULL, NULL, NULL, NULL, 'Twilio', NULL, NULL, NULL, '115', 'Smtp', NULL, 'By Demo Hospital', 'yes', 'invoice1', '0', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(131, 'Code Aristos - Hospital management System', 'Rajbari Clinic', 'Ka/5 Jagannathpur', '01777024443', 'rizvi@codearistos.net', NULL, '$', 'english', 'flat', NULL, NULL, '0', NULL, NULL, NULL, NULL, 'Twilio', NULL, NULL, NULL, '116', 'Smtp', NULL, 'ByRajbari Clinic', 'yes', 'invoice1', '0', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(132, 'Code Aristos - Hospital management System', 'Rizvi Mahmud Plabon', 'Ka, 3/I, Bashundhara Main Road, Baridhara', '01777024443', 'rizvi.mahmud.plabon@gmail.com', NULL, '$', 'english', 'flat', NULL, NULL, '0', NULL, NULL, NULL, NULL, 'Twilio', NULL, NULL, NULL, '117', 'Smtp', NULL, 'ByRizvi Mahmud Plabon', 'yes', 'invoice1', '0', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(133, 'Code Aristos - Hospital management System', 'caSoft', 'Ka, 3/I, Bashundhara Main Road, Baridhara', '01777024443', 'rizvi.mahmud.plabon@gmail.comaaaaa', NULL, '$', 'english', 'flat', NULL, NULL, '0', NULL, NULL, NULL, NULL, 'Twilio', NULL, NULL, NULL, '118', 'Smtp', NULL, 'BycaSoft', 'yes', 'invoice1', '0', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(135, 'Code Aristos - Hospital management System', 'Tanvir Mahmud', 'Binodpur, Rajbari', '01749335505', 'tanvir.mahmud.opu@gmail.com', NULL, '$', 'english', 'flat', NULL, NULL, '0', NULL, NULL, NULL, NULL, 'Twilio', NULL, NULL, NULL, '120', 'Smtp', NULL, 'ByTanvir Mahmud', 'yes', 'invoice1', '0', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(136, 'Code Aristos - Hospital management System', 'Tanvir Mahmud', 'Binodpur, Rajbari', '01749335505', 'tanvir.mahmud.opu@gmail.com', NULL, '$', 'english', 'flat', NULL, NULL, '0', NULL, NULL, NULL, NULL, 'Twilio', NULL, NULL, NULL, '121', 'Smtp', NULL, 'ByTanvir Mahmud', 'yes', 'invoice1', '0', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(137, 'Code Aristos - Hospital management System', 'Tanvir Mahmud', 'Binodpur, Rajbari', '01749335505', 'tanvir.mahmud.opu@gmail.com', NULL, '$', 'english', 'flat', NULL, NULL, '0', NULL, NULL, NULL, NULL, 'Twilio', NULL, NULL, NULL, '122', 'Smtp', NULL, 'ByTanvir Mahmud', 'yes', 'invoice1', '0', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(138, 'Code Aristos - Hospital management System', 'Tanvir Mahmud', 'Binodpur, Rajbari', '01749335505', 'tanvir.mahmud.opu@gmail.com', NULL, '$', 'english', 'flat', NULL, NULL, '0', NULL, NULL, NULL, NULL, 'Twilio', NULL, NULL, NULL, '123', 'Smtp', NULL, 'ByTanvir Mahmud', 'yes', 'invoice1', '0', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(139, 'Code Aristos - Hospital management System', 'Tanvir Mahmud', 'Binodpur, Rajbari', '01749335505', 'tanvir.mahmud.opu@gmail.com', NULL, '$', 'english', 'flat', NULL, NULL, '0', NULL, NULL, NULL, NULL, 'Twilio', NULL, NULL, NULL, '124', 'Smtp', NULL, 'ByTanvir Mahmud', 'yes', 'invoice1', '0', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(140, 'Code Aristos - Hospital management System', 'Demo Doctor', 'Binodpur, Rajbari', '01749335505', 'mdopu297@gmail.com', NULL, '$', 'english', 'flat', NULL, NULL, '0', NULL, NULL, NULL, NULL, 'Twilio', NULL, NULL, NULL, '125', 'Smtp', NULL, 'ByDemo Doctor', 'yes', 'invoice1', '0', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(141, 'Code Aristos - Hospital management System', 'Tanvir Mahmud', 'Binodpur, Rajbari', '01749335505', 'tanvir.mahmud.opu@gmail.com', NULL, '$', 'english', 'flat', NULL, NULL, '0', NULL, NULL, NULL, NULL, 'Twilio', NULL, NULL, NULL, '126', 'Smtp', NULL, 'ByTanvir Mahmud', 'yes', 'invoice1', '0', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(142, 'Code Aristos - Hospital management System', 'Tanvir Mahmud', 'Binodpur, Rajbari', '01749335505', 'tanvir.mahmud.opu@gmail.com', NULL, '$', 'english', 'flat', NULL, NULL, '0', NULL, NULL, NULL, NULL, 'Twilio', NULL, NULL, NULL, '127', 'Smtp', NULL, 'ByTanvir Mahmud', 'yes', 'invoice1', '0', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(143, 'Code Aristos - Hospital management System', 'Tanvir Mahmud', 'Binodpur, Rajbari', '01749335505', 'tanvir.mahmud.opu@gmail.com', NULL, '$', 'english', 'flat', NULL, NULL, '0', NULL, NULL, NULL, NULL, 'Twilio', NULL, NULL, NULL, '128', 'Smtp', NULL, 'ByTanvir Mahmud', 'yes', 'invoice1', '0', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(144, 'Code Aristos - Hospital management System', 'Tanvir Mahmud', 'Binodpur, Rajbari', '01749335505', 'tanvir.mahmud.opu@gmail.com', NULL, '$', 'english', 'flat', NULL, NULL, '0', NULL, NULL, NULL, NULL, 'Twilio', NULL, NULL, NULL, '129', 'Smtp', NULL, 'ByTanvir Mahmud', 'yes', 'invoice1', '0', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(145, 'Code Aristos - Hospital management System', 'Tanvir Mahmud', 'Binodpur, Rajbari', '01749335505', 'tanvir.mahmud.opu@gmail.com', NULL, '$', 'english', 'flat', NULL, NULL, '0', NULL, NULL, NULL, NULL, 'Twilio', NULL, NULL, NULL, '130', 'Smtp', NULL, 'ByTanvir Mahmud', 'yes', 'invoice1', '0', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(146, 'Code Aristos - Hospital management System', 'Tanvir Mahmud', 'Binodpur, Rajbari', '01749335505', 'tanvir.mahmud.opu@gmail.com', NULL, '$', 'english', 'flat', NULL, NULL, '0', NULL, NULL, NULL, NULL, 'Twilio', NULL, NULL, NULL, '131', 'Smtp', NULL, 'ByTanvir Mahmud', 'yes', 'invoice1', '0', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(147, 'Code Aristos - Hospital management System', 'Demo Hospital', 'Ka/5, Bashundhara R/A Gate', '01777024443', 'demo@hms.com', NULL, '$', 'english', 'flat', NULL, NULL, '0', NULL, NULL, NULL, NULL, 'Twilio', NULL, NULL, NULL, '132', 'Smtp', NULL, 'By Demo Hospital', 'yes', 'invoice1', '0', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(148, 'Code Aristos - Hospital management System', 'Rajbari Clinic', 'House: 2738, 18th N', '01777024443', 'rajbariclinic@gmail.com', NULL, '$', 'english', 'flat', NULL, NULL, '0', NULL, NULL, NULL, NULL, 'Twilio', NULL, NULL, NULL, '133', 'Smtp', NULL, 'By Rajbari Clinic', 'yes', 'invoice1', '0', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(149, 'Code Aristos - Hospital management System', 'Supreme Clinics', '42 Onitsha Crescent, off Gimbiya Street, Area 11,Garki', '08172371198', 'philipihesiulo@gmail.com', NULL, '$', 'english', 'flat', NULL, NULL, '0', NULL, NULL, NULL, NULL, 'Twilio', NULL, NULL, NULL, '134', 'Smtp', NULL, 'BySupreme Clinics', 'yes', 'invoice1', '0', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(150, 'Code Aristos - Hospital management System', 'fvpvkkpmxv', 'redirect-2098a20dcad1964ecbd22963695e5363@webmark.eting.org', '+1 213 425 1453', 'redirect-2098a20dcad1964ecbd22963695e5363@webmark.eting.org', NULL, '$', 'italian', 'flat', NULL, NULL, '0', NULL, NULL, NULL, NULL, 'Twilio', NULL, NULL, NULL, '135', 'Smtp', NULL, 'Byfvpvkkpmxv', 'yes', 'invoice1', '0', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(151, 'Code Aristos - Hospital management System', 'Md Opu', 'Bashundhara, Dhaka', '01749335508', 'info@codearistos.netsdfsdf', NULL, '$', 'english', 'flat', NULL, NULL, '0', NULL, NULL, NULL, NULL, 'Twilio', NULL, NULL, NULL, '136', 'Smtp', NULL, 'ByMd Opu', 'yes', 'invoice1', '0', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(152, 'Code Aristos - Hospital management System', 'Md Opu', 'Bashundhara, Dhaka', '01749335508', 'info@codearistos.netiiiii', NULL, '$', 'english', 'flat', NULL, NULL, '0', NULL, NULL, NULL, NULL, 'Twilio', NULL, NULL, NULL, '137', 'Smtp', NULL, 'ByMd Opu', 'yes', 'invoice1', '0', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(153, 'Code Aristos - Hospital management System', 'Md Opu', 'Bashundhara, Dhaka', '01749335508', 'info@codearistos.netlkllkl', NULL, '$', 'english', 'flat', NULL, NULL, '0', NULL, NULL, NULL, NULL, 'Twilio', NULL, NULL, NULL, '138', 'Smtp', NULL, 'ByMd Opu', 'yes', 'invoice1', '0', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(154, 'Code Aristos - Hospital management System', 'Md Opu', 'Bashundhara, Dhaka', '01749335508', 'info@codearistos.netsdfdsf', NULL, '$', 'english', 'flat', NULL, NULL, '0', NULL, NULL, NULL, NULL, 'Twilio', NULL, NULL, NULL, '139', 'Smtp', NULL, 'ByMd Opu', 'yes', 'invoice1', '0', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);

-- --------------------------------------------------------

--
-- Table structure for table `site_featured`
--

CREATE TABLE `site_featured` (
  `id` int(100) NOT NULL,
  `img_url` varchar(1000) DEFAULT NULL,
  `name` varchar(100) DEFAULT NULL,
  `profile` varchar(100) DEFAULT NULL,
  `description` varchar(1000) DEFAULT NULL,
  `hospital_id` varchar(100) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

--
-- Dumping data for table `site_featured`
--

INSERT INTO `site_featured` (`id`, `img_url`, `name`, `profile`, `description`, `hospital_id`) VALUES
(3, 'uploads/63cf6786064293398b6c3cc75.jpg', 'Dr RahmatUllah Asif', 'Cardiac Specialized', '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>', '98'),
(2, 'uploads/63cf67653670fe67118a3c7c3.jpg', 'Dr Momenuzzaman', 'Cardiac Specialized', '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>', '98'),
(4, 'uploads/63cf66af0b6557c1902b8fdd2.jpg', 'Dr A.R.M. Jamil', 'General Physician', '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>', '98'),
(6, 'uploads/63cf67653670fe67118a3c7c31.jpg', 'Dr. Elora Williams', 'Cardiac Specialized', '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>', '98');

-- --------------------------------------------------------

--
-- Table structure for table `site_gallery`
--

CREATE TABLE `site_gallery` (
  `id` int(10) NOT NULL,
  `img` varchar(500) NOT NULL,
  `position` varchar(100) NOT NULL,
  `status` varchar(100) NOT NULL,
  `hospital_id` varchar(1000) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

--
-- Dumping data for table `site_gallery`
--

INSERT INTO `site_gallery` (`id`, `img`, `position`, `status`, `hospital_id`) VALUES
(1, 'uploads/gallery-img-11.png', '1', 'Active', '98'),
(2, 'uploads/gallery-img-21.png', '2', 'Active', '98'),
(3, 'uploads/gallery-img-31.png', '3', 'Active', '98'),
(4, 'uploads/gallery-img-41.png', '4', 'Active', '98'),
(5, 'uploads/gallery-img-51.png', '5', 'Active', '98'),
(6, 'uploads/gallery-img-61.png', '6', 'Active', '98');

-- --------------------------------------------------------

--
-- Table structure for table `site_grid`
--

CREATE TABLE `site_grid` (
  `id` int(10) NOT NULL,
  `category` varchar(100) NOT NULL,
  `title` varchar(500) NOT NULL,
  `description` varchar(1000) NOT NULL,
  `img` varchar(1000) NOT NULL,
  `position` varchar(100) NOT NULL,
  `status` varchar(100) NOT NULL,
  `hospital_id` varchar(1000) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

--
-- Dumping data for table `site_grid`
--

INSERT INTO `site_grid` (`id`, `category`, `title`, `description`, `img`, `position`, `status`, `hospital_id`) VALUES
(3, 'FEATURED', 'Professional surgeons', 'Lorem ipsum dolor sit amet consectetur adipisicing elit. Eum tenetur, aut veritatis maxime ducimus modi delectus vero expedita illo ratione, eveniet laboriosam cupiditate reiciendis, repellat minima. Optio consectetur inventore ipsa!', 'uploads/frature-img-11.png', '1', 'Active', '98'),
(4, 'FEATURED', 'Good Care', 'Lorem ipsum dolor sit amet consectetur adipisicing elit. Eum tenetur, aut veritatis maxime ducimus modi delectus vero expedita illo ratione, eveniet laboriosam cupiditate reiciendis, repellat minima. Optio consectetur inventore ipsa!', 'uploads/frature-img-21.png', '2', 'Active', '98');

-- --------------------------------------------------------

--
-- Table structure for table `site_map`
--

CREATE TABLE `site_map` (
  `id` int(100) NOT NULL,
  `name` varchar(1000) DEFAULT NULL,
  `url` varchar(1000) DEFAULT NULL,
  `for_login` varchar(1000) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

--
-- Dumping data for table `site_map`
--

INSERT INTO `site_map` (`id`, `name`, `url`, `for_login`) VALUES
(1, 'Patient', 'patient', 'admin'),
(2, 'Appointment', 'appointment', 'admin'),
(3, 'Doctor', 'doctor', 'admin'),
(4, 'Doctor Visit', 'doctor/doctorvisit', 'admin'),
(5, 'Add New Doctor', 'doctor/addNewView', 'admin'),
(6, 'Department', 'department', 'admin'),
(7, 'Nurse', 'nurse', 'admin'),
(8, 'Add New Nurse', 'nurse/addNewView', 'admin'),
(9, 'Add New Pharmacist', 'pharmacist/addNewView', 'admin'),
(10, 'Pharmacist', 'pharmacist', 'admin'),
(11, 'Add New Laboratorist', 'laboratorist/addNewView', 'admin'),
(12, 'Laboratorist', 'laboratorist', 'admin'),
(13, 'Add New Accountant', 'accountant/addNewView', 'admin'),
(14, 'Accountant', 'accountant', 'admin'),
(15, 'Add New Receptionist', 'receptionist/addNewView', 'admin'),
(16, 'Receptionist', 'receptionist', 'admin'),
(17, 'Payment List', 'finance/payment', 'admin'),
(18, 'Add New Payment', 'finance/addPaymentView', 'admin'),
(19, 'Payment Procedures List', 'finance/paymentCategory', 'admin'),
(20, 'Add Payment Procedure', 'finance/addPaymentCategoryView', 'admin'),
(21, 'Expense List', 'finance/expense', 'admin'),
(22, 'Add New Expense', 'finance/addExpenseView', 'admin'),
(23, 'Expense categories List', 'finance/expenseCategory', 'admin'),
(24, 'Add New Expense categories List', 'finance/addExpenseCategoryView', 'admin'),
(25, 'Prescription List', 'prescription/all', 'admin'),
(26, 'Add New Prescription', 'prescription/addPrescriptionView', 'admin'),
(27, 'Lab Report List', 'lab', 'admin'),
(28, 'Add New Lab Report', 'lab/addLabView', 'admin'),
(29, 'Add New Lab Template', 'lab/template', 'admin'),
(30, 'Doctor Treatment History', 'appointment/treatmentReport', 'admin'),
(31, 'Doctor Schedule List', 'schedule', 'admin'),
(32, 'Doctor Holiday List', 'schedule/allHolidays', 'admin'),
(33, 'Add New Appointment', 'appointment/addNewView', 'admin'),
(34, 'Todays Appointment', 'appointment/todays', 'admin'),
(35, 'Upcoming Appointment', 'appointment/upcoming', 'admin'),
(36, 'Calendar', 'appointment/calendar', 'admin'),
(37, 'Medicine List', 'medicine', 'admin'),
(38, 'Add New Medicine', 'medicine/addMedicineView', 'admin'),
(39, 'Medicine Category List', 'medicine/medicineCategory', 'admin'),
(40, 'Add New Medicine Category', 'medicine/addCategoryView', 'admin'),
(41, 'Medicine Stock Alert List', 'medicine/medicineStockAlert', 'admin'),
(42, 'Pharmacy Dashboard', 'finance/pharmacy/home', 'admin'),
(43, 'Dashboard', 'home', 'admin'),
(44, 'Pharmacy Sales List', 'finance/pharmacy/payment', 'admin'),
(45, 'Add New Pharmacy Sale', 'finance/pharmacy/addPaymentView', 'admin'),
(46, 'Pharmacy Expenses List', 'finance/pharmacy/expense', 'admin'),
(47, 'Add New Pharmacy Expense', 'finance/pharmacy/addExpenseView', 'admin'),
(48, 'Pharmacy Expense Categories List', 'finance/pharmacy/expenseCategory', 'admin'),
(49, 'Add New Pharmacy Expense Category', 'finance/pharmacy/addExpenseCategoryView', 'admin'),
(50, 'Pharmacy Financial report', 'finance/pharmacy/financialReport', 'admin'),
(51, 'Pharmacy Monthly Sales', 'finance/pharmacy/monthly', 'admin'),
(52, 'Pharmacy Daily Sales', 'finance/pharmacy/daily', 'admin'),
(53, 'Pharmacy Monthly Expense', 'finance/pharmacy/monthlyExpense', 'admin'),
(54, 'Pharmacy Daily Expense', 'finance/pharmacy/dailyExpense', 'admin'),
(55, 'Donor List', 'donor', 'admin'),
(56, 'Add New Donor', 'donor/addDonorView', 'admin'),
(57, 'Blood Bank List ', 'donor/bloodBank', 'admin'),
(58, 'Bed List', 'bed', 'admin'),
(59, 'Add New Bed', 'bed/addBedView', 'admin'),
(60, 'Bed Category List', 'bed/bedCategory', 'admin'),
(61, 'Alloted Bed List', 'bed/bedAllotment', 'admin'),
(62, 'Add New Bed Allotment', 'bed/addAllotmentView', 'admin'),
(63, 'Financial Report', 'finance/financialReport', 'admin'),
(64, 'User Activity Report', 'finance/allUserActivityReport', 'admin'),
(65, 'Doctor Commission', 'finance/doctorsCommission', 'admin'),
(66, 'Monthly Financial report', 'finance/monthly', 'admin'),
(67, 'Daily Financial report', 'finance/daily', 'admin'),
(68, 'Monthly Financial Expense', 'finance/monthlyExpense', 'admin'),
(69, 'Daily Financial Expense', 'finance/dailyExpense', 'admin'),
(70, 'Expense Vs Income Report', 'finance/expenseVsIncome', 'admin'),
(71, 'Birth Report', 'report/birth', 'admin'),
(72, 'Operation Report', 'report/operation', 'admin'),
(73, 'Expire Report', 'report/expire', 'admin'),
(74, 'Notice List', 'notice', 'admin'),
(75, 'Add New Notice', 'notice/addNewView', 'admin'),
(76, 'Auto Email Template List', 'email/autoEmailTemplate', 'admin'),
(77, 'Send Email', 'email/sendView', 'admin'),
(78, 'Email Settings', 'email/emailSettings', 'admin'),
(79, 'Auto SMS Template List', 'sms/autoSMSTemplate', 'admin'),
(80, 'Send SMS', 'sms/sendView', 'admin'),
(81, 'SMS Settings', 'sms', 'admin'),
(82, 'Settings', 'settings', 'admin'),
(83, 'Payment Gateway Settings', 'pgateway', 'admin'),
(84, 'Language Settings', 'settings/language', 'admin'),
(85, 'Bulk Import', 'import', 'admin'),
(86, 'Language Settings\r\n', 'settings/language', 'superadmin'),
(87, 'Payment Gateway Settings', 'pgateway', 'superadmin'),
(88, 'Profile', 'profile', 'superadmin'),
(89, 'Profile', 'profile', 'admin'),
(90, 'Case Manager', 'patient/caseList', 'admin'),
(91, 'Patient Payment List', 'patient/patientPayments', 'admin'),
(92, 'Document List', 'patient/documents', 'admin'),
(93, 'Visit Website', 'frontend', 'admin'),
(94, 'Website Settings', 'frontend/settings', 'superadmin'),
(95, 'Contact Email', 'email/contactEmailSettings', 'superadmin'),
(96, 'Send Email', 'email/superadminSendView', 'superadmin'),
(97, 'Visit Website', 'frontend', 'superadmin'),
(98, 'Slide List', 'slide', 'admin'),
(99, 'Service List', 'service', 'admin'),
(100, 'Settings', 'settings', 'superadmin'),
(101, 'Add Payment', 'finance/addPaymentView', 'admin'),
(102, 'Add Expense', 'finance/addExpenseView', 'admin'),
(103, 'Add Medicine', 'medicine/addMedicineView', 'admin'),
(104, 'Add Medicine Category', 'medicine/addCategoryView', 'admin'),
(105, 'Add Notice', 'notice/addNewView', 'admin'),
(106, 'Add Bed Allotment', 'bed/addAllotmentView', 'admin'),
(107, 'Add Bed', 'bed/addBedView', 'admin'),
(108, 'Add Donor', 'donor/addDonorView', 'admin'),
(109, 'Add Pharmacy Expense Category', 'finance/pharmacy/addExpenseCategoryView', 'admin'),
(110, 'Add Pharmacy Expense', 'finance/pharmacy/addExpenseView', 'admin'),
(111, 'Add Pharmacy Sale', 'finance/pharmacy/addPaymentView', 'admin'),
(112, 'Add Appointment', 'appointment/addNewView', 'admin'),
(113, 'Add Lab Template', 'lab/addTemplateView', 'admin'),
(114, 'Add Lab Report', 'lab', 'admin'),
(115, 'Add Prescription', 'prescription/addPrescriptionView', 'admin'),
(116, 'Add Receptionist', 'receptionist/addNewView', 'admin'),
(117, 'Add Accountant', 'accountant/addNewView', 'admin'),
(118, 'Add Laboratorist', 'laboratorist/addNewView', 'admin'),
(119, 'Add Pharmacist', 'pharmacist/addNewView', 'admin'),
(120, 'Add Nurse', 'nurse/addNewView', 'admin'),
(121, 'Add Doctor', 'doctor/addNewView', 'admin'),
(122, 'Patient Service List', 'pservice', 'admin'),
(123, 'Add Patient Service', 'pservice/addNew', 'admin'),
(124, 'Add New Patient Service', 'pservice/addNew', 'admin'),
(125, 'Superadmin List', 'superadmin', 'superadmin'),
(126, 'All Hospital', 'hospital', 'superadmin'),
(127, 'Add New Hospital', 'hospital/addNewView', 'superadmin'),
(128, 'Add Hospital', 'hospital/addNewView', 'superadmin'),
(129, 'Package List', 'hospital/package', 'superadmin'),
(130, 'Add New Package', 'package/addNewView', 'superadmin'),
(131, 'Add New Package', 'package/addNewView', 'superadmin'),
(132, 'Website Request', 'request', 'superadmin'),
(133, 'Active Hospital List', 'systems/activeHospitals', 'superadmin'),
(134, 'Inactive Hospital List', 'systems/inactiveHospitals', 'superadmin'),
(135, 'Lisence Expired Hospital List', 'systems/expiredHospitals', 'superadmin'),
(136, 'Registered Patient List', 'systems/registeredPatient', 'superadmin'),
(137, 'Registered Doctor List', 'systems/registeredDoctor', 'superadmin'),
(138, 'Subscription Report', 'hospital/reportSubscription', 'superadmin'),
(139, 'Email Settings', 'email/emailSettings', 'superadmin');

-- --------------------------------------------------------

--
-- Table structure for table `site_review`
--

CREATE TABLE `site_review` (
  `id` int(10) NOT NULL,
  `name` varchar(100) NOT NULL,
  `designation` varchar(500) NOT NULL,
  `review` varchar(1000) NOT NULL,
  `img` varchar(1000) NOT NULL,
  `status` varchar(100) NOT NULL,
  `hospital_id` varchar(1000) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

--
-- Dumping data for table `site_review`
--

INSERT INTO `site_review` (`id`, `name`, `designation`, `review`, `img`, `status`, `hospital_id`) VALUES
(2, 'Michael Smith', 'Business Analyst', 'Diagnosy always help to provide proper care treatment for most of get the proper cure and health life which is the more an over that reason what should be care a lot about your health more perfect', 'uploads/63c269e3dd3beb84504e5081Client-p-500.png', 'Active', '98'),
(3, 'Roberto Carlos', 'Civil Engineer', 'Diagnosy always help to provide proper care treatment for most of get the proper cure and health life which is the more an over that reason what should be care a lot about your health more perfect', 'uploads/63c269e3dd3beb84504e5081Client-p-5001.png', 'Active', '98');

-- --------------------------------------------------------

--
-- Table structure for table `site_service`
--

CREATE TABLE `site_service` (
  `id` int(100) NOT NULL,
  `img_url` varchar(1000) DEFAULT NULL,
  `title` varchar(100) DEFAULT NULL,
  `description` varchar(1000) DEFAULT NULL,
  `hospital_id` varchar(1000) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

--
-- Dumping data for table `site_service`
--

INSERT INTO `site_service` (`id`, `img_url`, `title`, `description`, `hospital_id`) VALUES
(2, 'uploads/63b536bfe06df82ddafdc76bOncology.png', 'Oncology', 'Oncology always try to provide the get the proper cure are and proper treatment for patient', '98'),
(3, 'uploads/63b514edd3a5520923d686a6Cardiology.png', 'Caridiology', 'Caridiology always try to provide the get the proper cure are and proper treatment for patient', '98'),
(4, 'uploads/63b50f8e8991fa2805d9b032Neurology.png', 'Neurology', 'Neurology always try to provide the get the proper cure are and proper treatment for patient', '98'),
(5, 'uploads/63b5126964a9588b232db451Gynecology.png', 'Gynecology', 'Gynecology always try to provide the get the proper cure are and proper treatment for patient', '98');

-- --------------------------------------------------------

--
-- Table structure for table `site_settings`
--

CREATE TABLE `site_settings` (
  `id` int(100) NOT NULL,
  `title` varchar(100) DEFAULT NULL,
  `description` varchar(1000) NOT NULL,
  `logo` varchar(1000) DEFAULT NULL,
  `address` varchar(500) DEFAULT NULL,
  `phone` varchar(100) DEFAULT NULL,
  `emergency` varchar(100) DEFAULT NULL,
  `support` varchar(100) DEFAULT NULL,
  `email` varchar(100) DEFAULT NULL,
  `currency` varchar(100) DEFAULT NULL,
  `block_1_text_under_title` varchar(500) DEFAULT NULL,
  `service_block__text_under_title` varchar(500) DEFAULT NULL,
  `doctor_block__text_under_title` varchar(500) DEFAULT NULL,
  `facebook_id` varchar(100) DEFAULT NULL,
  `twitter_id` varchar(100) DEFAULT NULL,
  `google_id` varchar(100) DEFAULT NULL,
  `youtube_id` varchar(100) DEFAULT NULL,
  `skype_id` varchar(100) DEFAULT NULL,
  `x` varchar(100) DEFAULT NULL,
  `twitter_username` varchar(1000) DEFAULT NULL,
  `appointment_title` varchar(1000) NOT NULL,
  `appointment_subtitle` varchar(1000) NOT NULL,
  `appointment_description` varchar(1000) NOT NULL,
  `appointment_img_url` varchar(500) NOT NULL,
  `url_hospital` varchar(1000) DEFAULT NULL,
  `hospital_id` varchar(1000) DEFAULT NULL,
  `language` varchar(100) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

--
-- Dumping data for table `site_settings`
--

INSERT INTO `site_settings` (`id`, `title`, `description`, `logo`, `address`, `phone`, `emergency`, `support`, `email`, `currency`, `block_1_text_under_title`, `service_block__text_under_title`, `doctor_block__text_under_title`, `facebook_id`, `twitter_id`, `google_id`, `youtube_id`, `skype_id`, `x`, `twitter_username`, `appointment_title`, `appointment_subtitle`, `appointment_description`, `appointment_img_url`, `url_hospital`, `hospital_id`, `language`) VALUES
(2, 'Evercare Hospital', 'Copyright © 2024 Code Aristos', 'uploads/Code-Aristos-logo5.png', 'Bashundhara, Dhaka', '8801777024443', '106780', '10678', 'admin@example.com', 'BDT ', 'We work with forward thinking clients to create beautiful, honest and amazing things that bring positive results.', 'Our Medical Departments', 'Meet our high quality expert Doctors', '#v', '#', '#', '#', '#', NULL, '#', 'Why you should choose us?', 'WELCOME TO HOSPITAL MANAGEMENT', 'Lorem ipsum dolor sit, amet consectetur adipisicing elit. Quisquam nulla quibusdam nam autem, in quasi quae cumque, laborum optio nobis reprehenderit doloremque delectus voluptate. Maxime aliquam vitae adipisci sit numquam?', 'uploads/why-choose-us-doc1.png', NULL, '98', 'english'),
(3, 'Rajbari Clinic1', 'Cardiac Excellence Cardiac Excellence Cardiac Excellence Cardiac Excellence Cardiac Excellence Cardiac Excellence Cardiac Excellence Cardiac Excellence Cardiac Excellence', NULL, 'Boropool, Rajbari Sadar, Rajbari', '0123456789', '10678', '10678', 'admin@example.com', '$', '', '', '', '', '', '', '', '', NULL, '', 'Book An Appointment', 'On your preferred time', 'On your preferred time', '', NULL, '103', NULL),
(4, 'ufghgfhfgh', 'Description', 'uploads/pasta.jpg', 'Binodpur, Rajbari', '01749335505', '353535', '34534535', 'united@hms.com', 'USD', 'dfgfgdgf', 'dfgdgdg', 'dgdgddg', '', '', '', '', '', NULL, '', 'dfdsfsdf', 'sdfsdf', 'sdfsdf', 'uploads/food1.jpeg', NULL, '111', 'arabic'),
(5, 'fvdfdgf', 'Cardiac Excellence Cardiac Excellence Cardiac Excellence Cardiac Excellence Cardiac Excellence Cardiac Excellence Cardiac Excellence Cardiac Excellence Cardiac Excellence', 'uploads/image.png', 'gdgdgdf', '34534534', '54645', '6464645', 'nurse@hms.comdggdgdgd', '$', 'Block 1 Text Under Title', 'Service Block Text Under Title', 'Doctor Block Text Under Title', '#', '#', '#', '#', '', NULL, '#', 'Book An Appointment', 'On your preferred time', 'On your preferred time', '', NULL, '113', 'english');

-- --------------------------------------------------------

--
-- Table structure for table `site_slide`
--

CREATE TABLE `site_slide` (
  `id` int(11) NOT NULL,
  `title` varchar(100) DEFAULT NULL,
  `img_url` varchar(1000) DEFAULT NULL,
  `text1` varchar(500) DEFAULT NULL,
  `text2` varchar(500) DEFAULT NULL,
  `text3` varchar(500) DEFAULT NULL,
  `position` varchar(100) DEFAULT NULL,
  `status` varchar(100) DEFAULT NULL,
  `hospital_id` varchar(1000) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

--
-- Dumping data for table `site_slide`
--

INSERT INTO `site_slide` (`id`, `title`, `img_url`, `text1`, `text2`, `text3`, `position`, `status`, `hospital_id`) VALUES
(12, 'Exceptional Healthcare For Your Family', 'uploads/pngaaa_com-118093.png', 'Experience world-class medical care with our team of dedicated healthcare professionals. We combine cutting-edge technology with compassionate service to ensure your well-being.', 'Hospital Management System', 'Hospital', '1', 'Active', '98'),
(20, 'Best Hospital Management System', 'uploads/2930366071135162514223557530237077533436902N.jpeg', 'Best Hospital Management System', 'Best Hospital Management System', 'Best Hospital Management System', '1', 'Active', '111');

-- --------------------------------------------------------

--
-- Table structure for table `slide`
--

CREATE TABLE `slide` (
  `id` int(11) NOT NULL,
  `title` varchar(100) DEFAULT NULL,
  `img_url` varchar(1000) DEFAULT NULL,
  `text1` varchar(500) DEFAULT NULL,
  `text2` varchar(500) DEFAULT NULL,
  `text3` varchar(500) DEFAULT NULL,
  `position` varchar(100) DEFAULT NULL,
  `status` varchar(100) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

--
-- Dumping data for table `slide`
--

INSERT INTO `slide` (`id`, `title`, `img_url`, `text1`, `text2`, `text3`, `position`, `status`) VALUES
(2, 'Optimize Your Practice with Hospital SaaS Suite', 'uploads/home_illus.png', 'Hospital Saas Software', 'Excellent features and modules', '#register', '1', 'https://codecanyon.net/item/multi-hms-hospital-management-system-saas-app/13972431');

-- --------------------------------------------------------

--
-- Table structure for table `sms`
--

CREATE TABLE `sms` (
  `id` int(100) NOT NULL,
  `date` varchar(100) DEFAULT NULL,
  `message` varchar(1600) DEFAULT NULL,
  `recipient` varchar(100) DEFAULT NULL,
  `user` varchar(100) DEFAULT NULL,
  `hospital_id` varchar(100) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

-- --------------------------------------------------------

--
-- Table structure for table `sms_settings`
--

CREATE TABLE `sms_settings` (
  `id` int(100) NOT NULL,
  `name` varchar(100) DEFAULT NULL,
  `username` varchar(100) DEFAULT NULL,
  `password` varchar(100) DEFAULT NULL,
  `api_id` varchar(100) DEFAULT NULL,
  `sender` varchar(100) DEFAULT NULL,
  `authkey` varchar(100) DEFAULT NULL,
  `user` varchar(100) DEFAULT NULL,
  `sid` varchar(1000) DEFAULT NULL,
  `token` varchar(1000) DEFAULT NULL,
  `sendernumber` varchar(1000) DEFAULT NULL,
  `hospital_id` varchar(100) DEFAULT NULL,
  `email` varchar(1000) DEFAULT NULL,
  `sender_name` varchar(1000) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;




-- --------------------------------------------------------

--
-- Table structure for table `stock_transactions`
--

CREATE TABLE `stock_transactions` (
  `id` int(11) NOT NULL,
  `inventory_item_id` int(11) NOT NULL,
  `transaction_type` enum('purchase','usage','adjustment','transfer','return','damaged','expired') NOT NULL,
  `reference_type` enum('purchase_order','usage_log','manual_adjustment','transfer','return','damage_report') DEFAULT NULL,
  `reference_id` int(11) DEFAULT NULL,
  `quantity` int(11) NOT NULL,
  `unit_cost` decimal(10,2) DEFAULT 0.00,
  `total_cost` decimal(15,2) DEFAULT 0.00,
  `previous_stock` int(11) NOT NULL,
  `new_stock` int(11) NOT NULL,
  `expiry_date` date DEFAULT NULL,
  `batch_number` varchar(100) DEFAULT NULL,
  `notes` text DEFAULT NULL,
  `transaction_date` timestamp NOT NULL DEFAULT current_timestamp(),
  `hospital_id` int(11) NOT NULL,
  `created_by` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `stock_transactions`
--

INSERT INTO `stock_transactions` (`id`, `inventory_item_id`, `transaction_type`, `reference_type`, `reference_id`, `quantity`, `unit_cost`, `total_cost`, `previous_stock`, `new_stock`, `expiry_date`, `batch_number`, `notes`, `transaction_date`, `hospital_id`, `created_by`) VALUES
(1, 1, 'adjustment', '', NULL, 1000, 10.00, 10000.00, 0, 1000, NULL, NULL, 'Initial stock entry', '2025-08-07 14:28:42', 98, 992),
(2, 2, 'adjustment', '', NULL, 1000, 12.00, 12000.00, 0, 1000, NULL, NULL, 'Initial stock entry', '2025-08-07 14:29:17', 98, 992),
(3, 3, 'adjustment', '', NULL, 1230, 12.00, 14760.00, 0, 1230, NULL, NULL, 'Initial stock entry', '2025-08-07 14:31:05', 98, 992),
(4, 3, 'usage', 'usage_log', 1, -30, 12.00, 360.00, 1230, 1200, '0000-00-00', '', NULL, '2025-08-07 14:38:56', 98, 992),
(5, 2, 'usage', 'usage_log', 2, -50, 12.00, 600.00, 1000, 950, '0000-00-00', '', NULL, '2025-08-07 14:39:25', 98, 992),
(6, 1, 'usage', 'usage_log', 3, -20, 10.00, 200.00, 1000, 980, '0000-00-00', '', NULL, '2025-08-07 14:39:50', 98, 992),
(7, 2, 'usage', 'usage_log', 4, -50, 12.00, 600.00, 950, 900, '0000-00-00', '', NULL, '2025-09-03 04:41:01', 98, 992),
(8, 4, 'usage', 'usage_log', 5, -10, 10.00, 100.00, 0, -10, '0000-00-00', '', NULL, '2025-09-04 04:33:27', 98, 992),
(9, 4, 'adjustment', '', 5, 10, 10.00, 100.00, 4, 4, NULL, NULL, 'Usage log reversal: Nurse', '2025-09-04 04:34:20', 98, 992);

-- --------------------------------------------------------

--
-- Table structure for table `superadmin`
--

CREATE TABLE `superadmin` (
  `id` int(50) NOT NULL,
  `name` varchar(200) DEFAULT NULL,
  `email` varchar(200) DEFAULT NULL,
  `phone` varchar(50) DEFAULT NULL,
  `address` varchar(300) DEFAULT NULL,
  `img_url` varchar(300) DEFAULT NULL,
  `ion_user_id` varchar(100) DEFAULT NULL,
  `module` varchar(300) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

--
-- Dumping data for table `superadmin`
--

INSERT INTO `superadmin` (`id`, `name`, `email`, `phone`, `address`, `img_url`, `ion_user_id`, `module`) VALUES
(12, 'Super Admin', 'superadmin@hms.com', '01749335500', 'Binodpur', 'uploads/userIcon5.png', '1', 'home,hospital,package,request,superadmin,email,pgateway,slide,service,systems');

-- --------------------------------------------------------

--
-- Table structure for table `suppliers`
--

CREATE TABLE `suppliers` (
  `id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `company_name` varchar(255) DEFAULT NULL,
  `contact_person` varchar(255) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `phone` varchar(20) DEFAULT NULL,
  `mobile` varchar(20) DEFAULT NULL,
  `address` text DEFAULT NULL,
  `city` varchar(100) DEFAULT NULL,
  `state` varchar(100) DEFAULT NULL,
  `country` varchar(100) DEFAULT NULL,
  `postal_code` varchar(20) DEFAULT NULL,
  `tax_number` varchar(50) DEFAULT NULL,
  `bank_name` varchar(255) DEFAULT NULL,
  `bank_account` varchar(50) DEFAULT NULL,
  `payment_terms` varchar(255) DEFAULT NULL,
  `credit_limit` decimal(15,2) DEFAULT 0.00,
  `current_balance` decimal(15,2) DEFAULT 0.00,
  `status` enum('active','inactive') DEFAULT 'active',
  `notes` text DEFAULT NULL,
  `hospital_id` int(11) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `created_by` int(11) DEFAULT NULL,
  `updated_by` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `suppliers`
--

INSERT INTO `suppliers` (`id`, `name`, `company_name`, `contact_person`, `email`, `phone`, `mobile`, `address`, `city`, `state`, `country`, `postal_code`, `tax_number`, `bank_name`, `bank_account`, `payment_terms`, `credit_limit`, `current_balance`, `status`, `notes`, `hospital_id`, `created_at`, `updated_at`, `created_by`, `updated_by`) VALUES
(1, 'Rizvi Mahmud', 'Linear Beauty', 'Rizvi Mahmud', 'admin@linear-beauty.com', '01536166567', '', 'fsdsdf', 'Dhaka', '', '', '', '', '', '', 'Net 30', 0.00, 0.00, 'active', '', 98, '2025-08-08 00:12:45', '2025-08-07 14:12:45', 992, NULL),
(2, 'Mr Supplier', 'Codearistos', 'Md Opu', 'info@codearistos.net', '01749335508', '', 'Bashundhara, Dhaka', 'Dhaka', '', '', '', '', '', '', 'Net 30', 0.00, 0.00, 'active', '', 98, '2025-08-08 00:15:01', '2025-08-07 14:15:01', 992, NULL),
(3, 'Inventory Supplier', 'Codearistos', 'Md Opu', 'info@codearistos.net', '01749335508', '01749335508', 'Bashundhara, Dhaka', 'Dhaka', 'sdfsdfsdfsdfsdf', 'Bangladesh', '1200', '234234234324', 'sdfsdf', '234234234234', 'Net 30', 100.00, 0.00, 'active', 'sdfsdfdsf', 98, '2025-08-27 17:36:47', '2025-09-04 14:32:30', 992, 992);

-- --------------------------------------------------------

--
-- Table structure for table `symptom`
--

CREATE TABLE `symptom` (
  `id` int(100) NOT NULL,
  `name` varchar(500) DEFAULT NULL,
  `description` varchar(1000) DEFAULT NULL,
  `hospital_id` int(100) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

--
-- Dumping data for table `symptom`
--

INSERT INTO `symptom` (`id`, `name`, `description`, `hospital_id`) VALUES
(61, 'Fever', NULL, 98);

-- --------------------------------------------------------

--
-- Table structure for table `template`
--

CREATE TABLE `template` (
  `id` int(100) NOT NULL,
  `name` varchar(100) DEFAULT NULL,
  `template` varchar(10000) DEFAULT NULL,
  `user` varchar(100) DEFAULT NULL,
  `x` varchar(100) DEFAULT NULL,
  `hospital_id` varchar(100) DEFAULT NULL,
  `category_id` varchar(100) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

-- --------------------------------------------------------

--
-- Table structure for table `testpkz`
--

CREATE TABLE `testpkz` (
  `id` int(100) NOT NULL,
  `name` varchar(300) DEFAULT NULL,
  `payment_category` varchar(100) DEFAULT NULL,
  `x` varchar(300) DEFAULT NULL,
  `hospital_id` varchar(300) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

--
-- Dumping data for table `testpkz`
--

INSERT INTO `testpkz` (`id`, `name`, `payment_category`, `x`, `hospital_id`) VALUES
(2, 'Test', '66,67', NULL, '98');

-- --------------------------------------------------------

--
-- Table structure for table `time_schedule`
--

CREATE TABLE `time_schedule` (
  `id` int(100) NOT NULL,
  `doctor` varchar(500) DEFAULT NULL,
  `weekday` varchar(100) DEFAULT NULL,
  `s_time` varchar(100) DEFAULT NULL,
  `e_time` varchar(100) DEFAULT NULL,
  `s_time_key` varchar(100) DEFAULT NULL,
  `duration` varchar(100) DEFAULT NULL,
  `hospital_id` varchar(100) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

--
-- Dumping data for table `time_schedule`
--

INSERT INTO `time_schedule` (`id`, `doctor`, `weekday`, `s_time`, `e_time`, `s_time_key`, `duration`, `hospital_id`) VALUES
(1, '1', 'Friday', '10:15 AM', '11:15 PM', '123', '3', '1'),
(5, '2', 'Wednesday', '04:30 PM', '11:30 PM', '198', '3', '2'),
(4, '1', 'Wednesday', '04:30 PM', '11:30 PM', '198', '3', '1'),
(6, '1', 'Thursday', '12:00 AM', '11:00 PM', '0', '3', '1'),
(7, '3', 'Friday', '10:15 AM', '11:15 PM', '123', '3', '4'),
(8, '5', 'Sunday', '12:00 PM', '06:00 PM', '144', '3', '4'),
(9, '3', 'Wednesday', '03:00 PM', '07:00 PM', '180', '3', '4'),
(10, '4', 'Thursday', '05:00 PM', '07:00 PM', '204', '3', '4'),
(11, '3', 'Sunday', '05:00 PM', '06:00 PM', '204', '3', '4'),
(13, '3', 'Monday', '05:30 PM', '08:30 PM', '210', '3', '4'),
(44, '44', 'Friday', '04:45 PM', '09:45 PM', '201', '1', '98'),
(45, '44', 'Saturday', '12:45 PM', '01:15 PM', '153', '1', '98');

-- --------------------------------------------------------

--
-- Table structure for table `time_slot`
--

CREATE TABLE `time_slot` (
  `id` int(100) NOT NULL,
  `doctor` varchar(100) DEFAULT NULL,
  `s_time` varchar(100) DEFAULT NULL,
  `e_time` varchar(100) DEFAULT NULL,
  `weekday` varchar(100) DEFAULT NULL,
  `s_time_key` varchar(100) DEFAULT NULL,
  `hospital_id` varchar(100) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

--
-- Dumping data for table `time_slot`
--

INSERT INTO `time_slot` (`id`, `doctor`, `s_time`, `e_time`, `weekday`, `s_time_key`, `hospital_id`) VALUES
(1, '1', '10:15 AM', '10:30 AM', 'Friday', '123', '1'),
(2, '1', '10:30 AM', '10:45 AM', 'Friday', '126', '1'),
(3, '1', '10:45 AM', '11:00 AM', 'Friday', '129', '1'),
(4, '1', '11:00 AM', '11:15 AM', 'Friday', '132', '1'),
(5, '1', '11:15 AM', '11:30 AM', 'Friday', '135', '1'),
(6, '1', '11:30 AM', '11:45 AM', 'Friday', '138', '1'),
(7, '1', '11:45 AM', '12:00 PM', 'Friday', '141', '1'),
(8, '1', '12:00 PM', '12:15 PM', 'Friday', '144', '1'),
(9, '1', '12:15 PM', '12:30 PM', 'Friday', '147', '1'),
(10, '1', '12:30 PM', '12:45 PM', 'Friday', '150', '1'),
(11, '1', '12:45 PM', '01:00 PM', 'Friday', '153', '1'),
(12, '1', '01:00 PM', '01:15 PM', 'Friday', '156', '1'),
(13, '1', '01:15 PM', '01:30 PM', 'Friday', '159', '1'),
(14, '1', '01:30 PM', '01:45 PM', 'Friday', '162', '1'),
(15, '1', '01:45 PM', '02:00 PM', 'Friday', '165', '1'),
(16, '1', '02:00 PM', '02:15 PM', 'Friday', '168', '1'),
(17, '1', '02:15 PM', '02:30 PM', 'Friday', '171', '1'),
(18, '1', '02:30 PM', '02:45 PM', 'Friday', '174', '1'),
(19, '1', '02:45 PM', '03:00 PM', 'Friday', '177', '1'),
(20, '1', '03:00 PM', '03:15 PM', 'Friday', '180', '1'),
(21, '1', '03:15 PM', '03:30 PM', 'Friday', '183', '1'),
(22, '1', '03:30 PM', '03:45 PM', 'Friday', '186', '1'),
(23, '1', '03:45 PM', '04:00 PM', 'Friday', '189', '1'),
(24, '1', '04:00 PM', '04:15 PM', 'Friday', '192', '1'),
(25, '1', '04:15 PM', '04:30 PM', 'Friday', '195', '1'),
(26, '1', '04:30 PM', '04:45 PM', 'Friday', '198', '1'),
(27, '1', '04:45 PM', '05:00 PM', 'Friday', '201', '1'),
(28, '1', '05:00 PM', '05:15 PM', 'Friday', '204', '1'),
(29, '1', '05:15 PM', '05:30 PM', 'Friday', '207', '1'),
(30, '1', '05:30 PM', '05:45 PM', 'Friday', '210', '1'),
(31, '1', '05:45 PM', '06:00 PM', 'Friday', '213', '1'),
(32, '1', '06:00 PM', '06:15 PM', 'Friday', '216', '1'),
(33, '1', '06:15 PM', '06:30 PM', 'Friday', '219', '1'),
(34, '1', '06:30 PM', '06:45 PM', 'Friday', '222', '1'),
(35, '1', '06:45 PM', '07:00 PM', 'Friday', '225', '1'),
(36, '1', '07:00 PM', '07:15 PM', 'Friday', '228', '1'),
(37, '1', '07:15 PM', '07:30 PM', 'Friday', '231', '1'),
(38, '1', '07:30 PM', '07:45 PM', 'Friday', '234', '1'),
(39, '1', '07:45 PM', '08:00 PM', 'Friday', '237', '1'),
(40, '1', '08:00 PM', '08:15 PM', 'Friday', '240', '1'),
(41, '1', '08:15 PM', '08:30 PM', 'Friday', '243', '1'),
(42, '1', '08:30 PM', '08:45 PM', 'Friday', '246', '1'),
(43, '1', '08:45 PM', '09:00 PM', 'Friday', '249', '1'),
(44, '1', '09:00 PM', '09:15 PM', 'Friday', '252', '1'),
(45, '1', '09:15 PM', '09:30 PM', 'Friday', '255', '1'),
(46, '1', '09:30 PM', '09:45 PM', 'Friday', '258', '1'),
(47, '1', '09:45 PM', '10:00 PM', 'Friday', '261', '1'),
(48, '1', '10:00 PM', '10:15 PM', 'Friday', '264', '1'),
(49, '1', '10:15 PM', '10:30 PM', 'Friday', '267', '1'),
(50, '1', '10:30 PM', '10:45 PM', 'Friday', '270', '1'),
(51, '1', '10:45 PM', '11:00 PM', 'Friday', '273', '1'),
(52, '1', '11:00 PM', '11:15 PM', 'Friday', '276', '1'),
(116, '2', '07:15 PM', '07:30 PM', 'Wednesday', '231', '2'),
(115, '2', '07:00 PM', '07:15 PM', 'Wednesday', '228', '2'),
(114, '2', '06:45 PM', '07:00 PM', 'Wednesday', '225', '2'),
(113, '2', '06:30 PM', '06:45 PM', 'Wednesday', '222', '2'),
(112, '2', '06:15 PM', '06:30 PM', 'Wednesday', '219', '2'),
(111, '2', '06:00 PM', '06:15 PM', 'Wednesday', '216', '2'),
(110, '2', '05:45 PM', '06:00 PM', 'Wednesday', '213', '2'),
(109, '2', '05:30 PM', '05:45 PM', 'Wednesday', '210', '2'),
(108, '2', '05:15 PM', '05:30 PM', 'Wednesday', '207', '2'),
(107, '2', '05:00 PM', '05:15 PM', 'Wednesday', '204', '2'),
(106, '2', '04:45 PM', '05:00 PM', 'Wednesday', '201', '2'),
(105, '2', '04:30 PM', '04:45 PM', 'Wednesday', '198', '2'),
(88, '1', '07:15 PM', '07:30 PM', 'Wednesday', '231', '1'),
(87, '1', '07:00 PM', '07:15 PM', 'Wednesday', '228', '1'),
(86, '1', '06:45 PM', '07:00 PM', 'Wednesday', '225', '1'),
(85, '1', '06:30 PM', '06:45 PM', 'Wednesday', '222', '1'),
(84, '1', '06:15 PM', '06:30 PM', 'Wednesday', '219', '1'),
(83, '1', '06:00 PM', '06:15 PM', 'Wednesday', '216', '1'),
(82, '1', '05:45 PM', '06:00 PM', 'Wednesday', '213', '1'),
(81, '1', '05:30 PM', '05:45 PM', 'Wednesday', '210', '1'),
(80, '1', '05:15 PM', '05:30 PM', 'Wednesday', '207', '1'),
(79, '1', '05:00 PM', '05:15 PM', 'Wednesday', '204', '1'),
(78, '1', '04:45 PM', '05:00 PM', 'Wednesday', '201', '1'),
(77, '1', '04:30 PM', '04:45 PM', 'Wednesday', '198', '1'),
(89, '1', '07:30 PM', '07:45 PM', 'Wednesday', '234', '1'),
(90, '1', '07:45 PM', '08:00 PM', 'Wednesday', '237', '1'),
(91, '1', '08:00 PM', '08:15 PM', 'Wednesday', '240', '1'),
(92, '1', '08:15 PM', '08:30 PM', 'Wednesday', '243', '1'),
(93, '1', '08:30 PM', '08:45 PM', 'Wednesday', '246', '1'),
(94, '1', '08:45 PM', '09:00 PM', 'Wednesday', '249', '1'),
(95, '1', '09:00 PM', '09:15 PM', 'Wednesday', '252', '1'),
(96, '1', '09:15 PM', '09:30 PM', 'Wednesday', '255', '1'),
(97, '1', '09:30 PM', '09:45 PM', 'Wednesday', '258', '1'),
(98, '1', '09:45 PM', '10:00 PM', 'Wednesday', '261', '1'),
(99, '1', '10:00 PM', '10:15 PM', 'Wednesday', '264', '1'),
(100, '1', '10:15 PM', '10:30 PM', 'Wednesday', '267', '1'),
(101, '1', '10:30 PM', '10:45 PM', 'Wednesday', '270', '1'),
(102, '1', '10:45 PM', '11:00 PM', 'Wednesday', '273', '1'),
(103, '1', '11:00 PM', '11:15 PM', 'Wednesday', '276', '1'),
(104, '1', '11:15 PM', '11:30 PM', 'Wednesday', '279', '1'),
(117, '2', '07:30 PM', '07:45 PM', 'Wednesday', '234', '2'),
(118, '2', '07:45 PM', '08:00 PM', 'Wednesday', '237', '2'),
(119, '2', '08:00 PM', '08:15 PM', 'Wednesday', '240', '2'),
(120, '2', '08:15 PM', '08:30 PM', 'Wednesday', '243', '2'),
(121, '2', '08:30 PM', '08:45 PM', 'Wednesday', '246', '2'),
(122, '2', '08:45 PM', '09:00 PM', 'Wednesday', '249', '2'),
(123, '2', '09:00 PM', '09:15 PM', 'Wednesday', '252', '2'),
(124, '2', '09:15 PM', '09:30 PM', 'Wednesday', '255', '2'),
(125, '2', '09:30 PM', '09:45 PM', 'Wednesday', '258', '2'),
(126, '2', '09:45 PM', '10:00 PM', 'Wednesday', '261', '2'),
(127, '2', '10:00 PM', '10:15 PM', 'Wednesday', '264', '2'),
(128, '2', '10:15 PM', '10:30 PM', 'Wednesday', '267', '2'),
(129, '2', '10:30 PM', '10:45 PM', 'Wednesday', '270', '2'),
(130, '2', '10:45 PM', '11:00 PM', 'Wednesday', '273', '2'),
(131, '2', '11:00 PM', '11:15 PM', 'Wednesday', '276', '2'),
(132, '2', '11:15 PM', '11:30 PM', 'Wednesday', '279', '2'),
(133, '1', '12:00 AM', '12:15 AM', 'Thursday', '0', '1'),
(134, '1', '12:15 AM', '12:30 AM', 'Thursday', '3', '1'),
(135, '1', '12:30 AM', '12:45 AM', 'Thursday', '6', '1'),
(136, '1', '12:45 AM', '01:00 AM', 'Thursday', '9', '1'),
(137, '1', '01:00 AM', '01:15 AM', 'Thursday', '12', '1'),
(138, '1', '01:15 AM', '01:30 AM', 'Thursday', '15', '1'),
(139, '1', '01:30 AM', '01:45 AM', 'Thursday', '18', '1'),
(140, '1', '01:45 AM', '02:00 AM', 'Thursday', '21', '1'),
(141, '1', '02:00 AM', '02:15 AM', 'Thursday', '24', '1'),
(142, '1', '02:15 AM', '02:30 AM', 'Thursday', '27', '1'),
(143, '1', '02:30 AM', '02:45 AM', 'Thursday', '30', '1'),
(144, '1', '02:45 AM', '03:00 AM', 'Thursday', '33', '1'),
(145, '1', '03:00 AM', '03:15 AM', 'Thursday', '36', '1'),
(146, '1', '03:15 AM', '03:30 AM', 'Thursday', '39', '1'),
(147, '1', '03:30 AM', '03:45 AM', 'Thursday', '42', '1'),
(148, '1', '03:45 AM', '04:00 AM', 'Thursday', '45', '1'),
(149, '1', '04:00 AM', '04:15 AM', 'Thursday', '48', '1'),
(150, '1', '04:15 AM', '04:30 AM', 'Thursday', '51', '1'),
(151, '1', '04:30 AM', '04:45 AM', 'Thursday', '54', '1'),
(152, '1', '04:45 AM', '05:00 AM', 'Thursday', '57', '1'),
(153, '1', '05:00 AM', '05:15 AM', 'Thursday', '60', '1'),
(154, '1', '05:15 AM', '05:30 AM', 'Thursday', '63', '1'),
(155, '1', '05:30 AM', '05:45 AM', 'Thursday', '66', '1'),
(156, '1', '05:45 AM', '06:00 AM', 'Thursday', '69', '1'),
(157, '1', '06:00 AM', '06:15 AM', 'Thursday', '72', '1'),
(158, '1', '06:15 AM', '06:30 AM', 'Thursday', '75', '1'),
(159, '1', '06:30 AM', '06:45 AM', 'Thursday', '78', '1'),
(160, '1', '06:45 AM', '07:00 AM', 'Thursday', '81', '1'),
(161, '1', '07:00 AM', '07:15 AM', 'Thursday', '84', '1'),
(162, '1', '07:15 AM', '07:30 AM', 'Thursday', '87', '1'),
(163, '1', '07:30 AM', '07:45 AM', 'Thursday', '90', '1'),
(164, '1', '07:45 AM', '08:00 AM', 'Thursday', '93', '1'),
(165, '1', '08:00 AM', '08:15 AM', 'Thursday', '96', '1'),
(166, '1', '08:15 AM', '08:30 AM', 'Thursday', '99', '1'),
(167, '1', '08:30 AM', '08:45 AM', 'Thursday', '102', '1'),
(168, '1', '08:45 AM', '09:00 AM', 'Thursday', '105', '1'),
(169, '1', '09:00 AM', '09:15 AM', 'Thursday', '108', '1'),
(170, '1', '09:15 AM', '09:30 AM', 'Thursday', '111', '1'),
(171, '1', '09:30 AM', '09:45 AM', 'Thursday', '114', '1'),
(172, '1', '09:45 AM', '10:00 AM', 'Thursday', '117', '1'),
(173, '1', '10:00 AM', '10:15 AM', 'Thursday', '120', '1'),
(174, '1', '10:15 AM', '10:30 AM', 'Thursday', '123', '1'),
(175, '1', '10:30 AM', '10:45 AM', 'Thursday', '126', '1'),
(176, '1', '10:45 AM', '11:00 AM', 'Thursday', '129', '1'),
(177, '1', '11:00 AM', '11:15 AM', 'Thursday', '132', '1'),
(178, '1', '11:15 AM', '11:30 AM', 'Thursday', '135', '1'),
(179, '1', '11:30 AM', '11:45 AM', 'Thursday', '138', '1'),
(180, '1', '11:45 AM', '12:00 PM', 'Thursday', '141', '1'),
(181, '1', '12:00 PM', '12:15 PM', 'Thursday', '144', '1'),
(182, '1', '12:15 PM', '12:30 PM', 'Thursday', '147', '1'),
(183, '1', '12:30 PM', '12:45 PM', 'Thursday', '150', '1'),
(184, '1', '12:45 PM', '01:00 PM', 'Thursday', '153', '1'),
(185, '1', '01:00 PM', '01:15 PM', 'Thursday', '156', '1'),
(186, '1', '01:15 PM', '01:30 PM', 'Thursday', '159', '1'),
(187, '1', '01:30 PM', '01:45 PM', 'Thursday', '162', '1'),
(188, '1', '01:45 PM', '02:00 PM', 'Thursday', '165', '1'),
(189, '1', '02:00 PM', '02:15 PM', 'Thursday', '168', '1'),
(190, '1', '02:15 PM', '02:30 PM', 'Thursday', '171', '1'),
(191, '1', '02:30 PM', '02:45 PM', 'Thursday', '174', '1'),
(192, '1', '02:45 PM', '03:00 PM', 'Thursday', '177', '1'),
(193, '1', '03:00 PM', '03:15 PM', 'Thursday', '180', '1'),
(194, '1', '03:15 PM', '03:30 PM', 'Thursday', '183', '1'),
(195, '1', '03:30 PM', '03:45 PM', 'Thursday', '186', '1'),
(196, '1', '03:45 PM', '04:00 PM', 'Thursday', '189', '1'),
(197, '1', '04:00 PM', '04:15 PM', 'Thursday', '192', '1'),
(198, '1', '04:15 PM', '04:30 PM', 'Thursday', '195', '1'),
(199, '1', '04:30 PM', '04:45 PM', 'Thursday', '198', '1'),
(200, '1', '04:45 PM', '05:00 PM', 'Thursday', '201', '1'),
(201, '1', '05:00 PM', '05:15 PM', 'Thursday', '204', '1'),
(202, '1', '05:15 PM', '05:30 PM', 'Thursday', '207', '1'),
(203, '1', '05:30 PM', '05:45 PM', 'Thursday', '210', '1'),
(204, '1', '05:45 PM', '06:00 PM', 'Thursday', '213', '1'),
(205, '1', '06:00 PM', '06:15 PM', 'Thursday', '216', '1'),
(206, '1', '06:15 PM', '06:30 PM', 'Thursday', '219', '1'),
(207, '1', '06:30 PM', '06:45 PM', 'Thursday', '222', '1'),
(208, '1', '06:45 PM', '07:00 PM', 'Thursday', '225', '1'),
(209, '1', '07:00 PM', '07:15 PM', 'Thursday', '228', '1'),
(210, '1', '07:15 PM', '07:30 PM', 'Thursday', '231', '1'),
(211, '1', '07:30 PM', '07:45 PM', 'Thursday', '234', '1'),
(212, '1', '07:45 PM', '08:00 PM', 'Thursday', '237', '1'),
(213, '1', '08:00 PM', '08:15 PM', 'Thursday', '240', '1'),
(214, '1', '08:15 PM', '08:30 PM', 'Thursday', '243', '1'),
(215, '1', '08:30 PM', '08:45 PM', 'Thursday', '246', '1'),
(216, '1', '08:45 PM', '09:00 PM', 'Thursday', '249', '1'),
(217, '1', '09:00 PM', '09:15 PM', 'Thursday', '252', '1'),
(218, '1', '09:15 PM', '09:30 PM', 'Thursday', '255', '1'),
(219, '1', '09:30 PM', '09:45 PM', 'Thursday', '258', '1'),
(220, '1', '09:45 PM', '10:00 PM', 'Thursday', '261', '1'),
(221, '1', '10:00 PM', '10:15 PM', 'Thursday', '264', '1'),
(222, '1', '10:15 PM', '10:30 PM', 'Thursday', '267', '1'),
(223, '1', '10:30 PM', '10:45 PM', 'Thursday', '270', '1'),
(224, '1', '10:45 PM', '11:00 PM', 'Thursday', '273', '1'),
(225, '3', '10:15 AM', '10:30 AM', 'Friday', '123', '4'),
(226, '3', '10:30 AM', '10:45 AM', 'Friday', '126', '4'),
(227, '3', '10:45 AM', '11:00 AM', 'Friday', '129', '4'),
(228, '3', '11:00 AM', '11:15 AM', 'Friday', '132', '4'),
(229, '3', '11:15 AM', '11:30 AM', 'Friday', '135', '4'),
(230, '3', '11:30 AM', '11:45 AM', 'Friday', '138', '4'),
(231, '3', '11:45 AM', '12:00 PM', 'Friday', '141', '4'),
(232, '3', '12:00 PM', '12:15 PM', 'Friday', '144', '4'),
(233, '3', '12:15 PM', '12:30 PM', 'Friday', '147', '4'),
(234, '3', '12:30 PM', '12:45 PM', 'Friday', '150', '4'),
(235, '3', '12:45 PM', '01:00 PM', 'Friday', '153', '4'),
(236, '3', '01:00 PM', '01:15 PM', 'Friday', '156', '4'),
(237, '3', '01:15 PM', '01:30 PM', 'Friday', '159', '4'),
(238, '3', '01:30 PM', '01:45 PM', 'Friday', '162', '4'),
(239, '3', '01:45 PM', '02:00 PM', 'Friday', '165', '4'),
(240, '3', '02:00 PM', '02:15 PM', 'Friday', '168', '4'),
(241, '3', '02:15 PM', '02:30 PM', 'Friday', '171', '4'),
(242, '3', '02:30 PM', '02:45 PM', 'Friday', '174', '4'),
(243, '3', '02:45 PM', '03:00 PM', 'Friday', '177', '4'),
(244, '3', '03:00 PM', '03:15 PM', 'Friday', '180', '4'),
(245, '3', '03:15 PM', '03:30 PM', 'Friday', '183', '4'),
(246, '3', '03:30 PM', '03:45 PM', 'Friday', '186', '4'),
(247, '3', '03:45 PM', '04:00 PM', 'Friday', '189', '4'),
(248, '3', '04:00 PM', '04:15 PM', 'Friday', '192', '4'),
(249, '3', '04:15 PM', '04:30 PM', 'Friday', '195', '4'),
(250, '3', '04:30 PM', '04:45 PM', 'Friday', '198', '4'),
(251, '3', '04:45 PM', '05:00 PM', 'Friday', '201', '4'),
(252, '3', '05:00 PM', '05:15 PM', 'Friday', '204', '4'),
(253, '3', '05:15 PM', '05:30 PM', 'Friday', '207', '4'),
(254, '3', '05:30 PM', '05:45 PM', 'Friday', '210', '4'),
(255, '3', '05:45 PM', '06:00 PM', 'Friday', '213', '4'),
(256, '3', '06:00 PM', '06:15 PM', 'Friday', '216', '4'),
(257, '3', '06:15 PM', '06:30 PM', 'Friday', '219', '4'),
(258, '3', '06:30 PM', '06:45 PM', 'Friday', '222', '4'),
(259, '3', '06:45 PM', '07:00 PM', 'Friday', '225', '4'),
(260, '3', '07:00 PM', '07:15 PM', 'Friday', '228', '4'),
(261, '3', '07:15 PM', '07:30 PM', 'Friday', '231', '4'),
(262, '3', '07:30 PM', '07:45 PM', 'Friday', '234', '4'),
(263, '3', '07:45 PM', '08:00 PM', 'Friday', '237', '4'),
(264, '3', '08:00 PM', '08:15 PM', 'Friday', '240', '4'),
(265, '3', '08:15 PM', '08:30 PM', 'Friday', '243', '4'),
(266, '3', '08:30 PM', '08:45 PM', 'Friday', '246', '4'),
(267, '3', '08:45 PM', '09:00 PM', 'Friday', '249', '4'),
(268, '3', '09:00 PM', '09:15 PM', 'Friday', '252', '4'),
(269, '3', '09:15 PM', '09:30 PM', 'Friday', '255', '4'),
(270, '3', '09:30 PM', '09:45 PM', 'Friday', '258', '4'),
(271, '3', '09:45 PM', '10:00 PM', 'Friday', '261', '4'),
(272, '3', '10:00 PM', '10:15 PM', 'Friday', '264', '4'),
(273, '3', '10:15 PM', '10:30 PM', 'Friday', '267', '4'),
(274, '3', '10:30 PM', '10:45 PM', 'Friday', '270', '4'),
(275, '3', '10:45 PM', '11:00 PM', 'Friday', '273', '4'),
(276, '3', '11:00 PM', '11:15 PM', 'Friday', '276', '4'),
(277, '5', '12:00 PM', '12:15 PM', 'Sunday', '144', '4'),
(278, '5', '12:15 PM', '12:30 PM', 'Sunday', '147', '4'),
(279, '5', '12:30 PM', '12:45 PM', 'Sunday', '150', '4'),
(280, '5', '12:45 PM', '01:00 PM', 'Sunday', '153', '4'),
(281, '5', '01:00 PM', '01:15 PM', 'Sunday', '156', '4'),
(282, '5', '01:15 PM', '01:30 PM', 'Sunday', '159', '4'),
(283, '5', '01:30 PM', '01:45 PM', 'Sunday', '162', '4'),
(284, '5', '01:45 PM', '02:00 PM', 'Sunday', '165', '4'),
(285, '5', '02:00 PM', '02:15 PM', 'Sunday', '168', '4'),
(286, '5', '02:15 PM', '02:30 PM', 'Sunday', '171', '4'),
(287, '5', '02:30 PM', '02:45 PM', 'Sunday', '174', '4'),
(288, '5', '02:45 PM', '03:00 PM', 'Sunday', '177', '4'),
(289, '5', '03:00 PM', '03:15 PM', 'Sunday', '180', '4'),
(290, '5', '03:15 PM', '03:30 PM', 'Sunday', '183', '4'),
(291, '5', '03:30 PM', '03:45 PM', 'Sunday', '186', '4'),
(292, '5', '03:45 PM', '04:00 PM', 'Sunday', '189', '4'),
(293, '5', '04:00 PM', '04:15 PM', 'Sunday', '192', '4'),
(294, '5', '04:15 PM', '04:30 PM', 'Sunday', '195', '4'),
(295, '5', '04:30 PM', '04:45 PM', 'Sunday', '198', '4'),
(296, '5', '04:45 PM', '05:00 PM', 'Sunday', '201', '4'),
(297, '5', '05:00 PM', '05:15 PM', 'Sunday', '204', '4'),
(298, '5', '05:15 PM', '05:30 PM', 'Sunday', '207', '4'),
(299, '5', '05:30 PM', '05:45 PM', 'Sunday', '210', '4'),
(300, '5', '05:45 PM', '06:00 PM', 'Sunday', '213', '4'),
(301, '3', '03:00 PM', '03:15 PM', 'Wednesday', '180', '4'),
(302, '3', '03:15 PM', '03:30 PM', 'Wednesday', '183', '4'),
(303, '3', '03:30 PM', '03:45 PM', 'Wednesday', '186', '4'),
(304, '3', '03:45 PM', '04:00 PM', 'Wednesday', '189', '4'),
(305, '3', '04:00 PM', '04:15 PM', 'Wednesday', '192', '4'),
(306, '3', '04:15 PM', '04:30 PM', 'Wednesday', '195', '4'),
(307, '3', '04:30 PM', '04:45 PM', 'Wednesday', '198', '4'),
(308, '3', '04:45 PM', '05:00 PM', 'Wednesday', '201', '4'),
(309, '3', '05:00 PM', '05:15 PM', 'Wednesday', '204', '4'),
(310, '3', '05:15 PM', '05:30 PM', 'Wednesday', '207', '4'),
(311, '3', '05:30 PM', '05:45 PM', 'Wednesday', '210', '4'),
(312, '3', '05:45 PM', '06:00 PM', 'Wednesday', '213', '4'),
(313, '3', '06:00 PM', '06:15 PM', 'Wednesday', '216', '4'),
(314, '3', '06:15 PM', '06:30 PM', 'Wednesday', '219', '4'),
(315, '3', '06:30 PM', '06:45 PM', 'Wednesday', '222', '4'),
(316, '3', '06:45 PM', '07:00 PM', 'Wednesday', '225', '4'),
(317, '4', '05:00 PM', '05:15 PM', 'Thursday', '204', '4'),
(318, '4', '05:15 PM', '05:30 PM', 'Thursday', '207', '4'),
(319, '4', '05:30 PM', '05:45 PM', 'Thursday', '210', '4'),
(320, '4', '05:45 PM', '06:00 PM', 'Thursday', '213', '4'),
(321, '4', '06:00 PM', '06:15 PM', 'Thursday', '216', '4'),
(322, '4', '06:15 PM', '06:30 PM', 'Thursday', '219', '4'),
(323, '4', '06:30 PM', '06:45 PM', 'Thursday', '222', '4'),
(324, '4', '06:45 PM', '07:00 PM', 'Thursday', '225', '4'),
(325, '3', '05:00 PM', '05:15 PM', 'Sunday', '204', '4'),
(326, '3', '05:15 PM', '05:30 PM', 'Sunday', '207', '4'),
(327, '3', '05:30 PM', '05:45 PM', 'Sunday', '210', '4'),
(328, '3', '05:45 PM', '06:00 PM', 'Sunday', '213', '4'),
(344, '3', '07:15 PM', '07:30 PM', 'Monday', '231', '4'),
(343, '3', '07:00 PM', '07:15 PM', 'Monday', '228', '4'),
(342, '3', '06:45 PM', '07:00 PM', 'Monday', '225', '4'),
(341, '3', '06:30 PM', '06:45 PM', 'Monday', '222', '4'),
(340, '3', '06:15 PM', '06:30 PM', 'Monday', '219', '4'),
(339, '3', '06:00 PM', '06:15 PM', 'Monday', '216', '4'),
(338, '3', '05:45 PM', '06:00 PM', 'Monday', '213', '4'),
(337, '3', '05:30 PM', '05:45 PM', 'Monday', '210', '4'),
(345, '3', '07:30 PM', '07:45 PM', 'Monday', '234', '4'),
(346, '3', '07:45 PM', '08:00 PM', 'Monday', '237', '4'),
(347, '3', '08:00 PM', '08:15 PM', 'Monday', '240', '4'),
(348, '3', '08:15 PM', '08:30 PM', 'Monday', '243', '4'),
(843, '44', '09:40 PM', '09:45 PM', 'Friday', '260', '98'),
(842, '44', '09:35 PM', '09:40 PM', 'Friday', '259', '98'),
(841, '44', '09:30 PM', '09:35 PM', 'Friday', '258', '98'),
(840, '44', '09:25 PM', '09:30 PM', 'Friday', '257', '98'),
(839, '44', '09:20 PM', '09:25 PM', 'Friday', '256', '98'),
(838, '44', '09:15 PM', '09:20 PM', 'Friday', '255', '98'),
(837, '44', '09:10 PM', '09:15 PM', 'Friday', '254', '98'),
(836, '44', '09:05 PM', '09:10 PM', 'Friday', '253', '98'),
(835, '44', '09:00 PM', '09:05 PM', 'Friday', '252', '98'),
(834, '44', '08:55 PM', '09:00 PM', 'Friday', '251', '98'),
(833, '44', '08:50 PM', '08:55 PM', 'Friday', '250', '98'),
(832, '44', '08:45 PM', '08:50 PM', 'Friday', '249', '98'),
(831, '44', '08:40 PM', '08:45 PM', 'Friday', '248', '98'),
(830, '44', '08:35 PM', '08:40 PM', 'Friday', '247', '98'),
(829, '44', '08:30 PM', '08:35 PM', 'Friday', '246', '98'),
(828, '44', '08:25 PM', '08:30 PM', 'Friday', '245', '98'),
(827, '44', '08:20 PM', '08:25 PM', 'Friday', '244', '98'),
(826, '44', '08:15 PM', '08:20 PM', 'Friday', '243', '98'),
(825, '44', '08:10 PM', '08:15 PM', 'Friday', '242', '98'),
(824, '44', '08:05 PM', '08:10 PM', 'Friday', '241', '98'),
(823, '44', '08:00 PM', '08:05 PM', 'Friday', '240', '98'),
(822, '44', '07:55 PM', '08:00 PM', 'Friday', '239', '98'),
(821, '44', '07:50 PM', '07:55 PM', 'Friday', '238', '98'),
(820, '44', '07:45 PM', '07:50 PM', 'Friday', '237', '98'),
(819, '44', '07:40 PM', '07:45 PM', 'Friday', '236', '98'),
(818, '44', '07:35 PM', '07:40 PM', 'Friday', '235', '98'),
(817, '44', '07:30 PM', '07:35 PM', 'Friday', '234', '98'),
(816, '44', '07:25 PM', '07:30 PM', 'Friday', '233', '98'),
(815, '44', '07:20 PM', '07:25 PM', 'Friday', '232', '98'),
(814, '44', '07:15 PM', '07:20 PM', 'Friday', '231', '98'),
(813, '44', '07:10 PM', '07:15 PM', 'Friday', '230', '98'),
(812, '44', '07:05 PM', '07:10 PM', 'Friday', '229', '98'),
(811, '44', '07:00 PM', '07:05 PM', 'Friday', '228', '98'),
(810, '44', '06:55 PM', '07:00 PM', 'Friday', '227', '98'),
(809, '44', '06:50 PM', '06:55 PM', 'Friday', '226', '98'),
(808, '44', '06:45 PM', '06:50 PM', 'Friday', '225', '98'),
(807, '44', '06:40 PM', '06:45 PM', 'Friday', '224', '98'),
(806, '44', '06:35 PM', '06:40 PM', 'Friday', '223', '98'),
(805, '44', '06:30 PM', '06:35 PM', 'Friday', '222', '98'),
(804, '44', '06:25 PM', '06:30 PM', 'Friday', '221', '98'),
(803, '44', '06:20 PM', '06:25 PM', 'Friday', '220', '98'),
(802, '44', '06:15 PM', '06:20 PM', 'Friday', '219', '98'),
(801, '44', '06:10 PM', '06:15 PM', 'Friday', '218', '98'),
(800, '44', '06:05 PM', '06:10 PM', 'Friday', '217', '98'),
(799, '44', '06:00 PM', '06:05 PM', 'Friday', '216', '98'),
(798, '44', '05:55 PM', '06:00 PM', 'Friday', '215', '98'),
(797, '44', '05:50 PM', '05:55 PM', 'Friday', '214', '98'),
(796, '44', '05:45 PM', '05:50 PM', 'Friday', '213', '98'),
(795, '44', '05:40 PM', '05:45 PM', 'Friday', '212', '98'),
(794, '44', '05:35 PM', '05:40 PM', 'Friday', '211', '98'),
(793, '44', '05:30 PM', '05:35 PM', 'Friday', '210', '98'),
(792, '44', '05:25 PM', '05:30 PM', 'Friday', '209', '98'),
(791, '44', '05:20 PM', '05:25 PM', 'Friday', '208', '98'),
(790, '44', '05:15 PM', '05:20 PM', 'Friday', '207', '98'),
(789, '44', '05:10 PM', '05:15 PM', 'Friday', '206', '98'),
(788, '44', '05:05 PM', '05:10 PM', 'Friday', '205', '98'),
(787, '44', '05:00 PM', '05:05 PM', 'Friday', '204', '98'),
(786, '44', '04:55 PM', '05:00 PM', 'Friday', '203', '98'),
(785, '44', '04:50 PM', '04:55 PM', 'Friday', '202', '98'),
(784, '44', '04:45 PM', '04:50 PM', 'Friday', '201', '98'),
(844, '44', '12:45 PM', '12:50 PM', 'Saturday', '153', '98'),
(845, '44', '12:50 PM', '12:55 PM', 'Saturday', '154', '98'),
(846, '44', '12:55 PM', '01:00 PM', 'Saturday', '155', '98'),
(847, '44', '01:00 PM', '01:05 PM', 'Saturday', '156', '98'),
(848, '44', '01:05 PM', '01:10 PM', 'Saturday', '157', '98'),
(849, '44', '01:10 PM', '01:15 PM', 'Saturday', '158', '98');

-- --------------------------------------------------------

--
-- Table structure for table `transaction_logs`
--

CREATE TABLE `transaction_logs` (
  `id` int(100) NOT NULL,
  `date_time` varchar(1000) DEFAULT NULL,
  `invoice_id` varchar(1000) DEFAULT NULL,
  `patientname` varchar(1000) DEFAULT NULL,
  `deposit_type` varchar(1000) DEFAULT NULL,
  `payment_gateway` varchar(1000) DEFAULT NULL,
  `action` varchar(1000) DEFAULT NULL,
  `hospital_id` varchar(1000) DEFAULT NULL,
  `amount` varchar(1000) DEFAULT NULL,
  `user` varchar(1000) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

--
-- Dumping data for table `transaction_logs`
--

INSERT INTO `transaction_logs` (`id`, `date_time`, `invoice_id`, `patientname`, `deposit_type`, `payment_gateway`, `action`, `hospital_id`, `amount`, `user`) VALUES
(628, '10-08-2025 00:35', '662', 'Mr Patient', 'Cash', NULL, 'Added', '98', '500', '992'),
(629, '08-09-2025 12:50', '662', 'Mr Patient', 'Cash', NULL, 'deleted', '98', '500', '992');

-- --------------------------------------------------------

--
-- Table structure for table `treatment`
--

CREATE TABLE `treatment` (
  `id` int(100) NOT NULL,
  `name` varchar(255) DEFAULT NULL,
  `description` varchar(1000) DEFAULT NULL,
  `code` varchar(255) DEFAULT NULL,
  `hospital_id` int(100) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

--
-- Dumping data for table `treatment`
--

INSERT INTO `treatment` (`id`, `name`, `description`, `code`, `hospital_id`) VALUES
(15, 'Medication', NULL, NULL, 98);

-- --------------------------------------------------------

--
-- Table structure for table `treatment_plans`
--

CREATE TABLE `treatment_plans` (
  `id` int(11) NOT NULL,
  `patient_id` int(11) NOT NULL,
  `doctor_id` varchar(100) DEFAULT NULL,
  `symptoms` text NOT NULL,
  `symptom_analysis` longtext DEFAULT NULL,
  `doctor_input` text DEFAULT NULL,
  `test_results` text DEFAULT NULL,
  `treatment_plan` longtext DEFAULT NULL,
  `prescription` longtext DEFAULT NULL,
  `created_by` int(11) NOT NULL,
  `updated_by` int(11) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT NULL ON UPDATE current_timestamp(),
  `hospital_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `treatment_plans`
--

INSERT INTO `treatment_plans` (`id`, `patient_id`, `doctor_id`, `symptoms`, `symptom_analysis`, `doctor_input`, `test_results`, `treatment_plan`, `prescription`, `created_by`, `updated_by`, `created_at`, `updated_at`, `hospital_id`) VALUES
(1, 53, NULL, 'Headeace', '**Patient Information:**  \nName: Mr Patient  \nAge: 13 years  \nGender: Male  \nMedical History: Not specified (entry \"dfgdfg\" is not interpretable)\n\n**Presenting Symptom:**  \nHeadache\n\n---\n\n### 1. Potential Differential Diagnoses\n\nGiven the limited information (isolated headache in a 13-year-old male), consider the following common and serious causes:\n\n**Primary Headache Disorders:**\n- Tension-type headache\n- Migraine (with or without aura)\n- Cluster headache (less common in this age group)\n\n**Secondary Headache Causes:**\n- Viral or bacterial infection (e.g., sinusitis, upper respiratory tract infection, meningitis)\n- Medication overuse or withdrawal\n- Dehydration\n- Vision problems (e.g., refractive errors)\n- Trauma (concussion, subdural hematoma)\n- Intracranial pathology (e.g., tumor, hydrocephalus, idiopathic intracranial hypertension)\n- Dental or temporomandibular joint (TMJ) issues\n\n---\n\n### 2. Recommended Diagnostic Tests\n\n**Initial Evaluation:**\n- Detailed history (onset, duration, character, location, associated symptoms, triggers, relieving factors, family history, medication use, trauma, recent infections)\n- Physical examination (vital signs, neurological exam, fundoscopic exam, ENT and dental exam)\n\n**Further Investigations (if indicated by history/exam):**\n- CBC, CRP/ESR (if infection or inflammation suspected)\n- Lumbar puncture (if meningitis/encephalitis suspected)\n- Brain imaging (CT/MRI) if:\n  - Abnormal neurological findings\n  - Sudden, severe (\"worst ever\") headache\n  - Signs of raised intracranial pressure\n  - Headache worsening over time\n  - Headache with vomiting, visual changes, or altered consciousness\n\n---\n\n### 3. Urgency Level\n\n**Medium**  \n- Most headaches in this age group are benign, but a thorough assessment is needed to rule out serious causes.\n- **Urgency increases to High** if any red flags (see below) are present.\n\n---\n\n### 4. Key Observations and Clinical Notes\n\n- Isolated headache in a 13-year-old is most often due to benign causes (migraine, tension-type).\n- Lack of associated symptoms (fever, neck stiffness, vomiting, visual changes, altered consciousness) in the provided information.\n- No trauma or significant medical history provided.\n- Detailed history and examination are essential to guide further workup.\n\n---\n\n### 5. Red Flags to Watch For\n\n- Sudden onset, severe (\"thunderclap\") headache\n- Headache with fever, neck stiffness, photophobia (meningitis/encephalitis)\n- Headache with vomiting, especially in the morning or with position changes (raised intracranial pressure)\n- Focal neurological deficits (weakness, vision changes, altered consciousness)\n- Headache worsening over time or with exertion/coughing/straining\n- Headache after trauma\n- Headache with papilledema on fundoscopic exam\n- Immunosuppression or known malignancy\n\n---\n\n**Summary:**  \nA 13-year-old male presents with headache. Most likely causes are primary headache disorders, but secondary causes must be excluded, especially if red flags are present. Initial workup should focus on detailed history and examination, with further tests guided by findings. Urgency is medium unless red flags are identified, in which case urgent evaluation is warranted.\n\n**Recommendation:**  \nAdvise prompt clinical assessment by a healthcare professional to obtain a full history, perform a physical and neurological exam, and determine the need for further investigation.', 'Acidity', 'found nothing', 'Certainly. Here is a comprehensive, structured treatment plan for Mr Patient, a 13-year-old male presenting with headache, with no abnormal findings on initial evaluation and a possible diagnosis of \"acidity\" (likely referring to dyspepsia or gastroesophageal reflux as a possible trigger).\n\n---\n\n### 1. Primary Diagnosis\n\n**Primary Headache Disorder (most likely Tension-Type Headache or Migraine)**\n- With possible association to gastrointestinal symptoms (dyspepsia/\"acidity\") as a trigger.\n\n**Secondary causes have been considered and are less likely based on normal test results and absence of red flags.**\n\n---\n\n### 2. Treatment Goals\n\n- Relieve acute headache symptoms.\n- Prevent recurrence and reduce headache frequency/severity.\n- Identify and manage potential triggers (including gastrointestinal symptoms).\n- Minimize medication side effects and avoid medication overuse.\n- Educate patient and family on headache management and red flags.\n\n---\n\n### 3. Medication Recommendations\n\n**A. For Headache Relief:**\n- **Paracetamol (Acetaminophen):** 10–15 mg/kg per dose orally every 4–6 hours as needed (maximum 75 mg/kg/day, not to exceed 4 g/day).\n  - *OR*\n- **Ibuprofen:** 5–10 mg/kg per dose orally every 6–8 hours as needed (maximum 40 mg/kg/day, not to exceed 2.4 g/day).\n\n**B. For Associated \"Acidity\" (if symptoms of dyspepsia/reflux are present):**\n- **Antacid (e.g., Calcium carbonate or Magnesium hydroxide):** As per package instructions, short-term use.\n  - *OR*\n- **Proton Pump Inhibitor (PPI):** *Consider only if persistent symptoms and under medical supervision.*\n  - **Omeprazole:** 0.7–3.5 mg/kg/day orally, once daily (max 20 mg/day for children aged 1–16 years).\n\n**Note:** Avoid aspirin in children due to risk of Reye’s syndrome.\n\n---\n\n### 4. Non-Pharmacological Interventions\n\n- **Headache Diary:** Encourage patient to record headache frequency, duration, severity, and possible triggers (including foods, stress, sleep patterns).\n- **Hydration:** Ensure adequate fluid intake.\n- **Regular Meals:** Avoid skipping meals; limit caffeine and trigger foods (e.g., chocolate, processed foods).\n- **Sleep Hygiene:** Maintain consistent sleep schedule.\n- **Stress Management:** Teach relaxation techniques (deep breathing, mindfulness).\n- **Screen Time:** Limit excessive use of screens/devices.\n- **Posture:** Encourage good posture, especially during study or device use.\n- **Physical Activity:** Encourage regular exercise.\n\n---\n\n### 5. Follow-Up Schedule\n\n- **Initial follow-up:** 1–2 weeks to assess response to treatment and review headache diary.\n- **Subsequent follow-up:** Every 1–3 months, or sooner if symptoms worsen or red flags develop.\n- **Immediate review:** If any red flag symptoms occur (see below).\n\n---\n\n### 6. Monitoring Parameters\n\n- Headache frequency, duration, and severity (via diary).\n- Response to medications and any side effects.\n- Presence of new or worsening symptoms (especially red flags).\n- Impact on school attendance, activities, and quality of life.\n- Adherence to non-pharmacological strategies.\n\n---\n\n### 7. Patient Education Points\n\n- Most headaches in children are benign and manageable.\n- Importance of identifying and avoiding triggers.\n- Proper use of medications (do not exceed recommended dosages; avoid overuse).\n- When to seek urgent care (see red flags below).\n- Importance of regular follow-up.\n- Lifestyle modifications can significantly reduce headache frequency and severity.\n\n---\n\n### 8. Potential Complications to Watch For\n\n- Medication overuse headache (from frequent use of analgesics).\n- Development of chronic daily headache.\n- Adverse effects from medications (e.g., GI upset, allergic reactions).\n- Missed diagnosis of secondary headache (if new symptoms develop).\n- School absenteeism or impaired quality of life.\n\n**Red Flags—Seek Immediate Medical Attention if:**\n- Sudden, severe (\"worst ever\") headache.\n- Headache with fever, neck stiffness, photophobia, or altered mental status.\n- Persistent vomiting, especially in the morning.\n- Visual changes, double vision, or loss of vision.\n- Focal neurological deficits (weakness, numbness, difficulty speaking).\n- Headache after trauma.\n- Headache progressively worsening over days/weeks.\n\n---\n\n**Summary:**  \nMr Patient’s headache is most likely primary (tension-type or migraine), possibly triggered by gastrointestinal symptoms. Initial management is symptomatic, with attention to lifestyle and trigger identification. Close follow-up is essential to monitor for complications or evolving symptoms. Escalate care if red flags appear.\n\n**Always advise review by a healthcare professional for ongoing assessment and management.**', 'Certainly! Below is a sample professional prescription based on the provided treatment plan.  \n**Note:** This is a sample template. All prescriptions must be reviewed and signed by a licensed healthcare provider before dispensing.\n\n---\n\n**[Clinic Name / Logo]**  \n[Clinic Address]  \n[Clinic Phone Number]  \n\n---\n\n**Prescription**\n\n**Patient Name:** Mr Patient  \n**Age/Sex:** 13 years / Male  \n**Date:** 2025-09-06  \n**Prescription No.:** [To be filled by clinic]\n\n---\n\n**Diagnosis:**  \nPrimary Headache Disorder (Tension-Type or Migraine), possible dyspepsia (\"acidity\") as trigger\n\n---\n\n**Rx:**\n\n1. **Paracetamol 500 mg tablets**  \n   - **Dose:** 1 tablet orally every 4–6 hours as needed for headache  \n   - **Maximum:** Do not exceed 4 tablets (2 g) in 24 hours  \n   - **Duration:** 5 days as needed  \n   - **Instructions:** Take with food or water. Do not exceed recommended dose. If headache persists or worsens, seek medical advice.\n\n   *OR (if preferred/if not contraindicated):*\n\n   **Ibuprofen 200 mg tablets**  \n   - **Dose:** 1 tablet orally every 6–8 hours as needed for headache  \n   - **Maximum:** Do not exceed 6 tablets (1.2 g) in 24 hours  \n   - **Duration:** 5 days as needed  \n   - **Instructions:** Take with food. Do not exceed recommended dose. Avoid if history of allergy to NSAIDs or stomach ulcers.\n\n2. **Antacid Chewable Tablets (e.g., Calcium carbonate 500 mg)**  \n   - **Dose:** 1 tablet orally when experiencing acidity symptoms  \n   - **Maximum:** As per package instructions (do not exceed recommended dose)  \n   - **Duration:** As needed, up to 7 days  \n   - **Instructions:** Chew thoroughly. If symptoms persist >7 days, consult doctor.\n\n   *If symptoms of acidity/dyspepsia persist >7 days or are severe, consider:*\n\n   **Omeprazole 10 mg capsules**  \n   - **Dose:** 1 capsule orally once daily, 30 minutes before breakfast  \n   - **Duration:** 2 weeks  \n   - **Instructions:** Swallow whole with water. Do not crush or chew. Use only under medical supervision.\n\n---\n\n**Instructions for Patient/Parent:**\n\n- Keep a headache diary (record frequency, duration, severity, and possible triggers).\n- Maintain regular meals, hydration, and sleep schedule.\n- Limit caffeine and avoid known trigger foods.\n- Practice relaxation techniques and limit screen time.\n- Return for follow-up in 1–2 weeks or sooner if symptoms worsen.\n- **Seek immediate medical attention if any red flag symptoms develop:**  \n  - Sudden severe headache, persistent vomiting, visual changes, weakness, fever, neck stiffness, altered consciousness, or headache after trauma.\n\n---\n\n**Prescribing Physician:**  \n_____________________________  \n(Signature & Name)  \n[Medical Registration Number]  \n\n**Clinic Stamp:** ___________________  \n\n**Date:** 2025-09-06\n\n---\n\n**Note:**  \nThis prescription is valid only when signed by a licensed healthcare provider. Dosages may need adjustment based on patient’s weight and clinical response. Always consult your doctor or pharmacist before starting any new medication.  \n\n---', 992, 992, '2025-09-06 19:38:47', '2025-09-06 19:41:03', 98),
(2, 53, NULL, 'headace', '**Patient Information:**  \nName: Mr Patient  \nAge: 13 years  \nGender: Male  \nMedical History: Not specified (text appears non-informative)\n\n**Current Symptom:**  \nHeadache\n\n---\n\n### 1. Potential Differential Diagnoses\n\nIn a 13-year-old male presenting with headache, consider the following differentials:\n\n- **Primary Headaches**\n  - Migraine (with or without aura)\n  - Tension-type headache\n  - Cluster headache (less common in this age group)\n\n- **Secondary Headaches**\n  - Viral or bacterial infections (e.g., sinusitis, upper respiratory tract infection, meningitis)\n  - Medication overuse or withdrawal\n  - Refractive errors (visual strain)\n  - Trauma (concussion, subdural/epidural hematoma)\n  - Intracranial mass lesion (tumor, abscess)\n  - Idiopathic intracranial hypertension\n  - Hypertension\n  - Temporal arteritis (rare in this age group)\n  - Dental or temporomandibular joint (TMJ) issues\n\n---\n\n### 2. Recommended Diagnostic Tests\n\n**Initial evaluation should be guided by history and physical examination.**  \nBased on the limited information, consider:\n\n- **Basic Assessment:**\n  - Full neurological examination\n  - Vital signs (including blood pressure)\n  - Fundoscopy (to check for papilledema)\n  - Sinus examination\n\n- **Further Investigations (if indicated by history/exam):**\n  - CBC, CRP/ESR (if infection or inflammation suspected)\n  - Urinalysis (if systemic symptoms)\n  - CT/MRI brain (if red flags present or abnormal neuro exam)\n  - Lumbar puncture (if meningitis or subarachnoid hemorrhage suspected)\n  - Vision assessment (if visual symptoms)\n\n---\n\n### 3. Urgency Level\n\n**Low to Medium** (based on current information)\n\n- **Low** if headache is mild, intermittent, and not associated with red flags.\n- **Medium to High** if any red flags or abnormal findings are present (see below).\n\n---\n\n### 4. Key Observations and Clinical Notes\n\n- **History is critical:** Onset, duration, character, location, associated symptoms (nausea, vomiting, photophobia, phonophobia, visual changes, fever, neck stiffness, recent trauma, etc.).\n- **Family history:** Migraines, neurological disorders.\n- **Medication history:** Recent changes, overuse.\n- **Social/psychological factors:** School stress, sleep patterns.\n\n---\n\n### 5. Red Flags to Watch For\n\nImmediate further evaluation is warranted if any of the following are present:\n\n- Sudden, severe (\"thunderclap\") headache\n- Headache with fever, neck stiffness, photophobia (meningitis)\n- Focal neurological deficits (weakness, vision loss, altered consciousness)\n- Papilledema (suggesting raised intracranial pressure)\n- Headache worsened by Valsalva, lying down, or in the morning\n- Recent significant head trauma\n- Headache with vomiting, especially projectile\n- Change in headache pattern or progressively worsening headaches\n- Immunosuppression or known malignancy\n\n---\n\n**Summary:**  \nA 13-year-old male with headache requires a thorough history and physical examination to distinguish between primary and secondary causes. Most headaches in this age group are benign, but red flags must be excluded. If any concerning features are present, urgent neuroimaging and specialist referral are indicated.\n\n**Recommendation:**  \nEncourage prompt evaluation by a healthcare professional for detailed assessment and management.', 'acidity', 'no test reqiired', 'Certainly. Based on the information provided—13-year-old male, presenting with headache, and the clinical input suggesting “acidity” (likely referring to dyspepsia or gastroesophageal reflux as a possible etiology), with no tests required and no red flags identified—here is a comprehensive, structured treatment plan:\n\n---\n\n## 1. Primary Diagnosis\n\n**Probable Diagnosis:**  \n*Headache secondary to gastrointestinal acidity (dyspepsia-related headache)*\n\n- Other primary or secondary causes of headache appear less likely based on the absence of red flags and clinical input.\n- If symptoms change, further evaluation is warranted.\n\n---\n\n## 2. Treatment Goals\n\n- Relieve headache symptoms.\n- Address underlying gastrointestinal acidity.\n- Prevent recurrence.\n- Monitor for development of red flag symptoms.\n- Educate patient and family regarding symptom management and warning signs.\n\n---\n\n## 3. Medication Recommendations\n\n**A. For Headache Relief (as needed):**\n- **Paracetamol (Acetaminophen):**  \n  - Dose: 10–15 mg/kg per dose orally every 4–6 hours as needed (maximum 60 mg/kg/day or 3 g/day, whichever is lower).\n- **OR Ibuprofen:**  \n  - Dose: 5–10 mg/kg per dose orally every 6–8 hours as needed (maximum 40 mg/kg/day or 2.4 g/day, whichever is lower).\n- Avoid aspirin due to risk of Reye’s syndrome in children.\n\n**B. For Acidity (if symptoms of dyspepsia/reflux are present):**\n- **Antacid (e.g., calcium carbonate, magnesium hydroxide):**  \n  - Dose: As per product instructions, typically 5–10 mL orally as needed, not exceeding recommended daily dose.\n- **OR H2 Blocker (e.g., Ranitidine):**  \n  - Dose: 2–4 mg/kg/day in 1–2 divided doses (maximum 300 mg/day).\n- **OR Proton Pump Inhibitor (e.g., Omeprazole):**  \n  - Dose: 0.7–3.5 mg/kg/day orally, given once daily (maximum 20 mg/day for children 1–16 years).\n\n**Duration:**  \n- Symptomatic treatment for 3–7 days; reassess if symptoms persist or worsen.\n\n**Note:**  \n- Use the lowest effective dose for the shortest duration.\n- Avoid NSAIDs if GI symptoms are prominent.\n\n---\n\n## 4. Non-Pharmacological Interventions\n\n- **Lifestyle and Dietary Modifications:**\n  - Avoid trigger foods (spicy, fatty, acidic foods, caffeine, carbonated beverages).\n  - Encourage regular, small meals.\n  - Avoid eating late at night.\n  - Maintain adequate hydration.\n  - Encourage regular sleep patterns.\n- **Headache Hygiene:**\n  - Ensure adequate sleep and hydration.\n  - Encourage stress management and relaxation techniques.\n  - Limit screen time.\n- **Positioning:**\n  - Elevate head of bed if reflux symptoms are present.\n\n---\n\n## 5. Follow-up Schedule\n\n- **Initial follow-up:**  \n  - Within 1 week to assess symptom resolution.\n- **Earlier review:**  \n  - If symptoms worsen, new symptoms develop, or red flags appear.\n- **Ongoing:**  \n  - As needed, based on symptom recurrence or persistence.\n\n---\n\n## 6. Monitoring Parameters\n\n- Symptom diary (headache frequency, severity, duration, associated symptoms).\n- Monitor for side effects of medications (e.g., GI upset, allergic reactions).\n- Watch for development of red flag symptoms (see below).\n- Adherence to lifestyle modifications.\n\n---\n\n## 7. Patient Education Points\n\n- Explain the likely benign nature of symptoms based on current assessment.\n- Advise on proper medication use (dosage, frequency, duration).\n- Discuss dietary and lifestyle modifications to reduce acidity and prevent headaches.\n- Instruct to seek immediate medical attention if any of the following occur:\n  - Sudden, severe headache\n  - Persistent vomiting\n  - Visual changes\n  - Neck stiffness or photophobia\n  - Focal neurological deficits (weakness, numbness, speech changes)\n  - Altered consciousness\n  - Headache worsened by lying down or in the morning\n  - Any other concerning symptoms\n\n---\n\n## 8. Potential Complications to Watch For\n\n- Progression to chronic or recurrent headache\n- Medication overuse headache\n- Worsening or persistent GI symptoms (possible gastritis, ulceration)\n- Development of red flag symptoms indicating secondary headache (e.g., meningitis, intracranial pathology)\n- Adverse effects from medications (hepatic, renal, GI)\n\n---\n\n**Summary:**  \nThis 13-year-old male with headache likely secondary to acidity should be managed with supportive care, symptomatic medications, and lifestyle modifications. Close monitoring for red flag symptoms is essential. If symptoms persist or worsen, or if new concerning features develop, prompt re-evaluation and further investigation are warranted.\n\n**Always recommend consultation with a healthcare professional for ongoing assessment and management.**', 'Certainly! Below is a sample professional prescription based on your treatment plan. Please note: This is a template for educational purposes only. All prescriptions must be reviewed and signed by a licensed healthcare provider.\n\n---\n\n**[Clinic Name/Logo]**  \n[Clinic Address]  \n[Clinic Phone Number]  \n\n---\n\n**Patient Name:** Mr Patient  \n**Age/Sex:** 13 years / Male  \n**Date:** 2025-09-06  \n**Prescription No.:** 001-2025\n\n---\n\n### Prescription\n\n**1. Paracetamol 500 mg tablets**  \n- **Sig:** Take 1 tablet orally every 6 hours as needed for headache.  \n- **Maximum:** Do not exceed 4 doses (2 g) in 24 hours.  \n- **Duration:** Up to 5 days or as needed for symptom relief.\n\n**OR**\n\n**Ibuprofen 200 mg tablets**  \n- **Sig:** Take 1 tablet orally every 8 hours as needed for headache.  \n- **Maximum:** Do not exceed 3 doses (600 mg) in 24 hours.  \n- **Duration:** Up to 5 days or as needed for symptom relief.  \n- **Note:** Take with food. Avoid if stomach pain worsens.\n\n---\n\n**2. Antacid Suspension (e.g., Calcium Carbonate/Magnesium Hydroxide)**  \n- **Sig:** Take 10 mL orally as needed for acidity or stomach discomfort, up to 3 times daily.  \n- **Duration:** Up to 7 days.\n\n**OR**\n\n**Omeprazole 20 mg capsules**  \n- **Sig:** Take 1 capsule orally once daily, 30 minutes before breakfast.  \n- **Duration:** 7 days.  \n- **Note:** Swallow whole; do not crush or chew.\n\n---\n\n### Instructions\n\n- Use only one pain reliever (Paracetamol **or** Ibuprofen) as needed.\n- Use either antacid **or** omeprazole for acidity, not both.\n- Avoid spicy, fatty, or acidic foods; eat small, regular meals.\n- Maintain hydration and regular sleep.\n- Monitor for any side effects or new symptoms.\n- **Seek immediate medical attention if:** severe headache, persistent vomiting, visual changes, neck stiffness, weakness, or any new concerning symptoms develop.\n\n---\n\n**Follow-up:**  \nReturn to clinic in 1 week or sooner if symptoms worsen.\n\n---\n\n**Prescribing Physician:** ___________________________  \n**Signature:** ___________________________  \n**Date:** 2025-09-06\n\n---\n\n**[Clinic Stamp/Seal]**\n\n---\n\n**Note:** This prescription is valid only when signed by a licensed healthcare provider. Always consult your doctor before starting any new medication.', 992, 992, '2025-09-06 19:45:19', '2025-09-06 19:46:16', 98),
(3, 53, NULL, 'headace', '**Patient Information**  \nName: Mr Patient  \nAge: 13 years  \nGender: Male  \nMedical History: Not specified (entry \"dfgdfg\" is not interpretable)\n\n**Presenting Symptom:**  \n- Headache\n\n---\n\n### 1. Potential Differential Diagnoses\n\nIn a 13-year-old male presenting with headache, consider the following common and serious causes:\n\n**Primary Headache Disorders:**\n- Migraine (with or without aura)\n- Tension-type headache\n- Cluster headache (rare in this age group)\n\n**Secondary Headache Causes:**\n- Viral or bacterial infection (e.g., sinusitis, upper respiratory infection, meningitis)\n- Medication overuse or withdrawal\n- Refractive error (vision problems)\n- Trauma (concussion, subdural/epidural hematoma)\n- Intracranial mass or space-occupying lesion\n- Hypertension\n- Idiopathic intracranial hypertension (pseudotumor cerebri)\n- Dental problems (e.g., abscess)\n- Dehydration\n\n---\n\n### 2. Recommended Diagnostic Tests\n\n**Initial Evaluation:**\n- Thorough history and physical examination (including neurological exam, fundoscopic exam)\n- Assessment for associated symptoms: fever, neck stiffness, photophobia, vomiting, visual changes, altered mental status, recent trauma\n\n**Further Investigations (if indicated by history/exam):**\n- CBC, CRP, ESR (if infection or inflammation suspected)\n- Urinalysis (if systemic illness suspected)\n- Lumbar puncture (if meningitis/encephalitis suspected)\n- CT/MRI brain (if red flags present, abnormal neuro exam, or suspicion for mass/bleed)\n- Ophthalmologic evaluation (if visual symptoms or papilledema)\n- Blood pressure measurement\n\n---\n\n### 3. Urgency Level\n\n**Medium** (based on current information)\n\n- **High urgency** if any red flags (see below) are present.\n- **Low urgency** if headache is mild, intermittent, and without concerning features.\n\n---\n\n### 4. Key Observations and Clinical Notes\n\n- Symptom description is limited; further detail is needed regarding onset, duration, character, location, severity, aggravating/relieving factors, associated symptoms (fever, nausea, vomiting, photophobia, phonophobia, visual changes, neck stiffness, recent trauma, etc.).\n- No past medical history or medication use provided.\n- No mention of recent illness or trauma.\n- No neurological symptoms or signs described.\n\n---\n\n### 5. Red Flags to Watch For\n\nImmediate evaluation is warranted if any of the following are present:\n\n- Sudden, severe (\"worst ever\") headache\n- Headache with fever, neck stiffness, photophobia (meningitis/encephalitis)\n- Altered mental status, confusion, seizures\n- Focal neurological deficits (weakness, numbness, vision loss, ataxia)\n- Papilledema or visual changes\n- Headache triggered by Valsalva, cough, or exertion\n- Recent head trauma\n- Persistent vomiting\n- Headache waking patient from sleep or worse in the morning\n- Immunosuppression or known malignancy\n\n---\n\n**Summary:**  \nHeadache in a 13-year-old male is most often benign (migraine, tension-type), but secondary causes must be excluded, especially if red flags are present. A detailed history and physical examination are essential. If any red flags or abnormal findings are present, urgent neuroimaging and further workup are indicated.\n\n**Recommendation:**  \nObtain a detailed history and perform a focused physical and neurological examination. Escalate care if any red flags are identified. Always consult with a healthcare professional for diagnosis and management.', 'acidity', 'no test reqiired', 'Certainly. Based on the information provided:\n\n- **Patient:** 13-year-old male\n- **Presenting symptom:** Headache\n- **Doctor’s clinical input:** Acidity (suggesting a possible diagnosis of headache secondary to dyspepsia/gastritis/GERD)\n- **No red flags or abnormal findings reported**\n- **No tests required at this time**\n\n---\n\n## 1. Primary Diagnosis\n\n**Headache secondary to gastrointestinal acidity (dyspepsia/GERD-related headache)**\n\n- This is a diagnosis of exclusion; ensure no red flags or alternative causes are present.\n- If symptoms change or do not improve, reassess for primary headache disorders or secondary causes.\n\n---\n\n## 2. Treatment Goals\n\n- Relieve headache and associated gastrointestinal symptoms\n- Prevent recurrence\n- Identify and avoid triggers\n- Monitor for emergence of red flags or alternative diagnoses\n\n---\n\n## 3. Medication Recommendations\n\n### a. For Acidity (Dyspepsia/GERD)\n- **Proton Pump Inhibitor (PPI):**  \n  - *Omeprazole* 20 mg orally once daily, 30 minutes before breakfast, for 2–4 weeks  \n  - OR\n- **H2 Receptor Antagonist:**  \n  - *Ranitidine* 75–150 mg orally twice daily (if PPI not tolerated; note: ranitidine availability varies due to recalls)\n\n### b. For Headache (Symptomatic Relief)\n- **Acetaminophen (Paracetamol):**  \n  - 10–15 mg/kg per dose orally every 4–6 hours as needed (maximum 75 mg/kg/day, not exceeding 3,000 mg/day)\n  - *Avoid NSAIDs* if significant gastritis or peptic symptoms\n\n### c. *Avoid*:\n- NSAIDs (e.g., ibuprofen, aspirin) due to potential for worsening gastric symptoms\n\n---\n\n## 4. Non-Pharmacological Interventions\n\n- Encourage small, frequent meals; avoid large, fatty, or spicy meals\n- Avoid known triggers: carbonated drinks, caffeine, chocolate, citrus, tomato-based foods\n- Elevate head of bed if symptoms are worse at night\n- Encourage adequate hydration\n- Stress management techniques (relaxation, mindfulness)\n- Ensure regular sleep schedule\n- Limit screen time, especially before bed\n\n---\n\n## 5. Follow-up Schedule\n\n- **Initial follow-up:** 1–2 weeks to assess symptom resolution and medication tolerance\n- **Earlier review:** If symptoms worsen, new symptoms develop, or red flags appear\n- **Long-term:** If symptoms persist >4 weeks or recur frequently, consider referral to pediatrician or gastroenterologist\n\n---\n\n## 6. Monitoring Parameters\n\n- Resolution of headache and GI symptoms\n- Medication side effects (abdominal pain, diarrhea, rash, etc.)\n- Signs of GI bleeding (hematemesis, melena)\n- Emergence of red flag symptoms (see below)\n\n---\n\n## 7. Patient Education Points\n\n- Explain likely link between acidity and headache\n- Review medication use (dose, timing, duration)\n- Advise on dietary and lifestyle modifications\n- Warn about overuse of analgesics (risk of medication overuse headache)\n- Stress importance of reporting new or worsening symptoms\n- Encourage keeping a symptom diary (headache and GI symptoms, triggers)\n\n---\n\n## 8. Potential Complications to Watch For\n\n- Worsening headache or new neurological symptoms (vomiting, visual changes, weakness, confusion)\n- Persistent or severe abdominal pain, vomiting, GI bleeding\n- Medication side effects (allergic reaction, GI upset)\n- Medication overuse headache (if analgesics used excessively)\n\n---\n\n**Note:**  \nIf at any point the patient develops red flag symptoms (see above), urgent medical evaluation is required. If symptoms do not improve or alternative diagnosis is suspected, further workup (including neuroimaging, ophthalmology, or GI referral) may be needed.\n\n**Always consult with a healthcare professional for ongoing management and if there is any uncertainty about the diagnosis or treatment response.**', '**Prescription**\n\n---\n\n**Patient Name:** Mr Patient  \n**Age:** 13 years  \n**Gender:** Male  \n**Date:** 2025-09-06  \n**Prescription No.:** 001\n\n---\n\n**Diagnosis:**  \nHeadache secondary to gastrointestinal acidity (dyspepsia/GERD-related headache)\n\n---\n\n**Medications:**\n\n1. **Omeprazole 20 mg tablet**  \n   - Take 1 tablet by mouth once daily, 30 minutes before breakfast  \n   - Duration: 4 weeks  \n   - **Instructions:** Swallow whole with water. Do not crush or chew. Take at the same time each day.\n\n2. **Acetaminophen (Paracetamol) 500 mg tablet**  \n   - Take 1 tablet by mouth every 6 hours as needed for headache  \n   - Maximum: 4 tablets (2,000 mg) in 24 hours  \n   - Duration: As needed, up to 5 days  \n   - **Instructions:** Do not exceed the maximum daily dose. Take with a small amount of food if stomach upset occurs. Avoid using for more than 5 days without consulting your doctor.\n\n---\n\n**Lifestyle and Dietary Recommendations:**\n\n- Eat small, frequent meals; avoid large, fatty, or spicy foods.\n- Avoid carbonated drinks, caffeine, chocolate, citrus, and tomato-based foods.\n- Elevate the head of the bed if symptoms worsen at night.\n- Drink plenty of water.\n- Practice stress management (relaxation, mindfulness).\n- Maintain a regular sleep schedule.\n- Limit screen time, especially before bed.\n\n---\n\n**Precautions:**\n\n- Do **not** use NSAIDs (such as ibuprofen or aspirin).\n- Contact your doctor immediately if you develop severe headache, vomiting, vision changes, weakness, confusion, severe abdominal pain, vomiting blood, or black stools.\n- Report any medication side effects (rash, abdominal pain, diarrhea).\n- Keep a diary of headache and stomach symptoms and possible triggers.\n\n---\n\n**Follow-up:**  \nReturn for review in 1–2 weeks, or sooner if symptoms worsen or new symptoms develop.\n\n---\n\n**Doctor’s Signature:** ___________________________\n\n**Clinic Name:** _________________________________\n\n**Date:** 2025-09-06\n\n---', 992, 992, '2025-09-06 19:54:35', '2025-09-06 19:55:21', 98),
(4, 53, NULL, 'headace', '**Patient Analysis**\n\n**Patient Information:**  \n- Name: Mr Patient  \n- Age: 13 years  \n- Gender: Male  \n- Medical History: Not specified (text appears as \"dfgdfg\"; please clarify if possible)\n\n**Presenting Symptom:**  \n- Headache\n\n---\n\n### 1. Potential Differential Diagnoses\n\nFor a 13-year-old male presenting with headache, consider the following common and serious causes:\n\n**Primary Headache Disorders:**\n- Migraine (with or without aura)\n- Tension-type headache\n- Cluster headache (less common in this age group)\n\n**Secondary Headache Causes:**\n- Viral or bacterial infection (e.g., sinusitis, upper respiratory infection, meningitis)\n- Medication overuse headache\n- Vision problems (refractive errors)\n- Trauma (concussion, subdural/epidural hematoma)\n- Intracranial mass lesion (rare, but important to rule out)\n- Hypertension\n- Dehydration\n- Sleep disorders\n- Dental issues (e.g., temporomandibular joint dysfunction)\n\n---\n\n### 2. Recommended Diagnostic Tests\n\n**Initial Workup:**\n- Detailed history and physical examination (including neurological exam)\n- Assessment of headache characteristics: onset, duration, frequency, severity, location, associated symptoms (nausea, vomiting, photophobia, phonophobia, visual changes, fever, neck stiffness, recent trauma, etc.)\n\n**Further Investigations (if indicated by history/exam):**\n- Fundoscopy (to check for papilledema)\n- Blood pressure measurement\n- Vision assessment\n- Sinus examination\n\n**If red flags or abnormal findings are present:**\n- Neuroimaging (MRI or CT brain)\n- Lumbar puncture (if meningitis or subarachnoid hemorrhage suspected)\n- Laboratory tests (CBC, CRP/ESR, electrolytes, as indicated)\n\n---\n\n### 3. Urgency Level\n\n**Medium** (based on current information)\n\n- If headache is isolated, with no red flags or abnormal neurological findings, this is generally a medium urgency case.\n- If any red flags (see below) are present, urgency increases to **High**.\n\n---\n\n### 4. Key Observations and Clinical Notes\n\n- The description is limited; additional history is essential.\n- Assess for associated symptoms: fever, neck stiffness, photophobia, vomiting, altered mental status, recent trauma, visual changes, or focal neurological deficits.\n- Evaluate for chronicity and pattern (acute, recurrent, chronic).\n- Family history of migraine or other headache disorders.\n- Medication and substance use history.\n- Psychosocial factors (school stress, sleep, etc.).\n\n---\n\n### 5. Red Flags to Watch For\n\n- Sudden, severe (\"thunderclap\") headache\n- Headache with fever, neck stiffness, photophobia (meningitis/encephalitis)\n- Altered mental status, confusion, or seizures\n- Focal neurological deficits (weakness, vision loss, ataxia)\n- Persistent vomiting\n- Papilledema (suggests increased intracranial pressure)\n- Recent head trauma\n- Headache that awakens from sleep or is worse in the morning\n- Immunosuppression or history of malignancy\n\n---\n\n**Summary:**  \nA 13-year-old male with headache requires a thorough history and examination to distinguish between primary and secondary causes. Most headaches in this age group are benign, but vigilance for red flags is crucial. If any concerning features are present, urgent evaluation and neuroimaging may be warranted.\n\n**Recommendation:**  \nAdvise prompt clinical assessment by a healthcare professional for further evaluation and management.', 'acidity', 'no test reqiired', '**Comprehensive Treatment Plan for Mr Patient (13-year-old Male with Headache, Likely Related to Acidity)**\n\n---\n\n### 1. Primary Diagnosis\n\n**Probable Diagnosis:**  \nGastroesophageal reflux disease (GERD)-related headache (headache associated with gastric acidity/dyspepsia).\n\n**Rationale:**  \n- Headache is the presenting symptom.\n- Clinical input suggests \"acidity\" as a likely cause.\n- No red flags or need for further testing identified.\n- No evidence of primary neurological pathology or infection based on available information.\n\n---\n\n### 2. Treatment Goals\n\n- Relieve headache and associated gastrointestinal symptoms.\n- Prevent recurrence by addressing underlying gastric acidity.\n- Rule out and monitor for any red flag symptoms.\n- Educate patient and family regarding symptom management and when to seek urgent care.\n\n---\n\n### 3. Medication Recommendations\n\n**A. For Gastric Acidity:**\n- **Antacid (short-term relief):**  \n  - E.g., Calcium carbonate (Tums): 500–1000 mg orally as needed, up to 2–3 times daily.\n- **H2 Receptor Antagonist:**  \n  - Ranitidine (if available): 75–150 mg orally once or twice daily for 1–2 weeks.  \n  - *Note: Ranitidine availability varies due to regulatory issues; consider alternatives if not available.*\n- **Proton Pump Inhibitor (PPI) (if symptoms persist):**  \n  - Omeprazole: 10–20 mg orally once daily for 2–4 weeks.\n\n**B. For Headache (if needed):**\n- **Acetaminophen:** 10–15 mg/kg/dose orally every 4–6 hours as needed (maximum 75 mg/kg/day or 3 g/day).\n- **Avoid NSAIDs** if significant gastric symptoms are present.\n\n**Duration:**  \n- Short-term (1–2 weeks) for acute management; reassess if symptoms persist.\n\n---\n\n### 4. Non-Pharmacological Interventions\n\n- **Dietary Modifications:**\n  - Avoid spicy, acidic, or fatty foods.\n  - Limit caffeine and carbonated beverages.\n  - Eat smaller, more frequent meals.\n  - Avoid eating within 2–3 hours of bedtime.\n- **Lifestyle:**\n  - Elevate head of bed if symptoms worsen at night.\n  - Encourage adequate hydration.\n  - Promote regular sleep schedule.\n  - Manage stress (school, social factors).\n- **Headache Hygiene:**\n  - Ensure regular meals and sleep.\n  - Limit screen time.\n  - Encourage physical activity.\n\n---\n\n### 5. Follow-Up Schedule\n\n- **Initial follow-up:** 1–2 weeks to assess symptom resolution.\n- **Earlier review:** If symptoms worsen, new symptoms develop, or red flags appear.\n- **Long-term:** As needed, based on symptom recurrence or persistence.\n\n---\n\n### 6. Monitoring Parameters\n\n- Symptom diary: Track frequency, severity, and triggers of headaches and gastric symptoms.\n- Monitor for adverse effects of medications (e.g., constipation with antacids, abdominal pain with PPIs).\n- Watch for red flag symptoms (see below).\n- Assess for improvement in quality of life and school attendance.\n\n---\n\n### 7. Patient Education Points\n\n- Explain the likely link between gastric acidity and headache.\n- Review medication use, dosing, and potential side effects.\n- Emphasize importance of dietary and lifestyle modifications.\n- Advise on headache triggers and avoidance strategies.\n- Instruct on when to seek urgent medical attention (see red flags below).\n- Reassure about the generally benign nature of symptoms if no red flags are present.\n\n---\n\n### 8. Potential Complications to Watch For\n\n- Worsening or persistent headache despite therapy.\n- Development of red flag symptoms:\n  - Sudden, severe headache (“worst ever”)\n  - Headache with fever, neck stiffness, photophobia\n  - Persistent vomiting\n  - Altered mental status, confusion, seizures\n  - Focal neurological deficits\n  - Visual changes\n  - Headache waking from sleep or worse in the morning\n- Gastrointestinal bleeding (hematemesis, melena)\n- Medication side effects (e.g., constipation, abdominal pain)\n\n---\n\n**Summary:**  \nMr Patient’s headache is likely related to gastric acidity. Initial management should focus on symptom relief, lifestyle and dietary modifications, and monitoring for complications. If symptoms persist or red flags develop, re-evaluation and further investigation are warranted.\n\n**Note:**  \nThis plan is based on the information provided. A thorough clinical assessment is essential. Always consult a healthcare professional for definitive diagnosis and management.', 'Medications:\n1. Omeprazole 20 mg - Take 1 tablet by mouth once daily - 2 weeks\n2. Acetaminophen 500 mg - Take 1 tablet by mouth every 6 hours as needed for headache (do not exceed 4 tablets in 24 hours) - As needed\n\nInstructions:\n- Take omeprazole in the morning, at least 30 minutes before breakfast.\n- Take acetaminophen with a glass of water; do not take more than recommended.\n- Avoid spicy, acidic, and fatty foods.\n- Eat smaller, more frequent meals and avoid eating within 2–3 hours of bedtime.\n- Drink plenty of water and maintain a regular sleep schedule.\n\nPrecautions:\n- Do not use ibuprofen or other NSAIDs while you have gastric symptoms.\n- Contact your healthcare provider if you experience severe or worsening headache, vomiting, vision changes, confusion, or black/tarry stools.', 992, 992, '2025-09-06 19:58:34', '2025-09-06 20:02:13', 98),
(5, 53, NULL, 'Insomnia', '**Patient Analysis: Insomnia**\n\n**Patient Information:**  \n- Name: Mr Patient  \n- Age: 13 years  \n- Gender: Male  \n- Medical History: Not specified (entered as \"dfgdfg\")\n\n**Current Symptom:**  \n- Insomnia\n\n---\n\n### 1. Potential Differential Diagnoses\n\nFor a 13-year-old male presenting with insomnia, consider the following:\n\n- **Primary sleep disorders:**  \n  - Delayed sleep phase syndrome (common in adolescents)  \n  - Restless leg syndrome  \n  - Obstructive sleep apnea (less common but possible)\n\n- **Psychiatric/psychological causes:**  \n  - Anxiety disorders  \n  - Depression  \n  - Adjustment disorder (e.g., stress from school or social situations)\n\n- **Medical causes:**  \n  - Hyperthyroidism  \n  - Asthma or allergies causing nocturnal symptoms  \n  - Chronic pain\n\n- **Medication/substance-related:**  \n  - Stimulant use (including caffeine, ADHD medications)  \n  - Illicit substance use\n\n- **Environmental/behavioral:**  \n  - Poor sleep hygiene (e.g., excessive screen time before bed)  \n  - Irregular sleep schedule\n\n---\n\n### 2. Recommended Diagnostic Tests\n\n- **Clinical assessment:**  \n  - Detailed sleep history (onset, duration, pattern, sleep environment, bedtime routine)  \n  - Review of systems (for psychiatric, respiratory, or endocrine symptoms)  \n  - Medication and substance use history  \n  - Family/social history\n\n- **Screening tools:**  \n  - Sleep diary (1-2 weeks)  \n  - Pediatric Sleep Questionnaire  \n  - Screening for depression/anxiety (e.g., PHQ-9, GAD-7 for adolescents)\n\n- **Physical examination:**  \n  - General exam, including ENT (for signs of sleep apnea), neurological, and thyroid assessment\n\n- **Laboratory tests (if indicated by history/exam):**  \n  - Thyroid function tests  \n  - CBC (if restless leg syndrome suspected, to check for iron deficiency)\n\n- **Further studies (if indicated):**  \n  - Polysomnography (if sleep apnea or periodic limb movement disorder suspected)\n\n---\n\n### 3. Urgency Level\n\n**Medium**  \n- Insomnia in adolescents is common but can significantly impact functioning, mood, and academic performance.  \n- If associated with severe mood symptoms, suicidality, or significant daytime impairment, urgency increases to **High**.\n\n---\n\n### 4. Key Observations and Clinical Notes\n\n- Insomnia in adolescents is often multifactorial; a thorough history is essential.\n- Consider behavioral and environmental causes first, as these are most common.\n- Screen for depression/anxiety, as these are frequently associated with insomnia in this age group.\n- Assess for signs of sleep-disordered breathing or other medical conditions if suggested by history/exam.\n- Family and school stressors should be explored.\n\n---\n\n### 5. Red Flags to Watch For\n\n- **Suicidal ideation or severe depression**\n- **Hallucinations, mania, or psychosis**\n- **Significant weight loss, night sweats, or systemic symptoms**\n- **Symptoms suggestive of sleep apnea (e.g., loud snoring, witnessed apneas, daytime somnolence)**\n- **Unexplained neurological findings**\n- **Substance abuse**\n\n---\n\n**Note:**  \nThis analysis is based on the limited information provided. A comprehensive evaluation by a healthcare professional is essential to determine the underlying cause and appropriate management.', 'Late night food', 'no test required', 'Certainly. Here is a comprehensive, structured treatment plan for Mr Patient, a 13-year-old male with insomnia, based on the information provided:\n\n---\n\n## 1. Primary Diagnosis\n\n**Likely Diagnosis:**  \n*Behavioral (psychophysiological) insomnia, likely related to poor sleep hygiene (late-night eating), in an adolescent.*\n\n- No evidence of underlying medical, psychiatric, or primary sleep disorder based on current information.\n- No red flags or need for urgent testing at this time.\n\n---\n\n## 2. Treatment Goals\n\n- Restore healthy, age-appropriate sleep duration and quality.\n- Minimize daytime impairment (fatigue, mood, cognitive function).\n- Address and modify contributing behavioral/environmental factors.\n- Prevent chronic insomnia and associated complications.\n\n---\n\n## 3. Medication Recommendations\n\n**First-line:**  \n- **No pharmacological therapy recommended initially.**  \n  - Evidence supports behavioral interventions as first-line in pediatric insomnia.\n  - Medications are reserved for refractory cases or when insomnia is secondary to another disorder.\n\n**If non-pharmacological measures fail after several weeks and insomnia is severe:**  \n- Consider short-term melatonin (off-label in children, discuss risks/benefits with family):\n  - **Melatonin:** 1–3 mg orally, 30–60 minutes before desired bedtime, for up to 2–4 weeks.\n  - Use lowest effective dose; discontinue if ineffective.\n  - Monitor for side effects (headache, dizziness, nausea, morning drowsiness).\n\n**Note:**  \n- Avoid sedative-hypnotics, benzodiazepines, or antihistamines in adolescents due to safety concerns and lack of evidence.\n\n---\n\n## 4. Non-Pharmacological Interventions\n\n**A. Sleep Hygiene Education**\n- Establish a consistent bedtime and wake time, even on weekends.\n- Avoid late-night eating/snacking; finish meals at least 2–3 hours before bedtime.\n- Limit caffeine and stimulant intake, especially after noon.\n- Eliminate screen time (phones, computers, TV) at least 1 hour before bedtime.\n- Create a comfortable, dark, quiet, and cool sleep environment.\n- Use the bed only for sleep (not for studying or screen use).\n- Encourage relaxing pre-sleep routines (reading, quiet music, mindfulness).\n\n**B. Cognitive-Behavioral Strategies**\n- If available, refer for **Cognitive Behavioral Therapy for Insomnia (CBT-I)** adapted for adolescents.\n- Address maladaptive beliefs about sleep (e.g., anxiety about not falling asleep).\n\n**C. Address Contributing Factors**\n- Screen for and address stressors (school, social, family).\n- Encourage regular daytime physical activity, but avoid vigorous exercise within 2 hours of bedtime.\n\n---\n\n## 5. Follow-up Schedule\n\n- **Initial follow-up:** 2–4 weeks after intervention initiation.\n- **Subsequent follow-ups:** Every 4–6 weeks until resolution or stabilization.\n- **Earlier review:** If symptoms worsen, red flags develop, or significant daytime impairment persists.\n\n---\n\n## 6. Monitoring Parameters\n\n- **Sleep diary:** Track bedtime, wake time, sleep onset latency, night awakenings, total sleep time.\n- **Daytime functioning:** School performance, mood, behavior, energy.\n- **Adherence:** To sleep hygiene and behavioral recommendations.\n- **Side effects:** If melatonin or other interventions are used.\n- **Emergence of red flags:** As listed below.\n\n---\n\n## 7. Patient Education Points\n\n- Insomnia is common in adolescents and often related to behavioral/environmental factors.\n- Good sleep hygiene is the cornerstone of treatment.\n- Avoid late-night eating, caffeine, and screen use before bed.\n- Regular routines help reset the body’s internal clock.\n- Medications are rarely needed and should only be used under medical supervision.\n- Seek help if symptoms worsen, mood changes, or if there are concerns about safety.\n\n---\n\n## 8. Potential Complications to Watch For\n\n- **Mood disturbances:** Depression, anxiety, irritability.\n- **Academic decline:** Poor concentration, memory issues, declining grades.\n- **Behavioral problems:** Increased risk-taking, social withdrawal.\n- **Physical health:** Headaches, fatigue, weakened immune response.\n- **Progression:** Development of chronic insomnia or other sleep disorders.\n- **Emergence of red flags:** Suicidal ideation, psychosis, significant weight loss, symptoms of sleep apnea, substance use.\n\n---\n\n**Summary:**  \nMr Patient’s insomnia is most likely behavioral and related to poor sleep hygiene (late-night eating). The primary approach is non-pharmacological, focusing on sleep hygiene and behavioral modification. Medication (melatonin) may be considered only if non-pharmacological measures fail and insomnia is severe. Close follow-up and monitoring for complications or red flags is essential.\n\n**Always consult with a pediatrician or sleep specialist for ongoing evaluation and management.**', 'Medications:\n1. Melatonin - 1 mg orally - 30 to 60 minutes before bedtime - For up to 2–4 weeks if non-pharmacological measures fail and insomnia is severe\n\nInstructions:\n- Take melatonin at the same time each night, 30 to 60 minutes before your desired bedtime.\n- Use the lowest effective dose. Stop if not effective after 1–2 weeks.\n- Keep a sleep diary to track bedtime, wake time, and sleep quality.\n\nPrecautions:\n- Do not exceed the recommended dose.\n- Watch for side effects such as headache, dizziness, nausea, or morning drowsiness.\n- Avoid caffeine and screen use at least 1 hour before bedtime.\n- Maintain regular sleep and wake times, and avoid late-night eating.', 992, 992, '2025-09-06 20:02:55', '2025-09-06 20:03:53', 98);
INSERT INTO `treatment_plans` (`id`, `patient_id`, `doctor_id`, `symptoms`, `symptom_analysis`, `doctor_input`, `test_results`, `treatment_plan`, `prescription`, `created_by`, `updated_by`, `created_at`, `updated_at`, `hospital_id`) VALUES
(6, 53, '44', 'headache', '**Patient Analysis: Headache in 13-year-old Male**\n\n---\n\n**1. Potential Differential Diagnoses**\n\n- **Primary Headache Disorders**\n  - Migraine (with or without aura)\n  - Tension-type headache\n  - Cluster headache (less common in this age group)\n\n- **Secondary Headache Causes**\n  - Sinusitis\n  - Viral or bacterial infections (e.g., upper respiratory tract infection, meningitis)\n  - Medication overuse or withdrawal\n  - Trauma (recent head injury)\n  - Vision problems (refractive errors)\n  - Intracranial pathology (tumor, hydrocephalus, idiopathic intracranial hypertension)\n  - Hypertension\n  - Dental issues (malocclusion, abscess)\n  - Sleep disorders\n\n---\n\n**2. Recommended Diagnostic Tests**\n\n- **Initial Evaluation**\n  - Detailed history and physical/neurological examination\n  - Headache diary (onset, duration, frequency, triggers, associated symptoms)\n\n- **Further Investigations (if indicated by history/exam or red flags)**\n  - Neuroimaging (MRI or CT head): If abnormal neurological findings, sudden onset (\"thunderclap\" headache), or suspicion of secondary causes\n  - Lumbar puncture: If meningitis, encephalitis, or subarachnoid hemorrhage suspected\n  - Sinus imaging: If sinusitis suspected\n  - Vision assessment: Eye examination, refraction test\n  - Blood pressure measurement\n  - Laboratory tests: CBC, CRP/ESR (if infection or inflammatory process suspected)\n\n---\n\n**3. Urgency Level**\n\n- **Medium** (based on current information)\n  - If only headache is present without red flags or abnormal findings, outpatient evaluation is appropriate.\n  - **Escalate to High** if any red flags (see below) are present.\n\n---\n\n**4. Key Observations and Clinical Notes**\n\n- Age-appropriate causes (primary headaches, infection, vision issues) should be considered.\n- Lack of detailed history (onset, duration, associated symptoms, family history, trauma, medication use) limits specificity.\n- No mention of fever, neck stiffness, altered mental status, vomiting, visual changes, or focal neurological deficits.\n- Medical history is unclear (\"dfgdfg\"); further clarification needed.\n- A thorough history and physical exam are essential to guide further workup.\n\n---\n\n**5. Red Flags to Watch For**\n\n- Sudden, severe onset (\"worst headache of my life\")\n- Headache with fever, neck stiffness, photophobia (meningitis/encephalitis)\n- Altered mental status, confusion, seizures\n- Focal neurological deficits (weakness, numbness, vision loss)\n- Papilledema (on fundoscopy)\n- Headache worse with Valsalva, lying down, or in the morning (raised intracranial pressure)\n- Recent head trauma\n- Headache associated with vomiting (especially without nausea)\n- Immunosuppression or known malignancy\n- Age <6 years (increased risk for secondary causes)\n- Progressive worsening over time\n\n---\n\n**Summary:**  \nThis is a 13-year-old male presenting with headache. The most common causes are primary headache disorders, but secondary causes must be excluded, especially if red flags are present. A detailed history and physical examination are crucial. If any red flags develop, urgent evaluation is warranted. Otherwise, outpatient workup is appropriate.\n\n**Recommendation:**  \nAdvise prompt evaluation by a healthcare professional for further assessment and management.', 'none', '', 'Certainly. Below is a comprehensive treatment plan for a 13-year-old male presenting with headache, based on the provided information and current evidence-based guidelines.\n\n---\n\n## 1. Primary Diagnosis\n\n**Provisional Diagnosis:**  \n*Primary headache disorder* (most likely migraine or tension-type headache), pending further evaluation.\n\n**Note:**  \nSecondary causes must be excluded, especially in the presence of red flags or abnormal findings.\n\n---\n\n## 2. Treatment Goals\n\n- Relieve acute headache symptoms\n- Prevent recurrence and reduce headache frequency/severity\n- Minimize medication side effects and risk of medication overuse headache\n- Identify and manage potential triggers\n- Maintain normal school attendance and activities\n- Monitor for development of red flag symptoms\n\n---\n\n## 3. Medication Recommendations\n\n**A. Acute (Abortive) Treatment**  \n*For infrequent, moderate-to-severe headaches interfering with activities:*\n\n- **Acetaminophen (Paracetamol):**  \n  - Dose: 10–15 mg/kg per dose, every 4–6 hours as needed (max 75 mg/kg/day; do not exceed 4 g/day)\n- **Ibuprofen:**  \n  - Dose: 10 mg/kg per dose, every 6–8 hours as needed (max 40 mg/kg/day; do not exceed 2.4 g/day)\n- **Consider triptans** (e.g., sumatriptan nasal spray) if migraine is diagnosed and refractory to above, under specialist guidance.\n\n**B. Preventive (Prophylactic) Treatment**  \n*Not indicated unless headaches are frequent (>4/month), disabling, or not responsive to acute therapy. If needed, options include:*\n\n- **Amitriptyline:** 0.25–1 mg/kg at bedtime (start low, titrate up)\n- **Topiramate or propranolol:** Consider in consultation with pediatric neurology\n\n**C. Avoid:**\n- Opioids and combination analgesics (risk of overuse and side effects)\n- Frequent use of acute medications (>2–3 days/week) to prevent medication overuse headache\n\n---\n\n## 4. Non-Pharmacological Interventions\n\n- **Headache diary:** Track frequency, duration, triggers, and response to treatment\n- **Lifestyle modifications:**\n  - Regular sleep schedule\n  - Hydration (adequate fluid intake)\n  - Balanced diet, regular meals\n  - Regular physical activity\n  - Stress management/relaxation techniques (e.g., cognitive-behavioral therapy, biofeedback)\n- **Trigger identification and avoidance:** e.g., certain foods, dehydration, stress, screen time\n- **Vision assessment:** Ensure up-to-date vision correction if needed\n\n---\n\n## 5. Follow-up Schedule\n\n- **Initial follow-up:** 2–4 weeks after starting treatment or sooner if symptoms worsen\n- **Ongoing:** Every 3–6 months if stable, or as needed based on symptom control\n- **Urgent review:** If red flag symptoms develop or headaches worsen/progress\n\n---\n\n## 6. Monitoring Parameters\n\n- Headache frequency, duration, and severity (via diary)\n- Medication use (to avoid overuse)\n- Side effects of medications\n- School attendance and participation in activities\n- Signs of secondary headache (see red flags below)\n\n---\n\n## 7. Patient Education Points\n\n- Importance of keeping a headache diary\n- Recognizing and avoiding triggers\n- Proper use of medications (dose, frequency, risks of overuse)\n- When to seek urgent medical attention (see red flags)\n- Role of lifestyle factors in headache management\n- Reassurance regarding prognosis (most primary headaches improve with age and management)\n\n---\n\n## 8. Potential Complications to Watch For\n\n- **Medication overuse headache** (from frequent analgesic use)\n- **Progression to chronic daily headache**\n- **Development of red flag symptoms** (suggesting secondary cause):\n  - Sudden, severe headache\n  - Headache with fever, neck stiffness, altered mental status, or visual changes\n  - Focal neurological deficits\n  - Persistent vomiting\n  - Headache worsening with Valsalva or lying down\n  - Recent head trauma\n- **Impaired school performance or attendance**\n- **Psychological impact** (anxiety, depression)\n\n---\n\n**Note:**  \nThis plan is based on initial presentation and should be adapted as more clinical information becomes available. Always recommend a thorough evaluation by a healthcare professional to confirm diagnosis and guide management.\n\n---\n\n**References:**\n- American Academy of Neurology/Child Neurology Society Guidelines: Pharmacologic Treatment of Pediatric Migraine Headache (2019)\n- NICE Clinical Knowledge Summaries: Headache – children\n- UpToDate: Approach to the child with headache\n\n---\n\n**Consultation with a pediatrician or pediatric neurologist is recommended for confirmation of diagnosis, ongoing management, and if any red flags or atypical features are present.**', 'Medications:\n1. Acetaminophen (Paracetamol) 500 mg tablets – 1 tablet by mouth every 4–6 hours as needed for headache – Do not exceed 4 doses in 24 hours\n\nInstructions:\n- Take with a full glass of water. May take with food if stomach upset occurs.\n- Keep a headache diary to track frequency, duration, and possible triggers.\n- Maintain a regular sleep schedule, eat balanced meals, stay hydrated, and limit screen time.\n\nPrecautions:\n- Do not take more than 4 doses (2,000 mg) of acetaminophen in 24 hours.\n- Avoid using pain medication more than 2–3 days per week to prevent medication overuse headache.\n- Seek medical attention if headaches become severe, occur with fever, neck stiffness, vision changes, weakness, or persistent vomiting.', 992, 992, '2025-09-06 20:20:48', '2025-09-06 20:21:23', 98),
(7, 53, '44', 'Headache', '**Patient Analysis: Headache in a 13-year-old Male**\n\n---\n\n### 1. Potential Differential Diagnoses\n\nGiven the limited information, the following are common and important causes of headache in adolescents:\n\n- **Primary Headache Disorders**\n  - Migraine (with or without aura)\n  - Tension-type headache\n  - Cluster headache (less common in this age group)\n- **Secondary Headache Causes**\n  - Viral or bacterial infections (e.g., sinusitis, meningitis)\n  - Medication overuse headache\n  - Refractive errors (vision problems)\n  - Trauma (concussion, subdural hematoma)\n  - Intracranial mass or space-occupying lesion\n  - Idiopathic intracranial hypertension\n  - Hypertension\n  - Dental or temporomandibular joint (TMJ) disorders\n\n---\n\n### 2. Recommended Diagnostic Tests\n\n**Initial Evaluation:**\n- Detailed history (onset, duration, character, associated symptoms, triggers, family history)\n- Physical examination (including neurological and fundoscopic exam)\n\n**Based on findings, consider:**\n- **Basic investigations:**\n  - CBC, ESR/CRP (if infection or inflammation suspected)\n  - Urinalysis (if systemic illness suspected)\n- **Imaging:**\n  - MRI or CT brain (if red flags present or abnormal neurological findings)\n- **Other:**\n  - Vision assessment (if visual symptoms)\n  - Lumbar puncture (if meningitis or increased intracranial pressure suspected)\n\n---\n\n### 3. Urgency Level\n\n- **Low**: If headache is mild, intermittent, and not associated with red flags.\n- **Medium**: If headache is moderate, persistent, or associated with mild systemic symptoms.\n- **High**: If any red flags are present (see below), or if there is acute onset severe headache.\n\n---\n\n### 4. Key Observations and Clinical Notes\n\n- **Age**: 13 years, adolescent, common age for onset of primary headache disorders (migraine, tension-type).\n- **Gender**: Male (slightly less common for migraine compared to females, but still possible).\n- **History**: No relevant past medical history provided.\n- **Symptoms**: Only \"headache\" reported; no details on duration, severity, frequency, associated symptoms (nausea, vomiting, photophobia, phonophobia, visual changes, fever, neck stiffness, trauma, etc.).\n- **Clinical Note**: Further history and examination are essential to narrow the differential. Inquire about recent infections, trauma, family history of headaches, medication use, and psychosocial factors.\n\n---\n\n### 5. Red Flags to Watch For\n\nImmediate attention is required if any of the following are present:\n\n- Sudden onset \"thunderclap\" headache (worst ever)\n- Headache with fever, neck stiffness, photophobia (meningitis/encephalitis)\n- Altered mental status, seizures, focal neurological deficits\n- Papilledema or visual changes\n- Headache worse with Valsalva or lying down (raised intracranial pressure)\n- Recent head trauma\n- Headache waking the patient from sleep or worse in the morning\n- Immunosuppression or known malignancy\n\n---\n\n**Summary:**  \nHeadache in a 13-year-old male is most commonly due to primary headache disorders, but secondary causes must be excluded, especially if red flags are present. A thorough history and physical examination are critical. If any red flags or abnormal findings are present, urgent neuroimaging and further workup are warranted.\n\n**Recommendation:**  \nConsult a healthcare professional for a comprehensive evaluation and management.', '', '', 'Certainly. Below is a comprehensive, structured treatment plan for **Mr Patient**, a 13-year-old male presenting with headache, based on the information provided and standard clinical guidelines. This plan assumes no red flags or abnormal findings are present. If any red flags arise, immediate escalation and further workup are required.\n\n---\n\n## 1. Primary Diagnosis\n\n**Provisional Diagnosis:**  \n*Primary headache disorder* (most likely migraine or tension-type headache), pending further history and examination.\n\n---\n\n## 2. Treatment Goals\n\n- Relieve acute headache symptoms\n- Prevent recurrence or reduce frequency/severity of headaches\n- Minimize medication side effects and avoid medication overuse\n- Identify and manage potential triggers\n- Exclude secondary causes, especially those requiring urgent intervention\n- Maintain normal school, social, and physical activities\n\n---\n\n## 3. Medication Recommendations\n\n**A. Acute Treatment (as needed for headache attacks):**\n\n- **Acetaminophen (Paracetamol):**  \n  - Dose: 10–15 mg/kg orally every 4–6 hours as needed (maximum 75 mg/kg/day or 4 g/day, whichever is lower)\n- **OR Ibuprofen:**  \n  - Dose: 10 mg/kg orally every 6–8 hours as needed (maximum 40 mg/kg/day or 2.4 g/day, whichever is lower)\n- **Consider triptans** (e.g., sumatriptan nasal spray 5–20 mg, max 40 mg/day) *if diagnosis of migraine is confirmed and OTC analgesics are ineffective; only under specialist supervision in pediatric patients.*\n\n**B. Preventive (Prophylactic) Treatment:**  \n- Not indicated unless headaches are frequent (≥4/month), disabling, or unresponsive to acute therapy.\n- Options (to be initiated by a specialist):  \n  - Amitriptyline, topiramate, or propranolol (dosing and selection individualized; not started without specialist input).\n\n**C. Duration:**  \n- Acute medications: Use at onset of headache, limit to ≤2–3 days/week to avoid medication overuse headache.\n\n---\n\n## 4. Non-Pharmacological Interventions\n\n- **Lifestyle modifications:**\n  - Maintain regular sleep schedule\n  - Hydration: Encourage adequate fluid intake\n  - Regular meals, avoid skipping breakfast\n  - Limit caffeine and avoid known dietary triggers\n  - Encourage regular physical activity\n- **Headache diary:**  \n  - Record frequency, duration, severity, potential triggers, and response to treatment\n- **Stress management:**  \n  - Relaxation techniques, cognitive behavioral therapy (CBT) if stress or anxiety is a factor\n- **Screen time:**  \n  - Limit excessive use of screens/devices\n\n---\n\n## 5. Follow-up Schedule\n\n- **Initial follow-up:** 2–4 weeks after starting treatment or sooner if symptoms worsen\n- **Subsequent follow-up:** Every 2–3 months, or as needed based on symptom control\n- **Urgent review:** If red flag symptoms develop\n\n---\n\n## 6. Monitoring Parameters\n\n- Headache frequency, severity, and duration (via diary)\n- Medication use (to avoid overuse)\n- Side effects of medications\n- School attendance and participation in activities\n- Signs of secondary headache/red flags\n\n---\n\n## 7. Patient Education Points\n\n- Most headaches in adolescents are benign and manageable\n- Importance of regular routines (sleep, meals, hydration)\n- Avoid overuse of pain medications\n- Recognize and report red flag symptoms (see below)\n- Use headache diary to help identify triggers and monitor progress\n- When to seek immediate medical attention\n\n---\n\n## 8. Potential Complications to Watch For\n\n- **Medication overuse headache** (from frequent analgesic use)\n- **Progression to chronic daily headache**\n- **Impact on school performance and psychosocial well-being**\n- **Development of secondary headache** (if underlying cause missed)\n- **Adverse effects from medications** (e.g., GI upset, drowsiness)\n\n---\n\n### **Red Flags (Seek Immediate Medical Attention if):**\n\n- Sudden, severe (\"worst ever\") headache\n- Headache with fever, neck stiffness, photophobia\n- Altered consciousness, seizures, focal neurological deficits\n- Persistent vomiting, visual changes, papilledema\n- Headache worse with lying down or Valsalva\n- Headache after head trauma\n- Headache waking from sleep or worse in the morning\n\n---\n\n**Note:**  \nThis plan should be individualized based on further clinical assessment and test results. Consultation with a pediatrician or pediatric neurologist is recommended for diagnostic uncertainty, frequent or severe headaches, or if preventive therapy is considered.\n\n---\n\n**References:**  \n- American Academy of Neurology/American Headache Society Guidelines (2019)\n- NICE Clinical Knowledge Summaries: Headache – children (2022)\n- UpToDate: Approach to the child with headache (2023)\n\n---\n\n**Always consult a healthcare professional for diagnosis and tailored management.**', 'Medications:\n1. Acetaminophen (Paracetamol) - 500 mg orally - Every 4–6 hours as needed for headache - Maximum 5 doses in 24 hours, use for up to 3 days per week\n\nInstructions:\n- Take with a full glass of water. May take with food if stomach upset occurs.\n- Do not exceed the maximum daily dose (75 mg/kg/day or 4 g/day, whichever is lower).\n- Use at the onset of headache. If headache persists or worsens, seek medical advice.\n- Keep a headache diary to track frequency, severity, and possible triggers.\n\nPrecautions:\n- Do not use acetaminophen more than 2–3 days per week to avoid medication overuse headache.\n- Seek immediate medical attention if headache is sudden and severe, associated with fever, neck stiffness, vomiting, vision changes, weakness, or confusion.\n- Maintain regular sleep, meals, hydration, and limit screen time. Avoid known headache triggers.', 992, 992, '2025-09-06 20:25:37', '2025-09-06 20:26:20', 98),
(8, 53, '44', 'headache', '**Patient Analysis: Headache in a 13-year-old Male**\n\n---\n\n**1. Potential Differential Diagnoses**\n\n- **Primary Headache Disorders**\n  - Migraine (with or without aura)\n  - Tension-type headache\n  - Cluster headache (less common in this age group)\n\n- **Secondary Headache Causes**\n  - Sinusitis\n  - Viral or bacterial infections (e.g., upper respiratory tract infection, meningitis)\n  - Medication overuse headache\n  - Refractive errors (vision problems)\n  - Trauma/concussion\n  - Intracranial pathology (e.g., brain tumor, hydrocephalus, idiopathic intracranial hypertension)\n  - Hypertension\n  - Dehydration\n\n---\n\n**2. Recommended Diagnostic Tests**\n\n*Based on initial presentation of isolated headache, further history and physical examination are essential. Consider:*\n\n- **Basic Workup**\n  - Complete neurological examination\n  - Vital signs (including blood pressure)\n  - Fundoscopic exam (to assess for papilledema)\n  - Assessment for sinus tenderness, neck stiffness\n\n- **If Red Flags or Abnormal Findings:**\n  - Brain imaging (MRI preferred, CT if urgent)\n  - Lumbar puncture (if meningitis or subarachnoid hemorrhage suspected)\n  - Laboratory tests (CBC, CRP/ESR if infection or inflammation suspected)\n  - Vision assessment (refraction, fundoscopy)\n\n---\n\n**3. Urgency Level**\n\n- **Low to Medium** (based on current information: isolated headache, no red flags provided)\n- **High** if any red flags or abnormal neurological findings are present (see below)\n\n---\n\n**4. Key Observations and Clinical Notes**\n\n- Age: 13 years (adolescent)\n- Gender: Male\n- Symptom: Headache (no further details provided)\n- Medical history: Not contributory (no relevant history provided)\n- *Critical missing information*: Onset, duration, frequency, severity, associated symptoms (nausea, vomiting, photophobia, phonophobia, visual changes, fever, neck stiffness, recent trauma, changes in consciousness), family history of migraine, medication use.\n\n---\n\n**5. Red Flags to Watch For**\n\n- Sudden, severe (\"thunderclap\") headache\n- Headache with fever, neck stiffness, photophobia (meningitis/encephalitis)\n- Focal neurological deficits (weakness, numbness, vision loss, ataxia)\n- Altered mental status, confusion, seizures\n- Papilledema (suggests raised intracranial pressure)\n- Headache worse with lying down, coughing, or Valsalva\n- Recent head trauma\n- Persistent vomiting\n- Headache awakening from sleep or worse in the morning\n- Immunosuppression or cancer history\n\n---\n\n**Summary:**  \nThis adolescent male presents with headache. In the absence of further details or red flags, primary headache disorders (migraine, tension-type) are most likely, but secondary causes must be considered. A thorough history and physical examination are essential. If any red flags are identified, urgent neuroimaging and further workup are warranted. Always recommend prompt evaluation by a healthcare professional for proper diagnosis and management.', '', '', 'Certainly. Below is a comprehensive, evidence-based treatment plan for a 13-year-old male presenting with headache, based on the information provided and in the absence of red flag symptoms or abnormal findings.\n\n---\n\n**1. Primary Diagnosis**  \n*Most likely:*  \n- **Primary Headache Disorder** (Migraine or Tension-Type Headache)  \n*Secondary causes must be excluded by thorough history and examination.*\n\n---\n\n**2. Treatment Goals**\n- Relieve acute headache pain and associated symptoms\n- Minimize headache frequency and severity\n- Prevent headache-related disability (school absence, activity limitation)\n- Identify and manage potential secondary causes\n- Educate patient and family on headache management and red flag symptoms\n\n---\n\n**3. Medication Recommendations**  \n*Assuming no contraindications, allergies, or red flags. Adjust based on clinical findings and patient response.*\n\n**Acute Treatment:**  \n- **Acetaminophen**: 10–15 mg/kg/dose PO every 4–6 hours as needed (max 75 mg/kg/day or 3,000 mg/day)\n- **OR Ibuprofen**: 10 mg/kg/dose PO every 6–8 hours as needed (max 40 mg/kg/day or 2,400 mg/day)\n- **If migraine suspected and not relieved by above:**  \n  - **Sumatriptan nasal spray**: 5–20 mg (based on weight), may repeat once in 2 hours if needed (max 40 mg/24h). *Triptans are approved for adolescents with migraine; use with caution and under specialist guidance.*\n\n**Prophylactic Treatment:**  \n- Not indicated unless headaches are frequent/severe/disabling and not controlled with acute therapy. Consider referral to neurology for prophylactic options (e.g., amitriptyline, propranolol, topiramate).\n\n**Other Considerations:**  \n- Avoid medication overuse (limit acute medications to ≤2–3 days/week).\n\n---\n\n**4. Non-Pharmacological Interventions**\n- **Lifestyle modifications:**\n  - Regular sleep schedule\n  - Adequate hydration\n  - Balanced diet, regular meals\n  - Stress management techniques (relaxation, mindfulness)\n  - Regular physical activity\n- **Headache diary:** Track frequency, severity, triggers, response to treatment\n- **Trigger identification and avoidance:** (e.g., certain foods, dehydration, stress, screen time)\n- **Cold compress or rest in a quiet, dark room** during acute attacks\n\n---\n\n**5. Follow-up Schedule**\n- **Initial follow-up:** 1–2 weeks to assess response to treatment and review headache diary\n- **Subsequent follow-up:** Every 1–3 months, or sooner if symptoms worsen or new symptoms develop\n- **Urgent reassessment:** If red flag symptoms develop at any time\n\n---\n\n**6. Monitoring Parameters**\n- Headache frequency, duration, and severity (via diary)\n- Response to acute and preventive treatments\n- Medication use (to avoid overuse)\n- School attendance and participation in activities\n- Emergence of red flag symptoms or medication side effects\n\n---\n\n**7. Patient Education Points**\n- Importance of regular routines (sleep, meals, hydration)\n- Proper use and dosing of medications\n- Recognition of headache triggers and avoidance strategies\n- When to seek urgent care (see red flags below)\n- Risks of medication overuse headache\n- Reassurance regarding benign nature of most primary headaches in this age group\n\n---\n\n**8. Potential Complications to Watch For**\n- Medication overuse headache\n- Development of chronic daily headache\n- Impact on school performance and psychosocial functioning\n- Emergence of red flag symptoms indicating secondary causes:\n  - Sudden severe headache\n  - Headache with fever, neck stiffness, altered mental status\n  - Focal neurological deficits\n  - Persistent vomiting\n  - Headache waking from sleep or worsening in the morning\n  - Visual changes, papilledema\n\n---\n\n**Note:**  \n- If any red flag symptoms are present or develop, or if the headache is atypical, severe, or refractory to initial management, urgent referral to a pediatrician or neurologist and further diagnostic workup (including neuroimaging) is warranted.\n- This plan should be individualized based on further clinical assessment.\n\n**Always recommend evaluation and ongoing management by a healthcare professional.**', 'Medications:\n1. Acetaminophen - 10–15 mg per kg per dose by mouth every 4–6 hours as needed for headache - Do not exceed 75 mg per kg per day or 3,000 mg per day - As needed\n\nInstructions:\n- Take with a full glass of water. May take with food if stomach upset occurs.\n- Use only when headache is present. Do not use more than 2–3 days per week to avoid medication overuse headache.\n- Keep a headache diary to track frequency, severity, and possible triggers.\n\nPrecautions:\n- Do not exceed the maximum daily dose.\n- Seek medical attention if headaches worsen, become more frequent, or if new symptoms such as fever, neck stiffness, vision changes, persistent vomiting, or weakness develop.', 992, 992, '2025-09-06 20:31:21', '2025-09-06 20:31:48', 98),
(9, 53, '44', 'Headace', '**Patient Analysis**\n\n**Patient Information:**  \n- Name: Mr Patient  \n- Age: 13 years  \n- Gender: Male  \n- Medical History: Not specified (text appears as \"dfgdfg\")  \n\n**Presenting Symptom:**  \n- Headache  \n\n---\n\n### 1. Potential Differential Diagnoses\n\nGiven the limited information, but considering the age (adolescent male) and isolated headache, differential diagnoses include:\n\n- **Primary Headache Disorders**\n  - Migraine (with or without aura)\n  - Tension-type headache\n  - Cluster headache (less common in this age group)\n\n- **Secondary Headache Causes**\n  - Viral or bacterial infection (e.g., sinusitis, upper respiratory tract infection, meningitis)\n  - Medication overuse headache\n  - Refractive error (vision problems)\n  - Trauma (concussion, subdural hematoma)\n  - Intracranial mass or space-occupying lesion (rare, but important to consider)\n  - Hypertension\n  - Dehydration\n  - Dental or temporomandibular joint (TMJ) issues\n\n---\n\n### 2. Recommended Diagnostic Tests\n\n**Initial Evaluation:**\n- Detailed history and physical examination, including:\n  - Onset, duration, location, character, and severity of headache\n  - Associated symptoms (nausea, vomiting, photophobia, phonophobia, visual changes, fever, neck stiffness, altered mental status)\n  - Triggers and relieving factors\n  - Family history of headaches/migraines\n  - Recent trauma or illness\n\n**Further Investigations (if indicated by history/exam):**\n- **Ophthalmologic assessment:** Visual acuity, fundoscopic exam\n- **Blood pressure measurement**\n- **Laboratory tests:** CBC, CRP/ESR (if infection or inflammation suspected)\n- **Neuroimaging (CT/MRI):** If red flags present (see below)\n- **Lumbar puncture:** If meningitis or subarachnoid hemorrhage suspected\n\n---\n\n### 3. Urgency Level\n\n- **Low** if headache is mild, chronic, and not associated with red flag symptoms.\n- **Medium to High** if any red flags are present (see below), or if headache is acute, severe, or associated with systemic or neurological symptoms.\n\n---\n\n### 4. Key Observations and Clinical Notes\n\n- **Age-appropriate causes:** Migraine and tension-type headaches are common in adolescents.\n- **Lack of medical history:** No prior conditions noted; further history needed.\n- **Single symptom:** Isolated headache without additional symptoms provided.\n- **History is critical:** Need to clarify onset, pattern, associated symptoms, and any recent trauma or illness.\n\n---\n\n### 5. Red Flags to Watch For\n\nImmediate evaluation is warranted if any of the following are present:\n\n- Sudden, severe (\"thunderclap\") headache\n- Headache with fever, neck stiffness, photophobia (meningitis)\n- Altered mental status, confusion, or loss of consciousness\n- Focal neurological deficits (weakness, vision changes, difficulty speaking)\n- Papilledema (suggesting increased intracranial pressure)\n- Headache worsened by Valsalva maneuver (coughing, straining)\n- Recent head trauma\n- Headache that awakens the patient from sleep or is worse in the morning\n- New onset headache in a patient with cancer, immunosuppression, or coagulopathy\n\n---\n\n**Summary:**  \nThis adolescent male presents with headache. The differential is broad, but primary headache disorders are most likely. Careful history and examination are essential to rule out secondary causes and red flags. If any red flag symptoms are present, urgent evaluation and neuroimaging are indicated.\n\n**Recommendation:**  \nObtain a detailed history and perform a focused neurological examination. If red flags are present, escalate care immediately. Otherwise, manage as per primary headache protocols and monitor for progression or new symptoms.\n\n**Note:** This analysis does not replace clinical judgment or a face-to-face assessment. Please consult a healthcare professional for definitive diagnosis and management.', NULL, NULL, NULL, NULL, 992, NULL, '2025-09-07 01:51:10', NULL, 98),
(10, 53, '44', 'Could Fever ', '**Patient Information**  \n- Name: Mr Patient  \n- Age: 13 years  \n- Gender: Male  \n- Medical History: Not specified (text \"dfgdfg\" is not interpretable)\n\n**Current Symptoms**  \n- Fever (no further details provided)\n\n---\n\n### 1. Potential Differential Diagnoses\n\nGiven the limited information (fever in a 13-year-old male), the differential is broad. Common and serious causes include:\n\n- **Viral infections**: Influenza, adenovirus, enterovirus, Epstein-Barr virus (EBV/mononucleosis), COVID-19\n- **Bacterial infections**: Streptococcal pharyngitis, urinary tract infection, pneumonia, meningitis, osteomyelitis, septic arthritis\n- **Other infectious causes**: Tuberculosis, malaria (if relevant travel history), tick-borne diseases\n- **Non-infectious causes**: Autoimmune diseases (e.g., juvenile idiopathic arthritis, SLE), malignancy (e.g., leukemia, lymphoma), drug fever\n- **Miscellaneous**: Heat-related illness, inflammatory conditions\n\n**Note:** The differential would be refined with more information (duration, associated symptoms, exposures, travel, vaccination status, etc.).\n\n---\n\n### 2. Recommended Diagnostic Tests\n\n**Initial basic workup (if no clear source is identified):**\n- Complete blood count (CBC) with differential\n- C-reactive protein (CRP) and/or erythrocyte sedimentation rate (ESR)\n- Blood cultures (if febrile >38.5°C or appears unwell)\n- Urinalysis ± urine culture\n- Chest X-ray (if respiratory symptoms)\n- Throat swab (if sore throat)\n- Rapid antigen/RT-PCR for COVID-19 and influenza (if seasonally appropriate)\n- Liver and renal function tests (if systemic illness suspected)\n\n**Further tests as indicated by clinical findings:**\n- Lumbar puncture (if signs of meningitis)\n- Serology for EBV, CMV, etc.\n- Imaging (ultrasound, CT) if localized symptoms or concern for abscess\n\n---\n\n### 3. Urgency Level\n\n**Medium**  \n- Fever in an adolescent is common and often benign, but the urgency increases if the patient appears toxic, has persistent high fever, or develops concerning symptoms (see red flags below).\n\n---\n\n### 4. Key Observations and Clinical Notes\n\n- **History**: Duration of fever, associated symptoms (cough, sore throat, rash, headache, abdominal pain, dysuria, joint pain, etc.), recent exposures, travel history, vaccination status, recent medications, underlying conditions.\n- **Physical exam**: General appearance (well vs. toxic), vital signs (especially heart rate, blood pressure, respiratory rate), hydration status, focus of infection (ENT, chest, abdomen, joints, skin, neurologic).\n- **Monitoring**: Reassess frequently for progression or new symptoms.\n\n---\n\n### 5. Red Flags to Watch For\n\n- Altered mental status, lethargy, irritability\n- Persistent vomiting, inability to tolerate fluids\n- Signs of meningitis (neck stiffness, photophobia, severe headache)\n- Respiratory distress (tachypnea, retractions, cyanosis)\n- Petechial or purpuric rash\n- Severe abdominal pain, distension\n- Signs of shock (tachycardia, hypotension, poor perfusion)\n- Seizures\n\n---\n\n**Summary:**  \nFever in a 13-year-old male is most commonly due to viral or bacterial infection, but a thorough history and physical are essential to rule out serious causes. Initial workup should be guided by clinical findings. Monitor closely for red flags and escalate care if any are present.\n\n**Note:** This analysis is based on limited information. A comprehensive clinical assessment is essential. Please consult a healthcare professional for further evaluation and management.', NULL, NULL, NULL, 'I\'m sorry, but I need the specific treatment plan or diagnosis to generate a prescription. Please provide the treatment plan or condition to proceed.', 992, 992, '2025-09-07 14:52:37', '2025-09-07 14:53:13', 98),
(11, 53, '44', 'fever, pain, vertigo', '**Patient Analysis**\n\n**Patient Information:**  \n- Name: Mr Patient  \n- Age: 13 years  \n- Gender: Male  \n- Medical History: Not specified (entered as \"dfgdfg\")\n\n**Current Symptoms:**  \n- Fever  \n- Pain (location not specified)  \n- Vertigo  \n\n---\n\n### 1. Potential Differential Diagnoses\n\nGiven the combination of fever, pain, and vertigo in a 13-year-old male, possible etiologies include:\n\n**Infectious Causes:**\n- **Acute Otitis Media or Labyrinthitis:** Infection of the middle or inner ear can cause fever, ear pain, and vertigo.\n- **Meningitis/Encephalitis:** CNS infections can present with fever, headache/pain, and vertigo.\n- **Viral Illness (e.g., Influenza):** Systemic viral infections may cause these symptoms.\n- **Mastoiditis:** Complication of otitis media, can present with pain (mastoid region), fever, and vertigo.\n\n**Non-Infectious Causes:**\n- **Migraine (Vestibular Migraine):** Can present with vertigo, pain (headache), and sometimes low-grade fever.\n- **Autoimmune Inner Ear Disease:** Rare, but possible in this age group.\n\n**Other:**\n- **Trauma:** If recent head injury, could present with pain, vertigo, and fever (if secondary infection).\n- **Medication Reaction or Toxin Exposure:** Less likely but possible.\n\n---\n\n### 2. Recommended Diagnostic Tests\n\n- **Physical Examination:** Full neurological and ENT exam (focus on ear, mastoid, nuchal rigidity, focal deficits).\n- **Vital Signs:** Monitor for hemodynamic instability.\n- **Laboratory Tests:**\n  - CBC with differential\n  - CRP/ESR\n  - Blood cultures (if sepsis suspected)\n- **Imaging:**\n  - Head CT/MRI (if CNS infection, trauma, or mastoiditis suspected)\n- **Lumbar Puncture:** If meningitis/encephalitis suspected (after imaging if indicated)\n- **Ear Swab/Culture:** If otitis media/labyrinthitis suspected\n- **Urinalysis:** To rule out systemic infection\n\n---\n\n### 3. Urgency Level\n\n**High**  \n- The combination of fever, pain, and vertigo in a child may indicate a serious infection (e.g., CNS infection, mastoiditis, labyrinthitis) or other acute pathology. Immediate evaluation is warranted.\n\n---\n\n### 4. Key Observations and Clinical Notes\n\n- **Symptom Onset & Duration:** Not specified—important to clarify.\n- **Pain Location:** Not specified—clarify (head, ear, neck, generalized).\n- **Associated Symptoms:** Nausea, vomiting, photophobia, neck stiffness, altered mental status, hearing loss, rash, recent infections or trauma.\n- **Immunization Status:** Not specified—important for risk assessment (e.g., meningococcal, pneumococcal, Hib).\n- **Recent Illnesses or Exposures:** Not specified.\n\n---\n\n### 5. Red Flags to Watch For\n\n- **Altered mental status or confusion**\n- **Neck stiffness or photophobia**\n- **Severe headache**\n- **Focal neurological deficits**\n- **Severe ear pain, swelling behind the ear (mastoiditis)**\n- **Persistent vomiting or inability to tolerate fluids**\n- **Rapidly worsening symptoms**\n- **Signs of sepsis (tachycardia, hypotension, mottled skin)**\n\n---\n\n**Summary:**  \nThis presentation is concerning for a potentially serious underlying condition, such as CNS infection or complicated ear infection. Immediate clinical assessment is required. Stabilize airway, breathing, and circulation as needed, and initiate urgent diagnostic workup and empiric therapy if indicated.\n\n**Recommendation:**  \nAdvise immediate evaluation in an emergency or acute care setting.', '', '', 'Certainly. Based on the information provided, this is a 13-year-old male presenting with **fever, pain (location unspecified), and vertigo**. There is no detailed medical history, but the constellation of symptoms is concerning for a potentially serious infection or acute neurological process. Below is a comprehensive, structured treatment plan, assuming the most likely and urgent diagnosis is **acute bacterial labyrinthitis (inner ear infection) or CNS infection (e.g., meningitis)** until proven otherwise. This plan should be adapted as further clinical and diagnostic information becomes available.\n\n---\n\n## 1. Primary Diagnosis\n\n**Most likely:**  \n- **Acute Bacterial Labyrinthitis** (inner ear infection involving the vestibular system, often post-otitis media)  \n**Rule out:**  \n- **Acute Bacterial Meningitis**  \n- **Mastoiditis**  \n- **Other CNS infection or complication**\n\n---\n\n## 2. Treatment Goals\n\n- Rapidly identify and treat the underlying infection\n- Prevent neurological and auditory complications\n- Alleviate symptoms (fever, pain, vertigo)\n- Monitor for and manage complications (e.g., sepsis, hearing loss, intracranial extension)\n- Provide supportive care and patient/family education\n\n---\n\n## 3. Medication Recommendations\n\n**Empiric Antimicrobial Therapy (pending cultures):**\n\n- **If Bacterial Labyrinthitis or Mastoiditis suspected:**\n  - **IV Ceftriaxone**: 50–75 mg/kg/dose every 12 hours (max 2 g/dose)\n  - **PLUS** **IV Vancomycin**: 15 mg/kg/dose every 6–12 hours (adjust for renal function; target trough 15–20 mcg/mL)\n  - **Consider adding Metronidazole** (30 mg/kg/day divided q8h, max 500 mg q8h) if intracranial extension or anaerobic coverage needed\n\n- **If Meningitis suspected:**\n  - **IV Ceftriaxone**: 100 mg/kg/day divided q12h (max 2 g q12h)\n  - **IV Vancomycin**: as above\n  - **Consider IV Dexamethasone**: 0.15 mg/kg every 6 hours for 2–4 days (start before or with first antibiotic dose, especially if S. pneumoniae suspected)\n\n**Symptomatic Management:**\n- **Antipyretics:** Acetaminophen 10–15 mg/kg/dose q4–6h PRN (max 75 mg/kg/day)\n- **Analgesia:** Ibuprofen 10 mg/kg/dose q6–8h PRN (max 40 mg/kg/day)\n- **Antiemetics:** Ondansetron 0.15 mg/kg/dose q8h PRN (max 8 mg/dose)\n- **Vestibular suppressants:** Use with caution in children; generally avoid unless severe, short-term use only (e.g., meclizine, not first-line)\n\n**Adjust antibiotics based on culture and sensitivity results.**\n\n---\n\n## 4. Non-Pharmacological Interventions\n\n- **Hospital admission** for IV therapy, monitoring, and further workup\n- **Bed rest** in a quiet, darkened room to minimize vertigo\n- **Hydration:** IV fluids if unable to tolerate oral intake\n- **Elevation of head** to reduce intracranial pressure if CNS involvement suspected\n- **Monitor airway, breathing, and circulation**; provide oxygen if hypoxic\n\n---\n\n## 5. Follow-Up Schedule\n\n- **Inpatient:**  \n  - Continuous monitoring (vital signs, neurological status, fluid balance)\n  - Daily review by pediatric infectious diseases/neurology/ENT as appropriate\n- **After discharge:**  \n  - Outpatient follow-up within 1 week, or sooner if symptoms recur/worsen\n  - Audiology assessment if labyrinthitis or hearing loss suspected\n  - Repeat imaging or labs as clinically indicated\n\n---\n\n## 6. Monitoring Parameters\n\n- **Clinical:**  \n  - Vital signs (fever, tachycardia, hypotension)\n  - Neurological status (GCS, focal deficits, mental status)\n  - Hearing and vestibular function\n  - Pain and vertigo severity\n- **Laboratory:**  \n  - CBC, CRP/ESR, renal and liver function tests\n  - Blood cultures, CSF analysis (if performed)\n  - Drug levels (if on vancomycin)\n- **Imaging:**  \n  - Repeat if clinical deterioration or lack of improvement\n\n---\n\n## 7. Patient Education Points\n\n- **Explain the seriousness** of the condition and need for urgent treatment\n- **Importance of completing the full course** of antibiotics, even if symptoms improve\n- **Signs of worsening:** confusion, persistent vomiting, new rash, severe headache, neck stiffness, hearing loss, or any new neurological symptoms—seek immediate care\n- **Infection control:** hand hygiene, avoid sharing personal items\n- **Follow-up:** stress the importance of attending all follow-up appointments, especially audiology if inner ear involvement\n\n---\n\n## 8. Potential Complications to Watch For\n\n- **Sepsis and shock**\n- **Intracranial extension:** brain abscess, subdural empyema\n- **Permanent hearing loss**\n- **Persistent vertigo or balance problems**\n- **Facial nerve palsy (if mastoiditis or severe otitis media)**\n- **Hydrocephalus (if CNS infection)**\n- **Medication side effects:** nephrotoxicity (vancomycin), allergic reactions\n\n---\n\n**Summary:**  \nThis is a potentially life-threatening presentation. Immediate hospital-based evaluation and management are required. Empiric broad-spectrum IV antibiotics should be started after appropriate cultures are obtained. The treatment plan should be refined as more diagnostic data become available.\n\n**Note:**  \nThis plan is for informational purposes and should be tailored by the treating physician based on the evolving clinical picture and diagnostic findings.\n\n---\n\n**Always consult with a pediatric infectious disease specialist, neurologist, and/or ENT as appropriate.**', 'Medications:\n1. Ceftriaxone IV - 75 mg/kg/dose (max 2 g/dose) - every 12 hours - 10 days\n2. Vancomycin IV - 15 mg/kg/dose - every 8 hours - 10 days\n3. Acetaminophen - 15 mg/kg/dose - every 6 hours as needed for fever or pain - up to 5 days\n4. Ondansetron - 0.15 mg/kg/dose (max 8 mg/dose) - every 8 hours as needed for nausea - up to 3 days\n\nInstructions:\n- Take acetaminophen with food or milk to avoid stomach upset.\n- Ondansetron can be taken with or without food.\n- Complete the full course of all antibiotics, even if symptoms improve.\n- Notify the care team immediately if you notice any new symptoms such as rash, confusion, severe headache, neck stiffness, hearing loss, or worsening dizziness.\n\nPrecautions:\n- Monitor for signs of allergic reaction (rash, swelling, difficulty breathing) and seek immediate medical attention if they occur.\n- Report any decrease in urine output, unusual bruising, or persistent vomiting to your healthcare provider.\n- Stay well hydrated and rest in a quiet, dark room to help with vertigo.\n- Do not drive, bike, or operate machinery until cleared by your doctor due to risk of dizziness and vertigo.', 992, 992, '2025-09-07 16:53:09', '2025-09-07 16:55:48', 98);
INSERT INTO `treatment_plans` (`id`, `patient_id`, `doctor_id`, `symptoms`, `symptom_analysis`, `doctor_input`, `test_results`, `treatment_plan`, `prescription`, `created_by`, `updated_by`, `created_at`, `updated_at`, `hospital_id`) VALUES
(12, 53, '44', 'lower backpain, weight loss', '**Patient Analysis**\n\n**Patient Information:**  \n- Name: Mr Patient  \n- Age: 13 years  \n- Gender: Male  \n- Medical History: Not specified (unclear, \"dfgdfg\"—assume no significant history provided)\n\n**Current Symptoms:**  \n- Lower back pain  \n- Weight loss\n\n---\n\n### 1. Potential Differential Diagnoses\n\nGiven the age (adolescent male), lower back pain, and weight loss, consider the following:\n\n**A. Infectious Causes**\n- Spinal osteomyelitis/discitis (bacterial or TB)\n- Epidural abscess\n\n**B. Malignancy**\n- Leukemia/lymphoma\n- Primary bone tumors (e.g., Ewing sarcoma, osteosarcoma)\n- Metastatic disease (rare but possible in certain pediatric cancers)\n\n**C. Inflammatory/Autoimmune**\n- Juvenile idiopathic arthritis (enthesitis-related)\n- Spondyloarthropathy (e.g., ankylosing spondylitis)\n\n**D. Other**\n- Chronic infection (e.g., tuberculosis)\n- Endocrine/metabolic (e.g., diabetes, hyperthyroidism—less likely with back pain as a primary symptom)\n- Non-organic (psychogenic)—less likely with weight loss\n\n---\n\n### 2. Recommended Diagnostic Tests\n\n**Initial Workup:**\n- **Physical examination:** Full neurological and musculoskeletal assessment\n- **Basic labs:** CBC with differential, ESR, CRP, renal and liver function, urinalysis\n- **Blood cultures** if infection suspected\n- **Imaging:**\n  - X-ray of lumbar spine\n  - MRI spine (with contrast if infection or malignancy suspected)\n- **Other:**\n  - Tuberculin skin test/IGRA if TB risk\n  - Consider bone marrow biopsy if malignancy suspected\n\n---\n\n### 3. Urgency Level\n\n**High**\n\n- The combination of lower back pain and unexplained weight loss in an adolescent is concerning for serious underlying pathology (infection, malignancy).\n- Prompt evaluation is warranted.\n\n---\n\n### 4. Key Observations and Clinical Notes\n\n- **Red flag symptoms:** Weight loss is a significant red flag in pediatric back pain.\n- **Neurological symptoms:** Assess for weakness, numbness, bladder/bowel dysfunction.\n- **Fever/night sweats:** Ask about constitutional symptoms.\n- **Pain characteristics:** Night pain, pain at rest, or pain not relieved by analgesics is concerning.\n- **History:** Any trauma, recent infections, family history of malignancy or autoimmune disease.\n\n---\n\n### 5. Red Flags to Watch For\n\n- Persistent or worsening pain, especially at night or at rest\n- Neurological deficits (weakness, numbness, incontinence)\n- Fever, night sweats, chills\n- Significant, unexplained weight loss\n- History of cancer or immunosuppression\n- Signs of systemic illness (fatigue, malaise)\n\n---\n\n**Summary:**  \nThis adolescent male presents with lower back pain and weight loss—an urgent evaluation is required to rule out serious causes such as infection or malignancy. Immediate referral for further diagnostic workup and specialist input (pediatrics, orthopedics, oncology, or infectious disease) is recommended.\n\n**Note:** This analysis is for informational purposes only. Clinical correlation and prompt evaluation by a healthcare professional are essential.', '', '', 'Certainly. Based on the information provided (13-year-old male with lower back pain and weight loss, no prior medical history specified, and no test results yet), the clinical picture is concerning for a serious underlying etiology. Below is a comprehensive, evidence-based treatment plan, structured for medical professionals.\n\n---\n\n## 1. Primary Diagnosis\n\n**Undetermined – Serious Etiology Suspected (Infection or Malignancy Most Likely)**  \n*Working diagnoses*:  \n- Spinal infection (osteomyelitis/discitis, epidural abscess, TB)\n- Malignancy (leukemia, lymphoma, primary bone tumor)\n- Less likely: spondyloarthropathy, other inflammatory or metabolic causes\n\n**Definitive diagnosis requires urgent further workup.**\n\n---\n\n## 2. Treatment Goals\n\n- Rapidly identify and treat any life-threatening or progressive disease (infection, malignancy)\n- Relieve symptoms (pain, functional impairment)\n- Prevent complications (neurological deficits, systemic spread)\n- Address underlying cause once identified\n- Support nutritional and psychological well-being\n\n---\n\n## 3. Medication Recommendations\n\n**Empiric therapy should NOT be started until after initial diagnostic workup unless the patient is acutely unwell (e.g., septic, neurologically compromised).**  \n**If the patient is stable:**  \n- *Hold antibiotics/other disease-specific therapy until cultures, imaging, and biopsies are obtained.*\n\n**If the patient is unstable (septic, neurological deficits):**  \n- **Empiric IV antibiotics for suspected spinal infection:**  \n  - *Vancomycin* (15 mg/kg IV q6–12h) PLUS  \n  - *Ceftriaxone* (50–75 mg/kg IV q24h) or *Cefotaxime* (50 mg/kg IV q6–8h)  \n  - Adjust based on local resistance, age, and allergy profile.\n- **Dexamethasone** may be considered if spinal cord compression is suspected (consult neurosurgery/oncology).\n\n**Pain management:**  \n- *Acetaminophen* (15 mg/kg/dose q4–6h PRN, max 75 mg/kg/day)  \n- *Ibuprofen* (10 mg/kg/dose q6–8h PRN, max 40 mg/kg/day)  \n- Avoid NSAIDs if infection or malignancy is suspected until diagnosis is confirmed.\n\n**Other medications:**  \n- As indicated by final diagnosis (e.g., chemotherapy, anti-TB therapy, immunosuppressants).\n\n---\n\n## 4. Non-Pharmacological Interventions\n\n- **Strict bed rest** if neurological compromise or instability is suspected.\n- **Physical therapy**: Only after acute pathology is excluded and under specialist guidance.\n- **Nutritional support**: Dietitian referral for weight loss and possible malnutrition.\n- **Psychological support**: Counseling for patient and family due to anxiety/stress of serious illness.\n\n---\n\n## 5. Follow-Up Schedule\n\n- **Inpatient admission** is recommended for urgent workup and monitoring.\n- **Daily reassessment** for neurological status, pain, and systemic symptoms.\n- **Specialist consultations**:  \n  - Pediatrics (primary team)\n  - Infectious disease (if infection suspected)\n  - Oncology (if malignancy suspected)\n  - Orthopedics/neurosurgery (if structural lesion or neurological deficit)\n- **Outpatient follow-up**: Frequency and specialty to be determined by diagnosis and clinical course.\n\n---\n\n## 6. Monitoring Parameters\n\n- **Vital signs**: Fever, tachycardia, hypotension (sepsis)\n- **Neurological status**: Motor/sensory deficits, bowel/bladder function\n- **Pain score**: Frequency, severity, character\n- **Laboratory markers**: CBC, ESR, CRP, blood cultures, metabolic panel\n- **Imaging**: Serial MRI if evolving neurological symptoms\n- **Nutritional status**: Weight, BMI, dietary intake\n\n---\n\n## 7. Patient Education Points\n\n- **Urgency**: Explain the need for rapid and thorough evaluation due to concerning symptoms.\n- **Red flag symptoms**: Instruct to report any new weakness, numbness, incontinence, fever, or worsening pain immediately.\n- **Diagnostic process**: Outline the need for blood tests, imaging, and possibly biopsy.\n- **Treatment expectations**: Discuss that therapy will be tailored once the diagnosis is confirmed.\n- **Support**: Offer psychological and social support resources.\n\n---\n\n## 8. Potential Complications to Watch For\n\n- **Neurological deterioration**: Paralysis, incontinence (suggests spinal cord involvement)\n- **Sepsis**: Hypotension, tachycardia, altered mental status\n- **Metastatic spread**: If malignancy, look for systemic symptoms\n- **Chronic pain/disability**: If diagnosis or treatment is delayed\n- **Medication side effects**: Especially with empiric antibiotics or steroids\n\n---\n\n## Summary Table\n\n| Step                        | Action/Recommendation                                                                                     |\n|-----------------------------|----------------------------------------------------------------------------------------------------------|\n| Primary Diagnosis           | Undetermined; infection or malignancy most likely                                                        |\n| Treatment Goals             | Rapid diagnosis, symptom relief, prevent complications, address underlying cause                         |\n| Medications                 | Hold empiric therapy unless unstable; start broad-spectrum IV antibiotics if septic/neurological deficit |\n| Non-Pharmacological         | Bed rest, nutritional/psychological support, PT only after acute phase                                   |\n| Follow-Up                   | Admit for urgent workup, daily reassessment, specialist input                                            |\n| Monitoring                  | Vitals, neuro status, labs, imaging, nutrition                                                          |\n| Patient Education           | Urgency, red flags, diagnostic process, support                                                          |\n| Complications               | Neuro deficits, sepsis, metastasis, chronic pain, med side effects                                       |\n\n---\n\n**Note:**  \nThis plan is intended as a guide pending further diagnostic clarification. Management must be individualized based on evolving clinical findings and test results. Immediate consultation with pediatric specialists is essential. Always involve the patient and family in decision-making and provide ongoing support.\n\n**This information is not a substitute for direct clinical care.**', 'Medications:\n1. Acetaminophen  - 15 mg/kg per dose - Every 4 to 6 hours as needed for pain - Maximum 75 mg/kg per day\n\nInstructions:\n- Take with or without food.\n- Do not exceed the maximum daily dose.\n- Notify your healthcare provider if pain worsens or new symptoms develop.\n\nPrecautions:\n- Do not use other medications containing acetaminophen at the same time.\n- Seek immediate medical attention if you develop weakness, numbness, difficulty walking, incontinence, fever, or if pain becomes severe.', 992, 992, '2025-09-07 18:59:50', '2025-09-07 19:01:32', 98),
(13, 53, '44', 'Sudden heavy pain in upper abdomen in the late night and sometimes with acid reflux. Usually when dinner is taken in the late night and spicy meal is taken than this pain occurs. The patient is female aged 30.', '**Patient Information (Corrected):**  \n- Name: Mr Patient  \n- Age: 30 years  \n- Gender: Female  \n- Medical History: Not specified (dfgdfg appears to be a placeholder)\n\n**Current Symptoms:**  \n- Sudden, heavy pain in the upper abdomen, typically late at night  \n- Sometimes associated with acid reflux  \n- Pain often follows late-night or spicy meals\n\n---\n\n## 1. Potential Differential Diagnoses\n\n1. **Gastroesophageal Reflux Disease (GERD):**  \n   - Classic presentation with postprandial (after eating), especially spicy or late meals, upper abdominal pain and acid reflux.\n\n2. **Peptic Ulcer Disease (PUD):**  \n   - Ulcers in the stomach or duodenum can cause epigastric pain, often worsened by spicy foods or late meals.\n\n3. **Functional Dyspepsia:**  \n   - Chronic upper abdominal pain without clear structural cause, often meal-related.\n\n4. **Biliary Colic (Cholelithiasis):**  \n   - Gallstones can cause episodic upper abdominal pain, often after fatty or heavy meals, though less commonly associated with acid reflux.\n\n5. **Acute Gastritis:**  \n   - Inflammation of the stomach lining, often triggered by spicy foods, alcohol, NSAIDs.\n\n6. **Pancreatitis (less likely):**  \n   - Severe upper abdominal pain, but usually more persistent and severe, often radiating to the back.\n\n---\n\n## 2. Recommended Diagnostic Tests\n\n- **Physical Examination:**  \n  - Abdominal palpation for tenderness, guarding, or masses.\n\n- **Laboratory Tests:**  \n  - CBC (to rule out infection/anemia)\n  - Liver function tests (LFTs)\n  - Amylase/lipase (if pancreatitis suspected)\n  - H. pylori testing (urea breath test, stool antigen, or serology)\n\n- **Imaging:**  \n  - Abdominal ultrasound (to assess gallbladder, liver, pancreas)\n  - Upper GI endoscopy (if symptoms are persistent, severe, or associated with red flags)\n\n- **Other:**  \n  - ECG (if pain is severe or radiates, to rule out cardiac causes, especially in atypical presentations)\n\n---\n\n## 3. Urgency Level\n\n**Medium**  \n- Symptoms are recurrent and meal-related, suggesting a non-life-threatening but potentially significant GI disorder.\n- If red flags (see below) are present, urgency increases to **High**.\n\n---\n\n## 4. Key Observations and Clinical Notes\n\n- **Symptom Triggers:** Late-night and spicy meals are clear triggers.\n- **Timing:** Nocturnal symptoms may suggest GERD or peptic ulcer.\n- **Associated Symptoms:** Acid reflux present; no mention of vomiting, jaundice, weight loss, or GI bleeding.\n- **Demographics:** Young adult female; no significant comorbidities mentioned.\n- **History:** Medical history is unclear; further clarification needed.\n\n---\n\n## 5. Red Flags to Watch For\n\n- **Severe, persistent, or worsening pain**\n- **Hematemesis (vomiting blood) or melena (black, tarry stools)**\n- **Unintentional weight loss**\n- **Dysphagia (difficulty swallowing)**\n- **Persistent vomiting**\n- **Jaundice (yellowing of skin/eyes)**\n- **Fever or signs of sepsis**\n- **Signs of peritonitis (rigid abdomen, rebound tenderness)**\n\n**If any of these are present, immediate medical evaluation is warranted.**\n\n---\n\n**Summary:**  \nThe most likely diagnoses are GERD or peptic ulcer disease, given the relationship to meals and acid reflux. Initial workup should include basic labs, H. pylori testing, and possibly abdominal ultrasound. Endoscopy may be indicated if symptoms persist or red flags develop. Advise the patient to avoid late and spicy meals, and seek immediate care if any red flags occur.\n\n**Note:** This analysis is for informational purposes only. A full clinical assessment by a healthcare professional is necessary for diagnosis and management.', 'Cholelithiasis', '', 'Certainly. Based on the provided information and the clinical input of **cholelithiasis** (gallstones), here is a comprehensive, evidence-based treatment plan:\n\n---\n\n## 1. Primary Diagnosis\n\n**Cholelithiasis (Gallstones) with Biliary Colic**\n\n- Episodic upper abdominal pain, often postprandial (especially after fatty/spicy/late meals), with occasional acid reflux.\n- Diagnosis supported by clinical history and confirmed by imaging (abdominal ultrasound recommended if not already performed).\n\n---\n\n## 2. Treatment Goals\n\n- Relieve acute symptoms (pain, dyspepsia)\n- Prevent recurrence of biliary colic\n- Prevent complications (cholecystitis, choledocholithiasis, pancreatitis)\n- Address modifiable risk factors\n\n---\n\n## 3. Medication Recommendations\n\n### a. **Acute Symptom Management**\n- **Analgesia:**  \n  - *First-line:* **NSAIDs** (e.g., Diclofenac 50-75 mg IM/PO as needed, max 150 mg/day, short-term)  \n    - *Alternative:* Paracetamol 500–1000 mg PO every 6–8 hours as needed (max 4 g/day)\n  - *If severe pain:* Consider short-term opioid (e.g., Tramadol 50–100 mg PO/IM every 6–8 hours as needed; use with caution)\n\n- **Antispasmodics:**  \n  - *Optional, for severe colic:* Hyoscine butylbromide 10–20 mg PO/IM every 8 hours as needed\n\n### b. **Acid Reflux/GERD Symptoms (if present)**\n- **Proton Pump Inhibitor (PPI):**  \n  - Omeprazole 20 mg PO once daily for 2–4 weeks\n\n### c. **No role for antibiotics** unless evidence of infection (cholecystitis, cholangitis).\n\n### d. **No role for ursodeoxycholic acid** in uncomplicated, symptomatic cholelithiasis (limited efficacy, not routinely recommended).\n\n---\n\n## 4. Non-Pharmacological Interventions\n\n- **Dietary Modification:**  \n  - Low-fat, non-spicy, smaller, frequent meals  \n  - Avoid large, late-night, or fatty meals (triggers for biliary colic)\n- **Weight Management:**  \n  - Gradual weight loss if overweight/obese (rapid weight loss can worsen gallstone formation)\n- **Alcohol Moderation:**  \n  - Limit or avoid alcohol intake\n\n---\n\n## 5. Follow-up Schedule\n\n- **Initial follow-up:** 1–2 weeks after acute episode or sooner if symptoms worsen\n- **Post-ultrasound review:** To discuss imaging results and definitive management\n- **Surgical referral:** If recurrent symptoms or complications, refer to general surgery for elective **laparoscopic cholecystectomy** (definitive treatment)\n\n---\n\n## 6. Monitoring Parameters\n\n- **Symptom diary:** Frequency, severity, and triggers of pain episodes\n- **Signs of complications:** Fever, persistent pain, jaundice, vomiting\n- **Medication side effects:** GI upset, renal function (if NSAIDs used)\n- **Laboratory monitoring:** LFTs, CBC if symptoms persist or complications suspected\n\n---\n\n## 7. Patient Education Points\n\n- **Nature of disease:** Gallstones can cause episodic pain; definitive cure is surgical removal of the gallbladder.\n- **Diet:** Avoid fatty, spicy, and late-night meals; maintain a healthy weight.\n- **Red flag symptoms:** Seek immediate care if you develop severe, persistent pain, fever, jaundice, vomiting, or signs of infection.\n- **Medication use:** Take painkillers as prescribed; avoid self-medicating with NSAIDs long-term.\n- **Surgical options:** Discuss the benefits and risks of cholecystectomy with your surgeon if symptoms recur.\n\n---\n\n## 8. Potential Complications to Watch For\n\n- **Acute cholecystitis:** Persistent right upper quadrant pain, fever, leukocytosis\n- **Choledocholithiasis:** Jaundice, dark urine, pale stools, elevated LFTs\n- **Cholangitis:** Fever, jaundice, hypotension (Charcot’s triad)\n- **Gallstone pancreatitis:** Severe epigastric pain radiating to the back, vomiting, elevated amylase/lipase\n- **Gallbladder perforation or abscess**\n\n**Immediate medical attention is required if any of these develop.**\n\n---\n\n**Summary:**  \nSymptomatic cholelithiasis is best managed with dietary/lifestyle modification, symptomatic pain control, and surgical referral for cholecystectomy if symptoms recur or complications arise. Monitor for red flag symptoms and educate the patient on when to seek urgent care.\n\n**Note:** This plan should be tailored to the individual patient after full clinical evaluation. Always consult with a healthcare professional for definitive diagnosis and management.', 'Medications:\n1. Diclofenac 50 mg - Take one tablet by mouth every 8 hours as needed for pain - Maximum 150 mg per day - For up to 5 days\n2. Omeprazole 20 mg - Take one capsule by mouth once daily - For 2 weeks\n\nInstructions:\n- Take Diclofenac with food to reduce stomach upset.\n- Swallow Omeprazole capsule whole with water, 30 minutes before breakfast.\n- Avoid fatty, spicy, and large meals; eat smaller, more frequent meals.\n- Keep a diary of pain episodes and any triggers.\n\nPrecautions:\n- Do not exceed the recommended dose of Diclofenac.\n- Stop Diclofenac and seek medical attention if you develop severe stomach pain, black stools, vomiting, jaundice, or fever.\n- Avoid alcohol while taking these medications.\n- Contact your healthcare provider if symptoms worsen or new symptoms develop.', 992, 992, '2025-09-08 00:57:16', '2025-09-08 01:00:03', 98),
(14, 53, '44', 'Sudden heavy pain in upper abdomen. Afe 30-, female', '**Patient Information**  \n- Name: Mr Patient  \n- Age: 13 years  \n- Gender: Male  \n- Medical History: Not specified (text \"dfgdfg\" is not interpretable)\n\n**Current Symptoms**  \n- Sudden, heavy pain in upper abdomen  \n- (Note: There is a conflicting note \"Afe 30-, female\" which may be a typographical error. Analysis is based on a 13-year-old male.)\n\n---\n\n### 1. Potential Differential Diagnoses\n\nFor a 13-year-old male with sudden, severe upper abdominal pain, consider:\n\n- **Acute gastritis or peptic ulcer disease** (with or without perforation)\n- **Acute pancreatitis**\n- **Biliary colic or cholecystitis** (less common in males, but possible)\n- **Gastroenteritis**\n- **Splenic pathology** (e.g., infarct, rupture—rare but possible)\n- **Gastric volvulus**\n- **Esophageal rupture (Boerhaave syndrome)** (rare, but severe)\n- **Diabetic ketoacidosis** (if diabetic)\n- **Referred pain from lower lobe pneumonia**\n- **Musculoskeletal pain** (if history of trauma)\n- **Toxic ingestion** (if history suggests)\n- **Intestinal obstruction or volvulus**\n\n---\n\n### 2. Recommended Diagnostic Tests\n\n- **Physical examination**: Assess for peritonitis, guarding, rebound tenderness, Murphy’s sign, etc.\n- **Vital signs**: Assess for fever, tachycardia, hypotension, tachypnea\n- **Laboratory tests**:\n  - CBC, electrolytes, renal function, liver function tests\n  - Amylase/lipase (for pancreatitis)\n  - Urinalysis\n  - Blood glucose\n  - Inflammatory markers (CRP, ESR)\n- **Imaging**:\n  - Abdominal ultrasound (first-line, especially for biliary or pancreatic pathology)\n  - Abdominal X-ray (look for free air, obstruction)\n  - Consider CT abdomen if diagnosis remains unclear or if severe findings\n- **Other**:\n  - EKG (if cardiac cause suspected)\n  - Stool studies (if diarrhea present)\n\n---\n\n### 3. Urgency Level\n\n**High**  \n- Sudden, severe abdominal pain in a child is always concerning and warrants urgent evaluation to rule out surgical or life-threatening causes (e.g., perforated ulcer, pancreatitis, volvulus, splenic rupture).\n\n---\n\n### 4. Key Observations and Clinical Notes\n\n- Onset, duration, and character of pain (sudden and severe is worrisome)\n- Associated symptoms: vomiting, fever, jaundice, diarrhea, chest pain, shortness of breath\n- Past medical history (not provided)\n- Recent trauma, ingestion, or illness\n- Family history of GI or metabolic disorders\n- Physical exam findings: tenderness, guarding, rigidity, distension, bowel sounds\n\n---\n\n### 5. Red Flags to Watch For\n\n- Signs of peritonitis (rebound tenderness, guarding, rigidity)\n- Hemodynamic instability (hypotension, tachycardia, shock)\n- Persistent vomiting (especially bilious or bloody)\n- Signs of GI bleeding (hematemesis, melena)\n- Altered mental status\n- Severe dehydration\n- Jaundice\n\n---\n\n**Clinical Note:**  \nThis presentation requires urgent assessment by a healthcare professional, preferably in an emergency department. Rapid deterioration is possible depending on the underlying cause. Early imaging and laboratory workup are essential to guide management.\n\n---\n\n**Disclaimer:**  \nThis analysis is for informational purposes only and does not replace clinical assessment. Immediate evaluation by a healthcare professional is strongly recommended.', 'Cholelithiasis', '', 'Certainly. Below is a comprehensive, structured treatment plan for a 13-year-old male presenting with sudden, severe upper abdominal pain, with a working diagnosis of **cholelithiasis** (gallstones). Please note that cholelithiasis in children is less common than in adults and may be associated with hemolytic disorders, obesity, or other risk factors. This plan assumes no evidence of cholecystitis, cholangitis, or pancreatitis unless otherwise specified by further clinical or laboratory findings.\n\n---\n\n## 1. Primary Diagnosis\n\n**Cholelithiasis (gallstones) without evidence of acute cholecystitis or complications**\n\n---\n\n## 2. Treatment Goals\n\n- Relieve abdominal pain and discomfort\n- Prevent complications (e.g., cholecystitis, choledocholithiasis, pancreatitis)\n- Identify and manage underlying risk factors\n- Educate patient and family on symptom recognition and when to seek urgent care\n- Plan for definitive management (possible surgical intervention if symptomatic or recurrent)\n\n---\n\n## 3. Medication Recommendations\n\n**A. Analgesia**\n- **Acetaminophen**: 10–15 mg/kg/dose orally every 4–6 hours as needed (maximum 75 mg/kg/day)\n- **NSAIDs** (e.g., ibuprofen): 5–10 mg/kg/dose orally every 6–8 hours as needed (maximum 40 mg/kg/day)\n- **Avoid opioids** if possible, but may be considered for severe pain under supervision\n\n**B. Antiemetics** (if nausea/vomiting)\n- **Ondansetron**: 0.15 mg/kg/dose (max 8 mg) orally or IV every 8 hours as needed\n\n**C. Antibiotics**\n- **Not indicated** for uncomplicated cholelithiasis.  \n- **If cholecystitis or infection is suspected:** Empiric IV antibiotics (e.g., ceftriaxone + metronidazole) per local protocols.\n\n**D. Ursodeoxycholic acid**\n- **Not routinely recommended** for symptomatic gallstones in children unless surgery is contraindicated and stones are cholesterol type.\n\n---\n\n## 4. Non-Pharmacological Interventions\n\n- **NPO (nil per os)** during acute pain episode if severe symptoms or if surgery is being considered\n- **IV fluids** if unable to tolerate oral intake or if dehydrated\n- **Gradual reintroduction of oral intake** as tolerated, starting with clear liquids\n- **Low-fat diet** after acute episode to reduce gallbladder stimulation\n- **Monitor for signs of complications** (see below)\n\n---\n\n## 5. Follow-up Schedule\n\n- **Immediate**: Admit for observation if pain is severe, recurrent, or if complications are suspected\n- **Short-term**: Outpatient follow-up within 1 week with pediatric gastroenterology or surgery if stable and discharged\n- **Long-term**: Regular follow-up if managed conservatively, or post-operatively if cholecystectomy performed\n\n---\n\n## 6. Monitoring Parameters\n\n- **Vital signs**: Monitor for fever, tachycardia, hypotension (suggesting sepsis or shock)\n- **Pain score**: Regular assessment\n- **Abdominal exam**: Watch for peritoneal signs, Murphy’s sign, distension\n- **Laboratory markers**: Repeat CBC, LFTs, amylase/lipase if clinical status changes\n- **Hydration status**: Input/output monitoring\n- **Signs of complications**: Jaundice, persistent vomiting, altered mental status\n\n---\n\n## 7. Patient Education Points\n\n- **Symptoms to watch for**: Worsening pain, fever, jaundice, persistent vomiting, dark urine, pale stools\n- **Diet**: Low-fat meals to reduce gallbladder stimulation\n- **Importance of follow-up**: To monitor for complications and discuss definitive management\n- **When to seek urgent care**: If severe pain returns, fever develops, or any red flag symptoms appear\n- **Potential need for surgery**: Discuss that cholecystectomy may be required if symptoms recur or complications develop\n\n---\n\n## 8. Potential Complications to Watch For\n\n- **Acute cholecystitis** (fever, right upper quadrant tenderness, Murphy’s sign, leukocytosis)\n- **Choledocholithiasis** (jaundice, elevated bilirubin/alkaline phosphatase)\n- **Acute pancreatitis** (epigastric pain radiating to back, elevated amylase/lipase)\n- **Cholangitis** (Charcot’s triad: fever, jaundice, RUQ pain)\n- **Gallbladder perforation or abscess**\n- **Sepsis**\n\n---\n\n**Clinical Note:**  \nThis plan should be individualized based on further clinical findings, laboratory/imaging results, and the presence or absence of complications. Consultation with pediatric gastroenterology and/or pediatric surgery is recommended for all cases of symptomatic cholelithiasis in children.\n\n---\n\n**Disclaimer:**  \nThis guidance is for informational purposes and does not replace clinical judgment. Immediate evaluation and management by a healthcare professional are essential.', 'Medications:\n1. Acetaminophen 500 mg - Take by mouth every 6 hours as needed for pain - Maximum 4 doses in 24 hours\n2. Ondansetron 4 mg - Take by mouth every 8 hours as needed for nausea or vomiting - Maximum 3 doses in 24 hours\n\nInstructions:\n- Take acetaminophen with a small amount of water; do not exceed the maximum daily dose.\n- Take ondansetron with or without food.\n- Start with clear liquids and advance to a low-fat diet as tolerated.\n- If unable to keep fluids down, seek medical attention.\n\nPrecautions:\n- Do not take more than the recommended dose of any medication.\n- Watch for signs of worsening pain, fever, yellowing of the skin or eyes, persistent vomiting, or dark urine, and seek medical care immediately if these occur.', 992, 992, '2025-09-08 01:03:29', '2025-09-08 01:06:51', 98),
(15, 53, '44', 'RIght arm musle pain', '**Patient Analysis**\n\n**Patient Information:**  \n- Name: Mr Patient  \n- Age: 13 years  \n- Gender: Male  \n- Medical History: Not specified (text \"dfgdfg\" is not interpretable)\n\n**Presenting Symptom:**  \n- Right arm muscle pain\n\n---\n\n### 1. Potential Differential Diagnoses\n\n- **Muscle strain or overuse injury** (most common in adolescents, especially with sports or physical activity)\n- **Contusion or soft tissue injury** (history of trauma or impact)\n- **Delayed onset muscle soreness (DOMS)**\n- **Tendinitis or tenosynovitis**\n- **Fracture or bone injury** (if trauma present)\n- **Infection (myositis, cellulitis, abscess)** (especially if accompanied by redness, swelling, or fever)\n- **Nerve impingement or radiculopathy** (if associated with numbness, tingling, or weakness)\n- **Referred pain from cervical spine pathology**\n- **Compartment syndrome** (rare, but critical to rule out if severe pain, swelling, or neurovascular compromise)\n- **Systemic causes** (e.g., viral myalgia, inflammatory myopathies—less likely without other symptoms)\n\n---\n\n### 2. Recommended Diagnostic Tests\n\n- **History and physical examination** (including assessment for trauma, activity, systemic symptoms, neurovascular status)\n- **X-ray of the right arm** (if trauma or suspicion of fracture)\n- **Ultrasound** (if soft tissue injury, abscess, or localized swelling)\n- **CBC, ESR, CRP** (if infection or inflammatory process suspected)\n- **MRI** (if persistent, severe, or unexplained pain, or suspicion of deep tissue injury)\n- **Electrodiagnostic studies** (if neurological symptoms present)\n\n---\n\n### 3. Urgency Level\n\n- **Low to Medium** (based on current information)\n  - **Increase to High** if any red flags (see below) are present.\n\n---\n\n### 4. Key Observations and Clinical Notes\n\n- **Age**: Adolescent; muscle pain often related to activity or minor trauma.\n- **Location**: Isolated to right arm; no mention of systemic symptoms.\n- **History**: No trauma, fever, or neurological symptoms reported (but should be specifically asked).\n- **Medical history**: Not provided; relevant for underlying conditions (e.g., bleeding disorders, autoimmune disease).\n\n---\n\n### 5. Red Flags to Watch For\n\n- **Severe, rapidly worsening pain**\n- **Swelling, redness, or warmth (suggesting infection or compartment syndrome)**\n- **Fever or systemic symptoms**\n- **Numbness, tingling, or weakness (suggesting nerve involvement)**\n- **Loss of pulses or pallor (vascular compromise)**\n- **History of significant trauma**\n- **Inability to move the arm or severe functional impairment**\n\n---\n\n### 6. Confidence Level\n\n- **Medium**\n  - Confidence limited by lack of detailed history, physical findings, and context (e.g., trauma, activity, systemic symptoms).\n\n---\n\n**Summary:**  \nRight arm muscle pain in a 13-year-old male is most commonly due to benign causes such as muscle strain or minor injury, but a thorough history and examination are essential to rule out serious conditions. Watch for red flags that may indicate infection, fracture, or compartment syndrome. Further evaluation and diagnostic testing should be guided by clinical findings.\n\n**Recommendation:**  \nA healthcare professional should perform a focused history and physical examination to determine the need for further testing and to ensure no urgent pathology is missed.', NULL, NULL, NULL, NULL, 992, NULL, '2025-09-08 04:09:48', NULL, 98),
(16, 53, '44', 'headache', '**Patient Analysis**\n\n**Patient Information:**  \n- Name: Mr Patient  \n- Age: 13 years  \n- Gender: Male  \n- Medical History: Not specified (text appears non-informative)\n\n**Current Symptom:**  \n- Headache\n\n---\n\n### 1. Potential Differential Diagnoses\n\nIn a 13-year-old male presenting with headache, consider the following common and serious causes:\n\n- **Primary Headache Disorders:**\n  - Migraine (with or without aura)\n  - Tension-type headache\n  - Cluster headache (less common in this age group)\n\n- **Secondary Headache Causes:**\n  - Viral or bacterial infection (e.g., sinusitis, upper respiratory tract infection, meningitis)\n  - Medication overuse headache\n  - Dehydration\n  - Vision problems (refractive errors)\n  - Trauma/concussion\n  - Intracranial mass or increased intracranial pressure (rare, but important to rule out)\n  - Hypertension\n  - Dental or temporomandibular joint (TMJ) disorders\n\n---\n\n### 2. Recommended Diagnostic Tests\n\n**Initial Evaluation:**\n- Detailed history and physical examination, including:\n  - Onset, duration, frequency, and character of headache\n  - Associated symptoms (nausea, vomiting, photophobia, phonophobia, visual changes, fever, neck stiffness, altered mental status)\n  - Family history of headache/migraine\n  - Recent trauma or illness\n- Vital signs, including blood pressure\n\n**If Red Flags or Abnormal Findings:**\n- Neuroimaging (CT/MRI brain)\n- Lumbar puncture (if concern for meningitis/encephalitis and imaging is clear)\n- Laboratory tests (CBC, CRP/ESR, electrolytes) if infection or systemic illness suspected\n- Ophthalmologic evaluation (if visual symptoms or papilledema suspected)\n\n---\n\n### 3. Urgency Level\n\n- **Medium** (based on current information)\n  - **High** if any red flags or abnormal neurological findings are present (see below)\n\n---\n\n### 4. Key Observations and Clinical Notes\n\n- Isolated headache in an adolescent is most commonly benign (e.g., migraine, tension-type), but secondary causes must be excluded.\n- Absence of detailed history (e.g., associated symptoms, duration, severity, response to analgesics) limits specificity of analysis.\n- No mention of trauma, fever, or neurological symptoms.\n- Medical history is not contributory in this case.\n\n---\n\n### 5. Red Flags to Watch For\n\nImmediate evaluation is warranted if any of the following are present:\n- Sudden, severe (“thunderclap”) headache\n- Headache with fever, neck stiffness, photophobia (concern for meningitis)\n- Altered mental status, confusion, seizures\n- Focal neurological deficits (weakness, vision loss, ataxia)\n- Headache triggered by Valsalva, coughing, or exertion\n- Headache worsening over time or waking from sleep\n- Recent head trauma\n- Papilledema on fundoscopic exam\n- Immunosuppression or known malignancy\n\n---\n\n### 6. Confidence Level\n\n- **Low to Medium**\n  - Due to limited clinical information and non-specific medical history, confidence in the differential is limited. Further history and physical examination are essential for accurate assessment.\n\n---\n\n**Summary:**  \nThis is a 13-year-old male with a headache of unspecified duration and characteristics. Most headaches in this age group are benign, but a careful assessment for red flags and secondary causes is essential. If any concerning symptoms are present, urgent evaluation is warranted. Recommend further history, physical examination, and targeted investigations as indicated.\n\n**Note:** This analysis is not a substitute for clinical evaluation. Please consult a healthcare professional for definitive diagnosis and management.', 'nothing found', '', 'Certainly. Below is a structured, comprehensive treatment plan for a 13-year-old male presenting with headache, based on the limited information provided and in the absence of red flag symptoms or abnormal findings.\n\n---\n\n## 1. Primary Diagnosis\n\n**Most Likely:**  \n- **Primary Headache Disorder** (Migraine or Tension-Type Headache)\n\n**Rationale:**  \n- Headache is common in adolescents; primary headache disorders (migraine, tension-type) are most frequent in this age group.\n- No red flag symptoms or abnormal findings reported.\n- No evidence of secondary causes based on available data.\n\n---\n\n## 2. Treatment Goals\n\n- Relieve acute headache symptoms\n- Minimize headache frequency and severity\n- Prevent recurrence\n- Identify and address potential triggers\n- Monitor for and promptly identify secondary causes or complications\n\n---\n\n## 3. Medication Recommendations\n\n**A. Acute Symptomatic Relief**\n\n- **First-line:**  \n  - **Acetaminophen**: 10–15 mg/kg/dose orally every 4–6 hours as needed (maximum 75 mg/kg/day or 3,000 mg/day, whichever is lower)\n  - **OR**  \n  - **Ibuprofen**: 10 mg/kg/dose orally every 6–8 hours as needed (maximum 40 mg/kg/day or 2,400 mg/day, whichever is lower)\n\n- **If migraine suspected and above ineffective:**  \n  - **Consider triptans** (e.g., sumatriptan nasal spray 5–20 mg, as per age/weight, single dose; may repeat once in 2 hours if needed; max 40 mg/24h).  \n  - *Note: Use only if migraine diagnosis is clear and under supervision of a healthcare provider.*\n\n**B. Preventive Therapy:**  \n- Not indicated unless headaches are frequent, severe, or disabling. Consider after specialist evaluation.\n\n---\n\n## 4. Non-Pharmacological Interventions\n\n- **Lifestyle Modifications:**\n  - Ensure regular sleep schedule\n  - Maintain adequate hydration\n  - Encourage regular meals, avoid skipping meals\n  - Limit caffeine and avoid known dietary triggers\n  - Encourage regular physical activity\n- **Headache Diary:**  \n  - Record frequency, duration, intensity, triggers, and response to treatment\n- **Stress Management:**  \n  - Relaxation techniques, cognitive-behavioral therapy if stress is a trigger\n- **Screen for Vision Problems:**  \n  - Recommend eye exam if visual symptoms or if not recently performed\n\n---\n\n## 5. Follow-Up Schedule\n\n- **Initial follow-up:**  \n  - 1–2 weeks after initial visit (sooner if symptoms worsen or red flags develop)\n- **Ongoing:**  \n  - Every 1–3 months if headaches persist or escalate, or as directed by clinical course\n\n---\n\n## 6. Monitoring Parameters\n\n- Headache frequency, duration, and severity (via diary)\n- Response to medications (effectiveness, side effects)\n- Emergence of red flag symptoms (see below)\n- Impact on school attendance and daily activities\n- Medication use (to avoid overuse/rebound headache)\n\n---\n\n## 7. Patient Education Points\n\n- Most headaches in adolescents are benign and self-limited\n- Importance of regular routines (sleep, meals, hydration)\n- Avoid overuse of pain medications (no more than 2–3 days per week)\n- Identify and avoid headache triggers\n- When to seek urgent care (see red flags below)\n- Keep a headache diary for better management\n\n---\n\n## 8. Potential Complications to Watch For\n\n- Medication overuse headache (from frequent analgesic use)\n- Progression to chronic daily headache\n- Underlying secondary cause (e.g., infection, mass lesion) if new symptoms develop\n- Impact on school performance or psychosocial functioning\n\n**Red Flags Requiring Immediate Medical Attention:**\n- Sudden, severe (“worst ever”) headache\n- Headache with fever, neck stiffness, photophobia\n- Confusion, altered mental status, seizures\n- Focal neurological deficits\n- Headache worsening over time or waking from sleep\n- Recent significant head trauma\n\n---\n\n## 9. Confidence Level\n\n**Medium**\n\n- Confidence is moderate due to limited clinical information and lack of detailed history or examination findings.\n- Plan is appropriate for initial management of presumed primary headache in an adolescent, but further evaluation is warranted if symptoms persist, worsen, or new findings emerge.\n\n---\n\n**Note:**  \nThis plan is based on available information and standard guidelines for pediatric headache management. A thorough clinical assessment is essential. Please consult a pediatrician or neurologist for further evaluation and individualized care.', 'Medications:\n1. Acetaminophen 500 mg tablets – 1 tablet by mouth every 4–6 hours as needed for headache – Maximum 4 doses in 24 hours, for up to 5 days\n\nInstructions:\n- Take with a full glass of water. May take with food if stomach upset occurs.\n- Do not exceed 4 doses (2,000 mg) in 24 hours.\n- Keep a headache diary to track frequency, duration, and possible triggers.\n\nPrecautions:\n- Do not use for more than 5 consecutive days without consulting your healthcare provider.\n- Seek medical attention immediately if headache is sudden and severe, associated with fever, neck stiffness, confusion, weakness, vision changes, or vomiting.', 992, 992, '2025-09-08 04:18:54', '2025-09-08 04:20:14', 98),
(17, 53, '44', 'Headche', '**Patient Information**  \nName: Mr Patient  \nAge: 13 years  \nGender: Male  \nMedical History: Not specified (text \"dfgdfg\" is non-informative)  \n\n**Current Symptom**  \nHeadache\n\n---\n\n### 1. Potential Differential Diagnoses\n\nFor a 13-year-old male presenting with headache, consider:\n\n- **Primary Headache Disorders:**\n  - Migraine (with or without aura)\n  - Tension-type headache\n  - Cluster headache (less common in this age group)\n\n- **Secondary Headache Causes:**\n  - Sinusitis\n  - Viral or bacterial infections (e.g., upper respiratory tract infection, meningitis)\n  - Medication overuse headache\n  - Refractive error (vision problems)\n  - Trauma (recent head injury)\n  - Intracranial pathology (e.g., tumor, hydrocephalus, pseudotumor cerebri)\n  - Hypertension\n  - Sleep disorders\n\n---\n\n### 2. Recommended Diagnostic Tests\n\n**Initial Evaluation:**\n- Detailed history and physical examination (including neurological exam)\n- Assessment for associated symptoms (fever, neck stiffness, photophobia, vomiting, visual changes, altered consciousness, recent trauma)\n- Blood pressure measurement\n- Vision screening\n\n**Further Investigations (if indicated by history/exam):**\n- CBC, CRP/ESR (if infection or inflammation suspected)\n- Sinus X-ray or CT (if sinusitis suspected)\n- MRI/CT brain (if red flags or abnormal neuro exam)\n- Lumbar puncture (if meningitis or subarachnoid hemorrhage suspected)\n- Urinalysis (if hypertension suspected)\n\n---\n\n### 3. Urgency Level\n\n**Medium**  \n- Most pediatric headaches are benign, but a thorough assessment is needed to rule out serious causes.\n- **Urgency increases to High** if any red flags (see below) are present.\n\n---\n\n### 4. Key Observations and Clinical Notes\n\n- Age-appropriate headache assessment is crucial.\n- Lack of detailed history (onset, duration, character, associated symptoms, triggers, family history) limits specificity.\n- No mention of trauma, fever, or neurological symptoms.\n- No past medical history provided.\n- Consider both primary and secondary causes; secondary headaches are more common in children than adults.\n\n---\n\n### 5. Red Flags to Watch For\n\n- Sudden, severe (\"thunderclap\") headache\n- Headache with fever, neck stiffness, photophobia (meningitis/encephalitis)\n- Altered mental status, seizures, focal neurological deficits\n- Papilledema, visual changes\n- Persistent vomiting, especially in the morning\n- Recent head trauma\n- Headache worsening with Valsalva maneuver or lying down\n- Headache that awakens from sleep or is present on awakening\n- Immunosuppression or known malignancy\n\n---\n\n### 6. Confidence Level\n\n**Low to Medium**  \n- Confidence is limited due to lack of detailed history, physical exam findings, and medical history.\n- Further information is needed for a more definitive analysis.\n\n---\n\n**Summary:**  \nA 13-year-old male with headache requires careful evaluation to differentiate between primary and secondary causes. Most headaches in this age group are benign, but red flags must be excluded. Initial workup should focus on history and exam, with further tests as indicated. Urgency is medium unless red flags are present, in which case immediate evaluation is warranted.\n\n**Recommendation:**  \nAdvise prompt clinical assessment by a healthcare professional to obtain a detailed history, perform a physical and neurological examination, and guide further investigations as appropriate.', NULL, NULL, NULL, NULL, 992, NULL, '2025-09-08 04:22:40', NULL, 98),
(18, 53, '44', 'Headche', '**Patient Analysis**\n\n**Patient Information:**  \n- Name: Mr Patient  \n- Age: 13 years  \n- Gender: Male  \n- Medical History: Not specified (non-informative: \"dfgdfg\")  \n\n**Current Symptom:**  \n- Headache  \n\n---\n\n### 1. Potential Differential Diagnoses\n\nGiven the limited information (isolated headache in a 13-year-old male), the differential is broad. Common and important causes include:\n\n- **Primary Headache Disorders:**\n  - Migraine (with or without aura)\n  - Tension-type headache\n  - Cluster headache (less common in this age group)\n\n- **Secondary Headache Causes:**\n  - Viral or bacterial infection (e.g., sinusitis, upper respiratory tract infection, meningitis)\n  - Medication overuse or withdrawal\n  - Vision problems (refractive errors, eye strain)\n  - Trauma (recent head injury)\n  - Intracranial pathology (tumor, hydrocephalus, hemorrhage)\n  - Hypertension\n  - Dental or temporomandibular joint (TMJ) disorders\n\n---\n\n### 2. Recommended Diagnostic Tests\n\n**Initial evaluation should include:**\n- **Comprehensive history and physical examination** (including neurological exam)\n- **Vital signs** (fever, blood pressure)\n- **Fundoscopic exam** (to assess for papilledema)\n- **Vision assessment**\n\n**Further investigations if indicated by history/exam:**\n- **Neuroimaging (CT/MRI brain):** If red flags present (see below)\n- **Lumbar puncture:** If signs of meningitis or raised intracranial pressure (after imaging)\n- **Laboratory tests:** CBC, CRP, ESR if infection or inflammation suspected\n- **Sinus X-ray/CT:** If sinusitis suspected\n\n---\n\n### 3. Urgency Level\n\n**Medium**  \n- The urgency may escalate to **High** if any red flag symptoms are present (see below).\n\n---\n\n### 4. Key Observations and Clinical Notes\n\n- **Symptom characterization is crucial:** Onset, duration, location, quality, associated symptoms (nausea, vomiting, photophobia, phonophobia, visual changes, fever, neck stiffness, recent trauma).\n- **History of similar episodes?** Family history of migraine?\n- **Any recent infections, trauma, or medication changes?**\n- **Impact on daily activities and school attendance?**\n\n---\n\n### 5. Red Flags to Watch For\n\nImmediate evaluation is warranted if any of the following are present:\n- Sudden, severe (\"worst ever\") headache\n- Altered mental status, confusion, or loss of consciousness\n- Focal neurological deficits (weakness, vision loss, speech difficulty)\n- Signs of increased intracranial pressure (projectile vomiting, papilledema)\n- Signs of meningeal irritation (neck stiffness, photophobia, fever)\n- Recent head trauma\n- Headache that wakes the patient from sleep or is worse in the morning\n- Immunosuppression or known malignancy\n\n---\n\n### 6. Confidence Level\n\n**Low**  \n- Due to extremely limited clinical information (only \"headache\" provided, no history, exam findings, or relevant medical history).\n\n---\n\n**Summary:**  \nThis is a 13-year-old male presenting with headache. The differential is broad, with both primary and secondary causes possible. Further history and examination are essential to narrow the diagnosis and determine the need for urgent intervention. Watch for red flags that may indicate a serious underlying condition. Recommend prompt clinical evaluation by a healthcare professional.\n\n---\n\n**Note:**  \nThis analysis is based on limited information. Please consult a healthcare professional for a thorough assessment, diagnosis, and management plan.', NULL, NULL, NULL, NULL, 992, NULL, '2025-09-08 04:23:34', NULL, 98);
INSERT INTO `treatment_plans` (`id`, `patient_id`, `doctor_id`, `symptoms`, `symptom_analysis`, `doctor_input`, `test_results`, `treatment_plan`, `prescription`, `created_by`, `updated_by`, `created_at`, `updated_at`, `hospital_id`) VALUES
(19, 53, '44', 'Headace', '**Patient Analysis**\n\n**Patient Information:**  \n- Name: Mr Patient  \n- Age: 13 years  \n- Gender: Male  \n- Medical History: Not specified (non-contributory)\n\n**Current Symptom:**  \n- Headache\n\n---\n\n### 1. Potential Differential Diagnoses\n\nGiven the limited information (isolated headache in a 13-year-old male), the following are common and important causes to consider:\n\n- **Primary Headache Disorders:**\n  - Migraine (with or without aura)\n  - Tension-type headache\n  - Cluster headache (less common in this age group)\n\n- **Secondary Headache Causes:**\n  - Viral or bacterial infection (e.g., sinusitis, upper respiratory tract infection, meningitis)\n  - Medication overuse headache\n  - Head trauma/concussion\n  - Vision problems (e.g., refractive errors)\n  - Dehydration\n  - Intracranial pathology (e.g., tumor, hydrocephalus, idiopathic intracranial hypertension)\n  - Hypertension\n\n---\n\n### 2. Recommended Diagnostic Tests\n\n**Initial evaluation should be guided by clinical history and physical examination.**  \nIf red flags or concerning features are present, consider:\n\n- **Basic Investigations:**\n  - Vital signs (including blood pressure)\n  - Neurological examination\n  - Fundoscopic examination (for papilledema)\n  - Visual acuity assessment\n\n- **If indicated by history/exam:**\n  - CBC, CRP/ESR (if infection or inflammation suspected)\n  - Urinalysis (if systemic symptoms)\n  - Brain imaging (CT/MRI) if red flags present (see below)\n  - Lumbar puncture (if meningitis or increased intracranial pressure suspected)\n\n---\n\n### 3. Urgency Level\n\n- **Low to Medium** (based on current information)\n  - **If no red flags** or abnormal findings on history/exam, outpatient evaluation is appropriate.\n  - **If red flags present** (see below), urgency increases to **High**—immediate evaluation required.\n\n---\n\n### 4. Key Observations and Clinical Notes\n\n- **History is critical:** Onset, duration, character, location, associated symptoms (nausea, vomiting, visual changes, photophobia, phonophobia, fever, neck stiffness, recent trauma, etc.).\n- **Physical exam:** Complete neurological and general examination.\n- **Family history:** Migraine or other headache disorders.\n- **Medication and substance use:** Caffeine, over-the-counter medications, recent changes.\n- **Psychosocial factors:** Stress, sleep patterns, school performance.\n\n---\n\n### 5. Red Flags to Watch For\n\nImmediate evaluation is warranted if any of the following are present:\n\n- Sudden, severe (\"thunderclap\") headache\n- Headache with fever, neck stiffness, photophobia (meningitis/encephalitis)\n- Headache with altered mental status, seizures, or focal neurological deficits\n- Headache that wakes the patient from sleep or is worse in the morning\n- Headache with vomiting (especially projectile)\n- Recent head trauma\n- Visual changes (blurred vision, double vision, vision loss)\n- Papilledema on exam\n- Immunocompromised status or known malignancy\n\n---\n\n### 6. Confidence Level\n\n- **Low**\n  - Due to the extremely limited clinical information provided (only \"headache\" as a symptom and no relevant medical history), the confidence in this analysis is low. A thorough clinical history and examination are essential for accurate diagnosis and management.\n\n---\n\n**Summary:**  \nThe differential for headache in a 13-year-old is broad, ranging from benign primary headache disorders to serious secondary causes. Careful assessment for red flags is crucial. If any concerning features are present, urgent evaluation is required. Otherwise, outpatient workup and management may be appropriate. Further history and examination findings are needed for a definitive assessment.\n\n**Recommendation:**  \nAdvise prompt in-person evaluation by a healthcare professional for a detailed history, examination, and appropriate investigations.', NULL, NULL, NULL, NULL, 992, NULL, '2025-09-08 04:24:01', NULL, 98),
(20, 53, '44', 'headace', '**Patient Analysis**\n\n**Patient Information:**  \n- Name: Mr Patient  \n- Age: 13 years  \n- Gender: Male  \n- Medical History: Not specified (entry \"dfgdfg\" appears to be a placeholder)\n\n**Current Symptom:**  \n- Headache\n\n---\n\n### 1. Potential Differential Diagnoses\n\nGiven the limited information (isolated headache in a 13-year-old male), consider the following common and serious causes:\n\n**Common Causes:**\n- Tension-type headache\n- Migraine (with or without aura)\n- Sinusitis\n- Viral illness (e.g., upper respiratory tract infection)\n- Eyestrain (refractive error)\n\n**Less Common but Serious Causes:**\n- Meningitis/encephalitis\n- Intracranial mass or space-occupying lesion\n- Idiopathic intracranial hypertension\n- Head trauma/concussion\n- Hypertension\n- Medication overuse headache\n\n---\n\n### 2. Recommended Diagnostic Tests\n\n**Initial Evaluation:**\n- Detailed history and physical examination (including neurological exam)\n- Assessment for associated symptoms: fever, photophobia, neck stiffness, nausea/vomiting, visual changes, recent trauma, altered mental status\n\n**Further Workup (if indicated by history/exam):**\n- Fundoscopic examination (for papilledema)\n- Blood pressure measurement\n- CBC, CRP/ESR (if infection or inflammation suspected)\n- Sinus imaging (if sinusitis suspected)\n- Brain imaging (CT/MRI) if red flags present (see below)\n- Lumbar puncture (if meningitis/encephalitis suspected)\n\n---\n\n### 3. Urgency Level\n\n**Medium**  \n- Isolated headache in a 13-year-old is often benign, but further assessment is required to rule out serious causes.\n- Urgency increases to **High** if any red flags (see below) are present.\n\n---\n\n### 4. Key Observations and Clinical Notes\n\n- Age and gender are typical for primary headache disorders (migraine, tension-type).\n- No associated symptoms or relevant medical history provided.\n- No mention of trauma, fever, neurological deficits, or other systemic symptoms.\n- Lack of detail limits the ability to narrow the differential diagnosis.\n\n---\n\n### 5. Red Flags to Watch For\n\nIf any of the following are present, escalate urgency and consider immediate referral or emergency evaluation:\n\n- Sudden-onset \"worst headache of life\"\n- Headache with fever, neck stiffness, photophobia (meningitis signs)\n- Altered mental status, seizures, focal neurological deficits\n- Papilledema or visual changes\n- Headache worsened by Valsalva, lying down, or in the morning\n- Recent head trauma\n- Persistent vomiting\n- Immunosuppression or known malignancy\n\n---\n\n### 6. Confidence Level\n\n**Low to Medium**  \n- Confidence is limited by lack of detailed history, physical findings, and associated symptoms.\n- Additional information is required for a more precise assessment.\n\n---\n\n**Summary:**  \nThis is a 13-year-old male with an isolated complaint of headache. The most likely causes are benign (tension-type or migraine), but serious etiologies must be considered and ruled out, especially if red flags are present. A thorough history and physical examination are essential. If any red flags are identified, urgent evaluation is warranted.\n\n**Recommendation:**  \nAdvise prompt clinical evaluation by a healthcare professional to obtain a detailed history and perform a physical and neurological examination. Immediate attention is required if any red flags develop.', NULL, NULL, NULL, NULL, 992, NULL, '2025-09-08 04:27:26', NULL, 98),
(21, 53, '44', 'headache', '**Patient Analysis**\n\n**Patient Information:**  \n- Name: Mr Patient  \n- Age: 13 years  \n- Gender: Male  \n- Medical History: Not specified (text \"dfgdfg\" appears to be a placeholder)\n\n**Current Symptom:**  \n- Headache\n\n---\n\n### 1. Potential Differential Diagnoses\n\nGiven the limited information (isolated headache in a 13-year-old male), the following differential diagnoses should be considered:\n\n- **Primary Headache Disorders:**\n  - Migraine (with or without aura)\n  - Tension-type headache\n  - Cluster headache (less common in this age group)\n\n- **Secondary Headache Causes:**\n  - Viral or bacterial infection (e.g., sinusitis, upper respiratory tract infection, meningitis)\n  - Medication overuse headache\n  - Head trauma/concussion (if recent trauma)\n  - Vision problems (e.g., refractive errors)\n  - Intracranial pathology (e.g., tumor, hydrocephalus, idiopathic intracranial hypertension)\n  - Dehydration\n  - Sleep disorders\n\n---\n\n### 2. Recommended Diagnostic Tests\n\n**Initial Assessment:**\n- Thorough history and physical examination (including neurological exam)\n- Headache diary (onset, duration, associated symptoms, triggers)\n\n**If Red Flags or Abnormal Findings:**\n- Neuroimaging (MRI preferred, CT if urgent)\n- Lumbar puncture (if meningitis or subarachnoid hemorrhage suspected)\n- Blood tests (CBC, CRP/ESR if infection or inflammation suspected)\n- Sinus imaging (if sinusitis suspected)\n- Vision assessment (if visual symptoms present)\n\n---\n\n### 3. Urgency Level\n\n**Medium**\n\n- Most headaches in this age group are benign, but careful assessment for red flags is essential.\n- If any red flags (see below) are present, urgency increases to **High**.\n\n---\n\n### 4. Key Observations and Clinical Notes\n\n- Isolated headache in a 13-year-old male is most commonly due to primary headache disorders.\n- Absence of associated symptoms (fever, vomiting, altered consciousness, visual changes, neck stiffness) in the provided information.\n- No medical history provided; relevant past history (e.g., trauma, chronic illness) is unknown.\n- Further history is crucial: onset, duration, character, location, associated symptoms, family history, medication use, recent infections, trauma.\n\n---\n\n### 5. Red Flags to Watch For\n\n- Sudden onset (\"thunderclap\" headache)\n- Severe, worsening, or persistent headache\n- Headache with fever, neck stiffness, photophobia, or altered mental status (meningitis/encephalitis)\n- Focal neurological deficits (weakness, vision changes, seizures)\n- Headache waking from sleep or worse in the morning (raised intracranial pressure)\n- Recent head trauma\n- Vomiting (especially projectile)\n- Immunosuppression or known malignancy\n\n---\n\n### 6. Confidence Level\n\n**Confidence Level:** 60%\n\n*Reasoning:*  \nAnalysis is limited by lack of detailed history, physical findings, and medical background. The most likely causes are benign, but serious secondary causes cannot be excluded without further information.\n\n---\n\n**Recommendation:**  \nA comprehensive clinical evaluation by a healthcare professional is essential to obtain a detailed history, perform a physical and neurological examination, and determine the need for further investigations. Immediate medical attention is warranted if any red flags are present.', NULL, NULL, NULL, NULL, 992, NULL, '2025-09-08 04:29:30', NULL, 98),
(22, 53, '44', 'headache', '**Patient Information:**  \n- Name: Mr Patient  \n- Age: 13 years  \n- Gender: Male  \n- Medical History: Not specified (entry \"dfgdfg\" not interpretable)\n\n**Current Symptom:**  \n- Headache\n\n---\n\n### 1. Potential Differential Diagnoses\n\nGiven the limited information (isolated headache in a 13-year-old male), consider the following common and serious causes:\n\n- **Primary Headache Disorders:**\n  - Migraine (with or without aura)\n  - Tension-type headache\n  - Cluster headache (less common in this age group)\n- **Secondary Headache Causes:**\n  - Viral or bacterial infection (e.g., sinusitis, upper respiratory tract infection, meningitis)\n  - Medication overuse headache\n  - Vision problems (refractive errors)\n  - Trauma (concussion, subdural hematoma)\n  - Intracranial mass or space-occupying lesion (rare but serious)\n  - Hypertension\n  - Dehydration\n  - Sleep disturbances\n\n---\n\n### 2. Recommended Diagnostic Tests\n\n**Initial Evaluation:**\n- Detailed history and physical examination (including neurological exam)\n- Assessment for recent trauma, fever, photophobia, neck stiffness, vomiting, visual changes, or focal neurological deficits\n\n**Further Investigations (if indicated by history/exam):**\n- **Neuroimaging (CT/MRI):** If red flags or abnormal neurological findings are present\n- **Lumbar puncture:** If meningitis or subarachnoid hemorrhage is suspected\n- **Laboratory tests:** CBC, CRP, ESR if infection or inflammation suspected\n- **Vision assessment:** If visual symptoms or eye strain suspected\n\n---\n\n### 3. Urgency Level\n\n**Medium**  \n- Isolated headache in a 13-year-old is common and often benign, but further assessment is needed to rule out serious causes.\n- **Urgency increases to High** if any red flags (see below) are present.\n\n---\n\n### 4. Key Observations and Clinical Notes\n\n- The symptom is non-specific; further history is crucial (onset, duration, character, associated symptoms, triggers, family history, medication use, recent infections, trauma).\n- Physical and neurological examination findings are essential to guide further workup.\n- Consider psychosocial factors (school stress, sleep hygiene).\n\n---\n\n### 5. Red Flags to Watch For\n\n- Sudden, severe (\"thunderclap\") headache\n- Headache with fever, neck stiffness, photophobia (meningitis)\n- Altered mental status, confusion, seizures\n- Focal neurological deficits (weakness, vision loss, ataxia)\n- Headache worsened by Valsalva, lying down, or in the morning (raised intracranial pressure)\n- Recent head trauma\n- Persistent vomiting\n- Immunosuppression or known malignancy\n\n---\n\n### 6. Confidence Level\n\n**Confidence Level:** 70%  \n- Confidence is limited by the lack of detailed history, physical examination, and medical background.  \n- Further information is required for a more precise assessment.\n\n---\n\n**Note:**  \nThis analysis is for informational purposes only. A thorough clinical evaluation by a healthcare professional is essential for accurate diagnosis and management. If any red flags are present, seek urgent medical attention.', NULL, NULL, NULL, NULL, 992, NULL, '2025-09-08 04:30:21', NULL, 98),
(23, 53, '44', 'Heaadace', '**Patient Information:**  \nName: Mr Patient  \nAge: 13 years  \nGender: Male  \nMedical History: Not specified (text appears non-informative)\n\n**Current Symptoms:**  \nHeadache\n\n---\n\n### 1. Potential Differential Diagnoses\n\nGiven the limited information (isolated headache in a 13-year-old male), consider the following common and serious causes:\n\n- **Primary Headache Disorders:**\n  - Migraine (with or without aura)\n  - Tension-type headache\n  - Cluster headache (less common in this age group)\n\n- **Secondary Headache Causes:**\n  - Viral or bacterial infection (e.g., sinusitis, upper respiratory tract infection, meningitis)\n  - Medication overuse headache\n  - Trauma (concussion, subdural hematoma)\n  - Vision problems (refractive errors, eye strain)\n  - Intracranial mass or increased intracranial pressure (rare but serious)\n  - Hypertension\n  - Dehydration\n\n---\n\n### 2. Recommended Diagnostic Tests\n\n**Initial Evaluation:**\n- Detailed history and physical examination (including neurological assessment)\n- Vital signs (temperature, blood pressure, heart rate)\n- Fundoscopic examination (to assess for papilledema)\n\n**Further Investigations (if indicated by history/exam):**\n- CBC, CRP/ESR (if infection or inflammation suspected)\n- Lumbar puncture (if meningitis or subarachnoid hemorrhage suspected)\n- CT/MRI brain (if red flags or abnormal neurological findings)\n- Sinus imaging (if sinusitis suspected)\n- Vision assessment (if visual symptoms)\n\n---\n\n### 3. Urgency Level\n\n**Low to Medium**  \n- If headache is mild, non-progressive, and not associated with red flag symptoms, urgency is **Low**.\n- If any red flags (see below) are present, urgency increases to **High**.\n\n---\n\n### 4. Key Observations and Clinical Notes\n\n- Isolated headache in an adolescent is most commonly benign (migraine or tension-type).\n- Lack of associated symptoms (fever, neck stiffness, vomiting, visual changes, altered mental status) in the provided information.\n- No history of trauma, recent illness, or medication use documented.\n- Medical history is unclear; further clarification needed.\n\n---\n\n### 5. Red Flags to Watch For\n\n- Sudden onset \"worst headache of life\"\n- Headache with fever, neck stiffness, photophobia (meningitis/encephalitis)\n- Altered mental status, confusion, seizures\n- Focal neurological deficits (weakness, vision loss, ataxia)\n- Papilledema (suggests increased intracranial pressure)\n- Headache waking from sleep or worse in the morning\n- Recent head trauma\n- Immunosuppression or known malignancy\n\n---\n\n### 6. Confidence Level\n\n**Confidence Level:** 60%  \n*Rationale: The analysis is based on a single symptom (\"headache\") with no detailed history, physical findings, or context. Confidence would increase with more comprehensive clinical information.*\n\n---\n\n**Note:**  \nThis analysis is not a substitute for a thorough clinical evaluation. Please ensure the patient is reviewed by a healthcare professional for a complete assessment and appropriate management.', NULL, NULL, NULL, NULL, 992, NULL, '2025-09-08 04:39:46', NULL, 98),
(24, 53, '44', 'Headace', '**Patient Analysis**\n\n**Patient Information:**  \n- Name: Mr Patient  \n- Age: 13 years  \n- Gender: Male  \n- Medical History: Not specified (text appears non-informative)\n\n**Current Symptom:**  \n- Headache\n\n---\n\n### 1. Potential Differential Diagnoses\n\nGiven the limited information (isolated headache in a 13-year-old male), possible causes include:\n\n- **Primary Headache Disorders:**\n  - Migraine (with or without aura)\n  - Tension-type headache\n  - Cluster headache (less common in this age group)\n\n- **Secondary Headache Causes:**\n  - Viral or bacterial infection (e.g., sinusitis, upper respiratory tract infection, meningitis)\n  - Medication overuse or withdrawal\n  - Dehydration\n  - Vision problems (refractive errors)\n  - Trauma (concussion, subdural hematoma)\n  - Intracranial pathology (tumor, hydrocephalus, idiopathic intracranial hypertension)\n  - Hypertension\n  - Dental or temporomandibular joint (TMJ) issues\n\n---\n\n### 2. Recommended Diagnostic Tests\n\n**Initial Evaluation:**\n- Detailed history and physical/neurological examination\n\n**Further Investigations (if indicated by history/exam):**\n- CBC, CRP/ESR (if infection or inflammation suspected)\n- Urinalysis (if systemic symptoms)\n- Imaging (CT/MRI brain) if red flags present (see below)\n- Lumbar puncture (if meningitis or subarachnoid hemorrhage suspected)\n- Ophthalmologic evaluation (if visual symptoms or papilledema suspected)\n- Blood pressure measurement\n\n---\n\n### 3. Urgency Level\n\n**Medium**  \n- Headache in a 13-year-old is common and often benign, but further assessment is needed to rule out serious causes, especially if red flags are present.\n\n---\n\n### 4. Key Observations and Clinical Notes\n\n- Isolated headache in an adolescent is most commonly due to primary headache disorders.\n- Lack of associated symptoms (fever, neck stiffness, vomiting, visual changes, altered consciousness) in the provided information.\n- No trauma or chronic medical conditions reported.\n- Incomplete medical history; further details needed for comprehensive assessment.\n\n---\n\n### 5. Red Flags to Watch For\n\nImmediate evaluation is warranted if any of the following are present:\n- Sudden, severe (\"thunderclap\") headache\n- Headache with fever, neck stiffness, photophobia (meningitis/encephalitis)\n- Altered mental status, seizures, focal neurological deficits\n- Papilledema or visual changes\n- Headache worse with Valsalva, lying down, or in the morning (raised intracranial pressure)\n- Recent head trauma\n- Persistent vomiting\n- Immunosuppression or known malignancy\n\n---\n\n### 6. Confidence Level\n\n**Confidence Level:** 60%  \n- Confidence is limited by the lack of detailed history, associated symptoms, and physical findings. Further information is essential for a more accurate assessment.\n\n---\n\n**Note:**  \nThis analysis is based on the limited information provided. A thorough clinical evaluation by a healthcare professional is essential for accurate diagnosis and management. If any red flag symptoms develop, seek immediate medical attention.', NULL, NULL, NULL, NULL, 992, NULL, '2025-09-08 04:50:24', NULL, 98),
(25, 53, '44', 'Headache', '**Patient Information:**  \nName: Mr Patient  \nAge: 13 years  \nGender: Male  \nMedical History: Not specified (notation \"dfgdfg\" is non-informative)\n\n**Current Symptom:**  \nHeadache\n\n---\n\n### 1. Potential Differential Diagnoses\n\nIn a 13-year-old male presenting with headache, differentials include:\n\n- **Primary Headaches:**\n  - Migraine (with or without aura)\n  - Tension-type headache\n  - Cluster headache (less common at this age)\n\n- **Secondary Headaches:**\n  - Viral or bacterial infection (e.g., sinusitis, upper respiratory tract infection, meningitis/encephalitis)\n  - Medication overuse or withdrawal\n  - Head trauma (concussion, subdural/epidural hematoma)\n  - Vision problems (refractive errors)\n  - Intracranial mass lesion (tumor, abscess, hydrocephalus)\n  - Hypertension\n  - Idiopathic intracranial hypertension\n\n---\n\n### 2. Recommended Diagnostic Tests\n\nThe choice of tests depends on further history and physical findings. Initial recommendations:\n\n- **History & Physical Exam:** Detailed neurological and general physical examination\n- **Basic Investigations:**\n  - Vital signs (including blood pressure)\n  - Fundoscopy (to assess for papilledema)\n  - Visual acuity testing\n- **If red flags or abnormal findings:**\n  - Neuroimaging (CT/MRI brain)\n  - Lumbar puncture (if meningitis, encephalitis, or subarachnoid hemorrhage suspected)\n  - Laboratory tests (CBC, CRP, ESR, electrolytes)\n\n---\n\n### 3. Urgency Level\n\n- **Medium** (based on isolated headache and lack of red flag symptoms in the provided information)\n- **High** if any red flags are present (see below)\n\n---\n\n### 4. Key Observations and Clinical Notes\n\n- The symptom is non-specific: further history is essential (onset, duration, quality, associated symptoms, triggers, family history, medication use, trauma, recent infections).\n- No mention of fever, neck stiffness, vomiting, visual changes, or altered consciousness.\n- No prior medical history provided.\n- Headaches in this age group are often benign but secondary causes must be ruled out, especially with new, severe, or progressive symptoms.\n\n---\n\n### 5. Red Flags to Watch For\n\n- Sudden, severe (“thunderclap”) headache\n- Headache with fever, neck stiffness, photophobia (concern for meningitis/encephalitis)\n- Altered mental status, confusion, or seizures\n- Focal neurological deficits (weakness, numbness, vision loss)\n- Papilledema or signs of increased intracranial pressure (vomiting, worse lying down)\n- Headache waking patient from sleep\n- Recent head trauma\n- Immunocompromised state or known malignancy\n\n---\n\n### 6. Confidence Level\n\n**Confidence Level:** 70%  \n*Rationale: The analysis is based on a single, non-specific symptom with insufficient clinical context or history. Confidence would increase with a more detailed history and examination findings.*\n\n---\n\n**Note:**  \nThis analysis is intended to guide further assessment and is not a substitute for direct clinical evaluation. Prompt review by a healthcare professional is recommended to obtain a thorough history, perform an examination, and determine appropriate management.', NULL, NULL, NULL, NULL, 992, NULL, '2025-09-08 04:51:38', NULL, 98),
(26, 53, '44', 'headache', '**Patient Information:**  \nName: Mr Patient  \nAge: 13 years  \nGender: Male  \nMedical History: Not specified (text \"dfgdfg\" is not interpretable)\n\n**Current Symptom:**  \nHeadache\n\n---\n\n### 1. Potential Differential Diagnoses\n\nGiven the limited information (isolated headache in a 13-year-old male), consider the following common and serious causes:\n\n- **Primary Headache Disorders:**\n  - Tension-type headache\n  - Migraine (with or without aura)\n  - Cluster headache (less common in this age group)\n\n- **Secondary Headache Causes:**\n  - Viral or bacterial infection (e.g., sinusitis, upper respiratory tract infection, meningitis)\n  - Medication overuse or withdrawal\n  - Vision problems (e.g., refractive errors)\n  - Trauma (recent head injury)\n  - Intracranial pathology (e.g., tumor, hydrocephalus, idiopathic intracranial hypertension)\n  - Hypertension\n  - Dehydration\n\n---\n\n### 2. Recommended Diagnostic Tests\n\n**Initial Evaluation:**\n- Detailed history and physical examination (including neurological exam)\n- Assessment for associated symptoms: fever, neck stiffness, photophobia, vomiting, visual changes, altered mental status, recent trauma\n\n**If Red Flags or Abnormal Findings:**\n- Neuroimaging (CT or MRI brain)\n- Lumbar puncture (if meningitis or subarachnoid hemorrhage suspected)\n- Blood tests (CBC, inflammatory markers if infection suspected)\n- Ophthalmologic evaluation (if visual symptoms or papilledema suspected)\n\n---\n\n### 3. Urgency Level\n\n**Medium**  \n- Most headaches in this age group are benign, but a careful assessment for red flags is essential.\n- If any red flags are present (see below), urgency escalates to **High**.\n\n---\n\n### 4. Key Observations and Clinical Notes\n\n- Isolated headache in a 13-year-old is most commonly due to primary headache disorders or benign causes.\n- Lack of additional symptoms (fever, vomiting, altered consciousness) in the provided data lowers suspicion for acute life-threatening causes, but absence of evidence is not evidence of absence.\n- Medical history is not provided; relevant history (e.g., recent trauma, family history of migraine, medication use, prior similar episodes) is crucial for further narrowing the differential.\n\n---\n\n### 5. Red Flags to Watch For\n\n- Sudden, severe (\"thunderclap\") headache\n- Headache with fever, neck stiffness, photophobia (meningitis/encephalitis)\n- Headache with vomiting, especially early morning or projectile\n- Altered mental status, confusion, seizures\n- Focal neurological deficits (weakness, vision loss, ataxia)\n- Papilledema (suggestive of increased intracranial pressure)\n- Recent head trauma\n- Immunosuppression or underlying malignancy\n\n---\n\n### 6. Confidence Level\n\n**Confidence Level:** 60%  \n- Confidence is moderate due to the limited clinical information provided. A more detailed history and examination are essential for a more accurate assessment.\n\n---\n\n**Note:**  \nThis analysis is based on the information provided. A thorough clinical evaluation by a healthcare professional is necessary for accurate diagnosis and management. If any red flag symptoms develop, seek immediate medical attention.', NULL, NULL, NULL, NULL, 992, NULL, '2025-09-08 04:57:05', NULL, 98),
(27, 53, '44', 'Headache', '**Patient Information:**  \nName: Mr Patient  \nAge: 13 years  \nGender: Male  \nMedical History: Not specified (text appears non-informative)\n\n**Current Symptom:**  \nHeadache\n\n---\n\n### 1. Potential Differential Diagnoses\n\nGiven the limited information (isolated headache in a 13-year-old male), consider the following common and serious causes:\n\n- **Primary Headache Disorders:**\n  - Migraine (with or without aura)\n  - Tension-type headache\n  - Cluster headache (less common in this age group)\n\n- **Secondary Headache Causes:**\n  - Viral or bacterial infection (e.g., sinusitis, upper respiratory infection, meningitis)\n  - Medication overuse or withdrawal\n  - Dehydration\n  - Vision problems (refractive errors)\n  - Trauma (concussion, subdural hematoma)\n  - Intracranial mass or increased intracranial pressure (rare but serious)\n  - Hypertension\n  - Dental issues (e.g., temporomandibular joint dysfunction)\n  - Sleep disorders\n\n---\n\n### 2. Recommended Diagnostic Tests\n\n**Initial evaluation should be guided by history and physical examination.**  \nIf the headache is new, severe, or associated with concerning features, consider:\n\n- **Basic Workup:**\n  - Full neurological examination\n  - Vital signs (including blood pressure)\n  - Fundoscopic examination (for papilledema)\n  - Sinus examination\n\n- **Further Testing (if indicated by red flags or abnormal exam):**\n  - CBC, CRP/ESR (if infection or inflammation suspected)\n  - CT or MRI brain (if signs of increased intracranial pressure, focal neurological deficit, or trauma)\n  - Lumbar puncture (if meningitis or subarachnoid hemorrhage suspected)\n  - Vision assessment (if visual symptoms present)\n\n---\n\n### 3. Urgency Level\n\n**Medium**  \n- Most pediatric headaches are benign, but the urgency increases if red flags are present (see below).\n- If any red flags are present, escalate to **High** urgency.\n\n---\n\n### 4. Key Observations and Clinical Notes\n\n- Isolated headache in a 13-year-old is most commonly due to benign causes (migraine, tension-type).\n- Lack of additional symptoms (fever, neck stiffness, vomiting, altered mental status, visual changes, trauma) makes serious causes less likely, but absence of information does not rule them out.\n- Detailed history (onset, duration, character, associated symptoms, triggers, family history, medication use) and physical exam are essential for further risk stratification.\n\n---\n\n### 5. Red Flags to Watch For\n\n- Sudden, severe (\"thunderclap\") headache\n- Headache with fever, neck stiffness, photophobia (meningitis)\n- Altered mental status, confusion, or seizures\n- Focal neurological deficits (weakness, vision loss, ataxia)\n- Papilledema or signs of increased intracranial pressure (worse with lying down, vomiting)\n- Headache waking from sleep or worse in the morning\n- Recent head trauma\n- Immunosuppression or known malignancy\n- Persistent vomiting\n\n---\n\n### 6. Confidence Level\n\n**Confidence Level:** 70%  \n- Confidence is moderate due to the very limited clinical information provided. A thorough history and physical examination are required for a more definitive assessment.\n\n---\n\n**Note:**  \nThis analysis is based on the information provided. A face-to-face evaluation by a healthcare professional is essential for accurate diagnosis and management. If any red flags are present, seek urgent medical attention.', NULL, NULL, NULL, NULL, 992, NULL, '2025-09-08 05:18:57', NULL, 98),
(28, 53, '44', 'headache', '**Patient Information:**  \nName: Mr Patient  \nAge: 13 years  \nGender: Male  \nMedical History: Not specified (text \"dfgdfg\" is non-informative)\n\n**Presenting Symptom:**  \nHeadache\n\n---\n\n### 1. Potential Differential Diagnoses\n\nIn a 13-year-old male with headache and no further history provided, consider the following common and serious causes:\n\n- **Primary Headache Disorders:**\n  - Migraine (with or without aura)\n  - Tension-type headache\n  - Cluster headache (less common in this age group)\n\n- **Secondary Headache Causes:**\n  - Viral or bacterial infection (e.g., sinusitis, upper respiratory tract infection, meningitis)\n  - Medication overuse headache\n  - Head trauma/concussion\n  - Vision problems (refractive errors, eye strain)\n  - Dehydration\n  - Sleep disturbances\n  - Intracranial pathology (e.g., mass lesion, hydrocephalus, idiopathic intracranial hypertension)\n  - Hypertension\n  - Dental issues (e.g., temporomandibular joint dysfunction)\n\n---\n\n### 2. Recommended Diagnostic Tests\n\n**Initial Evaluation:**\n- **History and Physical Examination:**  \n  - Detailed headache history (onset, duration, location, quality, associated symptoms, triggers, relieving factors, family history)\n  - Neurological examination\n  - Vital signs (including blood pressure)\n\n**Further Investigations (if indicated by history/exam):**\n- **Laboratory Tests:**  \n  - CBC, CRP/ESR (if infection or inflammation suspected)\n- **Imaging:**  \n  - Brain MRI or CT (if red flags present or abnormal neurological findings)\n- **Other:**  \n  - Ophthalmologic evaluation (if visual symptoms or papilledema suspected)\n  - Lumbar puncture (if meningitis or raised intracranial pressure suspected)\n\n---\n\n### 3. Urgency Level\n\n**Medium**  \n- Most pediatric headaches are benign, but a thorough assessment is needed to rule out serious causes.\n- Urgency increases to **High** if any red flags (see below) are present.\n\n---\n\n### 4. Key Observations and Clinical Notes\n\n- **Age-appropriate causes:** Migraine and tension-type headaches are common in adolescents.\n- **Lack of detailed history:** Unable to assess chronicity, associated symptoms (e.g., fever, vomiting, photophobia, neck stiffness), or precipitating factors.\n- **No medical history provided:** Unknown risk factors or comorbidities.\n- **No mention of trauma or systemic symptoms.**\n- **No neurological findings provided.**\n\n---\n\n### 5. Red Flags to Watch For\n\nImmediate evaluation is warranted if any of the following are present:\n\n- Sudden, severe (\"worst ever\") headache\n- Headache with fever, neck stiffness, photophobia (meningitis/encephalitis)\n- Altered mental status, seizures, or focal neurological deficits\n- Papilledema or visual changes\n- Headache worse with Valsalva, lying down, or in the morning (raised intracranial pressure)\n- Recent head trauma\n- Persistent vomiting\n- Immunosuppression or known malignancy\n- Age <6 years with new severe headache\n\n---\n\n**Summary:**  \nA 13-year-old male with headache requires a detailed history and physical exam to guide further workup. Most headaches in this age group are benign, but red flags must be excluded. If any concerning features are present, urgent neuroimaging and specialist referral are indicated.\n\n**Recommendation:**  \nConsult a healthcare professional for a comprehensive evaluation. If any red flags develop, seek immediate medical attention.', NULL, NULL, NULL, NULL, 992, NULL, '2025-09-08 05:32:18', NULL, 98),
(29, 53, '44', 'headache', '**Patient Information:**  \nName: Mr Patient  \nAge: 13 years  \nGender: Male  \nMedical History: Not specified (entry \"dfgdfg\" appears non-informative)\n\n**Presenting Symptom:**  \nHeadache\n\n---\n\n### 1. Potential Differential Diagnoses\n\nIn a 13-year-old male presenting with headache, consider the following common and serious causes:\n\n**Primary Headache Disorders:**\n- Migraine (with or without aura)\n- Tension-type headache\n- Cluster headache (less common in this age group)\n\n**Secondary Headache Causes:**\n- Viral or bacterial infection (e.g., sinusitis, upper respiratory tract infection, meningitis)\n- Medication overuse headache\n- Head trauma/concussion\n- Vision problems (refractive errors)\n- Dental issues (e.g., temporomandibular joint dysfunction)\n- Intracranial pathology (e.g., tumor, hydrocephalus, idiopathic intracranial hypertension)\n- Hypertension\n- Dehydration\n\n---\n\n### 2. Recommended Diagnostic Tests\n\n**Initial Evaluation:**\n- Comprehensive history and physical examination, including neurological assessment\n- Vital signs (including blood pressure)\n- Fundoscopic examination (to assess for papilledema)\n\n**Further Investigations (if indicated by history/exam):**\n- CBC, CRP/ESR (if infection or inflammation suspected)\n- Lumbar puncture (if meningitis or subarachnoid hemorrhage suspected)\n- Neuroimaging (CT/MRI brain) if:\n  - Abnormal neurological findings\n  - Sudden onset (\"thunderclap\" headache)\n  - Signs of raised intracranial pressure\n  - Headache awakens patient from sleep or is worse in the morning\n  - New onset severe headache\n- Sinus imaging (if sinusitis suspected)\n- Vision assessment (if visual symptoms present)\n\n---\n\n### 3. Urgency Level\n\n**Medium** (based on current information)\n\n- **Low** if headache is mild, intermittent, with no red flags, and normal exam.\n- **High** if any red flags (see below) are present.\n\n---\n\n### 4. Key Observations and Clinical Notes\n\n- **History:** Onset, duration, location, character, severity, associated symptoms (nausea, vomiting, photophobia, phonophobia, visual changes, neck stiffness, fever, recent trauma, focal neurological deficits, recent illness).\n- **Family history:** Migraine or other headache disorders.\n- **Medication history:** Recent changes, over-the-counter or prescription drugs.\n- **Social history:** School stress, screen time, sleep patterns.\n- **Physical exam:** General appearance, vital signs, neurological exam, fundoscopic exam, sinus tenderness, neck stiffness.\n\n---\n\n### 5. Red Flags to Watch For\n\n- Sudden, severe (\"worst ever\") headache\n- Headache with fever, neck stiffness, photophobia (meningitis)\n- Altered mental status, confusion, seizures\n- Focal neurological deficits (weakness, vision loss, ataxia)\n- Papilledema (signs of raised intracranial pressure)\n- Headache that awakens from sleep or is worse in the morning\n- Recent head trauma\n- Persistent vomiting\n- Immunosuppression or known malignancy\n\n---\n\n**Clinical Note:**  \nGiven the limited information, a thorough history and physical examination are essential to guide further workup. If any red flags are present, urgent evaluation is warranted. Otherwise, outpatient management and monitoring may be appropriate.\n\n**Recommendation:**  \nAdvise prompt evaluation by a healthcare professional to further characterize the headache and rule out serious causes.', NULL, NULL, NULL, NULL, 992, NULL, '2025-09-08 05:33:27', NULL, 98),
(30, 53, '44', 'Headache', '**Patient Analysis: Headache in a 13-year-old Male**\n\n---\n\n**1. Potential Differential Diagnoses**\n\n- **Primary Headache Disorders**\n  - Migraine (with or without aura)\n  - Tension-type headache\n  - Cluster headache (less common in this age group)\n\n- **Secondary Headache Causes**\n  - Sinusitis\n  - Viral or bacterial infection (e.g., upper respiratory tract infection, meningitis)\n  - Medication overuse headache\n  - Refractive error (vision problems)\n  - Trauma (recent head injury)\n  - Intracranial pathology (tumor, hydrocephalus, hemorrhage)\n  - Hypertension\n  - Dental issues (e.g., temporomandibular joint dysfunction)\n  - Dehydration\n\n---\n\n**2. Recommended Diagnostic Tests**\n\n*Initial evaluation should be guided by history and physical examination. Consider the following:*\n\n- **Basic Workup**\n  - Detailed history and neurological examination\n  - Vital signs (including blood pressure)\n  - Fundoscopic examination (for papilledema)\n  - Sinus examination\n\n- **Further Investigations (if indicated by red flags or abnormal findings)**\n  - Neuroimaging (MRI or CT brain) if suspicion of intracranial pathology\n  - Lumbar puncture (if signs of meningitis or subarachnoid hemorrhage)\n  - CBC, CRP/ESR (if infection or inflammation suspected)\n  - Vision assessment (if visual symptoms present)\n\n---\n\n**3. Urgency Level**\n\n- **Medium** (based on current information)\n  - *If only headache is present without red flags or abnormal findings, outpatient evaluation is appropriate.*\n  - *If any red flags are present (see below), urgency increases to High.*\n\n---\n\n**4. Key Observations and Clinical Notes**\n\n- Age and gender: 13-year-old male\n- Symptom: Headache (no further details provided)\n- No past medical history of note (medical history entry appears non-specific)\n- No associated symptoms provided (e.g., fever, neck stiffness, vomiting, visual changes, trauma)\n- No mention of recent illness, trauma, or medication use\n\n*Clinical notes:*\n- A thorough history is essential (onset, duration, location, character, associated symptoms, triggers, family history of migraine, impact on daily activities).\n- Physical and neurological examination is critical to rule out secondary causes.\n\n---\n\n**5. Red Flags to Watch For**\n\n- Sudden, severe (\"thunderclap\") headache\n- Headache with fever, neck stiffness, photophobia (meningitis/encephalitis)\n- Altered mental status, confusion, seizures\n- Focal neurological deficits (weakness, vision loss, ataxia)\n- Papilledema (suggests increased intracranial pressure)\n- Headache worsening with Valsalva, lying down, or in the morning\n- Recent head trauma\n- New onset headache in a patient with cancer or immunosuppression\n- Persistent vomiting\n- Headache that awakens from sleep\n\n---\n\n**Summary:**  \nMr Patient, a 13-year-old male, presents with headache. The differential is broad and includes primary and secondary causes. The urgency is medium unless red flags are present. A detailed history and examination are essential to guide further workup. Immediate attention is warranted if any red flags develop.\n\n**Recommendation:**  \nAdvise prompt evaluation by a healthcare professional for further assessment and management.', 'sinus', '', 'Certainly. Based on the information provided—including the clinical input of \"sinus\"—the most likely diagnosis is **acute sinusitis** (rhinosinusitis) as the cause of headache in this 13-year-old male. Below is a comprehensive, evidence-based treatment plan:\n\n---\n\n### 1. Primary Diagnosis\n\n**Acute Sinusitis (Acute Rhinosinusitis)**\n\n---\n\n### 2. Treatment Goals\n\n- Relieve headache and sinus symptoms\n- Eradicate infection (if bacterial)\n- Prevent complications (e.g., orbital or intracranial spread)\n- Restore normal sinus function\n- Minimize unnecessary antibiotic use\n\n---\n\n### 3. Medication Recommendations\n\n#### a. **First-line: Symptomatic Management**\n- **Analgesics/Antipyretics:**  \n  - *Acetaminophen* 10–15 mg/kg/dose every 4–6 hours as needed (max 75 mg/kg/day)\n  - *Ibuprofen* 5–10 mg/kg/dose every 6–8 hours as needed (max 40 mg/kg/day)\n\n- **Nasal Saline Irrigation:**  \n  - Isotonic saline nasal spray or irrigation 2–3 times daily\n\n- **Intranasal Corticosteroids** (if significant nasal congestion or allergic rhinitis):  \n  - *Fluticasone nasal spray* 1–2 sprays per nostril once daily\n\n#### b. **Antibiotics**  \n*Indicated only if:*\n- Symptoms persist >10 days without improvement\n- Severe symptoms (fever ≥39°C, purulent nasal discharge, facial pain) for ≥3 consecutive days\n- Worsening symptoms after initial improvement (\"double sickening\")\n\n**First-line antibiotic:**\n- *Amoxicillin-clavulanate* 45 mg/kg/day (amoxicillin component) divided every 12 hours for 10 days  \n  - If non-severe penicillin allergy: *Cefdinir* 14 mg/kg/day in 1–2 doses for 10 days  \n  - If severe allergy: *Levofloxacin* 10–20 mg/kg/day once daily for 10 days\n\n**Note:** Do not use macrolides due to resistance.\n\n---\n\n### 4. Non-Pharmacological Interventions\n\n- Encourage adequate hydration\n- Warm compresses over sinuses for pain relief\n- Rest\n- Avoid exposure to irritants (smoke, strong odors)\n- Humidified air (cool mist humidifier in bedroom)\n\n---\n\n### 5. Follow-up Schedule\n\n- **Routine:** Reassess in 48–72 hours if symptoms worsen or fail to improve\n- **Earlier:** Immediate evaluation if red flag symptoms develop (see below)\n- **After antibiotics:** Re-evaluate at end of course if not fully resolved\n\n---\n\n### 6. Monitoring Parameters\n\n- Symptom resolution (headache, nasal congestion, discharge, facial pain)\n- Temperature (fever resolution)\n- Adverse effects of medications (GI upset, rash, allergic reaction)\n- Signs of complications (see below)\n\n---\n\n### 7. Patient Education Points\n\n- Most sinus infections are viral and resolve without antibiotics\n- Use antibiotics only as prescribed; complete the full course if started\n- Proper technique for nasal saline irrigation\n- Recognize and report red flag symptoms promptly\n- Avoid overuse of decongestants (risk of rebound congestion)\n- Maintain good hand hygiene to prevent spread of infection\n\n---\n\n### 8. Potential Complications to Watch For\n\n- **Orbital complications:** Periorbital swelling, erythema, visual changes, ophthalmoplegia\n- **Intracranial complications:** Severe headache, altered mental status, persistent vomiting, neck stiffness, seizures\n- **Chronic sinusitis:** Symptoms >12 weeks\n- **Antibiotic adverse reactions:** Rash, diarrhea, anaphylaxis\n\n---\n\n**Summary:**  \nMr Patient likely has acute sinusitis. Begin with symptomatic management; reserve antibiotics for persistent, severe, or worsening symptoms. Educate on red flags and ensure close follow-up. Consult ENT or refer to hospital if complications or red flags arise.\n\n**Always recommend consultation with a healthcare professional for confirmation of diagnosis and ongoing management.**', 'Medications:\n1. Acetaminophen 325 mg - 1 tablet by mouth every 4–6 hours as needed for pain or fever - Maximum 5 doses in 24 hours\n2. Isotonic saline nasal spray - 2 sprays per nostril - 2 to 3 times daily - For 10 days\n3. Fluticasone nasal spray 50 mcg - 1 spray per nostril - Once daily - For 10 days\n\nInstructions:\n- Take acetaminophen with or without food as needed for headache or fever. Do not exceed the maximum daily dose.\n- Use saline nasal spray to help clear nasal congestion.\n- Use fluticasone nasal spray at the same time each day. Shake well before use.\n- Drink plenty of fluids and get adequate rest.\n- Apply a warm compress over the sinuses for pain relief.\n\nPrecautions:\n- Do not use over-the-counter decongestant nasal sprays for more than 3 days to avoid rebound congestion.\n- Seek medical attention if symptoms worsen, do not improve after 10 days, or if you develop severe headache, swelling around the eyes, vision changes, persistent vomiting, neck stiffness, or rash.', 992, 992, '2025-09-08 05:37:00', '2025-09-08 05:38:35', 98);
INSERT INTO `treatment_plans` (`id`, `patient_id`, `doctor_id`, `symptoms`, `symptom_analysis`, `doctor_input`, `test_results`, `treatment_plan`, `prescription`, `created_by`, `updated_by`, `created_at`, `updated_at`, `hospital_id`) VALUES
(31, 53, '44', 'headache', '**Patient Information:**  \nName: Mr Patient  \nAge: 13 years  \nGender: Male  \nMedical History: Not specified (text appears non-informative)\n\n**Presenting Symptom:**  \nHeadache\n\n---\n\n### 1. Potential Differential Diagnoses\n\nIn a 13-year-old male presenting with headache, consider the following common and serious causes:\n\n- **Primary Headache Disorders:**\n  - Migraine (with or without aura)\n  - Tension-type headache\n  - Cluster headache (less common in this age group)\n\n- **Secondary Headache Causes:**\n  - Viral or bacterial infection (e.g., sinusitis, upper respiratory tract infection, meningitis)\n  - Medication overuse or withdrawal\n  - Refractive error (vision problems)\n  - Trauma (concussion, subdural/epidural hematoma)\n  - Intracranial mass or space-occupying lesion (rare, but important to consider)\n  - Hypertension\n  - Dental or temporomandibular joint (TMJ) issues\n  - Dehydration\n\n---\n\n### 2. Recommended Diagnostic Tests\n\n**Initial Evaluation:**\n- **Thorough history and physical examination** (including neurological exam)\n- **Vital signs** (including blood pressure, temperature)\n\n**Further investigations based on clinical suspicion:**\n- **CBC, CRP/ESR** (if infection or inflammation suspected)\n- **Urinalysis** (if systemic symptoms)\n- **Ophthalmologic evaluation** (if visual symptoms)\n- **Neuroimaging (CT/MRI brain):**\n  - If red flags present (see below)\n  - Abnormal neurological findings\n  - Sudden onset (\"thunderclap\" headache)\n  - Headache worsened by Valsalva or position\n- **Lumbar puncture:** If meningitis or subarachnoid hemorrhage suspected and imaging is negative\n\n---\n\n### 3. Urgency Level\n\n**Medium**  \n- Most pediatric headaches are benign, but a careful assessment is required to rule out serious causes.\n- If any red flags are present (see below), urgency increases to **High**.\n\n---\n\n### 4. Key Observations and Clinical Notes\n\n- **History:** Onset, duration, frequency, location, quality, severity, associated symptoms (nausea, vomiting, photophobia, phonophobia, visual changes, fever, neck stiffness, recent trauma, altered mental status)\n- **Family history:** Migraines or neurological disorders\n- **Medication use:** Recent changes, overuse\n- **Social history:** School stress, sleep patterns, screen time, caffeine use\n- **Physical exam:** Full neurological exam, fundoscopic exam (for papilledema), assessment for meningeal signs, sinus tenderness\n\n---\n\n### 5. Red Flags to Watch For\n\n- Sudden, severe (\"worst ever\") headache\n- Headache with fever, neck stiffness, photophobia (meningitis/encephalitis)\n- Altered mental status, confusion, seizures\n- Focal neurological deficits (weakness, vision loss, ataxia)\n- Papilledema (suggests increased intracranial pressure)\n- Headache worsened by lying down, coughing, or Valsalva\n- Recent head trauma\n- Persistent vomiting\n- Headache awakening from sleep or present on awakening\n- Immunosuppression or known malignancy\n\n---\n\n**Summary:**  \nA 13-year-old male with headache requires a thorough history and physical exam to distinguish between primary and secondary causes. Most headaches in this age group are benign, but red flags must be actively sought. If any are present, urgent evaluation and neuroimaging are warranted. Otherwise, outpatient workup and symptomatic management may be appropriate.\n\n**Recommendation:**  \nFurther clinical details are needed. Please consult a healthcare professional for a comprehensive evaluation.', 'migrane', '', 'Certainly. Here is a comprehensive, structured treatment plan for a 13-year-old male diagnosed with **migraine**:\n\n---\n\n## 1. Primary Diagnosis\n\n**Migraine headache** (pediatric/adolescent onset)\n\n---\n\n## 2. Treatment Goals\n\n- Rapid relief of acute migraine attacks\n- Minimize headache frequency, severity, and duration\n- Prevent migraine-related disability (school absence, activity limitation)\n- Reduce reliance on acute medications and prevent medication overuse\n- Identify and manage triggers\n- Monitor for and prevent complications\n\n---\n\n## 3. Medication Recommendations\n\n### a. **Acute (Abortive) Treatment**\n\n**First-line:**\n- **Acetaminophen**: 15 mg/kg/dose PO, max 1000 mg/dose, every 4–6 hours as needed (max 75 mg/kg/day or 4000 mg/day)\n- **Ibuprofen**: 10 mg/kg/dose PO, max 600 mg/dose, every 6–8 hours as needed (max 40 mg/kg/day or 2400 mg/day)\n\n**If inadequate response and diagnosis confirmed:**\n- **Triptans** (approved for pediatric use; age restrictions apply):\n    - **Sumatriptan nasal spray**: 5–20 mg (start with 10 mg), may repeat once after 2 hours if needed (max 40 mg/24h)\n    - **Rizatriptan**: 5 mg PO (for ages 6–17 years, weight-based), may repeat once after 2 hours (max 10 mg/24h)\n\n**Note:** Avoid opioid and barbiturate-containing medications.\n\n### b. **Preventive (Prophylactic) Treatment**\n\nConsider if:\n- ≥4 disabling headaches/month\n- Significant impact on quality of life\n- Poor response to acute therapy\n\n**Options:**\n- **Propranolol**: 10–20 mg PO BID, titrate as needed (max 2–4 mg/kg/day)\n- **Amitriptyline**: 0.25–1 mg/kg PO at bedtime\n- **Topiramate**: 25 mg PO at bedtime, titrate up to 100 mg/day as tolerated\n\n**Selection based on comorbidities, side effect profile, and patient/family preference.**\n\n---\n\n## 4. Non-Pharmacological Interventions\n\n- **Lifestyle modifications:**\n    - Regular sleep schedule\n    - Hydration (adequate fluid intake)\n    - Regular meals, avoid skipping meals\n    - Limit caffeine and screen time\n    - Regular physical activity\n- **Trigger identification and avoidance:** Keep a headache diary\n- **Stress management:** Relaxation techniques, cognitive-behavioral therapy (CBT) if indicated\n- **Biofeedback** (if available)\n- **Education** on early recognition and management of symptoms\n\n---\n\n## 5. Follow-up Schedule\n\n- **Initial follow-up:** 2–4 weeks after starting treatment or sooner if symptoms worsen\n- **Subsequent follow-ups:** Every 3 months if stable, or as clinically indicated\n- **Headache diary review** at each visit\n\n---\n\n## 6. Monitoring Parameters\n\n- **Headache frequency, severity, and duration** (headache diary)\n- **Medication use:** Frequency and response to abortive therapy\n- **Side effects** of medications (e.g., drowsiness, weight changes, mood changes)\n- **Impact on daily activities** (school attendance, participation in activities)\n- **Vital signs** (especially if on beta-blockers)\n- **Growth parameters** (height, weight, BMI)\n\n---\n\n## 7. Patient Education Points\n\n- **Nature of migraine:** Not dangerous, but can be disabling\n- **Importance of early treatment:** Take medication at onset of headache for best effect\n- **Avoid medication overuse:** Limit acute medications to ≤2–3 days/week to prevent rebound headaches\n- **Lifestyle factors:** Emphasize regular routines and trigger avoidance\n- **When to seek urgent care:** If headache is sudden/severe, associated with fever, neck stiffness, confusion, weakness, vision loss, or persistent vomiting\n\n---\n\n## 8. Potential Complications to Watch For\n\n- **Medication overuse headache** (rebound headache)\n- **Adverse effects** of medications (GI upset, sedation, mood changes, weight gain/loss, cognitive effects)\n- **Progression to chronic migraine**\n- **Psychosocial impact:** School absenteeism, anxiety, depression\n- **Development of new or atypical symptoms** (may indicate secondary cause)\n\n---\n\n**Note:**  \nThis plan should be individualized based on the patient’s full history, comorbidities, and response to therapy. All medication dosages should be confirmed and adjusted as appropriate for age and weight. **Consultation with a pediatric neurologist** is recommended for refractory or complex cases.\n\n**Always advise close follow-up and re-evaluation if symptoms change or do not improve.**', NULL, 992, 992, '2025-09-08 05:54:33', '2025-09-08 05:55:43', 98),
(32, 53, '44', 'RIght hand arm muscle pain ', '**Patient Information:**  \nName: Mr Patient  \nAge: 13 years  \nGender: Male  \nMedical History: Not specified (text appears as placeholder)\n\n**Presenting Complaint:**  \nRight hand/arm muscle pain\n\n---\n\n### 1. Potential Differential Diagnoses\n\n- **Muscle strain or overuse injury** (most common in adolescents, especially if involved in sports or physical activity)\n- **Minor trauma or contusion** (history of recent injury, fall, or impact)\n- **Tendinitis or tenosynovitis**\n- **Nerve compression or entrapment** (e.g., carpal tunnel syndrome, though less common at this age)\n- **Infection** (cellulitis, abscess, or myositis—especially if associated with redness, swelling, or fever)\n- **Referred pain** (from cervical radiculopathy or shoulder pathology)\n- **Juvenile idiopathic arthritis** (if associated with joint swelling, morning stiffness)\n- **Compartment syndrome** (rare, but critical to rule out if severe pain, swelling, or neurovascular compromise)\n- **Bone pathology** (e.g., fracture, osteomyelitis, bone tumor—less likely but important to consider)\n\n---\n\n### 2. Recommended Diagnostic Tests\n\n- **Detailed physical examination** (inspection, palpation, range of motion, neurovascular assessment)\n- **Plain X-ray** of the right hand/arm (if trauma suspected or to rule out fracture)\n- **Ultrasound** (if soft tissue injury, abscess, or tenosynovitis suspected)\n- **CBC, ESR, CRP** (if infection or inflammatory process suspected)\n- **MRI** (if persistent, unexplained pain or suspicion of deep tissue involvement)\n- **Nerve conduction studies** (if neuropathic symptoms present)\n\n---\n\n### 3. Urgency Level\n\n- **Low to Medium**  \n  - If pain is mild, no trauma, no systemic symptoms, and no neurovascular compromise.\n- **High**  \n  - If any red flags (see below) are present.\n\n---\n\n### 4. Key Observations and Clinical Notes\n\n- **History:** Onset, duration, character, and location of pain; history of trauma or overuse; associated symptoms (swelling, redness, fever, numbness, weakness).\n- **Examination:** Look for swelling, erythema, warmth, deformity, tenderness, range of motion, and neurovascular status (capillary refill, pulses, sensation, motor function).\n- **Functional impact:** Ability to use the hand/arm, impact on daily activities.\n- **Systemic symptoms:** Fever, malaise, weight loss.\n\n---\n\n### 5. Red Flags to Watch For\n\n- **Severe, unrelenting pain** (especially out of proportion to exam)\n- **Rapidly increasing swelling or tightness** (suggestive of compartment syndrome)\n- **Neurovascular compromise** (numbness, tingling, weakness, pallor, absent pulses)\n- **Signs of infection** (fever, erythema, warmth, fluctuance)\n- **History of significant trauma**\n- **Systemic symptoms** (fever, weight loss, night sweats)\n- **Inability to move fingers/hand or loss of function**\n\n---\n\n**Summary:**  \nRight hand/arm muscle pain in a 13-year-old male is most commonly due to minor trauma or overuse, but a thorough history and examination are essential to rule out more serious causes. Immediate attention is required if any red flags are present. Further workup should be guided by clinical findings.\n\n**Recommendation:**  \nAdvise prompt clinical evaluation to determine the underlying cause and initiate appropriate management.', 'not sure', '', 'Certainly. Below is a comprehensive, structured treatment plan for a 13-year-old male presenting with right hand/arm muscle pain, based on the information provided. This plan assumes no red flags or systemic symptoms are present and that the most likely diagnosis is a **muscle strain or overuse injury**. If further history or examination suggests another etiology, the plan should be adjusted accordingly.\n\n---\n\n## 1. Primary Diagnosis\n\n**Muscle strain or overuse injury** of the right hand/arm  \n*(If new information arises—such as trauma, infection, or neurological symptoms—reassess and update diagnosis.)*\n\n---\n\n## 2. Treatment Goals\n\n- Relieve pain and restore function\n- Prevent further injury\n- Identify and address any underlying or serious pathology\n- Educate patient and family on injury prevention and warning signs\n\n---\n\n## 3. Medication Recommendations\n\n**First-line (if no contraindications):**\n- **Acetaminophen (Paracetamol):**  \n  - Dose: 10–15 mg/kg per dose every 4–6 hours as needed (maximum 75 mg/kg/day, not to exceed 3,000 mg/day)\n- **OR Ibuprofen:**  \n  - Dose: 5–10 mg/kg per dose every 6–8 hours as needed (maximum 40 mg/kg/day, not to exceed 2,400 mg/day)\n- **Duration:** Use for 3–5 days or until pain resolves. Taper as symptoms improve.\n\n**Note:**  \n- Avoid NSAIDs if there is suspicion of fracture, renal impairment, or GI issues.\n- Do not use both acetaminophen and ibuprofen simultaneously unless specifically indicated.\n\n---\n\n## 4. Non-Pharmacological Interventions\n\n- **Rest:** Limit activities that exacerbate pain for 48–72 hours.\n- **Ice:** Apply ice packs to the affected area for 15–20 minutes every 2–3 hours for the first 48 hours.\n- **Compression:** Use an elastic bandage if mild swelling is present (ensure no neurovascular compromise).\n- **Elevation:** Keep the arm elevated above heart level to reduce swelling.\n- **Gentle stretching and range-of-motion exercises:** Begin as pain allows to prevent stiffness.\n- **Physical therapy referral:** If pain persists beyond 1–2 weeks or if there is functional limitation.\n\n---\n\n## 5. Follow-up Schedule\n\n- **Initial follow-up:** 3–5 days to reassess pain, function, and check for any new symptoms.\n- **Further follow-up:** 1–2 weeks if symptoms persist or worsen.\n- **Immediate review:** If any red flags develop (see below).\n\n---\n\n## 6. Monitoring Parameters\n\n- Pain severity and functional status\n- Swelling, redness, or warmth\n- Neurovascular status (sensation, movement, capillary refill)\n- Signs of infection (fever, local erythema, fluctuance)\n- Ability to perform daily activities\n\n---\n\n## 7. Patient Education Points\n\n- Importance of rest and gradual return to activity\n- Proper use of medications (dose, frequency, duration)\n- How to apply ice and compression safely\n- Warning signs that require urgent medical attention:\n  - Severe or worsening pain\n  - Numbness, tingling, or weakness\n  - Inability to move fingers/hand\n  - Swelling, redness, or warmth\n  - Fever or systemic symptoms\n- Avoiding reinjury: warm-up before activities, use proper technique, avoid overuse\n\n---\n\n## 8. Potential Complications to Watch For\n\n- **Compartment syndrome:** Severe pain, swelling, neurovascular compromise (medical emergency)\n- **Infection:** Increasing redness, warmth, swelling, fever\n- **Nerve injury:** Persistent numbness, tingling, or weakness\n- **Chronic pain or loss of function:** If not improving as expected\n- **Missed fracture or underlying pathology:** If pain persists or worsens despite treatment\n\n---\n\n**If any red flags or concerning features develop, or if the diagnosis is uncertain, escalate care and consider further diagnostic workup (imaging, labs, specialist referral).**\n\n---\n\n**Note:**  \nThis plan is for general guidance and should be tailored to the individual patient based on clinical findings and response to initial management. Always consult with a healthcare professional for definitive diagnosis and treatment.', 'Medications:\n1. Ibuprofen 200 mg (tablet or liquid, as appropriate) - Take 1 tablet (or 5–10 mg/kg per dose) by mouth every 6–8 hours as needed for pain - For up to 5 days\n\nInstructions:\n- Take with food to reduce stomach upset.\n- Do not exceed 40 mg/kg per day or 2,400 mg per day (whichever is lower).\n- Use the lowest effective dose for the shortest duration needed.\n- Rest the affected arm and avoid activities that cause pain for 48–72 hours.\n- Apply ice to the painful area for 15–20 minutes every 2–3 hours for the first 48 hours.\n- Elevate the arm above heart level to reduce swelling.\n\nPrecautions:\n- Do not use if you have a history of stomach ulcers, kidney problems, or allergy to ibuprofen.\n- Stop medication and seek medical attention if you develop severe pain, swelling, redness, numbness, tingling, weakness, fever, or if symptoms worsen or do not improve after 5 days.', 992, 992, '2025-09-08 06:10:28', '2025-09-08 06:12:38', 98),
(33, 53, '44', 'Server lower abdomen pain', '**Patient Analysis**\n\n**Patient Information:**  \n- Name: Mr Patient  \n- Age: 13 years  \n- Gender: Male  \n- Medical History: Not specified (text appears as \"dfgdfg\")\n\n**Current Symptom:**  \n- Severe lower abdominal pain\n\n---\n\n### 1. Potential Differential Diagnoses\n\nFor a 13-year-old male with severe lower abdominal pain, consider the following:\n\n- **Acute Appendicitis**  \n  (Most common surgical emergency in this age group; pain often starts periumbilically and migrates to the right lower quadrant)\n- **Testicular Torsion**  \n  (Can present as lower abdominal pain, especially if referred pain; must be ruled out urgently)\n- **Gastroenteritis**  \n  (Usually associated with vomiting/diarrhea)\n- **Constipation/Fecal Impaction**\n- **Urinary Tract Infection (UTI) or Cystitis**\n- **Mesenteric Adenitis**  \n  (Common in children/adolescents, often mimics appendicitis)\n- **Intussusception**  \n  (More common in younger children, but possible)\n- **Inguinal Hernia (incarcerated/strangulated)**\n- **Meckel’s Diverticulitis**\n- **Inflammatory Bowel Disease (IBD)**\n- **Henoch-Schönlein Purpura (HSP)**\n- **Trauma**\n\n---\n\n### 2. Recommended Diagnostic Tests\n\n- **Physical Examination:**  \n  - Abdominal exam (tenderness, rebound, guarding, masses, bowel sounds)\n  - Genital exam (testicular tenderness, swelling, cremasteric reflex)\n- **Laboratory Tests:**  \n  - CBC (leukocytosis)\n  - CRP/ESR (inflammation)\n  - Urinalysis (UTI, hematuria)\n  - Electrolytes, renal function\n- **Imaging:**  \n  - Abdominal ultrasound (appendicitis, intussusception, hernia, testicular torsion)\n  - Scrotal ultrasound with Doppler (if testicular torsion suspected)\n  - Abdominal X-ray (if obstruction/constipation suspected)\n- **Other:**  \n  - Stool studies (if diarrhea present)\n\n---\n\n### 3. Urgency Level\n\n**High**  \n- Severe lower abdominal pain in a 13-year-old male is a potentially surgical emergency.  \n- Immediate evaluation is warranted to rule out appendicitis, testicular torsion, or other acute abdominal conditions.\n\n---\n\n### 4. Key Observations and Clinical Notes\n\n- **Pain characteristics:** Onset, duration, location, migration, severity, associated symptoms (nausea, vomiting, fever, urinary symptoms, constipation/diarrhea)\n- **Associated symptoms:** Vomiting, fever, dysuria, hematuria, scrotal pain/swelling, rash, recent trauma\n- **Past medical/surgical history:** Not provided\n- **Vital signs:** Not provided (tachycardia, hypotension, fever are important)\n- **Physical findings:** Not provided (abdominal tenderness, peritonism, testicular findings)\n\n---\n\n### 5. Red Flags to Watch For\n\n- **Signs of peritonitis:** Rebound tenderness, guarding, rigidity\n- **Hemodynamic instability:** Tachycardia, hypotension, pallor\n- **Testicular pain/swelling:** Absent cremasteric reflex, high-riding testis (testicular torsion)\n- **Persistent vomiting**\n- **Bloody stools or urine**\n- **Severe, worsening, or sudden-onset pain**\n- **Inability to pass urine or stool**\n- **Signs of sepsis:** Fever, altered mental status\n\n---\n\n**Summary:**  \nSevere lower abdominal pain in a 13-year-old male is a high-urgency presentation. Immediate evaluation is required to rule out surgical emergencies such as appendicitis and testicular torsion. Prompt physical examination, laboratory workup, and imaging are recommended. Monitor for red flags and consult pediatric surgery/urology as indicated.\n\n**Note:** This analysis is for informational purposes only. Immediate clinical assessment by a healthcare professional is essential.', NULL, NULL, NULL, NULL, 992, NULL, '2025-09-08 12:29:08', NULL, 98);

-- --------------------------------------------------------

--
-- Table structure for table `usage_logs`
--

CREATE TABLE `usage_logs` (
  `id` int(11) NOT NULL,
  `inventory_item_id` int(11) NOT NULL,
  `department_id` int(11) DEFAULT NULL,
  `used_by_type` enum('doctor','nurse','patient','department','other') NOT NULL,
  `used_by_id` int(11) DEFAULT NULL,
  `patient_id` int(11) DEFAULT NULL,
  `doctor_id` int(11) DEFAULT NULL,
  `quantity_used` int(11) NOT NULL,
  `unit_cost` decimal(10,2) DEFAULT 0.00,
  `total_cost` decimal(15,2) DEFAULT 0.00,
  `usage_date` timestamp NOT NULL DEFAULT current_timestamp(),
  `purpose` varchar(255) DEFAULT NULL,
  `notes` text DEFAULT NULL,
  `batch_number` varchar(100) DEFAULT NULL,
  `expiry_date` date DEFAULT NULL,
  `hospital_id` int(11) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `created_by` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `usage_logs`
--

INSERT INTO `usage_logs` (`id`, `inventory_item_id`, `department_id`, `used_by_type`, `used_by_id`, `patient_id`, `doctor_id`, `quantity_used`, `unit_cost`, `total_cost`, `usage_date`, `purpose`, `notes`, `batch_number`, `expiry_date`, `hospital_id`, `created_at`, `created_by`) VALUES
(1, 3, 0, 'nurse', 0, 0, 0, 30, 12.00, 360.00, '2025-08-08 00:38:00', 'sdfsfsdf', 'sdfsdfs', '', '0000-00-00', 98, '2025-08-08 00:38:56', 992),
(2, 2, 0, 'department', 0, 0, 0, 50, 12.00, 600.00, '2025-08-08 00:38:00', 'dfgdfgdfgd', 'fdgdgdfg', '', '0000-00-00', 98, '2025-08-08 00:39:25', 992),
(3, 1, 0, 'doctor', 0, 0, 44, 20, 10.00, 200.00, '2025-08-08 00:39:00', 'dfgfdgfdg', 'dfgfdgdg', '', '0000-00-00', 98, '2025-08-08 00:39:50', 992),
(4, 2, 0, 'nurse', 0, 0, 0, 50, 12.00, 600.00, '2025-09-03 14:40:00', 'Treatment', '', '', '0000-00-00', 98, '2025-09-03 14:41:01', 992);

--
-- Triggers `usage_logs`
--
DELIMITER $$
CREATE TRIGGER `tr_update_stock_on_usage` AFTER INSERT ON `usage_logs` FOR EACH ROW BEGIN
    DECLARE prev_stock INT;
    
    SELECT current_stock INTO prev_stock FROM inventory_items WHERE id = NEW.inventory_item_id;
    
    UPDATE inventory_items 
    SET current_stock = current_stock - NEW.quantity_used,
        updated_at = CURRENT_TIMESTAMP
    WHERE id = NEW.inventory_item_id;
    
    INSERT INTO stock_transactions (
        inventory_item_id, transaction_type, reference_type, reference_id, 
        quantity, unit_cost, total_cost, previous_stock, new_stock, 
        expiry_date, batch_number, hospital_id, created_by
    ) VALUES (
        NEW.inventory_item_id, 'usage', 'usage_log', NEW.id,
        -NEW.quantity_used, NEW.unit_cost, NEW.total_cost,
        prev_stock, prev_stock - NEW.quantity_used,
        NEW.expiry_date, NEW.batch_number,
        NEW.hospital_id, NEW.created_by
    );
END
$$
DELIMITER ;

-- --------------------------------------------------------

--
-- Table structure for table `users`
--

CREATE TABLE `users` (
  `id` int(11) UNSIGNED NOT NULL,
  `ip_address` varchar(15) NOT NULL,
  `username` varchar(100) NOT NULL,
  `password` varchar(255) NOT NULL,
  `salt` varchar(255) DEFAULT NULL,
  `email` varchar(100) NOT NULL,
  `activation_code` varchar(40) DEFAULT NULL,
  `forgotten_password_code` varchar(40) DEFAULT NULL,
  `forgotten_password_time` int(11) UNSIGNED DEFAULT NULL,
  `remember_code` varchar(40) DEFAULT NULL,
  `created_on` int(11) UNSIGNED NOT NULL,
  `last_login` int(11) UNSIGNED DEFAULT NULL,
  `active` tinyint(1) UNSIGNED DEFAULT NULL,
  `first_name` varchar(50) DEFAULT NULL,
  `last_name` varchar(50) DEFAULT NULL,
  `company` varchar(100) DEFAULT NULL,
  `phone` varchar(20) DEFAULT NULL,
  `hospital_ion_id` varchar(100) DEFAULT NULL,
  `img_url` varchar(1000) DEFAULT NULL,
  `sidebar` varchar(100) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

--
-- Dumping data for table `users`
--

INSERT INTO `users` (`id`, `ip_address`, `username`, `password`, `salt`, `email`, `activation_code`, `forgotten_password_code`, `forgotten_password_time`, `remember_code`, `created_on`, `last_login`, `active`, `first_name`, `last_name`, `company`, `phone`, `hospital_ion_id`, `img_url`, `sidebar`) VALUES
(1, '127.0.0.1', 'Super Admin', '$2y$08$7.GvR4bJco0I41DMIlz7W.ZITEKIegyT5u8dq8O49ivRMqR4pllUa', '', 'superadmin@hms.com', '', 'eX0.Bq6nP57EuXX4hJkPHO973e7a4c25f1849d3a', 1511432365, 'zCeJpcj78CKqJ4sVxVbxcO', 1268889823, 1756109699, 1, 'Admin', 'istrator', 'ADMIN', '0', NULL, NULL, '1'),
(992, '103.231.162.67', 'Hospital Admin', '$2y$08$s6rD5svVL5NRympXc.90l.oD4plJMIQHcpHnudtyi16Igh/KoLRI2', NULL, 'admin@hms.com', NULL, NULL, NULL, NULL, 1640871501, 1757313741, 1, NULL, NULL, NULL, NULL, NULL, 'uploads/userIcon.png', '1'),
(996, '103.231.162.67', 'Mr. Pharmacist', '$2y$08$JGEE1UKZeSN7FK6FuTE1reXgVih.i3Py5xosfLhAK/UIT3CkjaXyK', NULL, 'pharmacist@hms.com', NULL, NULL, NULL, NULL, 1640872306, 1731305559, 1, NULL, NULL, NULL, NULL, '992', NULL, '1'),
(997, '103.231.162.67', 'Mr. Laboratorist', '$2y$08$O4W9KfNQ0JKuh99pYZ.jau3C1JQjd8EqG4NPwXggI/9EqobywDCY.', NULL, 'laboratorist@hms.com', NULL, NULL, NULL, NULL, 1640872353, 1741462557, 1, NULL, NULL, NULL, NULL, '992', NULL, '1'),
(999, '103.231.162.67', 'Mr. Receptionist', '$2y$08$sV9w5r1M.eMwMwxrtXonvOGy7w43z2HpQg8NGhRTsHW.5EJ85cbIG', NULL, 'receptionist@hms.com', NULL, NULL, NULL, NULL, 1640872489, 1736862380, 1, NULL, NULL, NULL, NULL, '992', NULL, '1'),
(1037, '103.231.162.57', 'Mrs Nurse', '$2y$08$C6PSBOX7nBvbiVexQBxjguVkex.b/WVMzCFDEECBoecnUvj7qAwDi', NULL, 'nurse@hms.com', NULL, NULL, NULL, NULL, 1654758336, 1736862020, 1, NULL, NULL, NULL, NULL, '992', NULL, '1'),
(1065, '103.220.205.33', 'caSoft', '$2y$08$7gyVj4b5836qHiJdysQ6bOxN.qplvFGGvOH4T2y2Z0eZ6RXqX4Kg.', NULL, 'admin@example.commm', NULL, NULL, NULL, NULL, 1681107777, NULL, 1, NULL, NULL, NULL, NULL, '1064', NULL, NULL),
(1067, '103.220.205.33', 'Mr Accountant', '$2y$08$S2ZT0Afx5XCOT4NQt7rEl.aKIkvZ4FClR42l8XSRC02KdClm.7K8C', NULL, 'accountant@hms.com', NULL, NULL, NULL, NULL, 1684289908, 1731305844, 1, NULL, NULL, NULL, NULL, '992', NULL, '1'),
(1070, '110.76.128.101', 'Demo Doctor', '$2y$08$2Qv9zmzHYIfJOb2LJsfQMuwHp3GlPQgshwBeptZ21Os2o08HLVqUq', NULL, 'doctor1@hms.com', NULL, NULL, NULL, NULL, 1700468397, 1700468420, 1, NULL, NULL, NULL, NULL, '1069', NULL, NULL),
(1113, '110.76.128.101', ' Rizvi Mahmud', '$2y$08$Zt4I9GCnzKA9U/Lkz0fbdOXpxCJl/7YvIYBZFcYDBQHz32M9UWJqC', NULL, 'rizvi@example.com', NULL, NULL, NULL, NULL, 1728287982, NULL, 1, NULL, NULL, NULL, NULL, '1112', NULL, NULL),
(1114, '110.76.128.101', 'Dr Rahmatullah', '$2y$08$cDPvjSRd/094Ss1.Esi4NuAx7/Qr.jU/cLpr/.DL6x.k1TT5rvPQW', NULL, 'rahmatullah@example.com', NULL, NULL, NULL, NULL, 1728287982, NULL, 1, NULL, NULL, NULL, NULL, '1112', NULL, NULL),
(1131, '103.77.63.65', 'Mr Doctor', '$2y$08$F0OCioJeQcTvu0IEJKdcmuRKz/GKRBRsarPDU/clDbGpZnm6sEohe', NULL, 'doctor@hms.com', NULL, NULL, NULL, NULL, 1735375563, 1757304029, 1, NULL, NULL, NULL, NULL, '992', NULL, '1'),
(1141, '110.76.128.101', 'Mr Patient', '$2y$08$fsU45XWqyDREnAIsZqNJo.AjStevnDTpKl9jl3g5RFOqjxBvW/R3G', NULL, 'patient@hms.com', NULL, NULL, NULL, NULL, 1736862254, 1756798084, 1, NULL, NULL, NULL, NULL, '992', NULL, '1');

-- --------------------------------------------------------

--
-- Table structure for table `users_groups`
--

CREATE TABLE `users_groups` (
  `id` int(11) UNSIGNED NOT NULL,
  `user_id` int(11) UNSIGNED NOT NULL,
  `group_id` mediumint(8) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

--
-- Dumping data for table `users_groups`
--

INSERT INTO `users_groups` (`id`, `user_id`, `group_id`) VALUES
(1, 1, 1),
(879, 877, 5),
(880, 878, 4),
(881, 879, 6),
(882, 880, 7),
(883, 881, 8),
(884, 882, 3),
(885, 883, 10),
(889, 887, 5),
(890, 888, 4),
(999, 992, 11),
(1001, 994, 4),
(1002, 995, 6),
(1003, 996, 7),
(1004, 997, 8),
(1005, 998, 3),
(1006, 999, 10),
(1008, 1001, 5),
(1010, 1003, 5),
(1011, 1004, 4),
(1012, 1005, 4),
(1013, 1006, 11),
(1015, 1008, 4),
(1016, 1009, 4),
(1017, 1010, 4),
(1018, 1011, 3),
(1019, 1012, 6),
(1020, 1013, 10),
(1021, 1014, 7),
(1022, 1015, 8),
(1023, 1016, 5),
(1024, 1017, 5),
(1025, 1018, 5),
(1026, 1019, 5),
(1027, 1020, 4),
(1028, 1021, 5),
(1029, 1022, 5),
(1030, 1023, 5),
(1031, 1024, 11),
(1032, 1025, 11),
(1033, 1026, 4),
(1034, 1027, 4),
(1035, 1028, 4),
(1036, 1029, 4),
(1037, 1030, 5),
(1038, 1031, 4),
(1039, 1032, 4),
(1040, 1033, 4),
(1041, 1034, 4),
(1042, 1035, 4),
(1043, 1036, 6),
(1044, 1037, 6),
(1045, 1038, 5),
(1046, 1039, 4),
(1047, 1040, 6),
(1048, 1041, 4),
(1049, 1042, 5),
(1050, 1043, 4),
(1051, 1044, 5),
(1052, 1045, 6),
(1053, 1046, 8),
(1054, 1047, 4),
(1055, 1048, 11),
(1056, 1049, 11),
(1057, 1050, 11),
(1058, 1051, 11),
(1059, 1052, 11),
(1060, 1053, 11),
(1061, 1054, 11),
(1062, 1055, 11),
(1063, 1056, 11),
(1064, 1057, 11),
(1065, 1058, 5),
(1066, 1059, 6),
(1067, 1060, 7),
(1068, 1061, 8),
(1069, 1062, 3),
(1070, 1063, 10),
(1071, 1064, 11),
(1072, 1065, 5),
(1073, 1066, 5),
(1074, 1067, 3),
(1075, 1068, 5),
(1076, 1069, 11),
(1077, 1070, 4),
(1078, 1071, 1),
(1079, 1072, 11),
(1080, 1073, 6),
(1081, 1074, 4),
(1082, 1075, 4),
(1083, 1076, 4),
(1084, 1077, 4),
(1085, 1078, 4),
(1086, 1079, 4),
(1087, 1080, 4),
(1088, 1081, 4),
(1089, 1082, 4),
(1090, 1083, 4),
(1091, 1084, 4),
(1092, 1085, 4),
(1093, 1086, 4),
(1094, 1087, 11),
(1095, 1088, 11),
(1096, 1089, 11),
(1097, 1090, 5),
(1098, 1091, 5),
(1099, 1092, 4),
(1100, 1093, 5),
(1101, 1094, 5),
(1102, 1095, 5),
(1103, 1096, 5),
(1104, 1097, 11),
(1105, 1098, 11),
(1106, 1099, 11),
(1107, 1100, 11),
(1108, 1101, 11),
(1109, 1102, 11),
(1110, 1103, 11),
(1111, 1104, 11),
(1112, 1105, 11),
(1113, 1106, 11),
(1114, 1107, 11),
(1115, 1108, 11),
(1116, 1109, 11),
(1117, 1110, 3),
(1118, 1111, 11),
(1119, 1112, 11),
(1120, 1113, 5),
(1121, 1114, 4),
(1122, 1115, 11),
(1123, 1116, 5),
(1124, 1117, 4),
(1125, 1118, 5),
(1126, 1119, 5),
(1127, 1120, 5),
(1128, 1121, 5),
(1129, 1122, 5),
(1130, 1123, 5),
(1131, 1124, 5),
(1132, 1125, 5),
(1133, 1126, 5),
(1134, 1127, 11),
(1135, 1128, 5),
(1136, 1129, 5),
(1137, 1130, 5),
(1138, 1131, 4),
(1139, 1132, 5),
(1140, 1133, 5),
(1141, 1134, 5),
(1142, 1135, 5),
(1143, 1136, 5),
(1144, 1137, 4),
(1145, 1138, 4),
(1146, 1139, 4),
(1147, 1140, 4),
(1148, 1141, 5),
(1149, 1142, 11),
(1150, 1143, 11),
(1151, 1144, 11),
(1152, 1145, 4),
(1153, 1146, 11);

-- --------------------------------------------------------

--
-- Table structure for table `vendor_quotations`
--

CREATE TABLE `vendor_quotations` (
  `id` int(11) NOT NULL,
  `quotation_number` varchar(50) NOT NULL,
  `supplier_id` int(11) NOT NULL,
  `quotation_date` date NOT NULL,
  `validity_date` date DEFAULT NULL,
  `status` enum('draft','sent','received','accepted','rejected','expired') DEFAULT 'draft',
  `total_amount` decimal(15,2) DEFAULT 0.00,
  `tax_amount` decimal(15,2) DEFAULT 0.00,
  `discount_amount` decimal(15,2) DEFAULT 0.00,
  `grand_total` decimal(15,2) DEFAULT 0.00,
  `terms_conditions` text DEFAULT NULL,
  `notes` text DEFAULT NULL,
  `hospital_id` int(11) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `created_by` int(11) DEFAULT NULL,
  `updated_by` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `vendor_quotation_items`
--

CREATE TABLE `vendor_quotation_items` (
  `id` int(11) NOT NULL,
  `quotation_id` int(11) NOT NULL,
  `inventory_item_id` int(11) NOT NULL,
  `quantity` int(11) NOT NULL,
  `unit_price` decimal(10,2) NOT NULL,
  `total_price` decimal(15,2) NOT NULL,
  `delivery_time` varchar(100) DEFAULT NULL,
  `specifications` text DEFAULT NULL,
  `notes` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `vital_signs`
--

CREATE TABLE `vital_signs` (
  `id` int(100) NOT NULL,
  `patient_id` varchar(1000) DEFAULT NULL,
  `bmi_height` varchar(1000) DEFAULT NULL,
  `bmi_weight` varchar(1000) DEFAULT NULL,
  `respiratory_rate` varchar(1000) DEFAULT NULL,
  `oxygen_saturation` varchar(1000) DEFAULT NULL,
  `temperature` varchar(1000) DEFAULT NULL,
  `diastolic_blood_pressure` varchar(1000) DEFAULT NULL,
  `systolic_blood_pressure` varchar(1000) DEFAULT NULL,
  `add_date_time` varchar(1000) DEFAULT NULL,
  `heart_rate` varchar(1000) DEFAULT NULL,
  `hospital_id` varchar(1000) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

--
-- Dumping data for table `vital_signs`
--

INSERT INTO `vital_signs` (`id`, `patient_id`, `bmi_height`, `bmi_weight`, `respiratory_rate`, `oxygen_saturation`, `temperature`, `diastolic_blood_pressure`, `systolic_blood_pressure`, `add_date_time`, `heart_rate`, `hospital_id`) VALUES
(13, '11', '1.01', '1.02', '2', '1', '2', '4', '2', '18-05-2024 20:41:16', '2', '98'),
(14, '44', '1.04', '1.05', '5', '5', '5', '5', '6', '03-11-2024 16:33:15', '5', '98'),
(16, '47', '432', '324', '234', '324', '234', '234', '234', '08-11-2024 17:50:48', '324', '98'),
(17, '47', '234', '24', '24', '234', '43', '24', '42', '08-11-2024 17:52:41', '34', '98'),
(18, '53', '175.26', '68', '16', '96', '37', '90', '130', '07-09-2025 11:07:23', '78', '98');

-- --------------------------------------------------------

--
-- Table structure for table `website_settings`
--

CREATE TABLE `website_settings` (
  `id` int(100) NOT NULL,
  `title` varchar(100) DEFAULT NULL,
  `logo` varchar(100) DEFAULT NULL,
  `address` varchar(500) DEFAULT NULL,
  `phone` varchar(100) DEFAULT NULL,
  `emergency` varchar(100) DEFAULT NULL,
  `support` varchar(100) DEFAULT NULL,
  `email` varchar(100) DEFAULT NULL,
  `currency` varchar(100) DEFAULT NULL,
  `block_1_text_under_title` varchar(500) DEFAULT NULL,
  `service_block__text_under_title` varchar(500) DEFAULT NULL,
  `doctor_block__text_under_title` varchar(500) DEFAULT NULL,
  `facebook_id` varchar(100) DEFAULT NULL,
  `twitter_id` varchar(100) DEFAULT NULL,
  `google_id` varchar(100) DEFAULT NULL,
  `youtube_id` varchar(100) DEFAULT NULL,
  `skype_id` varchar(100) DEFAULT NULL,
  `x` varchar(100) DEFAULT NULL,
  `twitter_username` varchar(100) DEFAULT NULL,
  `block_img_url` varchar(200) DEFAULT NULL,
  `comment_1` varchar(500) DEFAULT NULL,
  `comment_2` varchar(500) DEFAULT NULL,
  `verified_1` varchar(200) DEFAULT NULL,
  `verified_2` varchar(200) DEFAULT NULL,
  `comment_logo_1` varchar(100) DEFAULT NULL,
  `comment_logo_2` varchar(100) DEFAULT NULL,
  `partner_header_title` varchar(300) DEFAULT NULL,
  `partner_header_description` varchar(500) DEFAULT NULL,
  `section_title_1` varchar(200) DEFAULT NULL,
  `section_title_2` varchar(200) DEFAULT NULL,
  `section_title_3` varchar(200) DEFAULT NULL,
  `section_description_1` varchar(500) DEFAULT NULL,
  `section_description_2` varchar(500) DEFAULT NULL,
  `section_description_3` varchar(500) DEFAULT NULL,
  `section_1_text_1` varchar(500) DEFAULT NULL,
  `section_2_text_1` varchar(500) DEFAULT NULL,
  `section_3_text_1` varchar(500) DEFAULT NULL,
  `section_1_text_2` varchar(500) DEFAULT NULL,
  `section_2_text_2` varchar(500) DEFAULT NULL,
  `section_3_text_2` varchar(500) DEFAULT NULL,
  `section_1_text_3` varchar(500) DEFAULT NULL,
  `section_2_text_3` varchar(500) DEFAULT NULL,
  `section_3_text_3` varchar(500) DEFAULT NULL,
  `partner_image_1` varchar(200) DEFAULT NULL,
  `partner_image_2` varchar(200) DEFAULT NULL,
  `partner_image_3` varchar(200) DEFAULT NULL,
  `market_title` varchar(200) DEFAULT NULL,
  `market_description` varchar(500) DEFAULT NULL,
  `market_button_link` varchar(200) DEFAULT NULL,
  `market_image` varchar(200) DEFAULT NULL,
  `market_commentator_name` varchar(200) DEFAULT NULL,
  `market_commentator_designation` varchar(200) DEFAULT NULL,
  `market_comment` varchar(500) DEFAULT NULL,
  `commentator_profile_image` varchar(200) DEFAULT NULL,
  `commentator_logo_1` varchar(200) DEFAULT NULL,
  `commentator_logo_2` varchar(200) DEFAULT NULL,
  `commentator_logo_3` varchar(200) DEFAULT NULL,
  `team_title` varchar(200) DEFAULT NULL,
  `team_description` varchar(500) DEFAULT NULL,
  `team_button_link` varchar(200) DEFAULT NULL,
  `team_commentator_name` varchar(200) DEFAULT NULL,
  `team_commentator_designation` varchar(200) DEFAULT NULL,
  `team_comment` varchar(500) DEFAULT NULL,
  `team_verified` varchar(200) DEFAULT NULL,
  `team_review_logo` varchar(200) DEFAULT NULL,
  `team_commentator_image` varchar(200) DEFAULT NULL,
  `registration_block_text` varchar(1000) DEFAULT NULL,
  `contact_us` varchar(1000) DEFAULT NULL,
  `contact_us_email` varchar(100) DEFAULT NULL,
  `chat_js` varchar(1000) DEFAULT NULL,
  `google_translation_switch_in_frontend` varchar(100) DEFAULT NULL,
  `language` varchar(100) DEFAULT NULL,
  `question1` text DEFAULT NULL,
  `question2` text DEFAULT NULL,
  `question3` text DEFAULT NULL,
  `question4` text DEFAULT NULL,
  `question5` text DEFAULT NULL,
  `question6` text DEFAULT NULL,
  `question7` text DEFAULT NULL,
  `question8` text DEFAULT NULL,
  `question9` text DEFAULT NULL,
  `answer1` text DEFAULT NULL,
  `answer2` text DEFAULT NULL,
  `answer3` text DEFAULT NULL,
  `answer4` text DEFAULT NULL,
  `answer5` text DEFAULT NULL,
  `answer6` text DEFAULT NULL,
  `answer7` text DEFAULT NULL,
  `answer8` text DEFAULT NULL,
  `answer9` text DEFAULT NULL,
  `tawk_to_status` varchar(5) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

--
-- Dumping data for table `website_settings`
--

INSERT INTO `website_settings` (`id`, `title`, `logo`, `address`, `phone`, `emergency`, `support`, `email`, `currency`, `block_1_text_under_title`, `service_block__text_under_title`, `doctor_block__text_under_title`, `facebook_id`, `twitter_id`, `google_id`, `youtube_id`, `skype_id`, `x`, `twitter_username`, `block_img_url`, `comment_1`, `comment_2`, `verified_1`, `verified_2`, `comment_logo_1`, `comment_logo_2`, `partner_header_title`, `partner_header_description`, `section_title_1`, `section_title_2`, `section_title_3`, `section_description_1`, `section_description_2`, `section_description_3`, `section_1_text_1`, `section_2_text_1`, `section_3_text_1`, `section_1_text_2`, `section_2_text_2`, `section_3_text_2`, `section_1_text_3`, `section_2_text_3`, `section_3_text_3`, `partner_image_1`, `partner_image_2`, `partner_image_3`, `market_title`, `market_description`, `market_button_link`, `market_image`, `market_commentator_name`, `market_commentator_designation`, `market_comment`, `commentator_profile_image`, `commentator_logo_1`, `commentator_logo_2`, `commentator_logo_3`, `team_title`, `team_description`, `team_button_link`, `team_commentator_name`, `team_commentator_designation`, `team_comment`, `team_verified`, `team_review_logo`, `team_commentator_image`, `registration_block_text`, `contact_us`, `contact_us_email`, `chat_js`, `google_translation_switch_in_frontend`, `language`, `question1`, `question2`, `question3`, `question4`, `question5`, `question6`, `question7`, `question8`, `question9`, `answer1`, `answer2`, `answer3`, `answer4`, `answer5`, `answer6`, `answer7`, `answer8`, `answer9`, `tawk_to_status`) VALUES
(1, 'Hospital Saas', 'uploads/66b9a2ee3f71ae0484e26a7bNew_Project_(1).png', 'Boropool, Rajbari-770001', '556165156131', '+01234567891', '+01234567891', 'zzenofast@gmail.com', '$', NULL, 'Lets see what our recent customer says.', NULL, 'https://www.facebook.com/rizvi.plabon/', 'https://www.twitter.com/casoft/', 'https://www.google.com/casoft/', 'https://www.youtube.com/casoft/', 'https://www.skype.com/casoft/', NULL, 'codearistos/', 'uploads/customer.svg', NULL, NULL, NULL, NULL, 'uploads/8th-illus.png', 'uploads/module-1.jpg', 'Streamlined Hospital Management', 'Empower your practice with our comprehensive hospital SaaS solution—where technology meets  dental expertise.', 'Empower Hospital Practice', 'Automate with Excellence', 'Unmatched Support', 'Maximize clinic efficiency with our customizable hospital               management SaaS. Streamline operations, enhance care, and propel               growth.', 'Elevate your hospital services with our comprehensive automation               tools. Tailored for clinics big and small.', 'Immediate assistance and extensive resources at your fingertips,               ensuring your clinic', 'If you have an active software license, then you will have access to software support. This really is totally open-source software.', 'Accumulative solutions', 'Organize your hospital', 'Flawless Functionality for Hospital Excellence', 'We are providing all the essential professional services of a firm. For example, inventory management system, purchase order management system, supplier report, and cash-flow management system.', 'Customization Facilities', 'Experience unparalleled reliability with our hospital SaaS. We ensure seamless operation, allowing you to focus on patient care without technical distractions.', 'Streamline Your Practice Management', 'This software is 100% customizable. We are prepared to customize predicates on your own business requirements.', 'uploads/module-2.jpg', 'uploads/module-3.jpg', 'uploads/RD-solicita-facilidad-para-adquisicion.jpg', NULL, NULL, NULL, 'uploads/RD-solicita-facilidad-para-adquisicion1.jpg', NULL, NULL, NULL, 'uploads/photo-1503023345310-bd7c1de61c7d1.jpg', 'uploads/astana.jpg', 'uploads/innnn.jpg', 'uploads/unbounce.jpg', 'Why Choose Our Product?', 'We are providing the most perfect service for you, and our priority is the customer', 'How long do I get support?', 'Engineered for performance', 'Our platform', NULL, NULL, 'uploads/15548217993981.jpg', 'uploads/png-transparent-junior-chamber-international-jci-malaysia-secretariat-organization-united-states-junior-chamber-business-business-blue-text-trademark.png', NULL, 'Contact With Us', NULL, 'Tawk Chat Embed Link', 'yes', NULL, 'Responsive Website', 'Android Apps', 'Admin Panel', 'Administrative Module', 'https://codearistos.net/dev/hmz/frontend', 'Doctor Module', 'https://codearistos.net/dev/hmz/frontend', 'Accountants Module', 'https://codearistos.net/dev/hmz/frontend', 'We have arranged a fully responsive SEO optimized dynamic website. This website ensures your online presence & people will be able to make an online appointment through the website.', 'In today', 'With this software, you can get a superpower administrative module that can provide you an ultimate system of management. In this software, you can create 8 kinds of accounts like doctors, nurses, pharmacists, accountant, laboratorian, receptionist, representative, case managers by using the admin panel, and also can specify their responsibilities separately. As well as, this software has a separate dashboard for each account.', 'We have designed the administrative module for a hospital owner or the person who is accountable to operate the entire hospital smoothly. Using this module, you can manage the entire system easily and efficiently. Because this module includes every important feature like doctors portal, patient portal, appointment scheduling, prescription management, human resource management, bed management, employee, accounts, software settings, role assigning, etc.', 'https://codearistos.net/dev/hmz/frontend', 'A doctor is the most important person to ensure the health condition of any patient. For this purpose, this software has a doctor module. Using this module, doctors can access all important functions that belong to them. As a result, they can maintain patient portals, appointment scheduling & maintaining, prescription making, and any other things that are related to hospital activities.', 'https://codearistos.net/dev/hmz/frontend', 'Accountants are responsible to control monetary flow, profit-and- loss calculation. Patients are considered the main factor of this software. Moreover, they are the key earning source of this system. So this module allows access to the patient portal. Besides, the Accountant module also has the access account creation option, like debit or credit account based on expense and earning, employee name, and billing. With this software, you can get a complete clinic management system that helps to understand both technical or non-technical people.', 'https://codearistos.net/dev/hmz/frontend', 'no');

--
-- Indexes for dumped tables
--

--
-- Indexes for table `accountant`
--
ALTER TABLE `accountant`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `advice`
--
ALTER TABLE `advice`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `ai_image_analyses`
--
ALTER TABLE `ai_image_analyses`
  ADD PRIMARY KEY (`id`),
  ADD KEY `patient_id` (`patient_id`),
  ADD KEY `doctor_id` (`doctor_id`),
  ADD KEY `hospital_id` (`hospital_id`),
  ADD KEY `created_by` (`created_by`),
  ADD KEY `updated_by` (`updated_by`),
  ADD KEY `image_type` (`image_type`),
  ADD KEY `created_at` (`created_at`);

--
-- Indexes for table `ai_patient_overviews`
--
ALTER TABLE `ai_patient_overviews`
  ADD PRIMARY KEY (`id`),
  ADD KEY `patient_id` (`patient_id`),
  ADD KEY `doctor_id` (`doctor_id`),
  ADD KEY `hospital_id` (`hospital_id`),
  ADD KEY `created_by` (`created_by`),
  ADD KEY `updated_by` (`updated_by`),
  ADD KEY `created_at` (`created_at`);

--
-- Indexes for table `alloted_bed`
--
ALTER TABLE `alloted_bed`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `appointment`
--
ALTER TABLE `appointment`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `attendance`
--
ALTER TABLE `attendance`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `autoemailshortcode`
--
ALTER TABLE `autoemailshortcode`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `autoemailtemplate`
--
ALTER TABLE `autoemailtemplate`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `autosmsshortcode`
--
ALTER TABLE `autosmsshortcode`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `autosmstemplate`
--
ALTER TABLE `autosmstemplate`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `bankb`
--
ALTER TABLE `bankb`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `bed`
--
ALTER TABLE `bed`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `bed_category`
--
ALTER TABLE `bed_category`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `bed_checkout`
--
ALTER TABLE `bed_checkout`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `bed_diagnostic`
--
ALTER TABLE `bed_diagnostic`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `bed_medicine`
--
ALTER TABLE `bed_medicine`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `bed_service`
--
ALTER TABLE `bed_service`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `blood_group`
--
ALTER TABLE `blood_group`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `category`
--
ALTER TABLE `category`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `chat`
--
ALTER TABLE `chat`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `daily_progress`
--
ALTER TABLE `daily_progress`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `department`
--
ALTER TABLE `department`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `diagnosis`
--
ALTER TABLE `diagnosis`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `diagnostic_report`
--
ALTER TABLE `diagnostic_report`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `doctor`
--
ALTER TABLE `doctor`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `doctor_visit`
--
ALTER TABLE `doctor_visit`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `donor`
--
ALTER TABLE `donor`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `draft_payment`
--
ALTER TABLE `draft_payment`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `email`
--
ALTER TABLE `email`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `email_settings`
--
ALTER TABLE `email_settings`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `emergency`
--
ALTER TABLE `emergency`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `expense`
--
ALTER TABLE `expense`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `expense_category`
--
ALTER TABLE `expense_category`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `facilitie`
--
ALTER TABLE `facilitie`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `faq`
--
ALTER TABLE `faq`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `featured`
--
ALTER TABLE `featured`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `file`
--
ALTER TABLE `file`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `folder`
--
ALTER TABLE `folder`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `gallery`
--
ALTER TABLE `gallery`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `google_captcha`
--
ALTER TABLE `google_captcha`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `gpt_memory`
--
ALTER TABLE `gpt_memory`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `grid`
--
ALTER TABLE `grid`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `groups`
--
ALTER TABLE `groups`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `holidays`
--
ALTER TABLE `holidays`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `hospital`
--
ALTER TABLE `hospital`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `hospital_deposit`
--
ALTER TABLE `hospital_deposit`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `hospital_payment`
--
ALTER TABLE `hospital_payment`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `insurance_company`
--
ALTER TABLE `insurance_company`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `inventory_categories`
--
ALTER TABLE `inventory_categories`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_hospital_id` (`hospital_id`),
  ADD KEY `idx_parent_id` (`parent_id`),
  ADD KEY `idx_status` (`status`);

--
-- Indexes for table `inventory_items`
--
ALTER TABLE `inventory_items`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `unique_item_code_hospital` (`item_code`,`hospital_id`),
  ADD KEY `idx_hospital_id` (`hospital_id`),
  ADD KEY `idx_category` (`category`),
  ADD KEY `idx_status` (`status`),
  ADD KEY `idx_current_stock` (`current_stock`),
  ADD KEY `idx_reorder_level` (`reorder_level`),
  ADD KEY `idx_name` (`name`),
  ADD KEY `idx_barcode` (`barcode`),
  ADD KEY `idx_inventory_items_code_hospital` (`item_code`,`hospital_id`);

--
-- Indexes for table `lab`
--
ALTER TABLE `lab`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `laboratorist`
--
ALTER TABLE `laboratorist`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `lab_category`
--
ALTER TABLE `lab_category`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `language`
--
ALTER TABLE `language`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `leaves`
--
ALTER TABLE `leaves`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `leave_type`
--
ALTER TABLE `leave_type`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `login_attempts`
--
ALTER TABLE `login_attempts`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `logs`
--
ALTER TABLE `logs`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `macro`
--
ALTER TABLE `macro`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `manualemailshortcode`
--
ALTER TABLE `manualemailshortcode`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `manualsmsshortcode`
--
ALTER TABLE `manualsmsshortcode`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `manual_email_template`
--
ALTER TABLE `manual_email_template`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `manual_sms_template`
--
ALTER TABLE `manual_sms_template`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `medical_history`
--
ALTER TABLE `medical_history`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `medicine`
--
ALTER TABLE `medicine`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `medicine_batches`
--
ALTER TABLE `medicine_batches`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `unique_batch_medicine_hospital` (`batch_number`,`medicine_id`,`hospital_id`),
  ADD KEY `idx_medicine_id` (`medicine_id`),
  ADD KEY `idx_supplier_id` (`supplier_id`),
  ADD KEY `idx_purchase_item_id` (`purchase_item_id`),
  ADD KEY `idx_hospital_id` (`hospital_id`),
  ADD KEY `idx_expiry_date` (`expiry_date`),
  ADD KEY `idx_status` (`status`),
  ADD KEY `idx_current_stock` (`current_stock`),
  ADD KEY `idx_medicine_batches_expiry_hospital` (`expiry_date`,`hospital_id`);

--
-- Indexes for table `medicine_category`
--
ALTER TABLE `medicine_category`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `medicine_purchases`
--
ALTER TABLE `medicine_purchases`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `unique_po_hospital` (`purchase_order_no`,`hospital_id`),
  ADD KEY `idx_supplier_id` (`supplier_id`),
  ADD KEY `idx_hospital_id` (`hospital_id`),
  ADD KEY `idx_purchase_date` (`purchase_date`),
  ADD KEY `idx_purchase_status` (`purchase_status`),
  ADD KEY `idx_payment_status` (`payment_status`),
  ADD KEY `idx_medicine_purchases_po_hospital` (`purchase_order_no`,`hospital_id`);

--
-- Indexes for table `medicine_purchase_items`
--
ALTER TABLE `medicine_purchase_items`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_purchase_id` (`purchase_id`),
  ADD KEY `idx_medicine_id` (`medicine_id`),
  ADD KEY `idx_batch_number` (`batch_number`),
  ADD KEY `idx_expiry_date` (`expiry_date`);

--
-- Indexes for table `medicine_purchase_payments`
--
ALTER TABLE `medicine_purchase_payments`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_purchase_id` (`purchase_id`),
  ADD KEY `idx_hospital_id` (`hospital_id`),
  ADD KEY `idx_payment_date` (`payment_date`),
  ADD KEY `idx_status` (`status`);

--
-- Indexes for table `medicine_stock_movements`
--
ALTER TABLE `medicine_stock_movements`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_medicine_id` (`medicine_id`),
  ADD KEY `idx_batch_id` (`batch_id`),
  ADD KEY `idx_hospital_id` (`hospital_id`),
  ADD KEY `idx_movement_type` (`movement_type`),
  ADD KEY `idx_movement_date` (`movement_date`),
  ADD KEY `idx_reference` (`reference_type`,`reference_id`),
  ADD KEY `idx_medicine_stock_movements_date_hospital` (`movement_date`,`hospital_id`);

--
-- Indexes for table `medicine_suppliers`
--
ALTER TABLE `medicine_suppliers`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_hospital_id` (`hospital_id`),
  ADD KEY `idx_status` (`status`),
  ADD KEY `idx_name` (`name`),
  ADD KEY `idx_medicine_suppliers_name_hospital` (`name`,`hospital_id`);

--
-- Indexes for table `meeting`
--
ALTER TABLE `meeting`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `meeting_settings`
--
ALTER TABLE `meeting_settings`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `module`
--
ALTER TABLE `module`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `notice`
--
ALTER TABLE `notice`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `nurse`
--
ALTER TABLE `nurse`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `odontogram`
--
ALTER TABLE `odontogram`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `ot_payment`
--
ALTER TABLE `ot_payment`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `package`
--
ALTER TABLE `package`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `patient`
--
ALTER TABLE `patient`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `patient_deposit`
--
ALTER TABLE `patient_deposit`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `patient_material`
--
ALTER TABLE `patient_material`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `payment`
--
ALTER TABLE `payment`
  ADD PRIMARY KEY (`id`),
  ADD KEY `hospital_id` (`hospital_id`),
  ADD KEY `id` (`id`),
  ADD KEY `hospital_id_2` (`hospital_id`);

--
-- Indexes for table `paymentGateway`
--
ALTER TABLE `paymentGateway`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `payment_category`
--
ALTER TABLE `payment_category`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `payroll`
--
ALTER TABLE `payroll`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `pharmacist`
--
ALTER TABLE `pharmacist`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `pharmacy_expense`
--
ALTER TABLE `pharmacy_expense`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `pharmacy_expense_category`
--
ALTER TABLE `pharmacy_expense_category`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `pharmacy_payment`
--
ALTER TABLE `pharmacy_payment`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `pharmacy_payment_category`
--
ALTER TABLE `pharmacy_payment_category`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `prescription`
--
ALTER TABLE `prescription`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `pservice`
--
ALTER TABLE `pservice`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `purchase_orders`
--
ALTER TABLE `purchase_orders`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `unique_po_number_hospital` (`po_number`,`hospital_id`),
  ADD KEY `idx_supplier_id` (`supplier_id`),
  ADD KEY `idx_hospital_id` (`hospital_id`),
  ADD KEY `idx_status` (`status`),
  ADD KEY `idx_order_date` (`order_date`),
  ADD KEY `idx_purchase_orders_number_hospital` (`po_number`,`hospital_id`);

--
-- Indexes for table `purchase_order_items`
--
ALTER TABLE `purchase_order_items`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_purchase_order_id` (`purchase_order_id`),
  ADD KEY `idx_inventory_item_id` (`inventory_item_id`);

--
-- Indexes for table `receptionist`
--
ALTER TABLE `receptionist`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `report`
--
ALTER TABLE `report`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `request`
--
ALTER TABLE `request`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `review`
--
ALTER TABLE `review`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `salary`
--
ALTER TABLE `salary`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `service`
--
ALTER TABLE `service`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `settings`
--
ALTER TABLE `settings`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `site_featured`
--
ALTER TABLE `site_featured`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `site_gallery`
--
ALTER TABLE `site_gallery`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `site_grid`
--
ALTER TABLE `site_grid`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `site_map`
--
ALTER TABLE `site_map`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `site_review`
--
ALTER TABLE `site_review`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `site_service`
--
ALTER TABLE `site_service`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `site_settings`
--
ALTER TABLE `site_settings`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `site_slide`
--
ALTER TABLE `site_slide`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `slide`
--
ALTER TABLE `slide`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `sms`
--
ALTER TABLE `sms`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `sms_settings`
--
ALTER TABLE `sms_settings`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `stock_transactions`
--
ALTER TABLE `stock_transactions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_inventory_item_id` (`inventory_item_id`),
  ADD KEY `idx_transaction_type` (`transaction_type`),
  ADD KEY `idx_hospital_id` (`hospital_id`),
  ADD KEY `idx_transaction_date` (`transaction_date`),
  ADD KEY `idx_reference` (`reference_type`,`reference_id`),
  ADD KEY `idx_stock_transactions_date_hospital` (`transaction_date`,`hospital_id`);

--
-- Indexes for table `superadmin`
--
ALTER TABLE `superadmin`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `suppliers`
--
ALTER TABLE `suppliers`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_hospital_id` (`hospital_id`),
  ADD KEY `idx_status` (`status`),
  ADD KEY `idx_name` (`name`),
  ADD KEY `idx_suppliers_name_hospital` (`name`,`hospital_id`);

--
-- Indexes for table `symptom`
--
ALTER TABLE `symptom`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `template`
--
ALTER TABLE `template`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `testpkz`
--
ALTER TABLE `testpkz`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `time_schedule`
--
ALTER TABLE `time_schedule`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `time_slot`
--
ALTER TABLE `time_slot`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `transaction_logs`
--
ALTER TABLE `transaction_logs`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `treatment`
--
ALTER TABLE `treatment`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `treatment_plans`
--
ALTER TABLE `treatment_plans`
  ADD PRIMARY KEY (`id`),
  ADD KEY `patient_id` (`patient_id`),
  ADD KEY `created_by` (`created_by`),
  ADD KEY `updated_by` (`updated_by`),
  ADD KEY `hospital_id` (`hospital_id`);

--
-- Indexes for table `usage_logs`
--
ALTER TABLE `usage_logs`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_inventory_item_id` (`inventory_item_id`),
  ADD KEY `idx_hospital_id` (`hospital_id`),
  ADD KEY `idx_usage_date` (`usage_date`),
  ADD KEY `idx_used_by` (`used_by_type`,`used_by_id`),
  ADD KEY `idx_patient_id` (`patient_id`),
  ADD KEY `idx_doctor_id` (`doctor_id`),
  ADD KEY `idx_department_id` (`department_id`),
  ADD KEY `idx_usage_logs_date_hospital` (`usage_date`,`hospital_id`);

--
-- Indexes for table `users`
--
ALTER TABLE `users`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `users_groups`
--
ALTER TABLE `users_groups`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `uc_users_groups` (`user_id`,`group_id`),
  ADD KEY `fk_users_groups_users1_idx` (`user_id`),
  ADD KEY `fk_users_groups_groups1_idx` (`group_id`);

--
-- Indexes for table `vendor_quotations`
--
ALTER TABLE `vendor_quotations`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `unique_quotation_number_hospital` (`quotation_number`,`hospital_id`),
  ADD KEY `idx_supplier_id` (`supplier_id`),
  ADD KEY `idx_hospital_id` (`hospital_id`),
  ADD KEY `idx_status` (`status`),
  ADD KEY `idx_quotation_date` (`quotation_date`);

--
-- Indexes for table `vendor_quotation_items`
--
ALTER TABLE `vendor_quotation_items`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_quotation_id` (`quotation_id`),
  ADD KEY `idx_inventory_item_id` (`inventory_item_id`);

--
-- Indexes for table `vital_signs`
--
ALTER TABLE `vital_signs`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `website_settings`
--
ALTER TABLE `website_settings`
  ADD PRIMARY KEY (`id`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `accountant`
--
ALTER TABLE `accountant`
  MODIFY `id` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10;

--
-- AUTO_INCREMENT for table `advice`
--
ALTER TABLE `advice`
  MODIFY `id` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=17;

--
-- AUTO_INCREMENT for table `ai_image_analyses`
--
ALTER TABLE `ai_image_analyses`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=67;

--
-- AUTO_INCREMENT for table `ai_patient_overviews`
--
ALTER TABLE `ai_patient_overviews`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=18;

--
-- AUTO_INCREMENT for table `alloted_bed`
--
ALTER TABLE `alloted_bed`
  MODIFY `id` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=95;

--
-- AUTO_INCREMENT for table `appointment`
--
ALTER TABLE `appointment`
  MODIFY `id` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=449;

--
-- AUTO_INCREMENT for table `attendance`
--
ALTER TABLE `attendance`
  MODIFY `id` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=162;

--
-- AUTO_INCREMENT for table `autoemailshortcode`
--
ALTER TABLE `autoemailshortcode`
  MODIFY `id` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=74;

--
-- AUTO_INCREMENT for table `autoemailtemplate`
--
ALTER TABLE `autoemailtemplate`
  MODIFY `id` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1656;

--
-- AUTO_INCREMENT for table `autosmsshortcode`
--
ALTER TABLE `autosmsshortcode`
  MODIFY `id` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=70;

--
-- AUTO_INCREMENT for table `autosmstemplate`
--
ALTER TABLE `autosmstemplate`
  MODIFY `id` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=973;

--
-- AUTO_INCREMENT for table `bankb`
--
ALTER TABLE `bankb`
  MODIFY `id` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=745;

--
-- AUTO_INCREMENT for table `bed`
--
ALTER TABLE `bed`
  MODIFY `id` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=12;

--
-- AUTO_INCREMENT for table `bed_category`
--
ALTER TABLE `bed_category`
  MODIFY `id` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;

--
-- AUTO_INCREMENT for table `bed_checkout`
--
ALTER TABLE `bed_checkout`
  MODIFY `id` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=25;

--
-- AUTO_INCREMENT for table `bed_diagnostic`
--
ALTER TABLE `bed_diagnostic`
  MODIFY `id` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=105;

--
-- AUTO_INCREMENT for table `bed_medicine`
--
ALTER TABLE `bed_medicine`
  MODIFY `id` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=159;

--
-- AUTO_INCREMENT for table `bed_service`
--
ALTER TABLE `bed_service`
  MODIFY `id` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=92;

--
-- AUTO_INCREMENT for table `blood_group`
--
ALTER TABLE `blood_group`
  MODIFY `id` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;

--
-- AUTO_INCREMENT for table `category`
--
ALTER TABLE `category`
  MODIFY `id` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13;

--
-- AUTO_INCREMENT for table `chat`
--
ALTER TABLE `chat`
  MODIFY `id` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10;

--
-- AUTO_INCREMENT for table `daily_progress`
--
ALTER TABLE `daily_progress`
  MODIFY `id` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=15;

--
-- AUTO_INCREMENT for table `department`
--
ALTER TABLE `department`
  MODIFY `id` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=31;

--
-- AUTO_INCREMENT for table `diagnosis`
--
ALTER TABLE `diagnosis`
  MODIFY `id` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=23;

--
-- AUTO_INCREMENT for table `diagnostic_report`
--
ALTER TABLE `diagnostic_report`
  MODIFY `id` int(100) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `doctor`
--
ALTER TABLE `doctor`
  MODIFY `id` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=50;

--
-- AUTO_INCREMENT for table `doctor_visit`
--
ALTER TABLE `doctor_visit`
  MODIFY `id` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=20;

--
-- AUTO_INCREMENT for table `donor`
--
ALTER TABLE `donor`
  MODIFY `id` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `draft_payment`
--
ALTER TABLE `draft_payment`
  MODIFY `id` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=24;

--
-- AUTO_INCREMENT for table `email`
--
ALTER TABLE `email`
  MODIFY `id` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=23;

--
-- AUTO_INCREMENT for table `email_settings`
--
ALTER TABLE `email_settings`
  MODIFY `id` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=360;

--
-- AUTO_INCREMENT for table `emergency`
--
ALTER TABLE `emergency`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `expense`
--
ALTER TABLE `expense`
  MODIFY `id` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=43;

--
-- AUTO_INCREMENT for table `expense_category`
--
ALTER TABLE `expense_category`
  MODIFY `id` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;

--
-- AUTO_INCREMENT for table `facilitie`
--
ALTER TABLE `facilitie`
  MODIFY `id` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=29;

--
-- AUTO_INCREMENT for table `faq`
--
ALTER TABLE `faq`
  MODIFY `id` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `featured`
--
ALTER TABLE `featured`
  MODIFY `id` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `file`
--
ALTER TABLE `file`
  MODIFY `id` int(50) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;

--
-- AUTO_INCREMENT for table `folder`
--
ALTER TABLE `folder`
  MODIFY `id` int(50) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=110;

--
-- AUTO_INCREMENT for table `gallery`
--
ALTER TABLE `gallery`
  MODIFY `id` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;

--
-- AUTO_INCREMENT for table `google_captcha`
--
ALTER TABLE `google_captcha`
  MODIFY `id` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `gpt_memory`
--
ALTER TABLE `gpt_memory`
  MODIFY `id` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;

--
-- AUTO_INCREMENT for table `grid`
--
ALTER TABLE `grid`
  MODIFY `id` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `groups`
--
ALTER TABLE `groups`
  MODIFY `id` mediumint(8) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=12;

--
-- AUTO_INCREMENT for table `holidays`
--
ALTER TABLE `holidays`
  MODIFY `id` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `hospital`
--
ALTER TABLE `hospital`
  MODIFY `id` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=140;

--
-- AUTO_INCREMENT for table `hospital_deposit`
--
ALTER TABLE `hospital_deposit`
  MODIFY `id` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=115;

--
-- AUTO_INCREMENT for table `hospital_payment`
--
ALTER TABLE `hospital_payment`
  MODIFY `id` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=94;

--
-- AUTO_INCREMENT for table `insurance_company`
--
ALTER TABLE `insurance_company`
  MODIFY `id` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `inventory_categories`
--
ALTER TABLE `inventory_categories`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=16;

--
-- AUTO_INCREMENT for table `inventory_items`
--
ALTER TABLE `inventory_items`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `lab`
--
ALTER TABLE `lab`
  MODIFY `id` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=904;

--
-- AUTO_INCREMENT for table `laboratorist`
--
ALTER TABLE `laboratorist`
  MODIFY `id` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;

--
-- AUTO_INCREMENT for table `lab_category`
--
ALTER TABLE `lab_category`
  MODIFY `id` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=128;

--
-- AUTO_INCREMENT for table `language`
--
ALTER TABLE `language`
  MODIFY `id` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=17;

--
-- AUTO_INCREMENT for table `leaves`
--
ALTER TABLE `leaves`
  MODIFY `id` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `leave_type`
--
ALTER TABLE `leave_type`
  MODIFY `id` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `login_attempts`
--
ALTER TABLE `login_attempts`
  MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=258;

--
-- AUTO_INCREMENT for table `logs`
--
ALTER TABLE `logs`
  MODIFY `id` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2142;

--
-- AUTO_INCREMENT for table `macro`
--
ALTER TABLE `macro`
  MODIFY `id` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=19;

--
-- AUTO_INCREMENT for table `manualemailshortcode`
--
ALTER TABLE `manualemailshortcode`
  MODIFY `id` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10;

--
-- AUTO_INCREMENT for table `manualsmsshortcode`
--
ALTER TABLE `manualsmsshortcode`
  MODIFY `id` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;

--
-- AUTO_INCREMENT for table `manual_email_template`
--
ALTER TABLE `manual_email_template`
  MODIFY `id` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=22;

--
-- AUTO_INCREMENT for table `manual_sms_template`
--
ALTER TABLE `manual_sms_template`
  MODIFY `id` int(100) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `medical_history`
--
ALTER TABLE `medical_history`
  MODIFY `id` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=151;

--
-- AUTO_INCREMENT for table `medicine`
--
ALTER TABLE `medicine`
  MODIFY `id` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=36;

--
-- AUTO_INCREMENT for table `medicine_batches`
--
ALTER TABLE `medicine_batches`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `medicine_category`
--
ALTER TABLE `medicine_category`
  MODIFY `id` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13;

--
-- AUTO_INCREMENT for table `medicine_purchases`
--
ALTER TABLE `medicine_purchases`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `medicine_purchase_items`
--
ALTER TABLE `medicine_purchase_items`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `medicine_purchase_payments`
--
ALTER TABLE `medicine_purchase_payments`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `medicine_stock_movements`
--
ALTER TABLE `medicine_stock_movements`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=19;

--
-- AUTO_INCREMENT for table `medicine_suppliers`
--
ALTER TABLE `medicine_suppliers`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `meeting`
--
ALTER TABLE `meeting`
  MODIFY `id` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=15;

--
-- AUTO_INCREMENT for table `meeting_settings`
--
ALTER TABLE `meeting_settings`
  MODIFY `id` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `module`
--
ALTER TABLE `module`
  MODIFY `id` int(100) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `notice`
--
ALTER TABLE `notice`
  MODIFY `id` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `nurse`
--
ALTER TABLE `nurse`
  MODIFY `id` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;

--
-- AUTO_INCREMENT for table `odontogram`
--
ALTER TABLE `odontogram`
  MODIFY `id` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=26;

--
-- AUTO_INCREMENT for table `ot_payment`
--
ALTER TABLE `ot_payment`
  MODIFY `id` int(100) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `package`
--
ALTER TABLE `package`
  MODIFY `id` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;

--
-- AUTO_INCREMENT for table `patient`
--
ALTER TABLE `patient`
  MODIFY `id` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=54;

--
-- AUTO_INCREMENT for table `patient_deposit`
--
ALTER TABLE `patient_deposit`
  MODIFY `id` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=409;

--
-- AUTO_INCREMENT for table `patient_material`
--
ALTER TABLE `patient_material`
  MODIFY `id` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=50;

--
-- AUTO_INCREMENT for table `payment`
--
ALTER TABLE `payment`
  MODIFY `id` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=666;

--
-- AUTO_INCREMENT for table `paymentGateway`
--
ALTER TABLE `paymentGateway`
  MODIFY `id` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=595;

--
-- AUTO_INCREMENT for table `payment_category`
--
ALTER TABLE `payment_category`
  MODIFY `id` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=87;

--
-- AUTO_INCREMENT for table `payroll`
--
ALTER TABLE `payroll`
  MODIFY `id` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=105;

--
-- AUTO_INCREMENT for table `pharmacist`
--
ALTER TABLE `pharmacist`
  MODIFY `id` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `pharmacy_expense`
--
ALTER TABLE `pharmacy_expense`
  MODIFY `id` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `pharmacy_expense_category`
--
ALTER TABLE `pharmacy_expense_category`
  MODIFY `id` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `pharmacy_payment`
--
ALTER TABLE `pharmacy_payment`
  MODIFY `id` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=27;

--
-- AUTO_INCREMENT for table `pharmacy_payment_category`
--
ALTER TABLE `pharmacy_payment_category`
  MODIFY `id` int(10) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `prescription`
--
ALTER TABLE `prescription`
  MODIFY `id` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=46;

--
-- AUTO_INCREMENT for table `pservice`
--
ALTER TABLE `pservice`
  MODIFY `id` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=21;

--
-- AUTO_INCREMENT for table `purchase_orders`
--
ALTER TABLE `purchase_orders`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13;

--
-- AUTO_INCREMENT for table `purchase_order_items`
--
ALTER TABLE `purchase_order_items`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10;

--
-- AUTO_INCREMENT for table `receptionist`
--
ALTER TABLE `receptionist`
  MODIFY `id` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `report`
--
ALTER TABLE `report`
  MODIFY `id` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `request`
--
ALTER TABLE `request`
  MODIFY `id` int(100) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `review`
--
ALTER TABLE `review`
  MODIFY `id` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;

--
-- AUTO_INCREMENT for table `salary`
--
ALTER TABLE `salary`
  MODIFY `id` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `service`
--
ALTER TABLE `service`
  MODIFY `id` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10;

--
-- AUTO_INCREMENT for table `settings`
--
ALTER TABLE `settings`
  MODIFY `id` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=155;

--
-- AUTO_INCREMENT for table `site_featured`
--
ALTER TABLE `site_featured`
  MODIFY `id` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;

--
-- AUTO_INCREMENT for table `site_gallery`
--
ALTER TABLE `site_gallery`
  MODIFY `id` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;

--
-- AUTO_INCREMENT for table `site_grid`
--
ALTER TABLE `site_grid`
  MODIFY `id` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `site_map`
--
ALTER TABLE `site_map`
  MODIFY `id` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=140;

--
-- AUTO_INCREMENT for table `site_review`
--
ALTER TABLE `site_review`
  MODIFY `id` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;

--
-- AUTO_INCREMENT for table `site_service`
--
ALTER TABLE `site_service`
  MODIFY `id` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;

--
-- AUTO_INCREMENT for table `site_settings`
--
ALTER TABLE `site_settings`
  MODIFY `id` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `site_slide`
--
ALTER TABLE `site_slide`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=21;

--
-- AUTO_INCREMENT for table `slide`
--
ALTER TABLE `slide`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `sms`
--
ALTER TABLE `sms`
  MODIFY `id` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `sms_settings`
--
ALTER TABLE `sms_settings`
  MODIFY `id` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=561;

--
-- AUTO_INCREMENT for table `stock_transactions`
--
ALTER TABLE `stock_transactions`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10;

--
-- AUTO_INCREMENT for table `superadmin`
--
ALTER TABLE `superadmin`
  MODIFY `id` int(50) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=22;

--
-- AUTO_INCREMENT for table `suppliers`
--
ALTER TABLE `suppliers`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `symptom`
--
ALTER TABLE `symptom`
  MODIFY `id` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=62;

--
-- AUTO_INCREMENT for table `template`
--
ALTER TABLE `template`
  MODIFY `id` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=32;

--
-- AUTO_INCREMENT for table `testpkz`
--
ALTER TABLE `testpkz`
  MODIFY `id` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `time_schedule`
--
ALTER TABLE `time_schedule`
  MODIFY `id` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=46;

--
-- AUTO_INCREMENT for table `time_slot`
--
ALTER TABLE `time_slot`
  MODIFY `id` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=850;

--
-- AUTO_INCREMENT for table `transaction_logs`
--
ALTER TABLE `transaction_logs`
  MODIFY `id` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=630;

--
-- AUTO_INCREMENT for table `treatment`
--
ALTER TABLE `treatment`
  MODIFY `id` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=16;

--
-- AUTO_INCREMENT for table `treatment_plans`
--
ALTER TABLE `treatment_plans`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=34;

--
-- AUTO_INCREMENT for table `usage_logs`
--
ALTER TABLE `usage_logs`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
  MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1147;

--
-- AUTO_INCREMENT for table `users_groups`
--
ALTER TABLE `users_groups`
  MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1154;

--
-- AUTO_INCREMENT for table `vendor_quotations`
--
ALTER TABLE `vendor_quotations`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `vendor_quotation_items`
--
ALTER TABLE `vendor_quotation_items`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `vital_signs`
--
ALTER TABLE `vital_signs`
  MODIFY `id` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=19;

--
-- AUTO_INCREMENT for table `website_settings`
--
ALTER TABLE `website_settings`
  MODIFY `id` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

-- --------------------------------------------------------

--
-- Structure for view `low_stock_items`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`democa`@`localhost` SQL SECURITY DEFINER VIEW `low_stock_items`  AS SELECT `i`.`id` AS `id`, `i`.`item_code` AS `item_code`, `i`.`name` AS `name`, `i`.`category` AS `category`, `i`.`current_stock` AS `current_stock`, `i`.`reorder_level` AS `reorder_level`, `i`.`minimum_stock` AS `minimum_stock`, `i`.`unit_cost` AS `unit_cost`, `i`.`hospital_id` AS `hospital_id`, `i`.`reorder_level`- `i`.`current_stock` AS `shortage_quantity` FROM `inventory_items` AS `i` WHERE `i`.`current_stock` <= `i`.`reorder_level` AND `i`.`status` = 'active' ;

-- --------------------------------------------------------

--
-- Structure for view `medicine_expiring_soon`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`democa`@`localhost` SQL SECURITY DEFINER VIEW `medicine_expiring_soon`  AS SELECT `m`.`id` AS `medicine_id`, `m`.`name` AS `medicine_name`, `m`.`generic` AS `generic`, `mb`.`id` AS `batch_id`, `mb`.`batch_number` AS `batch_number`, `mb`.`expiry_date` AS `expiry_date`, `mb`.`current_stock` AS `current_stock`, to_days(`mb`.`expiry_date`) - to_days(curdate()) AS `days_to_expiry`, `mb`.`unit_cost`* `mb`.`current_stock` AS `value_at_risk`, `m`.`hospital_id` AS `hospital_id`, `ms`.`name` AS `supplier_name` FROM ((`medicine` `m` join `medicine_batches` `mb` on(`m`.`id` = `mb`.`medicine_id`)) left join `medicine_suppliers` `ms` on(`mb`.`supplier_id` = `ms`.`id`)) WHERE `mb`.`current_stock` > 0 AND to_days(`mb`.`expiry_date`) - to_days(curdate()) <= 90 AND to_days(`mb`.`expiry_date`) - to_days(curdate()) >= 0 ORDER BY to_days(`mb`.`expiry_date`) - to_days(curdate()) ASC ;

-- --------------------------------------------------------

--
-- Structure for view `medicine_low_stock`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`democa`@`localhost` SQL SECURITY DEFINER VIEW `medicine_low_stock`  AS SELECT `m`.`id` AS `id`, `m`.`name` AS `name`, `m`.`generic` AS `generic`, `m`.`category` AS `category`, `m`.`quantity` AS `current_total_stock`, coalesce(sum(`mb`.`current_stock`),0) AS `total_batch_stock`, count(`mb`.`id`) AS `total_batches`, `m`.`hospital_id` AS `hospital_id` FROM (`medicine` `m` left join `medicine_batches` `mb` on(`m`.`id` = `mb`.`medicine_id` and `mb`.`current_stock` > 0)) GROUP BY `m`.`id` HAVING `current_total_stock` <= 10 ;

-- --------------------------------------------------------

--
-- Structure for view `medicine_stock_with_batches`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`democa`@`localhost` SQL SECURITY DEFINER VIEW `medicine_stock_with_batches`  AS SELECT `m`.`id` AS `medicine_id`, `m`.`name` AS `medicine_name`, `m`.`generic` AS `generic`, `m`.`category` AS `category`, `m`.`company` AS `company`, coalesce(`mb`.`id`,0) AS `batch_id`, coalesce(`mb`.`batch_number`,'No Batch') AS `batch_number`, `mb`.`expiry_date` AS `expiry_date`, `mb`.`manufacturing_date` AS `manufacturing_date`, coalesce(`mb`.`current_stock`,0) AS `batch_stock`, coalesce(`mb`.`unit_cost`,0) AS `batch_cost`, coalesce(`mb`.`selling_price`,0) AS `batch_selling_price`, coalesce(`mb`.`mrp`,0) AS `batch_mrp`, coalesce(`mb`.`status`,'unknown') AS `batch_status`, CASE WHEN `mb`.`expiry_date` is null THEN NULL ELSE to_days(`mb`.`expiry_date`) - to_days(curdate()) END AS `days_to_expiry`, CASE WHEN `mb`.`expiry_date` is null THEN 'no_expiry' WHEN to_days(`mb`.`expiry_date`) - to_days(curdate()) <= 0 THEN 'expired' WHEN to_days(`mb`.`expiry_date`) - to_days(curdate()) <= 30 THEN 'expiring_soon' ELSE 'good' END AS `expiry_status`, `m`.`hospital_id` AS `hospital_id` FROM (`medicine` `m` left join `medicine_batches` `mb` on(`m`.`id` = `mb`.`medicine_id`)) WHERE `mb`.`current_stock` > 0 OR `mb`.`id` is null ;

-- --------------------------------------------------------

--
-- Structure for view `monthly_usage_summary`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`democa`@`localhost` SQL SECURITY DEFINER VIEW `monthly_usage_summary`  AS SELECT `i`.`id` AS `inventory_item_id`, `i`.`name` AS `item_name`, `i`.`category` AS `category`, year(`ul`.`usage_date`) AS `usage_year`, month(`ul`.`usage_date`) AS `usage_month`, sum(`ul`.`quantity_used`) AS `total_quantity_used`, sum(`ul`.`total_cost`) AS `total_cost`, avg(`ul`.`quantity_used`) AS `avg_daily_usage`, `ul`.`hospital_id` AS `hospital_id` FROM (`usage_logs` `ul` join `inventory_items` `i` on(`ul`.`inventory_item_id` = `i`.`id`)) GROUP BY `i`.`id`, year(`ul`.`usage_date`), month(`ul`.`usage_date`), `ul`.`hospital_id` ;

-- --------------------------------------------------------

--
-- Structure for view `purchase_order_summary`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`democa`@`localhost` SQL SECURITY DEFINER VIEW `purchase_order_summary`  AS SELECT `po`.`id` AS `id`, `po`.`po_number` AS `po_number`, `s`.`name` AS `supplier_name`, `po`.`order_date` AS `order_date`, `po`.`expected_delivery_date` AS `expected_delivery_date`, `po`.`status` AS `status`, `po`.`grand_total` AS `grand_total`, count(`poi`.`id`) AS `total_items`, sum(`poi`.`quantity_ordered`) AS `total_quantity_ordered`, sum(`poi`.`quantity_received`) AS `total_quantity_received`, `po`.`hospital_id` AS `hospital_id` FROM ((`purchase_orders` `po` left join `suppliers` `s` on(`po`.`supplier_id` = `s`.`id`)) left join `purchase_order_items` `poi` on(`po`.`id` = `poi`.`purchase_order_id`)) GROUP BY `po`.`id` ;

--
-- Constraints for dumped tables
--

--
-- Constraints for table `inventory_categories`
--
ALTER TABLE `inventory_categories`
  ADD CONSTRAINT `inventory_categories_ibfk_1` FOREIGN KEY (`parent_id`) REFERENCES `inventory_categories` (`id`) ON DELETE SET NULL;

--
-- Constraints for table `medicine_batches`
--
ALTER TABLE `medicine_batches`
  ADD CONSTRAINT `fk_batches_purchase_item` FOREIGN KEY (`purchase_item_id`) REFERENCES `medicine_purchase_items` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `fk_batches_supplier` FOREIGN KEY (`supplier_id`) REFERENCES `medicine_suppliers` (`id`) ON DELETE SET NULL;

--
-- Constraints for table `medicine_purchases`
--
ALTER TABLE `medicine_purchases`
  ADD CONSTRAINT `fk_purchases_supplier` FOREIGN KEY (`supplier_id`) REFERENCES `medicine_suppliers` (`id`),
  ADD CONSTRAINT `medicine_purchases_ibfk_1` FOREIGN KEY (`supplier_id`) REFERENCES `medicine_suppliers` (`id`);

--
-- Constraints for table `medicine_purchase_items`
--
ALTER TABLE `medicine_purchase_items`
  ADD CONSTRAINT `fk_purchase_items_purchase` FOREIGN KEY (`purchase_id`) REFERENCES `medicine_purchases` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `medicine_purchase_payments`
--
ALTER TABLE `medicine_purchase_payments`
  ADD CONSTRAINT `fk_purchase_payments_purchase` FOREIGN KEY (`purchase_id`) REFERENCES `medicine_purchases` (`id`);

--
-- Constraints for table `medicine_stock_movements`
--
ALTER TABLE `medicine_stock_movements`
  ADD CONSTRAINT `fk_stock_movements_batch` FOREIGN KEY (`batch_id`) REFERENCES `medicine_batches` (`id`) ON DELETE SET NULL;

--
-- Constraints for table `purchase_orders`
--
ALTER TABLE `purchase_orders`
  ADD CONSTRAINT `purchase_orders_ibfk_1` FOREIGN KEY (`supplier_id`) REFERENCES `suppliers` (`id`);

--
-- Constraints for table `purchase_order_items`
--
ALTER TABLE `purchase_order_items`
  ADD CONSTRAINT `purchase_order_items_ibfk_1` FOREIGN KEY (`purchase_order_id`) REFERENCES `purchase_orders` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `purchase_order_items_ibfk_2` FOREIGN KEY (`inventory_item_id`) REFERENCES `inventory_items` (`id`);

--
-- Constraints for table `stock_transactions`
--
ALTER TABLE `stock_transactions`
  ADD CONSTRAINT `stock_transactions_ibfk_1` FOREIGN KEY (`inventory_item_id`) REFERENCES `inventory_items` (`id`);

--
-- Constraints for table `usage_logs`
--
ALTER TABLE `usage_logs`
  ADD CONSTRAINT `usage_logs_ibfk_1` FOREIGN KEY (`inventory_item_id`) REFERENCES `inventory_items` (`id`);

--
-- Constraints for table `vendor_quotations`
--
ALTER TABLE `vendor_quotations`
  ADD CONSTRAINT `vendor_quotations_ibfk_1` FOREIGN KEY (`supplier_id`) REFERENCES `suppliers` (`id`);

--
-- Constraints for table `vendor_quotation_items`
--
ALTER TABLE `vendor_quotation_items`
  ADD CONSTRAINT `vendor_quotation_items_ibfk_1` FOREIGN KEY (`quotation_id`) REFERENCES `vendor_quotations` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `vendor_quotation_items_ibfk_2` FOREIGN KEY (`inventory_item_id`) REFERENCES `inventory_items` (`id`);
COMMIT;

