-- https://www.phpmyadmin.net/
--

START TRANSACTION;



--
-- Database: `aarthy`
--

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

--
-- Table structure for table `advance_transaction_history`
--

CREATE TABLE `advance_transaction_history` (
  `id` int(11) NOT NULL,
  `patient_id` int(11) NOT NULL,
  `record_id` int(11) NOT NULL,
  `amount` decimal(11,2) NOT NULL,
  `status` varchar(30) DEFAULT NULL,
  `dateTime` datetime DEFAULT NULL,
  `type` varchar(40) DEFAULT NULL,
  `created_by` int(11) NOT NULL,
  `user_type` varchar(50) NOT NULL,
  `mop` varchar(100) DEFAULT NULL,
  `trans_id` varchar(100) DEFAULT NULL,
  `remarks` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `beds`
--

CREATE TABLE `beds` (
  `id` int(11) NOT NULL,
  `room_id` int(11) DEFAULT NULL,
  `bed_name` varchar(50) DEFAULT NULL,
  `bed_type` varchar(100) NOT NULL,
  `bed_status` varchar(100) NOT NULL,
  `price` int(50) NOT NULL,
  `status` varchar(30) DEFAULT NULL,
  `dateTime` datetime DEFAULT NULL,
  `created_by` int(11) NOT NULL,
  `user_type` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `beds`
--

INSERT INTO `beds` (`id`, `room_id`, `bed_name`, `bed_type`, `bed_status`, `price`, `status`, `dateTime`, `created_by`, `user_type`) VALUES
(1, 1, 'f1r1_1', '', 'occupied', 1000, 'Active', '2024-03-05 11:32:14', 1, 'doctor'),
(2, 1, 'f1r1_2', '', 'unoccupied', 1000, 'Active', '2024-03-05 11:32:14', 1, 'doctor'),
(3, 1, 'f1r1_3', '', 'occupied', 1000, 'Active', '2024-03-05 11:32:14', 1, 'doctor'),
(4, 1, 'f1r1_4', '', 'unoccupied', 1000, 'Active', '2024-03-05 11:32:14', 1, 'doctor'),
(5, 1, '11', '', 'occupied', 100, 'Active', '2024-07-26 11:16:43', 1, 'doctor'),
(6, 1, '12', '', 'occupied', 120, 'Active', '2024-07-26 11:16:43', 1, 'doctor'),
(7, 1, '13', '', 'unoccupied', 130, 'Active', '2024-07-26 11:16:43', 1, 'doctor'),
(8, 1, '14', '', 'occupied', 140, 'Active', '2024-07-26 11:16:43', 1, 'doctor');

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

--
-- Table structure for table `blood`
--

CREATE TABLE `blood` (
  `id` int(11) NOT NULL,
  `amount` decimal(11,2) NOT NULL,
  `status` varchar(40) DEFAULT NULL,
  `dateTime` datetime DEFAULT NULL,
  `created_by` int(11) NOT NULL,
  `user_type` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `blood`
--

INSERT INTO `blood` (`id`, `amount`, `status`, `dateTime`, `created_by`, `user_type`) VALUES
(1, 500.00, 'Active', '2024-03-05 11:28:41', 1, 'doctor'),
(2, 1100.00, 'Active', '2024-07-15 13:28:40', 1, 'doctor'),
(3, 1000.00, 'Active', '2024-07-15 13:57:57', 1, 'doctor'),
(4, 10000.00, 'Active', '2024-07-15 13:58:24', 1, 'doctor');

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

--
-- Table structure for table `building`
--

CREATE TABLE `building` (
  `id` int(11) NOT NULL,
  `building_name` varchar(50) DEFAULT NULL,
  `status` varchar(30) DEFAULT NULL,
  `dateTime` datetime DEFAULT NULL,
  `created_by` int(11) NOT NULL,
  `user_type` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `building`
--

INSERT INTO `building` (`id`, `building_name`, `status`, `dateTime`, `created_by`, `user_type`) VALUES
(1, 'Building1', 'Active', '2024-03-05 11:30:28', 1, 'doctor');

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

--
-- Table structure for table `drip_comment`
--

CREATE TABLE `drip_comment` (
  `id` int(11) NOT NULL,
  `mrd_no` int(11) NOT NULL,
  `patient_id` int(11) NOT NULL,
  `category` varchar(255) NOT NULL,
  `comment` text NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `drip_comment`
--

INSERT INTO `drip_comment` (`id`, `mrd_no`, `patient_id`, `category`, `comment`, `created_at`) VALUES
(1, 0, 1, '0', 'hello', '2024-07-09 09:09:24'),
(2, 0, 1, '0', 'dvchdvcydh', '2024-07-09 12:11:05'),
(3, 0, 1, '0', 'today new', '2024-07-10 07:01:43'),
(4, 0, 1, '0', 'newww', '2024-07-10 07:26:51'),
(5, 0, 1, '0', 'The professionalism and empathy displayed made me feel confident and reassured throughout the entire visit. I am incredibly grateful for the excellent care I received and highly recommend Dr to anyone in need of medical attention. Thank you for your dedication and kindness!', '2024-07-10 07:46:55'),
(6, 0, 1, '0', 'The professionalism and empathy displayed made me feel confident and reassured throughout the entire visit. I am incredibly grateful for the excellent care I received and highly recommend Dr to anyone in need of medical attention. Thank you for your dedication and kindness!', '2024-07-10 07:47:06'),
(7, 0, 1, '0', 'hello', '2024-07-10 07:49:42'),
(8, 0, 1, '0', 'heyy', '2024-07-12 08:42:46'),
(9, 0, 1, '0', 'Comment', '2024-08-29 12:19:26');

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

--
-- Table structure for table `emp_role`
--

CREATE TABLE `emp_role` (
  `id` int(11) NOT NULL,
  `role` varchar(255) NOT NULL,
  `status` varchar(30) NOT NULL,
  `dateTime` datetime NOT NULL,
  `created_by` int(11) NOT NULL,
  `user_type` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `floor`
--

CREATE TABLE `floor` (
  `id` int(11) NOT NULL,
  `building_id` int(11) DEFAULT NULL,
  `floor_no` varchar(50) DEFAULT NULL,
  `status` varchar(50) DEFAULT NULL,
  `dateTime` datetime DEFAULT NULL,
  `created_by` int(11) NOT NULL,
  `user_type` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `floor`
--

INSERT INTO `floor` (`id`, `building_id`, `floor_no`, `status`, `dateTime`, `created_by`, `user_type`) VALUES
(1, 1, 'Floor1', 'Active', '2024-03-05 11:30:36', 1, 'doctor'),
(2, 1, 'Floor2', 'Active', '2024-03-05 11:30:44', 1, 'doctor'),
(3, 1, 'Floor1', 'Active', '2024-04-26 13:50:42', 1, 'doctor'),
(4, 1, '101', 'Active', '2024-08-20 13:57:36', 1, 'doctor');

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

--
-- Table structure for table `formula_data`
--

CREATE TABLE `formula_data` (
  `id` int(5) NOT NULL,
  `formula` text NOT NULL,
  `status` varchar(30) NOT NULL,
  `dateTime` datetime NOT NULL,
  `created_by` int(11) NOT NULL,
  `user_type` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `formula_data`
--

INSERT INTO `formula_data` (`id`, `formula`, `status`, `dateTime`, `created_by`, `user_type`) VALUES
(1, 'f1', 'Active', '2024-03-06 17:50:27', 1, 'doctor'),
(2, 'f2', 'Active', '2024-03-06 17:50:36', 1, 'doctor'),
(3, 'f3', 'Active', '2024-03-06 17:50:40', 1, 'doctor'),
(4, 'f4', 'Active', '2024-03-06 17:50:43', 1, 'doctor'),
(5, 'gluc1', 'Active', '2024-04-30 12:23:22', 1, 'doctor'),
(6, 'generic1', 'Active', '2024-09-23 11:38:38', 7, 'emp');

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

--
-- Table structure for table `inventory`
--

CREATE TABLE `inventory` (
  `id` int(11) NOT NULL,
  `medicine_id` int(11) DEFAULT NULL,
  `dosage_id` int(11) DEFAULT NULL,
  `quantity` int(11) DEFAULT NULL,
  `unit_price` decimal(10,2) DEFAULT NULL,
  `total_price` decimal(10,2) DEFAULT NULL,
  `status` varchar(20) DEFAULT NULL,
  `dateTime` datetime DEFAULT NULL,
  `created_by` varchar(255) DEFAULT NULL,
  `user_type` varchar(255) DEFAULT NULL,
  `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_general_ci;

--
-- Dumping data for table `inventory`
--

INSERT INTO `inventory` (`id`, `medicine_id`, `dosage_id`, `quantity`, `unit_price`, `total_price`, `status`, `dateTime`, `created_by`, `user_type`, `created_at`, `updated_at`) VALUES
(1, 2, 5, 10, 2000.00, 20000.00, 'Active', '2024-03-08 21:58:15', '1', 'doctor', '2024-03-08 16:28:15', '2024-03-08 16:28:15'),
(2, 1, 2, 10, 200.00, 2000.00, 'Active', '2024-03-08 21:58:15', '1', 'doctor', '2024-03-08 16:28:15', '2024-03-08 16:28:15'),
(3, 1, 1, 20, 100.00, 1000.00, 'Active', '2024-03-08 22:07:39', '1', 'doctor', '2024-03-08 16:37:39', '2024-09-23 05:01:11'),
(4, 1, 3, 3, 300.00, 900.00, 'Active', '2024-03-08 22:14:10', '1', 'doctor', '2024-03-08 16:44:10', '2024-03-08 16:50:17'),
(5, 12, 18, 1, 5.00, 5.00, 'Active', '2024-09-27 15:46:06', 'system', 'admin', '2024-09-27 10:16:06', '2024-09-27 10:16:06');

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

--
-- Table structure for table `inventory_pharmacy`
--

CREATE TABLE `inventory_pharmacy` (
  `id` int(11) NOT NULL,
  `inventory_pharmacy_batch_id` int(11) NOT NULL,
  `batch_no` varchar(50) NOT NULL,
  `company` varchar(100) NOT NULL,
  `generic` varchar(100) NOT NULL,
  `form` varchar(50) NOT NULL,
  `brand` varchar(100) NOT NULL,
  `dose` varchar(50) NOT NULL,
  `packing` varchar(50) NOT NULL,
  `quantity` int(11) NOT NULL,
  `expiry` date NOT NULL,
  `offer` varchar(50) DEFAULT NULL,
  `mrp` decimal(10,2) NOT NULL,
  `purchase_rate` decimal(10,2) NOT NULL,
  `stock_value` decimal(15,2) NOT NULL,
  `hsn` varchar(50) NOT NULL,
  `gst` decimal(5,2) NOT NULL,
  `dealer` varchar(100) NOT NULL,
  `created_on` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `updated_on` datetime DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `purchase_date` datetime DEFAULT NULL,
  `last_sales_date` datetime DEFAULT NULL,
  `purchase_ref_no` varchar(255) DEFAULT NULL,
  `selling_price` decimal(10,2) DEFAULT 0.00,
  `bill_discount` decimal(10,2) DEFAULT NULL,
  `trans_id` varchar(255) DEFAULT NULL,
  `payment_type` varchar(50) DEFAULT NULL,
  `payment_details` text DEFAULT NULL,
  `Dispensary_Rack` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `inventory_pharmacy`
--

INSERT INTO `inventory_pharmacy` (`id`, `inventory_pharmacy_batch_id`, `batch_no`, `company`, `generic`, `form`, `brand`, `dose`, `packing`, `quantity`, `expiry`, `offer`, `mrp`, `purchase_rate`, `stock_value`, `hsn`, `gst`, `dealer`, `created_on`, `updated_on`, `purchase_date`, `last_sales_date`, `purchase_ref_no`, `selling_price`, `bill_discount`, `trans_id`, `payment_type`, `payment_details`, `Dispensary_Rack`) VALUES
(1, 1, '001', '', '1', 'Tablets', '', '18', '', 20, '2024-10-28', '0', 5.00, 350.00, 0.00, '', 0.00, '', '2024-10-07 04:29:47', '2024-10-07 09:59:47', '2024-09-28 00:00:00', '2024-10-04 11:41:22', NULL, 5.00, 0.00, '', '', '', ''),
(2, 8, '10001', '', '1', 'Tablets', '', '19', '', 60, '2026-12-03', '0', 100.00, 10000.00, 0.00, '', 0.00, '', '2024-10-04 06:11:22', '2024-10-04 11:41:22', NULL, '2024-10-04 11:41:22', NULL, 100.00, 0.00, '', '', '', ''),
(3, 8, '10001', '', '6', 'Tablets', '', '21', '', 10, '2026-03-28', '0', 100.00, 1000.00, 0.00, '', 0.00, '', '2024-10-03 08:50:16', '2024-10-03 14:20:16', NULL, NULL, NULL, 100.00, 0.00, '', '', '', '');

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

--
-- Table structure for table `inventory_pharmacy_batch`
--

CREATE TABLE `inventory_pharmacy_batch` (
  `id` int(11) NOT NULL,
  `status` varchar(255) NOT NULL,
  `createdOn` datetime DEFAULT NULL,
  `createdBy` int(11) DEFAULT NULL,
  `createdUserType` varchar(255) DEFAULT NULL,
  `purchase_ref_no` varchar(255) NOT NULL,
  `purchase_date` datetime DEFAULT NULL,
  `agency_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `inventory_pharmacy_batch`
--

INSERT INTO `inventory_pharmacy_batch` (`id`, `status`, `createdOn`, `createdBy`, `createdUserType`, `purchase_ref_no`, `purchase_date`, `agency_id`) VALUES
(1, 'Active', '2024-09-28 10:29:13', 7, 'emp', '342', '2024-09-28 00:00:00', 1),
(2, 'Active', '2024-09-28 10:32:00', 7, 'emp', '111', '2024-09-28 00:00:00', 1),
(3, 'Active', '2024-09-28 10:42:41', 7, 'emp', '111', '2024-09-28 00:00:00', 1),
(4, 'Active', '2024-09-28 11:52:05', 7, 'emp', '132', '2024-09-28 00:00:00', 1),
(5, 'Active', '2024-09-28 11:52:06', 7, 'emp', '132', '2024-09-28 00:00:00', 1),
(6, 'Active', '2024-09-28 11:52:09', 7, 'emp', '132', '2024-09-28 00:00:00', 1),
(7, 'Active', '2024-09-28 11:52:38', 7, 'emp', '132', '2024-09-28 00:00:00', 1),
(8, 'Active', '2024-10-03 14:20:16', 7, 'emp', '1111', '2024-10-03 00:00:00', 1);

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

--
-- Table structure for table `inventory_pharmacy_history`
--

CREATE TABLE `inventory_pharmacy_history` (
  `id` int(11) NOT NULL,
  `inventory_pharmacy_batch_id` int(11) NOT NULL,
  `batch_no` varchar(255) NOT NULL,
  `company` varchar(255) NOT NULL,
  `generic` int(11) NOT NULL,
  `form` varchar(255) NOT NULL,
  `brand` varchar(255) NOT NULL,
  `dose` int(11) NOT NULL,
  `packing` varchar(255) NOT NULL,
  `quantity` int(11) NOT NULL,
  `expiry` datetime NOT NULL,
  `offer` varchar(255) DEFAULT NULL,
  `mrp` decimal(11,2) NOT NULL,
  `purchase_rate` decimal(11,2) NOT NULL,
  `stock_value` decimal(11,2) NOT NULL,
  `hsn` varchar(255) NOT NULL,
  `gst` decimal(11,2) NOT NULL,
  `dealer` varchar(255) NOT NULL,
  `created_on` datetime NOT NULL,
  `updated_on` datetime DEFAULT NULL,
  `purchase_date` datetime DEFAULT NULL,
  `purchase_ref_no` varchar(255) DEFAULT NULL,
  `selling_price` decimal(11,2) DEFAULT NULL,
  `bill_discount` decimal(11,2) DEFAULT NULL,
  `trans_id` varchar(255) DEFAULT NULL,
  `payment_type` varchar(255) DEFAULT NULL,
  `payment_details` text DEFAULT NULL,
  `Dispensary_Rack` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `inventory_pharmacy_history`
--

INSERT INTO `inventory_pharmacy_history` (`id`, `inventory_pharmacy_batch_id`, `batch_no`, `company`, `generic`, `form`, `brand`, `dose`, `packing`, `quantity`, `expiry`, `offer`, `mrp`, `purchase_rate`, `stock_value`, `hsn`, `gst`, `dealer`, `created_on`, `updated_on`, `purchase_date`, `purchase_ref_no`, `selling_price`, `bill_discount`, `trans_id`, `payment_type`, `payment_details`, `Dispensary_Rack`) VALUES
(1, 1, '001', '', 1, 'Tablets', '', 18, '', 10, '2024-08-12 00:00:00', '0', 5.00, 50.00, 0.00, '', 0.00, '', '2024-09-28 10:29:13', NULL, NULL, NULL, 5.00, 0.00, '', '', '', ''),
(2, 2, '001', '', 1, 'Tablets', '', 18, '', 10, '2024-08-12 00:00:00', '0', 5.00, 50.00, 0.00, '', 0.00, '', '2024-09-28 10:32:00', NULL, NULL, NULL, 5.00, 0.00, '', '', '', ''),
(3, 3, '001', '', 1, 'Tablets', '', 18, '', 10, '2024-10-28 00:00:00', '0', 5.00, 100.00, 0.00, '', 0.00, '', '2024-09-28 10:42:41', NULL, NULL, NULL, 5.00, 0.00, '', '', '', ''),
(4, 4, '001', '', 1, 'Tablets', '', 18, '', 10, '2024-10-28 00:00:00', '10', 5.00, 50.00, 0.00, '', 0.00, '', '2024-09-28 11:52:05', NULL, NULL, NULL, 5.00, 0.00, '', '', '', ''),
(5, 5, '001', '', 1, 'Tablets', '', 18, '', 10, '2024-10-28 00:00:00', '10', 5.00, 50.00, 0.00, '', 0.00, '', '2024-09-28 11:52:06', NULL, NULL, NULL, 5.00, 0.00, '', '', '', ''),
(6, 6, '001', '', 1, 'Tablets', '', 18, '', 10, '2024-10-28 00:00:00', '10', 5.00, 50.00, 0.00, '', 0.00, '', '2024-09-28 11:52:09', NULL, NULL, NULL, 5.00, 0.00, '', '', '', ''),
(7, 7, '001', '', 1, 'Tablets', '', 18, '', 10, '2024-10-28 00:00:00', '10', 5.00, 50.00, 0.00, '', 0.00, '', '2024-09-28 11:52:38', NULL, NULL, NULL, 5.00, 0.00, '', '', '', ''),
(8, 8, '10001', '', 1, 'Tablets', '', 19, '', 100, '2026-12-03 00:00:00', '0', 100.00, 10000.00, 0.00, '', 0.00, '', '2024-10-03 14:20:16', NULL, NULL, NULL, 100.00, 0.00, '', '', '', ''),
(9, 8, '10001', '', 1, 'Tablets', '', 19, '', 100, '2026-12-03 00:00:00', '0', 100.00, 10000.00, 0.00, '', 0.00, '', '2024-10-03 14:20:16', NULL, NULL, NULL, 100.00, 0.00, '', '', '', ''),
(10, 8, '10001', '', 6, 'Tablets', '', 21, '', 10, '2026-03-28 00:00:00', '0', 100.00, 1000.00, 0.00, '', 0.00, '', '2024-10-03 14:20:16', NULL, NULL, NULL, 100.00, 0.00, '', '', '', '');

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

--
-- Table structure for table `inventory_ward`
--

CREATE TABLE `inventory_ward` (
  `id` int(11) NOT NULL,
  `floor_id` int(11) NOT NULL,
  `medicine_id` int(11) DEFAULT NULL,
  `dosage_id` int(11) DEFAULT NULL,
  `quantity` int(11) DEFAULT NULL,
  `unit_price` decimal(10,2) DEFAULT NULL,
  `total_price` decimal(10,2) DEFAULT NULL,
  `status` varchar(20) DEFAULT NULL,
  `dateTime` datetime DEFAULT NULL,
  `created_by` varchar(255) DEFAULT NULL,
  `user_type` varchar(255) DEFAULT NULL,
  `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_general_ci;

--
-- Dumping data for table `inventory_ward`
--

INSERT INTO `inventory_ward` (`id`, `floor_id`, `medicine_id`, `dosage_id`, `quantity`, `unit_price`, `total_price`, `status`, `dateTime`, `created_by`, `user_type`, `created_at`, `updated_at`) VALUES
(1, 1, 2, 5, 10, 2000.00, 20000.00, 'Active', '2024-03-08 21:58:15', '1', 'doctor', '2024-03-08 16:28:15', '2024-08-17 05:49:39'),
(2, 1, 1, 2, 10, 200.00, 2000.00, 'Active', '2024-03-08 21:58:15', '1', 'doctor', '2024-03-08 16:28:15', '2024-08-17 05:49:42'),
(3, 1, 1, 1, 40, 100.00, 1000.00, 'Active', '2024-03-08 22:07:39', '1', 'doctor', '2024-03-08 16:37:39', '2024-09-23 05:01:11'),
(4, 2, 1, 3, 3, 300.00, 900.00, 'Active', '2024-03-08 22:14:10', '1', 'doctor', '2024-03-08 16:44:10', '2024-08-17 06:04:17');

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

--
-- Table structure for table `ip_advance`
--

CREATE TABLE `ip_advance` (
  `id` int(11) NOT NULL,
  `patient_record_id` int(11) NOT NULL,
  `tran_id` varchar(255) DEFAULT NULL,
  `receipt_no` varchar(255) NOT NULL,
  `mop` varchar(50) NOT NULL,
  `amount` decimal(11,2) NOT NULL,
  `type` varchar(50) NOT NULL,
  `remarks` text DEFAULT NULL,
  `status` varchar(30) NOT NULL,
  `dateTime` datetime NOT NULL,
  `created_by` int(11) NOT NULL,
  `user_type` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `ip_billing`
--

CREATE TABLE `ip_billing` (
  `id` int(11) NOT NULL,
  `patient_id` int(11) NOT NULL,
  `patient_record_id` int(11) NOT NULL,
  `sub_total` decimal(11,2) NOT NULL,
  `total` decimal(11,2) NOT NULL,
  `less` decimal(11,2) NOT NULL,
  `remarks` text NOT NULL,
  `pay_status` varchar(30) NOT NULL,
  `paid_on` datetime NOT NULL,
  `admit_date` datetime NOT NULL,
  `discharge_date` datetime NOT NULL,
  `nod` varchar(255) NOT NULL,
  `time` varchar(255) NOT NULL,
  `status` varchar(30) DEFAULT NULL,
  `dateTime` datetime NOT NULL,
  `created_by` int(11) NOT NULL,
  `user_type` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `ip_billing`
--

INSERT INTO `ip_billing` (`id`, `patient_id`, `patient_record_id`, `sub_total`, `total`, `less`, `remarks`, `pay_status`, `paid_on`, `admit_date`, `discharge_date`, `nod`, `time`, `status`, `dateTime`, `created_by`, `user_type`) VALUES
(1, 16, 3, 156640.00, 156640.00, 0.00, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '2024-10-03 14:38:00', '11', '287h 58m ', 'Active', '2024-10-03 14:38:50', 1, 'emp'),
(2, 21, 9, 3120.00, 3120.00, 0.00, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '2024-10-03 14:43:00', '0', '0h 4m ', 'Active', '2024-10-03 14:44:31', 1, 'emp'),
(3, 25, 8, 4000.00, 4000.00, 0.00, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '2024-10-03 14:43:00', '0', '0h 7m ', 'Active', '2024-10-03 14:44:45', 1, 'emp'),
(4, 6, 4, 106420.00, 106420.00, 0.00, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '2024-10-03 14:38:00', '8', '207h 45m ', 'Active', '2024-10-03 14:44:58', 1, 'emp'),
(5, 19, 6, 52000.00, 52000.00, 0.00, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '2024-10-03 14:43:00', '3', '76h 4m ', 'Active', '2024-10-03 14:45:13', 1, 'emp');

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

--
-- Table structure for table `ip_bill_scan`
--

CREATE TABLE `ip_bill_scan` (
  `id` int(11) NOT NULL,
  `patient_record_id` int(11) NOT NULL,
  `patient_id` int(11) NOT NULL,
  `division_id` int(11) NOT NULL,
  `patient_type` varchar(30) NOT NULL,
  `qty` int(11) NOT NULL,
  `amount` decimal(11,2) NOT NULL,
  `status` varchar(40) NOT NULL,
  `dateTime` datetime NOT NULL,
  `created_by` int(11) NOT NULL,
  `user_type` varchar(50) NOT NULL,
  `role` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `ip_bill_scan`
--

INSERT INTO `ip_bill_scan` (`id`, `patient_record_id`, `patient_id`, `division_id`, `patient_type`, `qty`, `amount`, `status`, `dateTime`, `created_by`, `user_type`, `role`) VALUES
(1, 2, 1, 4, '', 1, 5000.00, 'Active', '2024-09-21 11:46:47', 15, 'emp', 'Ward'),
(2, 3, 16, 4, '', 1, 5000.00, 'Active', '2024-09-23 12:41:59', 15, 'emp', 'Ward'),
(3, 3, 16, 4, '', 1, 5000.00, 'Active', '2024-09-23 12:42:12', 15, 'emp', 'Ward');

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

--
-- Table structure for table `ip_bill_services`
--

CREATE TABLE `ip_bill_services` (
  `id` int(11) NOT NULL,
  `patient_record_id` int(11) NOT NULL,
  `patient_id` int(11) NOT NULL,
  `service_id` int(11) NOT NULL,
  `service_name` varchar(255) NOT NULL,
  `qty` int(11) NOT NULL,
  `service_amount` decimal(11,2) NOT NULL,
  `status` varchar(30) NOT NULL,
  `dateTime` datetime NOT NULL,
  `created_by` int(11) NOT NULL,
  `user_type` varchar(50) NOT NULL,
  `role` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `ip_bill_services`
--

INSERT INTO `ip_bill_services` (`id`, `patient_record_id`, `patient_id`, `service_id`, `service_name`, `qty`, `service_amount`, `status`, `dateTime`, `created_by`, `user_type`, `role`) VALUES
(1, 3, 0, 0, 'Nurse Charge', 1, 47000.00, 'Active', '2024-10-03 14:38:50', 1, 'emp', ''),
(2, 3, 0, 0, 'Bed Charge', 1, 5640.00, 'Active', '2024-10-03 14:38:50', 1, 'emp', ''),
(3, 3, 0, 0, 'Doctor Charge', 1, 94000.00, 'Active', '2024-10-03 14:38:50', 1, 'emp', ''),
(4, 9, 0, 0, 'Nurse Charge', 1, 1000.00, 'Active', '2024-10-03 14:44:31', 1, 'emp', ''),
(5, 9, 0, 0, 'Bed Charge', 1, 120.00, 'Active', '2024-10-03 14:44:31', 1, 'emp', ''),
(6, 9, 0, 0, 'Doctor Charge', 1, 2000.00, 'Active', '2024-10-03 14:44:31', 1, 'emp', ''),
(7, 8, 0, 0, 'Nurse Charge', 1, 1000.00, 'Active', '2024-10-03 14:44:45', 1, 'emp', ''),
(8, 8, 0, 0, 'Bed Charge', 1, 1000.00, 'Active', '2024-10-03 14:44:45', 1, 'emp', ''),
(9, 8, 0, 0, 'Doctor Charge', 1, 2000.00, 'Active', '2024-10-03 14:44:45', 1, 'emp', ''),
(10, 4, 0, 0, 'Nurse Charge', 1, 34000.00, 'Active', '2024-10-03 14:44:58', 1, 'emp', ''),
(11, 4, 0, 0, 'Bed Charge', 1, 4420.00, 'Active', '2024-10-03 14:44:58', 1, 'emp', ''),
(12, 4, 0, 0, 'Doctor Charge', 1, 68000.00, 'Active', '2024-10-03 14:44:58', 1, 'emp', ''),
(13, 6, 0, 0, 'Nurse Charge', 1, 13000.00, 'Active', '2024-10-03 14:45:13', 1, 'emp', ''),
(14, 6, 0, 0, 'Bed Charge', 1, 13000.00, 'Active', '2024-10-03 14:45:13', 1, 'emp', ''),
(15, 6, 0, 0, 'Doctor Charge', 1, 26000.00, 'Active', '2024-10-03 14:45:13', 1, 'emp', '');

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

--
-- Table structure for table `ip_medications_batch`
--

CREATE TABLE `ip_medications_batch` (
  `id` int(11) NOT NULL,
  `patient_record_id` int(11) NOT NULL,
  `patient_id` int(11) NOT NULL,
  `doctor_id` int(11) NOT NULL,
  `paymentStatus` varchar(255) NOT NULL,
  `status` varchar(255) NOT NULL,
  `createdOn` datetime NOT NULL,
  `createdBy` int(11) NOT NULL,
  `createdUserType` varchar(255) NOT NULL,
  `less` decimal(11,2) NOT NULL,
  `reason_of_less` varchar(255) NOT NULL,
  `sub_total` decimal(11,2) NOT NULL,
  `total` decimal(11,2) NOT NULL,
  `payment_method` varchar(255) NOT NULL,
  `trans_id` varchar(255) NOT NULL,
  `paidOn` datetime NOT NULL,
  `attended_by` int(11) NOT NULL,
  `billied_by` int(11) NOT NULL,
  `verified_by` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `ip_medications_batch`
--

INSERT INTO `ip_medications_batch` (`id`, `patient_record_id`, `patient_id`, `doctor_id`, `paymentStatus`, `status`, `createdOn`, `createdBy`, `createdUserType`, `less`, `reason_of_less`, `sub_total`, `total`, `payment_method`, `trans_id`, `paidOn`, `attended_by`, `billied_by`, `verified_by`) VALUES
(1, 3, 0, 0, 'paid', 'Active', '2024-09-23 12:47:06', 1, 'doctor', 0.00, '', 100.00, 100.00, 'Cash', '', '2024-09-23 16:47:04', 9, 16, 9),
(2, 4, 0, 0, 'unpaid', 'Active', '2024-09-24 22:54:42', 1, 'doctor', 0.00, '', 0.00, 0.00, '', '', '0000-00-00 00:00:00', 0, 0, 0),
(3, 8, 25, 0, 'paid', 'Active', '2024-10-03 14:36:20', 15, 'emp', 0.00, '', 1050.00, 1050.00, 'Cash', '', '2024-10-04 11:39:56', 9, 1, 16),
(4, 10, 26, 0, 'paid', 'Active', '2024-10-03 14:47:52', 15, 'emp', 0.00, '', 1050.00, 1050.00, 'Cash', '', '2024-10-03 14:50:12', 9, 16, 9);

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

--
-- Table structure for table `ip_medications_items`
--

CREATE TABLE `ip_medications_items` (
  `id` int(11) NOT NULL,
  `patient_record_id` int(11) NOT NULL,
  `tablet_id` int(11) NOT NULL,
  `dosage_id` int(11) NOT NULL,
  `ip_medications_batch_id` int(11) NOT NULL,
  `drug` varchar(255) NOT NULL,
  `dosage` varchar(255) NOT NULL,
  `drug_type` varchar(255) NOT NULL,
  `type` varchar(255) NOT NULL,
  `time_taken` varchar(255) NOT NULL,
  `frequency` varchar(255) NOT NULL,
  `duration` varchar(255) NOT NULL,
  `quantity` int(11) NOT NULL,
  `formulation` varchar(255) NOT NULL,
  `tablet` varchar(255) NOT NULL,
  `no_of_days` varchar(255) NOT NULL,
  `intake_pattern` varchar(255) NOT NULL,
  `remarks` text NOT NULL,
  `status` varchar(255) NOT NULL,
  `dateTime` datetime NOT NULL,
  `created_by` int(11) NOT NULL,
  `user_type` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `ip_medications_items`
--

INSERT INTO `ip_medications_items` (`id`, `patient_record_id`, `tablet_id`, `dosage_id`, `ip_medications_batch_id`, `drug`, `dosage`, `drug_type`, `type`, `time_taken`, `frequency`, `duration`, `quantity`, `formulation`, `tablet`, `no_of_days`, `intake_pattern`, `remarks`, `status`, `dateTime`, `created_by`, `user_type`) VALUES
(1, 3, 13, 19, 1, '\n                testONe\n            ', '\n                100mg\n            ', '\n                Tablets\n            ', '\n                Oral\n            ', '\n                Before Food\n            ', '\n                1-0-0\n            ', '1', 1, '', '', '', '', '', 'Active', '2024-09-23 12:47:06', 1, 'doctor'),
(2, 4, 10, 15, 2, '\n                MedTestOne\n            ', '\n                100mg\n            ', '\n                Tablets\n            ', '\n                Oral\n            ', '\n                Before Food\n            ', '\n                1-0-0\n            ', '1', 1, '', '', '', '', '', 'Active', '2024-09-24 22:54:42', 1, 'doctor'),
(3, 8, 12, 18, 3, 'testMedOne - f1', '100mg', 'Oral', 'Tablets', 'After Food', '1-0-0', '10', 10, '', '', '', '', '', 'Active', '0000-00-00 00:00:00', 15, 'emp'),
(4, 8, 13, 19, 3, 'testONe - f1', '100mg', 'Oral', 'Tablets', 'After Food', '1-0-0', '10', 10, '', '', '', '', '', 'Active', '0000-00-00 00:00:00', 15, 'emp'),
(5, 10, 12, 18, 4, 'testMedOne - f1', '100mg', 'Oral', 'Tablets', 'Before Food', '1-0-0', '10', 10, '', '', '', '', '', 'Active', '0000-00-00 00:00:00', 15, 'emp'),
(6, 10, 13, 19, 4, 'testONe - f1', '100mg', 'Oral', 'Tablets', 'After Food', '1-0-0', '10', 10, '', '', '', '', '', 'Active', '0000-00-00 00:00:00', 15, 'emp');

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

--
-- Table structure for table `ip_medications_sold_items`
--

CREATE TABLE `ip_medications_sold_items` (
  `id` int(11) NOT NULL,
  `ip_medications_batch_id` int(11) NOT NULL,
  `patient_record_id` int(11) NOT NULL,
  `tablet_id` int(11) NOT NULL,
  `dosage_id` int(11) NOT NULL,
  `quantity` int(11) NOT NULL,
  `credited_quantity` int(11) NOT NULL,
  `status` varchar(255) NOT NULL,
  `createdOn` datetime NOT NULL,
  `createdBy` int(255) NOT NULL,
  `createdUserType` varchar(255) NOT NULL,
  `drug` varchar(255) NOT NULL,
  `drug_type` varchar(255) NOT NULL,
  `dosage` varchar(255) NOT NULL,
  `type` varchar(255) NOT NULL,
  `time_taken` varchar(255) NOT NULL,
  `frequency` varchar(255) NOT NULL,
  `duration` datetime NOT NULL,
  `formulation` varchar(255) NOT NULL,
  `tablet` varchar(255) NOT NULL,
  `no_of_days` varchar(255) NOT NULL,
  `intake_pattern` varchar(255) NOT NULL,
  `remarks` text NOT NULL,
  `batch_no` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `ip_medications_sold_items`
--

INSERT INTO `ip_medications_sold_items` (`id`, `ip_medications_batch_id`, `patient_record_id`, `tablet_id`, `dosage_id`, `quantity`, `credited_quantity`, `status`, `createdOn`, `createdBy`, `createdUserType`, `drug`, `drug_type`, `dosage`, `type`, `time_taken`, `frequency`, `duration`, `formulation`, `tablet`, `no_of_days`, `intake_pattern`, `remarks`, `batch_no`) VALUES
(1, 1, 3, 13, 19, 1, 0, 'Active', '0000-00-00 00:00:00', 0, '', '', '', '', '', '', '', '0000-00-00 00:00:00', '', '', '', '', '', '001'),
(2, 4, 10, 12, 18, 10, 10, 'Active', '0000-00-00 00:00:00', 0, '', '', '', '', '', '', '', '0000-00-00 00:00:00', '', '', '', '', '', '001'),
(3, 4, 10, 13, 19, 10, 10, 'Active', '0000-00-00 00:00:00', 0, '', '', '', '', '', '', '', '0000-00-00 00:00:00', '', '', '', '', '', '10001'),
(4, 3, 8, 12, 18, 10, 10, 'Active', '0000-00-00 00:00:00', 0, '', '', '', '', '', '', '', '0000-00-00 00:00:00', '', '', '', '', '', '001'),
(5, 3, 8, 13, 19, 10, 10, 'Active', '0000-00-00 00:00:00', 0, '', '', '', '', '', '', '', '0000-00-00 00:00:00', '', '', '', '', '', '10001');

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

--
-- Table structure for table `ip_ob_entry_data`
--

CREATE TABLE `ip_ob_entry_data` (
  `id` int(5) NOT NULL,
  `token_no` int(5) NOT NULL,
  `patient_id` int(5) NOT NULL,
  `doctor_id` int(5) NOT NULL,
  `bill_no` varchar(255) NOT NULL,
  `ad_amount` decimal(11,2) DEFAULT NULL,
  `mop` varchar(40) NOT NULL,
  `transaction_id` varchar(255) NOT NULL,
  `nurse_charge` decimal(11,2) NOT NULL,
  `doc_fee` decimal(11,2) NOT NULL,
  `bed_id` int(11) NOT NULL,
  `bed_charge` decimal(11,2) NOT NULL,
  `reason` text NOT NULL,
  `actual_reason` text NOT NULL,
  `bp` varchar(50) NOT NULL,
  `weight` int(11) NOT NULL,
  `temp` int(11) NOT NULL,
  `sugar_reading` varchar(30) NOT NULL,
  `status` varchar(30) NOT NULL,
  `patient_type` varchar(50) NOT NULL,
  `transferred_to` varchar(50) NOT NULL,
  `transferred_by` int(11) NOT NULL,
  `dateTime` datetime NOT NULL,
  `created_by` int(11) NOT NULL,
  `user_type` varchar(50) NOT NULL,
  `discharge_date` datetime NOT NULL,
  `op_row_id` int(11) NOT NULL,
  `discharged_by` varchar(50) NOT NULL,
  `discharged_by_user` varchar(50) NOT NULL,
  `billed_date` datetime NOT NULL,
  `billed_by` datetime NOT NULL,
  `billed_user` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `ip_ob_entry_data`
--

INSERT INTO `ip_ob_entry_data` (`id`, `token_no`, `patient_id`, `doctor_id`, `bill_no`, `ad_amount`, `mop`, `transaction_id`, `nurse_charge`, `doc_fee`, `bed_id`, `bed_charge`, `reason`, `actual_reason`, `bp`, `weight`, `temp`, `sugar_reading`, `status`, `patient_type`, `transferred_to`, `transferred_by`, `dateTime`, `created_by`, `user_type`, `discharge_date`, `op_row_id`, `discharged_by`, `discharged_by_user`, `billed_date`, `billed_by`, `billed_user`) VALUES
(1, 0, 6, 1, '', 0.00, '', '', 1000.00, 2000.00, 8, 140.00, 'cold', 'kbscs', '', 0, 0, '', 'Discharged', 'ip', '', 0, '2024-09-21 11:36:50', 15, 'emp', '2024-09-21 11:47:30', 1, '15', 'emp', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '0000-00-00 00:00:00'),
(2, 0, 1, 1, '', 0.00, '', '', 1000.00, 2000.00, 5, 100.00, 'df', 'assfvs', '', 0, 0, '', 'Allotted', 'observation', '', 0, '2024-09-21 11:46:30', 15, 'emp', '0000-00-00 00:00:00', 3, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '0000-00-00 00:00:00'),
(3, 0, 16, 1, '202410030235', 0.00, '', '', 1000.00, 2000.00, 6, 120.00, 'q', 'aff', '', 0, 0, '', 'Paid', 'ip', '', 0, '2024-09-21 14:40:42', 15, 'emp', '2024-10-03 14:38:02', 4, '15', 'emp', '2024-10-03 14:38:50', '0000-00-00 00:00:00', '0000-00-00 00:00:00'),
(4, 0, 6, 1, '202410030244', 0.00, '', '', 1000.00, 2000.00, 7, 130.00, 'd', 'vsa', '', 0, 0, '', 'Paid', 'ip', '', 0, '2024-09-24 22:53:50', 15, 'emp', '2024-10-03 14:38:06', 9, '15', 'emp', '2024-10-03 14:44:58', '0000-00-00 00:00:00', '0000-00-00 00:00:00'),
(5, 0, 12, 1, '', 0.00, '', '', 1000.00, 2000.00, 1, 1000.00, 'c', 'xz', '', 0, 0, '', 'Allotted', 'observation', '', 0, '2024-09-24 22:53:56', 15, 'emp', '0000-00-00 00:00:00', 10, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '0000-00-00 00:00:00'),
(6, 0, 19, 1, '202410030247', 0.00, '', '', 1000.00, 2000.00, 2, 1000.00, 'xc', 'zxa', '', 0, 0, '', 'Paid', 'ip', '', 0, '2024-09-30 10:39:47', 15, 'emp', '2024-10-03 14:43:49', 19, '15', 'emp', '2024-10-03 14:45:13', '0000-00-00 00:00:00', '0000-00-00 00:00:00'),
(7, 0, 20, 1, '', 0.00, '', '', 1000.00, 2000.00, 3, 1000.00, 'd', 'zcccz', '', 0, 0, '', 'Allotted', 'observation', '', 0, '2024-09-30 10:39:54', 15, 'emp', '0000-00-00 00:00:00', 20, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '0000-00-00 00:00:00'),
(8, 0, 25, 1, '202410030241', 0.00, '', '', 1000.00, 2000.00, 4, 1000.00, 'cc', 'mknj', '', 0, 0, '', 'Paid', 'ip', '', 0, '2024-10-03 14:36:20', 15, 'emp', '2024-10-03 14:43:46', 26, '15', 'emp', '2024-10-03 14:44:45', '0000-00-00 00:00:00', '0000-00-00 00:00:00'),
(9, 0, 21, 1, '202410030238', 0.00, '', '', 1000.00, 2000.00, 6, 120.00, 'xzv', '', '', 0, 0, '', 'Paid', 'ip', '', 0, '2024-10-03 14:39:23', 15, 'emp', '2024-10-03 14:43:44', 21, '15', 'emp', '2024-10-03 14:44:31', '0000-00-00 00:00:00', '0000-00-00 00:00:00'),
(10, 0, 26, 1, '', 0.00, '', '', 1000.00, 2000.00, 6, 120.00, 'vd', 'mkk', '', 0, 0, '', 'Allotted', 'ip', '', 0, '2024-10-03 14:47:52', 15, 'emp', '0000-00-00 00:00:00', 27, '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '0000-00-00 00:00:00');

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

--
-- Table structure for table `ip_scan_paid`
--

CREATE TABLE `ip_scan_paid` (
  `id` int(11) NOT NULL,
  `patient_record_id` int(11) NOT NULL,
  `patient_id` int(11) NOT NULL,
  `division_id` int(11) NOT NULL,
  `qty` int(11) NOT NULL,
  `amount` decimal(11,2) NOT NULL,
  `status` varchar(40) NOT NULL,
  `dateTime` datetime NOT NULL,
  `created_by` int(11) NOT NULL,
  `user_type` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `ip_scan_paid`
--

INSERT INTO `ip_scan_paid` (`id`, `patient_record_id`, `patient_id`, `division_id`, `qty`, `amount`, `status`, `dateTime`, `created_by`, `user_type`) VALUES
(1, 3, 16, 4, 1, 5000.00, 'Active', '2024-10-03 14:38:50', 1, 'emp'),
(2, 3, 16, 4, 1, 5000.00, 'Active', '2024-10-03 14:38:50', 1, 'emp');

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

--
-- Table structure for table `ip_service`
--

CREATE TABLE `ip_service` (
  `id` int(11) NOT NULL,
  `service_name` varchar(30) NOT NULL,
  `amount` decimal(11,2) NOT NULL,
  `desc` text NOT NULL,
  `status` varchar(40) NOT NULL,
  `dateTime` datetime NOT NULL,
  `type` varchar(100) NOT NULL,
  `created_by` int(11) NOT NULL,
  `user_type` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `ip_service`
--

INSERT INTO `ip_service` (`id`, `service_name`, `amount`, `desc`, `status`, `dateTime`, `type`, `created_by`, `user_type`) VALUES
(1, 'serviceOne', 1000.00, 'Desc', 'Active', '2024-08-19 16:59:51', 'fixed', 1, 'doctor');

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

--
-- Table structure for table `ip_transaction_history`
--

CREATE TABLE `ip_transaction_history` (
  `id` int(11) NOT NULL,
  `patient_id` int(11) NOT NULL,
  `record_id` int(11) NOT NULL,
  `amount` decimal(11,2) NOT NULL,
  `status` varchar(30) DEFAULT NULL,
  `dateTime` datetime DEFAULT NULL,
  `created_by` int(11) NOT NULL,
  `user_type` varchar(50) NOT NULL,
  `mop` varchar(100) DEFAULT NULL,
  `trans_id` varchar(100) DEFAULT NULL,
  `remarks` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `ip_transaction_history`
--

INSERT INTO `ip_transaction_history` (`id`, `patient_id`, `record_id`, `amount`, `status`, `dateTime`, `created_by`, `user_type`, `mop`, `trans_id`, `remarks`) VALUES
(1, 16, 3, 100.00, 'Active', '2024-09-23 16:47:04', 9, '', NULL, NULL, NULL),
(2, 16, 3, 156640.00, 'Active', '2024-10-03 14:38:50', 1, 'emp', 'Cash', '', 'v'),
(3, 21, 9, 3120.00, 'Active', '2024-10-03 14:44:31', 1, 'emp', 'Cash', '', 'xc'),
(4, 25, 8, 4000.00, 'Active', '2024-10-03 14:44:45', 1, 'emp', 'Cash', '', 'xcx\r\n'),
(5, 6, 4, 106420.00, 'Active', '2024-10-03 14:44:58', 1, 'emp', 'Cash', '', 'SAF'),
(6, 19, 6, 52000.00, 'Active', '2024-10-03 14:45:13', 1, 'emp', 'Cash', '', 'XZVB'),
(7, 26, 10, 1050.00, 'Active', '2024-10-03 14:50:12', 9, '', NULL, NULL, NULL),
(8, 25, 8, 1050.00, 'Active', '2024-10-04 11:39:56', 1, 'admin', NULL, NULL, NULL);

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

--
-- Table structure for table `medical_sales_credit_op_batch`
--

CREATE TABLE `medical_sales_credit_op_batch` (
  `id` int(11) NOT NULL,
  `patient_record_id` int(11) NOT NULL,
  `med_batch_id` int(11) NOT NULL,
  `balance` decimal(11,2) NOT NULL,
  `created_on` datetime NOT NULL,
  `created_by` varchar(255) NOT NULL,
  `billied_by` int(11) NOT NULL,
  `attended_by` int(11) NOT NULL,
  `verified_by` int(11) NOT NULL,
  `type` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `medical_sales_credit_op_batch`
--

INSERT INTO `medical_sales_credit_op_batch` (`id`, `patient_record_id`, `med_batch_id`, `balance`, `created_on`, `created_by`, `billied_by`, `attended_by`, `verified_by`, `type`) VALUES
(1, 6, 5, 0.00, '2024-09-24 22:43:57', '9', 9, 9, 16, ''),
(2, 6, 5, 0.00, '2024-09-25 10:06:50', '9', 9, 9, 16, ''),
(3, 6, 5, 0.00, '2024-09-25 11:45:16', '9', 9, 9, 16, 'op'),
(4, 16, 11, 0.00, '2024-09-28 18:19:28', '9', 9, 9, 16, 'op'),
(5, 24, 17, 0.00, '2024-10-03 15:19:51', '9', 9, 9, 16, 'op');

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

--
-- Table structure for table `medical_sales_credit_op_items`
--

CREATE TABLE `medical_sales_credit_op_items` (
  `id` int(11) NOT NULL,
  `patient_record_id` int(11) NOT NULL,
  `med_batch_id` int(11) NOT NULL,
  `medical_sales_op_batch_id` int(11) NOT NULL,
  `dosage_id` int(11) NOT NULL,
  `medicine_id` int(11) NOT NULL,
  `batch_no` varchar(255) NOT NULL,
  `balance` decimal(11,2) NOT NULL,
  `quantity` varchar(255) NOT NULL,
  `created_by` int(11) NOT NULL,
  `verified_by` int(11) NOT NULL,
  `billed_by` int(11) NOT NULL,
  `attended_by` int(11) NOT NULL,
  `dateTime` datetime DEFAULT NULL,
  `type` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `medical_sales_credit_op_items`
--

INSERT INTO `medical_sales_credit_op_items` (`id`, `patient_record_id`, `med_batch_id`, `medical_sales_op_batch_id`, `dosage_id`, `medicine_id`, `batch_no`, `balance`, `quantity`, `created_by`, `verified_by`, `billed_by`, `attended_by`, `dateTime`, `type`) VALUES
(1, 6, 5, 1, 15, 10, '003', 0.00, '10', 9, 16, 9, 9, '2024-09-24 22:43:57', ''),
(2, 6, 5, 2, 15, 10, '003', 0.00, '10', 9, 16, 9, 9, '2024-09-25 10:06:50', ''),
(3, 6, 5, 3, 15, 10, '003', 0.00, '1', 9, 16, 9, 9, '2024-09-25 11:45:16', 'op'),
(4, 16, 11, 4, 18, 12, '001', 0.00, '1', 9, 16, 9, 9, '2024-09-28 18:19:28', 'op'),
(5, 24, 17, 5, 18, 12, '001', 0.00, '1', 9, 16, 9, 9, '2024-10-03 15:19:51', 'op');

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

--
-- Table structure for table `medical_sales_medications_sold_items`
--

CREATE TABLE `medical_sales_medications_sold_items` (
  `id` int(11) NOT NULL,
  `medical_sales_medication_batchid` int(11) NOT NULL,
  `tablet_id` int(11) NOT NULL,
  `dosage_id` int(11) NOT NULL,
  `drug` varchar(255) NOT NULL,
  `dosage` varchar(255) NOT NULL,
  `drug_type` varchar(255) NOT NULL,
  `intake_pattern` varchar(255) NOT NULL,
  `frequency` varchar(255) NOT NULL,
  `no_of_days` int(11) NOT NULL,
  `quantity` int(11) NOT NULL,
  `credited_quantity` int(11) NOT NULL,
  `batch_no` varchar(255) NOT NULL,
  `status` varchar(255) NOT NULL,
  `type` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `medical_sales_medications_sold_items`
--

INSERT INTO `medical_sales_medications_sold_items` (`id`, `medical_sales_medication_batchid`, `tablet_id`, `dosage_id`, `drug`, `dosage`, `drug_type`, `intake_pattern`, `frequency`, `no_of_days`, `quantity`, `credited_quantity`, `batch_no`, `status`, `type`) VALUES
(1, 1, 1, 1, '0', '0', '0', '0', '0', 0, 10, 0, '001', 'Active', ''),
(2, 2, 10, 15, '0', '0', '0', '0', '0', 0, 10, 0, '003', 'Active', ''),
(3, 3, 10, 15, '0', '0', '0', '0', '0', 0, 10, 0, '003', 'Active', ''),
(4, 4, 12, 18, '0', '0', '0', '0', '0', 0, 10, 0, '001', 'Active', ''),
(5, 5, 10, 15, '0', '0', '0', '0', '0', 0, 10, 0, '003', 'Active', ''),
(6, 6, 10, 15, '0', '0', '0', '0', '0', 0, 10, 0, '003', 'Active', ''),
(7, 9, 12, 18, '0', '0', '0', '0', '0', 0, 1, 1, '001', 'Active', '');

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

--
-- Table structure for table `medical_sales_medication_batch`
--

CREATE TABLE `medical_sales_medication_batch` (
  `id` int(11) NOT NULL,
  `patient_name` varchar(255) NOT NULL,
  `dob` date DEFAULT NULL,
  `paymentStatus` varchar(255) NOT NULL,
  `status` varchar(255) NOT NULL,
  `createdOn` datetime NOT NULL,
  `createdBy` int(11) NOT NULL,
  `createdUserType` varchar(255) NOT NULL,
  `less` decimal(11,2) NOT NULL,
  `reason_of_less` text NOT NULL,
  `sub_total` decimal(11,2) NOT NULL,
  `total` decimal(11,2) NOT NULL,
  `payment_method` varchar(255) NOT NULL,
  `trans_id` varchar(255) NOT NULL,
  `paidOn` datetime NOT NULL,
  `attended_by` int(11) NOT NULL,
  `billied_by` int(11) NOT NULL,
  `verified_by` int(11) NOT NULL,
  `type` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `medical_sales_medication_batch`
--

INSERT INTO `medical_sales_medication_batch` (`id`, `patient_name`, `dob`, `paymentStatus`, `status`, `createdOn`, `createdBy`, `createdUserType`, `less`, `reason_of_less`, `sub_total`, `total`, `payment_method`, `trans_id`, `paidOn`, `attended_by`, `billied_by`, `verified_by`, `type`) VALUES
(1, '', '0000-00-00', 'paid', 'Active', '2024-09-24 15:52:32', 9, 'emp', 0.00, '', 1000.00, 1000.00, 'Card', 'undefined', '2024-09-24 15:52:32', 0, 9, 9, ''),
(2, 'Murali', '0000-00-00', 'paid', 'Active', '2024-09-24 16:22:40', 9, 'emp', 0.00, '', 1000.00, 1000.00, 'Card', 'undefined', '2024-09-24 16:22:40', 9, 9, 9, ''),
(3, 'Murali', '0000-00-00', 'paid', 'Active', '2024-09-24 22:45:09', 9, 'emp', 0.00, '', 1000.00, 1000.00, 'Card', '213', '2024-09-24 22:45:09', 9, 9, 9, ''),
(4, 'safv', '0000-00-00', 'paid', 'Active', '2024-09-25 10:56:51', 9, 'emp', 0.00, '', 50.00, 50.00, 'Cash', '', '2024-09-25 10:56:51', 16, 9, 9, ''),
(5, 'mmp', '0000-00-00', 'paid', 'Active', '2024-09-25 11:19:45', 9, 'emp', 0.00, '', 1000.00, 1000.00, 'Cash', '', '2024-09-25 11:19:45', 16, 9, 9, ''),
(6, 'jkj', '0000-00-00', 'paid', 'Active', '2024-09-25 11:40:05', 9, 'emp', 0.00, '', 1000.00, 1000.00, 'Cash', '', '2024-09-25 11:40:05', 16, 9, 9, ''),
(9, 'muea', '0000-00-00', 'paid', 'Active', '2024-10-07 09:59:47', 9, 'emp', 0.00, '', 5.00, 5.00, 'Cash', '', '2024-10-07 09:59:47', 16, 9, 9, '');

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

--
-- Table structure for table `medicine_company_data`
--

CREATE TABLE `medicine_company_data` (
  `id` int(5) NOT NULL,
  `company_name` varchar(200) NOT NULL,
  `company_code` varchar(100) NOT NULL,
  `status` varchar(20) NOT NULL,
  `dateTime` datetime NOT NULL,
  `created_by` int(11) NOT NULL,
  `user_type` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `medicine_company_data`
--

INSERT INTO `medicine_company_data` (`id`, `company_name`, `company_code`, `status`, `dateTime`, `created_by`, `user_type`) VALUES
(1, 'companyOne', '001', 'Active', '2024-08-19 18:17:16', 1, 'doctor'),
(2, 'CompanyTwo', '002', 'Active', '2024-08-19 18:18:14', 1, 'doctor');

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

--
-- Table structure for table `medicine_requests`
--

CREATE TABLE `medicine_requests` (
  `id` int(11) NOT NULL,
  `tablet_name` varchar(255) DEFAULT NULL,
  `dosage` varchar(255) DEFAULT NULL,
  `description` text DEFAULT NULL,
  `status` varchar(50) DEFAULT 'Pending',
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT NULL ON UPDATE current_timestamp(),
  `count` int(11) NOT NULL,
  `type` varchar(255) DEFAULT NULL,
  `requestBatchid` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `medicine_requests`
--

INSERT INTO `medicine_requests` (`id`, `tablet_name`, `dosage`, `description`, `status`, `created_at`, `updated_at`, `count`, `type`, `requestBatchid`) VALUES
(1, 'T1', '100mg', 'desc', 'Pending', '2024-08-19 12:21:59', NULL, 10, 'Tablets', 1),
(2, 'T1', '100mg', 'desc', 'Pending', '2024-09-23 04:59:54', NULL, 10, 'Tablets', 2),
(3, 'T1', '100mg', 'desccsa', 'Pending', '2024-09-23 05:00:44', NULL, 10, 'Tablets', 3),
(4, 'MedTestOne', '100mg', 'xzas', 'Pending', '2024-09-24 17:26:48', NULL, 10, 'Tablets', 4);

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

--
-- Table structure for table `medicine_type`
--

CREATE TABLE `medicine_type` (
  `id` int(5) NOT NULL,
  `type` varchar(30) NOT NULL,
  `status` varchar(30) NOT NULL,
  `dateTime` datetime NOT NULL,
  `created_by` int(11) NOT NULL,
  `user_type` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `medicine_type`
--

INSERT INTO `medicine_type` (`id`, `type`, `status`, `dateTime`, `created_by`, `user_type`) VALUES
(1, 'Tablets', 'Active', '2024-03-06 18:04:38', 0, ''),
(2, 'Capsules', 'Active', '2024-03-06 18:04:38', 0, ''),
(3, 'Syrups', 'Active', '2024-03-06 18:04:38', 0, ''),
(4, 'Suspensions', 'Active', '2024-03-06 18:04:38', 0, ''),
(5, 'Solutions', 'Active', '2024-03-06 18:04:38', 0, ''),
(6, 'Creams', 'Active', '2024-03-06 18:04:38', 0, ''),
(7, 'Ointments', 'Active', '2024-03-06 18:04:38', 0, ''),
(8, 'Gels', 'Active', '2024-03-06 18:04:38', 0, ''),
(9, 'Powders', 'Active', '2024-03-06 18:04:38', 0, ''),
(10, 'Suppositories', 'Active', '2024-03-06 18:04:38', 0, ''),
(11, 'Aerosols', 'Active', '2024-03-06 18:04:38', 0, ''),
(12, 'Drops', 'Active', '2024-03-06 18:04:38', 0, ''),
(13, 'Patches', 'Active', '2024-03-06 18:04:38', 0, ''),
(14, 'Drips', 'Active', '2024-07-05 20:17:26', 0, '');

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

--
-- Table structure for table `med_purchase_data`
--

CREATE TABLE `med_purchase_data` (
  `id` int(11) NOT NULL,
  `agency_name` varchar(255) DEFAULT NULL,
  `batch_no` varchar(255) DEFAULT NULL,
  `tax` int(11) NOT NULL,
  `mop` varchar(255) DEFAULT NULL,
  `payment_remarks` text DEFAULT NULL,
  `status` varchar(40) DEFAULT NULL,
  `dateTime` datetime DEFAULT NULL,
  `trans_id` varchar(255) DEFAULT NULL,
  `created_by` varchar(255) DEFAULT NULL,
  `user_type` varchar(255) DEFAULT NULL,
  `total` decimal(11,2) DEFAULT NULL,
  `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_general_ci;

--
-- Dumping data for table `med_purchase_data`
--

INSERT INTO `med_purchase_data` (`id`, `agency_name`, `batch_no`, `tax`, `mop`, `payment_remarks`, `status`, `dateTime`, `trans_id`, `created_by`, `user_type`, `total`, `created_at`, `updated_at`) VALUES
(1, 'Agency1', '1', 10, 'Cash', '', 'Active', '2024-03-08 21:58:15', '', '1', 'doctor', 22000.00, '2024-03-08 16:28:15', '2024-03-08 16:28:15'),
(2, 'A1', '100', 10, 'Cash', '', 'Active', '2024-03-08 22:03:19', 'undefined', '1', 'doctor', 0.00, '2024-03-08 16:33:19', '2024-03-08 16:33:19'),
(3, 'A1', '100', 10, 'Cash', 'P_r', 'Active', '2024-03-08 22:04:50', 'undefined', '1', 'doctor', NULL, '2024-03-08 16:34:50', '2024-03-08 16:34:50'),
(4, 'A1', '100', 10, 'Cash', 'P_r', 'Active', '2024-03-08 22:06:31', 'undefined', '1', 'doctor', NULL, '2024-03-08 16:36:31', '2024-03-08 16:36:31'),
(5, 'A2', '2', 10, 'Cash', 'A2', 'Active', '2024-03-08 22:07:39', 'undefined', '1', 'doctor', 1000.00, '2024-03-08 16:37:39', '2024-03-08 16:37:39'),
(6, 'A2', '2', 10, 'Cash', 'A2', 'Active', '2024-03-08 22:08:07', 'undefined', '1', 'doctor', NULL, '2024-03-08 16:38:07', '2024-03-08 16:38:07'),
(7, 'akanji', '3', 10, 'Cash', 'sw', 'Active', '2024-03-08 22:10:10', 'undefined', '1', 'doctor', NULL, '2024-03-08 16:40:10', '2024-03-08 16:40:10'),
(8, 'akanji', '3', 10, 'Cash', 'sw', 'Active', '2024-03-08 22:12:18', 'undefined', '1', 'doctor', NULL, '2024-03-08 16:42:18', '2024-03-08 16:42:18'),
(9, 'akanji', '3', 10, 'Cash', 'sw', 'Active', '2024-03-08 22:14:10', 'undefined', '1', 'doctor', 300.00, '2024-03-08 16:44:10', '2024-03-08 16:44:10'),
(10, 'akanji', '3', 10, 'Cash', 'sw', 'Active', '2024-03-08 22:14:36', 'undefined', '1', 'doctor', NULL, '2024-03-08 16:44:36', '2024-03-08 16:44:36'),
(11, 'akanji', '3', 10, 'Cash', 'sw', 'Active', '2024-03-08 22:16:08', 'undefined', '1', 'doctor', NULL, '2024-03-08 16:46:08', '2024-03-08 16:46:08'),
(12, 'akanji', '3', 10, 'Cash', 'sw', 'Active', '2024-03-08 22:19:36', 'undefined', '1', 'doctor', 300.00, '2024-03-08 16:49:36', '2024-03-08 16:49:36'),
(13, 'akanji', '3', 10, 'Cash', 'sw', 'Active', '2024-03-08 22:19:57', 'undefined', '1', 'doctor', 300.00, '2024-03-08 16:49:57', '2024-03-08 16:49:57'),
(14, 'akanji', '3', 10, 'Cash', 'sw', 'Active', '2024-03-08 22:20:17', 'undefined', '1', 'doctor', 300.00, '2024-03-08 16:50:17', '2024-03-08 16:50:17');

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

--
-- Table structure for table `nurse_charge`
--

CREATE TABLE `nurse_charge` (
  `id` int(11) NOT NULL,
  `amount` decimal(11,2) NOT NULL,
  `type` varchar(30) NOT NULL,
  `status` varchar(30) NOT NULL,
  `dateTime` datetime NOT NULL,
  `created_by` int(11) NOT NULL,
  `user_type` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `nurse_charge`
--

INSERT INTO `nurse_charge` (`id`, `amount`, `type`, `status`, `dateTime`, `created_by`, `user_type`) VALUES
(1, 1000.00, 'nurse', 'Active', '2024-03-05 11:28:24', 1, 'doctor'),
(2, 2000.00, 'doctor', 'Active', '2024-03-05 11:28:30', 1, 'doctor');

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

--
-- Table structure for table `ob_billing`
--

CREATE TABLE `ob_billing` (
  `id` int(11) NOT NULL,
  `patient_id` int(11) NOT NULL,
  `patient_record_id` int(11) NOT NULL,
  `sub_total` decimal(11,2) NOT NULL,
  `total` decimal(11,2) NOT NULL,
  `less` decimal(11,2) NOT NULL,
  `remarks` text NOT NULL,
  `pay_status` varchar(30) NOT NULL,
  `paid_on` datetime NOT NULL,
  `admit_date` datetime NOT NULL,
  `discharge_date` datetime NOT NULL,
  `nod` varchar(255) NOT NULL,
  `time` varchar(255) NOT NULL,
  `status` varchar(30) DEFAULT NULL,
  `dateTime` datetime NOT NULL,
  `created_by` int(11) NOT NULL,
  `user_type` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `ob_bill_scan`
--

CREATE TABLE `ob_bill_scan` (
  `id` int(11) NOT NULL,
  `patient_record_id` int(11) NOT NULL,
  `patient_id` int(11) NOT NULL,
  `division_id` int(11) NOT NULL,
  `patient_type` varchar(30) NOT NULL,
  `qty` int(11) NOT NULL,
  `amount` decimal(11,2) NOT NULL,
  `status` varchar(40) NOT NULL,
  `dateTime` datetime NOT NULL,
  `created_by` int(11) NOT NULL,
  `user_type` varchar(50) NOT NULL,
  `role` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `ob_bill_services`
--

CREATE TABLE `ob_bill_services` (
  `id` int(11) NOT NULL,
  `patient_record_id` int(11) NOT NULL,
  `patient_id` int(11) NOT NULL,
  `service_id` int(11) NOT NULL,
  `service_name` varchar(255) NOT NULL,
  `qty` int(11) NOT NULL,
  `service_amount` decimal(11,2) NOT NULL,
  `status` varchar(30) NOT NULL,
  `dateTime` datetime NOT NULL,
  `created_by` int(11) NOT NULL,
  `user_type` varchar(50) NOT NULL,
  `role` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `ob_medications_batch`
--

CREATE TABLE `ob_medications_batch` (
  `id` int(11) NOT NULL,
  `patient_record_id` int(11) NOT NULL,
  `patient_id` int(11) NOT NULL,
  `doctor_id` int(11) NOT NULL,
  `paymentStatus` varchar(255) NOT NULL,
  `status` varchar(255) NOT NULL,
  `createdOn` datetime NOT NULL,
  `createdBy` int(11) NOT NULL,
  `createdUserType` varchar(255) NOT NULL,
  `less` decimal(11,2) NOT NULL,
  `reason_of_less` text NOT NULL,
  `sub_total` decimal(11,2) NOT NULL,
  `total` decimal(11,2) NOT NULL,
  `payment_method` varchar(255) NOT NULL,
  `trans_id` varchar(255) NOT NULL,
  `paidOn` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `ob_medications_batch`
--

INSERT INTO `ob_medications_batch` (`id`, `patient_record_id`, `patient_id`, `doctor_id`, `paymentStatus`, `status`, `createdOn`, `createdBy`, `createdUserType`, `less`, `reason_of_less`, `sub_total`, `total`, `payment_method`, `trans_id`, `paidOn`) VALUES
(1, 2, 0, 0, 'unpaid', 'Active', '2024-09-23 12:51:08', 1, 'doctor', 0.00, '', 0.00, 0.00, '', '', '0000-00-00 00:00:00');

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

--
-- Table structure for table `ob_medications_items`
--

CREATE TABLE `ob_medications_items` (
  `id` int(11) NOT NULL,
  `patient_record_id` int(11) NOT NULL,
  `tablet_id` int(11) NOT NULL,
  `ip_medications_batch_id` int(11) NOT NULL,
  `drug` varchar(50) NOT NULL,
  `dosage_id` varchar(255) NOT NULL,
  `drug_type` varchar(255) NOT NULL,
  `type` varchar(255) NOT NULL,
  `time_taken` varchar(255) NOT NULL,
  `frequency` varchar(255) NOT NULL,
  `duration` int(11) NOT NULL,
  `quantity` int(11) NOT NULL,
  `dosage` varchar(50) NOT NULL,
  `tablet` varchar(255) NOT NULL,
  `no_of_days` varchar(255) NOT NULL,
  `intake_pattern` varchar(255) NOT NULL,
  `remarks` text NOT NULL,
  `status` varchar(255) NOT NULL,
  `dateTime` datetime NOT NULL,
  `created_by` int(11) NOT NULL,
  `user_type` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `ob_medications_items`
--

INSERT INTO `ob_medications_items` (`id`, `patient_record_id`, `tablet_id`, `ip_medications_batch_id`, `drug`, `dosage_id`, `drug_type`, `type`, `time_taken`, `frequency`, `duration`, `quantity`, `dosage`, `tablet`, `no_of_days`, `intake_pattern`, `remarks`, `status`, `dateTime`, `created_by`, `user_type`) VALUES
(0, 2, 13, 1, '\n                testONe\n            ', '19', '\n                Tablets\n            ', '\n                Oral\n            ', '\n                After Food\n            ', '\n                1-0-0\n            ', 1, 1, '\n                100mg\n            ', '', '', '', '', 'Active', '2024-09-23 12:51:08', 1, 0);

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

--
-- Table structure for table `ob_medications_sold_items`
--

CREATE TABLE `ob_medications_sold_items` (
  `id` int(11) NOT NULL,
  `ob_medications_batch_id` int(11) NOT NULL,
  `patient_record_id` int(11) NOT NULL,
  `tablet_id` int(11) NOT NULL,
  `dosage_id` int(11) NOT NULL,
  `quantity` int(11) NOT NULL,
  `status` int(11) NOT NULL,
  `createdOn` int(11) NOT NULL,
  `createdBy` int(11) NOT NULL,
  `createdUserType` int(11) NOT NULL,
  `drug` int(11) NOT NULL,
  `drug_type` int(11) NOT NULL,
  `dosage` int(11) NOT NULL,
  `type` int(11) NOT NULL,
  `time_taken` int(11) NOT NULL,
  `frequency` int(11) NOT NULL,
  `duration` int(11) NOT NULL,
  `formulation` int(11) NOT NULL,
  `tablet` int(11) NOT NULL,
  `no_of_days` int(11) NOT NULL,
  `intake_pattern` int(11) NOT NULL,
  `remarks` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `ob_scan_paid`
--

CREATE TABLE `ob_scan_paid` (
  `id` int(11) NOT NULL,
  `patient_record_id` int(11) NOT NULL,
  `patient_id` int(11) NOT NULL,
  `division_id` int(11) NOT NULL,
  `qty` int(11) NOT NULL,
  `amount` decimal(11,2) NOT NULL,
  `status` varchar(40) NOT NULL,
  `dateTime` datetime NOT NULL,
  `created_by` int(11) NOT NULL,
  `user_type` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `ob_service`
--

CREATE TABLE `ob_service` (
  `id` int(11) NOT NULL,
  `service_name` varchar(30) NOT NULL,
  `amount` decimal(11,2) NOT NULL,
  `desc` text NOT NULL,
  `status` varchar(40) NOT NULL,
  `dateTime` datetime NOT NULL,
  `type` varchar(100) NOT NULL,
  `created_by` int(11) NOT NULL,
  `user_type` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `ob_transaction_history`
--

CREATE TABLE `ob_transaction_history` (
  `id` int(11) NOT NULL,
  `patient_id` int(11) NOT NULL,
  `record_id` int(11) NOT NULL,
  `amount` decimal(11,2) NOT NULL,
  `status` varchar(40) DEFAULT NULL,
  `dateTime` datetime DEFAULT NULL,
  `created_by` int(11) NOT NULL,
  `user_type` varchar(50) NOT NULL,
  `mop` varchar(100) DEFAULT NULL,
  `trans_id` varchar(100) DEFAULT NULL,
  `remarks` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `op_billing`
--

CREATE TABLE `op_billing` (
  `id` int(11) NOT NULL,
  `patient_record_id` int(11) NOT NULL,
  `amount` decimal(11,2) NOT NULL,
  `less` decimal(11,2) NOT NULL,
  `remarks` text NOT NULL,
  `pay_status` varchar(50) NOT NULL,
  `paid_on` datetime NOT NULL,
  `status` varchar(50) NOT NULL,
  `dateTime` datetime NOT NULL,
  `total` decimal(11,2) NOT NULL,
  `sub_total` decimal(11,2) NOT NULL,
  `bsugar_fee` decimal(11,2) NOT NULL,
  `doc_fee` decimal(11,2) NOT NULL,
  `created_by` int(11) NOT NULL,
  `user_type` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `op_billing`
--

INSERT INTO `op_billing` (`id`, `patient_record_id`, `amount`, `less`, `remarks`, `pay_status`, `paid_on`, `status`, `dateTime`, `total`, `sub_total`, `bsugar_fee`, `doc_fee`, `created_by`, `user_type`) VALUES
(1, 1, 0.00, 0.00, '', 'unpaid', '0000-00-00 00:00:00', 'Active', '2024-09-21 11:35:00', 0.00, 0.00, 0.00, 0.00, 1, 'doctor'),
(2, 2, 0.00, 0.00, '', 'paid', '2024-09-21 11:42:45', 'Active', '2024-09-21 11:42:29', 100.00, 100.00, 0.00, 100.00, 1, 'doctor'),
(3, 3, 0.00, 0.00, '', 'unpaid', '0000-00-00 00:00:00', 'Active', '2024-09-21 11:46:05', 0.00, 0.00, 0.00, 0.00, 1, 'doctor'),
(4, 4, 0.00, 0.00, '', 'unpaid', '0000-00-00 00:00:00', 'Active', '2024-09-21 12:51:28', 0.00, 0.00, 0.00, 0.00, 1, 'doctor'),
(5, 6, 0.00, 0.00, '', 'unpaid', '0000-00-00 00:00:00', 'Active', '2024-09-24 15:09:30', 0.00, 0.00, 0.00, 0.00, 1, 'doctor'),
(6, 7, 0.00, 0.00, '', 'unpaid', '0000-00-00 00:00:00', 'Active', '2024-09-24 15:48:29', 0.00, 0.00, 0.00, 0.00, 1, 'doctor'),
(7, 9, 0.00, 0.00, '', 'unpaid', '0000-00-00 00:00:00', 'Active', '2024-09-24 22:53:07', 0.00, 0.00, 0.00, 0.00, 1, 'doctor'),
(8, 10, 0.00, 0.00, '', 'unpaid', '0000-00-00 00:00:00', 'Active', '2024-09-24 22:53:19', 0.00, 0.00, 0.00, 0.00, 1, 'doctor'),
(9, 12, 0.00, 0.00, '', 'unpaid', '0000-00-00 00:00:00', 'Active', '2024-09-27 14:48:14', 0.00, 0.00, 0.00, 0.00, 1, 'doctor'),
(10, 15, 0.00, 0.00, '', 'unpaid', '0000-00-00 00:00:00', 'Active', '2024-09-28 17:15:46', 0.00, 0.00, 0.00, 0.00, 1, 'doctor'),
(11, 16, 0.00, 0.00, '', 'unpaid', '0000-00-00 00:00:00', 'Active', '2024-09-28 17:31:59', 0.00, 0.00, 0.00, 0.00, 1, 'doctor'),
(12, 18, 0.00, 0.00, '', 'unpaid', '0000-00-00 00:00:00', 'Active', '2024-09-30 10:30:32', 0.00, 0.00, 0.00, 0.00, 1, 'doctor'),
(13, 19, 0.00, 0.00, '', 'unpaid', '0000-00-00 00:00:00', 'Active', '2024-09-30 10:36:32', 0.00, 0.00, 0.00, 0.00, 1, 'doctor'),
(14, 20, 0.00, 0.00, '', 'unpaid', '0000-00-00 00:00:00', 'Active', '2024-09-30 10:37:16', 0.00, 0.00, 0.00, 0.00, 1, 'doctor'),
(15, 23, 0.00, 0.00, '', 'unpaid', '0000-00-00 00:00:00', 'Active', '2024-10-03 14:23:46', 0.00, 0.00, 0.00, 0.00, 1, 'doctor'),
(16, 25, 0.00, 0.00, '', 'unpaid', '0000-00-00 00:00:00', 'Active', '2024-10-03 14:24:43', 0.00, 0.00, 0.00, 0.00, 1, 'doctor'),
(17, 24, 0.00, 0.00, '', 'unpaid', '0000-00-00 00:00:00', 'Active', '2024-10-03 14:25:31', 0.00, 0.00, 0.00, 0.00, 1, 'doctor'),
(18, 26, 0.00, 0.00, '', 'unpaid', '0000-00-00 00:00:00', 'Active', '2024-10-03 14:35:55', 0.00, 0.00, 0.00, 0.00, 1, 'doctor'),
(19, 27, 0.00, 0.00, '', 'unpaid', '0000-00-00 00:00:00', 'Active', '2024-10-03 14:43:20', 0.00, 0.00, 0.00, 0.00, 1, 'doctor'),
(20, 28, 0.00, 0.00, '', 'paid', '2024-10-04 12:39:38', 'Active', '2024-10-04 12:38:00', 100.00, 100.00, 0.00, 100.00, 1, 'doctor'),
(21, 29, 0.00, 0.00, '', 'paid', '2024-10-04 12:45:59', 'Active', '2024-10-04 12:45:41', 100.00, 100.00, 0.00, 100.00, 1, 'doctor'),
(22, 30, 0.00, 0.00, '', 'paid', '2024-10-04 13:25:47', 'Active', '2024-10-04 13:20:12', 100.00, 100.00, 0.00, 100.00, 1, 'doctor'),
(23, 32, 0.00, 0.00, '', 'unpaid', '0000-00-00 00:00:00', 'Active', '2024-10-07 09:55:28', 0.00, 0.00, 0.00, 0.00, 1, 'doctor');

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

--
-- Table structure for table `op_bill_scan`
--

CREATE TABLE `op_bill_scan` (
  `id` int(11) NOT NULL,
  `patient_record_id` int(11) NOT NULL,
  `division_id` int(11) NOT NULL,
  `patient_type` varchar(30) NOT NULL,
  `qty` int(11) NOT NULL,
  `amount` decimal(11,2) NOT NULL,
  `path` text DEFAULT NULL,
  `file_name` varchar(255) DEFAULT NULL,
  `file_status` varchar(255) DEFAULT NULL,
  `uploaded_dateTime` datetime DEFAULT NULL,
  `uploaded_by` int(11) DEFAULT NULL,
  `uploaded_user` varchar(255) DEFAULT NULL,
  `status` varchar(40) NOT NULL,
  `dateTime` datetime NOT NULL,
  `created_by` int(11) NOT NULL,
  `user_type` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `op_bill_services`
--

CREATE TABLE `op_bill_services` (
  `id` int(11) NOT NULL,
  `patient_record_id` int(11) NOT NULL,
  `service_name` varchar(255) NOT NULL,
  `qty` int(11) NOT NULL,
  `service_amount` decimal(11,2) NOT NULL,
  `status` varchar(30) NOT NULL,
  `dateTime` datetime NOT NULL,
  `created_by` int(11) NOT NULL,
  `user_type` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `op_ecg`
--

CREATE TABLE `op_ecg` (
  `id` int(10) NOT NULL,
  `file_name` varchar(200) NOT NULL,
  `status` varchar(30) NOT NULL,
  `created_by` int(10) NOT NULL,
  `dateTime` datetime NOT NULL,
  `user_type` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `op_entry_data`
--

CREATE TABLE `op_entry_data` (
  `id` int(5) NOT NULL,
  `token_no` int(5) NOT NULL,
  `patient_id` int(5) NOT NULL,
  `doctor_id` int(5) NOT NULL,
  `bill_no` varchar(255) NOT NULL,
  `ad_amount` decimal(11,2) NOT NULL,
  `doc_fee` decimal(11,2) NOT NULL,
  `bed_id` int(11) NOT NULL,
  `reason` text NOT NULL,
  `actual_reason` text NOT NULL,
  `bp` varchar(50) NOT NULL,
  `sp` varchar(100) NOT NULL,
  `weight` varchar(50) NOT NULL,
  `temp` varchar(50) NOT NULL,
  `pulse` varchar(50) NOT NULL,
  `bsugar` varchar(50) NOT NULL,
  `bsugar_fee` decimal(11,2) NOT NULL,
  `sugar_reading` varchar(30) NOT NULL,
  `status` varchar(30) NOT NULL,
  `gen_rem` text NOT NULL,
  `diagnosis` varchar(255) NOT NULL,
  `patient_type` varchar(50) NOT NULL,
  `transferred_to` varchar(50) NOT NULL,
  `transferred_by` int(11) NOT NULL,
  `dateTime` datetime NOT NULL,
  `created_by` int(11) NOT NULL,
  `user_type` varchar(50) NOT NULL,
  `discharge_date` datetime NOT NULL,
  `attender_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `op_entry_data`
--

INSERT INTO `op_entry_data` (`id`, `token_no`, `patient_id`, `doctor_id`, `bill_no`, `ad_amount`, `doc_fee`, `bed_id`, `reason`, `actual_reason`, `bp`, `sp`, `weight`, `temp`, `pulse`, `bsugar`, `bsugar_fee`, `sugar_reading`, `status`, `gen_rem`, `diagnosis`, `patient_type`, `transferred_to`, `transferred_by`, `dateTime`, `created_by`, `user_type`, `discharge_date`, `attender_id`) VALUES
(1, 164, 6, 1, '', 0.00, 100.00, 8, 'cold', 'kbscs', '', '', '', '', '', '', 0.00, '', 'Allotted', '', '', 'ip', '', 0, '2024-09-21 11:29:40', 1, 'emp', '2024-09-21 11:35:00', 3),
(2, 165, 5, 1, '202409210224', 0.00, 100.00, 0, 'cold', 'dv', '', '', '', '', '', '', 0.00, '', 'Paid', '', '', 'op', '', 0, '2024-09-21 11:31:14', 1, 'emp', '2024-09-21 11:42:29', 3),
(3, 166, 1, 1, '202409230225', 0.00, 100.00, 5, 'df', 'assfvs', '', '', '', '', '', '', 0.00, '', 'Allotted', '', '', 'observation', '', 0, '2024-09-21 11:44:08', 1, 'emp', '2024-09-21 11:46:05', 3),
(4, 167, 16, 1, '', 0.00, 100.00, 6, 'q', 'aff', '', '', '', '', '', '', 0.00, '', 'Allotted', '', '', 'ip', '', 0, '2024-09-21 12:46:06', 1, 'emp', '2024-09-21 12:51:28', 3),
(5, 168, 1, 1, '', 0.00, 0.00, 0, 'deda', '', '', '', '', '', '', '', 0.00, '', 'Pending', '', '', 'op', '', 0, '2024-09-23 18:19:19', 1, 'emp', '0000-00-00 00:00:00', 0),
(6, 169, 8, 1, '202409250229', 0.00, 100.00, 0, 'caxz', 'czc', '', '', '', '', '', '', 0.00, '', 'Consulted', '', '', 'op', '', 0, '2024-09-24 10:56:20', 1, 'emp', '2024-09-24 15:09:30', 3),
(7, 170, 3, 1, '', 0.00, 100.00, 0, 'as', 'cv', '', '', '', '', '', '', 0.00, '', 'Consulted', '', '', 'op', '', 0, '2024-09-24 15:46:42', 1, 'emp', '2024-09-24 15:48:29', 3),
(8, 171, 16, 1, '202410040251', 0.00, 0.00, 0, 'sad', '', '', '', '', '', '', '', 0.00, '', 'Pending', '', '', 'op', '', 0, '2024-09-24 22:48:12', 1, 'emp', '0000-00-00 00:00:00', 0),
(9, 172, 6, 1, '', 0.00, 100.00, 7, 'd', 'vsa', '', '', '', '', '', '', 0.00, '', 'Allotted', '', '', 'ip', '', 0, '2024-09-24 22:51:42', 1, 'emp', '2024-09-24 22:53:07', 3),
(10, 173, 12, 1, '202410030248', 0.00, 100.00, 1, 'c', 'xz', '', '', '', '', '', '', 0.00, '', 'Allotted', '', '', 'observation', '', 0, '2024-09-24 22:51:53', 1, 'emp', '2024-09-24 22:53:19', 3),
(11, 174, 17, 1, '', 0.00, 0.00, 0, 'xc', '', '', '', '', '', '', '', 0.00, '', 'Pending', '', '', 'op', '', 0, '2024-09-25 13:07:23', 1, 'emp', '0000-00-00 00:00:00', 0),
(12, 175, 13, 1, '', 0.00, 100.00, 0, 'vguh', 'kbiuvu', '', '', '', '', '', '', 0.00, '', 'Consulted', '', '', 'op', '', 0, '2024-09-27 14:47:02', 1, 'emp', '2024-09-27 14:48:14', 3),
(13, 176, 6, 1, '', 0.00, 0.00, 0, 'hgcytctr', '', '', '', '', '', '', '', 0.00, '', 'Pending', '', '', 'op', '', 0, '2024-09-28 16:30:08', 1, 'emp', '0000-00-00 00:00:00', 0),
(14, 177, 3, 1, '', 0.00, 0.00, 0, 'bnkj', '', '', '', '', '', '', '', 0.00, '', 'Pending', '', '', 'op', '', 0, '2024-09-28 16:57:12', 1, 'emp', '0000-00-00 00:00:00', 0),
(15, 178, 5, 1, '202409280230', 0.00, 100.00, 0, 'dasd', 'jk', '', '', '', '', '', '', 0.00, '', 'Consulted', '', '', 'op', '', 0, '2024-09-28 17:14:07', 1, 'emp', '2024-09-28 17:15:46', 3),
(16, 179, 5, 1, '202409280232', 0.00, 100.00, 0, 'sad', 'zxc', '', '', '', '', '', '', 0.00, '', 'Consulted', '', '', 'op', '', 0, '2024-09-28 17:31:19', 1, 'emp', '2024-09-28 17:31:59', 3),
(17, 180, 8, 1, '', 0.00, 0.00, 0, 'kjn', '', '', '', '', '', '', '', 0.00, '', 'Pending', '', '', 'op', '', 0, '2024-09-28 18:52:57', 1, 'emp', '0000-00-00 00:00:00', 0),
(18, 181, 18, 1, '', 0.00, 100.00, 0, 'xzc', 'zxzca', '', '', '', '', '', '', 0.00, '', 'Consulted', '', '', 'op', '', 0, '2024-09-30 10:26:24', 1, 'emp', '2024-09-30 10:30:32', 3),
(19, 182, 19, 1, '', 0.00, 100.00, 2, 'xc', 'zxa', '', '', '', '', '', '', 0.00, '', 'Allotted', '', '', 'ip', '', 0, '2024-09-30 10:28:29', 1, 'emp', '2024-09-30 10:36:32', 3),
(20, 183, 20, 1, '', 0.00, 100.00, 3, 'd', 'zcccz', '', '', '', '', '', '', 0.00, '', 'Allotted', '', 'awdw', 'observation', '', 0, '2024-09-30 10:28:42', 1, 'emp', '2024-09-30 10:37:16', 3),
(21, 184, 21, 1, '', 0.00, 0.00, 6, 'xzv', '', '', '', '', '', '', '', 0.00, '', 'Allotted', '', '', 'ip', '', 0, '2024-09-30 10:51:53', 1, 'emp', '0000-00-00 00:00:00', 0),
(22, 185, 5, 1, '', 0.00, 0.00, 0, 'xckl', '', '', '', '', '', '', '', 0.00, '', 'Pending', '', '', 'op', '', 0, '2024-09-30 11:48:29', 1, 'emp', '0000-00-00 00:00:00', 0),
(23, 186, 22, 1, '', 0.00, 100.00, 0, 'zcd', 'asd', '', '', '', '', '', '', 0.00, '', 'Consulted', '', '', 'op', '', 0, '2024-10-03 14:10:19', 1, 'emp', '2024-10-03 14:23:46', 3),
(24, 187, 23, 1, '202410030250', 0.00, 100.00, 0, 'xcv', 'cxaffv', '', '', '', '', '', '', 0.00, '', 'Consulted', '', '', 'op', '', 0, '2024-10-03 14:12:53', 1, 'emp', '2024-10-03 14:25:31', 3),
(25, 188, 24, 1, '202410040252', 0.00, 100.00, 0, 'svf', 'ccasc', '', '', '', '', '', '', 0.00, '', 'Consulted', '', '', 'op', '', 0, '2024-10-03 14:14:38', 1, 'emp', '2024-10-03 14:24:43', 3),
(26, 189, 25, 1, '', 0.00, 100.00, 4, 'cc', 'mknj', '', '', '', '', '', '', 0.00, '', 'Allotted', '', '', 'ip', '', 0, '2024-10-03 14:29:47', 1, 'emp', '2024-10-03 14:35:55', 3),
(27, 190, 26, 1, '', 0.00, 100.00, 6, 'vd', 'mkk', '', '', '', '', '', '', 0.00, '', 'Allotted', '', '', 'ip', '', 0, '2024-10-03 14:40:44', 1, 'emp', '2024-10-03 14:43:20', 3),
(28, 191, 23, 1, '202410040253', 0.00, 100.00, 0, 's', 'zxc', '', '', '', '', '', '', 0.00, '', 'Paid', '', 'v', 'op', '', 0, '2024-10-04 12:37:40', 1, 'emp', '2024-10-04 12:38:00', 3),
(29, 192, 23, 1, '202410040254', 0.00, 100.00, 0, 'asc', 'dc', '', '', '', '', '', '', 0.00, '', 'Paid', '', '', 'op', '', 0, '2024-10-04 12:45:23', 1, 'emp', '2024-10-04 12:45:41', 3),
(30, 193, 16, 1, '202410040255', 0.00, 100.00, 0, 'v', 'zxv', '', '', '', '', '', '', 0.00, '', 'Paid', '', '', 'op', '', 0, '2024-10-04 13:19:56', 1, 'emp', '2024-10-04 13:20:12', 3),
(31, 194, 13, 1, '', 0.00, 0.00, 0, 's', '', '', '', '', '', '', '', 0.00, '', 'Pending', '', '', 'op', '', 0, '2024-10-04 17:40:56', 1, 'emp', '0000-00-00 00:00:00', 0),
(32, 195, 16, 1, '', 0.00, 100.00, 0, 'uh', 'dcxzc', '', '', '', '', '', '', 0.00, '', 'Consulted', '', '', 'op', '', 0, '2024-10-07 09:44:05', 1, 'emp', '2024-10-07 09:55:28', 3);

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

--
-- Table structure for table `op_medications`
--

CREATE TABLE `op_medications` (
  `id` int(11) NOT NULL,
  `patient_record_id` int(11) NOT NULL,
  `tablet_id` int(11) NOT NULL,
  `dosage_id` int(11) NOT NULL,
  `quantity` int(11) NOT NULL,
  `op_medications_batch_id` int(11) NOT NULL,
  `drug` varchar(50) NOT NULL,
  `dosage` varchar(50) NOT NULL,
  `drug_type` varchar(30) NOT NULL,
  `type` varchar(255) NOT NULL,
  `time_taken` varchar(30) NOT NULL,
  `frequency` varchar(30) NOT NULL,
  `duration` varchar(255) NOT NULL,
  `formulation` varchar(50) NOT NULL,
  `tablet` varchar(50) NOT NULL,
  `no_of_days` varchar(50) NOT NULL,
  `intake_pattern` varchar(50) NOT NULL,
  `remarks` text NOT NULL,
  `status` varchar(30) NOT NULL,
  `dateTime` datetime NOT NULL,
  `created_by` int(11) NOT NULL,
  `user_type` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `op_medications`
--

INSERT INTO `op_medications` (`id`, `patient_record_id`, `tablet_id`, `dosage_id`, `quantity`, `op_medications_batch_id`, `drug`, `dosage`, `drug_type`, `type`, `time_taken`, `frequency`, `duration`, `formulation`, `tablet`, `no_of_days`, `intake_pattern`, `remarks`, `status`, `dateTime`, `created_by`, `user_type`) VALUES
(1, 6, 10, 15, 30, 5, 'MedTestOne - f1', '100mg', 'Oral', 'Tablets', 'After Food', '1-1-1', '10', '', '', '', '', '', 'Active', '2024-09-24 15:09:30', 1, 'doctor'),
(2, 7, 10, 15, 1, 6, 'MedTestOne - f1', '100mg', 'Oral', 'Tablets', 'After Food', '1-0-0', '1', '', '', '', '', '', 'Active', '2024-09-24 15:48:29', 1, 'doctor'),
(3, 12, 10, 15, 1, 9, 'MedTestOne - f1', '100mg', 'Oral', 'Tablets', 'After Food', '1-0-0', '1', '', '', '', '', '', 'Active', '2024-09-27 14:48:14', 1, 'doctor'),
(4, 15, 12, 18, 1, 10, 'testMedOne - f1', '100mg', 'Oral', 'Tablets', 'After Food', '1-0-0', '1', '', '', '', '', '', 'Active', '2024-09-28 17:15:46', 1, 'doctor'),
(5, 16, 12, 18, 10, 11, 'testMedOne - f1', '100mg', 'Oral', 'Tablets', 'After Food', '1-0-0', '10', '', '', '', '', '', 'Active', '2024-09-28 17:31:59', 1, 'doctor'),
(6, 18, 12, 18, 10, 12, 'testMedOne - f1', '100mg', 'Oral', 'Tablets', 'After Food', '1-0-0', '10', '', '', '', '', '', 'Active', '2024-09-30 10:30:32', 1, 'doctor'),
(7, 19, 12, 18, 10, 13, 'testMedOne - f1', '100mg', 'Oral', 'Tablets', 'After Food', '1-0-0-0', '10', '', '', '', '', '', 'Active', '2024-09-30 10:36:32', 1, 'doctor'),
(8, 20, 12, 18, 10, 14, 'testMedOne - f1', '100mg', 'Oral', 'Tablets', 'After Food', '1-0-0', '10', '', '', '', '', '', 'Active', '2024-09-30 10:37:16', 1, 'doctor'),
(9, 23, 12, 18, 10, 15, 'testMedOne - f1', '100mg', 'Oral', 'Tablets', 'After Food', '1-0-0', '10', '', '', '', '', '', 'Active', '2024-10-03 14:23:46', 1, 'doctor'),
(10, 23, 13, 19, 10, 15, 'testONe - f1', '100mg', 'Oral', 'Tablets', 'After Food', '1-0-0', '10', '', '', '', '', '', 'Active', '2024-10-03 14:23:46', 1, 'doctor'),
(11, 25, 12, 18, 10, 16, 'testMedOne - f1', '100mg', 'Oral', 'Tablets', 'After Food', '1-0-0', '10', '', '', '', '', '', 'Active', '2024-10-03 14:24:43', 1, 'doctor'),
(12, 25, 13, 19, 10, 16, 'testONe - f1', '100mg', 'Oral', 'Tablets', 'Before Food', '1-0-0', '10', '', '', '', '', '', 'Active', '2024-10-03 14:24:43', 1, 'doctor'),
(13, 24, 12, 18, 10, 17, 'testMedOne - f1', '100mg', 'Oral', 'Tablets', 'Before Food', '1-0-0', '10', '', '', '', '', '', 'Active', '2024-10-03 14:25:31', 1, 'doctor'),
(14, 24, 13, 19, 10, 17, 'testONe - f1', '100mg', 'Oral', 'Tablets', 'After Food', '1-0-0-0', '10', '', '', '', '', '', 'Active', '2024-10-03 14:25:31', 1, 'doctor'),
(15, 26, 12, 18, 10, 18, 'testMedOne - f1', '100mg', 'Oral', 'Tablets', 'After Food', '1-0-0', '10', '', '', '', '', '', 'Active', '2024-10-03 14:35:55', 1, 'doctor'),
(16, 26, 13, 19, 10, 18, 'testONe - f1', '100mg', 'Oral', 'Tablets', 'After Food', '1-0-0', '10', '', '', '', '', '', 'Active', '2024-10-03 14:35:55', 1, 'doctor'),
(17, 27, 12, 18, 10, 19, 'testMedOne - f1', '100mg', 'Oral', 'Tablets', 'Before Food', '1-0-0', '10', '', '', '', '', '', 'Active', '2024-10-03 14:43:20', 1, 'doctor'),
(18, 27, 13, 19, 10, 19, 'testONe - f1', '100mg', 'Oral', 'Tablets', 'After Food', '1-0-0', '10', '', '', '', '', '', 'Active', '2024-10-03 14:43:20', 1, 'doctor'),
(19, 32, 12, 18, 10, 23, 'testMedOne - f1', '100mg', 'Oral', 'Tablets', 'After Food', '1-0-0', '10', '', '', '', '', '', 'Active', '2024-10-07 09:55:28', 1, 'doctor');

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

--
-- Table structure for table `op_medications_batch`
--

CREATE TABLE `op_medications_batch` (
  `id` int(11) NOT NULL,
  `patient_record_id` int(11) NOT NULL,
  `patient_id` int(11) NOT NULL,
  `doctor_id` int(11) NOT NULL,
  `paymentStatus` varchar(255) NOT NULL,
  `status` varchar(255) NOT NULL,
  `createdOn` datetime NOT NULL,
  `createdBy` int(11) NOT NULL,
  `createdUserType` varchar(255) NOT NULL,
  `less` varchar(255) NOT NULL DEFAULT '0',
  `reason_of_less` text DEFAULT NULL,
  `sub_total` varchar(255) DEFAULT NULL,
  `total` varchar(255) DEFAULT NULL,
  `payment_method` varchar(255) DEFAULT NULL,
  `trans_id` int(11) DEFAULT NULL,
  `paidOn` datetime DEFAULT NULL,
  `attended_by` int(11) NOT NULL,
  `billied_by` int(11) NOT NULL,
  `verified_by` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `op_medications_batch`
--

INSERT INTO `op_medications_batch` (`id`, `patient_record_id`, `patient_id`, `doctor_id`, `paymentStatus`, `status`, `createdOn`, `createdBy`, `createdUserType`, `less`, `reason_of_less`, `sub_total`, `total`, `payment_method`, `trans_id`, `paidOn`, `attended_by`, `billied_by`, `verified_by`) VALUES
(1, 1, 6, 1, 'unpaid', 'Active', '2024-09-21 11:35:00', 1, 'doctor', '0', NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0),
(2, 2, 5, 1, 'unpaid', 'Active', '2024-09-21 11:42:29', 1, 'doctor', '0', NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0),
(3, 3, 1, 1, 'unpaid', 'Active', '2024-09-21 11:46:05', 1, 'doctor', '0', NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0),
(4, 4, 16, 1, 'unpaid', 'Active', '2024-09-21 12:51:28', 1, 'doctor', '0', NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0),
(5, 6, 8, 1, 'paid', 'Active', '2024-09-24 15:09:30', 1, 'doctor', '', '', '3000', '3000', 'Cash', 0, '2024-09-24 15:20:13', 9, 16, 9),
(6, 7, 3, 1, 'unpaid', 'Active', '2024-09-24 15:48:29', 1, 'doctor', '0', NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0),
(7, 9, 6, 1, 'unpaid', 'Active', '2024-09-24 22:53:07', 1, 'doctor', '0', NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0),
(8, 10, 12, 1, 'unpaid', 'Active', '2024-09-24 22:53:19', 1, 'doctor', '0', NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0),
(9, 12, 13, 1, 'unpaid', 'Active', '2024-09-27 14:48:14', 1, 'doctor', '0', NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0),
(10, 15, 5, 1, 'paid', 'Active', '2024-09-28 17:15:46', 1, 'doctor', '', '', '5', '5', 'Cash', 0, '2024-09-28 17:30:41', 9, 16, 9),
(11, 16, 5, 1, 'paid', 'Active', '2024-09-28 17:31:59', 1, 'doctor', '', '', '50', '50', 'Cash', 0, '2024-09-28 17:34:31', 9, 16, 9),
(12, 18, 18, 1, 'unpaid', 'Active', '2024-09-30 10:30:32', 1, 'doctor', '0', NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0),
(13, 19, 19, 1, 'unpaid', 'Active', '2024-09-30 10:36:32', 1, 'doctor', '0', NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0),
(14, 20, 20, 1, 'unpaid', 'Active', '2024-09-30 10:37:16', 1, 'doctor', '0', NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0),
(15, 23, 22, 1, 'unpaid', 'Active', '2024-10-03 14:23:46', 1, 'doctor', '0', NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0),
(16, 25, 24, 1, 'paid', 'Active', '2024-10-03 14:24:43', 1, 'doctor', '', '', '1050', '1050', 'Cash', 0, '2024-10-04 11:41:22', 9, 16, 9),
(17, 24, 23, 1, 'paid', 'Active', '2024-10-03 14:25:31', 1, 'doctor', '', '', '1050', '1050', 'Cash', 0, '2024-10-03 15:06:57', 9, 16, 9),
(18, 26, 25, 1, 'unpaid', 'Active', '2024-10-03 14:35:55', 1, 'doctor', '0', NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0),
(19, 27, 26, 1, 'unpaid', 'Active', '2024-10-03 14:43:20', 1, 'doctor', '0', NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0),
(20, 28, 23, 1, 'unpaid', 'Active', '2024-10-04 12:38:00', 1, 'doctor', '0', NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0),
(21, 29, 23, 1, 'unpaid', 'Active', '2024-10-04 12:45:41', 1, 'doctor', '0', NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0),
(22, 30, 16, 1, 'unpaid', 'Active', '2024-10-04 13:20:12', 1, 'doctor', '0', NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0),
(23, 32, 16, 1, 'unpaid', 'Active', '2024-10-07 09:55:28', 1, 'doctor', '0', NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0);

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

--
-- Table structure for table `op_medications_sold_items`
--

CREATE TABLE `op_medications_sold_items` (
  `id` int(11) NOT NULL,
  `op_medications_batch_id` int(11) NOT NULL,
  `patient_record_id` int(11) NOT NULL,
  `tablet_id` int(11) NOT NULL,
  `dosage_id` int(11) NOT NULL,
  `quantity` int(11) NOT NULL,
  `credited_quantity` int(11) NOT NULL,
  `batch_no` varchar(255) NOT NULL,
  `status` int(11) NOT NULL,
  `createdOn` datetime NOT NULL,
  `createdBy` int(11) NOT NULL,
  `createdUserType` int(11) NOT NULL,
  `drug` varchar(255) NOT NULL,
  `dosage` varchar(255) NOT NULL,
  `drug_type` varchar(255) NOT NULL,
  `type` varchar(255) NOT NULL,
  `time_taken` varchar(255) NOT NULL,
  `frequency` varchar(255) NOT NULL,
  `duration` datetime NOT NULL,
  `formulation` varchar(255) NOT NULL,
  `tablet` varchar(255) NOT NULL,
  `no_of_days` varchar(255) NOT NULL,
  `intake_pattern` varchar(355) NOT NULL,
  `remarks` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `op_medications_sold_items`
--

INSERT INTO `op_medications_sold_items` (`id`, `op_medications_batch_id`, `patient_record_id`, `tablet_id`, `dosage_id`, `quantity`, `credited_quantity`, `batch_no`, `status`, `createdOn`, `createdBy`, `createdUserType`, `drug`, `dosage`, `drug_type`, `type`, `time_taken`, `frequency`, `duration`, `formulation`, `tablet`, `no_of_days`, `intake_pattern`, `remarks`) VALUES
(1, 5, 6, 10, 15, 30, 0, '003', 0, '0000-00-00 00:00:00', 0, 0, '', '', '', '', '', '', '0000-00-00 00:00:00', '', '', '', '', ''),
(2, 10, 15, 12, 18, 1, 1, '001', 0, '0000-00-00 00:00:00', 0, 0, '', '', '', '', '', '', '0000-00-00 00:00:00', '', '', '', '', ''),
(3, 11, 16, 12, 18, 10, 9, '001', 0, '0000-00-00 00:00:00', 0, 0, '', '', '', '', '', '', '0000-00-00 00:00:00', '', '', '', '', ''),
(4, 17, 24, 12, 18, 10, 9, '001', 0, '0000-00-00 00:00:00', 0, 0, '', '', '', '', '', '', '0000-00-00 00:00:00', '', '', '', '', ''),
(5, 17, 24, 13, 19, 10, 10, '10001', 0, '0000-00-00 00:00:00', 0, 0, '', '', '', '', '', '', '0000-00-00 00:00:00', '', '', '', '', ''),
(6, 16, 25, 12, 18, 10, 10, '001', 0, '0000-00-00 00:00:00', 0, 0, '', '', '', '', '', '', '0000-00-00 00:00:00', '', '', '', '', ''),
(7, 16, 25, 13, 19, 10, 10, '10001', 0, '0000-00-00 00:00:00', 0, 0, '', '', '', '', '', '', '0000-00-00 00:00:00', '', '', '', '', '');

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

--
-- Table structure for table `op_scan_paid`
--

CREATE TABLE `op_scan_paid` (
  `id` int(11) NOT NULL,
  `patient_record_id` int(11) NOT NULL,
  `patient_id` int(11) NOT NULL,
  `division_id` int(11) NOT NULL,
  `qty` int(11) NOT NULL,
  `amount` decimal(11,2) NOT NULL,
  `status` varchar(40) NOT NULL,
  `dateTime` datetime NOT NULL,
  `created_by` int(11) NOT NULL,
  `user_type` varchar(40) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `op_transaction_history`
--

CREATE TABLE `op_transaction_history` (
  `id` int(11) NOT NULL,
  `patient_id` int(11) NOT NULL,
  `record_id` int(11) NOT NULL,
  `amount` decimal(11,2) NOT NULL,
  `mop` varchar(100) NOT NULL,
  `trans_id` varchar(255) NOT NULL,
  `status` varchar(30) DEFAULT NULL,
  `dateTime` datetime DEFAULT NULL,
  `type` varchar(40) DEFAULT NULL,
  `created_by` int(11) NOT NULL,
  `user_type` varchar(50) NOT NULL,
  `remarks` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `op_transaction_history`
--

INSERT INTO `op_transaction_history` (`id`, `patient_id`, `record_id`, `amount`, `mop`, `trans_id`, `status`, `dateTime`, `type`, `created_by`, `user_type`, `remarks`) VALUES
(1, 5, 2, 100.00, 'Cash', '', 'Active', '2024-09-21 11:42:45', NULL, 15, 'emp', NULL),
(2, 8, 6, 3000.00, '', '', 'Active', '2024-09-24 15:20:13', NULL, 9, '', NULL),
(3, 5, 15, 5.00, '', '', 'Active', '2024-09-28 17:30:41', NULL, 9, '', NULL),
(4, 5, 16, 50.00, '', '', 'Active', '2024-09-28 17:34:31', NULL, 9, '', NULL),
(5, 23, 24, 1050.00, '', '', 'Active', '2024-10-03 15:06:57', NULL, 9, '', NULL),
(6, 24, 25, 1050.00, '', '', 'Active', '2024-10-04 11:41:22', NULL, 9, '', NULL),
(7, 23, 28, 100.00, 'Cash', '', 'Active', '2024-10-04 12:39:38', NULL, 13, 'emp', NULL),
(8, 23, 29, 100.00, 'Cash', '', 'Active', '2024-10-04 12:45:59', NULL, 1, 'emp', NULL),
(9, 16, 30, 100.00, 'Cash', '', 'Active', '2024-10-04 13:25:47', NULL, 13, 'emp', NULL);

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

--
-- Table structure for table `other_entry_data`
--

CREATE TABLE `other_entry_data` (
  `id` int(11) NOT NULL,
  `patient_id` int(11) NOT NULL,
  `bill_no` varchar(255) NOT NULL,
  `remarks` text DEFAULT NULL,
  `less` decimal(11,2) NOT NULL,
  `reason_less` text NOT NULL,
  `subtotal` decimal(11,2) NOT NULL,
  `total` decimal(11,2) NOT NULL,
  `mop` varchar(40) DEFAULT NULL,
  `trans_id` varchar(255) DEFAULT NULL,
  `status` varchar(50) DEFAULT NULL,
  `dateTime` datetime DEFAULT NULL,
  `created_by` int(11) DEFAULT NULL,
  `user_type` varchar(50) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `other_services_data`
--

CREATE TABLE `other_services_data` (
  `id` int(11) NOT NULL,
  `record_id` int(11) NOT NULL,
  `service_id` int(11) NOT NULL,
  `service_name` varchar(255) DEFAULT NULL,
  `amount` decimal(11,2) DEFAULT NULL,
  `status` varchar(50) DEFAULT NULL,
  `dateTime` datetime DEFAULT NULL,
  `created_by` int(11) DEFAULT NULL,
  `user_type` varchar(50) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `other_service_transaction_history`
--

CREATE TABLE `other_service_transaction_history` (
  `id` int(11) NOT NULL,
  `patient_id` int(11) NOT NULL,
  `record_id` int(11) NOT NULL,
  `amount` decimal(11,2) NOT NULL,
  `status` varchar(30) DEFAULT NULL,
  `dateTime` datetime DEFAULT NULL,
  `type` varchar(40) DEFAULT NULL,
  `created_by` int(11) NOT NULL,
  `user_type` varchar(50) NOT NULL,
  `mop` varchar(100) DEFAULT NULL,
  `trans_id` varchar(100) DEFAULT NULL,
  `remarks` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `out_patient_data`
--

CREATE TABLE `out_patient_data` (
  `id` int(10) NOT NULL,
  `patient_id` int(5) NOT NULL,
  `doctor_id` int(5) NOT NULL,
  `assigned_by` int(5) NOT NULL,
  `reason` text NOT NULL,
  `token_no` varchar(30) NOT NULL,
  `dateTime` datetime NOT NULL,
  `created_by` int(11) NOT NULL,
  `user_type` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `patient_bed_history`
--

CREATE TABLE `patient_bed_history` (
  `id` int(11) NOT NULL,
  `patient_id` int(11) DEFAULT NULL,
  `patient_record_id` int(11) DEFAULT NULL,
  `bed_id` int(11) NOT NULL,
  `price` decimal(11,2) NOT NULL,
  `type` varchar(50) NOT NULL,
  `status` varchar(30) DEFAULT NULL,
  `dateTime` datetime DEFAULT NULL,
  `created_by` int(11) NOT NULL,
  `user_type` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `patient_bed_history`
--

INSERT INTO `patient_bed_history` (`id`, `patient_id`, `patient_record_id`, `bed_id`, `price`, `type`, `status`, `dateTime`, `created_by`, `user_type`) VALUES
(1, 6, 1, 8, 140.00, 'ip', 'Active', '2024-09-21 11:36:50', 15, 'emp'),
(2, 1, 2, 5, 100.00, 'observation', 'Active', '2024-09-21 11:46:30', 15, 'emp'),
(3, 16, 3, 6, 120.00, 'ip', 'Active', '2024-09-21 14:40:42', 15, 'emp'),
(4, 6, 4, 7, 130.00, 'ip', 'Active', '2024-09-24 22:53:50', 15, 'emp'),
(5, 12, 5, 1, 1000.00, 'observation', 'Active', '2024-09-24 22:53:56', 15, 'emp'),
(6, 19, 6, 2, 1000.00, 'ip', 'Active', '2024-09-30 10:39:47', 15, 'emp'),
(7, 20, 7, 3, 1000.00, 'observation', 'Active', '2024-09-30 10:39:54', 15, 'emp'),
(8, 25, 8, 4, 1000.00, 'Tablets', 'Active', '2024-10-03 14:35:55', 15, 'emp'),
(9, 21, 9, 6, 120.00, 'ip', 'Active', '2024-10-03 14:39:23', 15, 'emp'),
(10, 26, 10, 6, 120.00, 'Tablets', 'Active', '2024-10-03 14:43:20', 15, 'emp');

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

--
-- Table structure for table `patient_data`
--

CREATE TABLE `patient_data` (
  `id` int(10) NOT NULL,
  `mrd_no` varchar(50) NOT NULL,
  `patient_name` varchar(100) NOT NULL,
  `dob` date NOT NULL,
  `gender` varchar(10) NOT NULL,
  `mobile` varchar(20) NOT NULL,
  `alt_mobile_1` varchar(20) NOT NULL,
  `alt_mobile_2` varchar(20) NOT NULL,
  `address` text NOT NULL,
  `blood` varchar(20) NOT NULL,
  `status` varchar(30) NOT NULL,
  `dateTime` datetime NOT NULL,
  `created_by` int(11) NOT NULL,
  `user_type` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `patient_data`
--

INSERT INTO `patient_data` (`id`, `mrd_no`, `patient_name`, `dob`, `gender`, `mobile`, `alt_mobile_1`, `alt_mobile_2`, `address`, `blood`, `status`, `dateTime`, `created_by`, `user_type`) VALUES
(1, 'AAR240305001', 'Muralidharann', '2000-02-20', 'Male', '7904693924', '', '', '', 'O+ve', 'Active', '2024-03-05 11:41:56', 1, 'doctor'),
(2, 'AAR240305002', 'Venkat', '2000-02-20', 'Male', '9191919191', '', '', '', 'O+ve', 'Active', '2024-03-05 11:58:19', 1, 'emp'),
(3, 'AAR240710003', 'vickyy', '2008-12-12', 'Male', '8903869761', '', '', 'Chennai', 'A+ve', 'Active', '2024-07-10 12:34:04', 1, 'emp'),
(4, 'AAR240710004', 'kannan', '2003-02-01', 'Male', '8300399185', '', '', 'trichy', 'A-ve', 'Active', '2024-07-10 14:53:31', 1, 'emp'),
(5, 'AAR240711005', 'irfhana', '2000-02-01', 'Female', '8056404125', '', '', 'trichy', 'B+ve', 'Active', '2024-07-11 15:11:21', 1, 'emp'),
(6, 'AAR240712006', 'mohan', '2001-02-01', 'Male', '8056404126', '', '', 'trichy', 'AB+ve', 'Active', '2024-07-12 14:14:39', 1, 'emp'),
(7, 'AAR240712007', 'kavya', '2005-02-01', 'Female', '8903869768', '', '', 'chennai', 'A+ve', 'Active', '2024-07-12 14:44:47', 1, 'emp'),
(8, 'AAR240712008', 'priya', '2003-02-01', 'Male', '8056404128', '', '', 'chennai', 'AB+ve', 'Active', '2024-07-12 15:39:41', 1, 'emp'),
(9, 'AAR240713009', 'dinesh', '2001-03-06', 'Male', '8056404127', '', '', 'kumbakonam', 'O+ve', 'Active', '2024-07-13 00:47:26', 1, 'emp'),
(10, 'AAR240713010', 'rahul', '2005-05-04', 'Male', '8056404129', '', '', 'chennai', 'O+ve', 'Active', '2024-07-13 12:52:41', 1, 'emp'),
(11, 'AAR240713011', 'banu', '2000-02-01', 'Female', '8300399185', '', '', 'chennai', 'A+ve', 'Active', '2024-07-13 15:52:51', 1, 'emp'),
(12, 'AAR240715012', 'vidhya', '2000-05-04', 'Female', '8056404121', '', '', 'trichy', 'AB+ve', 'Active', '2024-07-15 12:01:20', 1, 'emp'),
(13, 'AAR240715013', 'murli', '2024-05-08', 'Male', '8056404122', '', '', 'cold', 'AB+ve', 'Active', '2024-07-15 12:06:40', 1, 'emp'),
(14, 'AAR240715014', 'dhana', '2000-02-01', 'Female', '8300399185', '', '', 'new york', 'AB+ve', 'Active', '2024-07-15 14:44:02', 1, 'emp'),
(15, 'AAR240715015', 'roshan', '2001-05-04', 'Male', '8056404123', '', '', 'kumbakonam', 'A+ve', 'Active', '2024-07-15 14:44:54', 1, 'emp'),
(16, 'AAR240721016', 'patientone', '2000-02-20', 'Male', '9080191211', '', '', '', 'AB+ve', 'Active', '2024-07-21 12:39:37', 1, 'emp'),
(17, 'AAR240721017', 'patienttwo', '2000-02-20', 'Male', '2132131232', '', '', '', 'AB+ve', 'Active', '2024-07-21 12:41:50', 1, 'emp'),
(18, 'AAR240930018', 'patientTestOne', '2000-02-20', 'Male', '8056404127', '', '', 'zxc', 'O+ve', 'Active', '2024-09-30 10:26:18', 1, 'emp'),
(19, 'AAR240930019', 'patientTestTwo', '2005-02-20', 'Female', '9080992211', '', '', 'inon', 'A-ve', 'Active', '2024-09-30 10:27:26', 1, 'emp'),
(20, 'AAR240930020', 'patientTestThree', '2003-02-20', 'Male', '9090909090', '', '', 'cmmm', 'A-ve', 'Active', '2024-09-30 10:28:11', 1, 'emp'),
(21, 'AAR240930021', 'patientTestFour', '2004-02-29', 'Male', '9091233120', '', '', 'zxvk', 'A+ve', 'Active', '2024-09-30 10:51:47', 1, 'emp'),
(22, 'AAR241003022', 'opcredittest', '2019-02-03', 'Male', '7904693924', '', '', '', 'O+ve', 'Active', '2024-10-03 14:10:10', 1, 'emp'),
(23, 'AAR241003023', 'ipcredtest', '2000-02-20', 'Male', '7904693924', '', '', '', 'A-ve', 'Active', '2024-10-03 14:12:32', 1, 'emp'),
(24, 'AAR241003024', 'obcredittest', '2000-10-09', 'Male', '7012345678', '', '', '', '', 'Active', '2024-10-03 14:14:30', 1, 'emp'),
(25, 'AAR241003025', 'ipcredittestTwo', '2023-05-17', 'Male', '7904693924', '', '', '', 'A+ve', 'Active', '2024-10-03 14:29:40', 1, 'emp'),
(26, 'AAR241003026', 'ipcreditThree', '2000-10-02', 'Male', '7904693924', '', '', '', 'O+ve', 'Active', '2024-10-03 14:40:39', 1, 'emp');

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

--
-- Table structure for table `patient_drip`
--

CREATE TABLE `patient_drip` (
  `id` int(11) NOT NULL,
  `patient_drip_batch_id` int(11) NOT NULL,
  `patient_id` int(11) NOT NULL,
  `patient_record_id` int(11) NOT NULL,
  `drip_id` int(11) NOT NULL,
  `rate` varchar(255) NOT NULL,
  `start_time` varchar(50) NOT NULL,
  `end_time` varchar(50) NOT NULL,
  `status` varchar(50) NOT NULL,
  `ip_ob_id` int(11) NOT NULL,
  `patient_type` varchar(50) NOT NULL,
  `created_at` datetime NOT NULL,
  `created_by` int(11) NOT NULL,
  `created_user_type` varchar(50) NOT NULL,
  `dosage` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `patient_drip`
--

INSERT INTO `patient_drip` (`id`, `patient_drip_batch_id`, `patient_id`, `patient_record_id`, `drip_id`, `rate`, `start_time`, `end_time`, `status`, `ip_ob_id`, `patient_type`, `created_at`, `created_by`, `created_user_type`, `dosage`) VALUES
(1, 1, 16, 3, 13, '100', '15:48:36', '20:48:36', 'started', 0, 'ip', '2024-09-21 14:41:20', 1, 'doctor', ''),
(2, 2, 6, 4, 9, '100', '', '', 'active', 0, 'ip', '2024-09-24 22:54:42', 1, 'doctor', '');

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

--
-- Table structure for table `patient_drip_batch`
--

CREATE TABLE `patient_drip_batch` (
  `id` int(11) NOT NULL,
  `patient_record_id` int(11) NOT NULL,
  `patient_id` int(11) NOT NULL,
  `type` varchar(255) NOT NULL,
  `created_on` datetime NOT NULL,
  `status` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `patient_drip_batch`
--

INSERT INTO `patient_drip_batch` (`id`, `patient_record_id`, `patient_id`, `type`, `created_on`, `status`) VALUES
(1, 3, 16, 'ip', '2024-09-21 14:41:20', 'Active'),
(2, 4, 6, 'ip', '2024-09-24 22:54:42', 'Active');

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

--
-- Table structure for table `patient_scan_data`
--

CREATE TABLE `patient_scan_data` (
  `id` int(11) NOT NULL,
  `scan_patient_id` int(11) DEFAULT NULL,
  `scan_cat_id` int(11) DEFAULT NULL,
  `price` decimal(11,2) DEFAULT NULL,
  `path` text NOT NULL,
  `file_name` varchar(255) NOT NULL,
  `file_status` varchar(100) NOT NULL,
  `uploaded_dateTime` datetime NOT NULL,
  `uploaded_by` int(11) NOT NULL,
  `uploaded_user` varchar(50) NOT NULL,
  `status` varchar(40) DEFAULT NULL,
  `dateTime` datetime DEFAULT NULL,
  `created_by` int(11) NOT NULL,
  `user_type` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `patient_scan_data`
--

INSERT INTO `patient_scan_data` (`id`, `scan_patient_id`, `scan_cat_id`, `price`, `path`, `file_name`, `file_status`, `uploaded_dateTime`, `uploaded_by`, `uploaded_user`, `status`, `dateTime`, `created_by`, `user_type`) VALUES
(1, 1, 4, 5000.00, '', '', '', '0000-00-00 00:00:00', 0, '', 'Active', '2024-10-05 11:26:56', 1, 'emp'),
(2, 2, 4, 5000.00, '', '', '', '0000-00-00 00:00:00', 0, '', 'Active', '2024-10-05 11:29:32', 1, 'emp'),
(3, 3, 5, 500.00, '', '', '', '0000-00-00 00:00:00', 0, '', 'Active', '2024-10-05 11:29:59', 1, 'emp'),
(4, 4, 2, 1000.00, '', '', '', '0000-00-00 00:00:00', 0, '', 'Active', '2024-10-05 11:30:39', 1, 'emp');

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

--
-- Table structure for table `patient_scan_record`
--

CREATE TABLE `patient_scan_record` (
  `id` int(11) NOT NULL,
  `patient_id` int(11) NOT NULL,
  `bill_no` varchar(255) NOT NULL,
  `sub_total` decimal(11,2) NOT NULL,
  `less` decimal(11,2) NOT NULL,
  `total` decimal(11,2) NOT NULL,
  `reason` text NOT NULL,
  `pay_status` varchar(255) DEFAULT NULL,
  `paid_on` datetime NOT NULL,
  `status` varchar(40) DEFAULT NULL,
  `dateTime` datetime DEFAULT NULL,
  `created_by` int(11) NOT NULL,
  `user_type` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `patient_scan_record`
--

INSERT INTO `patient_scan_record` (`id`, `patient_id`, `bill_no`, `sub_total`, `less`, `total`, `reason`, `pay_status`, `paid_on`, `status`, `dateTime`, `created_by`, `user_type`) VALUES
(1, 5, '202410050256', 5000.00, 0.00, 5000.00, '', 'Paid', '0000-00-00 00:00:00', 'Active', '2024-10-05 11:26:56', 1, 'emp'),
(2, 14, '202410050257', 5000.00, 0.00, 5000.00, '', 'Paid', '0000-00-00 00:00:00', 'Active', '2024-10-05 11:29:32', 1, 'emp'),
(3, 22, '202410050258', 500.00, 0.00, 500.00, '', 'Paid', '0000-00-00 00:00:00', 'Active', '2024-10-05 11:29:59', 1, 'emp'),
(4, 25, '202410050259', 1000.00, 0.00, 1000.00, '', 'Paid', '0000-00-00 00:00:00', 'Active', '2024-10-05 11:30:39', 1, 'emp');

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

--
-- Table structure for table `patient_visit_no`
--

CREATE TABLE `patient_visit_no` (
  `id` int(11) NOT NULL,
  `patient_no` int(11) DEFAULT NULL,
  `count` int(11) DEFAULT NULL,
  `status` varchar(40) DEFAULT NULL,
  `dateTime` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `pharmacy_inventory`
--

CREATE TABLE `pharmacy_inventory` (
  `id` int(11) NOT NULL,
  `tablet_id` int(11) NOT NULL,
  `dosage_id` int(11) NOT NULL,
  `quantity` int(11) NOT NULL,
  `created_on` datetime NOT NULL,
  `created_by` int(11) NOT NULL,
  `created_user_type` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `pharmacy_inventory`
--

INSERT INTO `pharmacy_inventory` (`id`, `tablet_id`, `dosage_id`, `quantity`, `created_on`, `created_by`, `created_user_type`) VALUES
(1, 1, 1, 10, '2024-08-08 13:47:04', 7, 'emp');

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

--
-- Table structure for table `prescription_sales_items`
--

CREATE TABLE `prescription_sales_items` (
  `id` int(11) NOT NULL,
  `drug` varchar(255) DEFAULT NULL,
  `dosage` varchar(255) DEFAULT NULL,
  `drug_type` varchar(255) DEFAULT NULL,
  `intake_pattern` varchar(255) DEFAULT NULL,
  `frequency` varchar(255) DEFAULT NULL,
  `no_of_days` int(11) DEFAULT NULL,
  `quantity` decimal(10,2) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `purchased_medicine_history`
--

CREATE TABLE `purchased_medicine_history` (
  `id` int(11) NOT NULL,
  `purchased_data_id` int(11) DEFAULT NULL,
  `medicine_id` int(11) DEFAULT NULL,
  `dosage_id` int(11) DEFAULT NULL,
  `unit_price` decimal(10,2) DEFAULT NULL,
  `quantity` int(11) DEFAULT NULL,
  `total_price` decimal(10,2) DEFAULT NULL,
  `status` varchar(20) DEFAULT NULL,
  `dateTime` datetime DEFAULT NULL,
  `created_by` varchar(255) DEFAULT NULL,
  `user_type` varchar(255) DEFAULT NULL,
  `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_general_ci;

--
-- Dumping data for table `purchased_medicine_history`
--

INSERT INTO `purchased_medicine_history` (`id`, `purchased_data_id`, `medicine_id`, `dosage_id`, `unit_price`, `quantity`, `total_price`, `status`, `dateTime`, `created_by`, `user_type`, `created_at`, `updated_at`) VALUES
(1, 1, 2, 5, 2000.00, 10, 20000.00, 'Active', '2024-03-08 21:58:15', '1', 'doctor', '2024-03-08 16:28:15', '2024-03-08 16:28:15'),
(2, 1, 1, 2, 200.00, 10, 2000.00, 'Active', '2024-03-08 21:58:15', '1', 'doctor', '2024-03-08 16:28:15', '2024-03-08 16:28:15'),
(3, 3, 1, 2, 200.00, 10, 2000.00, 'Active', '2024-03-08 22:04:50', '1', 'doctor', '2024-03-08 16:34:50', '2024-03-08 16:34:50'),
(4, 4, 1, 2, 200.00, 10, 2000.00, 'Active', '2024-03-08 22:06:31', '1', 'doctor', '2024-03-08 16:36:31', '2024-03-08 16:36:31'),
(5, 5, 1, 1, 100.00, 10, 1000.00, 'Active', '2024-03-08 22:07:39', '1', 'doctor', '2024-03-08 16:37:39', '2024-03-08 16:37:39'),
(6, 6, 1, 1, 100.00, 10, 1000.00, 'Active', '2024-03-08 22:08:07', '1', 'doctor', '2024-03-08 16:38:07', '2024-03-08 16:38:07'),
(7, 7, 1, 1, 100.00, 10, 1000.00, 'Active', '2024-03-08 22:10:10', '1', 'doctor', '2024-03-08 16:40:10', '2024-03-08 16:40:10'),
(8, 8, 1, 1, 100.00, 10, 1000.00, 'Active', '2024-03-08 22:12:18', '1', 'doctor', '2024-03-08 16:42:18', '2024-03-08 16:42:18'),
(9, 9, 1, 3, 300.00, 1, 300.00, 'Active', '2024-03-08 22:14:10', '1', 'doctor', '2024-03-08 16:44:10', '2024-03-08 16:44:10'),
(10, 10, 1, 3, 300.00, 1, 300.00, 'Active', '2024-03-08 22:14:36', '1', 'doctor', '2024-03-08 16:44:36', '2024-03-08 16:44:36'),
(11, 11, 1, 3, 300.00, 1, 300.00, 'Active', '2024-03-08 22:16:08', '1', 'doctor', '2024-03-08 16:46:08', '2024-03-08 16:46:08'),
(12, 12, 1, 3, 300.00, 1, 300.00, 'Active', '2024-03-08 22:19:36', '1', 'doctor', '2024-03-08 16:49:36', '2024-03-08 16:49:36'),
(13, 13, 1, 3, 300.00, 1, 300.00, 'Active', '2024-03-08 22:19:57', '1', 'doctor', '2024-03-08 16:49:57', '2024-03-08 16:49:57'),
(14, 14, 1, 3, 300.00, 1, 300.00, 'Active', '2024-03-08 22:20:17', '1', 'doctor', '2024-03-08 16:50:17', '2024-03-08 16:50:17');

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

--
-- Table structure for table `rep_company_data`
--

CREATE TABLE `rep_company_data` (
  `id` int(5) NOT NULL,
  `company_name` varchar(200) NOT NULL,
  `mobile` varchar(15) NOT NULL,
  `address` text NOT NULL,
  `status` varchar(30) NOT NULL,
  `dateTime` datetime NOT NULL,
  `created_by` int(11) NOT NULL,
  `user_type` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `rep_company_data`
--

INSERT INTO `rep_company_data` (`id`, `company_name`, `mobile`, `address`, `status`, `dateTime`, `created_by`, `user_type`) VALUES
(1, 'A1', '7984561321', 'Comp', 'Active', '2024-03-06 18:14:57', 1, 'doctor');

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

--
-- Table structure for table `rep_data`
--

CREATE TABLE `rep_data` (
  `id` int(11) NOT NULL,
  `seller_company_id` int(11) NOT NULL,
  `seller_name` varchar(100) NOT NULL,
  `seller_mobile` varchar(100) NOT NULL,
  `status` varchar(30) NOT NULL,
  `dateTime` datetime NOT NULL,
  `created_by` int(11) NOT NULL,
  `user_type` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `request_batch`
--

CREATE TABLE `request_batch` (
  `id` int(11) NOT NULL,
  `date` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `requestedBy` varchar(100) DEFAULT NULL,
  `order_no` varchar(50) DEFAULT NULL,
  `description` text DEFAULT NULL,
  `paid_on` datetime NOT NULL,
  `less` decimal(11,2) DEFAULT NULL,
  `reason_for_less` text DEFAULT NULL,
  `total` decimal(11,2) DEFAULT NULL,
  `sub_total` decimal(11,2) NOT NULL,
  `payment_mode` text NOT NULL,
  `transaction_id` varchar(255) NOT NULL,
  `status` varchar(50) NOT NULL DEFAULT 'pending'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `request_batch`
--

INSERT INTO `request_batch` (`id`, `date`, `requestedBy`, `order_no`, `description`, `paid_on`, `less`, `reason_for_less`, `total`, `sub_total`, `payment_mode`, `transaction_id`, `status`) VALUES
(1, '2024-09-23 04:28:24', 'Inventory', 'ORD-2024-001', NULL, '0000-00-00 00:00:00', NULL, NULL, NULL, 0.00, '', '', 'pending'),
(2, '2024-09-23 04:28:39', 'Inventory', 'ORD-2024-001', NULL, '0000-00-00 00:00:00', NULL, NULL, NULL, 0.00, '', '', 'pending'),
(3, '2024-09-23 04:28:57', 'Inventory', 'ORD-2024-001', NULL, '0000-00-00 00:00:00', NULL, NULL, NULL, 0.00, '', '', 'pending'),
(4, '2024-09-25 06:58:05', 'Inventory', 'ORD-2024-001', NULL, '2024-09-25 12:28:05', NULL, NULL, 50.00, 50.00, 'Cash', '', 'paid'),
(5, '2024-09-24 17:31:52', 'Inventory', 'ORD-2024-001', NULL, '2024-09-24 23:01:52', NULL, NULL, 2000.00, 2000.00, 'Cash', '', 'paid'),
(6, '2024-09-27 10:16:06', 'Inventory', 'ORD-2024-001', NULL, '2024-09-27 15:46:06', NULL, NULL, 5.00, 5.00, 'Cash', '', 'paid');

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

--
-- Table structure for table `request_contents`
--

CREATE TABLE `request_contents` (
  `id` int(11) NOT NULL,
  `requestBatchId` int(11) DEFAULT NULL,
  `medicineId` int(11) DEFAULT NULL,
  `dosageId` int(11) DEFAULT NULL,
  `count` int(11) DEFAULT NULL,
  `delivered` tinyint(4) NOT NULL DEFAULT 0,
  `dateTime` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `request_contents`
--

INSERT INTO `request_contents` (`id`, `requestBatchId`, `medicineId`, `dosageId`, `count`, `delivered`, `dateTime`) VALUES
(1, 1, 2, 6, 10, 0, '2024-08-19 17:51:01'),
(2, 2, 1, 1, 50, 0, '2024-08-19 18:18:52'),
(3, 3, 1, 3, 10, 0, '2024-08-22 01:13:42'),
(4, 3, 2, 5, 10, 0, '2024-08-22 01:13:42'),
(5, 1, 12, 18, 10, 0, '2024-09-23 09:58:24'),
(6, 2, 13, 19, 10, 0, '2024-09-23 09:58:39'),
(7, 3, 10, 15, 10, 0, '2024-09-23 09:58:57'),
(8, 4, 11, 16, 10, 0, '2024-09-23 10:04:38'),
(9, 5, 10, 15, 20, 0, '2024-09-24 23:00:31'),
(10, 6, 12, 18, 1, 0, '2024-09-27 15:08:15');

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

--
-- Table structure for table `request_ward_batch`
--

CREATE TABLE `request_ward_batch` (
  `id` int(11) NOT NULL,
  `floor_id` int(11) NOT NULL DEFAULT 0,
  `date` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `requestedBy` varchar(100) DEFAULT NULL,
  `order_no` varchar(50) DEFAULT NULL,
  `description` text DEFAULT NULL,
  `status` varchar(50) NOT NULL DEFAULT 'Pending',
  `paid_on` datetime DEFAULT NULL,
  `updatedtime` timestamp NOT NULL DEFAULT current_timestamp(),
  `less` decimal(11,2) DEFAULT NULL,
  `reason_for_less` text DEFAULT NULL,
  `total` decimal(11,2) NOT NULL,
  `sub_total` decimal(11,2) NOT NULL,
  `payment_mode` text DEFAULT NULL,
  `transaction_id` varchar(225) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `request_ward_batch`
--

INSERT INTO `request_ward_batch` (`id`, `floor_id`, `date`, `requestedBy`, `order_no`, `description`, `status`, `paid_on`, `updatedtime`, `less`, `reason_for_less`, `total`, `sub_total`, `payment_mode`, `transaction_id`) VALUES
(1, 1, '2024-09-20 08:38:19', 'Ward', 'ward 01', NULL, 'Approved', NULL, '2024-09-20 08:38:19', NULL, NULL, 0.00, 0.00, NULL, NULL),
(2, 1, '2024-09-23 05:00:10', 'Ward', 'ward 01', NULL, 'Approved', NULL, '2024-09-23 05:00:10', NULL, NULL, 0.00, 0.00, NULL, NULL),
(3, 1, '2024-09-23 05:01:11', 'Ward', 'ward 01', NULL, 'Approved', NULL, '2024-09-23 05:01:11', NULL, NULL, 0.00, 0.00, NULL, NULL),
(4, 1, '2024-09-24 17:26:48', 'Ward', 'ward 01', NULL, 'Pending', NULL, '2024-09-24 17:26:48', NULL, NULL, 0.00, 0.00, NULL, NULL);

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

--
-- Table structure for table `rooms`
--

CREATE TABLE `rooms` (
  `id` int(11) NOT NULL,
  `building_id` int(11) NOT NULL,
  `floor_id` int(11) DEFAULT NULL,
  `room_no` varchar(50) NOT NULL,
  `room_name` varchar(11) DEFAULT NULL,
  `bed_count` int(50) DEFAULT NULL,
  `room_type` varchar(50) NOT NULL,
  `status` varchar(30) DEFAULT NULL,
  `dateTime` datetime DEFAULT NULL,
  `created_by` int(11) NOT NULL,
  `user_type` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `rooms`
--

INSERT INTO `rooms` (`id`, `building_id`, `floor_id`, `room_no`, `room_name`, `bed_count`, `room_type`, `status`, `dateTime`, `created_by`, `user_type`) VALUES
(1, 1, 1, '101', NULL, 4, 'ac', 'Active', '2024-03-05 11:30:56', 1, 'doctor'),
(2, 1, 1, '102', NULL, 4, 'non-ac', 'Active', '2024-03-05 11:31:08', 1, 'doctor'),
(3, 0, 2, '100', NULL, 5, 'ac', 'Active', '2024-08-19 17:10:48', 1, 'doctor');

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

--
-- Table structure for table `scan`
--

CREATE TABLE `scan` (
  `id` int(11) NOT NULL,
  `scan_name` varchar(50) DEFAULT NULL,
  `status` varchar(30) DEFAULT NULL,
  `dateTime` datetime DEFAULT NULL,
  `created_by` int(11) NOT NULL,
  `user_type` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `scan`
--

INSERT INTO `scan` (`id`, `scan_name`, `status`, `dateTime`, `created_by`, `user_type`) VALUES
(1, 'Xray', 'Active', '2024-03-05 11:28:52', 1, 'doctor'),
(2, 'MRI', 'Active', '2024-03-05 11:28:57', 1, 'doctor'),
(3, 'USG', 'Active', '2024-03-05 11:29:05', 1, 'doctor');

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

--
-- Table structure for table `scan_cat`
--

CREATE TABLE `scan_cat` (
  `id` int(11) NOT NULL,
  `scan_id` int(11) NOT NULL,
  `scan_cat_name` varchar(255) NOT NULL,
  `price` decimal(11,2) NOT NULL,
  `status` varchar(50) NOT NULL,
  `dateTime` datetime NOT NULL,
  `created_by` int(11) NOT NULL,
  `user_type` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `scan_cat`
--

INSERT INTO `scan_cat` (`id`, `scan_id`, `scan_cat_name`, `price`, `status`, `dateTime`, `created_by`, `user_type`) VALUES
(1, 1, 'Head', 1000.00, 'Active', '2024-03-05 11:29:16', 1, 'doctor'),
(2, 1, 'Leg', 1000.00, 'Active', '2024-03-05 11:29:26', 1, 'doctor'),
(3, 1, 'Hand', 2000.00, 'Active', '2024-03-05 11:29:33', 1, 'doctor'),
(4, 2, 'MRI', 5000.00, 'Active', '2024-03-05 11:29:41', 1, 'doctor'),
(5, 3, 'Abdomen', 500.00, 'Active', '2024-03-05 11:30:03', 1, 'doctor');

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

--
-- Table structure for table `scan_records`
--

CREATE TABLE `scan_records` (
  `id` int(11) NOT NULL,
  `patient_id` int(11) DEFAULT NULL,
  `local_record_id` int(11) DEFAULT NULL,
  `type` varchar(50) NOT NULL,
  `pay_status` varchar(50) DEFAULT NULL,
  `status` varchar(50) DEFAULT NULL,
  `dateTime` datetime DEFAULT NULL,
  `created_by` int(11) DEFAULT NULL,
  `user_type` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `scan_records`
--

INSERT INTO `scan_records` (`id`, `patient_id`, `local_record_id`, `type`, `pay_status`, `status`, `dateTime`, `created_by`, `user_type`) VALUES
(1, 14, 1, 'scan', 'Paid', 'Active', '2024-08-19 15:15:00', 1, 'emp'),
(2, 9, 2, 'scan', 'Paid', 'Active', '2024-08-19 15:16:01', 1, 'emp'),
(3, 13, 3, 'scan', 'Paid', 'Active', '2024-08-19 15:28:29', 1, 'emp'),
(4, 5, 1, 'scan', 'Paid', 'Active', '2024-10-05 11:26:56', 1, 'emp'),
(5, 14, 2, 'scan', 'Paid', 'Active', '2024-10-05 11:29:32', 1, 'emp'),
(6, 22, 3, 'scan', 'Paid', 'Active', '2024-10-05 11:29:59', 1, 'emp'),
(7, 25, 4, 'scan', 'Paid', 'Active', '2024-10-05 11:30:39', 1, 'emp');

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

--
-- Table structure for table `scan_transaction_history`
--

CREATE TABLE `scan_transaction_history` (
  `id` int(11) NOT NULL,
  `patient_id` int(11) NOT NULL,
  `record_id` int(11) NOT NULL,
  `amount` decimal(11,2) NOT NULL,
  `status` varchar(30) DEFAULT NULL,
  `dateTime` datetime DEFAULT NULL,
  `type` varchar(40) DEFAULT NULL,
  `created_by` int(11) NOT NULL,
  `user_type` varchar(50) NOT NULL,
  `mop` varchar(100) DEFAULT NULL,
  `trans_id` varchar(100) DEFAULT NULL,
  `remarks` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `scan_transaction_history`
--

INSERT INTO `scan_transaction_history` (`id`, `patient_id`, `record_id`, `amount`, `status`, `dateTime`, `type`, `created_by`, `user_type`, `mop`, `trans_id`, `remarks`) VALUES
(1, 14, 1, 1500.00, 'Active', '2024-08-19 15:15:00', NULL, 1, 'emp', 'Cash', '', NULL),
(2, 9, 2, 1500.00, 'Active', '2024-08-19 15:16:01', NULL, 1, 'emp', 'Cash', '', NULL),
(3, 13, 3, 6000.00, 'Active', '2024-08-19 15:28:29', NULL, 1, 'emp', 'Cash', '', NULL),
(4, 5, 1, 5000.00, 'Active', '2024-10-05 11:26:56', NULL, 1, 'emp', 'Cash', '', NULL),
(5, 14, 2, 5000.00, 'Active', '2024-10-05 11:29:32', NULL, 1, 'emp', 'Cash', '', NULL),
(6, 22, 3, 500.00, 'Active', '2024-10-05 11:29:59', NULL, 1, 'emp', 'Cash', '', NULL),
(7, 25, 4, 1000.00, 'Active', '2024-10-05 11:30:39', NULL, 1, 'emp', 'Cash', '', NULL);

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

--
-- Table structure for table `tablet_data`
--

CREATE TABLE `tablet_data` (
  `id` int(5) NOT NULL,
  `company_id` int(5) NOT NULL,
  `formula_id` int(5) NOT NULL,
  `tablet_name` varchar(200) NOT NULL,
  `type` varchar(50) NOT NULL,
  `hsn` varchar(100) NOT NULL,
  `tax` int(30) NOT NULL,
  `status` varchar(50) NOT NULL,
  `dateTime` datetime NOT NULL,
  `created_by` int(11) NOT NULL,
  `user_type` varchar(50) NOT NULL,
  `generic` varchar(200) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `tablet_data`
--

INSERT INTO `tablet_data` (`id`, `company_id`, `formula_id`, `tablet_name`, `type`, `hsn`, `tax`, `status`, `dateTime`, `created_by`, `user_type`, `generic`) VALUES
(1, 1, 1, 'T1', 'Tablets', '1010101', 10, 'Active', '2024-03-06 18:05:38', 1, 'doctor', 'gen1'),
(2, 2, 2, 'T2', 'Tablets', '21', 0, 'Active', '2024-03-08 12:34:40', 1, 'doctor', 'gen2'),
(3, 1, 1, 'Drip1', 'Drips', '1010101', 10, 'Active', '2024-03-06 18:05:38', 1, 'doctor', 'd1'),
(4, 2, 2, 'Drip2', 'Drips', '21', 0, 'Active', '2024-03-08 12:34:40', 1, 'doctor', 'd2'),
(7, 1, 1, 'drip3', 'Drips', '213', 5, 'Active', '2024-07-26 10:24:06', 0, '', 'drip3'),
(8, 1, 1, 'dripFour', 'Drips', '2321', 5, 'Active', '2024-08-09 11:13:59', 0, '', 'dripFour'),
(9, 1, 5, 'dowOne', 'Tablets', '111', 5, 'Active', '2024-09-04 20:08:25', 0, '', ''),
(10, 1, 1, 'MedTestOne', 'Tablets', '100', 5, 'Active', '2024-09-11 17:21:00', 0, '', 'MedTestOne'),
(11, 1, 5, 'medOne', 'Tablets', '010101', 5, 'Active', '2024-09-14 09:37:48', 0, '', ''),
(12, 1, 1, 'testMedOne', 'Tablets', '3123243', 5, 'Active', '2024-09-14 10:28:41', 0, '', ''),
(13, 2, 1, 'testONe', 'Tablets', '20011', 5, 'Active', '2024-09-19 10:03:52', 0, '', ''),
(14, 1, 6, 'MedicineTestOne', 'Tablets', '11110000111', 5, 'Active', '2024-09-24 16:26:17', 0, '', ''),
(15, 2, 3, 'mOne', 'Syrups', '23214', 5, 'Active', '2024-09-24 16:33:56', 0, '', '');

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

--
-- Table structure for table `tablet_dosage_price`
--

CREATE TABLE `tablet_dosage_price` (
  `id` int(11) NOT NULL,
  `tablet_id` int(11) NOT NULL,
  `dosage` varchar(100) NOT NULL,
  `price` int(30) NOT NULL,
  `offer` decimal(10,2) NOT NULL,
  `purchase_rate` decimal(10,2) NOT NULL,
  `mrp` decimal(10,2) DEFAULT NULL,
  `status` varchar(30) NOT NULL,
  `dateTime` datetime NOT NULL,
  `created_by` int(11) NOT NULL,
  `user_type` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `tablet_dosage_price`
--

INSERT INTO `tablet_dosage_price` (`id`, `tablet_id`, `dosage`, `price`, `offer`, `purchase_rate`, `mrp`, `status`, `dateTime`, `created_by`, `user_type`) VALUES
(1, 1, '100mg', 100, 0.00, 0.00, NULL, 'Active', '2024-03-06 18:05:38', 1, 'doctor'),
(2, 1, '200mg', 200, 0.00, 0.00, NULL, 'Active', '2024-03-06 18:05:38', 1, 'doctor'),
(3, 1, '300mg', 300, 0.00, 0.00, NULL, 'Active', '2024-03-06 18:05:38', 1, 'doctor'),
(4, 2, '100mg', 1000, 0.00, 0.00, NULL, 'Active', '2024-03-08 12:34:40', 1, 'doctor'),
(5, 2, '200mg', 2000, 0.00, 0.00, NULL, 'Active', '2024-03-08 12:34:40', 1, 'doctor'),
(6, 2, '500mg', 5000, 0.00, 0.00, NULL, 'Active', '2024-03-08 12:34:40', 1, 'doctor'),
(7, 5, '100ml', 100, 10.00, 90.00, NULL, 'Active', '2024-07-26 02:59:26', 0, ''),
(8, 5, '200ml', 200, 190.00, 200.00, NULL, 'Active', '2024-07-26 02:59:26', 0, ''),
(9, 7, '100ml', 110, 10.00, 100.00, NULL, 'Active', '2024-07-26 10:24:06', 0, ''),
(10, 7, '200ml', 210, 10.00, 200.00, NULL, 'Active', '2024-07-26 10:24:06', 0, ''),
(11, 7, '300ml', 310, 10.00, 300.00, NULL, 'Active', '2024-07-26 10:24:06', 0, ''),
(12, 8, '100ml', 100, 0.00, 0.00, 100.00, 'Active', '2024-08-09 11:13:59', 0, ''),
(13, 8, '500ml', 500, 0.00, 0.00, 500.00, 'Active', '2024-08-09 11:13:59', 0, ''),
(14, 9, '100', 100, 0.00, 0.00, 10.00, 'Active', '2024-09-04 20:08:25', 0, ''),
(15, 10, '100mg', 100, 0.00, 0.00, 100.00, 'Active', '2024-09-11 17:21:00', 0, ''),
(16, 11, '100mg', 5, 0.00, 0.00, 5.00, 'Active', '2024-09-14 09:37:48', 0, ''),
(17, 11, '200mg', 10, 0.00, 0.00, 10.00, 'Active', '2024-09-14 09:37:48', 0, ''),
(18, 12, '100mg', 5, 0.00, 0.00, 5.00, 'Active', '2024-09-14 10:28:41', 0, ''),
(19, 13, '100mg', 100, 0.00, 0.00, 100.00, 'Active', '2024-09-19 10:03:52', 0, ''),
(20, 13, '200mg', 200, 0.00, 0.00, 200.00, 'Active', '2024-09-19 10:03:52', 0, ''),
(21, 14, '100mg', 100, 0.00, 0.00, 100.00, 'Active', '2024-09-24 16:26:17', 0, ''),
(22, 15, '100mg', 100, 0.00, 0.00, 100.00, 'Active', '2024-09-24 16:33:56', 0, ''),
(23, 15, '200mg', 200, 0.00, 0.00, 200.00, 'Active', '2024-09-24 16:33:56', 0, '');

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

--
-- Table structure for table `tablet_from_agency`
--

CREATE TABLE `tablet_from_agency` (
  `id` int(11) NOT NULL,
  `agency_id` int(11) NOT NULL,
  `tablet_id` int(11) NOT NULL,
  `status` varchar(30) NOT NULL,
  `date_time` datetime NOT NULL,
  `created_by` int(11) NOT NULL,
  `user_type` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `temp_bill_no`
--

CREATE TABLE `temp_bill_no` (
  `id` int(11) NOT NULL,
  `no` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `temp_bill_no`
--

INSERT INTO `temp_bill_no` (`id`, `no`) VALUES
(1, 261);

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

--
-- Table structure for table `temp_mrd_no`
--

CREATE TABLE `temp_mrd_no` (
  `id` int(11) NOT NULL,
  `no` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `temp_receipt_no`
--

CREATE TABLE `temp_receipt_no` (
  `id` int(11) NOT NULL,
  `no` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `temp_receipt_no`
--

INSERT INTO `temp_receipt_no` (`id`, `no`) VALUES
(1, 15);

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

--
-- Table structure for table `temp_token_no`
--

CREATE TABLE `temp_token_no` (
  `id` int(5) NOT NULL,
  `record_name` varchar(50) NOT NULL,
  `no` int(5) NOT NULL,
  `created_by` int(11) NOT NULL,
  `user_type` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `temp_token_no`
--

INSERT INTO `temp_token_no` (`id`, `record_name`, `no`, `created_by`, `user_type`) VALUES
(1, 'OP ENTRY', 196, 0, '');

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

--
-- Table structure for table `transaction_history`
--

CREATE TABLE `transaction_history` (
  `id` int(11) NOT NULL,
  `patient_id` int(11) NOT NULL,
  `record_id` int(11) NOT NULL,
  `amount` decimal(11,2) NOT NULL,
  `type` varchar(50) DEFAULT NULL,
  `status` varchar(30) DEFAULT NULL,
  `mop` varchar(100) NOT NULL,
  `trans_id` varchar(255) NOT NULL,
  `remarks` text NOT NULL,
  `dateTime` datetime DEFAULT NULL,
  `transaction_history_id` int(11) DEFAULT NULL,
  `created_by` int(11) NOT NULL,
  `user_type` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `transaction_history`
--

INSERT INTO `transaction_history` (`id`, `patient_id`, `record_id`, `amount`, `type`, `status`, `mop`, `trans_id`, `remarks`, `dateTime`, `transaction_history_id`, `created_by`, `user_type`) VALUES
(1, 14, 1, 1500.00, 'scan', 'Active', 'Cash', '', '', '2024-08-19 15:15:00', 1, 1, 'emp'),
(2, 9, 2, 1500.00, 'scan', 'Active', 'Cash', '', '', '2024-08-19 15:16:01', 2, 1, 'emp'),
(3, 13, 3, 6000.00, 'scan', 'Active', 'Cash', '', '', '2024-08-19 15:28:29', 3, 1, 'emp'),
(4, 1, 5, 1100.00, 'op', 'Active', 'Cash', '', '', '2024-08-21 23:18:49', 1, 15, 'emp'),
(5, 1, 3, 100.00, 'op', 'Active', 'Cash', '', '', '2024-08-21 23:24:27', 2, 15, 'emp'),
(6, 6, 12, 1100.00, 'op', 'Active', 'Cash', '', '', '2024-08-24 09:24:41', 3, 13, 'emp'),
(7, 13, 11, 1100.00, 'op', 'Active', 'Cash', '', '', '2024-08-24 09:26:25', 4, 13, 'emp'),
(8, 12, 13, 100.00, 'op', 'Active', 'Cash', '', '', '2024-08-24 09:38:50', 5, 13, 'emp'),
(9, 16, 14, 100.00, 'op', 'Active', 'Cash', '', '', '2024-08-24 15:43:25', 6, 13, 'emp'),
(10, 1, 16, 100.00, 'op', 'Active', 'Cash', '', '', '2024-08-26 10:18:44', 8, 13, 'emp'),
(11, 5, 17, 100.00, 'op', 'Active', 'Cash', '', '', '2024-08-26 11:21:25', 10, 1, 'emp'),
(12, 1, 21, 100.00, 'op', 'Active', 'Cash', '', '', '2024-08-27 11:58:33', 11, 13, 'emp'),
(13, 1, 21, 100.00, 'op', 'Active', 'Cash', '', '', '2024-08-27 13:36:17', 13, 13, 'emp'),
(14, 13, 22, 100.00, 'op', 'Active', 'Cash', '', '', '2024-08-27 15:53:32', 15, 13, 'emp'),
(15, 5, 23, 10100.00, 'op', 'Active', 'Cash', '', '', '2024-08-27 15:53:47', 17, 13, 'emp'),
(16, 1, 1, 125000.00, 'ip', 'Active', 'Cash', '', 'xcx ', '2024-08-29 17:52:58', 1, 1, 'emp'),
(17, 11, 2, 3100.00, 'ip', 'Active', 'Cash', '', 'iupok', '2024-08-29 18:17:21', 2, 1, 'emp'),
(18, 1, 31, 100.00, 'op', 'Active', 'Cash', '', '', '2024-09-02 12:37:07', 19, 13, 'emp'),
(19, 1, 37, 100.00, 'op', 'Active', 'Cash', '', '', '2024-09-03 11:50:40', 21, 13, 'emp'),
(20, 6, 4, 59040.00, 'ip', 'Active', 'Cash', '', 'do', '2024-09-03 14:50:15', 3, 1, 'emp'),
(21, 7, 42, 1100.00, 'op', 'Active', 'Cash', '', '', '2024-09-03 23:07:48', 23, 13, 'emp'),
(22, 5, 43, 100.00, 'op', 'Active', 'Cash', '', '', '2024-09-03 23:09:26', 25, 1, 'emp'),
(23, 9, 9, 9120.00, 'ip', 'Active', 'Cash', '', 'remarks', '2024-09-03 23:25:52', 4, 1, 'emp'),
(24, 2, 7, 100.00, 'advance', 'Active', 'Cash', 'undefined', 'rem', '2024-09-03 23:28:00', 2, 1, 'emp'),
(25, 17, 45, 100.00, 'op', 'Active', 'Cash', '', '', '2024-09-04 11:34:29', 27, 13, 'emp'),
(26, 3, 47, 100.00, 'op', 'Active', 'Cash', '', '', '2024-09-04 11:53:20', 29, 1, 'emp'),
(27, 3, 48, 100.00, 'op', 'Active', 'Cash', '', '', '2024-09-04 14:53:32', 30, 1, 'emp'),
(28, 2, 7, 31520.00, 'ip', 'Active', 'Cash', '', 'dv', '2024-09-05 10:06:05', 6, 1, 'emp'),
(29, 12, 53, 100.00, 'op', 'Active', 'Cash', '', '', '2024-09-17 09:59:24', 32, 13, 'emp'),
(30, 16, 54, 100.00, 'op', 'Active', 'Cash', '', '', '2024-09-17 10:05:56', 34, 13, 'emp'),
(31, 8, 55, 100.00, 'op', 'Active', 'Cash', '', '', '2024-09-17 10:16:05', 35, 13, 'emp'),
(32, 5, 57, 100.00, 'op', 'Active', 'Cash', '', '', '2024-09-20 16:26:59', 37, 15, 'emp'),
(33, 5, 2, 100.00, 'op', 'Active', 'Cash', '', '', '2024-09-21 11:42:45', 1, 15, 'emp'),
(34, 16, 3, 156640.00, 'ip', 'Active', 'Cash', '', 'v', '2024-10-03 14:38:50', 2, 1, 'emp'),
(35, 21, 9, 3120.00, 'ip', 'Active', 'Cash', '', 'xc', '2024-10-03 14:44:31', 3, 1, 'emp'),
(36, 25, 8, 4000.00, 'ip', 'Active', 'Cash', '', 'xcx\r\n', '2024-10-03 14:44:45', 4, 1, 'emp'),
(37, 6, 4, 106420.00, 'ip', 'Active', 'Cash', '', 'SAF', '2024-10-03 14:44:58', 5, 1, 'emp'),
(38, 19, 6, 52000.00, 'ip', 'Active', 'Cash', '', 'XZVB', '2024-10-03 14:45:13', 6, 1, 'emp'),
(39, 23, 28, 100.00, 'op', 'Active', 'Cash', '', '', '2024-10-04 12:39:38', 7, 13, 'emp'),
(40, 23, 29, 100.00, 'op', 'Active', 'Cash', '', '', '2024-10-04 12:45:59', 8, 1, 'emp'),
(41, 16, 30, 100.00, 'op', 'Active', 'Cash', '', '', '2024-10-04 13:25:47', 9, 13, 'emp'),
(42, 5, 1, 5000.00, 'scan', 'Active', 'Cash', '', '', '2024-10-05 11:26:56', 4, 1, 'emp'),
(43, 14, 2, 5000.00, 'scan', 'Active', 'Cash', '', '', '2024-10-05 11:29:32', 5, 1, 'emp'),
(44, 22, 3, 500.00, 'scan', 'Active', 'Cash', '', '', '2024-10-05 11:29:59', 6, 1, 'emp'),
(45, 25, 4, 1000.00, 'scan', 'Active', 'Cash', '', '', '2024-10-05 11:30:39', 7, 1, 'emp');

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

--
-- Table structure for table `unassigned_patients`
--

CREATE TABLE `unassigned_patients` (
  `id` int(11) NOT NULL,
  `doctor_id` int(11) DEFAULT NULL,
  `patient_id` int(11) DEFAULT NULL,
  `patient_record_id` int(11) DEFAULT NULL,
  `transfer_to` varchar(50) NOT NULL,
  `transfer_status` varchar(50) DEFAULT NULL,
  `status` varchar(30) DEFAULT NULL,
  `dateTime` datetime DEFAULT NULL,
  `created_by` int(11) NOT NULL,
  `user_type` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `unassigned_patients`
--

INSERT INTO `unassigned_patients` (`id`, `doctor_id`, `patient_id`, `patient_record_id`, `transfer_to`, `transfer_status`, `status`, `dateTime`, `created_by`, `user_type`) VALUES
(1, 1, 1, 1, 'ip', 'assigned', 'Active', '2024-08-19 13:32:33', 1, 'doctor'),
(2, 1, 1, 3, 'ip', 'assigned', 'cancelled', '2024-08-19 17:31:06', 1, 'doctor'),
(3, 1, 1, 5, 'ip', 'canceled', 'cancelled', '2024-08-21 12:11:32', 1, 'doctor'),
(4, 1, 11, 25, 'ip', 'assigned', 'Active', '2024-08-29 17:58:07', 1, 'doctor'),
(5, 1, 14, 26, 'ip', 'assigned', 'Active', '2024-08-29 18:30:23', 1, 'doctor'),
(6, 1, 6, 27, 'ip', 'assigned', 'Active', '2024-08-30 08:27:35', 1, 'doctor'),
(7, 1, 5, 32, 'observation', 'assigned', 'Active', '2024-09-02 10:59:40', 1, 'doctor'),
(8, 1, 6, 38, 'ip', 'unassigned', 'cancelled', '2024-09-03 12:25:14', 1, 'doctor'),
(9, 1, 6, 39, 'observation', 'assigned', 'Active', '2024-09-03 12:31:46', 1, 'doctor'),
(10, 1, 2, 40, 'ip', 'assigned', 'Active', '2024-09-03 12:52:56', 1, 'doctor'),
(11, 1, 15, 41, 'observation', 'assigned', 'Active', '2024-09-03 12:55:19', 1, 'doctor'),
(12, 1, 9, 44, 'ip', 'assigned', 'Active', '2024-09-03 23:17:04', 1, 'doctor'),
(13, 1, 5, 49, 'ip', 'assigned', 'cancelled', '2024-09-05 09:43:05', 1, 'doctor'),
(14, 1, 16, 56, 'ip', 'assigned', 'Active', '2024-09-17 12:15:17', 1, 'doctor'),
(15, 1, 5, 57, 'observation', 'canceled', 'cancelled', '2024-09-17 12:15:28', 1, 'doctor'),
(16, 1, 6, 1, 'ip', 'assigned', 'Active', '2024-09-21 11:35:00', 1, 'doctor'),
(17, 1, 5, 2, 'ip', 'canceled', 'Active', '2024-09-21 11:42:29', 1, 'doctor'),
(18, 1, 1, 3, 'observation', 'assigned', 'Active', '2024-09-21 11:46:05', 1, 'doctor'),
(19, 1, 16, 4, 'ip', 'assigned', 'Active', '2024-09-21 12:51:29', 1, 'doctor'),
(20, 1, 6, 9, 'ip', 'assigned', 'Active', '2024-09-24 22:53:07', 1, 'doctor'),
(21, 1, 12, 10, 'observation', 'assigned', 'Active', '2024-09-24 22:53:19', 1, 'doctor'),
(22, 1, 19, 19, 'ip', 'assigned', 'Active', '2024-09-30 10:36:33', 1, 'doctor'),
(23, 1, 20, 20, 'observation', 'assigned', 'Active', '2024-09-30 10:37:16', 1, 'doctor'),
(24, 1, 21, 21, 'ip', 'assigned', 'Active', '2024-09-30 11:47:00', 1, 'doctor'),
(25, 1, 25, 26, 'ip', 'assigned', 'Active', '2024-10-03 14:35:55', 1, 'doctor'),
(26, 1, 26, 27, 'ip', 'assigned', 'Active', '2024-10-03 14:43:20', 1, 'doctor');

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

--
-- Table structure for table `ward_manager_floor_data`
--

CREATE TABLE `ward_manager_floor_data` (
  `id` int(11) NOT NULL,
  `employee_data_id` int(11) NOT NULL,
  `floor_id` int(11) NOT NULL,
  `status` varchar(255) NOT NULL,
  `dateTime` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `ward_manager_floor_data`
--

INSERT INTO `ward_manager_floor_data` (`id`, `employee_data_id`, `floor_id`, `status`, `dateTime`) VALUES
(1, 15, 1, 'Active', '2024-08-10 16:58:57');

--
-- Indexes for dumped tables
--

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

--
-- Indexes for table `request_contents`
--
ALTER TABLE `request_contents`
  ADD PRIMARY KEY (`id`),
  ADD KEY `requestBatchId` (`requestBatchId`);

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

--
-- AUTO_INCREMENT for dumped tables
--

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

--
-- Constraints for dumped tables
--

--
-- Constraints for table `request_contents`
--
ALTER TABLE `request_contents`
  ADD CONSTRAINT `request_contents_ibfk_1` FOREIGN KEY (`requestBatchId`) REFERENCES `request_batch` (`id`);
COMMIT;

