-- Table structure for table `medication_report`
--

CREATE TABLE `medication_report` (
  `id` int NOT NULL AUTO_INCREMENT,
  `medicine_dosage_id` int DEFAULT NULL,
  `pharmacy_id` int DEFAULT NULL,
  `opd_details_id` int DEFAULT NULL,
  `ipd_id` int DEFAULT NULL,
  `date` date NOT NULL,
  `time` time NOT NULL,
  `remark` text,
  `generated_by` int DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `generated_by` (`generated_by`),
  KEY `pharmacy_id` (`pharmacy_id`),
  KEY `ipd_id` (`ipd_id`),
  KEY `medicine_dosage_id` (`medicine_dosage_id`),
  KEY `opd_details_id` (`opd_details_id`),
  KEY `index_date` (`date`),
  KEY `index_time` (`time`),
  CONSTRAINT `medication_report_ibfk_1` FOREIGN KEY (`generated_by`) REFERENCES `staff` (`id`) ON DELETE CASCADE,
  CONSTRAINT `medication_report_ibfk_2` FOREIGN KEY (`pharmacy_id`) REFERENCES `pharmacy` (`id`) ON DELETE CASCADE,
  CONSTRAINT `medication_report_ibfk_3` FOREIGN KEY (`ipd_id`) REFERENCES `ipd_details` (`id`) ON DELETE CASCADE,
  CONSTRAINT `medication_report_ibfk_4` FOREIGN KEY (`medicine_dosage_id`) REFERENCES `medicine_dosage` (`id`) ON DELETE CASCADE,
  CONSTRAINT `medication_report_ibfk_5` FOREIGN KEY (`opd_details_id`) REFERENCES `opd_details` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `medication_report`
--


--
-- Table structure for table `medicine_bad_stock`
--

CREATE TABLE `medicine_bad_stock` (
  `id` int NOT NULL AUTO_INCREMENT,
  `medicine_batch_details_id` int DEFAULT NULL,
  `pharmacy_id` int DEFAULT NULL,
  `outward_date` date NOT NULL,
  `expiry_date` date NOT NULL,
  `batch_no` varchar(100) NOT NULL,
  `quantity` varchar(20) NOT NULL,
  `note` text,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `pharmacy_id` (`pharmacy_id`),
  KEY `medicine_batch_details_id` (`medicine_batch_details_id`),
  KEY `index_outward_date` (`outward_date`),
  KEY `index_expiry_date` (`expiry_date`),
  KEY `index_batch_no` (`batch_no`),
  KEY `index_quantity` (`quantity`),
  CONSTRAINT `medicine_bad_stock_ibfk_1` FOREIGN KEY (`pharmacy_id`) REFERENCES `pharmacy` (`id`) ON DELETE CASCADE,
  CONSTRAINT `medicine_bad_stock_ibfk_2` FOREIGN KEY (`medicine_batch_details_id`) REFERENCES `medicine_batch_details` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `medicine_bad_stock`
--


--
-- Table structure for table `medicine_batch_details`
--

CREATE TABLE `medicine_batch_details` (
  `id` int NOT NULL AUTO_INCREMENT,
  `supplier_bill_basic_id` int DEFAULT NULL,
  `pharmacy_id` int DEFAULT NULL,
  `inward_date` datetime NOT NULL,
  `expiry` date NOT NULL,
  `batch_no` varchar(100) NOT NULL,
  `packing_qty` varchar(100) NOT NULL,
  `purchase_rate_packing` varchar(100) NOT NULL,
  `quantity` varchar(200) NOT NULL,
  `mrp` float(10,2) DEFAULT '0.00',
  `purchase_price` float(10,2) DEFAULT '0.00',
  `tax` float(10,2) DEFAULT '0.00',
  `sale_rate` float(10,2) DEFAULT '0.00',
  `batch_amount` float(10,2) DEFAULT '0.00',
  `amount` float(10,2) DEFAULT '0.00',
  `available_quantity` int DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `supplier_bill_basic_id` (`supplier_bill_basic_id`),
  KEY `pharmacy_id` (`pharmacy_id`),
  KEY `index_inward_date` (`inward_date`),
  KEY `index_expiry` (`expiry`),
  KEY `index_batch_no` (`batch_no`),
  KEY `index_packing_qty` (`packing_qty`),
  KEY `index_purchase_rate_packing` (`purchase_rate_packing`),
  KEY `index_quantity` (`quantity`),
  KEY `index_mrp` (`mrp`),
  KEY `index_purchase_price` (`purchase_price`),
  KEY `index_tax` (`tax`),
  KEY `index_sale_rate` (`sale_rate`),
  KEY `index_batch_amount` (`batch_amount`),
  KEY `index_amount` (`amount`),
  KEY `index_available_quantity` (`available_quantity`),
  CONSTRAINT `medicine_batch_details_ibfk_1` FOREIGN KEY (`supplier_bill_basic_id`) REFERENCES `supplier_bill_basic` (`id`) ON DELETE CASCADE,
  CONSTRAINT `medicine_batch_details_ibfk_2` FOREIGN KEY (`pharmacy_id`) REFERENCES `pharmacy` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `medicine_batch_details`
--

INSERT INTO `medicine_batch_details` VALUES (1,1,1,'2026-03-18 14:50:00','2026-12-31','11','','','100',10.00,11.00,0.00,12.00,0.00,1100.00,100,'2026-03-18 09:50:49','2026-03-18 09:50:49');

--
-- Table structure for table `medicine_category`
--

CREATE TABLE `medicine_category` (
  `id` int NOT NULL AUTO_INCREMENT,
  `medicine_category` varchar(50) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `index_medicine_category` (`medicine_category`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `medicine_category`
--

INSERT INTO `medicine_category` VALUES (1,'Tablet','2026-03-18 09:44:26','2026-03-18 09:44:26');

--
-- Table structure for table `medicine_dosage`
--

CREATE TABLE `medicine_dosage` (
  `id` int NOT NULL AUTO_INCREMENT,
  `medicine_category_id` int DEFAULT NULL,
  `dosage` varchar(100) NOT NULL,
  `units_id` int DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `medicine_category_id` (`medicine_category_id`),
  KEY `charge_units_id` (`units_id`),
  KEY `index_dosage` (`dosage`),
  CONSTRAINT `medicine_dosage_ibfk_1` FOREIGN KEY (`medicine_category_id`) REFERENCES `medicine_category` (`id`) ON DELETE CASCADE,
  CONSTRAINT `medicine_dosage_ibfk_2` FOREIGN KEY (`units_id`) REFERENCES `unit` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `medicine_dosage`
--


--
-- Table structure for table `medicine_group`
--

CREATE TABLE `medicine_group` (
  `id` int NOT NULL AUTO_INCREMENT,
  `group_name` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `index_group_name` (`group_name`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `medicine_group`
--

INSERT INTO `medicine_group` VALUES (1,'GSK','2026-03-18 09:45:04','2026-03-18 09:45:04');

--
-- Table structure for table `medicine_supplier`
--

CREATE TABLE `medicine_supplier` (
  `id` int NOT NULL AUTO_INCREMENT,
  `supplier` varchar(200) NOT NULL,
  `contact` varchar(200) NOT NULL,
  `supplier_person` varchar(200) NOT NULL,
  `supplier_person_contact` varchar(200) NOT NULL,
  `supplier_drug_licence` varchar(200) NOT NULL,
  `address` varchar(200) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `index_supplier` (`supplier`),
  KEY `index_contact` (`contact`),
  KEY `index_supplier_person` (`supplier_person`),
  KEY `index_supplier_person_contact` (`supplier_person_contact`),
  KEY `index_supplier_drug_licence` (`supplier_drug_licence`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `medicine_supplier`
--

INSERT INTO `medicine_supplier` VALUES (1,'Babar Medical Company','92000','Imtiaz','','','','2026-03-18 09:50:04','2026-03-18 09:50:04');

--
-- Table structure for table `messages`
--

CREATE TABLE `messages` (
  `id` int NOT NULL AUTO_INCREMENT,
  `title` varchar(200) DEFAULT NULL,
  `template_id` varchar(100) NOT NULL,
  `message` text,
  `send_mail` varchar(10) DEFAULT '0',
  `send_sms` varchar(10) DEFAULT '0',
  `is_group` varchar(10) DEFAULT '0',
  `is_individual` varchar(10) DEFAULT '0',
  `file` varchar(200) NOT NULL,
  `group_list` text,
  `user_list` text,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `index_title` (`title`),
  KEY `index_send_mail` (`send_mail`),
  KEY `index_send_sms` (`send_sms`),
  KEY `index_is_group` (`is_group`),
  KEY `index_is_individual` (`is_individual`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `messages`
--


--
-- Table structure for table `migrations`
--

CREATE TABLE `migrations` (
  `version` bigint NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `migrations`
--


--
-- Table structure for table `notification_roles`
--

CREATE TABLE `notification_roles` (
  `id` int NOT NULL AUTO_INCREMENT,
  `send_notification_id` int DEFAULT NULL,
  `role_id` int DEFAULT NULL,
  `is_active` int DEFAULT '0',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `send_notification_id` (`send_notification_id`),
  KEY `role_id` (`role_id`),
  CONSTRAINT `notification_roles_ibfk_1` FOREIGN KEY (`send_notification_id`) REFERENCES `send_notification` (`id`) ON DELETE CASCADE,
  CONSTRAINT `notification_roles_ibfk_2` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `notification_roles`
--


--
-- Table structure for table `notification_setting`
--

CREATE TABLE `notification_setting` (
  `id` int NOT NULL AUTO_INCREMENT,
  `type` varchar(100) DEFAULT NULL,
  `is_mail` int DEFAULT '0',
  `is_sms` int DEFAULT '0',
  `is_mobileapp` int NOT NULL,
  `is_notification` int NOT NULL,
  `display_notification` int NOT NULL,
  `display_sms` int NOT NULL,
  `template` longtext,
  `template_id` varchar(100) NOT NULL,
  `subject` text,
  `variables` text,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `index_type` (`type`),
  KEY `index_is_mail` (`is_mail`),
  KEY `index_is_sms` (`is_sms`),
  KEY `index_is_mobileapp` (`is_mobileapp`),
  KEY `index_is_notification` (`is_notification`),
  KEY `index_display_notification` (`display_notification`),
  KEY `index_display_sms` (`display_sms`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `notification_setting`
--

INSERT INTO `notification_setting` VALUES (1,'opd_patient_registration',1,0,0,0,1,1,'Dear {{patient_name}} your OPD Registration at Smart Hospital is successful on date {{appointment_date}} with Patient Id {{patient_id}} and OPD No {{opdno}}','','OPD Patient','{{patient_name}} {{appointment_date}} {{patient_id}} {{opdno}}','2021-10-22 05:57:53','2025-05-10 05:52:25'),(2,'ipd_patient_registration',1,0,0,0,1,1,'Dear {{patient_name}} your IPD Registration at Smart Hospital is successful  with Patient Id {{patient_id}} and IPD No {{ipd_no}}','','IPD Patient Registration','{{patient_name}} {{patient_id}} {{ipd_no}}','2021-10-22 05:59:33','2025-05-10 05:52:25'),(3,'ipd_patient_discharged',1,0,0,0,1,1,'IPD Patient {{patient_name}} is now discharged from Smart Hospital\nTotal bill amount is {{currency_symbol}}{{total_amount}}\nTotal paid amount is {{currency_symbol}}{{paid_amount}}\nTotal balance bill amount is {{currency_symbol}}{{balance_amount}}','','IPD Patient Discharge','{{patient_name}} {{currency_symbol}} {{total_amount}} {{paid_amount}} {balance_amount}}','2021-10-25 02:32:35','2025-05-10 05:52:25'),(5,'login_credential',1,0,0,0,0,1,'Hello {{display_name}} your Smart Hospital login details are Url: {{url}} Username: {{username}} Password: {{password}}','','Smart Hospital Login Credential','{{display_name}} {{url}} {{username}} {{password}}','2021-10-22 06:18:21','2025-05-10 05:52:25'),(6,'appointment_approved',1,0,0,0,1,1,'Dear {{patient_name}} your appointment with {{staff_name}} {{staff_surname}} is confirmed on {{date}} with appointment no: {{appointment_no}}','','Appointment Approved','{{patient_name}} {{staff_name}}\n{{staff_surname}}  {{date}} {{appointment_no}}','2021-10-22 23:56:24','2025-05-10 05:52:25'),(7,'live_meeting',1,0,0,0,0,1,'Dear staff, your live meeting {{title}} has been scheduled on {{date}} for the duration of {{duration}} minute.','','Live Meeting','{{title}} {{date}} {{duration}}','2021-10-22 23:54:58','2025-05-10 05:52:25'),(8,'live_consult',1,0,0,0,1,1,'Dear patient, your live consultation {{title}} has been scheduled on {{date}} for the duration of {{duration}} minute.','','Live Consultation','{{title}} {{date}} {{duration}}','2021-10-22 06:28:26','2025-05-10 05:52:25'),(9,'opd_patient_discharged',1,0,0,0,1,1,'OPD No {{opd_no}}  {{patient_name}} is now discharged from Smart Hospital.\r\n\r\nTotal bill amount was {{currency_symbol}}  {{total_amount}} \r\nTotal paid amount was {{currency_symbol}}{{paid_amount}}  \r\nTotal balance amount is {{currency_symbol}}{{balance_amount}}','','OPD Patient Discharged','{{patient_name}} {{mobileno}} {{email}} {{dob}} {{gender}} {{patient_unique_id}} {{opd_no}}{{currency_symbol}} {{billing_amount}}','2021-10-22 06:25:06','2025-05-10 05:52:25'),(10,'forgot_password',1,0,0,0,0,0,'Dear  {{display_name}}, recently a request was submitted to reset password for your account with email: {{email}}. If you didn\'t make the request, just ignore this email, otherwise you can reset your password using this link <a href=\'{{resetpasslink}}\'>click here to reset your password</a>, if you\'re having trouble clicking the password reset link, copy and paste below URL  into your web browser. {{resetpasslink}} <br> Regards,  <br>\r\nSmart Hospital','','Reset Password Request','{{display_name}}  {{email}}  {{resetpasslink}','2021-10-22 06:34:34','2025-05-10 05:52:25');

--
-- Table structure for table `nurse_note`
--

CREATE TABLE `nurse_note` (
  `id` int NOT NULL AUTO_INCREMENT,
  `date` datetime NOT NULL,
  `ipd_id` int DEFAULT NULL,
  `staff_id` int DEFAULT NULL,
  `note` text CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci,
  `comment` text,
  `created_by` int NOT NULL,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `ipd_id` (`ipd_id`),
  KEY `staff_id` (`staff_id`),
  KEY `index_date` (`date`),
  KEY `nurse_note_ibfk_3` (`created_by`),
  CONSTRAINT `nurse_note_ibfk_1` FOREIGN KEY (`ipd_id`) REFERENCES `ipd_details` (`id`) ON DELETE CASCADE,
  CONSTRAINT `nurse_note_ibfk_2` FOREIGN KEY (`staff_id`) REFERENCES `staff` (`id`) ON DELETE CASCADE,
  CONSTRAINT `nurse_note_ibfk_3` FOREIGN KEY (`created_by`) REFERENCES `staff` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `nurse_note`
--


--
-- Table structure for table `nurse_notes_comment`
--

CREATE TABLE `nurse_notes_comment` (
  `id` int NOT NULL AUTO_INCREMENT,
  `nurse_note_id` int DEFAULT NULL,
  `comment_staffid` int DEFAULT NULL,
  `comment_staff` text,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `nurse_note_id` (`nurse_note_id`),
  KEY `comment_staffid` (`comment_staffid`),
  CONSTRAINT `nurse_notes_comment_ibfk_1` FOREIGN KEY (`nurse_note_id`) REFERENCES `nurse_note` (`id`) ON DELETE CASCADE,
  CONSTRAINT `nurse_notes_comment_ibfk_2` FOREIGN KEY (`comment_staffid`) REFERENCES `staff` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `nurse_notes_comment`
--


--
-- Table structure for table `obstetric_history`
--

CREATE TABLE `obstetric_history` (
  `id` int NOT NULL AUTO_INCREMENT,
  `patient_id` int NOT NULL,
  `place_of_delivery` varchar(250) NOT NULL,
  `pregnancy_duration` varchar(250) NOT NULL,
  `pregnancy_complications` varchar(250) NOT NULL,
  `birth_weight` varchar(250) NOT NULL,
  `gender` varchar(100) NOT NULL,
  `infant_feeding` varchar(250) NOT NULL,
  `alive_dead` varchar(50) NOT NULL,
  `date` date DEFAULT NULL,
  `death_cause` varchar(250) NOT NULL,
  `previous_medical_history` text NOT NULL,
  `special_instruction` text NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `index_place_of_delivery` (`place_of_delivery`),
  KEY `index_pregnancy_duration` (`pregnancy_duration`),
  KEY `index_pregnancy_complications` (`pregnancy_complications`),
  KEY `index_birth_weight` (`birth_weight`),
  KEY `index_gender` (`gender`),
  KEY `index_infant_feeding` (`infant_feeding`),
  KEY `index_alive_dead` (`alive_dead`),
  KEY `index_date` (`date`),
  KEY `index_death_cause` (`death_cause`) USING BTREE,
  KEY `patient_id` (`patient_id`),
  CONSTRAINT `obstetric_history_ibfk_1` FOREIGN KEY (`patient_id`) REFERENCES `patients` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `obstetric_history`
--


--
-- Table structure for table `opd_details`
--

CREATE TABLE `opd_details` (
  `id` int NOT NULL AUTO_INCREMENT,
  `case_reference_id` int DEFAULT NULL,
  `patient_id` int DEFAULT NULL,
  `generated_by` int DEFAULT NULL,
  `is_ipd_moved` int NOT NULL DEFAULT '0',
  `discharged` varchar(10) NOT NULL DEFAULT 'no',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `patient_id` (`patient_id`),
  KEY `case_reference_id` (`case_reference_id`),
  KEY `generated_by` (`generated_by`),
  CONSTRAINT `opd_details_ibfk_1` FOREIGN KEY (`patient_id`) REFERENCES `patients` (`id`) ON DELETE CASCADE,
  CONSTRAINT `opd_details_ibfk_2` FOREIGN KEY (`case_reference_id`) REFERENCES `case_references` (`id`) ON DELETE CASCADE,
  CONSTRAINT `opd_details_ibfk_3` FOREIGN KEY (`generated_by`) REFERENCES `staff` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `opd_details`
--

INSERT INTO `opd_details` VALUES (1,1,103,1,0,'no','2026-03-18 09:26:20','2026-03-18 09:26:20'),(2,2,105,1,0,'no','2026-03-18 09:57:12','2026-03-18 09:57:12'),(3,3,104,1,0,'no','2026-03-19 11:40:55','2026-03-19 11:40:55'),(4,4,104,1,0,'no','2026-03-19 11:46:20','2026-03-19 11:46:20');

--
-- Table structure for table `operation`
--

CREATE TABLE `operation` (
  `id` int NOT NULL AUTO_INCREMENT,
  `operation` varchar(250) NOT NULL,
  `category_id` int DEFAULT NULL,
  `is_active` varchar(10) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `category_id` (`category_id`),
  KEY `index_operation` (`operation`),
  CONSTRAINT `operation_ibfk_1` FOREIGN KEY (`category_id`) REFERENCES `operation_category` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `operation`
--


--
-- Table structure for table `operation_category`
--

CREATE TABLE `operation_category` (
  `id` int NOT NULL AUTO_INCREMENT,
  `category` varchar(250) NOT NULL,
  `is_active` varchar(10) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `index_category` (`category`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `operation_category`
--


--
-- Table structure for table `operation_theatre`
--

CREATE TABLE `operation_theatre` (
  `id` int NOT NULL AUTO_INCREMENT,
  `opd_details_id` int DEFAULT NULL,
  `ipd_details_id` int DEFAULT NULL,
  `customer_type` varchar(50) DEFAULT NULL,
  `operation_id` int NOT NULL,
  `date` datetime DEFAULT NULL,
  `operation_type` varchar(100) DEFAULT NULL,
  `consultant_doctor` int DEFAULT NULL,
  `ass_consultant_1` varchar(50) DEFAULT NULL,
  `ass_consultant_2` varchar(50) DEFAULT NULL,
  `anesthetist` varchar(50) DEFAULT NULL,
  `anaethesia_type` varchar(50) DEFAULT NULL,
  `ot_technician` varchar(100) DEFAULT NULL,
  `ot_assistant` varchar(100) DEFAULT NULL,
  `result` text,
  `remark` text,
  `generated_by` int DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `opd_details_id` (`opd_details_id`),
  KEY `ipd_details_id` (`ipd_details_id`),
  KEY `consultant_doctor` (`consultant_doctor`),
  KEY `generated_by` (`generated_by`),
  KEY `operation_id` (`operation_id`),
  KEY `index_date` (`date`),
  CONSTRAINT `operation_theatre_ibfk_1` FOREIGN KEY (`opd_details_id`) REFERENCES `opd_details` (`id`) ON DELETE CASCADE,
  CONSTRAINT `operation_theatre_ibfk_2` FOREIGN KEY (`ipd_details_id`) REFERENCES `ipd_details` (`id`) ON DELETE CASCADE,
  CONSTRAINT `operation_theatre_ibfk_3` FOREIGN KEY (`consultant_doctor`) REFERENCES `staff` (`id`) ON DELETE CASCADE,
  CONSTRAINT `operation_theatre_ibfk_4` FOREIGN KEY (`generated_by`) REFERENCES `staff` (`id`) ON DELETE CASCADE,
  CONSTRAINT `operation_theatre_ibfk_5` FOREIGN KEY (`operation_id`) REFERENCES `operation` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `operation_theatre`
--


--
-- Table structure for table `organisation`
--

CREATE TABLE `organisation` (
  `id` int NOT NULL AUTO_INCREMENT,
  `organisation_name` varchar(200) NOT NULL,
  `code` varchar(50) NOT NULL,
  `contact_no` varchar(20) NOT NULL,
  `address` varchar(300) NOT NULL,
  `contact_person_name` varchar(200) NOT NULL,
  `contact_person_phone` varchar(20) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `index_organisation_name` (`organisation_name`),
  KEY `index_code` (`code`),
  KEY `index_contact_no` (`contact_no`),
  KEY `index_address` (`address`),
  KEY `index_contact_person_name` (`contact_person_name`),
  KEY `index_contact_person_phone` (`contact_person_phone`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `organisation`
--

INSERT INTO `organisation` VALUES (1,'TPL','TPL-1','00000000','xyz','Ahmed','999','2026-03-18 08:48:15','2026-03-18 08:48:15');

--
-- Table structure for table `organisations_charges`
--

CREATE TABLE `organisations_charges` (
  `id` int NOT NULL AUTO_INCREMENT,
  `org_id` int DEFAULT NULL,
  `charge_id` int DEFAULT NULL,
  `org_charge` float(10,2) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `org_id` (`org_id`),
  KEY `charge_id` (`charge_id`),
  CONSTRAINT `organisations_charges_ibfk_1` FOREIGN KEY (`org_id`) REFERENCES `organisation` (`id`) ON DELETE CASCADE,
  CONSTRAINT `organisations_charges_ibfk_2` FOREIGN KEY (`charge_id`) REFERENCES `charges` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `organisations_charges`
--

INSERT INTO `organisations_charges` VALUES (1,1,1,0.00,'2026-03-18 09:14:48','2026-03-18 09:14:48');

--
-- Table structure for table `organisations_medicine_charges`
--

CREATE TABLE `organisations_medicine_charges` (
  `id` int NOT NULL AUTO_INCREMENT,
  `medicine_batch_details_id` int DEFAULT NULL,
  `org_id` int DEFAULT NULL,
  `org_charge` float(10,2) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `medicine_batch_details_id` (`medicine_batch_details_id`),
  KEY `org_id` (`org_id`),
  CONSTRAINT `organisations_medicine_charges_ibfk_1` FOREIGN KEY (`medicine_batch_details_id`) REFERENCES `medicine_batch_details` (`id`) ON DELETE CASCADE,
  CONSTRAINT `organisations_medicine_charges_ibfk_2` FOREIGN KEY (`org_id`) REFERENCES `organisation` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `organisations_medicine_charges`
--


--
-- Table structure for table `pathology`
--

CREATE TABLE `pathology` (
  `id` int NOT NULL AUTO_INCREMENT,
  `test_name` varchar(100) DEFAULT NULL,
  `short_name` varchar(100) DEFAULT NULL,
  `test_type` varchar(100) DEFAULT NULL,
  `pathology_category_id` int DEFAULT NULL,
  `unit` varchar(50) NOT NULL,
  `sub_category` varchar(50) NOT NULL,
  `report_days` varchar(50) NOT NULL,
  `method` varchar(50) NOT NULL,
  `charge_id` int DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `pathology_category_id` (`pathology_category_id`),
  KEY `charge_id` (`charge_id`),
  KEY `index_test_name` (`test_name`),
  KEY `index_short_name` (`short_name`),
  KEY `index_test_type` (`test_type`),
  KEY `index_unit` (`unit`),
  KEY `index_sub_category` (`sub_category`),
  KEY `index_report_days` (`report_days`),
  KEY `index_method` (`method`),
  CONSTRAINT `pathology_ibfk_1` FOREIGN KEY (`pathology_category_id`) REFERENCES `pathology_category` (`id`) ON DELETE CASCADE,
  CONSTRAINT `pathology_ibfk_2` FOREIGN KEY (`charge_id`) REFERENCES `charges` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `pathology`
--


--
-- Table structure for table `pathology_billing`
--

CREATE TABLE `pathology_billing` (
  `id` int NOT NULL AUTO_INCREMENT,
  `case_reference_id` int DEFAULT NULL,
  `ipd_prescription_basic_id` int DEFAULT NULL,
  `date` datetime DEFAULT NULL,
  `patient_id` int DEFAULT NULL,
  `doctor_id` int DEFAULT NULL,
  `doctor_name` varchar(100) NOT NULL,
  `total` float(10,2) DEFAULT '0.00',
  `discount_percentage` float(10,2) DEFAULT '0.00',
  `discount` float(10,2) DEFAULT '0.00',
  `tax_percentage` float(10,2) DEFAULT '0.00',
  `tax` float(10,2) DEFAULT '0.00',
  `net_amount` float(10,2) DEFAULT '0.00',
  `transaction_id` int DEFAULT NULL,
  `note` text,
  `organisation_id` int DEFAULT NULL,
  `insurance_validity` date DEFAULT NULL,
  `generated_by` int DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `insurance_id` varchar(250) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `patient_id` (`patient_id`),
  KEY `doctor_id` (`doctor_id`),
  KEY `case_reference_id` (`case_reference_id`),
  KEY `transaction_id` (`transaction_id`),
  KEY `generated_by` (`generated_by`),
  KEY `ipd_prescription_basic_id` (`ipd_prescription_basic_id`),
  KEY `index_date` (`date`),
  KEY `index_doctor_name` (`doctor_name`),
  KEY `index_total` (`total`),
  KEY `index_discount_percentage` (`discount_percentage`),
  KEY `index_discount` (`discount`),
  KEY `index_tax_percentage` (`tax_percentage`),
  KEY `index_tax` (`tax`),
  KEY `index_net_amount` (`net_amount`),
  KEY `organisation_id` (`organisation_id`),
  CONSTRAINT `pathology_billing_ibfk_1` FOREIGN KEY (`patient_id`) REFERENCES `patients` (`id`) ON DELETE CASCADE,
  CONSTRAINT `pathology_billing_ibfk_2` FOREIGN KEY (`doctor_id`) REFERENCES `staff` (`id`) ON DELETE CASCADE,
  CONSTRAINT `pathology_billing_ibfk_3` FOREIGN KEY (`case_reference_id`) REFERENCES `case_references` (`id`) ON DELETE CASCADE,
  CONSTRAINT `pathology_billing_ibfk_4` FOREIGN KEY (`generated_by`) REFERENCES `staff` (`id`) ON DELETE CASCADE,
  CONSTRAINT `pathology_billing_ibfk_5` FOREIGN KEY (`transaction_id`) REFERENCES `transactions` (`id`) ON DELETE SET NULL,
  CONSTRAINT `pathology_billing_ibfk_6` FOREIGN KEY (`ipd_prescription_basic_id`) REFERENCES `ipd_prescription_basic` (`id`) ON DELETE CASCADE,
  CONSTRAINT `pathology_billing_ibfk_7` FOREIGN KEY (`organisation_id`) REFERENCES `organisation` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `pathology_billing`
--


--
-- Table structure for table `pathology_category`
--

CREATE TABLE `pathology_category` (
  `id` int NOT NULL AUTO_INCREMENT,
  `category_name` varchar(100) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `index_category_name` (`category_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `pathology_category`
--


--
-- Table structure for table `pathology_parameter`
--

CREATE TABLE `pathology_parameter` (
  `id` int NOT NULL AUTO_INCREMENT,
  `parameter_name` varchar(100) NOT NULL,
  `test_value` varchar(100) NOT NULL,
  `reference_range` varchar(100) NOT NULL,
  `range_from` varchar(500) DEFAULT NULL,
  `range_to` varchar(500) DEFAULT NULL,
  `gender` varchar(100) NOT NULL,
  `unit` int DEFAULT NULL,
  `description` text,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `unit` (`unit`),
  KEY `index_parameter_name` (`parameter_name`),
  KEY `index_test_value` (`test_value`),
  KEY `index_reference_range` (`reference_range`),
  KEY `index_range_from` (`range_from`),
  KEY `index_range_to` (`range_to`),
  KEY `index_gender` (`gender`),
  KEY `index_unit` (`unit`),
  CONSTRAINT `pathology_parameter_ibfk_1` FOREIGN KEY (`unit`) REFERENCES `unit` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `pathology_parameter`
--


--
-- Table structure for table `pathology_parameterdetails`
--

CREATE TABLE `pathology_parameterdetails` (
  `id` int NOT NULL AUTO_INCREMENT,
  `pathology_id` int DEFAULT NULL,
  `pathology_parameter_id` int DEFAULT NULL,
  `created_id` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `pathology_id` (`pathology_id`),
  KEY `pathology_parameter_id` (`pathology_parameter_id`),
  CONSTRAINT `pathology_parameterdetails_ibfk_1` FOREIGN KEY (`pathology_id`) REFERENCES `pathology` (`id`) ON DELETE CASCADE,
  CONSTRAINT `pathology_parameterdetails_ibfk_2` FOREIGN KEY (`pathology_parameter_id`) REFERENCES `pathology_parameter` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `pathology_parameterdetails`
--


--
-- Table structure for table `pathology_report`
--

CREATE TABLE `pathology_report` (
  `id` int NOT NULL AUTO_INCREMENT,
  `pathology_bill_id` int DEFAULT NULL,
  `pathology_id` int DEFAULT NULL,
  `customer_type` varchar(50) DEFAULT NULL,
  `patient_id` int DEFAULT NULL,
  `reporting_date` date DEFAULT NULL,
  `parameter_update` date DEFAULT NULL,
  `tax_percentage` float(10,2) NOT NULL DEFAULT '0.00',
  `apply_charge` float(10,2) NOT NULL,
  `collection_date` date DEFAULT NULL,
  `collection_specialist` int DEFAULT NULL,
  `pathology_center` varchar(250) DEFAULT NULL,
  `approved_by` int DEFAULT NULL,
  `patient_name` varchar(100) DEFAULT NULL,
  `description` text,
  `pathology_report` varchar(255) DEFAULT NULL,
  `report_name` text,
  `pathology_result` text COMMENT 'test result',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `patient_id` (`patient_id`),
  KEY `pathology_bill_id` (`pathology_bill_id`),
  KEY `pathology_id` (`pathology_id`),
  KEY `collection_specialist` (`collection_specialist`),
  KEY `approved_by` (`approved_by`),
  KEY `index_reporting_date` (`reporting_date`),
  KEY `index_parameter_update` (`parameter_update`),
  KEY `index_tax_percentage` (`tax_percentage`),
  KEY `index_apply_charge` (`apply_charge`),
  KEY `index_collection_date` (`collection_date`),
  CONSTRAINT `pathology_report_ibfk_1` FOREIGN KEY (`patient_id`) REFERENCES `patients` (`id`) ON DELETE CASCADE,
  CONSTRAINT `pathology_report_ibfk_2` FOREIGN KEY (`pathology_bill_id`) REFERENCES `pathology_billing` (`id`) ON DELETE CASCADE,
  CONSTRAINT `pathology_report_ibfk_3` FOREIGN KEY (`pathology_id`) REFERENCES `pathology` (`id`) ON DELETE CASCADE,
  CONSTRAINT `pathology_report_ibfk_4` FOREIGN KEY (`collection_specialist`) REFERENCES `staff` (`id`) ON DELETE CASCADE,
  CONSTRAINT `pathology_report_ibfk_5` FOREIGN KEY (`approved_by`) REFERENCES `staff` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `pathology_report`
--


--
-- Table structure for table `pathology_report_parameterdetails`
--

CREATE TABLE `pathology_report_parameterdetails` (
  `id` int NOT NULL AUTO_INCREMENT,
  `pathology_report_id` int DEFAULT NULL,
  `pathology_parameterdetail_id` int DEFAULT NULL,
  `pathology_report_value` varchar(200) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `pathology_report_id` (`pathology_report_id`),
  KEY `pathology_parameterdetail_id` (`pathology_parameterdetail_id`),
  CONSTRAINT `pathology_report_parameterdetails_ibfk_1` FOREIGN KEY (`pathology_report_id`) REFERENCES `pathology_report` (`id`) ON DELETE CASCADE,
  CONSTRAINT `pathology_report_parameterdetails_ibfk_2` FOREIGN KEY (`pathology_parameterdetail_id`) REFERENCES `pathology_parameterdetails` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `pathology_report_parameterdetails`
--


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

CREATE TABLE `patient_bed_history` (
  `id` int NOT NULL AUTO_INCREMENT,
  `case_reference_id` int DEFAULT NULL,
  `bed_group_id` int DEFAULT NULL,
  `bed_id` int DEFAULT NULL,
  `revert_reason` text,
  `from_date` datetime DEFAULT NULL,
  `to_date` datetime DEFAULT NULL,
  `is_active` varchar(20) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `case_reference_id` (`case_reference_id`),
  KEY `bed_group_id` (`bed_group_id`),
  KEY `bed_id` (`bed_id`),
  KEY `index_from_date` (`from_date`),
  KEY `index_to_date` (`to_date`),
  CONSTRAINT `patient_bed_history_ibfk_1` FOREIGN KEY (`case_reference_id`) REFERENCES `case_references` (`id`) ON DELETE CASCADE,
  CONSTRAINT `patient_bed_history_ibfk_2` FOREIGN KEY (`bed_group_id`) REFERENCES `bed_group` (`id`) ON DELETE CASCADE,
  CONSTRAINT `patient_bed_history_ibfk_3` FOREIGN KEY (`bed_id`) REFERENCES `bed` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

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


--
-- Table structure for table `patient_charges`
--

CREATE TABLE `patient_charges` (
  `id` int NOT NULL AUTO_INCREMENT,
  `date` datetime DEFAULT NULL,
  `ipd_id` int DEFAULT NULL,
  `opd_id` int DEFAULT NULL,
  `qty` int DEFAULT NULL,
  `charge_id` int DEFAULT NULL,
  `standard_charge` float(10,2) DEFAULT '0.00',
  `tpa_charge` float(10,2) DEFAULT '0.00',
  `discount_percentage` float(10,2) DEFAULT '0.00',
  `tax` float(10,2) DEFAULT '0.00',
  `apply_charge` float(10,2) DEFAULT '0.00',
  `amount` float(10,2) DEFAULT '0.00',
  `note` text,
  `organisation_id` int DEFAULT NULL,
  `insurance_validity` date DEFAULT NULL,
  `insurance_id` varchar(250) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `opd_id` (`opd_id`),
  KEY `ipd_id` (`ipd_id`),
  KEY `charge_id` (`charge_id`),
  KEY `organisation_id` (`organisation_id`),
  KEY `index_qty` (`qty`),
  KEY `index_standard_charge` (`standard_charge`),
  KEY `index_tpa_charge` (`tpa_charge`),
  KEY `index_discount_percentage` (`discount_percentage`),
  KEY `index_tax` (`tax`),
  KEY `index_apply_charge` (`apply_charge`),
  KEY `index_amount` (`amount`),
  CONSTRAINT `patient_charges_ibfk_1` FOREIGN KEY (`opd_id`) REFERENCES `opd_details` (`id`) ON DELETE CASCADE,
  CONSTRAINT `patient_charges_ibfk_2` FOREIGN KEY (`ipd_id`) REFERENCES `ipd_details` (`id`) ON DELETE CASCADE,
  CONSTRAINT `patient_charges_ibfk_3` FOREIGN KEY (`charge_id`) REFERENCES `charges` (`id`) ON DELETE CASCADE,
  CONSTRAINT `patient_charges_ibfk_4` FOREIGN KEY (`organisation_id`) REFERENCES `organisation` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `patient_charges`
--

INSERT INTO `patient_charges` VALUES (1,'2026-03-18 14:26:20',NULL,1,1,1,0.00,0.00,0.00,0.00,0.00,0.00,NULL,NULL,NULL,NULL,'2026-03-18 14:26:20','2026-03-18 09:26:20'),(2,'2026-03-18 14:57:12',NULL,2,1,1,3000.00,0.00,0.00,0.00,3000.00,0.00,NULL,NULL,NULL,NULL,'2026-03-18 14:57:12','2026-03-18 09:57:12'),(3,'2026-03-25 16:40:00',NULL,3,1,1,3000.00,0.00,0.00,0.00,3000.00,3000.00,'',NULL,NULL,NULL,'2026-03-19 00:00:00','2026-03-19 11:40:55'),(4,'2026-03-19 16:46:20',NULL,4,1,1,3000.00,0.00,20.00,0.00,3000.00,2400.00,NULL,NULL,NULL,NULL,'2026-03-19 16:46:20','2026-03-19 11:46:20');

--
-- Table structure for table `patient_id_card`
--

CREATE TABLE `patient_id_card` (
  `id` int NOT NULL AUTO_INCREMENT,
  `title` varchar(100) NOT NULL,
  `hospital_name` varchar(100) NOT NULL,
  `hospital_address` varchar(500) NOT NULL,
  `background` text CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL,
  `logo` text CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL,
  `sign_image` text CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL,
  `header_color` varchar(100) NOT NULL,
  `enable_patient_name` tinyint(1) NOT NULL COMMENT '0=disable,1=enable',
  `enable_guardian_name` tinyint(1) NOT NULL COMMENT '0=disable,1=enable',
  `enable_patient_unique_id` tinyint(1) NOT NULL COMMENT '0=disable,1=enable',
  `enable_address` tinyint(1) NOT NULL COMMENT '0=disable,1=enable',
  `enable_phone` tinyint(1) NOT NULL COMMENT '0=disable,1=enable',
  `enable_dob` tinyint(1) NOT NULL COMMENT '0=disable,1=enable',
  `enable_blood_group` tinyint(1) NOT NULL COMMENT '0=disable,1=enable',
  `status` tinyint(1) NOT NULL COMMENT '0=disable,1=enable',
  `enable_barcode` tinyint(1) NOT NULL COMMENT '0=disable,1=enable',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `index_title` (`title`),
  KEY `index_hospital_name` (`hospital_name`),
  KEY `index_hospital_address` (`hospital_address`),
  KEY `index_header_color` (`header_color`),
  KEY `index_enable_patient_name` (`enable_patient_name`),
  KEY `index_enable_guardian_name` (`enable_guardian_name`),
  KEY `index_enable_patient_unique_id` (`enable_patient_unique_id`),
  KEY `index_enable_address` (`enable_address`),
  KEY `index_enable_phone` (`enable_phone`),
  KEY `index_enable_dob` (`enable_dob`),
  KEY `index_enable_blood_group` (`enable_blood_group`),
  KEY `index_status` (`status`),
  KEY `index_enable_barcode` (`enable_barcode`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `patient_id_card`
--

INSERT INTO `patient_id_card` VALUES (1,'Sample Patient Id Card','Royal Hospital','Nr Loyala Ashram, A 69, Shahpura Rd, Manisha Market, Sector  Bhopal','background.jpg','logo.jpg','signature.png','#0796f5',1,1,1,1,1,1,1,1,0,'2021-10-19 07:06:02','2025-05-10 05:52:26');

--
-- Table structure for table `patient_timeline`
--

CREATE TABLE `patient_timeline` (
  `id` int NOT NULL AUTO_INCREMENT,
  `patient_id` int DEFAULT NULL,
  `title` varchar(200) NOT NULL,
  `timeline_date` datetime DEFAULT NULL,
  `description` text,
  `document` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL,
  `status` varchar(100) NOT NULL,
  `date` datetime DEFAULT NULL,
  `generated_users_type` varchar(100) NOT NULL,
  `generated_users_id` int DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `patient_id` (`patient_id`),
  KEY `generated_users_id` (`generated_users_id`),
  KEY `index_title` (`title`),
  KEY `index_date` (`date`),
  KEY `index_timeline_date` (`timeline_date`),
  CONSTRAINT `patient_timeline_ibfk_1` FOREIGN KEY (`patient_id`) REFERENCES `patients` (`id`) ON DELETE CASCADE,
  CONSTRAINT `patient_timeline_ibfk_2` FOREIGN KEY (`generated_users_id`) REFERENCES `staff` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `patient_timeline`
--


--
-- Table structure for table `patients_vitals`
--

CREATE TABLE `patients_vitals` (
  `id` int NOT NULL AUTO_INCREMENT,
  `patient_id` int NOT NULL,
  `vital_id` int NOT NULL,
  `reference_range` varchar(100) NOT NULL,
  `messure_date` datetime DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `patient_id` (`patient_id`),
  KEY `index_reference_range` (`reference_range`),
  KEY `index_messure_date` (`messure_date`),
  KEY `vital_id` (`vital_id`),
  CONSTRAINT `patients_vitals_ibfk_1` FOREIGN KEY (`patient_id`) REFERENCES `patients` (`id`) ON DELETE CASCADE,
  CONSTRAINT `patients_vitals_ibfk_2` FOREIGN KEY (`vital_id`) REFERENCES `vitals` (`id`) ON DELETE CASCADE,
  CONSTRAINT `patients_vitals_ibfk_3` FOREIGN KEY (`vital_id`) REFERENCES `vitals` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `patients_vitals`
--


--
-- Table structure for table `payslip_allowance`
--

CREATE TABLE `payslip_allowance` (
  `id` int NOT NULL AUTO_INCREMENT,
  `staff_payslip_id` int DEFAULT NULL,
  `staff_id` int DEFAULT NULL,
  `allowance_type` varchar(200) NOT NULL,
  `amount` float NOT NULL,
  `cal_type` varchar(100) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `staff_id` (`staff_id`),
  KEY `staff_payslip_id` (`staff_payslip_id`),
  KEY `index_allowance_type` (`allowance_type`),
  KEY `index_amount` (`amount`),
  KEY `index_cal_type` (`cal_type`),
  CONSTRAINT `payslip_allowance_ibfk_1` FOREIGN KEY (`staff_id`) REFERENCES `staff` (`id`) ON DELETE CASCADE,
  CONSTRAINT `payslip_allowance_ibfk_2` FOREIGN KEY (`staff_payslip_id`) REFERENCES `staff_payslip` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `payslip_allowance`
--


--
-- Table structure for table `permission_category`
--

CREATE TABLE `permission_category` (
  `id` int NOT NULL AUTO_INCREMENT,
  `perm_group_id` int DEFAULT NULL,
  `name` varchar(100) DEFAULT NULL,
  `short_code` varchar(100) DEFAULT NULL,
  `enable_view` int DEFAULT '0',
  `enable_add` int DEFAULT '0',
  `enable_edit` int DEFAULT '0',
  `enable_delete` int DEFAULT '0',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `index_name` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=427 DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `permission_category`
--

INSERT INTO `permission_category` VALUES (9,3,'Income','income',1,1,1,1,'2018-06-21 23:23:21','2025-05-10 05:52:27'),(10,3,'Income Head','income_head',1,1,1,1,'2018-06-21 23:22:44','2025-05-10 05:52:27'),(12,4,'Expense','expense',1,1,1,1,'2018-06-21 23:24:06','2025-05-10 05:52:27'),(13,4,'Expense Head','expense_head',1,1,1,1,'2018-06-21 23:23:47','2025-05-10 05:52:27'),(27,8,'Content Type','content_type',1,1,1,1,'2024-08-21 09:29:55','2025-05-10 05:52:27'),(31,10,'Issue Item','issue_item',1,1,0,1,'2018-12-16 22:55:14','2025-05-10 05:52:27'),(32,10,'Item Stock','item_stock',1,1,1,1,'2018-06-21 23:35:17','2025-05-10 05:52:27'),(33,10,'Item','item',1,1,1,1,'2018-06-21 23:35:40','2025-05-10 05:52:27'),(34,10,'Store','store',1,1,1,1,'2018-06-21 23:36:02','2025-05-10 05:52:27'),(35,10,'Supplier','supplier',1,1,1,1,'2018-06-21 23:36:25','2025-05-10 05:52:27'),(43,13,'Notice Board','notice_board',1,1,1,1,'2018-06-21 23:41:17','2025-05-10 05:52:27'),(44,13,'Email / SMS','email_sms',1,0,0,0,'2018-06-21 23:40:54','2025-05-10 05:52:27'),(48,14,'OPD Report','opd_report',1,0,0,0,'2018-12-17 21:59:18','2025-05-10 05:52:27'),(53,15,'Languages','languages',1,1,0,0,'2021-09-12 22:56:36','2025-05-10 05:52:27'),(54,15,'General Setting','general_setting',1,0,1,0,'2018-07-04 22:08:35','2025-05-10 05:52:27'),(56,15,'Notification Setting','notification_setting',1,0,1,0,'2018-07-04 22:08:41','2025-05-10 05:52:27'),(57,15,'SMS Setting','sms_setting',1,0,1,0,'2018-07-04 22:08:47','2025-05-10 05:52:27'),(58,15,'Email Setting','email_setting',1,0,1,0,'2018-07-04 22:08:51','2025-05-10 05:52:27'),(59,15,'Front CMS Setting','front_cms_setting',1,0,1,0,'2018-07-04 22:08:55','2025-05-10 05:52:27'),(60,15,'Payment Methods','payment_methods',1,0,1,0,'2018-07-04 22:08:59','2025-05-10 05:52:27'),(61,16,'Menus','menus',1,1,0,1,'2018-07-08 16:50:06','2025-05-10 05:52:27'),(62,16,'Media Manager','media_manager',1,1,0,1,'2018-07-08 16:50:26','2025-05-10 05:52:27'),(63,16,'Banner Images','banner_images',1,1,0,1,'2018-06-21 23:46:02','2025-05-10 05:52:27'),(64,16,'Pages','pages',1,1,1,1,'2018-06-21 23:46:21','2025-05-10 05:52:27'),(65,16,'Gallery','gallery',1,1,1,1,'2018-06-21 23:47:02','2025-05-10 05:52:27'),(66,16,'Event','event',1,1,1,1,'2018-06-21 23:47:20','2025-05-10 05:52:27'),(67,16,'News','notice',1,1,1,1,'2018-07-02 21:39:34','2025-05-10 05:52:27'),(80,17,'Visitor Book','visitor_book',1,1,1,1,'2018-06-21 23:48:58','2025-05-10 05:52:27'),(81,17,'Phone Call Log','phone_call_log',1,1,1,1,'2018-06-21 23:50:57','2025-05-10 05:52:27'),(82,17,'Postal Dispatch','postal_dispatch',1,1,1,1,'2018-06-21 23:50:21','2025-05-10 05:52:27'),(83,17,'Postal Receive','postal_receive',1,1,1,1,'2018-06-21 23:50:04','2025-05-10 05:52:27'),(84,17,'Complain','complain',1,1,1,1,'2018-12-18 22:11:37','2025-05-10 05:52:27'),(85,17,'Setup Front Office','setup_front_office',1,1,1,1,'2018-11-14 13:49:58','2025-05-10 05:52:27'),(86,18,'Staff','staff',1,1,1,1,'2018-06-21 23:53:31','2025-05-10 05:52:27'),(87,18,'Disable Staff','disable_staff',1,0,0,0,'2018-06-21 23:53:12','2025-05-10 05:52:27'),(88,18,'Staff Attendance','staff_attendance',1,1,1,0,'2018-06-21 23:53:10','2025-05-10 05:52:27'),(89,14,'Staff Attendance Report','staff_attendance_report',1,0,0,0,'2021-09-13 02:12:50','2025-05-10 05:52:27'),(90,18,'Staff Payroll','staff_payroll',1,1,1,1,'2024-08-21 09:29:55','2025-05-10 05:52:27'),(91,14,'Payroll Report','payroll_report',1,0,0,0,'2021-09-13 02:13:00','2025-05-10 05:52:27'),(102,21,'Calendar To Do List','calendar_to_do_list',1,1,1,1,'2018-06-21 23:54:41','2025-05-10 05:52:27'),(104,10,'Item Category','item_category',1,1,1,1,'2018-06-21 23:34:33','2025-05-10 05:52:27'),(108,18,' Approve Leave Request','approve_leave_request',1,1,1,1,'2018-07-01 23:17:41','2025-05-10 05:52:27'),(109,18,'Apply Leave','apply_leave',1,1,0,1,'2020-08-24 14:48:58','2025-05-10 05:52:27'),(110,18,'LeaveTypes','leave_types',1,1,1,1,'2021-10-26 11:54:30','2025-05-10 05:52:27'),(111,18,'Department','department',1,1,1,1,'2018-06-25 16:57:07','2025-05-10 05:52:27'),(112,18,'Designation','designation',1,1,1,1,'2018-06-25 16:57:07','2025-05-10 05:52:27'),(118,22,'Staff Role Count Widget','staff_role_count_widget',1,0,0,0,'2018-07-02 20:13:35','2025-05-10 05:52:27'),(126,15,'Users','users',1,0,0,0,'2021-09-21 19:43:59','2025-05-10 05:52:27'),(127,18,'Can See Other Users Profile','can_see_other_users_profile',1,0,0,0,'2018-07-02 21:42:29','2025-05-10 05:52:27'),(129,18,'Staff Timeline','staff_timeline',0,1,0,1,'2018-07-04 21:08:52','2025-05-10 05:52:27'),(130,15,'Backup','backup',1,1,0,1,'2018-07-08 17:17:17','2025-05-10 05:52:27'),(131,15,'Restore','restore',1,0,0,0,'2018-07-08 17:17:17','2025-05-10 05:52:27'),(132,23,'OPD Patient','opd_patient',1,1,1,1,'2018-12-19 22:37:26','2025-05-10 05:52:27'),(134,23,'Prescription','prescription',1,1,1,1,'2018-10-10 14:28:26','2025-05-10 05:52:27'),(135,23,'Visit','visit',1,1,1,1,'2021-09-16 20:39:58','2025-05-10 05:52:27'),(137,23,'OPD Timeline','opd_timeline',1,1,1,1,'2021-02-24 01:02:04','2025-05-10 05:52:27'),(138,24,'IPD Patients','ipd_patient',1,1,1,1,'2018-10-10 20:14:55','2025-05-10 05:52:27'),(139,24,'Discharged Patients','discharged_patients',1,1,1,1,'2021-02-24 01:27:17','2025-05-10 05:52:27'),(140,24,'Consultant Register','consultant_register',1,1,1,1,'2021-02-24 01:37:07','2025-05-10 05:52:27'),(142,24,'IPD Timeline','ipd_timeline',1,1,1,1,'2021-02-25 01:30:00','2025-05-10 05:52:27'),(143,24,'Charges','charges',1,1,1,1,'2018-10-10 14:28:26','2025-05-10 05:52:27'),(144,24,'Payment','payment',1,1,1,1,'2024-08-21 09:29:55','2025-05-10 05:52:27'),(146,25,'Medicine','medicine',1,1,1,1,'2018-10-10 14:28:26','2025-05-10 05:52:27'),(148,25,'Pharmacy Bill','pharmacy_bill',1,1,1,1,'2021-02-25 01:33:40','2025-05-10 05:52:27'),(149,26,'Pathology Test','pathology_test',1,1,1,1,'2021-02-25 01:36:32','2025-05-10 05:52:27'),(152,27,'Radiology Test','radiology_test',1,1,1,1,'2021-02-25 01:45:31','2025-05-10 05:52:27'),(153,27,'Radiology  Bill','radiology_bill',1,1,1,1,'2021-09-16 18:16:48','2025-05-10 05:52:27'),(155,22,'IPD Income Widget','ipd_income_widget',1,0,0,0,'2018-12-19 22:08:05','2025-05-10 05:52:27'),(156,22,'OPD Income Widget','opd_income_widget',1,0,0,0,'2018-12-19 22:08:15','2025-05-10 05:52:27'),(157,22,'Pharmacy Income Widget','pharmacy_income_widget',1,0,0,0,'2018-12-19 22:08:25','2025-05-10 05:52:27'),(158,22,'Pathology Income Widget','pathology_income_widget',1,0,0,0,'2018-12-19 22:08:37','2025-05-10 05:52:27'),(159,22,'Radiology Income Widget','radiology_income_widget',1,0,0,0,'2018-12-19 22:08:49','2025-05-10 05:52:27'),(161,22,'Blood Bank Income Widget','blood_bank_income_widget',1,0,0,0,'2018-12-19 22:09:13','2025-05-10 05:52:27'),(162,22,'Ambulance Income Widget','ambulance_income_widget',1,0,0,0,'2018-12-19 22:09:25','2025-05-10 05:52:27'),(165,29,'Ambulance Call','ambulance_call',1,1,1,1,'2018-10-26 16:37:51','2025-05-10 05:52:27'),(166,29,'Ambulance','ambulance',1,1,1,1,'2018-10-26 16:37:59','2025-05-10 05:52:27'),(168,30,'Blood Issue','blood_issue',1,1,1,1,'2018-10-26 17:20:15','2025-05-10 05:52:27'),(169,30,'Blood Donor','blood_donor',1,1,1,1,'2018-10-26 17:20:19','2025-05-10 05:52:27'),(170,25,'Medicine Category','medicine_category',1,1,1,1,'2018-10-24 19:10:24','2025-05-10 05:52:27'),(171,27,'Radiology Category','radiology_category',1,1,1,1,'2021-02-25 01:52:34','2025-05-10 05:52:27'),(173,31,'Organisation','organisation',1,1,1,1,'2018-10-24 19:10:24','2025-05-10 05:52:27'),(175,26,'Pathology Category','pathology_category',1,1,1,1,'2018-10-24 19:10:24','2025-05-10 05:52:27'),(176,32,'Hospital Charges','hospital_charges',1,1,1,1,'2021-09-12 20:29:30','2025-05-10 05:52:27'),(178,14,'IPD Report','ipd_report',1,0,0,0,'2018-12-11 23:09:24','2025-05-10 05:52:27'),(179,14,'Pharmacy Bill Report','pharmacy_bill_report',1,0,0,0,'2018-12-11 23:09:24','2025-05-10 05:52:27'),(180,14,'Pathology Patient Report','pathology_patient_report',1,0,0,0,'2018-12-11 23:09:24','2025-05-10 05:52:27'),(181,14,'Radiology Patient Report','radiology_patient_report',1,0,0,0,'2018-12-11 23:09:24','2025-05-10 05:52:27'),(182,14,'OT Report','ot_report',1,0,0,0,'2019-03-07 19:56:54','2025-05-10 05:52:27'),(183,14,'Blood Donor Report','blood_donor_report',1,0,0,0,'2019-03-07 19:56:54','2025-05-10 05:52:27'),(184,14,'Payroll Month Report','payroll_month_report',1,0,0,0,'2019-03-07 19:57:25','2025-05-10 05:52:27'),(185,14,'Payroll Report','payroll_report',1,0,0,0,'2019-03-07 19:57:35','2025-05-10 05:52:27'),(187,14,'User Log','user_log',1,0,0,0,'2018-12-11 23:09:24','2025-05-10 05:52:27'),(188,14,'Patient Login Credential','patient_login_credential',1,0,0,0,'2018-12-11 23:09:24','2025-05-10 05:52:27'),(189,14,'Email / SMS Log','email_sms_log',1,0,0,0,'2018-12-11 23:09:24','2025-05-10 05:52:27'),(190,22,'Yearly Income & Expense Chart','yearly_income_expense_chart',1,0,0,0,'2018-12-11 23:22:05','2025-05-10 05:52:27'),(191,22,'Monthly Income & Expense Chart','monthly_income_expense_chart',1,0,0,0,'2018-12-11 23:25:14','2025-05-10 05:52:27'),(192,23,'OPD Prescription Print Header Footer ','opd_prescription_print_header_footer',1,0,0,0,'2024-08-21 09:29:55','2025-05-10 05:52:27'),(196,24,'Bed','bed',1,1,1,1,'2018-12-11 23:46:01','2025-05-10 05:52:27'),(197,24,'IPD Prescription Print Header Footer','ipd_prescription_print_header_footer',1,0,0,0,'2024-08-21 09:29:55','2025-05-10 05:52:27'),(198,24,'Bed Status','bed_status',1,0,0,0,'2018-12-11 23:39:42','2025-05-10 05:52:27'),(200,25,'Medicine Bad Stock','medicine_bad_stock',1,1,0,1,'2018-12-17 14:12:46','2025-05-10 05:52:27'),(201,25,'Pharmacy Bill print Header Footer','pharmacy_bill_print_header_footer',1,0,0,0,'2024-08-21 09:29:55','2025-05-10 05:52:27'),(202,30,'Blood Stock','blood_stock',1,1,0,1,'2021-09-10 22:49:52','2025-05-10 05:52:27'),(203,32,'Charge Category','charge_category',1,1,1,1,'2018-12-12 00:19:38','2025-05-10 05:52:27'),(206,14,'TPA Report','tpa_report',1,0,0,0,'2019-03-07 19:49:25','2025-05-10 05:52:27'),(207,14,'Ambulance Report','ambulance_report',1,0,0,0,'2019-03-07 19:49:41','2025-05-10 05:52:27'),(208,14,'Discharge Patient Report','discharge_patient_report',1,0,0,0,'2019-03-07 19:49:55','2025-05-10 05:52:27'),(209,14,'Appointment Report','appointment_report',1,0,0,0,'2019-03-07 19:50:10','2025-05-10 05:52:27'),(211,14,'Blood Issue Report','blood_issue_report',1,0,0,0,'2019-03-07 19:57:35','2025-05-10 05:52:27'),(212,14,'Income Report','income_report',1,0,0,0,'2019-03-07 19:57:35','2025-05-10 05:52:27'),(213,14,'Expense Report','expense_report',1,0,0,0,'2019-03-07 19:57:35','2025-05-10 05:52:27'),(214,34,'Birth Record','birth_record',1,1,1,1,'2018-06-21 23:36:02','2025-05-10 05:52:27'),(215,34,'Death Record','death_record',1,1,1,1,'2018-06-21 23:36:02','2025-05-10 05:52:27'),(218,23,'Move Patient in IPD','opd_move_patient_in_ipd',1,0,0,0,'2021-09-16 21:00:06','2025-05-10 05:52:27'),(219,23,'Manual Prescription','manual_prescription',1,0,0,0,'2019-09-22 17:52:06','2025-05-10 05:52:27'),(220,24,'Prescription ','ipd_prescription',1,1,1,1,'2019-09-23 13:59:27','2025-05-10 05:52:27'),(221,23,'Charges','opd_charges',1,1,1,1,'2019-09-22 17:58:03','2025-05-10 05:52:27'),(222,23,'Payment','opd_payment',1,1,1,1,'2024-08-21 09:29:55','2025-05-10 05:52:27'),(224,25,'Import Medicine','import_medicine',1,0,0,0,'2019-09-22 18:03:31','2025-05-10 05:52:27'),(225,25,'Medicine Purchase','medicine_purchase',1,1,0,1,'2021-10-02 04:59:02','2025-05-10 05:52:27'),(226,25,'Medicine Supplier','medicine_supplier',1,1,1,1,'2019-09-22 18:09:36','2025-05-10 05:52:27'),(227,25,'Medicine Dosage','medicine_dosage',1,1,1,1,'2019-09-22 18:17:16','2025-05-10 05:52:27'),(236,36,'Patient','patient',1,1,1,1,'2021-09-21 21:29:37','2025-05-10 05:52:27'),(237,36,'Enabled/Disabled','enabled_disabled',1,0,0,0,'2019-09-22 19:25:35','2025-05-10 05:52:27'),(238,22,'Notification Center','notification_center',1,0,0,0,'2019-09-23 16:48:33','2025-05-10 05:52:27'),(239,36,'Import','patient_import',1,0,0,0,'2019-10-03 14:20:26','2025-05-10 05:52:27'),(240,34,'Birth Print Header Footer','birth_print_header_footer',1,0,0,0,'2024-08-21 09:29:55','2025-05-10 05:52:27'),(242,34,'Death Print Header Footer','death_print_header_footer',1,0,0,0,'2024-08-21 09:29:55','2025-05-10 05:52:27'),(243,26,'Print Header Footer','pathology_print_header_footer',1,0,0,0,'2024-08-21 09:29:55','2025-05-10 05:52:27'),(244,27,'Print Header Footer','radiology_print_header_footer',1,0,0,0,'2024-08-21 09:29:55','2025-05-10 05:52:27'),(246,30,'Print Header Footer','bloodbank_print_header_footer',1,0,0,0,'2021-10-07 04:06:58','2025-05-10 05:52:27'),(247,29,'Print Header Footer','ambulance_print_header_footer',1,0,0,0,'2024-08-21 09:29:55','2025-05-10 05:52:27'),(248,24,'IPD Bill Print Header Footer','ipd_bill_print_header_footer',1,0,0,0,'2024-08-21 09:29:55','2025-05-10 05:52:27'),(249,18,'Print Payslip Header Footer','print_payslip_header_footer',1,0,0,0,'2024-08-21 09:29:55','2025-05-10 05:52:27'),(250,14,'Income Group Report','income_group_report',1,0,0,0,'2020-08-11 18:52:52','2025-05-10 05:52:27'),(251,14,'Expense Group Report','expense_group_report',1,0,0,0,'2019-10-03 17:15:56','2025-05-10 05:52:27'),(253,14,'Inventory Stock Report','inventory_stock_report',1,0,0,0,'2019-10-03 18:20:31','2025-05-10 05:52:27'),(254,14,'Inventory Item Report','add_item_report',1,0,0,0,'2019-10-03 18:23:22','2025-05-10 05:52:27'),(255,14,'Inventory Issue Report','issue_inventory_report',1,0,0,0,'2019-10-03 18:24:40','2025-05-10 05:52:27'),(256,14,'Expiry Medicine Report','expiry_medicine_report',1,0,0,0,'2019-10-03 19:00:11','2025-05-10 05:52:27'),(257,26,'Pathology Bill','pathology_bill',1,1,1,1,'2021-02-25 01:58:10','2025-05-10 05:52:27'),(258,14,'Birth Report','birth_report',1,0,0,0,'2019-10-13 16:12:35','2025-05-10 05:52:27'),(259,14,'Death Report','death_report',1,0,0,0,'2019-10-13 16:13:56','2025-05-10 05:52:27'),(260,26,'Pathology Unit','pathology_unit',1,1,1,1,'2020-07-21 14:13:49','2025-05-10 05:52:27'),(261,27,'Radiology Unit','radiology_unit',1,1,1,1,'2020-07-21 14:14:47','2025-05-10 05:52:27'),(262,27,'Radiology Parameter','radiology_parameter',1,1,1,1,'2020-07-21 14:20:28','2025-05-10 05:52:27'),(263,26,'Pathology Parameter','pathology_parameter',1,1,1,1,'2020-07-21 14:20:28','2025-05-10 05:52:27'),(264,32,'Charge Type','charge_type',1,1,1,1,'2024-08-21 09:29:55','2025-05-10 05:52:27'),(265,14,'OPD Balance Report','opd_balance_report',1,0,0,0,'2020-07-27 15:03:34','2025-05-10 05:52:27'),(266,14,'IPD Balance Report','ipd_balance_report',1,0,0,0,'2020-07-27 15:03:34','2025-05-10 05:52:27'),(267,15,'Symptoms Type','symptoms_type',1,1,1,1,'2021-09-13 21:36:22','2025-05-10 05:52:27'),(269,37,'Live Consultation','live_consultation',1,1,0,1,'2020-08-12 19:19:27','2025-05-10 05:52:27'),(270,37,'Live Meeting','live_meeting',1,1,0,1,'2020-08-12 19:19:27','2025-05-10 05:52:27'),(271,14,'Live Consultation Report','live_consultation_report',1,0,0,0,'2021-09-13 02:11:19','2025-05-10 05:52:27'),(272,14,'Live Meeting Report','live_meeting_report',1,0,0,0,'2021-09-13 02:11:14','2025-05-10 05:52:27'),(273,37,'Setting','setting',1,0,1,0,'2020-08-12 20:03:28','2025-05-10 05:52:27'),(274,15,'Language Switcher','language_switcher',1,0,0,0,'2020-08-20 17:48:53','2025-05-10 05:52:27'),(279,15,'Symptoms Head','symptoms_head',1,1,1,1,'2021-09-13 21:36:27','2025-05-10 05:52:27'),(280,18,'Specialist','specialist',1,1,1,1,'2019-10-03 10:01:33','2025-05-10 05:52:27'),(281,22,'General Income Widget','general_income_widget',1,0,0,0,'2018-12-19 16:38:05','2025-05-10 05:52:27'),(282,22,'Expenses Widget','expenses_widget',1,0,0,0,'2018-12-19 16:38:05','2025-05-10 05:52:27'),(283,38,'Referral Category','referral_category',1,1,1,1,'2021-06-11 02:54:41','2025-05-10 05:52:27'),(284,38,'Referral Commission','referral_commission',1,1,1,1,'2021-06-11 02:54:41','2025-05-10 05:52:27'),(285,38,'Referral Person','referral_person',1,1,1,1,'2021-06-11 02:55:21','2025-05-10 05:52:27'),(286,38,'Referral Payment','referral_payment',1,1,1,1,'2021-06-11 02:55:21','2025-05-10 05:52:27'),(287,15,'Prefix Setting','prefix_setting',1,0,1,0,'2021-06-11 20:46:10','2025-05-10 05:52:27'),(288,15,'Captcha Setting','captcha_setting',1,0,1,0,'2021-06-11 21:43:53','2025-05-10 05:52:27'),(289,32,'Tax Category','tax_category',1,1,1,1,'2021-06-11 22:16:39','2025-05-10 05:52:27'),(290,32,'Unit Type','unit_type',1,1,1,1,'2021-06-11 22:16:39','2025-05-10 05:52:27'),(291,25,'Dosage Interval','dosage_interval',1,1,1,1,'2021-06-12 00:15:37','2025-05-10 05:52:27'),(292,25,'Dosage Duration','dosage_duration',1,1,1,1,'2021-06-12 00:15:37','2025-05-10 05:52:27'),(293,30,'Blood Bank Product','blood_bank_product',1,1,1,1,'2021-06-12 00:51:23','2025-05-10 05:52:27'),(294,39,'Slot','online_appointment_slot',1,1,1,1,'2021-09-14 01:04:31','2025-05-10 05:52:27'),(295,39,'Doctor Shift','online_appointment_doctor_shift',1,0,1,0,'2021-06-12 01:43:48','2025-05-10 05:52:27'),(296,39,'Shift','online_appointment_shift',1,1,1,1,'2021-06-12 01:24:25','2025-05-10 05:52:27'),(297,39,'Doctor Wise Appointment','doctor_wise_appointment',1,0,0,0,'2021-10-07 01:45:39','2025-05-10 05:52:27'),(298,39,'Patient Queue','patient_queue',1,0,0,0,'2021-10-07 01:45:42','2025-05-10 05:52:27'),(299,23,'OPD Medication','opd_medication',1,1,1,1,'2021-06-14 20:00:12','2025-05-10 05:52:27'),(300,24,'IPD Medication','ipd_medication',1,1,1,1,'2021-06-14 20:00:12','2025-05-10 05:52:27'),(301,24,'Bed History','bed_history',1,0,0,0,'2021-06-14 20:00:12','2025-05-10 05:52:27'),(302,30,'Blood Bank Components','blood_bank_components',1,1,0,1,'2021-06-15 00:46:48','2025-05-10 05:52:27'),(303,23,'Operation Theatre','opd_operation_theatre',1,1,1,1,'2021-09-07 22:49:13','2025-05-10 05:52:27'),(304,23,'Lab Investigation','opd_lab_investigation',1,0,0,0,'2021-09-06 19:36:10','2025-05-10 05:52:27'),(305,23,'Patient Discharge','opd_patient_discharge',1,0,1,0,'2021-09-06 19:39:16','2025-05-10 05:52:27'),(306,23,'Patient Discharge Revert','opd_patient_discharge_revert',1,0,0,0,'2021-09-06 19:39:38','2025-05-10 05:52:27'),(307,23,'Treatment History','opd_treatment_history',1,0,0,0,'2021-09-06 19:49:05','2025-05-10 05:52:27'),(308,24,'Lab Investigation','ipd_lab_investigation',1,0,0,0,'2021-09-06 20:45:59','2025-05-10 05:52:27'),(309,24,'Patient Discharge','ipd_patient_discharge',1,0,1,0,'2021-09-06 22:08:20','2025-05-10 05:52:27'),(310,24,'Patient Discharge Revert','ipd_patient_discharge_revert',1,0,0,0,'2021-09-06 22:14:54','2025-05-10 05:52:27'),(311,30,'Issue Component','issue_component',1,1,1,1,'2021-09-06 22:21:53','2025-05-10 05:52:27'),(312,26,'	Add/Edit Collection Person','pathology_add_edit_collection_person',1,0,1,0,'2021-09-16 20:06:13','2025-05-10 05:52:27'),(313,25,'Partial Payment','pharmacy_partial_payment',1,1,0,1,'2021-09-07 01:10:15','2025-05-10 05:52:27'),(314,26,'Partial Payment','pathology_partial_payment',1,1,0,1,'2021-09-07 02:34:33','2025-05-10 05:52:27'),(315,27,'Partial Payment','radiology_partial_payment',1,1,0,1,'2021-09-07 02:38:15','2025-05-10 05:52:27'),(316,28,'Partial Payment','radiology_partial_payment',1,1,0,1,'2021-09-07 02:39:02','2025-05-10 05:52:27'),(317,30,'Partial Payment','blood_bank_partial_payment',1,1,0,1,'2021-09-07 02:47:22','2025-05-10 05:52:27'),(318,29,'Partial Payment','ambulance_partial_payment',1,1,0,1,'2021-09-07 02:48:10','2025-05-10 05:52:27'),(319,23,'Checkup','checkup',1,1,1,1,'2021-09-16 20:40:33','2025-05-10 05:52:27'),(320,23,'Print Bill','opd_print_bill',1,0,0,0,'2021-09-07 23:09:27','2025-05-10 05:52:27'),(321,23,'Live Consult','opd_live_consult',1,0,0,0,'2021-09-08 00:53:31','2025-05-10 05:52:27'),(322,24,'Nurse Note','nurse_note',1,1,1,1,'2021-09-08 01:20:07','2025-05-10 05:52:27'),(323,24,'Bed Type','bed_type',1,1,1,1,'2021-09-08 20:06:39','2025-05-10 05:52:27'),(324,24,'Bed Group','bed_group',1,1,1,1,'2021-09-08 20:07:08','2025-05-10 05:52:27'),(325,24,'Floor','floor',1,1,1,1,'2021-09-08 20:08:35','2025-05-10 05:52:27'),(326,24,'Operation Theatre','ipd_operation_theatre',1,1,1,1,'2021-09-08 22:38:14','2025-05-10 05:52:27'),(327,24,'Live Consult','ipd_live_consultation',1,0,0,0,'2021-09-08 23:05:26','2025-05-10 05:52:27'),(329,24,'Treatment History','ipd_treatment_history',1,0,0,0,'2021-09-06 20:45:59','2025-05-10 05:52:27'),(330,41,'OPD Billing','opd_billing',1,0,0,0,'2021-09-09 00:33:14','2025-05-10 05:52:27'),(331,41,'OPD Billing Payment','opd_billing_payment',1,1,0,0,'2021-09-09 01:10:36','2025-05-10 05:52:27'),(332,41,'IPD Billing','ipd_billing',1,0,0,0,'2021-09-09 00:52:26','2025-05-10 05:52:27'),(333,41,'IPD Billing Payment','ipd_billing_payment',1,1,0,0,'2021-09-09 00:53:03','2025-05-10 05:52:27'),(334,41,'Pharmacy Billing','pharmacy_billing',1,0,0,0,'2021-09-09 00:53:03','2025-05-10 05:52:27'),(335,41,'Pharmacy Billing Payment','pharmacy_billing_payment',1,1,0,0,'2021-09-09 00:53:03','2025-05-10 05:52:27'),(336,41,'Pathology Billing','pathology_billing',1,0,0,0,'2021-09-09 00:53:03','2025-05-10 05:52:27'),(337,41,'Pathology Billing Payment','pathology_billing_payment',1,1,0,0,'2021-09-09 00:53:03','2025-05-10 05:52:27'),(338,41,'Radiology Billing','radiology_billing',1,0,0,0,'2021-09-09 00:53:03','2025-05-10 05:52:27'),(339,41,'Radiology Billing Payment','radiology_billing_payment',1,1,0,0,'2021-09-09 00:53:03','2025-05-10 05:52:27'),(340,41,'Blood Bank Billing','blood_bank_billing',1,0,0,0,'2021-09-09 00:53:03','2025-05-10 05:52:27'),(341,41,'Blood Bank Billing Payment','blood_bank_billing_payment',1,1,0,0,'2021-09-09 00:53:03','2025-05-10 05:52:27'),(342,41,'Ambulance Billing','ambulance_billing',1,0,0,0,'2021-09-09 00:53:03','2025-05-10 05:52:27'),(343,41,'Ambulance Billing Payment','ambulance_billing_payment',1,1,0,0,'2021-09-09 00:53:03','2025-05-10 05:52:27'),(344,41,'Generate Bill','generate_bill',1,0,0,0,'2021-09-09 20:36:09','2025-05-10 05:52:27'),(345,41,'Generate Discharge Card','generate_discharge_card',1,0,0,0,'2021-09-09 00:53:03','2025-05-10 05:52:27'),(346,40,'Online Appointment','online_appointment',1,0,0,0,'2021-09-09 02:15:17','2025-05-10 05:52:27'),(347,31,'TPA Charges ','tpa_charges',1,0,1,1,'2018-10-24 19:10:24','2025-05-10 05:52:27'),(348,15,'System Notification Setting','system_notification_setting',1,0,1,0,'2018-07-04 22:08:41','2025-05-10 05:52:27'),(349,14,'All Transaction Report','all_transaction_report',1,0,0,0,'2021-09-13 02:29:20','2025-05-10 05:52:27'),(350,14,'Patient Visit Report','patient_visit_report',1,0,0,0,'2019-10-03 18:23:22','2025-05-10 05:52:27'),(351,14,'Patient Bill Report','patient_bill_report',1,0,0,0,'2019-10-03 17:15:56','2025-05-10 05:52:27'),(352,14,'Referral Report','referral_report',1,0,0,0,'2019-10-03 17:15:56','2025-05-10 05:52:27'),(353,27,'Add/Edit Collection Person','radiology_add_edit_collection_person',1,0,1,0,'2021-09-16 20:06:41','2025-05-10 05:52:27'),(354,27,'Add/Edit  Report','radiology_add_edit_report',1,0,1,0,'2021-09-16 20:06:50','2025-05-10 05:52:27'),(355,26,'Add/Edit Report','pathology_add_edit_report',1,0,1,0,'2021-09-16 20:06:24','2025-05-10 05:52:27'),(362,42,'Generate Certificate','generate_certificate',1,0,0,0,'2021-09-20 16:48:25','2025-05-10 05:52:27'),(363,42,'Certificate','certificate',1,1,1,1,'2021-09-20 16:48:25','2025-05-10 05:52:27'),(364,42,'Generate Staff ID Card','generate_staff_id_card',1,0,0,0,'2021-09-20 16:56:38','2025-05-10 05:52:27'),(365,42,'Staff ID Card','staff_id_card',1,1,1,1,'2021-09-20 16:56:09','2025-05-10 05:52:27'),(366,42,'Generate Patient ID Card','generate_patient_id_card',1,0,0,0,'2021-09-20 23:13:54','2025-05-10 05:52:27'),(367,42,'Patient ID Card','patient_id_card',1,1,1,1,'2021-09-20 16:54:38','2025-05-10 05:52:27'),(369,14,'Component Issue Report','component_issue_report',1,0,0,0,'2019-03-07 19:57:35','2025-05-10 05:52:27'),(370,14,'Audit Trail Report','audit_trail_report',1,0,0,0,'2021-09-28 01:08:22','2025-05-10 05:52:27'),(371,43,'Chat','chat',1,0,0,0,'2021-10-07 05:05:15','2025-05-10 05:52:27'),(372,15,'Custom Fields','custom_fields',1,0,0,0,'2021-10-29 07:41:26','2025-05-10 05:52:27'),(373,14,'Daily Transaction Report','daily_transaction_report',1,0,0,0,'2021-10-29 07:42:08','2025-05-10 05:52:27'),(374,15,'Operation','operation',1,1,1,1,'2021-10-29 07:45:14','2025-05-10 05:52:27'),(375,15,'Operation Category','operation_category',1,1,1,1,'2021-10-29 07:45:14','2025-05-10 05:52:27'),(386,39,'Appointment','appointment',1,1,0,1,'2021-12-24 09:36:15','2025-05-10 05:52:27'),(387,39,'Reschedule','reschedule',1,0,0,0,'2021-12-24 09:36:15','2025-05-10 05:52:27'),(388,15,'Finding','finding',1,1,1,1,'2021-10-29 07:45:14','2025-05-10 05:52:27'),(389,15,'Finding Category','finding_category',1,1,1,1,'2021-10-29 07:45:14','2025-05-10 05:52:27'),(390,41,'Appointment Billing','appointment_billing',1,0,0,0,'2021-09-09 00:53:03','2025-05-10 05:52:27'),(391,15,'Vital','vital',1,1,1,1,'2021-10-29 07:45:14','2025-05-10 05:52:27'),(392,23,'OPD Vitals','opd_vitals',1,1,1,1,'2018-12-19 22:37:26','2025-05-10 05:52:27'),(393,24,'IPD Vitals','ipd_vitals',1,1,1,1,'2021-02-25 01:30:00','2025-05-10 05:52:27'),(394,24,'Previous Obstetric History','ipd_previous_obstetric_history',1,1,1,1,'2021-02-25 01:30:00','2025-05-10 05:52:27'),(395,24,'Postnatal History','ipd_postnatal_history',1,1,1,1,'2021-02-25 01:30:00','2025-05-10 05:52:27'),(396,24,'Antenatal','ipd_antenatal',1,1,1,1,'2021-02-25 01:30:00','2025-05-10 05:52:27'),(397,39,'Print Appointment Header Footer','print_appointment_header_footer',1,0,0,0,'2024-02-29 09:05:48','2025-05-10 05:52:27'),(398,23,'Antenatal','opd_antenatal',1,1,1,1,'2024-03-11 11:24:19','2025-05-10 05:52:27'),(399,41,'Payment Receipt Header Footer','payment_receipt_header_footer',1,0,0,0,'2024-02-29 10:44:39','2025-05-10 05:52:27'),(400,13,'Send Credential','send_credential',1,0,0,0,'2024-02-29 10:44:43','2025-05-10 05:52:27'),(401,24,'IPD Antenatal Finding Print Header Footer','ipd_antenatal_finding_print_header_footer',1,0,0,0,'2024-02-29 10:44:47','2025-05-10 05:52:27'),(402,23,'OPD Antenatal Finding Print Header Footer ','opd_antenatal_finding_print_header_footer',1,0,0,0,'2024-02-29 10:44:52','2025-05-10 05:52:27'),(403,24,'Discharge Summary Print Header Footer','discharge_summary_print_header_footer',1,0,0,0,'2024-02-29 10:44:57','2025-05-10 05:52:27'),(404,24,'IPD Obstetric History Print Header Footer','ipd_obstetric_history_print_header_footer',1,0,0,0,'2024-02-29 10:44:47','2025-05-10 05:52:27'),(405,39,'Appointment Priority','appointment_priority',1,1,1,1,'2021-06-12 01:24:25','2025-05-10 05:52:27'),(406,25,'Unit','medicine_unit',1,1,1,1,'2018-10-24 19:10:24','2025-05-10 05:52:27'),(407,25,'Company','medicine_company',1,1,1,1,'2018-10-24 19:10:24','2025-05-10 05:52:27'),(408,25,'Medicine Group','medicine_group',1,1,1,1,'2018-10-24 19:10:24','2025-05-10 05:52:27'),(409,8,'Content Share List','content_share_list',1,0,0,1,'2024-04-20 06:05:46','2025-05-10 05:52:27'),(410,8,'Upload/Share Content','upload_share_content',1,1,0,1,'2024-04-20 06:41:55','2025-05-10 05:52:27'),(411,8,'Generate URL','generate_url',1,0,0,0,'2024-04-20 06:41:55','2025-05-10 05:52:27'),(412,8,'Share','share_content',1,0,0,0,'2024-04-20 06:41:55','2025-05-10 05:52:27'),(413,23,'OPD Bill Print Header Footer','opd_bill_print_header_footer',1,0,1,0,'2024-05-01 12:39:20','2025-05-10 05:52:27'),(414,15,'Attendance Setting','attendance_setting',1,0,1,0,'2018-07-04 22:08:35','2025-05-10 05:52:27'),(415,44,'Duty Roster','duty_roster',1,0,0,0,'2018-07-04 22:08:35','2025-05-10 05:52:27'),(416,44,'Shift','roster_shift',1,1,1,1,'2024-08-08 09:03:23','2025-05-10 05:52:27'),(417,44,'Roster List','roster_list',1,1,0,1,'2018-07-04 22:08:35','2025-05-10 05:52:31'),(418,44,'Roster Assign','roster_assign',1,1,1,1,'2018-07-04 22:08:35','2025-05-10 05:52:27'),(419,45,'Annual Calendar','annual_calendar',1,1,1,1,'2018-07-04 22:08:35','2025-05-10 05:52:27'),(420,14,'Radiology Balance Report','radiology_balance_report',1,0,0,0,'2025-04-05 05:45:53','2025-05-10 05:52:31'),(421,14,'Pathology Balance Report','pathology_balance_report',1,0,0,0,'2025-04-05 05:45:57','2025-05-10 05:52:31'),(422,14,'Staff Day Wise Attendance Report','staff_day_wise_attendance_report',1,0,0,0,'2025-04-05 05:46:00','2025-05-10 05:52:31'),(423,14,'Balance Amount Report','balance_amount_report',1,0,0,0,'2025-04-10 11:52:51','2025-05-10 05:52:31'),(424,14,'Processing Transaction Report','processing_transaction_report',1,0,0,0,'2025-04-10 11:52:51','2025-05-10 05:52:31'),(425,14,'Stock Report','stock_report',1,0,0,0,'2019-10-03 19:00:11','2025-05-10 05:52:31');

--
-- Table structure for table `permission_group`
--

CREATE TABLE `permission_group` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(100) DEFAULT NULL,
  `short_code` varchar(100) NOT NULL,
  `is_active` int DEFAULT '0',
  `system` int NOT NULL,
  `sort_order` decimal(10,2) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `index_name` (`name`),
  KEY `index_short_code` (`short_code`)
) ENGINE=InnoDB AUTO_INCREMENT=46 DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `permission_group`
--

INSERT INTO `permission_group` VALUES (3,'Income','income',1,0,15.00,'2021-10-22 00:07:50','2025-05-10 05:52:27'),(4,'Expense','expense',1,0,16.00,'2021-10-22 00:07:55','2025-05-10 05:52:27'),(8,'Download Center','download_center',1,0,19.00,'2021-10-22 00:13:38','2025-05-10 05:52:27'),(10,'Inventory','inventory',1,0,18.00,'2021-10-22 00:13:22','2025-05-10 05:52:27'),(13,'Messaging','communicate',1,0,17.00,'2021-10-22 00:13:08','2025-05-10 05:52:27'),(14,'Reports','reports',1,1,23.00,'2021-10-22 00:14:35','2025-05-10 05:52:27'),(15,'System Settings','system_settings',1,1,24.00,'2021-10-22 00:16:02','2025-05-10 05:52:27'),(16,'Front CMS','front_cms',1,0,21.00,'2021-10-22 00:14:07','2025-05-10 05:52:27'),(17,'Front Office','front_office',1,0,10.00,'2021-10-22 00:05:56','2025-05-10 05:52:27'),(18,'Human Resource','human_resource',1,1,12.00,'2021-10-22 00:06:27','2025-05-10 05:52:27'),(21,'Calendar To Do List','calendar_to_do_list',1,0,28.00,'2021-10-22 00:22:27','2025-05-10 05:52:27'),(22,'Dashboard and Widgets','dashboard_and_widgets',1,1,0.01,'2021-10-22 00:18:00','2025-05-10 05:52:27'),(23,'OPD','opd',1,0,3.00,'2021-10-22 00:04:29','2025-05-10 05:52:27'),(24,'IPD','ipd',1,0,4.00,'2021-10-22 00:04:38','2025-05-10 05:52:27'),(25,'Pharmacy','pharmacy',1,0,5.00,'2021-10-22 00:04:47','2025-05-10 05:52:27'),(26,'Pathology','pathology',0,0,6.00,'2021-10-22 00:04:59','2026-03-18 08:59:55'),(27,'Radiology','radiology',0,0,7.00,'2021-10-22 00:05:09','2026-03-18 08:59:59'),(29,'Ambulance','ambulance',0,0,9.00,'2021-10-22 00:05:31','2026-03-18 09:00:15'),(30,'Blood Bank','blood_bank',0,0,8.00,'2021-10-22 00:05:21','2026-03-18 09:00:05'),(31,'TPA Management','tpa_management',0,0,14.00,'2021-10-22 00:06:58','2026-03-18 11:30:50'),(32,'Hospital Charges','hospital_charges',1,1,26.00,'2021-10-22 00:19:04','2025-05-10 05:52:27'),(34,'Birth Death Record','birth_death_report',0,0,11.00,'2021-10-22 00:06:10','2026-03-18 09:00:23'),(36,'Patient','patient',1,0,25.00,'2021-10-22 00:18:46','2025-05-10 05:52:27'),(37,'Live Consultation','live_consultation',0,0,22.00,'2021-10-22 00:14:21','2026-03-18 08:59:06'),(38,'Referral','referral',0,0,13.00,'2021-10-22 00:06:48','2026-03-18 08:58:51'),(39,'Appointment','appointment',1,0,2.00,'2021-10-22 00:04:15','2025-05-10 05:52:27'),(41,'Billing','bill',1,0,1.00,'2024-08-21 09:29:55','2025-05-10 05:52:27'),(42,'Certificate','certificate',0,0,20.00,'2021-10-04 03:36:58','2026-03-18 08:59:29'),(43,'Chat','chat',1,0,27.00,'2021-10-22 00:22:19','2025-05-10 05:52:27'),(44,'Duty Roster','duty_roster',0,0,12.10,'2024-08-09 10:37:56','2026-03-18 08:58:58'),(45,'Annual Calendar','annual_calendar',0,0,12.20,'2024-08-17 06:32:13','2026-03-18 08:59:44');

--
-- Table structure for table `permission_patient`
--

CREATE TABLE `permission_patient` (
  `id` int NOT NULL AUTO_INCREMENT,
  `permission_group_short_code` varchar(100) NOT NULL,
  `name` varchar(100) NOT NULL,
  `short_code` varchar(100) NOT NULL,
  `is_active` int DEFAULT NULL,
  `system` int NOT NULL,
  `sort_order` decimal(10,2) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `index_permission_group_short_code` (`permission_group_short_code`),
  KEY `index_name` (`name`),
  KEY `index_short_code` (`short_code`),
  KEY `index_is_active` (`is_active`)
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `permission_patient`
--

INSERT INTO `permission_patient` VALUES (1,'appointment','My Appointments','my_appointments',1,0,1.00,'2021-09-27 13:17:05','2025-05-10 05:52:27'),(2,'opd','OPD','opd',1,0,2.00,'2021-09-27 13:17:21','2025-05-10 05:52:27'),(3,'ipd','IPD','ipd',1,0,3.00,'2021-09-25 09:33:07','2025-05-10 05:52:27'),(4,'pharmacy','Pharmacy','pharmacy',1,0,4.00,'2021-09-25 06:03:29','2025-05-10 05:52:27'),(5,'pathology','Pathology','pathology',0,0,5.00,'2021-09-27 13:15:45','2026-03-18 08:59:55'),(6,'radiology','Radiology','radiology',0,0,6.00,'2021-09-27 13:15:47','2026-03-18 08:59:59'),(7,'ambulance','Ambulance','ambulance',0,0,7.00,'2021-09-27 13:15:50','2026-03-18 09:00:15'),(8,'blood_bank','Blood Bank','blood_bank',0,0,8.00,'2021-09-24 07:40:59','2026-03-18 09:00:05'),(9,'live_consultation','Live Consultation','live_consultation',0,0,9.00,'2021-09-27 13:16:49','2026-03-18 08:59:06'),(10,'calendar_to_do_list','Calendar To Do List','calendar_to_do_list',1,0,11.00,'2021-10-04 09:07:25','2025-05-10 05:52:27'),(11,'chat','Chat','chat',1,0,11.00,'2021-10-04 07:34:59','2025-05-10 05:52:27'),(12,'download_center','Download Center','download_center',1,0,12.00,'2024-06-26 12:29:50','2025-05-10 05:52:27');

--
-- Table structure for table `pharmacy`
--

CREATE TABLE `pharmacy` (
  `id` int NOT NULL AUTO_INCREMENT,
  `medicine_name` varchar(200) DEFAULT NULL,
  `medicine_category_id` int DEFAULT NULL,
  `medicine_image` text CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL,
  `medicine_company` varchar(100) DEFAULT NULL,
  `medicine_composition` varchar(100) DEFAULT NULL,
  `medicine_group` varchar(100) DEFAULT NULL,
  `unit` varchar(50) DEFAULT NULL,
  `min_level` varchar(50) DEFAULT NULL,
  `reorder_level` varchar(50) DEFAULT NULL,
  `vat` float DEFAULT NULL,
  `unit_packing` varchar(50) DEFAULT NULL,
  `vat_ac` varchar(50) DEFAULT NULL,
  `rack_number` varchar(255) NOT NULL,
  `note` text,
  `is_active` varchar(10) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `medicine_category_id` (`medicine_category_id`),
  KEY `idx_medicine_name` (`medicine_name`),
  KEY `index_medicine_name` (`medicine_name`),
  KEY `index_medicine_company` (`medicine_company`),
  KEY `index_medicine_composition` (`medicine_composition`),
  KEY `index_medicine_group` (`medicine_group`),
  KEY `index_unit` (`unit`),
  KEY `index_min_level` (`min_level`),
  KEY `index_reorder_level` (`reorder_level`),
  KEY `index_vat` (`vat`),
  KEY `index_unit_packing` (`unit_packing`),
  KEY `index_vat_ac` (`vat_ac`),
  KEY `index_rack_number` (`rack_number`),
  CONSTRAINT `pharmacy_ibfk_1` FOREIGN KEY (`medicine_category_id`) REFERENCES `medicine_category` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `pharmacy`
--

INSERT INTO `pharmacy` VALUES (1,'Panadol',1,'','1','','1','1','','',0,'1100','','','','','2026-03-18 09:47:38','2026-03-18 09:47:38');

--
-- Table structure for table `pharmacy_bill_basic`
--

CREATE TABLE `pharmacy_bill_basic` (
  `id` int NOT NULL AUTO_INCREMENT,
  `date` datetime DEFAULT NULL,
  `patient_id` int DEFAULT NULL,
  `ipd_prescription_basic_id` int DEFAULT NULL,
  `case_reference_id` int DEFAULT NULL,
  `customer_name` varchar(50) DEFAULT NULL,
  `customer_type` varchar(50) DEFAULT NULL,
  `doctor_name` varchar(50) DEFAULT NULL,
  `file` varchar(200) NOT NULL,
  `total` float(10,2) DEFAULT '0.00',
  `discount_percentage` float(10,2) DEFAULT '0.00',
  `discount` float(10,2) DEFAULT '0.00',
  `tax_percentage` float(10,2) DEFAULT '0.00',
  `tax` float(10,2) DEFAULT '0.00',
  `net_amount` float(10,2) DEFAULT '0.00',
  `note` text,
  `organisation_id` int DEFAULT NULL,
  `insurance_validity` date DEFAULT NULL,
  `insurance_id` varchar(250) DEFAULT NULL,
  `generated_by` int DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `patient_id` (`patient_id`),
  KEY `case_reference_id` (`case_reference_id`),
  KEY `generated_by` (`generated_by`),
  KEY `ipd_prescription_basic_id` (`ipd_prescription_basic_id`),
  KEY `index_customer_name` (`customer_name`),
  KEY `index_customer_type` (`customer_type`),
  KEY `index_doctor_name` (`doctor_name`),
  KEY `index_total` (`total`),
  KEY `index_discount_percentage` (`discount_percentage`),
  KEY `index_discount` (`discount`),
  KEY `index_tax_percentage` (`tax_percentage`),
  KEY `index_tax` (`tax`),
  KEY `index_net_amount` (`net_amount`),
  CONSTRAINT `pharmacy_bill_basic_ibfk_1` FOREIGN KEY (`patient_id`) REFERENCES `patients` (`id`) ON DELETE CASCADE,
  CONSTRAINT `pharmacy_bill_basic_ibfk_2` FOREIGN KEY (`case_reference_id`) REFERENCES `case_references` (`id`) ON DELETE CASCADE,
  CONSTRAINT `pharmacy_bill_basic_ibfk_3` FOREIGN KEY (`generated_by`) REFERENCES `staff` (`id`) ON DELETE CASCADE,
  CONSTRAINT `pharmacy_bill_basic_ibfk_4` FOREIGN KEY (`ipd_prescription_basic_id`) REFERENCES `ipd_prescription_basic` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `pharmacy_bill_basic`
--


--
-- Table structure for table `pharmacy_bill_detail`
--

CREATE TABLE `pharmacy_bill_detail` (
  `id` int NOT NULL AUTO_INCREMENT,
  `pharmacy_bill_basic_id` int DEFAULT NULL,
  `medicine_batch_detail_id` int DEFAULT NULL,
  `quantity` varchar(100) NOT NULL,
  `sale_price` float(10,2) NOT NULL,
  `discount` float(10,2) NOT NULL,
  `amount` float(10,2) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `pharmacy_bill_basic_id` (`pharmacy_bill_basic_id`),
  KEY `medicine_batch_detail_id` (`medicine_batch_detail_id`),
  KEY `index_quantity` (`quantity`),
  KEY `index_sale_price` (`sale_price`),
  KEY `index_amount` (`amount`),
  CONSTRAINT `pharmacy_bill_detail_ibfk_1` FOREIGN KEY (`pharmacy_bill_basic_id`) REFERENCES `pharmacy_bill_basic` (`id`) ON DELETE CASCADE,
  CONSTRAINT `pharmacy_bill_detail_ibfk_2` FOREIGN KEY (`medicine_batch_detail_id`) REFERENCES `medicine_batch_details` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `pharmacy_bill_detail`
--


--
-- Table structure for table `pharmacy_company`
--

CREATE TABLE `pharmacy_company` (
  `id` int NOT NULL AUTO_INCREMENT,
  `company_name` varchar(255) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `index_company_name` (`company_name`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `pharmacy_company`
--

INSERT INTO `pharmacy_company` VALUES (1,'GSK','2026-03-18 09:45:11','2026-03-18 09:45:11');

--
-- Table structure for table `postnatal_examine`
--

CREATE TABLE `postnatal_examine` (
  `id` int NOT NULL AUTO_INCREMENT,
  `patient_id` int NOT NULL,
  `labor_time` datetime NOT NULL,
  `delivery_time` datetime NOT NULL,
  `routine_question` text CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL,
  `general_remark` text CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `patient_id` (`patient_id`),
  KEY `index_labor_time` (`labor_time`),
  KEY `index_delivery_time` (`delivery_time`),
  CONSTRAINT `postnatal_examine_ibfk_1` FOREIGN KEY (`patient_id`) REFERENCES `patients` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `postnatal_examine`
--


--
-- Table structure for table `prefixes`
--

CREATE TABLE `prefixes` (
  `id` int NOT NULL AUTO_INCREMENT,
  `type` varchar(100) DEFAULT NULL,
  `prefix` varchar(20) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `index_type` (`type`),
  KEY `index_prefix` (`prefix`)
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `prefixes`
--

INSERT INTO `prefixes` VALUES (1,'ipd_no','IPDN','2021-06-30 17:40:23','2025-05-10 05:52:27'),(2,'opd_no','OPDN','2021-02-22 13:38:01','2025-05-10 05:52:27'),(3,'ipd_prescription','IPDP','2021-02-12 18:42:07','2025-05-10 05:52:27'),(4,'opd_prescription','OPDP','2021-02-12 18:42:17','2025-05-10 05:52:27'),(5,'appointment','APPN','2021-10-22 05:37:43','2025-05-10 05:52:27'),(6,'pharmacy_billing','PHAB','2021-10-22 05:37:43','2025-05-10 05:52:27'),(7,'operation_theater_reference_no','OTRN','2021-10-22 05:37:43','2025-05-10 05:52:27'),(8,'blood_bank_billing','BLBB','2021-10-22 05:40:38','2025-05-10 05:52:27'),(9,'ambulance_call_billing','AMCB','2021-10-22 05:40:38','2025-05-10 05:52:27'),(10,'radiology_billing','RADB','2021-10-22 05:40:38','2025-05-10 05:52:27'),(11,'pathology_billing','PATB','2021-10-22 05:40:38','2025-05-10 05:52:27'),(12,'checkup_id','OCID','2021-10-22 05:44:25','2025-05-10 05:52:27'),(13,'purchase_no','PHPN','2021-10-22 05:44:25','2025-05-10 05:52:27'),(14,'transaction_id','TRID','2021-10-22 05:44:25','2025-05-10 05:52:27'),(15,'birth_record_reference_no','BRRN','2021-10-22 05:44:25','2025-05-10 05:52:27'),(16,'death_record_reference_no','DRRN','2021-10-22 05:44:25','2025-05-10 05:52:27');

--
-- Table structure for table `primary_examine`
--

CREATE TABLE `primary_examine` (
  `id` int NOT NULL AUTO_INCREMENT,
  `ipdid` int DEFAULT NULL,
  `visit_details_id` int DEFAULT NULL,
  `bleeding` varchar(250) DEFAULT NULL,
  `headache` varchar(250) DEFAULT NULL,
  `pain` varchar(250) DEFAULT NULL,
  `constipation` varchar(250) DEFAULT NULL,
  `urinary_symptoms` varchar(250) NOT NULL,
  `vomiting` varchar(250) DEFAULT NULL,
  `cough` varchar(250) DEFAULT NULL,
  `vaginal` varchar(250) DEFAULT NULL,
  `discharge` varchar(250) DEFAULT NULL,
  `oedema` varchar(250) DEFAULT NULL,
  `haemoroids` varchar(250) DEFAULT NULL,
  `weight` varchar(250) NOT NULL,
  `height` varchar(11) NOT NULL,
  `date` datetime DEFAULT NULL,
  `general_condition` text NOT NULL,
  `finding_remark` varchar(250) NOT NULL,
  `pelvic_examination` text NOT NULL,
  `sp` text NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `visit_details_id` (`visit_details_id`),
  KEY `ipdid` (`ipdid`),
  KEY `index_bleeding` (`bleeding`),
  KEY `index_headache` (`headache`),
  KEY `index_pain` (`pain`),
  KEY `index_constipation` (`constipation`),
  KEY `index_urinary_symptoms` (`urinary_symptoms`),
  KEY `index_vomiting` (`vomiting`),
  KEY `index_cough` (`cough`),
  KEY `index_vaginal` (`vaginal`),
  KEY `index_discharge` (`discharge`),
  KEY `index_oedema` (`oedema`),
  KEY `index_haemoroids` (`haemoroids`),
  KEY `index_weight` (`weight`),
  KEY `index_height` (`height`),
  KEY `index_date` (`date`),
  CONSTRAINT `primary_examine_ibfk_1` FOREIGN KEY (`visit_details_id`) REFERENCES `visit_details` (`id`) ON DELETE CASCADE,
  CONSTRAINT `primary_examine_ibfk_2` FOREIGN KEY (`ipdid`) REFERENCES `ipd_details` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `primary_examine`
--


--
-- Table structure for table `print_setting`
--

CREATE TABLE `print_setting` (
  `id` int NOT NULL AUTO_INCREMENT,
  `print_header` text CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL,
  `print_footer` text CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL,
  `setting_for` varchar(200) NOT NULL,
  `is_active` varchar(50) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `print_setting`
--

INSERT INTO `print_setting` VALUES (1,'uploads/printing/1.jpg','','opdpre','yes','2021-09-25 06:44:20','2025-05-10 05:52:27'),(2,'uploads/printing/2.jpg','','opd','yes','2021-09-25 06:44:20','2025-05-10 05:52:27'),(3,'uploads/printing/3.jpg','','ipdpres','yes','2021-09-25 06:44:20','2025-05-10 05:52:27'),(4,'uploads/printing/4.jpg','','ipd','yes','2021-09-25 06:44:20','2025-05-10 05:52:27'),(5,'uploads/printing/5.jpg','','bill','yes','2021-09-25 06:44:20','2025-05-10 05:52:27'),(6,'uploads/printing/6.jpg','','pharmacy','yes','2021-09-25 06:44:20','2025-05-10 05:52:27'),(7,'uploads/printing/7.jpg','','payslip','yes','2021-09-25 06:44:20','2025-05-10 05:52:27'),(8,'uploads/printing/8.jpg','','paymentreceipt','yes','2021-09-25 06:44:20','2025-05-10 05:52:27'),(9,'uploads/printing/9.jpg','','birth','yes','2021-09-25 06:44:20','2025-05-10 05:52:27'),(10,'uploads/printing/10.jpg','','death','yes','2021-09-25 06:44:20','2025-05-10 05:52:27'),(11,'uploads/printing/11.jpg','','pathology','yes','2021-09-25 06:44:20','2025-05-10 05:52:27'),(12,'uploads/printing/12.jpg','','radiology','yes','2021-09-25 06:44:20','2025-05-10 05:52:27'),(13,'uploads/printing/13.jpg','','ot','yes','2021-09-25 06:44:20','2025-05-10 05:52:27'),(14,'uploads/printing/14.jpg','','bloodbank','yes','2021-09-25 06:44:20','2025-05-10 05:52:27'),(15,'uploads/printing/15.jpg','','ambulance','yes','2021-09-25 06:44:20','2025-05-10 05:52:27'),(16,'uploads/printing/16.jpg','','discharge_card','yes','2021-09-25 06:44:20','2025-05-10 05:52:27'),(17,'uploads/printing/17.jpg','','obstetric_history','yes','2021-09-25 06:44:20','2025-05-10 05:52:27'),(18,'uploads/printing/18.jpg','','opd_antenatal_finding','yes','2021-09-25 06:44:20','2025-05-10 05:52:27'),(19,'uploads/printing/19.jpg','','ipd_antenatal_finding','yes','2021-09-25 06:44:20','2025-05-10 05:52:27'),(20,'uploads/printing/20.jpg','','appointment','yes','2021-09-25 06:44:20','2025-05-10 05:52:27');

--
-- Table structure for table `radio`
--

CREATE TABLE `radio` (
  `id` int NOT NULL AUTO_INCREMENT,
  `test_name` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL,
  `short_name` varchar(100) DEFAULT NULL,
  `test_type` varchar(100) DEFAULT NULL,
  `radiology_category_id` int DEFAULT NULL,
  `sub_category` varchar(50) NOT NULL,
  `report_days` varchar(50) NOT NULL,
  `charge_id` int DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `charge_id` (`charge_id`),
  KEY `index_test_name` (`test_name`),
  KEY `index_short_name` (`short_name`),
  KEY `index_test_type` (`test_type`),
  CONSTRAINT `radio_ibfk_1` FOREIGN KEY (`charge_id`) REFERENCES `charges` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `radio`
--


--
-- Table structure for table `radiology_billing`
--

CREATE TABLE `radiology_billing` (
  `id` int NOT NULL AUTO_INCREMENT,
  `patient_id` int DEFAULT NULL,
  `case_reference_id` int DEFAULT NULL,
  `ipd_prescription_basic_id` int DEFAULT NULL,
  `doctor_id` int DEFAULT NULL,
  `date` datetime DEFAULT NULL,
  `doctor_name` varchar(100) NOT NULL,
  `total` float(10,2) NOT NULL,
  `discount_percentage` float(10,2) NOT NULL,
  `discount` float(10,2) NOT NULL,
  `tax_percentage` float(10,2) NOT NULL,
  `tax` float(10,2) NOT NULL,
  `net_amount` float(10,2) NOT NULL,
  `transaction_id` int DEFAULT NULL,
  `note` text,
  `organisation_id` int DEFAULT NULL,
  `insurance_validity` date DEFAULT NULL,
  `insurance_id` varchar(250) DEFAULT NULL,
  `generated_by` int DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `patient_id` (`patient_id`),
  KEY `case_reference_id` (`case_reference_id`),
  KEY `doctor_id` (`doctor_id`),
  KEY `transaction_id` (`transaction_id`),
  KEY `generated_by` (`generated_by`),
  KEY `ipd_prescription_basic_id` (`ipd_prescription_basic_id`),
  KEY `index_date` (`date`),
  KEY `index_doctor_name` (`doctor_name`),
  KEY `index_total` (`total`),
  KEY `index_discount_percentage` (`discount_percentage`),
  KEY `index_discount` (`discount`),
  KEY `index_tax_percentage` (`tax_percentage`),
  KEY `index_tax` (`tax`),
  KEY `index_net_amount` (`net_amount`),
  KEY `index_transaction_id` (`transaction_id`),
  KEY `index_organisation_id` (`organisation_id`),
  KEY `index_insurance_validity` (`insurance_validity`),
  KEY `index_insurance_id` (`insurance_id`),
  CONSTRAINT `radiology_billing_ibfk_1` FOREIGN KEY (`patient_id`) REFERENCES `patients` (`id`) ON DELETE CASCADE,
  CONSTRAINT `radiology_billing_ibfk_2` FOREIGN KEY (`case_reference_id`) REFERENCES `case_references` (`id`) ON DELETE CASCADE,
  CONSTRAINT `radiology_billing_ibfk_3` FOREIGN KEY (`doctor_id`) REFERENCES `staff` (`id`) ON DELETE CASCADE,
  CONSTRAINT `radiology_billing_ibfk_4` FOREIGN KEY (`generated_by`) REFERENCES `staff` (`id`) ON DELETE CASCADE,
  CONSTRAINT `radiology_billing_ibfk_5` FOREIGN KEY (`transaction_id`) REFERENCES `transactions` (`id`) ON DELETE SET NULL,
  CONSTRAINT `radiology_billing_ibfk_6` FOREIGN KEY (`ipd_prescription_basic_id`) REFERENCES `ipd_prescription_basic` (`id`) ON DELETE CASCADE,
  CONSTRAINT `radiology_billing_ibfk_7` FOREIGN KEY (`organisation_id`) REFERENCES `organisation` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `radiology_billing`
--


--
-- Table structure for table `radiology_parameter`
--

CREATE TABLE `radiology_parameter` (
  `id` int NOT NULL AUTO_INCREMENT,
  `parameter_name` varchar(100) NOT NULL,
  `test_value` varchar(100) NOT NULL,
  `reference_range` varchar(100) NOT NULL,
  `range_from` varchar(500) DEFAULT NULL,
  `range_to` varchar(500) DEFAULT NULL,
  `gender` varchar(100) NOT NULL,
  `unit` varchar(100) NOT NULL,
  `description` text,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `index_parameter_name` (`parameter_name`),
  KEY `index_test_value` (`test_value`),
  KEY `index_reference_range` (`reference_range`),
  KEY `index_range_from` (`range_from`),
  KEY `index_range_to` (`range_to`),
  KEY `index_gender` (`gender`),
  KEY `index_unit` (`unit`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `radiology_parameter`
--


--
-- Table structure for table `radiology_parameterdetails`
--

CREATE TABLE `radiology_parameterdetails` (
  `id` int NOT NULL AUTO_INCREMENT,
  `radiology_id` int DEFAULT NULL,
  `radiology_parameter_id` int DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `radiology_id` (`radiology_id`),
  KEY `radiology_parameter_id` (`radiology_parameter_id`),
  CONSTRAINT `radiology_parameterdetails_ibfk_1` FOREIGN KEY (`radiology_id`) REFERENCES `radio` (`id`) ON DELETE CASCADE,
  CONSTRAINT `radiology_parameterdetails_ibfk_2` FOREIGN KEY (`radiology_parameter_id`) REFERENCES `radiology_parameter` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `radiology_parameterdetails`
--


--
-- Table structure for table `radiology_report`
--

CREATE TABLE `radiology_report` (
  `id` int NOT NULL AUTO_INCREMENT,
  `radiology_bill_id` int DEFAULT NULL,
  `radiology_id` int DEFAULT NULL,
  `patient_id` int DEFAULT NULL,
  `customer_type` varchar(50) DEFAULT NULL,
  `patient_name` varchar(100) DEFAULT NULL,
  `consultant_doctor` varchar(10) NOT NULL,
  `reporting_date` date DEFAULT NULL,
  `parameter_update` date DEFAULT NULL,
  `description` text,
  `radiology_report` text,
  `report_name` text,
  `radiology_result` text COMMENT 'test result',
  `tax_percentage` float(10,2) NOT NULL DEFAULT '0.00',
  `apply_charge` float(10,2) NOT NULL DEFAULT '0.00',
  `radiology_center` varchar(250) NOT NULL,
  `generated_by` int DEFAULT NULL,
  `collection_specialist` int DEFAULT NULL,
  `collection_date` date DEFAULT NULL,
  `approved_by` int DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `radiology_id` (`radiology_id`),
  KEY `radiology_bill_id` (`radiology_bill_id`),
  KEY `patient_id` (`patient_id`),
  KEY `generated_by` (`generated_by`),
  KEY `collection_specialist` (`collection_specialist`),
  KEY `approved_by` (`approved_by`),
  KEY `index_customer_type` (`customer_type`),
  KEY `index_patient_name` (`patient_name`),
  KEY `index_consultant_doctor` (`consultant_doctor`),
  KEY `index_reporting_date` (`reporting_date`),
  KEY `index_parameter_update` (`parameter_update`),
  KEY `index_tax_percentage` (`tax_percentage`),
  KEY `index_apply_charge` (`apply_charge`),
  KEY `index_radiology_center` (`radiology_center`),
  CONSTRAINT `radiology_report_ibfk_1` FOREIGN KEY (`radiology_id`) REFERENCES `radio` (`id`) ON DELETE CASCADE,
  CONSTRAINT `radiology_report_ibfk_2` FOREIGN KEY (`radiology_bill_id`) REFERENCES `radiology_billing` (`id`) ON DELETE CASCADE,
  CONSTRAINT `radiology_report_ibfk_3` FOREIGN KEY (`patient_id`) REFERENCES `patients` (`id`) ON DELETE CASCADE,
  CONSTRAINT `radiology_report_ibfk_4` FOREIGN KEY (`generated_by`) REFERENCES `staff` (`id`) ON DELETE CASCADE,
  CONSTRAINT `radiology_report_ibfk_5` FOREIGN KEY (`collection_specialist`) REFERENCES `staff` (`id`) ON DELETE CASCADE,
  CONSTRAINT `radiology_report_ibfk_6` FOREIGN KEY (`approved_by`) REFERENCES `staff` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `radiology_report`
--


--
-- Table structure for table `radiology_report_parameterdetails`
--

CREATE TABLE `radiology_report_parameterdetails` (
  `id` int NOT NULL AUTO_INCREMENT,
  `radiology_report_id` int DEFAULT NULL,
  `radiology_parameterdetail_id` int DEFAULT NULL,
  `radiology_report_value` varchar(200) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `radiology_report_id` (`radiology_report_id`),
  KEY `radiology_parameterdetail_id` (`radiology_parameterdetail_id`),
  CONSTRAINT `radiology_report_parameterdetails_ibfk_1` FOREIGN KEY (`radiology_report_id`) REFERENCES `radiology_report` (`id`) ON DELETE CASCADE,
  CONSTRAINT `radiology_report_parameterdetails_ibfk_2` FOREIGN KEY (`radiology_parameterdetail_id`) REFERENCES `radiology_parameterdetails` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `radiology_report_parameterdetails`
--


--
-- Table structure for table `read_notification`
--

CREATE TABLE `read_notification` (
  `id` int NOT NULL AUTO_INCREMENT,
  `staff_id` int DEFAULT NULL,
  `notification_id` int DEFAULT NULL,
  `is_active` varchar(10) DEFAULT 'no',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `staff_id` (`staff_id`),
  CONSTRAINT `read_notification_ibfk_1` FOREIGN KEY (`staff_id`) REFERENCES `staff` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `read_notification`
--


--
-- Table structure for table `read_systemnotification`
--

CREATE TABLE `read_systemnotification` (
  `id` int NOT NULL AUTO_INCREMENT,
  `notification_id` int DEFAULT NULL,
  `receiver_id` int DEFAULT NULL,
  `is_active` varchar(10) NOT NULL,
  `date` datetime NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `notification_id` (`notification_id`),
  CONSTRAINT `read_systemnotification_ibfk_1` FOREIGN KEY (`notification_id`) REFERENCES `system_notification` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `read_systemnotification`
--


--
-- Table structure for table `referral_category`
--

CREATE TABLE `referral_category` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(100) NOT NULL,
  `is_active` int NOT NULL DEFAULT '1',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `index_name` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `referral_category`
--


--
-- Table structure for table `referral_commission`
--

CREATE TABLE `referral_commission` (
  `id` int NOT NULL AUTO_INCREMENT,
  `referral_category_id` int DEFAULT NULL,
  `referral_type_id` int DEFAULT NULL,
  `commission` float DEFAULT NULL,
  `is_active` int NOT NULL DEFAULT '1',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `referral_category_id` (`referral_category_id`),
  KEY `referral_type_id` (`referral_type_id`),
  CONSTRAINT `referral_commission_ibfk_1` FOREIGN KEY (`referral_category_id`) REFERENCES `referral_category` (`id`) ON DELETE CASCADE,
  CONSTRAINT `referral_commission_ibfk_2` FOREIGN KEY (`referral_type_id`) REFERENCES `referral_type` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `referral_commission`
--


--
-- Table structure for table `referral_payment`
--

CREATE TABLE `referral_payment` (
  `id` int NOT NULL AUTO_INCREMENT,
  `referral_person_id` int DEFAULT NULL,
  `patient_id` int DEFAULT NULL,
  `referral_type` int DEFAULT NULL,
  `billing_id` int NOT NULL,
  `bill_amount` float(10,2) DEFAULT '0.00',
  `percentage` float(10,2) DEFAULT '0.00',
  `amount` float(10,2) DEFAULT '0.00',
  `date` datetime NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `patient_id` (`patient_id`),
  KEY `referral_person_id` (`referral_person_id`),
  KEY `referral_type` (`referral_type`),
  KEY `index_bill_amount` (`bill_amount`),
  KEY `index_percentage` (`percentage`),
  KEY `index_amount` (`amount`),
  KEY `index_date` (`date`),
  CONSTRAINT `referral_payment_ibfk_1` FOREIGN KEY (`patient_id`) REFERENCES `patients` (`id`) ON DELETE CASCADE,
  CONSTRAINT `referral_payment_ibfk_2` FOREIGN KEY (`referral_person_id`) REFERENCES `referral_person` (`id`) ON DELETE CASCADE,
  CONSTRAINT `referral_payment_ibfk_3` FOREIGN KEY (`referral_type`) REFERENCES `referral_type` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `referral_payment`
--


--
-- Table structure for table `referral_person`
--

CREATE TABLE `referral_person` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(100) NOT NULL,
  `category_id` int DEFAULT NULL,
  `contact` varchar(20) DEFAULT NULL,
  `person_name` varchar(100) DEFAULT NULL,
  `person_phone` varchar(50) DEFAULT NULL,
  `standard_commission` float(10,2) NOT NULL DEFAULT '0.00',
  `address` varchar(100) DEFAULT NULL,
  `is_active` int NOT NULL DEFAULT '1',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `referral_category` (`category_id`),
  KEY `index_name` (`name`),
  KEY `index_contact` (`contact`),
  KEY `index_person_name` (`person_name`),
  KEY `index_person_phone` (`person_phone`),
  KEY `index_standard_commission` (`standard_commission`),
  CONSTRAINT `referral_person_ibfk_1` FOREIGN KEY (`category_id`) REFERENCES `referral_category` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `referral_person`
--


--
-- Table structure for table `referral_person_commission`
--

CREATE TABLE `referral_person_commission` (
  `id` int NOT NULL AUTO_INCREMENT,
  `referral_person_id` int DEFAULT NULL,
  `referral_type_id` int DEFAULT NULL,
  `commission` float(10,2) NOT NULL DEFAULT '0.00',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `id` (`id`),
  KEY `referral_person_id` (`referral_person_id`),
  KEY `referral_type_id` (`referral_type_id`),
  CONSTRAINT `referral_person_commission_ibfk_1` FOREIGN KEY (`referral_person_id`) REFERENCES `referral_person` (`id`) ON DELETE CASCADE,
  CONSTRAINT `referral_person_commission_ibfk_2` FOREIGN KEY (`referral_type_id`) REFERENCES `referral_type` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `referral_person_commission`
--


--
-- Table structure for table `referral_type`
--

CREATE TABLE `referral_type` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(100) NOT NULL,
  `prefixes_type` varchar(100) NOT NULL,
  `is_active` int NOT NULL DEFAULT '1',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `id` (`id`),
  KEY `index_name` (`name`),
  KEY `index_prefixes_type` (`prefixes_type`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `referral_type`
--

INSERT INTO `referral_type` VALUES (1,'opd','opd_no',1,'2021-09-17 02:07:51','2025-05-10 05:52:28'),(2,'ipd','ipd_no',1,'2021-09-17 02:07:51','2025-05-10 05:52:28'),(3,'pharmacy','pharmacy_billing',1,'2021-09-17 02:07:51','2025-05-10 05:52:28'),(4,'pathology','pathology_billing',1,'2021-09-17 02:07:51','2025-05-10 05:52:28'),(5,'radiology','radiology_billing',1,'2021-09-17 02:07:51','2025-05-10 05:52:28'),(6,'blood_bank','blood_bank_billing',1,'2021-09-17 02:07:51','2025-05-10 05:52:28'),(7,'ambulance','ambulance_call_billing',1,'2021-09-17 02:07:51','2025-05-10 05:52:28');

--
-- Table structure for table `roles`
--

CREATE TABLE `roles` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(100) DEFAULT NULL,
  `slug` varchar(150) DEFAULT NULL,
  `is_active` int DEFAULT '0',
  `is_system` int NOT NULL DEFAULT '0',
  `is_superadmin` int NOT NULL DEFAULT '0',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `index_name` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `roles`
--

INSERT INTO `roles` VALUES (1,'Admin',NULL,0,1,0,'2018-12-25 06:19:43','2025-05-10 05:52:28'),(2,'Accountant',NULL,0,1,0,'2018-12-25 06:19:38','2025-05-10 05:52:28'),(3,'Doctor',NULL,0,1,0,'2018-07-21 05:07:36','2025-05-10 05:52:28'),(4,'Pharmacist',NULL,0,1,0,'2018-07-21 05:08:26','2025-05-10 05:52:28'),(5,'Pathologist',NULL,0,1,0,'2018-12-25 06:19:59','2025-05-10 05:52:28'),(6,'Radiologist',NULL,0,1,0,'2018-12-25 06:20:27','2025-05-10 05:52:28'),(7,'Super Admin',NULL,0,1,1,'2018-12-25 06:22:24','2025-05-10 05:52:28'),(8,'Receptionist',NULL,0,1,0,'2018-12-25 06:20:22','2025-05-10 05:52:28'),(9,'Nurse',NULL,0,1,0,'2020-12-23 01:58:58','2025-05-10 05:52:28');

--
-- Table structure for table `roles_permissions`
--

CREATE TABLE `roles_permissions` (
  `id` int NOT NULL AUTO_INCREMENT,
  `role_id` int DEFAULT NULL,
  `perm_cat_id` int DEFAULT NULL,
  `can_view` int DEFAULT NULL,
  `can_add` int DEFAULT NULL,
  `can_edit` int DEFAULT NULL,
  `can_delete` int DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `index_can_view` (`can_view`),
  KEY `index_can_add` (`can_add`),
  KEY `index_can_edit` (`can_edit`),
  KEY `index_can_delete` (`can_delete`),
  KEY `role_id` (`role_id`),
  KEY `perm_cat_id` (`perm_cat_id`),
  CONSTRAINT `roles_permissions_ibfk_1` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=2332 DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `roles_permissions`
--

INSERT INTO `roles_permissions` VALUES (1,1,346,1,0,0,0,'2021-09-15 02:19:21','2025-05-10 05:52:28'),(2,1,80,1,1,1,1,'2021-09-15 02:31:34','2025-05-10 05:52:28'),(3,1,81,1,1,1,1,'2021-09-15 02:31:34','2025-05-10 05:52:28'),(4,1,82,1,1,1,1,'2021-09-15 02:31:34','2025-05-10 05:52:28'),(5,1,83,1,1,1,1,'2021-09-15 02:31:34','2025-05-10 05:52:28'),(6,1,84,1,1,1,1,'2021-09-15 02:31:34','2025-05-10 05:52:28'),(7,1,85,1,1,1,1,'2021-09-15 02:31:34','2025-05-10 05:52:28'),(8,1,204,1,1,1,1,'2021-09-15 02:22:47','2025-05-10 05:52:28'),(9,1,205,1,0,0,0,'2021-09-15 02:20:15','2025-05-10 05:52:28'),(10,1,216,1,0,0,0,'2021-09-15 02:20:15','2025-05-10 05:52:28'),(11,1,217,1,0,0,0,'2021-09-15 02:20:15','2025-05-10 05:52:28'),(14,1,237,1,0,0,0,'2021-09-15 02:25:31','2025-05-10 05:52:28'),(15,1,239,1,0,0,0,'2021-09-15 02:25:31','2025-05-10 05:52:28'),(16,1,214,1,1,1,1,'2021-09-15 02:35:14','2025-05-10 05:52:28'),(17,1,215,1,1,1,1,'2021-09-15 02:35:14','2025-05-10 05:52:28'),(18,1,240,1,0,1,0,'2021-09-15 02:35:14','2025-05-10 05:52:28'),(19,1,242,1,0,1,0,'2021-09-15 02:35:14','2025-05-10 05:52:28'),(36,1,48,1,0,0,0,'2021-09-15 18:37:59','2025-05-10 05:52:28'),(37,1,89,1,0,0,0,'2021-09-15 18:37:59','2025-05-10 05:52:28'),(38,1,91,1,0,0,0,'2021-09-15 18:37:59','2025-05-10 05:52:28'),(39,1,178,1,0,0,0,'2021-09-15 18:37:59','2025-05-10 05:52:28'),(40,1,179,1,0,0,0,'2021-09-15 18:37:59','2025-05-10 05:52:28'),(41,1,180,1,0,0,0,'2021-09-15 18:37:59','2025-05-10 05:52:28'),(42,1,181,1,0,0,0,'2021-09-15 18:37:59','2025-05-10 05:52:28'),(43,1,182,1,0,0,0,'2021-09-15 18:37:59','2025-05-10 05:52:28'),(44,1,183,1,0,0,0,'2021-09-15 18:37:59','2025-05-10 05:52:28'),(45,1,184,1,0,0,0,'2021-09-15 18:37:59','2025-05-10 05:52:28'),(46,1,185,1,0,0,0,'2021-09-15 18:37:59','2025-05-10 05:52:28'),(47,1,187,1,0,0,0,'2021-09-15 18:37:59','2025-05-10 05:52:28'),(48,1,188,1,0,0,0,'2021-09-15 18:37:59','2025-05-10 05:52:28'),(49,1,189,1,0,0,0,'2021-09-15 18:37:59','2025-05-10 05:52:28'),(50,1,206,1,0,0,0,'2021-09-15 18:37:59','2025-05-10 05:52:28'),(51,1,207,1,0,0,0,'2021-09-15 18:37:59','2025-05-10 05:52:28'),(52,1,208,1,0,0,0,'2021-09-15 18:37:59','2025-05-10 05:52:28'),(53,1,209,1,0,0,0,'2021-09-15 18:37:59','2025-05-10 05:52:28'),(54,1,210,1,0,0,0,'2021-09-15 18:37:59','2025-05-10 05:52:28'),(55,1,211,1,0,0,0,'2021-09-15 18:37:59','2025-05-10 05:52:28'),(56,1,212,1,0,0,0,'2021-09-15 18:37:59','2025-05-10 05:52:28'),(57,1,213,1,0,0,0,'2021-09-15 18:37:59','2025-05-10 05:52:28'),(58,1,250,1,0,0,0,'2021-09-15 18:37:59','2025-05-10 05:52:28'),(59,1,251,1,0,0,0,'2021-09-15 18:37:59','2025-05-10 05:52:28'),(60,1,253,1,0,0,0,'2021-09-15 18:37:59','2025-05-10 05:52:28'),(61,1,254,1,0,0,0,'2021-09-15 18:37:59','2025-05-10 05:52:28'),(62,1,255,1,0,0,0,'2021-09-15 18:37:59','2025-05-10 05:52:28'),(63,1,256,1,0,0,0,'2021-09-15 18:37:59','2025-05-10 05:52:28'),(64,1,258,1,0,0,0,'2021-09-15 18:37:59','2025-05-10 05:52:28'),(65,1,259,1,0,0,0,'2021-09-15 18:37:59','2025-05-10 05:52:28'),(66,1,265,1,0,0,0,'2021-09-15 18:37:59','2025-05-10 05:52:28'),(67,1,266,1,0,0,0,'2021-09-15 18:37:59','2025-05-10 05:52:28'),(68,1,271,1,0,0,0,'2021-09-15 18:37:59','2025-05-10 05:52:28'),(69,1,272,1,0,0,0,'2021-09-15 18:37:59','2025-05-10 05:52:28'),(70,1,349,1,0,0,0,'2021-09-15 18:37:59','2025-05-10 05:52:28'),(71,1,350,1,0,0,0,'2021-09-15 18:37:59','2025-05-10 05:52:28'),(72,1,351,1,0,0,0,'2021-09-15 18:37:59','2025-05-10 05:52:28'),(73,1,352,1,0,0,0,'2021-09-15 18:37:59','2025-05-10 05:52:28'),(78,1,12,1,1,1,1,'2021-09-17 21:55:07','2025-05-10 05:52:28'),(79,1,13,1,1,1,1,'2021-09-17 21:55:07','2025-05-10 05:52:28'),(81,1,134,1,1,1,1,'2021-10-07 04:54:53','2025-05-10 05:52:28'),(84,1,192,1,0,1,0,'2021-10-07 04:54:53','2025-05-10 05:52:28'),(105,1,140,1,1,1,1,'2021-10-07 04:55:23','2025-05-10 05:52:28'),(106,1,142,1,1,1,1,'2021-10-07 04:55:23','2025-05-10 05:52:28'),(114,1,300,1,1,1,1,'2021-09-16 22:16:20','2025-05-10 05:52:28'),(117,1,309,1,0,1,0,'2021-09-16 22:16:20','2025-05-10 05:52:28'),(119,1,322,1,1,1,1,'2021-09-16 22:16:20','2025-05-10 05:52:28'),(125,1,170,1,1,1,1,'2021-09-17 19:38:24','2025-05-10 05:52:28'),(127,1,201,1,0,1,0,'2021-09-15 23:45:28','2025-05-10 05:52:28'),(131,1,227,1,1,1,1,'2021-09-17 19:10:09','2025-05-10 05:52:28'),(132,1,291,1,1,1,1,'2021-09-17 19:10:09','2025-05-10 05:52:28'),(133,1,292,1,1,1,1,'2021-09-17 19:10:09','2025-05-10 05:52:28'),(142,1,317,1,1,0,1,'2021-09-15 20:15:33','2025-05-10 05:52:28'),(143,1,269,1,1,0,1,'2021-09-15 20:16:52','2025-05-10 05:52:28'),(144,1,270,1,1,0,1,'2021-09-15 20:16:52','2025-05-10 05:52:28'),(149,1,54,1,0,1,0,'2021-10-07 00:37:31','2025-05-10 05:52:28'),(150,1,56,1,0,1,0,'2021-10-07 00:37:31','2025-05-10 05:52:28'),(151,1,57,1,0,1,0,'2021-09-15 20:53:19','2025-05-10 05:52:28'),(152,1,58,1,0,1,0,'2021-09-15 20:53:19','2025-05-10 05:52:28'),(153,1,59,1,0,1,0,'2021-09-15 20:53:19','2025-05-10 05:52:28'),(154,1,60,1,0,1,0,'2021-09-15 20:53:19','2025-05-10 05:52:28'),(155,1,126,1,0,0,0,'2021-09-15 20:53:19','2025-05-10 05:52:28'),(156,1,130,1,1,0,1,'2021-09-15 20:53:19','2025-05-10 05:52:28'),(157,1,131,1,0,0,0,'2021-09-15 20:54:53','2025-05-10 05:52:28'),(158,1,267,1,1,1,1,'2021-09-15 20:54:53','2025-05-10 05:52:28'),(159,1,274,1,0,0,0,'2021-09-15 20:54:53','2025-05-10 05:52:28'),(160,1,279,1,1,1,1,'2021-09-15 20:54:53','2025-05-10 05:52:28'),(161,1,287,1,0,1,0,'2021-09-15 20:54:53','2025-05-10 05:52:28'),(162,1,288,1,0,1,0,'2021-09-15 20:54:53','2025-05-10 05:52:28'),(163,1,348,1,0,1,0,'2021-09-15 20:54:53','2025-05-10 05:52:28'),(164,1,61,1,1,0,1,'2021-10-07 04:57:12','2025-05-10 05:52:28'),(165,1,62,1,1,0,1,'2021-10-07 04:57:12','2025-05-10 05:52:28'),(166,1,63,1,1,0,1,'2021-10-07 04:57:12','2025-05-10 05:52:28'),(167,1,64,1,1,1,1,'2021-10-07 04:57:12','2025-05-10 05:52:28'),(168,1,65,1,1,1,1,'2021-10-07 04:57:12','2025-05-10 05:52:28'),(169,1,66,1,1,1,1,'2021-10-07 04:57:12','2025-05-10 05:52:28'),(170,1,67,1,1,1,1,'2021-10-07 04:57:12','2025-05-10 05:52:28'),(171,1,43,1,1,1,1,'2021-09-15 21:54:11','2025-05-10 05:52:28'),(172,1,44,1,0,0,0,'2021-09-15 21:53:24','2025-05-10 05:52:28'),(175,1,283,1,1,1,1,'2021-09-17 22:22:19','2025-05-10 05:52:28'),(176,1,284,1,1,1,1,'2021-09-17 22:22:19','2025-05-10 05:52:28'),(177,1,285,1,1,1,1,'2021-09-17 22:22:19','2025-05-10 05:52:28'),(178,1,286,1,1,1,1,'2021-09-17 22:22:19','2025-05-10 05:52:28'),(181,1,146,1,1,1,1,'2021-09-17 02:03:26','2025-05-10 05:52:28'),(182,1,148,1,1,1,1,'2021-09-17 02:03:26','2025-05-10 05:52:28'),(184,1,86,1,1,1,1,'2021-09-17 23:02:51','2025-05-10 05:52:28'),(192,1,127,1,0,0,0,'2021-09-16 00:46:49','2025-05-10 05:52:28'),(193,1,118,1,0,0,0,'2021-09-16 00:59:08','2025-05-10 05:52:28'),(194,1,152,1,1,1,1,'2021-09-16 23:30:15','2025-05-10 05:52:28'),(195,1,153,1,1,1,1,'2021-09-16 19:14:09','2025-05-10 05:52:28'),(197,1,354,1,0,1,0,'2021-09-17 19:42:16','2025-05-10 05:52:28'),(199,1,261,1,1,1,1,'2021-09-17 19:42:16','2025-05-10 05:52:28'),(200,1,262,1,1,1,1,'2021-09-17 19:42:16','2025-05-10 05:52:28'),(201,1,315,1,1,0,1,'2021-09-17 19:42:16','2025-05-10 05:52:28'),(202,1,244,1,0,1,0,'2021-09-16 20:29:17','2025-05-10 05:52:28'),(221,1,138,1,1,1,1,'2021-10-07 04:55:23','2025-05-10 05:52:28'),(222,1,139,1,1,1,1,'2021-10-07 04:55:23','2025-05-10 05:52:28'),(223,1,143,1,1,1,1,'2021-10-07 04:55:23','2025-05-10 05:52:28'),(224,1,144,1,1,0,1,'2021-10-07 04:55:23','2025-05-10 05:52:28'),(226,1,197,1,0,1,0,'2021-09-17 02:01:37','2025-05-10 05:52:28'),(228,1,248,1,0,1,0,'2021-10-07 04:55:23','2025-05-10 05:52:28'),(229,1,301,1,0,0,0,'2021-09-16 22:16:20','2025-05-10 05:52:28'),(230,1,308,1,0,0,0,'2021-09-16 22:16:20','2025-05-10 05:52:28'),(236,1,149,1,1,1,1,'2021-10-22 00:28:29','2025-05-10 05:52:28'),(237,1,175,1,1,1,1,'2021-10-22 00:28:29','2025-05-10 05:52:28'),(238,1,243,1,0,1,0,'2021-10-22 00:28:29','2025-05-10 05:52:28'),(239,1,257,1,1,1,1,'2021-10-22 00:28:29','2025-05-10 05:52:28'),(243,1,314,1,1,0,1,'2021-10-22 00:28:29','2025-05-10 05:52:28'),(245,1,310,1,0,0,0,'2021-09-16 22:29:09','2025-05-10 05:52:28'),(247,1,355,1,0,1,0,'2021-10-22 00:28:29','2025-05-10 05:52:28'),(248,1,260,1,1,1,1,'2021-10-22 00:28:29','2025-05-10 05:52:28'),(249,1,263,1,1,1,1,'2021-10-22 00:28:29','2025-05-10 05:52:28'),(250,1,312,1,0,1,0,'2021-10-22 00:28:29','2025-05-10 05:52:28'),(254,1,135,1,1,1,1,'2021-10-07 04:54:53','2025-05-10 05:52:28'),(255,1,137,1,1,1,1,'2021-10-07 04:54:53','2025-05-10 05:52:28'),(257,1,219,1,0,0,0,'2021-09-17 01:09:11','2025-05-10 05:52:28'),(258,1,221,1,1,1,1,'2021-09-18 00:55:57','2025-05-10 05:52:28'),(259,1,222,1,1,0,1,'2021-09-17 01:13:33','2025-05-10 05:52:28'),(260,1,299,1,1,1,1,'2021-09-17 01:14:24','2025-05-10 05:52:28'),(261,1,303,1,1,1,1,'2021-09-17 01:17:48','2025-05-10 05:52:28'),(262,1,304,1,0,0,0,'2021-09-17 01:21:20','2025-05-10 05:52:28'),(263,1,305,1,0,1,0,'2021-09-17 01:22:28','2025-05-10 05:52:28'),(264,1,306,1,0,0,0,'2021-09-17 01:22:43','2025-05-10 05:52:28'),(265,1,307,1,0,0,0,'2021-09-17 01:23:28','2025-05-10 05:52:28'),(266,1,319,1,1,1,1,'2021-10-07 05:01:26','2025-05-10 05:52:28'),(274,1,220,1,1,1,1,'2021-09-17 02:02:20','2025-05-10 05:52:28'),(275,1,326,1,1,1,1,'2021-09-17 18:09:51','2025-05-10 05:52:28'),(276,1,200,1,1,0,1,'2021-09-17 18:59:44','2025-05-10 05:52:28'),(277,1,225,1,1,1,1,'2021-09-17 19:10:09','2025-05-10 05:52:28'),(278,1,226,1,1,1,1,'2021-09-17 19:10:09','2025-05-10 05:52:28'),(279,1,224,1,0,0,0,'2021-09-17 19:38:24','2025-05-10 05:52:28'),(280,1,313,1,1,0,1,'2021-09-17 19:39:06','2025-05-10 05:52:28'),(281,1,171,1,1,1,1,'2021-09-17 19:46:07','2025-05-10 05:52:28'),(282,1,353,1,0,1,0,'2021-09-17 19:46:38','2025-05-10 05:52:28'),(283,1,168,1,1,1,1,'2021-09-17 20:14:24','2025-05-10 05:52:28'),(284,1,169,1,1,1,1,'2021-09-17 20:16:16','2025-05-10 05:52:28'),(285,1,311,1,1,1,1,'2021-09-17 20:24:00','2025-05-10 05:52:28'),(286,1,246,1,1,1,1,'2021-09-17 20:26:44','2025-05-10 05:52:28'),(287,1,202,1,1,0,1,'2021-09-17 20:30:46','2025-05-10 05:52:28'),(288,1,293,1,1,1,1,'2021-09-17 20:30:46','2025-05-10 05:52:28'),(289,1,302,1,1,0,1,'2021-09-17 20:30:46','2025-05-10 05:52:28'),(290,1,173,1,1,1,1,'2021-09-17 20:36:23','2025-05-10 05:52:28'),(291,1,347,1,0,1,1,'2021-09-17 20:36:23','2025-05-10 05:52:28'),(292,1,273,1,0,1,0,'2021-09-17 21:43:50','2025-05-10 05:52:28'),(293,1,9,1,1,1,1,'2021-09-17 21:47:50','2025-05-10 05:52:28'),(294,1,10,1,1,1,1,'2021-09-17 21:47:50','2025-05-10 05:52:28'),(295,1,176,1,1,1,1,'2021-09-20 23:45:51','2025-05-10 05:52:28'),(296,1,102,1,1,1,1,'2021-10-07 05:04:58','2025-05-10 05:52:28'),(297,1,31,1,1,0,1,'2021-10-07 00:40:13','2025-05-10 05:52:28'),(298,1,32,1,1,1,1,'2021-09-17 22:47:43','2025-05-10 05:52:28'),(299,1,33,1,1,1,1,'2021-09-17 22:47:43','2025-05-10 05:52:28'),(300,1,34,1,1,1,1,'2021-09-17 22:47:43','2025-05-10 05:52:28'),(301,1,35,1,1,1,1,'2021-09-17 22:47:43','2025-05-10 05:52:28'),(302,1,104,1,1,1,1,'2021-09-17 22:47:43','2025-05-10 05:52:28'),(303,1,87,1,0,0,0,'2021-09-17 23:01:48','2025-05-10 05:52:28'),(304,1,88,1,1,1,0,'2021-09-17 23:33:38','2025-05-10 05:52:28'),(305,1,90,1,1,0,1,'2021-09-17 23:34:45','2025-05-10 05:52:28'),(306,1,108,1,1,1,1,'2021-09-17 23:37:46','2025-05-10 05:52:28'),(307,1,109,1,1,0,1,'2021-09-17 23:39:39','2025-05-10 05:52:28'),(308,1,110,1,1,1,1,'2021-10-07 04:56:43','2025-05-10 05:52:28'),(309,1,111,1,1,1,1,'2021-10-07 04:56:43','2025-05-10 05:52:28'),(310,1,112,1,1,1,1,'2021-10-07 04:56:43','2025-05-10 05:52:28'),(311,1,249,1,1,1,1,'2021-10-07 04:56:43','2025-05-10 05:52:28'),(313,1,203,1,1,1,1,'2021-09-17 23:08:50','2025-05-10 05:52:28'),(314,1,264,1,1,0,1,'2021-09-17 23:08:50','2025-05-10 05:52:28'),(315,1,289,1,1,1,1,'2021-09-17 23:08:50','2025-05-10 05:52:28'),(316,1,290,1,1,1,1,'2021-09-17 23:08:50','2025-05-10 05:52:28'),(317,1,165,1,1,1,1,'2021-09-17 23:23:51','2025-05-10 05:52:28'),(318,1,166,1,1,1,1,'2021-09-17 23:23:51','2025-05-10 05:52:28'),(319,1,247,1,1,1,1,'2021-09-17 23:23:51','2025-05-10 05:52:28'),(320,1,318,1,1,0,1,'2021-09-17 23:23:51','2025-05-10 05:52:28'),(324,2,237,1,0,0,0,'2021-09-18 01:01:56','2025-05-10 05:52:28'),(327,2,135,1,1,1,0,'2021-10-07 01:01:51','2025-05-10 05:52:28'),(334,2,221,1,1,1,1,'2021-09-18 01:25:50','2025-05-10 05:52:28'),(335,2,222,1,1,0,1,'2021-09-18 01:26:52','2025-05-10 05:52:28'),(336,2,299,1,0,0,0,'2021-10-07 01:01:51','2025-05-10 05:52:28'),(337,2,303,1,0,0,0,'2021-10-07 01:01:51','2025-05-10 05:52:28'),(339,2,305,1,0,1,0,'2021-09-18 01:38:56','2025-05-10 05:52:28'),(341,2,307,1,0,0,0,'2021-09-18 01:43:41','2025-05-10 05:52:28'),(343,2,320,1,0,0,0,'2021-09-18 01:44:37','2025-05-10 05:52:28'),(346,2,138,1,1,1,0,'2021-10-07 01:02:47','2025-05-10 05:52:28'),(350,2,143,1,1,1,1,'2021-09-19 23:54:42','2025-05-10 05:52:28'),(351,2,144,1,1,0,1,'2021-09-19 23:54:42','2025-05-10 05:52:28'),(354,2,329,1,0,0,0,'2021-09-18 02:23:47','2025-05-10 05:52:28'),(356,2,326,1,0,0,0,'2021-10-07 05:33:02','2025-05-10 05:52:28'),(357,3,132,1,1,1,1,'2021-09-21 20:39:45','2025-05-10 05:52:28'),(358,3,134,1,1,1,1,'2021-09-19 19:30:16','2025-05-10 05:52:28'),(362,3,135,1,1,1,1,'2021-09-19 19:45:00','2025-05-10 05:52:28'),(363,3,137,1,1,1,1,'2021-09-19 19:45:00','2025-05-10 05:52:28'),(364,3,192,1,0,1,0,'2021-09-19 19:46:00','2025-05-10 05:52:28'),(372,1,295,1,0,1,0,'2021-10-07 04:56:29','2025-05-10 05:52:28'),(373,3,218,1,0,0,0,'2021-09-19 21:47:53','2025-05-10 05:52:28'),(374,3,219,1,0,0,0,'2021-09-19 21:48:21','2025-05-10 05:52:28'),(375,3,221,1,1,1,1,'2021-09-19 21:48:54','2025-05-10 05:52:28'),(376,3,222,1,1,0,1,'2021-09-19 21:51:36','2025-05-10 05:52:28'),(377,3,299,1,1,1,1,'2021-09-19 21:53:11','2025-05-10 05:52:28'),(378,3,303,1,1,1,1,'2021-09-19 22:05:35','2025-05-10 05:52:28'),(379,2,139,1,1,1,0,'2021-10-07 01:02:47','2025-05-10 05:52:28'),(380,3,304,1,0,0,0,'2021-09-19 22:21:44','2025-05-10 05:52:28'),(382,3,305,1,0,1,0,'2021-09-19 22:23:53','2025-05-10 05:52:28'),(384,2,198,1,0,0,0,'2021-09-19 22:24:26','2025-05-10 05:52:28'),(386,2,300,1,1,1,1,'2021-09-19 23:54:42','2025-05-10 05:52:28'),(387,2,301,1,0,0,0,'2021-09-19 22:24:26','2025-05-10 05:52:28'),(388,2,308,1,0,0,0,'2021-09-19 22:24:26','2025-05-10 05:52:28'),(389,2,309,1,0,0,0,'2021-09-19 22:24:26','2025-05-10 05:52:28'),(391,2,323,1,1,1,1,'2021-09-19 23:54:42','2025-05-10 05:52:28'),(392,2,324,1,1,1,1,'2021-09-19 23:54:42','2025-05-10 05:52:28'),(393,2,325,1,1,1,1,'2021-09-19 23:54:42','2025-05-10 05:52:28'),(394,3,306,1,0,0,0,'2021-09-19 22:24:51','2025-05-10 05:52:28'),(395,3,307,1,0,0,0,'2021-09-19 22:26:27','2025-05-10 05:52:28'),(396,3,319,1,1,1,1,'2021-09-19 22:27:25','2025-05-10 05:52:28'),(397,3,320,1,0,0,0,'2021-09-19 22:38:28','2025-05-10 05:52:28'),(398,3,321,1,0,0,0,'2021-09-19 22:46:51','2025-05-10 05:52:28'),(399,3,138,1,1,1,1,'2021-09-19 22:47:05','2025-05-10 05:52:28'),(400,3,139,1,1,1,1,'2021-09-19 22:50:25','2025-05-10 05:52:28'),(401,3,140,1,1,1,1,'2021-09-19 22:51:13','2025-05-10 05:52:28'),(402,3,142,1,1,1,1,'2021-09-19 22:51:13','2025-05-10 05:52:28'),(403,3,143,1,1,1,1,'2021-09-19 22:51:13','2025-05-10 05:52:28'),(404,3,144,1,1,0,1,'2021-09-19 22:52:59','2025-05-10 05:52:28'),(405,3,196,1,1,1,1,'2021-09-19 22:56:19','2025-05-10 05:52:28'),(406,3,197,1,0,1,0,'2021-09-19 22:57:00','2025-05-10 05:52:28'),(407,3,198,1,0,0,0,'2021-09-19 22:57:21','2025-05-10 05:52:28'),(408,3,220,1,1,1,1,'2021-09-19 22:57:21','2025-05-10 05:52:28'),(409,3,248,1,0,1,0,'2021-09-19 22:58:10','2025-05-10 05:52:28'),(410,3,300,1,1,1,1,'2021-09-19 22:58:10','2025-05-10 05:52:28'),(411,3,301,1,0,0,0,'2021-09-19 22:59:15','2025-05-10 05:52:28'),(412,3,308,1,0,0,0,'2021-09-19 22:59:50','2025-05-10 05:52:28'),(413,3,309,1,0,1,0,'2021-09-19 23:00:17','2025-05-10 05:52:28'),(414,3,310,1,0,0,0,'2021-09-19 23:00:37','2025-05-10 05:52:28'),(415,3,322,1,1,1,1,'2021-09-19 23:01:22','2025-05-10 05:52:28'),(416,3,323,1,1,1,1,'2021-09-19 23:02:41','2025-05-10 05:52:28'),(417,3,324,1,1,1,1,'2021-09-19 23:02:41','2025-05-10 05:52:28'),(418,3,325,1,1,1,1,'2021-09-19 23:02:41','2025-05-10 05:52:28'),(419,3,326,1,1,1,1,'2021-09-19 23:03:57','2025-05-10 05:52:28'),(420,3,327,1,0,0,0,'2021-09-19 23:10:25','2025-05-10 05:52:28'),(421,3,329,1,0,0,0,'2021-09-19 23:10:25','2025-05-10 05:52:28'),(422,3,146,1,0,0,0,'2021-09-21 21:58:29','2025-05-10 05:52:28'),(424,2,327,1,0,0,0,'2021-09-19 23:14:27','2025-05-10 05:52:28'),(425,3,236,1,1,1,1,'2021-10-07 02:00:54','2025-05-10 05:52:28'),(433,3,226,1,0,0,0,'2021-09-20 19:02:48','2025-05-10 05:52:28'),(435,3,291,1,0,0,0,'2021-09-20 19:02:48','2025-05-10 05:52:28'),(436,3,292,1,0,0,0,'2021-09-20 19:02:48','2025-05-10 05:52:28'),(438,3,149,1,0,0,0,'2021-10-07 01:50:27','2025-05-10 05:52:28'),(444,3,312,1,0,0,0,'2021-10-07 01:50:27','2025-05-10 05:52:28'),(447,2,149,1,0,0,0,'2021-10-07 01:17:28','2025-05-10 05:52:28'),(453,2,312,1,0,1,0,'2021-09-20 00:04:18','2025-05-10 05:52:28'),(454,2,314,1,1,0,1,'2021-09-22 19:32:53','2025-05-10 05:52:28'),(455,2,355,1,0,1,0,'2021-09-20 00:04:18','2025-05-10 05:52:28'),(456,3,152,1,0,0,0,'2021-10-07 01:50:59','2025-05-10 05:52:28'),(463,3,353,1,0,0,0,'2021-10-07 01:50:59','2025-05-10 05:52:28'),(465,2,152,1,0,0,0,'2021-10-07 01:21:53','2025-05-10 05:52:28'),(466,2,153,1,0,0,0,'2021-10-07 01:22:48','2025-05-10 05:52:28'),(472,2,353,1,0,1,0,'2021-09-20 00:34:19','2025-05-10 05:52:28'),(474,3,168,1,0,0,0,'2021-10-07 01:56:13','2025-05-10 05:52:28'),(475,2,146,1,0,0,0,'2021-10-07 01:12:21','2025-05-10 05:52:28'),(476,2,148,1,0,0,0,'2021-10-07 01:12:21','2025-05-10 05:52:28'),(478,2,200,1,0,0,0,'2021-10-07 01:14:19','2025-05-10 05:52:28'),(481,2,225,1,0,0,0,'2021-10-07 01:14:19','2025-05-10 05:52:28'),(484,2,291,1,1,0,0,'2021-10-07 05:33:32','2025-05-10 05:52:28'),(485,2,292,1,1,0,0,'2021-10-07 05:33:32','2025-05-10 05:52:28'),(486,2,313,1,1,0,0,'2021-10-07 05:33:32','2025-05-10 05:52:28'),(495,3,270,1,1,0,1,'2021-09-20 01:25:18','2025-05-10 05:52:28'),(496,2,168,1,0,0,0,'2021-10-07 01:24:37','2025-05-10 05:52:28'),(498,2,202,1,0,0,0,'2021-10-07 01:24:42','2025-05-10 05:52:28'),(500,2,293,1,0,0,0,'2021-10-07 01:25:10','2025-05-10 05:52:28'),(501,2,302,1,0,0,0,'2021-10-07 01:25:10','2025-05-10 05:52:28'),(502,2,311,1,0,0,0,'2021-10-07 01:25:10','2025-05-10 05:52:28'),(503,2,317,1,1,0,1,'2021-09-21 02:02:20','2025-05-10 05:52:28'),(504,3,102,1,1,1,1,'2021-09-20 01:26:19','2025-05-10 05:52:28'),(506,3,118,1,0,0,0,'2021-09-20 01:29:24','2025-05-10 05:52:28'),(519,3,173,1,0,0,0,'2021-10-07 01:56:37','2025-05-10 05:52:28'),(520,3,347,1,0,0,0,'2021-10-07 01:56:37','2025-05-10 05:52:28'),(527,3,176,1,0,0,0,'2021-10-07 02:01:51','2025-05-10 05:52:28'),(530,3,289,1,0,0,0,'2021-10-07 02:01:51','2025-05-10 05:52:28'),(531,3,290,1,0,0,0,'2021-10-07 02:01:51','2025-05-10 05:52:28'),(533,3,330,1,0,0,0,'2021-09-20 01:46:52','2025-05-10 05:52:28'),(534,3,331,1,0,0,0,'2021-10-07 05:42:53','2025-05-10 05:52:28'),(535,3,332,1,0,0,0,'2021-09-20 01:46:52','2025-05-10 05:52:28'),(536,3,333,1,0,0,0,'2021-09-20 01:46:52','2025-05-10 05:52:28'),(537,3,334,1,0,0,0,'2021-09-20 01:46:52','2025-05-10 05:52:28'),(538,3,335,1,0,0,0,'2021-10-07 02:00:10','2025-05-10 05:52:28'),(539,3,336,1,0,0,0,'2021-09-20 01:46:52','2025-05-10 05:52:28'),(540,3,337,1,0,0,0,'2021-09-20 01:46:52','2025-05-10 05:52:28'),(541,3,338,1,0,0,0,'2021-09-20 01:46:52','2025-05-10 05:52:28'),(542,3,339,1,0,0,0,'2021-10-07 02:00:10','2025-05-10 05:52:28'),(543,3,340,1,0,0,0,'2021-09-20 01:46:52','2025-05-10 05:52:28'),(544,3,341,1,0,0,0,'2021-09-21 02:32:35','2025-05-10 05:52:28'),(545,3,342,1,0,0,0,'2021-09-20 01:46:52','2025-05-10 05:52:28'),(546,3,343,1,0,0,0,'2021-09-20 01:46:52','2025-05-10 05:52:28'),(547,3,344,1,0,0,0,'2021-09-20 01:46:52','2025-05-10 05:52:28'),(548,3,345,1,0,0,0,'2021-09-20 01:46:52','2025-05-10 05:52:28'),(550,3,166,1,0,0,0,'2021-09-21 01:50:56','2025-05-10 05:52:28'),(565,3,204,1,1,1,1,'2021-09-20 18:43:10','2025-05-10 05:52:28'),(566,3,205,1,0,0,0,'2021-09-20 02:08:03','2025-05-10 05:52:28'),(567,3,216,1,0,0,0,'2021-09-20 02:08:03','2025-05-10 05:52:28'),(568,3,217,1,0,0,0,'2021-09-20 02:08:03','2025-05-10 05:52:28'),(573,3,214,1,1,1,1,'2021-09-20 02:18:50','2025-05-10 05:52:28'),(574,3,215,1,1,1,1,'2021-09-20 02:18:50','2025-05-10 05:52:28'),(577,3,294,1,1,1,1,'2021-10-07 05:43:36','2025-05-10 05:52:28'),(578,3,295,1,0,1,0,'2021-09-20 23:39:37','2025-05-10 05:52:28'),(579,3,296,1,1,1,1,'2021-09-20 23:39:37','2025-05-10 05:52:28'),(580,3,297,1,0,0,0,'2021-10-07 05:43:36','2025-05-10 05:52:28'),(581,3,298,1,0,0,0,'2021-10-07 05:43:36','2025-05-10 05:52:28'),(584,2,165,1,0,0,0,'2021-10-07 05:35:28','2025-05-10 05:52:28'),(585,2,166,1,0,0,0,'2021-10-07 01:35:03','2025-05-10 05:52:28'),(594,2,204,1,1,1,1,'2021-09-20 18:35:02','2025-05-10 05:52:28'),(596,2,216,1,0,0,0,'2021-09-20 18:14:53','2025-05-10 05:52:28'),(597,2,217,1,0,0,0,'2021-09-20 18:14:53','2025-05-10 05:52:28'),(607,2,294,1,1,1,1,'2021-09-20 20:46:45','2025-05-10 05:52:28'),(608,2,295,1,0,1,0,'2021-09-20 19:50:38','2025-05-10 05:52:28'),(609,2,296,1,1,1,1,'2021-09-20 20:46:45','2025-05-10 05:52:28'),(610,2,297,1,0,1,0,'2021-09-20 19:50:38','2025-05-10 05:52:28'),(611,2,298,1,0,1,0,'2021-09-20 19:50:38','2025-05-10 05:52:28'),(612,2,102,1,1,1,1,'2021-10-07 01:46:19','2025-05-10 05:52:28'),(614,2,304,1,0,0,0,'2021-09-20 20:11:46','2025-05-10 05:52:28'),(619,3,302,1,0,0,0,'2021-10-07 01:56:13','2025-05-10 05:52:28'),(620,3,311,1,0,0,0,'2021-10-07 01:56:13','2025-05-10 05:52:28'),(624,3,269,1,1,0,1,'2021-09-20 20:50:56','2025-05-10 05:52:28'),(626,2,176,1,1,1,1,'2021-09-20 20:55:32','2025-05-10 05:52:28'),(627,2,203,1,1,1,1,'2021-09-20 20:55:32','2025-05-10 05:52:28'),(629,2,289,1,1,1,1,'2021-09-20 20:55:32','2025-05-10 05:52:28'),(630,2,290,1,1,1,1,'2021-09-20 20:55:32','2025-05-10 05:52:28'),(631,2,9,1,1,1,1,'2021-10-07 01:27:11','2025-05-10 05:52:28'),(632,2,10,1,1,1,1,'2021-10-07 01:27:11','2025-05-10 05:52:28'),(633,2,12,1,1,1,1,'2021-09-20 21:09:31','2025-05-10 05:52:28'),(634,2,13,1,1,1,1,'2021-09-22 19:19:22','2025-05-10 05:52:28'),(639,2,330,1,0,0,0,'2021-09-20 22:27:44','2025-05-10 05:52:28'),(640,2,331,1,1,0,0,'2021-09-20 22:53:32','2025-05-10 05:52:28'),(641,2,332,1,0,0,0,'2021-09-20 22:27:44','2025-05-10 05:52:28'),(642,2,333,1,1,0,0,'2021-09-20 22:53:32','2025-05-10 05:52:28'),(643,2,334,1,0,0,0,'2021-09-20 22:27:44','2025-05-10 05:52:28'),(644,2,335,1,1,0,0,'2021-09-21 01:52:27','2025-05-10 05:52:28'),(646,2,337,1,1,0,0,'2021-09-21 19:15:44','2025-05-10 05:52:28'),(647,2,338,1,0,0,0,'2021-09-20 22:27:44','2025-05-10 05:52:28'),(648,2,339,1,1,0,0,'2021-09-21 00:38:37','2025-05-10 05:52:28'),(649,2,340,1,0,0,0,'2021-09-20 22:27:44','2025-05-10 05:52:28'),(650,2,341,1,1,0,0,'2021-09-22 19:19:22','2025-05-10 05:52:28'),(651,2,342,1,0,0,0,'2021-09-20 22:27:44','2025-05-10 05:52:28'),(652,2,343,1,1,0,0,'2021-09-22 19:19:22','2025-05-10 05:52:28'),(653,2,344,1,0,0,0,'2021-09-20 22:27:44','2025-05-10 05:52:28'),(654,2,345,1,0,0,0,'2021-09-20 22:27:44','2025-05-10 05:52:28'),(655,2,48,1,0,0,0,'2021-09-20 23:01:51','2025-05-10 05:52:28'),(658,2,178,1,0,0,0,'2021-09-20 23:01:51','2025-05-10 05:52:28'),(659,2,179,1,0,0,0,'2021-09-20 23:01:51','2025-05-10 05:52:28'),(660,2,180,1,0,0,0,'2021-09-20 23:01:51','2025-05-10 05:52:28'),(661,2,181,1,0,0,0,'2021-09-20 23:01:51','2025-05-10 05:52:28'),(662,2,182,1,0,0,0,'2021-09-20 23:01:51','2025-05-10 05:52:28'),(667,2,188,1,0,0,0,'2021-09-20 23:01:51','2025-05-10 05:52:28'),(668,2,189,1,0,0,0,'2021-09-20 23:01:51','2025-05-10 05:52:28'),(669,2,206,1,0,0,0,'2021-09-20 23:01:51','2025-05-10 05:52:28'),(670,2,207,1,0,0,0,'2021-09-20 23:01:51','2025-05-10 05:52:28'),(671,2,208,1,0,0,0,'2021-09-20 23:01:51','2025-05-10 05:52:28'),(672,2,209,1,0,0,0,'2021-09-20 23:01:51','2025-05-10 05:52:28'),(673,2,210,1,0,0,0,'2021-09-20 23:01:51','2025-05-10 05:52:28'),(675,2,212,1,0,0,0,'2021-09-20 23:01:51','2025-05-10 05:52:28'),(676,2,213,1,0,0,0,'2021-09-20 23:01:51','2025-05-10 05:52:28'),(677,2,250,1,0,0,0,'2021-09-20 23:01:51','2025-05-10 05:52:28'),(678,2,251,1,0,0,0,'2021-09-20 23:01:51','2025-05-10 05:52:28'),(679,2,253,1,0,0,0,'2021-09-20 23:01:51','2025-05-10 05:52:28'),(680,2,254,1,0,0,0,'2021-09-20 23:01:51','2025-05-10 05:52:28'),(681,2,255,1,0,0,0,'2021-09-20 23:01:51','2025-05-10 05:52:28'),(687,2,271,1,0,0,0,'2021-09-20 23:01:51','2025-05-10 05:52:28'),(688,2,272,1,0,0,0,'2021-09-20 23:01:51','2025-05-10 05:52:28'),(689,2,349,1,0,0,0,'2021-09-20 23:01:51','2025-05-10 05:52:28'),(690,2,350,1,0,0,0,'2021-09-20 23:01:51','2025-05-10 05:52:28'),(691,2,351,1,0,0,0,'2021-09-20 23:01:51','2025-05-10 05:52:28'),(692,2,352,1,0,0,0,'2021-09-20 23:01:51','2025-05-10 05:52:28'),(693,3,86,1,0,0,0,'2021-10-07 02:07:51','2025-05-10 05:52:28'),(695,2,43,1,1,1,1,'2021-09-21 00:07:38','2025-05-10 05:52:28'),(696,2,44,1,0,0,0,'2021-09-20 23:59:29','2025-05-10 05:52:28'),(700,3,109,1,1,0,1,'2021-10-07 02:07:51','2025-05-10 05:52:28'),(703,2,27,1,1,0,1,'2021-09-21 00:22:26','2025-05-10 05:52:28'),(706,2,31,1,1,0,1,'2021-09-21 00:38:37','2025-05-10 05:52:28'),(707,2,32,1,1,1,1,'2021-09-21 00:38:37','2025-05-10 05:52:28'),(708,2,33,1,1,1,1,'2021-09-21 00:38:37','2025-05-10 05:52:28'),(709,2,34,1,1,1,1,'2021-09-21 00:38:37','2025-05-10 05:52:28'),(710,2,35,1,1,1,1,'2021-09-21 00:38:37','2025-05-10 05:52:28'),(711,2,104,1,1,1,1,'2021-09-21 00:38:37','2025-05-10 05:52:28'),(712,2,315,1,1,0,1,'2021-09-22 19:34:31','2025-05-10 05:52:28'),(726,3,43,1,1,1,1,'2021-09-21 01:03:20','2025-05-10 05:52:28'),(727,3,44,1,0,0,0,'2021-09-21 01:03:20','2025-05-10 05:52:28'),(728,3,27,1,1,0,1,'2021-09-21 01:12:55','2025-05-10 05:52:28'),(735,3,165,1,0,0,0,'2021-10-07 02:02:19','2025-05-10 05:52:28'),(750,3,267,1,1,1,1,'2021-09-21 01:47:43','2025-05-10 05:52:28'),(751,3,274,1,0,0,0,'2021-09-21 01:45:32','2025-05-10 05:52:28'),(752,3,279,1,1,1,1,'2021-09-21 01:47:43','2025-05-10 05:52:28'),(757,2,86,1,1,1,1,'2021-09-21 20:06:20','2025-05-10 05:52:28'),(764,2,283,1,1,1,1,'2021-09-22 01:07:28','2025-05-10 05:52:28'),(765,2,284,1,1,1,1,'2021-09-22 01:07:28','2025-05-10 05:52:28'),(766,2,285,1,1,1,1,'2021-09-22 01:07:28','2025-05-10 05:52:28'),(767,2,286,1,1,1,1,'2021-09-22 01:07:28','2025-05-10 05:52:28'),(768,3,48,1,0,0,0,'2021-09-21 02:12:03','2025-05-10 05:52:28'),(771,3,178,1,0,0,0,'2021-09-21 02:12:03','2025-05-10 05:52:28'),(775,3,182,1,0,0,0,'2021-09-21 02:12:03','2025-05-10 05:52:28'),(801,3,272,1,0,0,0,'2021-09-21 02:12:03','2025-05-10 05:52:28'),(806,2,88,1,0,0,0,'2021-10-07 05:36:29','2025-05-10 05:52:28'),(807,2,90,1,0,0,0,'2021-10-07 05:36:29','2025-05-10 05:52:28'),(809,2,109,1,1,0,1,'2021-09-27 06:57:53','2025-05-10 05:52:28'),(814,2,249,1,1,1,1,'2021-09-22 01:43:04','2025-05-10 05:52:28'),(816,2,310,1,0,0,0,'2021-09-21 18:00:40','2025-05-10 05:52:28'),(817,2,129,0,1,0,1,'2021-09-22 01:43:04','2025-05-10 05:52:28'),(819,1,362,1,0,0,0,'2021-09-21 18:50:19','2025-05-10 05:52:28'),(820,1,363,1,1,1,1,'2021-09-21 19:07:31','2025-05-10 05:52:28'),(821,1,364,1,0,0,0,'2021-09-21 18:59:42','2025-05-10 05:52:28'),(822,1,365,1,1,1,1,'2021-09-21 19:03:37','2025-05-10 05:52:28'),(823,1,366,1,0,0,0,'2021-09-21 18:59:42','2025-05-10 05:52:28'),(826,2,132,1,1,1,0,'2021-10-07 01:01:51','2025-05-10 05:52:28'),(849,2,319,1,0,0,0,'2021-10-07 05:31:49','2025-05-10 05:52:28'),(870,3,368,1,0,0,0,'2021-09-21 20:33:40','2025-05-10 05:52:28'),(924,8,152,1,0,0,0,'2021-10-07 04:04:37','2025-05-10 05:52:28'),(927,4,270,1,0,0,0,'2021-10-07 02:27:36','2025-05-10 05:52:28'),(948,4,334,1,0,0,0,'2021-09-21 23:56:07','2025-05-10 05:52:28'),(949,4,335,1,1,0,0,'2021-09-30 06:47:45','2025-05-10 05:52:28'),(962,4,176,1,1,1,1,'2021-10-07 05:52:38','2025-05-10 05:52:28'),(963,4,203,1,1,1,1,'2021-10-07 05:52:38','2025-05-10 05:52:28'),(965,4,289,1,1,1,1,'2021-09-30 07:32:30','2025-05-10 05:52:28'),(966,4,290,1,1,1,1,'2021-09-30 07:32:30','2025-05-10 05:52:28'),(983,4,216,1,0,0,0,'2021-09-22 00:25:36','2025-05-10 05:52:28'),(984,4,217,1,0,0,0,'2021-09-22 00:34:54','2025-05-10 05:52:28'),(990,4,86,1,0,0,0,'2021-10-07 02:37:32','2025-05-10 05:52:28'),(995,4,109,1,1,0,1,'2021-10-01 00:27:47','2025-05-10 05:52:28'),(1001,2,118,1,0,0,0,'2021-09-22 00:55:25','2025-05-10 05:52:28'),(1016,4,43,1,1,1,1,'2021-09-22 01:04:08','2025-05-10 05:52:28'),(1017,4,44,1,0,0,0,'2021-09-22 01:04:08','2025-05-10 05:52:28'),(1018,4,27,1,1,0,1,'2021-09-22 01:12:34','2025-05-10 05:52:28'),(1060,4,179,1,0,0,0,'2021-09-22 01:51:01','2025-05-10 05:52:28'),(1099,2,336,1,0,0,0,'2021-09-22 19:19:22','2025-05-10 05:52:28'),(1119,1,367,1,1,1,1,'2021-10-07 05:04:40','2025-05-10 05:52:28'),(1134,9,102,1,1,1,1,'2021-09-22 20:44:30','2025-05-10 05:52:28'),(1136,9,132,1,0,0,0,'2021-10-07 04:18:18','2025-05-10 05:52:28'),(1137,9,134,1,0,0,0,'2021-10-07 04:18:34','2025-05-10 05:52:28'),(1138,9,135,1,0,0,0,'2021-10-07 04:18:50','2025-05-10 05:52:28'),(1141,9,218,1,0,0,0,'2021-09-22 20:46:41','2025-05-10 05:52:28'),(1142,9,219,1,0,0,0,'2021-09-22 20:46:41','2025-05-10 05:52:28'),(1145,9,299,1,1,1,1,'2021-09-22 22:31:25','2025-05-10 05:52:28'),(1146,9,303,1,0,0,0,'2021-10-07 04:24:16','2025-05-10 05:52:28'),(1147,9,304,1,0,0,0,'2021-09-22 20:46:41','2025-05-10 05:52:28'),(1148,9,305,1,0,0,0,'2021-10-07 04:25:46','2025-05-10 05:52:28'),(1150,9,307,1,0,0,0,'2021-09-22 20:46:41','2025-05-10 05:52:28'),(1151,9,319,1,0,0,0,'2021-10-07 04:25:46','2025-05-10 05:52:28'),(1165,5,308,1,0,0,0,'2021-09-22 20:57:37','2025-05-10 05:52:28'),(1175,5,329,1,0,0,0,'2021-09-22 22:14:39','2025-05-10 05:52:28'),(1188,1,53,1,1,0,0,'2021-09-22 23:24:10','2025-05-10 05:52:28'),(1189,5,149,1,1,1,1,'2021-09-22 22:40:24','2025-05-10 05:52:28'),(1190,5,175,1,1,1,1,'2021-09-22 22:59:48','2025-05-10 05:52:28'),(1191,5,243,1,0,1,0,'2021-09-22 22:59:48','2025-05-10 05:52:28'),(1193,5,260,1,1,1,1,'2021-09-22 22:59:48','2025-05-10 05:52:28'),(1194,5,263,1,1,1,1,'2021-09-22 22:59:48','2025-05-10 05:52:28'),(1195,5,312,1,0,1,0,'2021-09-22 22:59:48','2025-05-10 05:52:28'),(1196,5,314,1,1,0,1,'2021-09-22 22:59:48','2025-05-10 05:52:28'),(1197,5,355,1,0,1,0,'2021-09-22 22:59:48','2025-05-10 05:52:28'),(1204,9,138,1,0,0,0,'2021-10-07 04:51:18','2025-05-10 05:52:28'),(1205,9,139,1,0,0,0,'2021-10-07 04:51:18','2025-05-10 05:52:28'),(1206,9,140,1,1,1,1,'2021-10-23 04:56:32','2025-05-10 05:52:28'),(1207,9,142,1,1,1,1,'2021-10-23 04:56:32','2025-05-10 05:52:28'),(1210,9,196,1,0,0,0,'2021-10-07 04:27:45','2025-05-10 05:52:28'),(1212,9,198,1,0,0,0,'2021-09-22 23:19:30','2025-05-10 05:52:28'),(1213,9,220,1,0,0,0,'2021-10-07 04:27:45','2025-05-10 05:52:28'),(1215,9,300,1,1,1,1,'2021-09-23 01:24:52','2025-05-10 05:52:28'),(1216,9,301,1,0,0,0,'2021-09-22 23:19:30','2025-05-10 05:52:28'),(1217,9,308,1,0,0,0,'2021-09-22 23:19:30','2025-05-10 05:52:28'),(1218,9,309,1,0,0,0,'2021-10-07 04:27:45','2025-05-10 05:52:28'),(1220,9,322,1,1,1,1,'2021-09-23 01:24:52','2025-05-10 05:52:28'),(1224,9,326,1,0,0,0,'2021-10-07 04:27:45','2025-05-10 05:52:28'),(1225,9,327,1,0,0,0,'2021-09-22 23:19:30','2025-05-10 05:52:28'),(1226,9,329,1,0,0,0,'2021-09-22 23:19:30','2025-05-10 05:52:28'),(1235,1,191,1,0,0,0,'2021-09-22 23:49:17','2025-05-10 05:52:28'),(1246,5,317,1,1,0,1,'2021-09-23 00:16:36','2025-05-10 05:52:28'),(1248,5,270,1,0,0,0,'2021-10-07 03:23:02','2025-05-10 05:52:28'),(1250,5,102,1,1,1,1,'2021-09-23 00:32:09','2025-05-10 05:52:28'),(1251,5,346,1,0,0,0,'2021-09-23 00:32:09','2025-05-10 05:52:28'),(1269,5,337,1,1,0,0,'2021-09-23 01:31:48','2025-05-10 05:52:28'),(1278,5,236,1,0,0,0,'2021-10-07 03:26:02','2025-05-10 05:52:28'),(1306,5,216,1,0,0,0,'2021-09-23 01:40:28','2025-05-10 05:52:28'),(1307,5,217,1,0,0,0,'2021-09-23 01:40:28','2025-05-10 05:52:28'),(1317,5,86,1,0,0,0,'2021-10-07 03:29:26','2025-05-10 05:52:28'),(1322,5,109,1,1,0,1,'2021-09-23 19:36:32','2025-05-10 05:52:28'),(1329,5,43,1,1,1,1,'2021-09-30 00:45:54','2025-05-10 05:52:28'),(1330,5,44,1,0,0,0,'2021-09-23 02:12:30','2025-05-10 05:52:28'),(1331,5,27,1,1,0,1,'2021-09-23 02:15:51','2025-05-10 05:52:28'),(1355,9,270,1,0,0,0,'2021-10-07 06:17:12','2025-05-10 05:52:28'),(1358,9,236,1,0,0,0,'2021-10-07 04:42:28','2025-05-10 05:52:28'),(1370,5,158,1,0,0,0,'2021-09-23 19:44:20','2025-05-10 05:52:28'),(1416,5,369,1,0,0,0,'2021-09-23 20:16:25','2025-05-10 05:52:28'),(1426,5,180,1,0,0,0,'2021-09-23 20:23:15','2025-05-10 05:52:28'),(1460,6,270,1,0,0,0,'2021-10-07 03:38:49','2025-05-10 05:52:28'),(1503,6,304,1,0,0,0,'2021-09-27 00:19:54','2025-05-10 05:52:28'),(1509,6,319,1,0,0,0,'2021-10-07 06:03:09','2025-05-10 05:52:28'),(1518,9,216,1,0,0,0,'2021-09-27 00:45:44','2025-05-10 05:52:28'),(1519,9,217,1,0,0,0,'2021-09-27 00:45:44','2025-05-10 05:52:28'),(1579,2,155,1,0,0,0,'2021-09-27 05:41:19','2025-05-10 05:52:28'),(1580,2,156,1,0,0,0,'2021-09-27 05:41:19','2025-05-10 05:52:28'),(1581,2,157,1,0,0,0,'2021-09-27 05:41:19','2025-05-10 05:52:28'),(1582,2,158,1,0,0,0,'2021-09-27 05:41:19','2025-05-10 05:52:28'),(1583,2,159,1,0,0,0,'2021-09-27 05:41:19','2025-05-10 05:52:28'),(1584,2,161,1,0,0,0,'2021-09-27 05:41:19','2025-05-10 05:52:28'),(1585,2,162,1,0,0,0,'2021-09-27 05:41:19','2025-05-10 05:52:28'),(1586,2,190,1,0,0,0,'2021-09-27 05:41:19','2025-05-10 05:52:28'),(1587,2,191,1,0,0,0,'2021-09-27 05:41:19','2025-05-10 05:52:28'),(1588,2,238,1,0,0,0,'2021-09-27 05:41:19','2025-05-10 05:52:28'),(1596,9,48,1,0,0,0,'2021-09-27 06:56:58','2025-05-10 05:52:28'),(1599,9,178,1,0,0,0,'2021-09-27 06:56:58','2025-05-10 05:52:28'),(1603,9,182,1,0,0,0,'2021-09-27 06:56:58','2025-05-10 05:52:28'),(1631,9,350,1,0,0,0,'2021-09-27 06:56:58','2025-05-10 05:52:28'),(1663,9,27,1,0,0,0,'2021-10-23 04:59:59','2025-05-10 05:52:28'),(1664,9,43,1,1,1,1,'2021-09-28 01:25:13','2025-05-10 05:52:28'),(1665,9,44,1,0,0,0,'2021-09-28 01:20:42','2025-05-10 05:52:28'),(1666,9,86,1,0,0,0,'2021-10-07 04:46:07','2025-05-10 05:52:28'),(1671,9,109,1,1,0,1,'2021-09-28 01:58:50','2025-05-10 05:52:28'),(1679,9,204,1,1,1,1,'2021-09-28 03:31:04','2025-05-10 05:52:28'),(1680,9,205,1,0,0,0,'2021-09-28 03:31:04','2025-05-10 05:52:28'),(1697,6,152,1,1,1,1,'2021-09-28 05:21:22','2025-05-10 05:52:28'),(1698,6,153,1,1,1,1,'2021-09-28 05:21:22','2025-05-10 05:52:28'),(1699,6,171,1,1,1,1,'2021-09-28 05:21:22','2025-05-10 05:52:28'),(1700,6,244,1,0,1,0,'2021-09-28 05:21:22','2025-05-10 05:52:28'),(1701,6,261,1,1,1,1,'2021-09-28 05:21:22','2025-05-10 05:52:28'),(1702,6,262,1,1,1,1,'2021-09-28 05:21:22','2025-05-10 05:52:28'),(1703,6,315,1,1,0,1,'2021-09-28 05:21:22','2025-05-10 05:52:28'),(1704,6,353,1,0,1,0,'2021-09-28 05:21:22','2025-05-10 05:52:28'),(1705,6,354,1,0,1,0,'2021-09-28 05:21:22','2025-05-10 05:52:28'),(1713,6,236,1,0,0,0,'2021-10-07 03:46:01','2025-05-10 05:52:28'),(1716,6,176,1,1,1,1,'2021-10-07 06:04:58','2025-05-10 05:52:28'),(1719,6,289,1,1,1,1,'2021-09-28 06:47:58','2025-05-10 05:52:28'),(1720,6,290,1,1,1,1,'2021-09-28 06:47:58','2025-05-10 05:52:28'),(1739,6,43,1,1,1,1,'2021-09-28 07:53:01','2025-05-10 05:52:28'),(1740,6,44,1,0,0,0,'2021-09-28 07:51:03','2025-05-10 05:52:28'),(1741,6,27,1,1,0,1,'2021-09-28 07:57:40','2025-05-10 05:52:28'),(1742,6,118,1,0,0,0,'2021-09-28 07:59:22','2025-05-10 05:52:28'),(1747,6,159,1,0,0,0,'2021-09-28 07:59:22','2025-05-10 05:52:28'),(1782,2,205,1,0,0,0,'2021-09-29 03:01:52','2025-05-10 05:52:28'),(1823,6,338,1,0,0,0,'2021-09-29 05:47:03','2025-05-10 05:52:28'),(1824,6,339,1,1,0,0,'2021-09-29 06:07:31','2025-05-10 05:52:28'),(1831,2,318,1,1,0,1,'2021-09-29 06:26:26','2025-05-10 05:52:28'),(1838,6,181,1,0,0,0,'2021-09-29 06:27:14','2025-05-10 05:52:28'),(1872,6,102,1,1,1,1,'2021-09-29 06:31:52','2025-05-10 05:52:28'),(1873,6,86,1,0,0,0,'2021-10-07 03:48:51','2025-05-10 05:52:28'),(1878,6,109,1,1,0,1,'2021-09-29 07:05:03','2025-05-10 05:52:28'),(1900,6,329,1,0,0,0,'2021-09-29 07:59:38','2025-05-10 05:52:28'),(1906,5,370,1,0,0,0,'2021-09-30 02:11:43','2025-05-10 05:52:28'),(1908,4,146,1,1,1,1,'2021-10-07 02:24:11','2025-05-10 05:52:28'),(1909,4,148,1,1,1,1,'2021-10-07 02:24:11','2025-05-10 05:52:28'),(1910,4,170,1,1,1,1,'2021-10-07 02:24:11','2025-05-10 05:52:28'),(1911,4,200,1,1,0,1,'2021-10-07 02:24:11','2025-05-10 05:52:28'),(1912,4,201,1,0,1,0,'2021-09-30 05:42:41','2025-05-10 05:52:28'),(1913,4,224,1,0,0,0,'2021-09-30 05:36:57','2025-05-10 05:52:28'),(1914,4,225,1,1,0,1,'2021-10-07 02:24:11','2025-05-10 05:52:28'),(1915,4,226,1,1,1,1,'2021-10-07 02:24:11','2025-05-10 05:52:28'),(1916,4,227,1,1,1,1,'2021-10-07 02:24:11','2025-05-10 05:52:28'),(1917,4,291,1,1,1,1,'2021-10-07 02:24:11','2025-05-10 05:52:28'),(1918,4,292,1,1,1,1,'2021-10-07 02:24:11','2025-05-10 05:52:28'),(1919,4,313,1,1,0,1,'2021-10-07 02:24:11','2025-05-10 05:52:28'),(1931,4,236,1,0,0,0,'2021-10-07 02:30:35','2025-05-10 05:52:28'),(1934,4,118,1,0,0,0,'2021-10-01 00:51:45','2025-05-10 05:52:28'),(1937,4,157,1,0,0,0,'2021-10-01 00:51:45','2025-05-10 05:52:28'),(1944,4,238,1,0,0,0,'2021-10-01 00:51:45','2025-05-10 05:52:28'),(1957,4,256,1,0,0,0,'2021-10-01 00:54:01','2025-05-10 05:52:28'),(1976,4,102,1,1,1,1,'2021-10-01 01:33:49','2025-05-10 05:52:28'),(1977,4,274,1,0,0,0,'2021-10-01 01:36:40','2025-05-10 05:52:28'),(1980,9,137,1,1,1,1,'2021-10-23 04:54:52','2025-05-10 05:52:28'),(1981,2,173,1,1,1,1,'2021-10-07 05:34:24','2025-05-10 05:52:28'),(1982,2,347,1,0,1,1,'2021-10-07 05:34:24','2025-05-10 05:52:28'),(1995,1,196,1,1,1,1,'2021-10-07 04:55:23','2025-05-10 05:52:28'),(1996,1,323,1,1,1,1,'2021-10-07 04:55:23','2025-05-10 05:52:28'),(1997,1,324,1,1,1,1,'2021-10-07 04:55:23','2025-05-10 05:52:28'),(1998,1,325,1,1,1,1,'2021-10-07 04:55:23','2025-05-10 05:52:28'),(1999,1,236,1,1,1,1,'2021-10-07 00:36:12','2025-05-10 05:52:28'),(2001,2,270,1,0,0,0,'2021-10-07 01:25:46','2025-05-10 05:52:28'),(2002,2,236,1,1,1,0,'2021-10-07 01:28:54','2025-05-10 05:52:28'),(2003,2,266,1,0,0,0,'2021-10-07 01:43:54','2025-05-10 05:52:28'),(2019,8,132,1,1,1,1,'2021-10-07 04:00:10','2025-05-10 05:52:28'),(2020,8,135,1,1,1,1,'2021-10-07 04:00:10','2025-05-10 05:52:28'),(2021,8,218,1,0,0,0,'2021-10-07 04:00:10','2025-05-10 05:52:28'),(2022,8,219,1,0,0,0,'2021-10-07 04:00:10','2025-05-10 05:52:28'),(2023,8,221,1,1,1,1,'2021-10-07 06:09:52','2025-05-10 05:52:28'),(2024,8,222,1,1,0,1,'2021-10-07 06:09:52','2025-05-10 05:52:28'),(2025,8,138,1,1,1,1,'2021-10-07 04:00:35','2025-05-10 05:52:28'),(2026,8,139,1,1,1,1,'2021-10-07 04:00:35','2025-05-10 05:52:28'),(2027,8,143,1,1,1,1,'2021-10-07 06:10:36','2025-05-10 05:52:28'),(2028,8,144,1,1,0,1,'2021-10-07 06:10:36','2025-05-10 05:52:28'),(2029,8,326,1,0,0,0,'2021-10-07 04:01:17','2025-05-10 05:52:28'),(2031,8,196,1,1,1,1,'2021-10-07 06:10:36','2025-05-10 05:52:28'),(2032,8,198,1,0,0,0,'2021-10-07 04:03:01','2025-05-10 05:52:28'),(2034,4,202,1,0,0,0,'2021-10-07 04:03:15','2025-05-10 05:52:28'),(2035,8,146,1,0,0,0,'2021-10-07 04:03:54','2025-05-10 05:52:28'),(2036,8,148,1,0,0,0,'2021-10-07 04:03:54','2025-05-10 05:52:28'),(2037,8,200,1,0,0,0,'2021-10-07 04:03:54','2025-05-10 05:52:28'),(2038,8,225,1,0,0,0,'2021-10-07 04:03:54','2025-05-10 05:52:28'),(2039,8,149,1,0,0,0,'2021-10-07 04:04:27','2025-05-10 05:52:28'),(2042,8,168,1,0,0,0,'2021-10-07 04:04:59','2025-05-10 05:52:28'),(2043,8,270,1,0,0,0,'2021-10-07 04:05:25','2025-05-10 05:52:28'),(2044,8,173,1,0,0,0,'2021-10-07 04:06:20','2025-05-10 05:52:28'),(2045,8,347,1,0,0,0,'2021-10-07 04:06:20','2025-05-10 05:52:28'),(2046,8,330,1,0,0,0,'2021-10-07 04:08:02','2025-05-10 05:52:28'),(2047,8,332,1,0,0,0,'2021-10-07 04:08:02','2025-05-10 05:52:28'),(2048,8,334,1,0,0,0,'2021-10-07 04:08:02','2025-05-10 05:52:28'),(2049,8,336,1,0,0,0,'2021-10-07 04:08:02','2025-05-10 05:52:28'),(2050,8,338,1,0,0,0,'2021-10-07 04:08:02','2025-05-10 05:52:28'),(2051,8,340,1,0,0,0,'2021-10-07 04:08:02','2025-05-10 05:52:28'),(2052,8,342,1,0,0,0,'2021-10-07 04:08:02','2025-05-10 05:52:28'),(2053,8,236,1,1,1,0,'2021-10-07 04:08:58','2025-05-10 05:52:28'),(2055,8,165,1,1,1,1,'2021-10-07 06:12:31','2025-05-10 05:52:28'),(2056,8,166,1,1,1,1,'2021-10-07 06:12:31','2025-05-10 05:52:28'),(2057,8,80,1,1,1,1,'2021-10-07 04:11:10','2025-05-10 05:52:28'),(2058,8,81,1,1,1,1,'2021-10-07 04:11:10','2025-05-10 05:52:28'),(2059,8,82,1,1,1,1,'2021-10-07 04:11:10','2025-05-10 05:52:28'),(2060,8,83,1,1,1,1,'2021-10-07 04:11:10','2025-05-10 05:52:28'),(2061,8,84,1,1,1,1,'2021-10-07 04:11:10','2025-05-10 05:52:28'),(2062,8,85,1,1,1,1,'2021-10-07 04:11:10','2025-05-10 05:52:28'),(2063,8,204,1,1,1,1,'2021-10-07 04:11:10','2025-05-10 05:52:28'),(2064,8,205,1,0,0,0,'2021-10-07 04:11:10','2025-05-10 05:52:28'),(2065,8,214,1,0,0,0,'2021-10-07 04:11:28','2025-05-10 05:52:28'),(2066,8,215,1,0,0,0,'2021-10-07 04:11:28','2025-05-10 05:52:28'),(2067,8,86,1,0,0,0,'2021-10-07 04:11:47','2025-05-10 05:52:28'),(2068,8,109,1,1,0,1,'2021-10-07 04:11:47','2025-05-10 05:52:28'),(2069,8,31,1,0,0,0,'2021-10-07 04:12:14','2025-05-10 05:52:28'),(2070,8,32,1,0,0,0,'2021-10-07 04:12:14','2025-05-10 05:52:28'),(2071,8,48,1,0,0,0,'2021-10-07 04:13:52','2025-05-10 05:52:28'),(2072,8,89,1,0,0,0,'2021-10-07 04:13:52','2025-05-10 05:52:28'),(2073,8,178,1,0,0,0,'2021-10-07 04:13:52','2025-05-10 05:52:28'),(2074,8,180,1,0,0,0,'2021-10-07 04:13:52','2025-05-10 05:52:28'),(2075,8,181,1,0,0,0,'2021-10-07 04:13:52','2025-05-10 05:52:28'),(2076,8,182,1,0,0,0,'2021-10-07 04:13:52','2025-05-10 05:52:28'),(2077,8,207,1,0,0,0,'2021-10-07 04:13:52','2025-05-10 05:52:28'),(2078,8,208,1,0,0,0,'2021-10-07 04:13:52','2025-05-10 05:52:28'),(2079,8,209,1,0,0,0,'2021-10-07 04:13:52','2025-05-10 05:52:28'),(2080,8,253,1,0,0,0,'2021-10-07 04:13:52','2025-05-10 05:52:28'),(2081,8,254,1,0,0,0,'2021-10-07 04:13:52','2025-05-10 05:52:28'),(2082,8,255,1,0,0,0,'2021-10-07 04:13:52','2025-05-10 05:52:28'),(2083,8,118,1,0,0,0,'2021-10-07 04:14:18','2025-05-10 05:52:28'),(2084,8,238,1,0,0,0,'2021-10-07 04:14:18','2025-05-10 05:52:28'),(2085,8,102,1,1,1,1,'2021-10-07 04:14:38','2025-05-10 05:52:28'),(2086,9,321,1,0,0,0,'2021-10-07 04:25:46','2025-05-10 05:52:28'),(2093,1,132,1,1,1,1,'2021-10-07 04:54:53','2025-05-10 05:52:28'),(2094,1,198,1,0,0,0,'2021-10-07 04:55:23','2025-05-10 05:52:28'),(2095,1,327,1,0,0,0,'2021-10-07 04:55:23','2025-05-10 05:52:28'),(2096,1,329,1,0,0,0,'2021-10-07 04:55:23','2025-05-10 05:52:28'),(2108,1,294,1,1,1,1,'2021-10-07 04:56:29','2025-05-10 05:52:28'),(2109,1,296,1,1,1,1,'2021-10-07 04:56:29','2025-05-10 05:52:28'),(2110,1,297,1,0,0,0,'2021-10-07 04:56:29','2025-05-10 05:52:28'),(2111,1,298,1,0,0,0,'2021-10-07 04:56:29','2025-05-10 05:52:28'),(2112,1,129,0,1,0,1,'2021-10-07 04:56:43','2025-05-10 05:52:28'),(2113,1,27,1,1,0,1,'2021-10-07 04:56:54','2025-05-10 05:52:28'),(2114,1,155,1,0,0,0,'2021-10-07 04:57:41','2025-05-10 05:52:28'),(2115,1,156,1,0,0,0,'2021-10-07 04:57:41','2025-05-10 05:52:28'),(2116,1,157,1,0,0,0,'2021-10-07 04:57:41','2025-05-10 05:52:28'),(2117,1,158,1,0,0,0,'2021-10-07 04:57:41','2025-05-10 05:52:28'),(2118,1,159,1,0,0,0,'2021-10-07 04:57:41','2025-05-10 05:52:28'),(2119,1,161,1,0,0,0,'2021-10-07 04:57:41','2025-05-10 05:52:28'),(2120,1,162,1,0,0,0,'2021-10-07 04:57:41','2025-05-10 05:52:28'),(2121,1,190,1,0,0,0,'2021-10-07 04:57:41','2025-05-10 05:52:28'),(2122,1,238,1,0,0,0,'2021-10-07 04:57:41','2025-05-10 05:52:28'),(2127,1,320,1,0,0,0,'2021-10-07 05:01:34','2025-05-10 05:52:28'),(2128,1,321,1,0,0,0,'2021-10-07 05:01:34','2025-05-10 05:52:28'),(2135,1,371,1,0,0,0,'2021-10-07 05:05:30','2025-05-10 05:52:28'),(2150,1,280,1,1,1,1,'2021-10-07 05:29:08','2025-05-10 05:52:28'),(2151,1,369,1,0,0,0,'2021-10-07 05:30:23','2025-05-10 05:52:28'),(2152,1,370,1,0,0,0,'2021-10-07 05:30:23','2025-05-10 05:52:28'),(2153,1,281,1,0,0,0,'2021-10-07 05:30:36','2025-05-10 05:52:28'),(2154,1,282,1,0,0,0,'2021-10-07 05:30:36','2025-05-10 05:52:28'),(2155,2,321,1,0,0,0,'2021-10-07 05:31:49','2025-05-10 05:52:28'),(2156,2,197,1,0,0,0,'2021-10-07 05:33:02','2025-05-10 05:52:28'),(2157,2,248,1,0,0,0,'2021-10-07 05:33:02','2025-05-10 05:52:28'),(2158,2,264,1,1,0,1,'2021-10-07 05:34:52','2025-05-10 05:52:28'),(2159,2,247,1,0,0,0,'2021-10-07 05:35:28','2025-05-10 05:52:28'),(2160,2,281,1,0,0,0,'2021-10-07 05:40:09','2025-05-10 05:52:28'),(2161,2,282,1,0,0,0,'2021-10-07 05:40:09','2025-05-10 05:52:28'),(2162,2,371,1,0,0,0,'2021-10-07 05:40:26','2025-05-10 05:52:28'),(2163,3,257,1,0,0,0,'2021-10-07 05:41:20','2025-05-10 05:52:28'),(2164,3,355,1,0,0,0,'2021-10-07 05:41:20','2025-05-10 05:52:28'),(2165,3,153,1,0,0,0,'2021-10-07 05:41:40','2025-05-10 05:52:28'),(2166,3,244,1,0,0,0,'2021-10-07 05:41:40','2025-05-10 05:52:28'),(2167,3,354,1,0,0,0,'2021-10-07 05:41:40','2025-05-10 05:52:28'),(2168,3,202,1,0,0,0,'2021-10-07 05:42:06','2025-05-10 05:52:28'),(2169,3,246,1,0,0,0,'2021-10-07 05:42:06','2025-05-10 05:52:28'),(2170,3,237,1,0,0,0,'2021-10-07 05:43:04','2025-05-10 05:52:28'),(2171,3,240,1,0,1,0,'2021-10-07 05:43:28','2025-05-10 05:52:28'),(2172,3,242,1,0,1,0,'2021-10-07 05:43:28','2025-05-10 05:52:28'),(2173,3,129,0,1,0,1,'2021-10-07 05:43:59','2025-05-10 05:52:28'),(2174,3,183,1,0,0,0,'2021-10-07 05:46:03','2025-05-10 05:52:28'),(2175,3,188,1,0,0,0,'2021-10-07 05:46:03','2025-05-10 05:52:28'),(2176,3,206,1,0,0,0,'2021-10-07 05:46:03','2025-05-10 05:52:28'),(2177,3,207,1,0,0,0,'2021-10-07 05:46:03','2025-05-10 05:52:28'),(2178,3,208,1,0,0,0,'2021-10-07 05:46:03','2025-05-10 05:52:28'),(2179,3,209,1,0,0,0,'2021-10-07 05:46:03','2025-05-10 05:52:28'),(2180,3,211,1,0,0,0,'2021-10-07 05:46:03','2025-05-10 05:52:28'),(2181,3,258,1,0,0,0,'2021-10-07 05:46:03','2025-05-10 05:52:28'),(2182,3,271,1,0,0,0,'2021-10-07 05:46:03','2025-05-10 05:52:28'),(2183,3,350,1,0,0,0,'2021-10-07 05:46:03','2025-05-10 05:52:28'),(2184,3,369,1,0,0,0,'2021-10-07 05:46:03','2025-05-10 05:52:28'),(2185,3,238,1,0,0,0,'2021-10-07 05:46:28','2025-05-10 05:52:28'),(2186,3,362,1,0,0,0,'2021-10-07 05:46:52','2025-05-10 05:52:28'),(2187,3,363,1,1,1,1,'2021-10-07 05:47:07','2025-05-10 05:52:28'),(2188,3,366,1,0,0,0,'2021-10-07 05:46:52','2025-05-10 05:52:28'),(2189,3,367,1,1,1,1,'2021-10-07 05:47:07','2025-05-10 05:52:28'),(2190,3,371,1,0,0,0,'2021-10-07 05:47:23','2025-05-10 05:52:28'),(2194,4,132,1,0,0,0,'2021-10-07 05:50:59','2025-05-10 05:52:28'),(2195,4,138,1,0,0,0,'2021-10-07 05:51:05','2025-05-10 05:52:28'),(2196,4,264,1,1,0,1,'2021-10-07 05:52:38','2025-05-10 05:52:28'),(2198,4,371,1,0,0,0,'2021-10-07 05:56:00','2025-05-10 05:52:28'),(2201,5,132,1,0,0,0,'2021-10-07 05:56:53','2025-05-10 05:52:28'),(2202,5,304,1,0,0,0,'2021-10-07 05:56:53','2025-05-10 05:52:28'),(2204,5,138,1,0,0,0,'2021-10-07 05:57:32','2025-05-10 05:52:28'),(2205,5,139,1,0,0,0,'2021-10-07 05:57:32','2025-05-10 05:52:28'),(2206,5,307,1,0,0,0,'2021-10-07 05:57:47','2025-05-10 05:52:28'),(2207,5,257,1,1,1,1,'2021-10-07 05:58:05','2025-05-10 05:52:28'),(2209,5,168,1,1,1,1,'2021-10-07 05:58:48','2025-05-10 05:52:28'),(2210,5,169,1,1,1,1,'2021-10-07 05:58:48','2025-05-10 05:52:28'),(2211,5,202,1,1,0,1,'2021-10-07 05:58:48','2025-05-10 05:52:28'),(2212,5,246,1,0,0,0,'2021-10-07 05:58:48','2025-05-10 05:52:28'),(2213,5,293,1,1,1,1,'2021-10-07 05:58:48','2025-05-10 05:52:28'),(2214,5,302,1,1,0,1,'2021-10-07 05:58:48','2025-05-10 05:52:28'),(2215,5,311,1,1,1,1,'2021-10-07 05:58:48','2025-05-10 05:52:28'),(2216,5,336,1,0,0,0,'2021-10-07 05:59:04','2025-05-10 05:52:28'),(2217,5,274,1,0,0,0,'2021-10-07 06:00:38','2025-05-10 05:52:28'),(2219,5,183,1,0,0,0,'2021-10-07 06:01:42','2025-05-10 05:52:28'),(2220,5,211,1,0,0,0,'2021-10-07 06:01:42','2025-05-10 05:52:28'),(2221,5,371,1,0,0,0,'2021-10-07 06:02:10','2025-05-10 05:52:28'),(2222,6,132,1,0,0,0,'2021-10-07 06:03:09','2025-05-10 05:52:28'),(2223,6,135,1,0,0,0,'2021-10-07 06:03:09','2025-05-10 05:52:28'),(2224,6,138,1,0,0,0,'2021-10-07 06:03:45','2025-05-10 05:52:28'),(2225,6,139,1,0,0,0,'2021-10-07 06:03:45','2025-05-10 05:52:28'),(2226,6,308,1,0,0,0,'2021-10-07 06:03:45','2025-05-10 05:52:28'),(2227,6,309,1,0,0,0,'2021-10-07 06:03:45','2025-05-10 05:52:28'),(2228,6,203,1,1,1,1,'2021-10-07 06:04:58','2025-05-10 05:52:28'),(2229,6,264,1,1,0,1,'2021-10-07 06:04:58','2025-05-10 05:52:28'),(2231,6,274,1,0,0,0,'2021-10-07 06:06:19','2025-05-10 05:52:28'),(2232,6,371,1,0,0,0,'2021-10-07 06:07:27','2025-05-10 05:52:28'),(2233,8,304,1,0,0,0,'2021-10-07 06:09:52','2025-05-10 05:52:28'),(2234,8,305,1,0,1,0,'2021-10-07 06:09:52','2025-05-10 05:52:28'),(2235,8,306,1,0,0,0,'2021-10-07 06:09:52','2025-05-10 05:52:28'),(2236,8,307,1,0,0,0,'2021-10-07 06:09:52','2025-05-10 05:52:28'),(2237,8,319,1,1,1,1,'2021-10-07 06:09:52','2025-05-10 05:52:28'),(2238,8,320,1,0,0,0,'2021-10-07 06:09:52','2025-05-10 05:52:28'),(2239,8,301,1,0,0,0,'2021-10-07 06:10:36','2025-05-10 05:52:28'),(2240,8,309,1,0,1,0,'2021-10-07 06:10:36','2025-05-10 05:52:28'),(2241,8,310,1,0,0,0,'2021-10-07 06:10:36','2025-05-10 05:52:28'),(2242,8,329,1,0,0,0,'2021-10-07 06:10:36','2025-05-10 05:52:28'),(2243,8,257,1,0,0,0,'2021-10-07 06:10:57','2025-05-10 05:52:28'),(2244,8,153,1,0,0,0,'2021-10-07 06:11:07','2025-05-10 05:52:28'),(2245,8,169,1,0,0,0,'2021-10-07 06:11:37','2025-05-10 05:52:28'),(2246,8,202,1,0,0,0,'2021-10-07 06:11:37','2025-05-10 05:52:28'),(2247,8,302,1,0,0,0,'2021-10-07 06:11:37','2025-05-10 05:52:28'),(2248,8,311,1,0,0,0,'2021-10-07 06:11:37','2025-05-10 05:52:28'),(2249,2,348,1,0,1,0,'2021-10-07 06:17:44','2025-05-10 05:52:28'),(2250,8,247,1,1,1,1,'2021-10-07 06:12:31','2025-05-10 05:52:28'),(2251,8,318,1,1,0,1,'2021-10-07 06:12:31','2025-05-10 05:52:28'),(2252,8,294,1,1,1,1,'2021-10-07 06:13:02','2025-05-10 05:52:28'),(2253,8,295,1,0,1,0,'2021-10-07 06:13:02','2025-05-10 05:52:28'),(2254,8,296,1,1,1,1,'2021-10-07 06:13:02','2025-05-10 05:52:28'),(2255,8,297,1,0,0,0,'2021-10-07 06:13:02','2025-05-10 05:52:28'),(2256,8,298,1,0,0,0,'2021-10-07 06:13:02','2025-05-10 05:52:28'),(2257,2,56,1,0,0,0,'2021-10-07 06:13:19','2025-05-10 05:52:28'),(2258,8,43,1,1,1,1,'2021-10-07 06:13:22','2025-05-10 05:52:28'),(2259,8,44,1,0,0,0,'2021-10-07 06:13:22','2025-05-10 05:52:28'),(2260,8,27,1,1,0,1,'2021-10-07 06:13:28','2025-05-10 05:52:28'),(2261,8,274,1,0,0,0,'2021-10-07 06:13:45','2025-05-10 05:52:28'),(2262,2,54,1,0,0,0,'2021-10-07 06:13:47','2025-05-10 05:52:28'),(2263,8,183,1,0,0,0,'2021-10-07 06:15:00','2025-05-10 05:52:28'),(2264,8,256,1,0,0,0,'2021-10-07 06:15:00','2025-05-10 05:52:28'),(2265,8,258,1,0,0,0,'2021-10-07 06:15:00','2025-05-10 05:52:28'),(2266,8,259,1,0,0,0,'2021-10-07 06:15:00','2025-05-10 05:52:28'),(2267,8,350,1,0,0,0,'2021-10-07 06:15:00','2025-05-10 05:52:28'),(2268,8,162,1,0,0,0,'2021-10-07 06:15:18','2025-05-10 05:52:28'),(2269,8,371,1,0,0,0,'2021-10-07 06:15:32','2025-05-10 05:52:28'),(2271,9,274,1,0,0,0,'2021-10-07 06:19:59','2025-05-10 05:52:28'),(2272,9,118,1,0,0,0,'2021-10-07 06:20:29','2025-05-10 05:52:28'),(2273,9,238,1,0,0,0,'2021-10-07 06:20:29','2025-05-10 05:52:28'),(2274,9,371,1,0,0,0,'2021-10-07 06:20:40','2025-05-10 05:52:28'),(2275,1,218,1,0,0,0,'2021-10-07 06:20:53','2025-05-10 05:52:28'),(2276,1,330,1,0,0,0,'2021-10-22 00:27:48','2025-05-10 05:52:28'),(2277,1,331,1,1,0,0,'2021-10-22 00:27:48','2025-05-10 05:52:28'),(2278,1,332,1,0,0,0,'2021-10-22 00:27:48','2025-05-10 05:52:28'),(2279,1,333,1,1,0,0,'2021-10-22 00:27:48','2025-05-10 05:52:28'),(2280,1,334,1,0,0,0,'2021-10-22 00:27:48','2025-05-10 05:52:28'),(2281,1,335,1,1,0,0,'2021-10-22 00:27:48','2025-05-10 05:52:28'),(2282,1,336,1,0,0,0,'2021-10-22 00:27:48','2025-05-10 05:52:28'),(2283,1,337,1,1,0,0,'2021-10-22 00:27:48','2025-05-10 05:52:28'),(2284,1,338,1,0,0,0,'2021-10-22 00:27:48','2025-05-10 05:52:28'),(2285,1,339,1,1,0,0,'2021-10-22 00:27:48','2025-05-10 05:52:28'),(2286,1,340,1,0,0,0,'2021-10-22 00:27:48','2025-05-10 05:52:28'),(2287,1,341,1,1,0,0,'2021-10-22 00:27:48','2025-05-10 05:52:28'),(2288,1,342,1,0,0,0,'2021-10-22 00:27:48','2025-05-10 05:52:28'),(2289,1,343,1,1,0,0,'2021-10-22 00:27:48','2025-05-10 05:52:28'),(2290,1,344,1,0,0,0,'2021-10-22 00:27:48','2025-05-10 05:52:28'),(2291,1,345,1,0,0,0,'2021-10-22 00:27:48','2025-05-10 05:52:28'),(2292,1,372,1,NULL,NULL,NULL,'2021-10-29 07:41:42','2025-05-10 05:52:28'),(2293,1,373,1,NULL,NULL,NULL,'2021-10-29 07:42:20','2025-05-10 05:52:28'),(2294,1,374,1,1,1,1,'2021-10-29 07:45:25','2025-05-10 05:52:28'),(2295,1,375,1,1,1,1,'2021-10-29 07:45:25','2025-05-10 05:52:28'),(2296,1,386,1,1,0,1,'2021-11-10 06:22:22','2025-05-10 05:52:28'),(2297,3,386,1,1,0,1,'2021-11-10 06:22:22','2025-05-10 05:52:28'),(2298,1,387,1,0,0,0,'2021-11-10 06:24:10','2025-05-10 05:52:28'),(2299,3,387,1,0,0,0,'2021-11-10 06:24:10','2025-05-10 05:52:28'),(2300,1,419,1,1,1,1,'2024-08-20 10:19:15','2025-05-10 05:52:28'),(2301,1,415,1,0,0,0,'2024-08-20 10:19:36','2025-05-10 05:52:28'),(2302,1,416,1,1,1,1,'2024-08-20 10:19:36','2025-05-10 05:52:28'),(2303,1,417,1,1,1,1,'2024-08-20 10:19:36','2025-05-10 05:52:28'),(2304,1,418,1,1,1,1,'2024-08-20 10:19:36','2025-05-10 05:52:28'),(2305,1,414,1,0,1,0,'2024-08-20 10:20:08','2025-05-10 05:52:28'),(2306,1,398,1,1,1,1,'2024-08-20 10:21:04','2025-05-10 05:52:28'),(2307,1,402,1,0,0,0,'2024-08-20 10:21:04','2025-05-10 05:52:28'),(2308,1,413,1,0,1,0,'2024-08-20 10:21:04','2025-05-10 05:52:28'),(2309,1,409,1,0,0,1,'2024-08-20 10:21:50','2025-05-10 05:52:28'),(2310,1,410,1,1,0,1,'2024-08-20 10:21:50','2025-05-10 05:52:28'),(2311,1,411,1,0,0,0,'2024-08-20 10:21:50','2025-05-10 05:52:28'),(2312,1,412,1,0,0,0,'2024-08-20 10:21:50','2025-05-10 05:52:28'),(2313,1,406,1,1,1,1,'2024-08-20 10:22:23','2025-05-10 05:52:28'),(2314,1,407,1,1,1,1,'2024-08-20 10:22:23','2025-05-10 05:52:28'),(2315,1,408,1,1,1,1,'2024-08-20 10:22:23','2025-05-10 05:52:28'),(2316,1,405,1,1,1,1,'2024-08-20 10:22:33','2025-05-10 05:52:28'),(2317,1,393,1,1,1,1,'2024-08-20 10:23:11','2025-05-10 05:52:28'),(2318,1,394,1,1,1,1,'2024-08-20 10:23:11','2025-05-10 05:52:28'),(2319,1,395,1,1,1,1,'2024-08-20 10:23:11','2025-05-10 05:52:28'),(2320,1,396,1,1,1,1,'2024-08-20 10:23:11','2025-05-10 05:52:28'),(2321,1,401,1,0,0,0,'2024-08-20 10:23:11','2025-05-10 05:52:28'),(2322,1,403,1,0,0,0,'2024-08-20 10:23:11','2025-05-10 05:52:28'),(2323,1,404,1,0,0,0,'2024-08-20 10:23:11','2025-05-10 05:52:28'),(2324,1,392,1,1,1,1,'2024-08-20 10:25:03','2025-05-10 05:52:28'),(2325,1,400,1,0,0,0,'2024-08-20 10:25:23','2025-05-10 05:52:28'),(2326,1,390,1,0,0,0,'2024-08-20 10:25:53','2025-05-10 05:52:28'),(2327,1,399,1,0,0,0,'2024-08-20 10:25:53','2025-05-10 05:52:28'),(2328,1,388,1,1,1,1,'2024-08-20 10:27:59','2025-05-10 05:52:28'),(2329,1,389,1,1,1,1,'2024-08-20 10:27:59','2025-05-10 05:52:28'),(2330,1,391,1,1,1,1,'2024-08-20 10:27:59','2025-05-10 05:52:28'),(2331,1,397,1,0,0,0,'2024-08-20 10:31:13','2025-05-10 05:52:28');

--
-- Table structure for table `send_notification`
--

CREATE TABLE `send_notification` (
  `id` int NOT NULL AUTO_INCREMENT,
  `title` varchar(50) DEFAULT NULL,
  `publish_date` date DEFAULT NULL,
  `date` date DEFAULT NULL,
  `message` text,
  `visible_staff` varchar(10) NOT NULL DEFAULT 'no',
  `visible_patient` varchar(10) NOT NULL DEFAULT 'no',
  `created_by` varchar(60) DEFAULT NULL,
  `created_id` int DEFAULT NULL,
  `is_active` varchar(10) DEFAULT 'no',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `created_id` (`created_id`),
  KEY `index_title` (`title`),
  KEY `index_publish_date` (`publish_date`),
  KEY `index_date` (`date`),
  KEY `index_visible_staff` (`visible_staff`),
  KEY `index_visible_patient` (`visible_patient`),
  CONSTRAINT `send_notification_ibfk_1` FOREIGN KEY (`created_id`) REFERENCES `staff` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `send_notification`
--


--
-- Table structure for table `share_content_for`
--

CREATE TABLE `share_content_for` (
  `id` int NOT NULL AUTO_INCREMENT,
  `group_id` varchar(20) DEFAULT NULL,
  `patient_id` int DEFAULT NULL,
  `staff_id` int DEFAULT NULL,
  `share_content_id` int DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `upload_content_id` (`share_content_id`),
  KEY `student_id` (`patient_id`),
  KEY `staff_id` (`staff_id`),
  CONSTRAINT `share_content_for_ibfk_1` FOREIGN KEY (`share_content_id`) REFERENCES `share_contents` (`id`) ON DELETE CASCADE,
  CONSTRAINT `share_content_for_ibfk_2` FOREIGN KEY (`patient_id`) REFERENCES `patients` (`id`) ON DELETE CASCADE,
  CONSTRAINT `share_content_for_ibfk_3` FOREIGN KEY (`staff_id`) REFERENCES `staff` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `share_content_for`
--


--
-- Table structure for table `share_contents`
--

CREATE TABLE `share_contents` (
  `id` int NOT NULL AUTO_INCREMENT,
  `send_to` varchar(50) DEFAULT NULL,
  `title` text,
  `share_date` date DEFAULT NULL,
  `valid_upto` date DEFAULT NULL,
  `description` text,
  `created_by` int DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `created_by` (`created_by`),
  KEY `index_send_to` (`send_to`),
  KEY `index_share_date` (`share_date`),
  KEY `index_valid_upto` (`valid_upto`),
  KEY `index_created_by` (`created_by`),
  CONSTRAINT `share_contents_ibfk_1` FOREIGN KEY (`created_by`) REFERENCES `staff` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `share_contents`
--


--
-- Table structure for table `share_upload_contents`
--

CREATE TABLE `share_upload_contents` (
  `id` int NOT NULL AUTO_INCREMENT,
  `upload_content_id` int DEFAULT NULL,
  `share_content_id` int DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `upload_content_id` (`upload_content_id`),
  KEY `share_content_id` (`share_content_id`),
  CONSTRAINT `share_upload_contents_ibfk_1` FOREIGN KEY (`upload_content_id`) REFERENCES `upload_contents` (`id`) ON DELETE CASCADE,
  CONSTRAINT `share_upload_contents_ibfk_2` FOREIGN KEY (`share_content_id`) REFERENCES `share_contents` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `share_upload_contents`
--


--
-- Table structure for table `shift_details`
--

CREATE TABLE `shift_details` (
  `id` int NOT NULL AUTO_INCREMENT,
  `staff_id` int DEFAULT NULL,
  `consult_duration` int DEFAULT NULL,
  `charge_id` int DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `staff_id` (`staff_id`),
  KEY `charge_id` (`charge_id`),
  KEY `index_consult_duration` (`consult_duration`),
  CONSTRAINT `shift_details_ibfk_1` FOREIGN KEY (`staff_id`) REFERENCES `staff` (`id`) ON DELETE CASCADE,
  CONSTRAINT `shift_details_ibfk_2` FOREIGN KEY (`charge_id`) REFERENCES `charges` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `shift_details`
--

INSERT INTO `shift_details` VALUES (1,2,10,1,'2026-03-18 09:15:27','2026-03-18 09:15:27');

--
-- Table structure for table `source`
--

CREATE TABLE `source` (
  `id` int NOT NULL AUTO_INCREMENT,
  `source` varchar(100) NOT NULL,
  `description` mediumtext,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `index_source` (`source`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `source`
--


--
-- Table structure for table `specialist`
--

CREATE TABLE `specialist` (
  `id` int NOT NULL AUTO_INCREMENT,
  `specialist_name` varchar(200) NOT NULL,
  `is_active` varchar(100) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `index_specialist_name` (`specialist_name`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `specialist`
--

INSERT INTO `specialist` VALUES (1,'Cardiology','yes','2026-03-31 07:18:04','2026-03-31 07:18:04');

--
-- Table structure for table `staff_attendance`
--

CREATE TABLE `staff_attendance` (
  `id` int NOT NULL AUTO_INCREMENT,
  `date` date NOT NULL,
  `staff_id` int DEFAULT NULL,
  `staff_attendance_type_id` int DEFAULT NULL,
  `biometric_attendence` int DEFAULT '0',
  `qrcode_attendance` int NOT NULL DEFAULT '0',
  `biometric_device_data` text,
  `user_agent` varchar(255) DEFAULT NULL,
  `remark` varchar(200) NOT NULL,
  `is_active` int NOT NULL,
  `in_time` time DEFAULT NULL,
  `out_time` time DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `staff_id` (`staff_id`),
  KEY `staff_attendance_type_id` (`staff_attendance_type_id`),
  CONSTRAINT `staff_attendance_ibfk_1` FOREIGN KEY (`staff_id`) REFERENCES `staff` (`id`) ON DELETE CASCADE,
  CONSTRAINT `staff_attendance_ibfk_2` FOREIGN KEY (`staff_attendance_type_id`) REFERENCES `staff_attendance_type` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `staff_attendance`
--


--
-- Table structure for table `staff_attendance_type`
--

CREATE TABLE `staff_attendance_type` (
  `id` int NOT NULL AUTO_INCREMENT,
  `type` varchar(200) NOT NULL,
  `key_value` varchar(200) NOT NULL,
  `is_active` varchar(50) NOT NULL,
  `for_qr_attendance` int NOT NULL DEFAULT '1',
  `long_lang_name` varchar(250) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL,
  `long_name_style` varchar(250) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL,
  `for_schedule` int NOT NULL DEFAULT '0',
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `index_type` (`type`),
  KEY `index_key_value` (`key_value`),
  KEY `index_is_active` (`is_active`),
  KEY `index_long_lang_name` (`long_lang_name`),
  KEY `index_long_name_style` (`long_name_style`),
  KEY `index_for_schedule` (`for_schedule`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `staff_attendance_type`
--

INSERT INTO `staff_attendance_type` VALUES (1,'Present','<b class=\"text text-success\">P</b>','yes',1,'present',NULL,1,'2024-08-21 09:29:55','2025-05-10 05:52:29'),(2,'Late','<b class=\"text text-warning\">L</b>','yes',1,'late',NULL,1,'2024-08-21 09:29:55','2025-05-10 05:52:29'),(3,'Absent','<b class=\"text text-danger\">A</b>','yes',0,'absent',NULL,0,'2024-08-21 09:29:55','2025-05-10 05:52:29'),(4,'Half Day','<b class=\"text text-warning\">F</b>','yes',1,'half_day',NULL,1,'2024-08-21 09:29:55','2025-05-10 05:52:29'),(5,'Holiday','H','yes',0,'holiday',NULL,0,'2024-08-21 09:29:55','2025-05-10 05:52:29'),(6,'Half Day Second Shift','<b class=\"text text-warning\">SH</b>','yes',1,'half_day_second_shift','label label-info',1,'2024-06-08 16:35:55','2025-05-10 05:52:29');

--
-- Table structure for table `staff_attendence_schedules`
--

CREATE TABLE `staff_attendence_schedules` (
  `id` int NOT NULL AUTO_INCREMENT,
  `staff_attendence_type_id` int DEFAULT NULL,
  `role_id` int DEFAULT NULL,
  `entry_time_from` time DEFAULT NULL,
  `entry_time_to` time DEFAULT NULL,
  `total_institute_hour` time DEFAULT NULL,
  `is_active` int DEFAULT '0',
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `role_id` (`role_id`),
  KEY `staff_attendence_type_id` (`staff_attendence_type_id`),
  KEY `index_entry_time_from` (`entry_time_from`),
  KEY `index_entry_time_to` (`entry_time_to`),
  KEY `index_total_institute_hour` (`total_institute_hour`),
  CONSTRAINT `staff_attendence_schedules_ibfk_1` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE,
  CONSTRAINT `staff_attendence_schedules_ibfk_2` FOREIGN KEY (`staff_attendence_type_id`) REFERENCES `staff_attendance_type` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `staff_attendence_schedules`
--


--
-- Table structure for table `staff_designation`
--

CREATE TABLE `staff_designation` (
  `id` int NOT NULL AUTO_INCREMENT,
  `designation` varchar(200) NOT NULL,
  `is_active` varchar(10) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `index_designation` (`designation`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `staff_designation`
--


--
-- Table structure for table `staff_id_card`
--

CREATE TABLE `staff_id_card` (
  `id` int NOT NULL AUTO_INCREMENT,
  `title` varchar(255) NOT NULL,
  `hospital_name` varchar(255) NOT NULL,
  `hospital_address` varchar(255) NOT NULL,
  `background` text CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL,
  `logo` text CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL,
  `sign_image` text CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL,
  `header_color` varchar(100) NOT NULL,
  `enable_staff_role` tinyint(1) NOT NULL COMMENT '0=disable,1=enable',
  `enable_staff_id` tinyint(1) NOT NULL COMMENT '0=disable,1=enable',
  `enable_staff_department` tinyint(1) NOT NULL COMMENT '0=disable,1=enable',
  `enable_designation` tinyint(1) NOT NULL COMMENT '0=disable,1=enable',
  `enable_name` tinyint(1) NOT NULL COMMENT '0=disable,1=enable',
  `enable_fathers_name` tinyint(1) NOT NULL COMMENT '0=disable,1=enable',
  `enable_mothers_name` tinyint(1) NOT NULL COMMENT '0=disable,1=enable',
  `enable_date_of_joining` tinyint(1) NOT NULL COMMENT '0=disable,1=enable',
  `enable_permanent_address` tinyint(1) NOT NULL COMMENT '0=disable,1=enable',
  `enable_staff_dob` tinyint(1) NOT NULL COMMENT '0=disable,1=enable',
  `enable_staff_phone` tinyint(1) NOT NULL COMMENT '0=disable,1=enable',
  `enable_staff_barcode` tinyint(1) NOT NULL COMMENT '0=disable,1=enable',
  `status` tinyint(1) NOT NULL COMMENT '0=disable,1=enable',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `index_title` (`title`),
  KEY `index_hospital_name` (`hospital_name`),
  KEY `index_hospital_address` (`hospital_address`),
  KEY `index_header_color` (`header_color`),
  KEY `index_enable_staff_role` (`enable_staff_role`),
  KEY `index_enable_staff_id` (`enable_staff_id`),
  KEY `index_enable_staff_department` (`enable_staff_department`),
  KEY `index_enable_designation` (`enable_designation`),
  KEY `index_enable_name` (`enable_name`),
  KEY `index_enable_fathers_name` (`enable_fathers_name`),
  KEY `index_enable_mothers_name` (`enable_mothers_name`),
  KEY `index_enable_date_of_joining` (`enable_date_of_joining`),
  KEY `index_enable_permanent_address` (`enable_permanent_address`),
  KEY `index_enable_staff_dob` (`enable_staff_dob`),
  KEY `index_enable_staff_phone` (`enable_staff_phone`),
  KEY `index_enable_staff_barcode` (`enable_staff_barcode`),
  KEY `index_status` (`status`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `staff_id_card`
--

INSERT INTO `staff_id_card` VALUES (1,'Sample Staff Id Card','National Hospital','Habibganj Rd, Opp Cricket Club, E-3, Arera Colony, Bhopal','background.jpg','logo.jpg','signature.png','#0e5c9f',0,1,0,1,1,0,0,0,1,1,1,0,1,'2021-10-19 06:58:50','2025-05-10 05:52:29');

--
-- Table structure for table `staff_leave_details`
--

CREATE TABLE `staff_leave_details` (
  `id` int NOT NULL AUTO_INCREMENT,
  `staff_id` int DEFAULT NULL,
  `leave_type_id` int DEFAULT NULL,
  `alloted_leave` varchar(100) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `staff_id` (`staff_id`),
  KEY `leave_type_id` (`leave_type_id`),
  CONSTRAINT `staff_leave_details_ibfk_1` FOREIGN KEY (`staff_id`) REFERENCES `staff` (`id`) ON DELETE CASCADE,
  CONSTRAINT `staff_leave_details_ibfk_2` FOREIGN KEY (`leave_type_id`) REFERENCES `leave_types` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `staff_leave_details`
--


--
-- Table structure for table `staff_leave_request`
--

CREATE TABLE `staff_leave_request` (
  `id` int NOT NULL AUTO_INCREMENT,
  `staff_id` int DEFAULT NULL,
  `leave_type_id` int DEFAULT NULL,
  `leave_from` date NOT NULL,
  `leave_to` date NOT NULL,
  `leave_days` int NOT NULL,
  `employee_remark` varchar(200) NOT NULL,
  `admin_remark` varchar(200) NOT NULL,
  `status` varchar(100) NOT NULL,
  `approved_date` date DEFAULT NULL,
  `applied_by` int DEFAULT NULL,
  `status_updated_by` int DEFAULT NULL,
  `document_file` text CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL,
  `date` date NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `staff_id` (`staff_id`),
  KEY `leave_type_id` (`leave_type_id`),
  KEY `applied_by` (`applied_by`),
  KEY `index_leave_from` (`leave_from`),
  KEY `index_leave_to` (`leave_to`),
  KEY `index_leave_days` (`leave_days`),
  KEY `index_employee_remark` (`employee_remark`),
  KEY `index_admin_remark` (`admin_remark`),
  KEY `index_status` (`status`),
  KEY `index_approved_date` (`approved_date`),
  KEY `index_status_updated_by` (`status_updated_by`),
  KEY `index_date` (`date`),
  CONSTRAINT `staff_leave_request_ibfk_1` FOREIGN KEY (`staff_id`) REFERENCES `staff` (`id`) ON DELETE CASCADE,
  CONSTRAINT `staff_leave_request_ibfk_2` FOREIGN KEY (`leave_type_id`) REFERENCES `leave_types` (`id`) ON DELETE CASCADE,
  CONSTRAINT `staff_leave_request_ibfk_3` FOREIGN KEY (`applied_by`) REFERENCES `staff` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `staff_leave_request`
--


--
-- Table structure for table `staff_payroll`
--

CREATE TABLE `staff_payroll` (
  `id` int NOT NULL AUTO_INCREMENT,
  `basic_salary` float(10,2) NOT NULL,
  `pay_scale` int NOT NULL,
  `grade` varchar(50) NOT NULL,
  `is_active` varchar(50) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `staff_payroll`
--


--
-- Table structure for table `staff_payslip`
--

CREATE TABLE `staff_payslip` (
  `id` int NOT NULL AUTO_INCREMENT,
  `staff_id` int DEFAULT NULL,
  `basic` float(10,2) NOT NULL,
  `total_allowance` float(10,2) NOT NULL,
  `total_deduction` float(10,2) NOT NULL,
  `leave_deduction` int NOT NULL,
  `tax` float(10,2) NOT NULL DEFAULT '0.00',
  `net_salary` float(10,2) NOT NULL,
  `status` varchar(100) NOT NULL,
  `month` varchar(200) NOT NULL,
  `year` varchar(200) NOT NULL,
  `cheque_no` varchar(250) DEFAULT NULL,
  `cheque_date` date DEFAULT NULL,
  `attachment` varchar(250) DEFAULT NULL,
  `attachment_name` text,
  `payment_mode` varchar(200) NOT NULL,
  `payment_date` date NOT NULL,
  `remark` text,
  `generated_by` int DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `staff_id` (`staff_id`),
  KEY `generated_by` (`generated_by`),
  KEY `index_basic` (`basic`),
  KEY `index_total_allowance` (`total_allowance`),
  KEY `index_total_deduction` (`total_deduction`),
  KEY `index_leave_deduction` (`leave_deduction`),
  KEY `index_tax` (`tax`),
  KEY `index_net_salary` (`net_salary`),
  KEY `index_status` (`status`),
  KEY `index_month` (`month`),
  KEY `index_year` (`year`),
  KEY `index_cheque_no` (`cheque_no`),
  KEY `index_cheque_date` (`cheque_date`),
  KEY `index_attachment` (`attachment`),
  KEY `index_payment_mode` (`payment_mode`),
  KEY `index_payment_date` (`payment_date`),
  CONSTRAINT `staff_payslip_ibfk_1` FOREIGN KEY (`staff_id`) REFERENCES `staff` (`id`) ON DELETE CASCADE,
  CONSTRAINT `staff_payslip_ibfk_2` FOREIGN KEY (`generated_by`) REFERENCES `staff` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `staff_payslip`
--


--
-- Table structure for table `staff_roles`
--

CREATE TABLE `staff_roles` (
  `id` int NOT NULL AUTO_INCREMENT,
  `role_id` int DEFAULT NULL,
  `staff_id` int DEFAULT NULL,
  `is_active` int DEFAULT '0',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `role_id` (`role_id`),
  KEY `staff_id` (`staff_id`),
  CONSTRAINT `staff_roles_ibfk_1` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE,
  CONSTRAINT `staff_roles_ibfk_2` FOREIGN KEY (`staff_id`) REFERENCES `staff` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `staff_roles`
--

INSERT INTO `staff_roles` VALUES (1,7,1,0,'2026-03-10 12:18:22','2026-03-10 12:18:22'),(2,3,2,0,'2026-03-16 15:19:24','2026-03-16 15:19:24'),(3,3,3,0,'2026-03-26 08:26:13','2026-03-26 08:26:13'),(4,3,4,0,'2026-03-26 08:39:17','2026-03-26 08:39:17'),(5,3,5,0,'2026-03-26 08:50:21','2026-03-26 08:50:21'),(6,3,6,0,'2026-03-26 08:57:05','2026-03-26 08:57:05'),(7,3,7,0,'2026-03-26 09:00:33','2026-03-26 09:00:33'),(8,3,8,0,'2026-03-26 09:02:57','2026-03-26 09:02:57'),(9,3,9,0,'2026-03-26 09:09:16','2026-03-26 09:09:16'),(10,3,10,0,'2026-03-26 09:17:16','2026-03-26 09:17:16');

--
-- Table structure for table `staff_timeline`
--

CREATE TABLE `staff_timeline` (
  `id` int NOT NULL AUTO_INCREMENT,
  `staff_id` int DEFAULT NULL,
  `title` varchar(200) NOT NULL,
  `timeline_date` date NOT NULL,
  `description` text,
  `document` text CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL,
  `status` varchar(10) NOT NULL,
  `date` date NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `staff_id` (`staff_id`),
  KEY `index_title` (`title`),
  KEY `index_timeline_date` (`timeline_date`),
  KEY `index_status` (`status`),
  KEY `index_date` (`date`),
  CONSTRAINT `staff_timeline_ibfk_1` FOREIGN KEY (`staff_id`) REFERENCES `staff` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `staff_timeline`
--


--
-- Table structure for table `supplier_bill_basic`
--

CREATE TABLE `supplier_bill_basic` (
  `id` int NOT NULL AUTO_INCREMENT,
  `invoice_no` varchar(100) NOT NULL,
  `date` datetime NOT NULL,
  `supplier_id` int DEFAULT NULL,
  `file` varchar(200) NOT NULL,
  `total` float(10,2) NOT NULL,
  `tax` float(10,2) NOT NULL,
  `discount` float(10,2) NOT NULL,
  `net_amount` float(10,2) NOT NULL,
  `note` text,
  `payment_mode` varchar(30) DEFAULT NULL,
  `cheque_no` varchar(255) DEFAULT NULL,
  `cheque_date` date DEFAULT NULL,
  `payment_date` datetime DEFAULT NULL,
  `received_by` int DEFAULT NULL,
  `attachment` varchar(255) DEFAULT NULL,
  `attachment_name` varchar(255) DEFAULT NULL,
  `payment_note` text,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `supplier_id` (`supplier_id`),
  KEY `received_by` (`received_by`),
  KEY `index_total` (`total`),
  KEY `index_tax` (`tax`),
  KEY `index_discount` (`discount`),
  KEY `index_net_amount` (`net_amount`),
  KEY `index_payment_mode` (`payment_mode`),
  KEY `index_cheque_no` (`cheque_no`),
  KEY `index_cheque_date` (`cheque_date`),
  KEY `index_payment_date` (`payment_date`),
  CONSTRAINT `supplier_bill_basic_ibfk_1` FOREIGN KEY (`supplier_id`) REFERENCES `medicine_supplier` (`id`) ON DELETE CASCADE,
  CONSTRAINT `supplier_bill_basic_ibfk_2` FOREIGN KEY (`received_by`) REFERENCES `staff` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `supplier_bill_basic`
--

INSERT INTO `supplier_bill_basic` VALUES (1,'','2026-03-18 14:50:00',1,'',1100.00,0.00,0.00,1100.00,'','Cash',NULL,NULL,'2026-03-18 14:50:49',1,NULL,NULL,'','2026-03-18 09:50:49','2026-03-18 09:50:49');

--
-- Table structure for table `symptoms`
--

CREATE TABLE `symptoms` (
  `id` int NOT NULL AUTO_INCREMENT,
  `symptoms_title` varchar(200) NOT NULL,
  `description` text,
  `type` varchar(100) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `index_symptoms_title` (`symptoms_title`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `symptoms`
--


--
-- Table structure for table `symptoms_classification`
--

CREATE TABLE `symptoms_classification` (
  `id` int NOT NULL AUTO_INCREMENT,
  `symptoms_type` varchar(100) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `index_symptoms_type` (`symptoms_type`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `symptoms_classification`
--


--
-- Table structure for table `system_notification`
--

CREATE TABLE `system_notification` (
  `id` int NOT NULL AUTO_INCREMENT,
  `notification_title` varchar(200) NOT NULL,
  `notification_type` varchar(50) NOT NULL,
  `notification_desc` text,
  `notification_for` varchar(50) NOT NULL,
  `role_id` int DEFAULT NULL,
  `receiver_id` int DEFAULT NULL,
  `date` datetime NOT NULL,
  `is_active` varchar(10) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `idx_notification_title` (`notification_title`)
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `system_notification`
--

INSERT INTO `system_notification` VALUES (1,'Add Medicine','pharmacy','New Add Medicine Details: \r\n\r\nMedicine Name  Panadol , \r\nMedicine Category  Tablet ,\r\nMedicine Company  1 ,\r\nMedicine Composition  {{medicine_composition}} ,\r\nMedicine Group 1 , \r\nUnit 1 ,\r\nPacking  1100 ,','',7,1,'2026-03-18 14:47:38','yes','2026-03-18 09:47:38','2026-03-18 09:47:38'),(2,'Purchase Medicine','pharmacy','Purchase Medicine Details :\r\nSupplier Name: Babar Medical Company \r\nMedicine Details: Panadol (11)\r\nPurchase Date: 2026-03-18 14:50:00\r\nInvoice Number:  {{invoice_number}}\r\nTotal: 1100.00\r\nDiscount: 0.00 \r\nTax: 0.00\r\nNet Amount: 1100.00','',7,1,'2026-03-18 14:50:49','yes','2026-03-18 09:50:49','2026-03-18 09:50:49'),(3,'New OPD Visit Created','opd','OPD Visit has been created for patient: Imran Ali (104) with doctor: Muhammad Haris Ghani (GP). Patient Symptoms Details are {{symptoms_description}} and any known allergies: {{any_known_allergies}} .','',7,1,'2026-03-19 16:40:55','yes','2026-03-19 11:40:55','2026-03-19 11:40:55'),(4,'New OPD Visit Created','opd','OPD Visit has been created for patient: Imran Ali (104) with doctor: Muhammad Haris Ghani (GP). Patient Symptoms Details are {{symptoms_description}} and any known allergies: {{any_known_allergies}} .','',3,2,'2026-03-19 16:40:55','yes','2026-03-19 11:40:55','2026-03-19 11:40:55'),(5,'New OPD Visit Created','opd','Dear: Imran Ali (104) your OPD visit has been created.  Your Symptoms Details are {{symptoms_description}} and any known allergies: {{any_known_allergies}}. ','',NULL,104,'2026-03-19 16:40:55','yes','2026-03-19 11:40:55','2026-03-19 11:40:55'),(6,'New Appointment Created','appointment','Appointment has been created for Patient: Imran Ali (104). Appointment Date: 03/19/2026 01:45 PM  With Doctor Name: Muhammad Haris Ghani (GP).','',7,1,'2026-03-19 16:46:20','yes','2026-03-19 11:46:20','2026-03-19 11:46:20'),(7,'New Appointment Created','appointment','Appointment has been created for Patient: Imran Ali (104). Appointment Date: 03/19/2026 01:45 PM  With Doctor Name: Muhammad Haris Ghani (GP).','',3,2,'2026-03-19 16:46:20','yes','2026-03-19 11:46:20','2026-03-19 11:46:20'),(8,'New Appointment Created','appointment','Dear Imran Ali (104) your appointment has been created with Doctor: Muhammad Haris Ghani (GP).','',NULL,104,'2026-03-19 16:46:20','yes','2026-03-19 11:46:20','2026-03-19 11:46:20'),(9,'Appointment Status','appointment','Patient: Imran Ali (104) appointment status is approved with Doctor:  Muhammad Haris Ghani (GP) Date: 03/19/2026 01:45 PM.','',7,1,'2026-03-19 16:46:20','yes','2026-03-19 11:46:20','2026-03-19 11:46:20'),(10,'Appointment Status','appointment','Patient: Imran Ali (104) appointment status is approved with Doctor:  Muhammad Haris Ghani (GP) Date: 03/19/2026 01:45 PM.','',3,2,'2026-03-19 16:46:20','yes','2026-03-19 11:46:20','2026-03-19 11:46:20'),(11,'Appointment Status','appointment','Dear Imran Ali (104) your appointment status is approved Date: 03/19/2026 01:45 PM with Doctor Muhammad Haris Ghani (GP).','',NULL,104,'2026-03-19 16:46:20','yes','2026-03-19 11:46:20','2026-03-19 11:46:20');

--
-- Table structure for table `system_notification_setting`
--

CREATE TABLE `system_notification_setting` (
  `id` int NOT NULL AUTO_INCREMENT,
  `event` varchar(100) NOT NULL,
  `subject` varchar(255) NOT NULL,
  `staff_message` text,
  `is_staff` int NOT NULL DEFAULT '1',
  `patient_message` text,
  `is_patient` int NOT NULL DEFAULT '0',
  `variables` text,
  `url` varchar(255) NOT NULL,
  `patient_url` varchar(255) NOT NULL,
  `notification_type` varchar(255) NOT NULL,
  `is_active` int NOT NULL DEFAULT '1',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `index_event` (`event`),
  KEY `index_is_staff` (`is_staff`),
  KEY `index_is_patient` (`is_patient`)
) ENGINE=InnoDB AUTO_INCREMENT=65 DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `system_notification_setting`
--

INSERT INTO `system_notification_setting` VALUES (1,'notification_appointment_created','New Appointment Created','Appointment has been created for Patient: {{patient_name}} ({{patient_id}}). Appointment Date: {{appointment_date}}  With Doctor Name: {{doctor_name}}.',1,'Dear {{patient_name}} ({{patient_id}}) your appointment has been created with Doctor: {{doctor_name}}.',1,'{{appointment_date}} {{patient_name}} {{patient_id}} {{doctor_name}} {{message}}','','','appointment',1,'2021-09-17 02:54:13','2025-05-10 05:52:30'),(2,'appointment_approved','Appointment Status','Patient: {{patient_name}} ({{patient_id}}) appointment status is {{appointment_status}} with Doctor:  {{doctor_name}} Date: {{appointment_date}}.',1,'Dear {{patient_name}} ({{patient_id}}) your appointment status is {{appointment_status}} Date: {{appointment_date}} with Doctor {{doctor_name}}.',1,'{{appointment_date}} {{patient_name}} {{patient_id}} {{doctor_name}} {{message}} {{appointment_status}}','','','appointment',1,'2021-09-17 02:54:13','2025-05-10 05:52:30'),(3,'opd_visit_created','New OPD Visit Created','OPD Visit has been created for patient: {{patient_name}} ({{patient_id}}) with doctor: {{doctor_name}}. Patient Symptoms Details are {{symptoms_description}} and any known allergies: {{any_known_allergies}} .',1,'Dear: {{patient_name}} ({{patient_id}}) your OPD visit has been created.  Your Symptoms Details are {{symptoms_description}} and any known allergies: {{any_known_allergies}}. ',1,'{{patient_name}} {{patient_id}} {{symptoms_description}} {{any_known_allergies}} {{appointment_date}} {{doctor_name}}','','','opd',1,'2021-09-17 02:54:13','2025-05-10 05:52:30'),(4,'notification_opd_prescription_created','New OPD Prescription Created','New OPD prescription has been created for Patient: {{patient_name}} ({{patient_id}}) Checkup ID: ({{checkup_id}}). Prescription {{prescription_no}} prescribe by {{prescribe_by}}.  \r\n\r\n Prescription Details.\r\n(1) Finding Description: {{finding_description}}\r\n(2) Medicine Details: {{medicine}}\r\n(3) Radiology Test: {{radilogy_test}}\r\n(4) Pathology Test: {{pathology_test}}',1,'Dear {{patient_name}} ({{patient_id}}) Checkup ID: ({{checkup_id}}) your OPD ({{opd_no}}) prescription has been created . Please Check your finding details {{finding_description}} prescribe by {{prescribe_by}}.\r\n\r\nPlease Check prescription details. \r\n(1) Medicines Details: {{medicine}}\r\n(2) Radiology Test: {{radilogy_test}}\r\n(3) Pathology Test: {{pathology_test}}',1,'{{prescription_no}} {{opd_no}} {{checkup_id}} {{finding_description}} {{medicine}} {{radilogy_test}} {{pathology_test}} {{prescribe_by}} {{generated_by}} {{patient_name}} {{patient_id}}','','','opd',1,'2021-09-17 02:54:13','2025-05-10 05:52:30'),(5,'add_opd_patient_charge','Add OPD Patient Charge','New OPD charges added in OPD Number: ({{opd_no}}) For Patient: {{patient_name}} ({{patient_id}}). In OPD applied charges is {{charge_type}}, charge category {{charge_category}} and charge Name {{charge_name}} quantity {{qty}}. Total net payable bill amount is {{net_amount}} date {{date}}',1,'Dear {{patient_name}}({{patient_id}}) OPD Number ({{opd_no}}) . In OPD applied charge name {{charge_type}} , category {{charge_category}},  charge name {{charge_name}} quantity {{qty}} and your net payable bill amount is {{net_amount}} Date {{date}}.',1,'{{patient_name}} {{patient_id}}  {{opd_no}} {{charge_type}} {{charge_category}} {{charge_name}} {{qty}} {{net_amount}} {{date}} {{doctor_name}}','','','opd',1,'2021-09-17 02:54:13','2025-05-10 05:52:30'),(6,'add_opd_payment','Add OPD Payment','New OPD payment has been received from Patient: {{patient_name}}({{patient_id}}) OPD Number: ({{opd_no}}) transaction id: {{transaction_id}} payment date: {{date}} payment amount: {{amount}} payment mode: {{payment_mode}}.',1,'Dear {{patient_name}} ({{patient_id}}) your payment successfully received. OPD Number: {{opd_no}} transaction id: {{transaction_id}} payment date: {{date}} payment amount: ${{amount}} payment mode: {{payment_mode}}. ',1,'{{patient_name}} {{patient_id}} {{opd_no}} {{date}} {{amount}} {{payment_mode}} {{transaction_id}}','','','opd',1,'2021-09-17 02:54:13','2025-05-10 05:52:30'),(7,'add_opd_medication_dose','New OPD Medication Dose','Consultant Doctor {{doctor_name}} has given medicine {{medicine_name}} Category is {{medicine_category}} Dosage {{dosage}} for OPD patient number is  {{opd_no}} patient name is {{patient_name}} medicine time  {{date}} {{time}}.',1,'Dear {{patient_name}} ({{patient_id}}) OPD Number: {{opd_no}} you have been given the Medicine is {{medicine_name}} Dose ({{dosage}}) medicine time {{date}} {{time}}.',1,'{{patient_name}} {{patient_id}}  {{opd_no}} {{case_id}} \r\n{{date}} {{time}}  {{medicine_name}} {{dosage}} {{medicine_category}}  {{doctor_name}}','','','opd',1,'2021-09-17 02:54:13','2025-05-10 05:52:30'),(8,'add_nurse_note','New IPD Nurse Note','Add New Nurse Note for IPD Number: ({{ipd_no}}) Patient: {{patient_name}} ({{patient_id}}) Case ID: {{case_id}} with consultant doctor  {{doctor_name}}. \r\n\r\nNurse Note Details:\r\n(1) Nurse Name: {{nurse_name}} ({{nurse_id}})\r\n(2) Note: {{note}}\r\n(3) Comment: {{comment}}',1,'Dear {{patient_name}} ({{patient_id}}) IPD Number: ({{ipd_no}}) and Case ID: {{case_id}} your consultant doctor is {{doctor_name}}. \r\n\r\nNurse Note Details:\r\n(1) Nurse Name: {{nurse_name}} ({{nurse_id}})\r\n(2) Note: {{note}}\r\n(3) Comment: {{comment}}',1,'{{patient_name}} {{patient_id}} {{ipd_no}} {{case_id}} {{doctor_name}} {{date}} {{nurse_name}} {{nurse_id}} {{note}} {{comment}}','','','ipd',1,'2021-09-17 02:54:13','2025-05-10 05:52:30'),(9,'move_in_ipd_from_opd','Patient Move in IPD From OPD','Patient {{patient_name}} ({{patient_id}}) move in IPD From OPD. Symptoms Details: {{symptoms_description}} and known allergies is  {{any_known_allergies}}. The patient is being shifted from opd to ipd whose consultant doctor is {{doctor_name}}.',1,'Dear {{patient_name}} ({{patient_id}}) you have been shifted from OPD to IPD consultant doctor is {{doctor_name}}. Check your symptoms details {{symptoms_description}} and known allergies {{any_known_allergies}}.\r\n\r\n',1,'{{patient_name}} {{patient_id}} {{symptoms_description}} {{any_known_allergies}} {{appointment_date}} {{doctor_name}}','','','opd',1,'2021-09-17 02:54:13','2025-05-10 05:52:30'),(10,'add_opd_operation','New OPD Operation','OPD Number: ({{opd_no}}) Patient: {{patient_name}} ({{patient_id}}) Case id: {{case_id}} has been shifted to the operation ward. Consultant Doctor is {{doctor_name}} .\r\n\r\nOperation Details.\r\nOperation Name: {{operation_name}}\r\nOperation Date: {{operation_date}}',1,'Dear {{patient_name}} {{patient_id}} your operation {{operation_name}} date is on {{operation_date}} and your consultant doctor is {{doctor_name}}.',1,'{{patient_name}} {{patient_id}} {{opd_no}} {{case_id}} {{operation_name}} {{operation_date}} {{doctor_name}}','','','opd',1,'2021-09-17 02:54:13','2025-05-10 05:52:30'),(11,'ipd_visit_created','New IPD Visit Created','IPD Visit has been created for {{patient_name}} ({{patient_id}}) with Doctor: {{doctor_name}}. Patient Symptoms Details are {{symptoms_description}}.',1,'Dear {{patient_name}} ({{patient_id}}) your IPD visit has been created .',1,'{{patient_name}} {{patient_id}} {{symptoms_description}} {{admission_date}} {{doctor_name}} {{bed_location}}','','','ipd',1,'2021-09-17 02:54:13','2025-05-10 05:52:30'),(12,'notification_ipd_prescription_created','Notification IPD Prescription Created','Prescription({{prescription_no}}) for IPD ({{ipd_no}}) prescribe by: {{priscribe_by}}. \r\n\r\nPrescription  Details-\r\nFinding Description: {{finding_description}}\r\nMedicine Name: {{medicine}}\r\nRadiology Test: {{radilogy_test}}\r\nPathology Test: {{pathology_test}}\r\n{{priscribe_by}}',1,'Dear {{patient_name}} {{patient_id}} your IPD prescription number {{prescription_no}} is prescribe by: {{priscribe_by}}. \r\n\r\nPrescription  Details-\r\n Finding Description: {{finding_description}}\r\n Medicine Name : {{medicine}}\r\n Radiology Test: {{radilogy_test}}\r\n Pathology Test: {{pathology_test}}',1,'{{prescription_no}} {{ipd_no}} {{finding_description}} {{medicine}} {{radilogy_test}} {{pathology_test}} {{priscribe_by}} {{generated_by}} {{patient_name}} {{patient_id}}','','','ipd',1,'2021-09-17 02:54:13','2025-05-10 05:52:30'),(14,'add_ipd_operation','Add IPD Operation','Patient Name : {{patient_name}} ({{patient_id}}) IPD Number : {{ipd_no}} Case Id : {{case_id}} has been shifted to the operation ward. Whose doctor is {{doctor_name}}.\r\n\r\nOperation Details-\r\n(1) Operation Name: {{operation_name}}\r\n(2) Operation  Date:  {{operation_date}}',1,'Dear {{patient_name}} ({{patient_id}}) your operation {{operation_name}} date is on {{operation_date}} with {{doctor_name}}.',1,'{{patient_name}} {{patient_id}} {{ipd_no}} {{case_id}} {{operation_name}} {{operation_date}} {{doctor_name}}','','','ipd',1,'2021-09-17 02:54:13','2025-05-10 05:52:30'),(15,'add_ipd_generate_bill','Add IPD Generate Bill','Generated bill for IPD Number {{ipd_no}}  Patient Name {{patient_name}} {{patient_id}} .\r\n\r\nBill Details\r\nTotal Amount {{total}}\r\nNet Amount {{net_amount}}\r\nTax  {{tax}}\r\nPaid Amount   {{paid}}\r\nDue Amount   {{due}}',1,'Dear {{patient_name}} {{patient_id}}  your IPD bill is generated for Case Id {{case_id}} .\r\n\r\nBill Details\r\nTotal Amount {{total}}\r\nNet Amount {{net_amount}}\r\nTax  {{tax}}\r\nPaid Amount   {{paid}}\r\nDue Amount   {{due}}',1,'{{patient_name}} {{patient_id}} {{ipd_no}} {{case_id}} {{net_amount}} {{total}} {{tax}} {{paid}} {{due}}','','','ipd',1,'2021-09-17 02:54:13','2025-05-10 05:52:30'),(16,'add_ipd_patient_charge','Add IPD Patient Charge','Add Charge for IPD Patient Name : {{patient_name}} ({{patient_id}}) IPD Number ({{ipd_no}}) has applied charge {{charge_type}}, category  {{charge_category}}, and Name {{charge_name}} total quantity {{qty}} . Now total net amount {{net_amount}} date {{date}}.',1,'Dear {{patient_name}} ({{patient_id}}) IPD Number {{ipd_no}} you have applied charge name is {{charge_type}}, category {{charge_category}} ,charge name {{charge_name}}  and total quantity {{qty}} now your net amount {{net_amount}} and date {{date}}.',1,'{{patient_name}} {{patient_id}} {{ipd_no}} {{charge_type}} {{charge_category}} {{charge_name}} {{qty}} {{net_amount}} {{date}}','','','ipd',1,'2021-09-17 02:54:13','2025-05-10 05:52:30'),(17,'add_ipd_payment','Add IPD Payment','Payment has been received from Patient Name: {{patient_name}} ({{patient_id}}) IPD NO: {{ipd_no}} transaction id: {{transaction_id}} payment date: {{date}} payment amount: {{amount}} payment mode: {{payment_mode}}.',1,'Dear {{patient_name}} ({{patient_id}}) IPD: {{ipd_no}} we have received your payment amount ({{amount}}) transaction id: {{transaction_id}} payment date: {{date}} payment mode: {{payment_mode}} .',1,'{{patient_name}} {{patient_id}} {{ipd_no}} {{date}} {{amount}} {{payment_mode}} {{transaction_id}}','','','ipd',1,'2021-09-17 02:54:13','2025-05-10 05:52:30'),(18,'add_ipd_medication_dose','Add IPD Medication Dose','Doctor {{doctor_name}}  has given medicine {{medicine_name}} Category is {{medicine_category}} Dosage {{dosage}} to Patient:  {{patient_name}} {{patient_id}} at {{date}} {{time}}.',1,'Dear {{patient_name}} ({{patient_id}}) IPD Number {{ipd_no}} you have been given the {{medicine_name}} dose {{dosage}} of medicine at {{date}} {{time}}.',1,'{{patient_name}} {{patient_id}} {{ipd_no}} {{case_id}} {{date}} {{time}} {{medicine_name}} {{dosage}} {{medicine_category}} {{doctor_name}}','','','ipd',1,'2021-09-17 02:54:13','2025-05-10 05:52:30'),(20,'add_consultant_register','Add Consultant Register','New Consultant Register: {doctor_name}} has been added  some instructions: {{instruction}} on date {{applied_date}} for the patients {{patient_name}} ({{patient_id}}) of IPD {{ipd_no}}.',1,'Dear {{patient_name}} ({{patient_id}}) IPD Number: ({{ipd_no}}). Consultant: {{doctor_name}} has added some instructions: {{instruction}} on applied date {{applied_date}}.',1,'{{patient_name}} {{patient_id}} {{ipd_no}} {{case_id}} {{applied_date}} {{instruction_date}} {{doctor_name}} {{instruction}}','','','ipd',1,'2021-09-17 02:54:13','2025-05-10 05:52:30'),(22,'pharmacy_generate_bill','Pharmacy Generate Bill','Pharmacy Bill Generated for Patient: {{patient_name}} ({{patient_id}}) Case ID: {{case_id}}.\r\n\r\nPharmacy Bill Details-\r\nTotal Amount: {{total}}\r\nNet Amount: {{net_amount}}\r\nDiscount: {discount}} \r\nTax: {{tax}}\r\nPaid Amount  $ {{paid}}\r\nDue Amount  $ {{due_amount}}',1,'Dear {{patient_name}} {{patient_id}} your pharmacy bill is generated. \r\n\r\nBill Details-\r\nTotal Amount: {{total}}\r\nNet Amount: {{net_amount}}\r\nDiscount: {{discount}}\r\nTax: {{tax}}\r\nPaid Amount: {{paid}}\r\nDue Amount: {{due_amount}}',1,'{{patient_name}} {{patient_id}} {{case_id}} {{bill_no}} {{medicine_details}} {{doctor_name}} {{total}} {{discount}} {{tax}} {{net_amount}} {{date}} {{paid}} {{due_amount}}','','','pharmacy',1,'2021-09-17 02:54:13','2025-05-10 05:52:30'),(23,'add_medicine','Add Medicine','New Add Medicine Details: \r\n\r\nMedicine Name  {{medicine_name}} , \r\nMedicine Category  {{medicine_category}} ,\r\nMedicine Company  {{medicine_company}} ,\r\nMedicine Composition  {{medicine_composition}} ,\r\nMedicine Group {{medicine_group}} , \r\nUnit {{unit}} ,\r\nPacking  {{unit_packing}} ,',1,'',0,'{{medicine_name}} {{medicine_category}} {{medicine_company}} {{medicine_composition}} {{medicine_group}} {{unit}} {{unit_packing}}','','','pharmacy',1,'2021-09-17 02:54:13','2025-05-10 05:52:30'),(24,'add_bad_stock','Add Bad Stock','Add Bad Stock Details :\r\n\r\nBatch No {{batch_no}}\r\nExpiry Date  {{expiry_date}}\r\nOutward Date   {{outward_date}}  \r\n Total Qty  {{qty}}',1,'',0,'{{batch_no}} {{expiry_date}} {{outward_date}} {{qty}}','','','pharmacy',1,'2021-09-17 02:54:13','2025-05-10 05:52:30'),(25,'purchase_medicine','Purchase Medicine','Purchase Medicine Details :\r\nSupplier Name: {{supplier_name}} \r\nMedicine Details: {{medicine_details}}\r\nPurchase Date: {{purchase_date}}\r\nInvoice Number:  {{invoice_number}}\r\nTotal: {{total}}\r\nDiscount: {{discount}} \r\nTax: {{tax}}\r\nNet Amount: {{net_amount}}',1,'',0,'{{supplier_name}} {{medicine_details}} {{purchase_date}} {{invoice_number}} {{total}} {{discount}} {{tax}} {{net_amount}}','','','pharmacy',1,'2021-09-17 02:54:13','2025-05-10 05:52:30'),(26,'pathology_investigation','Pathology Investigation','Pathology Test Report for Patient: {{patient_name}} ({{patient_id}}) case id: {{case_id}}. Pathology test assign by {{doctor_name}}. pathology charge- total amount {{total}}, discount {{discount}} ,tax {{tax}}  net amount is {{net_amount}} and total paid amount {{paid_amount}}.',1,'Dear {{patient_name}} ({{patient_id}}) case id: {{case_id}}. Your pathology test bill number is {{bill_no}} and total amount {{total}}, tax {{tax}}, discount {{discount}} so now your net amount is {{net_amount}}.  You have paid your total amount {{paid_amount}}.',1,'{{patient_name}} {{patient_id}} {{case_id}} {{bill_no}} {{date}} {{doctor_name}}  {{total}} {{discount}} {{tax}} {{net_amount}} {{paid_amount}}','','','pathology',1,'2021-09-17 02:54:13','2025-05-10 05:52:30'),(27,'pathology_sample_collection','Pathology Sample Collection','Pathology Bill Number {{bill_no}} Patient: {{patient_name}} ({{patient_id}}) Case id: {{case_id}}. Sample Collected  by  {{sample_collected_person_name}} on {{collected_date}} from {{pathology_center}} and report expected date is {{expected_date}}.',1,'Dear {{patient_name}} {{patient_id}} Case id: {{case_id}}  your pathology test sample collected by {{sample_collected_person_name}} on {{collected_date}} from {{pathology_center}} . Pathology Test report expected date {{expected_date}}. ',1,'{{patient_name}} {{patient_id}} {{case_id}} {{bill_no}} {{test_name}} {{sample_collected_person_name}} {{collected_date}} {{pathology_center}} {{expected_date}} {{doctor_name}}','','','pathology',1,'2021-09-17 02:54:13','2025-05-10 05:52:30'),(28,'pathology_test_report','Pathology Test Report','Pathology Test Report Bill Number {{bill_no}} for Patient Name is {{patient_name}} {{patient_id}} Case id {{case_id}} and test approved by {{approved_by}} on {{approve_date}} . Pathology Test {{test_name}} sample collected by {{sample_collected_person_name}} on {{collected_date}} from {{pathology_center}} and Expected date {{expected_date}} . {{doctor_name}}',1,'Dear {{patient_name}} {{patient_id}} Case id  {{case_id}}. Your Pathology Test {{test_name}} sample collected by {{sample_collected_person_name}} on  {{collected_date}} from {{pathology_center}} .',1,'{{patient_name}} {{patient_id}} {{case_id}} {{bill_no}} {{test_name}} {{sample_collected_person_name}} {{collected_date}} {{pathology_center}} {{expected_date}} {{approved_by}} {{approve_date}} {{doctor_name}}','','','pathology',1,'2021-09-17 02:54:13','2025-05-10 05:52:30'),(29,'radiology_investigation','Radiology Investigation','Radiology Test Report for Patient: {{patient_name}} ({{patient_id}}) case id: {{case_id}}. Radiology test assign by {{doctor_name}}. Test Charge total amount {{total}}, total discount {{discount}}, tax {{tax}}.',1,'Dear {{patient_name}} ({{patient_id}}) case id: {{case_id}}. Your Radiology test bill number is {{bill_no}},  total bill amount {{total}} tax {{tax}}, discount {{discount}} so now your net amount {{net_amount}} and total paid amount is {{paid}}. ',1,'{{patient_name}} {{patient_id}} {{case_id}} {{bill_no}} {{date}} {{doctor_name}}  {{total}} {{net_amount}} {{paid}} {{discount}} {{tax}}','','','radiology',1,'2021-09-17 02:54:13','2025-05-10 05:52:30'),(30,'radiology_sample_collection','Radiology Sample Collection','Radiology Bill Number: {{bill_no}} for Patient: {{patient_name}} ({{patient_id}}) Case id: {{case_id}}. Radiology test name is {{test_name}} and sample collected by {{sample_collected_person_name}} on {{collected_date}} from {{radiology_center}} and report expected date is {{expected_date}}.',1,'Dear {{patient_name}} {{patient_id}} Case id: {{case_id}}  your radiology test is {{test_name}} and  sample collected by {{sample_collected_person_name}} on {{collected_date}} from {{radiology_center}}. Test report expected date {{expected_date}}. ',1,'{{patient_name}} {{patient_id}} {{case_id}} {{bill_no}} {{test_name}} {{sample_collected_person_name}} {{collected_date}} {{radiology_center}} {{expected_date}} {{doctor_name}}','','','radiology',1,'2021-09-17 02:54:13','2025-05-10 05:52:30'),(31,'radiology_test_report','Radiology Test Report','Radiology Bill Number {{bill_no}} Patient Name {{patient_name}} ({{patient_id}}) Case id ( {{case_id}}). Sample Collected  by  {{sample_collected_person_name}} on {{collected_date}} from {{radiology_center}} and Expected date is {{expected_date}}.',1,'Dear {{patient_name}} {{patient_id}} Case id ({{case_id}}) your radiology test sample collected by {{sample_collected_person_name}} on {{collected_date}} from  {{radiology_center}}. radiology test report expected date {{expected_date}} .',1,'{{patient_name}} {{patient_id}} {{case_id}} {{bill_no}} {{test_name}} {{sample_collected_person_name}} {{collected_date}} {{radiology_center}} {{expected_date}} {{approved_by}} {{approved_date}} {{doctor_name}}','','','radiology',1,'2021-09-17 02:54:13','2025-05-10 05:52:30'),(32,'add_bag_stock','Add Bag Stock','New Add Bag Stock Details- Donor Name: {{donor_name}}, Blood Group: ({{blood_group}}) and contact number {{contact_no}} . Donate bag details blood bag number ({{bag}}) and charge {{charge_name}} donated date {{donate_date}}. Total amount {{total}} discount {{discount}} tax {{tax}} so total net amount is {{net_amount}}.',1,'',0,'{{donor_name}} {{blood_group}} {{contact_no}} {{donate_date}} {{bag}} {{charge_name}} {{total}} {{discount}} {{tax}} {{net_amount}}','','','blood_bank',1,'2021-09-17 02:54:13','2025-05-10 05:52:30'),(33,'blood_issue','Blood Issue','Blood issue for Bill Number {{bill_no}} Patient: {{patient_name}} ({{patient_id}}) Case Id {{case_id}} . Patient blood group is {{blood_group}} and bag number ({{bag}}) issue on {{issue_date}}, reference by {{reference_name}}. Applied charge name is {{charge_name}} and total amount {{total}}, discount {{discount}}, tax {{tax}}, now total net amount{{net_amount}}.',1,'Dear {{patient_name}} ({{patient_id}}) case id: {{case_id}} your bill number {{bill_no}} blood group {{blood_group}} bag number is {{bag}} charge name  {{charge_name}} issue on {{issue_date}} reference by {{reference_name}} .Total amount {{total}}, discount {{discount}}, tax {{tax}} now your total net amount {{net_amount}}.',1,'{{patient_name}} {{patient_id}} {{case_id}} {{bill_no}} {{issue_date}} {{reference_name}} {{blood_group}} {{bag}} {{charge_name}} {{total}} {{discount}} {{tax}} {{net_amount}} ','','','blood_bank',1,'2021-09-17 02:54:13','2025-05-10 05:52:30'),(34,'add_component_of_blood','Add Component of Blood','{{component_name}} component has been added on the bag number {{bag}} of Blood Group {{blood_group}} .',1,'',0,'{{blood_group}} {{bag}} {{ component_name}} {{component_bag}}','','','blood_bank',1,'2021-09-17 02:54:13','2025-05-10 05:52:30'),(35,'component_issue','Component Issue','Component Issue for  Bill Number {{bill_no}} Patient Name is {{patient_name}} ({{patient_id}}) Case Id: {{case_id}}.  Blood group {{blood_group}} Component: {{component}}, bag number {{bag}} issue on {{issue_date}}  reference by {{reference_name}}. Applied charge name {{charge_name}} total amount {{total}}  discount {{discount}} tax {{tax}} now total net amount {{net_amount}}.',1,'Dear {{patient_name}} ({{patient_id}}) {{case_id}} you have issued a component {{component}} Bag number is {{bag}}  blood group is {{blood_group}} issue on  {{issue_date}} reference by {{reference_name}} . Total amount {{total}} Discount {{discount}} Tax {{tax}} now your total net amount  is {{net_amount}}.',1,'{{patient_name}} {{patient_id}} {{case_id}} {{bill_no}} {{issue_date}} {{reference_name}} {{blood_group}} {{component}} {{bag}} {{charge_name}} {{total}} {{discount}} {{tax}} {{net_amount}} ','','','blood_bank',1,'2021-09-17 02:54:13','2025-05-10 05:52:30'),(36,'live_opd_consultation_add','Live OPD Consultation Add','Live Consultation for  OPD {{opd_no}} Patient  Name {{patient_name}} {{patient_id}}  with Consultant Doctor {{doctor_name}} {{doctor_id}} . Live consulatent Title  {{consultation_title}} Date {{consultation_date}} minutes {{consultation_date}} {{consultation_duration_minutes}}.',1,'Dear {{patient_name}} {{patient_id}} your live consultation subject {{consultation_title}} date {{consultation_date}} minute {{consultation_duration_minutes}}  with Consultant Doctor {{doctor_name}} ({{doctor_id}}).',1,'{{patient_name}} {{patient_id}} {{consultation_title}} {{consultation_date}} {{consultation_duration_minutes}}  {{opd_no}} {{checkup_id}} {{doctor_id}} {{doctor_name}}','','','live_consultation',1,'2021-09-17 02:54:13','2025-05-10 05:52:30'),(37,'live_opd_consultation_start','Live Opd Consultation Start','patient_name: {{patient_name}} patient_id: {{patient_id}} consultation_title: {{consultation_title}} consultation_date: {{consultation_date}}  consultation_duration_minutes: {{consultation_duration_minutes}} opd_no: {{opd_no}} checkup_id: {{checkup_id}} doctor_name: {{doctor_name}}',1,'patient_name: {{patient_name}} patient_id: {{patient_id}} consultation_title: {{consultation_title}} consultation_date: {{consultation_date}}  consultation_duration_minutes: {{consultation_duration_minutes}} opd_no: {{opd_no}} checkup_id: {{checkup_id}} doctor_name: {{doctor_name}}',1,'{{patient_name}} {{patient_id}} {{consultation_title}} {{consultation_date}} {{consultation_duration_minutes}}  {{opd_no}} {{checkup_id}} {{doctor_name}}','','','live_consultation',1,'2021-09-17 02:54:13','2025-05-10 05:52:30'),(38,'live_meeting_start','Live Meeting Start','Live Meeting has been created for Staff: {{staff_list}}  Meeting Title is {{meeting_title}}  and Meeting Date {{meeting_date}} Meeting Duration Minutes: {{meeting_duration_minutes}}.',1,'',0,'{{meeting_title}} {{meeting_date}} {{meeting_duration_minutes}} {{staff_list}}','','','live_consultation',1,'2021-09-17 02:54:13','2025-05-10 05:52:30'),(39,'live_meeting_add','Live Meeting Add','Live Meeting Created for Staff {{staff_list}} and  Meeting Title is {{meeting_title}} on Meeting Date {{meeting_date}} Meeting Duration Minutes{{meeting_duration_minutes}} .',1,'',0,'{{meeting_title}} {{meeting_date}} {{meeting_duration_minutes}} {{staff_list}}','','','live_consultation',1,'2021-09-17 02:54:13','2025-05-10 05:52:30'),(40,'add_referral_payment','Add Referral Payment','Patient Name {{patient_name}} ({{patient_id}}) in {{patient_type}} Bill number {{bill_no}} and patient bill amount is {{patient_bill_amount}}. Commission percentage of total bill {{commission_percentage}}. Commission amount {{commission_amount}} has been given to the payee {{payee}}.',1,'',0,'{{patient_name}} {{patient_id}} {{patient_type}} {{bill_no}} {{patient_bill_amount}} {{payee}} {{commission_percentage}} {{commission_amount}}','','','referral',1,'2021-09-17 02:54:13','2025-05-10 05:52:30'),(41,'patient_certificate_generate','Patient Certificate Generate','Patient Name {{patient_name}} {{patient_id}} certificate {{certificate_name}} has been generated. OPD/ IPD number {{opd_ipd_no}}.',1,'Dear Patient {{patient_name}} {{patient_id}} OPD / IPD number is {{opd_ipd_no}}  your certificate {{certificate_name}} has been generated.',1,'{{patient_name}} {{patient_id}} {{opd_ipd_no}} {{certificate_name}}','','','certificate',1,'2021-09-17 02:54:13','2025-05-10 05:52:30'),(42,'patient_id_card_generate','remaining','ID Card is generated for Patient Name {{patient_name}} {{patient_id}} .',1,'Dear {{patient_name}} {{patient_id}} your id card is generated .',1,'{{patient_name}} {{patient_id}}  {{id_card_template}}','','','certificate',1,'2021-09-17 02:54:13','2025-05-10 05:52:30'),(43,'generate_staff_id_card','Generate Staff ID Card','Staff ID card is generated for Role: {{role}}, staff name {{staff_name}} suename {{staff_surname}} employee id: {{employee_id}}.',1,'',0,'{{role}} {{staff_name}} {{staff_surname}} {{employee_id}} {{id_card_template}}','','','certificate',1,'2021-09-17 02:54:13','2025-05-10 05:52:30'),(44,'create_ambulance_call','Create Ambulance Call','{{patient_name}} {{patient_id}} has booked an ambulance on {{date}} his charge name {{charge_name}} tax {{tax}}  net amount {{net_amount}} and total paid  amount {{paid_amount}}.\r\n\r\nAmbulance Details \r\n\r\nVehicle Model  {{vehicle_model}}\r\nDriver Name  {{driver_name}}',1,'Dear {{patient_name}} {{patient_id}} your ambulance is booked on {{date}} . Charge applied {{charge_name}}, tax {{tax}} net amount is {{net_amount}} and your paid amount is {{paid_amount}} .\r\n\r\nAmbulance Details-\r\nVehicle Model: {{vehicle_model}}\r\nDriver Name: {{driver_name}}',1,'{{patient_name}} {{patient_id}} {{vehicle_model}} {{driver_name}} {{date}} {{charge_name}} {{tax}} {{net_amount}} {{paid_amount}}','','','ambulance',1,'2021-09-17 02:54:13','2025-05-10 05:52:30'),(45,'add_birth_record','Add Birth Record','Patient {{mother_name}} ({{mother_id}}) has given birth to a new baby {{child_name}} on {{birth_date}}.',1,'Dear {{mother_name}} {{mother_id}} case id : {{case_id}} your baby {{child_name}} is born on {{birth_date}}.',1,'{{mother_name}} {{mother_id}} {{child_name}} {{birth_date}} {{case_id}}','','','birth_death_record',1,'2021-09-17 02:54:13','2025-05-10 05:52:30'),(46,'add_death_record','Add Death Record','Patient {{patient_name}} ({{patient_id}}) Case id :{{case_id}} has died on {{death_date}}.',1,'',0,'{{case_id}} {{patient_name}} {{patient_id}} {{death_date}}','','','birth_death_record',1,'2021-09-17 02:54:13','2025-05-10 05:52:30'),(47,'staff_enabale_disable','Staff Enabale/Disable','Staff Name: {{staff_name}} surname: {{staff_surname}} Employment ID: ({{employee_id}}) has been {{status}}.',1,'',0,'{{staff_name}} {{staff_surname}} {{employee_id}} {{status}}','','','human_resource',1,'2021-09-17 02:54:13','2025-05-10 05:52:30'),(48,'staff_generate_payroll','Staff Generate Payroll','Payroll Generated for  Month {{month}} year {{year}}  Role {{role}} . Basic Salary is {{basic_salary}} Earning  {{earning}} Deduction {{deduction}} Gross salary  {{gross_salary}}.  Now Total Net Salary {{net_salary}}.',1,'',0,'{{role}} {{month}} {{year}} {{basic_salary}} {{earning}} {{deduction}} {{gross_salary}} {{tax_amount}} {{net_salary}}','','','human_resource',1,'2021-09-17 02:54:13','2025-05-10 05:52:30'),(49,'staff_leave','Staff Leave','Staff {{staff_name}} {{staff_surname}} ({{employee_id}}) has applied leave on Date {{apply_date}} for leave {{days}} days. date {{leave_date}} . Currently Leave Status is {{leave_status}} .',1,'',0,'{{apply_date}} {{leave_type}} {{leave_date}} {{days}} {{staff_name}} {{staff_surname}} {{employee_id}}\r\n{{leave_status}}','','','human_resource',1,'2021-09-17 02:54:13','2025-05-10 05:52:30'),(50,'staff_leave_status','Staff Leave Status','Staff Name {{staff_name}} {{staff_surname}} {{employee_id}} has applied leave for {{days}} days. leave date: {{leave_date}}, Leave Status:  {{leave_status}}.',1,'',0,'{{apply_date}} {{leave_type}} {{leave_date}} {{days}} {{staff_name}} {{staff_surname}} {{employee_id}}\r\n{{leave_status}}','','','human_resource',1,'2021-09-17 02:54:13','2025-05-10 05:52:30'),(51,'live_ipd_consultation_add','Live IPD Consultation Add','Live Consultation for IPD {{ipd_no}} Patient  Name {{patient_name}} {{patient_id}} with Consultant Doctor {{doctor_name}} {{doctor_id}} . Live consulatent Title  {{consultation_title}} Date {{consultation_date}} minutes {{consultation_date}} {{consultation_duration_minutes}}.',1,'Dear {{patient_name}} {{patient_id}} your live consultation subject {{consultation_title}} date {{consultation_date}} minute {{consultation_duration_minutes}}  with Consultant Doctor {{doctor_name}} ({{doctor_id}}).',1,'{{patient_name}} {{patient_id}} {{consultation_title}} {{consultation_date}} {{consultation_duration_minutes}} \r\n{{ipd_no}} {{doctor_id}} {{doctor_name}}','','','live_consultation',1,'2021-09-17 02:54:13','2025-05-10 05:52:30'),(52,'live_ipd_consultation_start','Live IPD Consultation Start','IPD No {{ipd_no}} Patient Name {{patient_name}} {{patient_id}}. Live Consultation Doctor {{doctor_name}}. \r\n\r\nLive Consultation Details.\r\nConsultation Title {{consultation_title}}\r\nConsultation Date  {{consultation_date}}\r\nConsultation Duration Minutes  {{consultation_duration_minutes}}',1,'Dear patient patient_name: {{patient_name}} patient_id: {{patient_id}} , your live consultation consultation_title: {{consultation_title}} has been scheduled on Consultation Date: {{consultation_date}} for the duration of consultation_duration_minutes: {{consultation_duration_minutes}} minute, ipd_no: {{ipd_no}} and your consultant doctor doctor_name: {{doctor_name}}  please do not share the link to any body.',1,'{{patient_name}} {{patient_id}} {{consultation_title}} {{consultation_date}} {{consultation_duration_minutes}}  {{ipd_no}} {{doctor_name}}','','','live_consultation',1,'2021-09-17 02:54:13','2025-05-10 05:52:30'),(53,'add_ipd_discharge_patient','Add IPD Discharge Patient','IPD Patient: {{patient_name}}({{patient_id}}) status: ({{discharge_status}}) on {{discharge_date}}.',1,'Dear {{patient_name}} {{patient_id}} you have been {{discharge_status}} on {{discharge_date}}.',1,'{{patient_name}} {{patient_id}} {{discharge_status}} {{discharge_date}} {{ipd_no}} {{case_id}}','','','ipd',1,'2021-09-17 02:54:13','2025-05-10 05:52:30'),(54,'add_opd_discharge_patient','Add OPD Discharge Patient','OPD Patient {{patient_name}} {{patient_id}} discharge status: {discharge_status}} on {{discharge_date}}.',1,'\r\nDear {{patient_name}} {{patient_id}} you have been {{discharge_status}} on {{discharge_date}}.',1,'{{patient_name}} {{patient_id}} {{discharge_status}} {{discharge_date}} {{opd_no}} {{case_id}}','','','opd',1,'2021-09-17 02:54:13','2025-05-10 05:52:30'),(55,'add_payroll_payment','Add Payroll Payment','Month {{month}} salary amount {{payment_amount}} has been given to staff name {{staff}} on date {{payment_date}}.',1,'staff: {{staff}} payment_amount: {{payment_amount}} month: {{month}} year: {{year}} payment_mode: {{payment_mode}} payment_date: {{payment_date}}\r\n',0,'{{staff}} {{payment_amount}} {{month}} {{year}} {{payment_mode}} {{payment_date}}','','','human_resource',1,'2021-09-17 02:54:13','2025-05-10 05:52:30'),(56,'add_opd_generate_bill','Add OPD Generate Bill','Generated bill for OPD Number {{opd_id}}  Patient Name {{patient_name}} {{patient_id}} .\r\n\r\nBill Details\r\nTotal Amount {{total}}\r\nNet Amount {{net_amount}}\r\nTax  {{tax}}\r\nPaid Amount   {{paid}}\r\nDue Amount   {{due}}',1,'Dear {{patient_name}} {{patient_id}}  your OPD bill is generated for Case Id {{case_id}} .\r\n\r\nBill Details\r\nTotal Amount {{total}}\r\nNet Amount {{net_amount}}\r\nTax  {{tax}}\r\nPaid Amount   {{paid}}\r\nDue Amount   {{due}}',1,'{{patient_name}} {{patient_id}} {{opd_id}} {{case_id}} {{net_amount}} {{total}} {{tax}} {{paid}} {{due}}','','','opd',1,'2021-09-17 02:54:13','2025-05-10 05:52:30'),(57,'patient_consultation_add','Patient Consultation Add','Live Consultation for Patient  Name {{patient_name}} {{patient_id}}  with Consultant Doctor {{doctor_name}} . Live consulatent Title  {{consultation_title}} Date {{consultation_date}} minutes {{consultation_date}} {{consultation_duration_minutes}}.',1,'Dear {{patient_name}} {{patient_id}} your live consultation subject {{consultation_title}} date {{consultation_date}} minute {{consultation_duration_minutes}}  with Consultant Doctor {{doctor_name}}.',1,'{{patient_name}} {{patient_id}} {{consultation_title}} {{consultation_date}} {{consultation_duration_minutes}}  {{checkup_id}} {{doctor_name}}','','','live_consultation',1,'2021-09-17 02:54:13','2025-05-10 05:52:30'),(58,'opd_patient_discharge_revert','opd_patient_discharge_revert','patient_name: {{patient_name}} patient_id: {{patient_id}} discharge_status: {{discharge_status}} discharge_date: {{discharge_date}} opd_no: {{opd_no}} case_id: {{case_id}}',1,'patient_name: {{patient_name}} patient_id: {{patient_id}} discharge_status: {{discharge_status}} discharge_date: {{discharge_date}} opd_no: {{opd_no}} case_id: {{case_id}}',1,'{{patient_name}} {{patient_id}} {{discharge_status}} {{discharge_date}} {{opd_no}} {{case_id}}','','','opd',1,'2021-09-17 02:54:13','2025-05-10 05:52:30'),(59,'ipd_patient_discharge_revert','ipd_patient_discharge_revert','patient_name: {{patient_name}} patient_id: {{patient_id}} discharge_status: {{discharge_status}} discharge_date: {{discharge_date}} ipd_no: {{ipd_no}} case_id: {{case_id}}',1,'patient_name: {{patient_name}} patient_id: {{patient_id}} discharge_status: {{discharge_status}} discharge_date: {{discharge_date}} ipd_no: {{ipd_no}} case_id: {{case_id}}',1,'{{patient_name}} {{patient_id}} {{discharge_status}} {{discharge_date}} {{ipd_no}} {{case_id}}','','','opd',1,'2021-09-17 02:54:13','2025-05-10 05:52:30'),(60,'add_ipd_previous_obstetric_history','Add IPD ┬áPrevious Obstetric History','IPD  Previous Obstetric History been created for Patient: {{patient_name}} ({{patient_id}}).',1,'IPD  Previous Obstetric History been created for Patient: {{patient_name}} ({{patient_id}}). ',1,'{{patient_name}} {{patient_id}} {{ipd_no}} {{case_id}} {{place_of_delivery}}','','','ipd',1,'2021-09-17 02:54:13','2025-05-10 05:52:30'),(61,'add_ipd_postnatal_history','Add IPD Postnatal History','IPD Postnatal History\r\n has been created for Patient: {{patient_name}} ({{patient_id}}).',1,'IPD Postnatal History\r\n has been created for Patient: {{patient_name}} ({{patient_id}}).\r\n',1,'{{patient_name}} {{patient_id}} {{ipd_no}} {{case_id}} {{labor_time}} {{delivery_time}}','','','ipd',1,'2021-09-17 02:54:13','2025-05-10 05:52:30'),(62,'add_ipd_antenatal','Add IPD Antenatal','IPD Antenatal has been created for Patient: {{patient_name}} ({{patient_id}}).',1,'IPD Antenatal has been created for Patient: {{patient_name}} ({{patient_id}}). \r\n\r\n',1,'{{patient_name}} {{patient_id}} {{ipd_no}} {{case_id}} {{date}}','','','ipd',1,'2021-09-17 02:54:13','2025-05-10 05:52:30'),(63,'add_opd_antenatal','Add OPD Antenatal','OPD Antenatal has been created for Patient: {{patient_name}} ({{patient_id}}).',1,'\r\n OPD Antenatal has been created for Patient: {{patient_name}} ({{patient_id}}).',1,'{{patient_name}} {{patient_id}} {{opd_no}} {{case_id}} {{date}}','','','opd',1,'2021-09-17 02:54:13','2025-05-10 05:52:30'),(64,'opd_new_checkup_created','OPD New Checkup Created','OPD New Checkup Created {{patient_name}} doctor and admin msg',1,'OPD New Checkup Created {{patient_name}} patient mesg',1,'{{patient_name}} {{patient_id}} {{ipd_no}} {{case_id}} {{place_of_delivery}}','','','opd',1,'2021-09-17 02:54:13','2025-05-10 05:52:30');

--
-- Table structure for table `tax_category`
--

CREATE TABLE `tax_category` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `percentage` float(10,2) DEFAULT '0.00',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `index_name` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `tax_category`
--

INSERT INTO `tax_category` VALUES (1,'No Tax',0.00,'2026-03-18 09:06:05','2026-03-18 09:06:05');

--
-- Table structure for table `transactions`
--

CREATE TABLE `transactions` (
  `id` int NOT NULL AUTO_INCREMENT,
  `type` varchar(100) DEFAULT NULL,
  `section` varchar(50) NOT NULL,
  `patient_id` int DEFAULT NULL,
  `case_reference_id` int DEFAULT NULL,
  `opd_id` int DEFAULT NULL,
  `ipd_id` int DEFAULT NULL,
  `pharmacy_bill_basic_id` int DEFAULT NULL,
  `pathology_billing_id` int DEFAULT NULL,
  `radiology_billing_id` int DEFAULT NULL,
  `blood_donor_cycle_id` int DEFAULT NULL,
  `blood_issue_id` int DEFAULT NULL,
  `ambulance_call_id` int DEFAULT NULL,
  `appointment_id` int DEFAULT NULL,
  `attachment` text,
  `attachment_name` text,
  `amount_type` varchar(10) DEFAULT NULL,
  `amount` float(10,2) DEFAULT NULL,
  `processing_charge_type` varchar(255) NOT NULL,
  `gateway_processing_charge` float(10,2) NOT NULL,
  `payment_mode` varchar(100) DEFAULT NULL,
  `cheque_no` varchar(100) DEFAULT NULL,
  `cheque_date` date DEFAULT NULL,
  `payment_date` datetime DEFAULT NULL,
  `note` text,
  `received_by` int DEFAULT NULL,
  `bill_id` int DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `patient_id` (`patient_id`),
  KEY `case_reference_id` (`case_reference_id`),
  KEY `opd_id` (`opd_id`),
  KEY `ipd_id` (`ipd_id`),
  KEY `pharmacy_bill_basic_id` (`pharmacy_bill_basic_id`),
  KEY `pathology_billing_id` (`pathology_billing_id`),
  KEY `radiology_billing_id` (`radiology_billing_id`),
  KEY `blood_donor_cycle_id` (`blood_donor_cycle_id`),
  KEY `blood_issue_id` (`blood_issue_id`),
  KEY `ambulance_call_id` (`ambulance_call_id`),
  KEY `appointment_id` (`appointment_id`),
  KEY `bill_id` (`bill_id`),
  KEY `idx_type` (`type`),
  KEY `idx_patient_id` (`patient_id`),
  KEY `index_type` (`type`),
  KEY `index_section` (`section`),
  CONSTRAINT `transactions_ibfk_1` FOREIGN KEY (`patient_id`) REFERENCES `patients` (`id`) ON DELETE CASCADE,
  CONSTRAINT `transactions_ibfk_10` FOREIGN KEY (`ambulance_call_id`) REFERENCES `ambulance_call` (`id`) ON DELETE CASCADE,
  CONSTRAINT `transactions_ibfk_11` FOREIGN KEY (`appointment_id`) REFERENCES `appointment` (`id`) ON DELETE CASCADE,
  CONSTRAINT `transactions_ibfk_12` FOREIGN KEY (`bill_id`) REFERENCES `bill` (`id`) ON DELETE CASCADE,
  CONSTRAINT `transactions_ibfk_2` FOREIGN KEY (`case_reference_id`) REFERENCES `case_references` (`id`) ON DELETE CASCADE,
  CONSTRAINT `transactions_ibfk_3` FOREIGN KEY (`opd_id`) REFERENCES `opd_details` (`id`) ON DELETE CASCADE,
  CONSTRAINT `transactions_ibfk_4` FOREIGN KEY (`ipd_id`) REFERENCES `ipd_details` (`id`) ON DELETE CASCADE,
  CONSTRAINT `transactions_ibfk_5` FOREIGN KEY (`pharmacy_bill_basic_id`) REFERENCES `pharmacy_bill_basic` (`id`) ON DELETE CASCADE,
  CONSTRAINT `transactions_ibfk_6` FOREIGN KEY (`pathology_billing_id`) REFERENCES `pathology_billing` (`id`) ON DELETE CASCADE,
  CONSTRAINT `transactions_ibfk_7` FOREIGN KEY (`radiology_billing_id`) REFERENCES `radiology_billing` (`id`) ON DELETE CASCADE,
  CONSTRAINT `transactions_ibfk_8` FOREIGN KEY (`blood_donor_cycle_id`) REFERENCES `blood_donor_cycle` (`id`) ON DELETE CASCADE,
  CONSTRAINT `transactions_ibfk_9` FOREIGN KEY (`blood_issue_id`) REFERENCES `blood_issue` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `transactions`
--

INSERT INTO `transactions` VALUES (1,'payment','Appointment',103,1,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,NULL,NULL,0.00,'',0.00,'Cash',NULL,NULL,'2026-03-18 14:26:20',NULL,1,NULL,'2026-03-18 09:26:20','2026-03-18 09:26:20'),(2,'payment','Appointment',105,2,2,NULL,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,0.00,'',0.00,'Cash',NULL,NULL,'2026-03-18 14:57:12',NULL,1,NULL,'2026-03-18 09:57:12','2026-03-18 09:57:12'),(3,'payment','OPD',104,3,3,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,3000.00,'',0.00,'Cash',NULL,NULL,'2026-03-25 16:40:00','',1,NULL,'2026-03-19 11:40:55','2026-03-19 11:40:55'),(4,'payment','Appointment',104,4,4,NULL,NULL,NULL,NULL,NULL,NULL,NULL,3,NULL,NULL,NULL,2400.00,'',0.00,'Cash',NULL,NULL,'2026-03-19 16:46:20',NULL,1,NULL,'2026-03-19 11:46:20','2026-03-19 11:46:20');

--
-- Table structure for table `transactions_processing`
--

CREATE TABLE `transactions_processing` (
  `id` int NOT NULL AUTO_INCREMENT,
  `gateway_ins_id` int NOT NULL,
  `type` varchar(100) DEFAULT NULL,
  `section` varchar(50) NOT NULL,
  `patient_id` int DEFAULT NULL,
  `case_reference_id` int DEFAULT NULL,
  `opd_id` int DEFAULT NULL,
  `ipd_id` int DEFAULT NULL,
  `pharmacy_bill_basic_id` int DEFAULT NULL,
  `pathology_billing_id` int DEFAULT NULL,
  `radiology_billing_id` int DEFAULT NULL,
  `blood_donor_cycle_id` int DEFAULT NULL,
  `blood_issue_id` int DEFAULT NULL,
  `ambulance_call_id` int DEFAULT NULL,
  `appointment_id` int DEFAULT NULL,
  `attachment` varchar(250) DEFAULT NULL,
  `attachment_name` text,
  `amount_type` varchar(10) DEFAULT NULL,
  `amount` float(10,2) DEFAULT NULL,
  `processing_charge_type` varchar(255) NOT NULL,
  `gateway_processing_charge` float(10,2) NOT NULL,
  `payment_mode` varchar(100) DEFAULT NULL,
  `cheque_no` varchar(100) DEFAULT NULL,
  `cheque_date` date DEFAULT NULL,
  `payment_date` datetime DEFAULT NULL,
  `note` text,
  `received_by` int DEFAULT NULL,
  `bill_id` int DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `patient_id` (`patient_id`),
  KEY `case_reference_id` (`case_reference_id`),
  KEY `opd_id` (`opd_id`),
  KEY `ipd_id` (`ipd_id`),
  KEY `pharmacy_bill_basic_id` (`pharmacy_bill_basic_id`),
  KEY `pathology_billing_id` (`pathology_billing_id`),
  KEY `radiology_billing_id` (`radiology_billing_id`),
  KEY `blood_donor_cycle_id` (`blood_donor_cycle_id`),
  KEY `blood_issue_id` (`blood_issue_id`),
  KEY `ambulance_call_id` (`ambulance_call_id`),
  KEY `appointment_id` (`appointment_id`),
  KEY `bill_id` (`bill_id`),
  KEY `index_attachment` (`attachment`),
  KEY `index_amount_type` (`amount_type`),
  KEY `index_amount` (`amount`),
  KEY `index_payment_mode` (`payment_mode`),
  KEY `index_cheque_no` (`cheque_no`),
  KEY `index_cheque_date` (`cheque_date`),
  KEY `index_payment_date` (`payment_date`),
  CONSTRAINT `transactions_processing_ibfk_1` FOREIGN KEY (`patient_id`) REFERENCES `patients` (`id`) ON DELETE CASCADE,
  CONSTRAINT `transactions_processing_ibfk_10` FOREIGN KEY (`ambulance_call_id`) REFERENCES `ambulance_call` (`id`) ON DELETE CASCADE,
  CONSTRAINT `transactions_processing_ibfk_11` FOREIGN KEY (`appointment_id`) REFERENCES `appointment` (`id`) ON DELETE CASCADE,
  CONSTRAINT `transactions_processing_ibfk_12` FOREIGN KEY (`bill_id`) REFERENCES `bill` (`id`) ON DELETE CASCADE,
  CONSTRAINT `transactions_processing_ibfk_2` FOREIGN KEY (`case_reference_id`) REFERENCES `case_references` (`id`) ON DELETE CASCADE,
  CONSTRAINT `transactions_processing_ibfk_3` FOREIGN KEY (`opd_id`) REFERENCES `opd_details` (`id`) ON DELETE CASCADE,
  CONSTRAINT `transactions_processing_ibfk_4` FOREIGN KEY (`ipd_id`) REFERENCES `ipd_details` (`id`) ON DELETE CASCADE,
  CONSTRAINT `transactions_processing_ibfk_5` FOREIGN KEY (`pharmacy_bill_basic_id`) REFERENCES `pharmacy_bill_basic` (`id`) ON DELETE CASCADE,
  CONSTRAINT `transactions_processing_ibfk_6` FOREIGN KEY (`pathology_billing_id`) REFERENCES `pathology_billing` (`id`) ON DELETE CASCADE,
  CONSTRAINT `transactions_processing_ibfk_7` FOREIGN KEY (`radiology_billing_id`) REFERENCES `radiology_billing` (`id`) ON DELETE CASCADE,
  CONSTRAINT `transactions_processing_ibfk_8` FOREIGN KEY (`blood_donor_cycle_id`) REFERENCES `blood_donor_cycle` (`id`) ON DELETE CASCADE,
  CONSTRAINT `transactions_processing_ibfk_9` FOREIGN KEY (`blood_issue_id`) REFERENCES `blood_issue` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `transactions_processing`
--


--
-- Table structure for table `unit`
--

CREATE TABLE `unit` (
  `id` int NOT NULL AUTO_INCREMENT,
  `unit_name` varchar(100) NOT NULL,
  `unit_type` varchar(100) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `index_unit_name` (`unit_name`),
  KEY `index_unit_type` (`unit_type`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `unit`
--

INSERT INTO `unit` VALUES (1,'mg','pharmacy','2026-03-18 09:46:08','2026-03-18 09:46:08');

--
-- Table structure for table `upload_contents`
--

CREATE TABLE `upload_contents` (
  `id` int NOT NULL AUTO_INCREMENT,
  `content_type_id` int NOT NULL,
  `image` text CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci,
  `thumb_path` text CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci,
  `dir_path` varchar(300) DEFAULT NULL,
  `real_name` text NOT NULL,
  `img_name` text CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci,
  `thumb_name` varchar(300) DEFAULT NULL,
  `file_type` varchar(100) NOT NULL,
  `mime_type` text NOT NULL,
  `file_size` varchar(100) NOT NULL,
  `vid_url` text NOT NULL,
  `vid_title` varchar(250) NOT NULL,
  `upload_by` int NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `upload_by` (`upload_by`),
  KEY `upload_contents_ibfk_2` (`content_type_id`),
  CONSTRAINT `upload_contents_ibfk_1` FOREIGN KEY (`upload_by`) REFERENCES `staff` (`id`) ON DELETE CASCADE,
  CONSTRAINT `upload_contents_ibfk_2` FOREIGN KEY (`content_type_id`) REFERENCES `content_types` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `upload_contents`
--


--
-- Table structure for table `userlog`
--

CREATE TABLE `userlog` (
  `id` int NOT NULL AUTO_INCREMENT,
  `user` varchar(100) DEFAULT NULL,
  `role` varchar(100) DEFAULT NULL,
  `ipaddress` varchar(100) DEFAULT NULL,
  `user_agent` varchar(500) DEFAULT NULL,
  `login_datetime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=43 DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `userlog`
--

INSERT INTO `userlog` VALUES (1,'admin@smarthospital.com','Super Admin','127.0.0.1','Chrome 145.0.0.0, Windows 10','2026-03-10 14:31:24'),(2,'admin@smarthospital.com','Super Admin','127.0.0.1','Chrome 145.0.0.0, Windows 10','2026-03-10 14:36:48'),(3,'admin@smarthospital.com','Super Admin','119.73.101.92','Chrome 145.0.0.0, Windows 10','2026-03-13 15:48:37'),(4,'admin@smarthospital.com','Super Admin','119.73.101.92','Chrome 145.0.0.0, Windows 10','2026-03-13 16:05:12'),(5,'admin@smarthospital.com','Super Admin','119.73.101.108','Chrome 145.0.0.0, Windows 10','2026-03-16 14:05:50'),(6,'admin@smarthospital.com','Super Admin','72.255.40.67','Chrome 145.0.0.0, Mac OS X','2026-03-16 14:07:06'),(7,'admin@smarthospital.com','Super Admin','39.62.194.161','Safari 604.1, iOS','2026-03-16 14:08:50'),(8,'admin@smarthospital.com','Super Admin','59.103.120.15','Chrome 145.0.0.0, Windows 10','2026-03-17 07:52:42'),(9,'admin@smarthospital.com','Super Admin','39.62.194.161','Chrome 146.0.0.0, Windows 10','2026-03-17 21:42:48'),(10,'admin@smarthospital.com','Super Admin','59.103.120.15','Chrome 145.0.0.0, Windows 10','2026-03-18 07:39:20'),(11,'admin@smarthospital.com','Super Admin','59.103.120.15','Chrome 145.0.0.0, Mac OS X','2026-03-18 08:14:20'),(12,'pat2','patient','59.103.120.15','Chrome 145.0.0.0, Windows 10','2026-03-18 08:36:29'),(13,'admin@smarthospital.com','Super Admin','59.103.120.15','Chrome 145.0.0.0, Windows 10','2026-03-18 08:40:58'),(14,'admin@smarthospital.com','Super Admin','59.103.120.15','Chrome 145.0.0.0, Windows 10','2026-03-18 10:13:23'),(15,'admin@smarthospital.com','Super Admin','59.103.120.15','Safari 604.1, iOS','2026-03-18 11:03:57'),(16,'admin@smarthospital.com','Super Admin','59.103.120.15','Chrome 145.0.0.0, Windows 10','2026-03-18 11:28:14'),(17,'admin@smarthospital.com','Super Admin','59.103.120.15','Chrome 145.0.0.0, Windows 10','2026-03-18 11:38:28'),(18,'admin@smarthospital.com','Super Admin','59.103.120.15','Chrome 145.0.0.0, Windows 10','2026-03-18 11:43:33'),(19,'admin@smarthospital.com','Super Admin','59.103.120.15','Chrome 145.0.0.0, Windows 10','2026-03-18 11:55:24'),(20,'admin@smarthospital.com','Super Admin','119.73.101.82','Chrome 145.0.0.0, Windows 10','2026-03-18 17:36:53'),(21,'admin@smarthospital.com','Super Admin','119.73.101.82','Chrome 145.0.0.0, Windows 10','2026-03-18 17:45:21'),(22,'admin@smarthospital.com','Super Admin','119.73.101.82','Chrome 146.0.0.0, Windows 10','2026-03-18 17:51:28'),(23,'admin@smarthospital.com','Super Admin','119.73.101.123','Chrome 145.0.0.0, Windows 10','2026-03-19 09:00:33'),(24,'admin@smarthospital.com','Super Admin','39.62.194.161','Chrome 146.0.0.0, Windows 10','2026-03-26 08:14:41'),(25,'admin@smarthospital.com','Super Admin','122.129.76.60','Chrome 146.0.0.0, Windows 10','2026-03-26 09:02:46'),(26,'admin@smarthospital.com','Super Admin','122.129.76.60','Chrome 146.0.0.0, Windows 10','2026-03-26 13:54:09'),(27,'admin@smarthospital.com','Super Admin','122.129.76.60','Chrome 146.0.0.0, Windows 10','2026-03-26 14:00:55'),(28,'admin@smarthospital.com','Super Admin','122.129.76.60','Chrome 146.0.0.0, Windows 10','2026-03-27 08:02:04'),(29,'admin@smarthospital.com','Super Admin','122.129.76.60','Chrome 146.0.0.0, Windows 10','2026-03-27 08:08:18'),(30,'admin@smarthospital.com','Super Admin','122.129.76.60','Chrome 146.0.0.0, Windows 10','2026-03-27 09:21:33'),(31,'admin@smarthospital.com','Super Admin','122.129.76.60','Chrome 146.0.0.0, Windows 10','2026-03-27 10:19:47'),(32,'admin@smarthospital.com','Super Admin','122.129.76.60','Chrome 146.0.0.0, Windows 10','2026-03-27 12:01:54'),(33,'admin@smarthospital.com','Super Admin','122.129.76.60','Chrome 146.0.0.0, Windows 10','2026-03-27 13:22:21'),(34,'admin@smarthospital.com','Super Admin','122.129.76.60','Chrome 146.0.0.0, Windows 10','2026-03-27 13:58:03'),(35,'admin@smarthospital.com','Super Admin','175.107.237.129','Chrome 146.0.0.0, Windows 10','2026-03-27 18:44:31'),(36,'admin@smarthospital.com','Super Admin','154.208.43.69','Chrome 146.0.0.0, Windows 10','2026-03-28 03:21:21'),(37,'admin@smarthospital.com','Super Admin','223.123.18.54','Chrome 146.0.0.0, Windows 10','2026-03-28 13:26:39'),(38,'admin@smarthospital.com','Super Admin','223.123.12.151','Chrome 146.0.0.0, Windows 10','2026-03-28 20:35:30'),(39,'admin@smarthospital.com','Super Admin','122.129.76.60','Chrome 146.0.0.0, Windows 10','2026-03-30 08:04:39'),(40,'admin@smarthospital.com','Super Admin','122.129.76.60','Chrome 146.0.0.0, Windows 10','2026-03-30 08:15:44'),(41,'admin@smarthospital.com','Super Admin','59.103.120.15','Chrome 146.0.0.0, Windows 10','2026-03-31 05:58:17'),(42,'admin@smarthospital.com','Super Admin','59.103.120.15','Chrome 146.0.0.0, Windows 10','2026-03-31 07:15:41');

--
-- Table structure for table `vehicles`
--

CREATE TABLE `vehicles` (
  `id` int NOT NULL AUTO_INCREMENT,
  `vehicle_no` varchar(20) DEFAULT NULL,
  `vehicle_model` varchar(100) NOT NULL DEFAULT 'None',
  `manufacture_year` varchar(4) DEFAULT NULL,
  `vehicle_type` varchar(100) NOT NULL,
  `driver_name` varchar(50) DEFAULT NULL,
  `driver_licence` varchar(50) NOT NULL DEFAULT 'None',
  `driver_contact` varchar(20) DEFAULT NULL,
  `note` text,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `index_vehicle_no` (`vehicle_no`),
  KEY `index_vehicle_model` (`vehicle_model`),
  KEY `index_manufacture_year` (`manufacture_year`),
  KEY `index_vehicle_type` (`vehicle_type`),
  KEY `index_driver_name` (`driver_name`),
  KEY `index_driver_licence` (`driver_licence`),
  KEY `index_driver_contact` (`driver_contact`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `vehicles`
--


--
-- Table structure for table `visit_details`
--

CREATE TABLE `visit_details` (
  `id` int NOT NULL AUTO_INCREMENT,
  `opd_details_id` int DEFAULT NULL,
  `organisation_id` int DEFAULT NULL,
  `patient_charge_id` int DEFAULT NULL,
  `transaction_id` int DEFAULT NULL,
  `cons_doctor` int DEFAULT NULL,
  `token_number` int DEFAULT NULL,
  `case_type` varchar(200) NOT NULL,
  `appointment_date` datetime DEFAULT NULL,
  `symptoms_type` int DEFAULT NULL,
  `symptoms` text,
  `bp` varchar(100) DEFAULT NULL,
  `height` varchar(100) DEFAULT NULL,
  `weight` varchar(100) DEFAULT NULL,
  `pulse` varchar(200) DEFAULT NULL,
  `temperature` varchar(200) DEFAULT NULL,
  `respiration` varchar(200) DEFAULT NULL,
  `known_allergies` varchar(100) DEFAULT NULL,
  `patient_old` varchar(50) DEFAULT NULL,
  `casualty` varchar(200) DEFAULT NULL,
  `refference` varchar(200) DEFAULT NULL,
  `date` date DEFAULT NULL,
  `note` text,
  `note_remark` mediumtext,
  `payment_mode` varchar(100) NOT NULL,
  `generated_by` int DEFAULT NULL,
  `live_consult` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL,
  `is_antenatal` int NOT NULL,
  `can_delete` varchar(11) NOT NULL DEFAULT 'yes',
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `generated_by` (`generated_by`),
  KEY `opd_details_id` (`opd_details_id`),
  KEY `organisation_id` (`organisation_id`),
  KEY `cons_doctor` (`cons_doctor`),
  KEY `patient_charge_id` (`patient_charge_id`),
  KEY `transaction_id` (`transaction_id`),
  KEY `index_case_type` (`case_type`),
  KEY `index_appointment_date` (`appointment_date`),
  KEY `index_symptoms_type` (`symptoms_type`),
  KEY `index_bp` (`bp`),
  KEY `index_height` (`height`),
  KEY `index_weight` (`weight`),
  KEY `index_pulse` (`pulse`),
  KEY `index_temperature` (`temperature`),
  KEY `index_respiration` (`respiration`),
  KEY `index_known_allergies` (`known_allergies`),
  KEY `index_patient_old` (`patient_old`),
  KEY `index_casualty` (`casualty`),
  KEY `index_refference` (`refference`),
  KEY `index_date` (`date`),
  KEY `index_payment_mode` (`payment_mode`),
  KEY `index_generated_by` (`generated_by`),
  KEY `index_live_consult` (`live_consult`),
  KEY `index_is_antenatal` (`is_antenatal`),
  KEY `index_token_doctor_date` (`cons_doctor`,`date`),
  CONSTRAINT `visit_details_ibfk_1` FOREIGN KEY (`generated_by`) REFERENCES `staff` (`id`) ON DELETE CASCADE,
  CONSTRAINT `visit_details_ibfk_2` FOREIGN KEY (`opd_details_id`) REFERENCES `opd_details` (`id`) ON DELETE CASCADE,
  CONSTRAINT `visit_details_ibfk_3` FOREIGN KEY (`organisation_id`) REFERENCES `organisation` (`id`) ON DELETE CASCADE,
  CONSTRAINT `visit_details_ibfk_4` FOREIGN KEY (`cons_doctor`) REFERENCES `staff` (`id`) ON DELETE CASCADE,
  CONSTRAINT `visit_details_ibfk_5` FOREIGN KEY (`patient_charge_id`) REFERENCES `patient_charges` (`id`) ON DELETE SET NULL,
  CONSTRAINT `visit_details_ibfk_6` FOREIGN KEY (`transaction_id`) REFERENCES `transactions` (`id`) ON DELETE SET NULL
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `visit_details`
--

INSERT INTO `visit_details` VALUES (1,1,NULL,1,1,2,1,'','2026-03-18 14:25:00',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'',1,'no',0,'no','2026-03-18 09:26:20','2026-03-18 09:26:20'),(2,2,NULL,2,2,2,2,'','2026-03-18 14:56:00',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'',1,'no',0,'no','2026-03-18 09:57:12','2026-03-18 09:57:12'),(3,3,NULL,3,3,2,1,'','2026-03-25 16:40:00',NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,'',NULL,'no','',NULL,'',NULL,'Cash',1,'no',0,'no','2026-03-19 11:40:55','2026-03-19 11:40:55'),(4,4,NULL,4,4,2,1,'','2026-03-19 13:45:00',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'',1,'no',0,'no','2026-03-19 11:46:20','2026-03-19 11:46:20');

--
-- Table structure for table `visitors_book`
--

CREATE TABLE `visitors_book` (
  `id` int NOT NULL AUTO_INCREMENT,
  `source` varchar(100) DEFAULT NULL,
  `purpose` varchar(100) NOT NULL,
  `name` varchar(100) NOT NULL,
  `email` varchar(100) DEFAULT NULL,
  `contact` varchar(12) NOT NULL,
  `id_proof` varchar(50) NOT NULL,
  `visit_to` varchar(20) NOT NULL,
  `ipd_opd_staff_id` int DEFAULT NULL,
  `related_to` varchar(60) NOT NULL,
  `no_of_pepple` int NOT NULL,
  `date` date NOT NULL,
  `in_time` varchar(20) NOT NULL,
  `out_time` varchar(20) NOT NULL,
  `note` mediumtext,
  `image` text CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `index_source` (`source`),
  KEY `index_purpose` (`purpose`),
  KEY `index_name` (`name`),
  KEY `index_email` (`email`),
  KEY `index_contact` (`contact`),
  KEY `index_id_proof` (`id_proof`),
  KEY `index_visit_to` (`visit_to`),
  KEY `index_related_to` (`related_to`),
  KEY `index_no_of_pepple` (`no_of_pepple`),
  KEY `index_date` (`date`),
  KEY `index_in_time` (`in_time`),
  KEY `index_out_time` (`out_time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `visitors_book`
--


--
-- Table structure for table `visitors_purpose`
--

CREATE TABLE `visitors_purpose` (
  `id` int NOT NULL AUTO_INCREMENT,
  `visitors_purpose` varchar(100) NOT NULL,
  `description` mediumtext,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `index_visitors_purpose` (`visitors_purpose`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `visitors_purpose`
--


--
-- Table structure for table `vitals`
--

CREATE TABLE `vitals` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(100) NOT NULL,
  `reference_range` varchar(100) NOT NULL,
  `unit` varchar(11) DEFAULT NULL,
  `is_system` int NOT NULL DEFAULT '0',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `unit` (`unit`),
  KEY `index_name` (`name`),
  KEY `index_reference_range` (`reference_range`),
  KEY `index_unit` (`unit`),
  KEY `index_is_system` (`is_system`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `vitals`
--

INSERT INTO `vitals` VALUES (1,'Height','1  -  200','Centimeters',1,'2024-03-14 06:03:18','2025-05-10 05:52:30'),(2,'Weight','0  -  150','Kilograms',1,'2024-05-20 09:06:24','2025-05-10 05:52:30'),(3,'Pulse ','70 -   100 ','Beats per',1,'2024-03-07 11:27:43','2025-05-10 05:52:30'),(4,'Temperature','95.8  -  99.3','Fahrenheit ',1,'2024-05-16 10:59:30','2025-05-10 05:52:30'),(5,'BP','90/60  -  140/90','mmHg',1,'2024-03-07 11:27:48','2025-05-10 05:52:30');


