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

START TRANSACTION;



--
-- Database: `mylikita`
--

DELIMITER $$
--
-- Procedures
--
CREATE DEFINER=`root`@`localhost` PROCEDURE `add_new_drug` (IN `drug` VARCHAR(50), IN `unit_of_issue` VARCHAR(30), IN `quantity` INT(11), IN `price` INT(11), IN `expiry_date` VARCHAR(20), IN `generic` VARCHAR(50), IN `reorderlevel` VARCHAR(10), IN `expiryalert` VARCHAR(10), IN `facId` VARCHAR(50))  BEGIN
    INSERT INTO drugs (drug,genericName,expiry_date,quantity,price,unit_of_issue,reorder_level,expiryAlert,facilityId) VALUES (drug,generic,expiry_date,quantity,price,unit_of_issue,reorderlevel,expiryalert,facId);
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `add_new_lab_head` (IN `labhead` VARCHAR(50), IN `labsubhead` VARCHAR(50), IN `spec` VARCHAR(50), IN `facId` VARCHAR(50), IN `descr` VARCHAR(50), IN `no_of_label` VARCHAR(50))  BEGIN
    INSERT INTO lab_setup(head, subhead, description, facilityId, specimen, noOfLabels) VALUES (labhead, labsubhead,descr , facId,spec,no_of_label );
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `add_new_lab_service` (IN `labhead` VARCHAR(50), IN `labsubhead` VARCHAR(50), IN `unit` VARCHAR(50), IN `test` VARCHAR(50), IN `facId` VARCHAR(50), IN `test_from` VARCHAR(50), IN `test_to` VARCHAR(50), IN `spec` VARCHAR(50), IN `test_price` INT, IN `userId` VARCHAR(50), IN `descr` VARCHAR(50), IN `no_of_labels` INT, IN `in_percentage` INT)  BEGIN
    INSERT INTO lab_setup(head, subhead, description, noOfLabels, unit, facilityId, range_from, range_to, specimen, price, percentage, created_by) VALUES (labhead, labsubhead, descr, no_of_labels, unit, facId, test_from, test_to, spec, test_price, in_percentage, userId);
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `add_new_supplier` (IN `name` VARCHAR(50), IN `address` VARCHAR(255), IN `phone` VARCHAR(20), IN `code` VARCHAR(10), IN `facId` VARCHAR(50))  BEGIN
       INSERT INTO suppliersinfo(supplier_name, address, phone, code,facilityId) VALUES (name,address,phone,code,facId);
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `assign` (IN `doctor` VARCHAR(20), IN `patientId` VARCHAR(10), IN `facId` VARCHAR(50))  BEGIN
    update patientrecords set assigned_to = doctor, date_assigned = CURDATE() where id = patientId AND facilityId=facId;
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `create_new_client_acc` (IN `accType` VARCHAR(20), IN `s_name` VARCHAR(50), IN `f_name` VARCHAR(50), IN `p_gender` VARCHAR(20), IN `dob` DATE, IN `maritalStatus` VARCHAR(20), IN `p_occupation` VARCHAR(20), IN `address` VARCHAR(100), IN `depositAmount` INT, IN `modeOfPayment` VARCHAR(20), IN `c_name` VARCHAR(50), IN `c_address` VARCHAR(100), IN `c_phone` VARCHAR(20), IN `c_email` VARCHAR(50), IN `web` VARCHAR(20), IN `facId` VARCHAR(50), IN `userId` VARCHAR(50), IN `patientId` VARCHAR(50))  NO SQL
BEGIN
    IF accType = 'family' THEN
        INSERT INTO patientfileno (facilityId,accountType,accName,contactName,contactAddress,contactPhone, contactEmail,contactWebsite,firstname,surname) VALUES (facId, accType, concat(s_name,' ', f_name), c_name,c_address, c_phone, c_email, web, f_name, s_name);
        INSERT INTO patientrecords (facilityId,surname,firstname,gender,maritalstatus,DOB,phoneNo,email, occupation,address,patient_id) VALUES (facId,s_name,s_name,gender,maritalStatus,dob,c_phone,c_email,p_occupation, c_address,patientId);

    ELSE
        INSERT INTO patientfileno (facilityId,accountType,contactName,contactAddress,contactPhone,contactEmail, contactWebsite,description,accName) VALUES (facId,accType,c_name,c_address,c_phone,c_email,web,f_name,s_name);

    END IF;
COMMIT;
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `create_new_lab_client` (IN `p_id` VARCHAR(50), IN `acc_no` VARCHAR(50), IN `ben_no` VARCHAR(50), IN `first_name` VARCHAR(50), IN `last_name` VARCHAR(50), IN `other_name` VARCHAR(50), IN `p_gender` VARCHAR(50), IN `birth` DATE, IN `mail` VARCHAR(50), IN `facId` VARCHAR(50), IN `labno` VARCHAR(50), IN `phone` VARCHAR(13))  NO SQL
BEGIN 

INSERT INTO patientrecords (patient_id,accountNo,beneficiaryNo,firstname,surname,other,Gender, DOB,email,facilityId,phoneNo) VALUES (p_id,acc_no,ben_no,first_name, last_name,other_name, p_gender,birth,mail,facId,phone); 


END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `customer_deposit` (IN `in_acct` INT, IN `amount_paid` INT, IN `userId` VARCHAR(50), IN `in_receiptDateSN` VARCHAR(50), IN `in_receiptSN` VARCHAR(50), IN `in_description` VARCHAR(1000), IN `in_mode_of_payment` VARCHAR(20), IN `in_facId` VARCHAR(50), IN `sourceAcct` VARCHAR(50), IN `acc_name` VARCHAR(100), IN `acc_type` VARCHAR(20), IN `in_date` DATETIME, IN `in_address` VARCHAR(100), IN `in_phone` VARCHAR(20), IN `in_email` VARCHAR(50), IN `in_website` VARCHAR(50), IN `in_payables_head` VARCHAR(50), IN `in_recievables_head` VARCHAR(50), IN `in_guarantor_name` VARCHAR(50), IN `in_guarantor_address` VARCHAR(100), IN `in_guarantor_phone` VARCHAR(20), IN `in_bank_name` VARCHAR(50))  BEGIN
	declare client_balance double;
	declare main_balance double;
    #DECLARE remaining_balance double;
	select balance into client_balance from patientfileno where accountNo=in_acct AND facilityId=in_facId;

	#SET remaining_balance = Amount_paid - client_balance;
	set main_balance = client_balance+Amount_paid;

	-- # IF customer is a NEW client,
    -- # We create a new account for the customer and deposit the amount
	if client_balance is null and Amount_paid < 0 then
  
        	insert into patientfileno (accountNo,accName,balance,facilityId,status,accountType,contactAddress,contactPhone,contactEmail,contactWebsite,guarantor_name,
               guarantor_address,guarantor_phone)
		values(in_acct,acc_name,Amount_paid,in_facId,'approved',acc_type,in_address,in_phone,in_email,in_website,in_guarantor_name,
               in_guarantor_address,in_guarantor_phone);

       insert into account_entries (acct,dr,cr,reference_no,description,facilityId,createdAt)
		values (in_acct,abs(Amount_paid),0,in_receiptDateSN,in_description,in_facId,in_date);
        
		insert into transactions (description,acct,debit,credit,receiptDateSN,receiptNo,modeOfPayment,enteredBy,client_acct,
                                  patient_id,facilityId,createdAt,bank_name)
		values (in_description,sourceAcct,abs(Amount_paid),0,in_receiptDateSN,in_receiptSN,in_mode_of_payment,
                userId,in_acct,in_acct,in_facId,in_date,in_bank_name);

		insert into transactions (description,acct,debit,credit,receiptDateSN,receiptNo,modeOfPayment,enteredBy,client_acct,
                                  patient_id,facilityId,createdAt,bank_name)
		values (in_description,in_recievables_head,0,abs(Amount_paid) ,in_receiptDateSN,in_receiptSN,in_mode_of_payment,
                userId,in_acct,in_acct,in_facId,in_date,in_bank_name);
            
            
            
            
            
            ELSEif client_balance is null then
    
		insert into patientfileno (accountNo,accName,balance,facilityId,status,accountType,contactAddress,contactPhone,contactEmail,contactWebsite,guarantor_name,
               guarantor_address,guarantor_phone)
		values(in_acct,acc_name,Amount_paid,in_facId,'approved',acc_type,in_address,in_phone,in_email,in_website,in_guarantor_name,
               in_guarantor_address,in_guarantor_phone);

       insert into account_entries (acct,dr,cr,reference_no,description,facilityId,createdAt)
		values (in_acct,abs(Amount_paid),0,in_receiptDateSN,in_description,in_facId,in_date);
        
		insert into transactions (description,acct,debit,credit,receiptDateSN,receiptNo,modeOfPayment,enteredBy,
                                  client_acct,patient_id,facilityId,createdAt,bank_name)
		values (in_description,sourceAcct,abs(Amount_paid),0,in_receiptDateSN,in_receiptSN,in_mode_of_payment,
                userId,in_acct,in_acct,in_facId,in_date,in_bank_name);

		insert into transactions (description,acct,debit,credit,receiptDateSN,receiptNo,modeOfPayment,enteredBy,
                                  client_acct,patient_id,facilityId,createdAt,bank_name)
		values (in_description,in_payables_head,0,abs(Amount_paid) ,in_receiptDateSN,in_receiptSN,in_mode_of_payment,
                userId,in_acct,in_acct,in_facId,in_date,in_bank_name);

	end if;
    
    -- # IF customer has an account, but the deposit amount nullifies his account balance
    -- # i.e. he's paying up his debt
	if  main_balance = 0 then
 
		update patientfileno set balance= main_balance  where accountNo=in_acct AND facilityId=in_facId;

		insert into account_entries (acct,dr,cr,reference_no,description,facilityId,createdAt)
		values (in_acct,abs(Amount_paid),0,in_receiptDateSN,in_description,in_facId,in_date);
		 
		insert into transactions (description,acct,debit,credit,receiptDateSN,receiptNo,modeOfPayment, enteredBy,
                                  client_acct,patient_id,facilityId,createdAt,bank_name)
		values (in_description,sourceAcct,abs(Amount_paid),0,in_receiptDateSN,in_receiptSN,in_mode_of_payment,
                userId,in_acct,in_acct,in_facId,in_date,in_bank_name);

		insert into transactions (description,acct,debit,credit,receiptDateSN,receiptNo,modeOfPayment, enteredBy,
                                  client_acct,patient_id,facilityId,createdAt,bank_name)
		values (in_description,in_recievables_head,0,abs(client_balance) ,in_receiptDateSN,in_receiptSN,in_mode_of_payment,
                userId,in_acct,in_acct,in_facId,in_date,in_bank_name);

	-- # IF customer has an account, and his new account balance after the deposit is a top up
    -- # to his initial account balance
	elseif main_balance  > 0  then
 
		update patientfileno set balance= main_balance where accountNo=in_acct AND facilityId=in_facId;

		insert into account_entries (acct,dr,cr,reference_no,description,facilityId,createdAt)
		values (in_acct,Amount_paid,0,in_receiptDateSN,in_description,in_facId,in_date);

		insert into transactions (description,acct,debit,credit,receiptDateSN,receiptNo,modeOfPayment,enteredBy,
                                  client_acct,patient_id,facilityId,createdAt,bank_name)
		values (in_description,sourceAcct,abs(Amount_paid),0,in_receiptDateSN,in_receiptSN,in_mode_of_payment,
                userId,in_acct,in_acct,in_facId,in_date,in_bank_name);

		-- # IF customer's was owing us some money, then
		if  client_balance < 0 then

			insert into transactions (description,acct,debit,credit,receiptDateSN,receiptNo,modeOfPayment,enteredBy,
                                      client_acct,patient_id,facilityId,createdAt,bank_name)
			values (in_description,in_recievables_head,0,abs(client_balance) ,in_receiptDateSN,in_receiptSN,in_mode_of_payment,
                    userId,in_acct,in_acct,in_facId,in_date,in_bank_name);

			insert into transactions (description,acct,debit,credit,receiptDateSN,receiptNo,modeOfPayment,enteredBy,
                                      client_acct,patient_id,facilityId,createdAt,bank_name)
			values (in_description,in_payables_head,0,abs(main_balance) ,in_receiptDateSN,in_receiptSN,in_mode_of_payment,
                    userId,in_acct,in_acct,in_facId,in_date,in_bank_name);
            
		-- # ELSE IF customer had some money in his/her account
		elseif client_balance >= 0 then
			insert into transactions (description,acct,debit,credit,receiptDateSN,receiptNo,modeOfPayment,enteredBy,
                                      client_acct,patient_id,facilityId,createdAt,bank_name)
			values (in_description,in_payables_head,0,abs(Amount_paid) ,in_receiptDateSN,in_receiptSN,in_mode_of_payment,
                    userId,in_acct,in_acct,in_facId,in_date,in_bank_name);
		end if;

	-- # IF the customer was owing some money and the deposit amount is not upto the amount owed
	elseif main_balance  < 0 then
		update patientfileno set balance= main_balance where accountNo=in_acct AND facilityId=in_facId;

		insert into account_entries (acct,dr,cr,reference_no,description,facilityId,createdAt)
		values (in_acct,abs(Amount_paid),0,in_receiptDateSN,in_description,in_facId,in_date);

		insert into transactions (description,acct,debit,credit,receiptDateSN,receiptNo,
                                  modeOfPayment,enteredBy,
                                  client_acct,patient_id,facilityId,createdAt,bank_name)
		values (in_description,sourceAcct,abs(Amount_paid),0,in_receiptDateSN,in_receiptSN,in_mode_of_payment,
                userId,in_acct,in_acct,in_facId,in_date,in_bank_name);
        
		insert into transactions (description,acct,debit,credit,receiptDateSN,receiptNo,modeOfPayment,
                                  enteredBy,client_acct,patient_id,facilityId,createdAt,bank_name)
		values (in_description,in_recievables_head,0,abs(Amount_paid) ,in_receiptDateSN,
                in_receiptSN,in_mode_of_payment,userId,in_acct,in_acct,in_facId,in_date,in_bank_name);
        
        
	end if;

END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `delete_drug` (IN `drugId` VARCHAR(11), IN `facId` VARCHAR(50))  BEGIN
    DELETE FROM drugs WHERE drug_id = drugId AND facilityId=facId;
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `delete_service` (IN `serviceId` VARCHAR(11), IN `facId` VARCHAR(50))  BEGIN
    DELETE FROM services WHERE service_id = serviceId AND facilityId=facId;
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `delete_supplier` (IN `supplierId` VARCHAR(50), IN `facId` VARCHAR(50))  BEGIN
	DELETE FROM suppliersinfo WHERE id=supplierId AND facilityId=facId;
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `delete_user` (IN `id` INT(100), IN `facilityId` INT(20))  NO SQL
DELETE FROM `users` WHERE `users`.`id` = id AND facilityId = facilityId$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `deposit` (IN `amt` INT, IN `patientId` VARCHAR(50), IN `descr` VARCHAR(100), IN `source_head` VARCHAR(100), IN `userId` VARCHAR(50), IN `receiptsn` VARCHAR(50), IN `receiptno` VARCHAR(50), IN `payment_mode` VARCHAR(50), IN `dest_head` VARCHAR(100), IN `facId` VARCHAR(100), IN `in_date` DATETIME)  NO SQL
BEGIN 
  DECLARE acc_balance int;
  SELECT balance INTO acc_balance FROM patientfileno WHERE accountNo = patientId AND facilityId=facId;
  UPDATE patientfileno SET balance = acc_balance + amt WHERE accountNo = patientId AND facilityId=facId;
  INSERT INTO transactions (description, acct, debit, credit, enteredBy, receiptDateSN, receiptNo, modeOfPayment,client_acct,facilityId,createdAt) 
    VALUES (descr,source_head,0,amt,userId,receiptsn,receiptno,payment_mode,patientId,facId,in_date);
  INSERT INTO transactions (description, acct, debit, credit, enteredBy, receiptDateSN, receiptNo, modeOfPayment,client_acct,facilityId, createdAt) 
    VALUES (descr,dest_head,amt,0,userId,receiptsn,receiptno,payment_mode,patientId,facId,in_date);
  
  COMMIT;
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `drug_expiry_alert` (IN `facId` VARCHAR(50))  BEGIN
    SELECT * FROM drugpurchaserecords WHERE DATE_FORMAT(expiry_date, '%Y-%m-%d') BETWEEN DATE_FORMAT(NOW(), '%Y-%m-%d') AND DATE_FORMAT(DATE_ADD(NOW(),INTERVAL 6 MONTH), '%Y-%m-%d') AND (facilityId=facId) ORDER by expiry_date ASC;
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `drug_qtty_alert` (IN `facId` VARCHAR(50))  BEGIN
    SELECT * FROM drugpurchaserecords WHERE drugpurchaserecords.balance < drugpurchaserecords.reorder_level AND facilityId=facId;
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `fetch_by_doctor` (IN `doctor` VARCHAR(20), IN `facId` VARCHAR(50))  BEGIN
    select * from patientrecords where assigned_to = doctor AND facilityId=facId limit 20;
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `getReturnDrug` (IN `in_recepit` INT(20), IN `in_drug_code` INT(20))  SELECT * FROM drugs WHERE receipt_no=in_recepit AND drug=in_drug_code AND source='sold_items'$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `getUnitOfIssue` (IN `drugName` VARCHAR(50), IN `facId` VARCHAR(50))  BEGIN
	SELECT DISTINCT unit_of_issue FROM drugs WHERE  drug = drugName AND facilityId=facId;
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `get_account` (IN `facId` VARCHAR(50))  BEGIN
    select max(accountNo) + 1 from patientrecords WHERE facilityId=facId;
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `get_acc_chart` (IN `facId` VARCHAR(50))  BEGIN
	SELECT head as title,subhead,description FROM account WHERE facilityId=facId;
    #SELECT head,subhead title FROM account WHERE facilityId=facId;
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `get_all` (IN `facId` VARCHAR(50))  BEGIN
    select * from patientrecords WHERE facilityId=facId limit 50;
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `get_all_acc_heads` (IN `facId` VARCHAR(50))  BEGIN
    SELECT head, subhead, description FROM account WHERE facilityId=facId;
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `get_all_lab_services` (IN `facId` VARCHAR(50))  BEGIN
    SELECT head as labhead FROM lab_setup WHERE facilityId=facId ORDER BY created_at DESC;
    END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `get_all_op_notes` (IN `facId` VARCHAR(50))  BEGIN
    SELECT * FROM operationnotes WHERE facilityId=facId ORDER BY id DESC;
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `get_all_prescriptions` (IN `facId` VARCHAR(50))  BEGIN
    SELECT *  FROM prescriptionrequests WHERE facilityId=facId;
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `get_all_services` (IN `facId` VARCHAR(50))  BEGIN
   SELECT * FROM `services` WHERE facilityId=facId ORDER BY createdAt DESC;
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `get_all_suppliers` (IN `facId` VARCHAR(50))  BEGIN
SELECT * FROM suppliersinfo WHERE facilityId=facId ORDER BY date DESC;

END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `get_all_transactions` (IN `facId` VARCHAR(50))  BEGIN
    SELECT * from `transactions` WHERE facilityId=facId ORDER BY createdAt DESC;
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `get_all_user_byId` (IN `in_id` INT, IN `facId` VARCHAR(50))  NO SQL
SELECT * FROM users where id = in_id AND facilityId = facId$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `get_amount_handed_over` (IN `userId` VARCHAR(50), IN `date` DATE, IN `facId` VARCHAR(50))  BEGIN
    SELECT sum(ifnull(amountHandedOver,0)) as amountHandedover FROM transfers WHERE transfer_from = userId and date(date) = date AND facilityId=facId;
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `get_amount_received` (IN `userId` VARCHAR(10), IN `date` DATE, IN `facId` VARCHAR(50))  BEGIN
    SELECT sum(amountReceived) as amountReceived FROM transfers WHERE transfer_to = userId AND date(date) = date AND facilityId=facId;
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `get_avail_receipt_no` (IN `facId` VARCHAR(50))  BEGIN
    SELECT max(receiptNo) + 1 FROM `transactions` WHERE DATE_FORMAT(createdAt, "%d%m%y") = DATE_FORMAT(NOW(), "%d%m%y") AND facilityId=facId;
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `get_balance` (IN `accNo` VARCHAR(10), IN `facId` VARCHAR(50))  BEGIN
    SELECT balance, accName as name, firstname, surname FROM `patientfileno` WHERE accountNo = accNo AND facilityId=facId;
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `get_beneficiary_no` (IN `accNo` VARCHAR(10), IN `facId` VARCHAR(50))  BEGIN
    SELECT MAX(beneficiaryNo) + 1 from patientrecords where accountNo = accNo AND facilityId=facId;
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `get_best_selling_staff` (IN `facId` VARCHAR(50), IN `dateFrom` DATE, IN `dateTo` DATE)  NO SQL
SELECT SUM(a.qty_out) + SUM(a.price) AS amount, concat(b.firstname, ' ', b.lastname) as staff FROM drugs a JOIN users b on a.created_by = b.id WHERE date(a.created_at) BETWEEN date(dateFrom) AND date(dateTo) AND a.source='dispensary' AND a.facilityId=facId GROUP BY staff ORDER BY amount DESC$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `get_client_acc_stmt` (IN `clientId` VARCHAR(20), IN `dateFrom` DATE, IN `dateTo` DATE, IN `facId` VARCHAR(50))  BEGIN
	SELECT acct, description, dr as debit, cr as credit, reference_no, createdAt from account_entries WHERE 
    acct=clientId AND
     date(createdAt) BETWEEN date(dateFrom) AND date(dateTo) AND facilityId=facId;
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `get_deposit_acc_head` (IN `facId` VARCHAR(50))  BEGIN
    SELECT head FROM account WHERE head = 'Deposit' AND facilityId=facId;
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `get_diagnoses_by_id` (IN `patientId` VARCHAR(20), IN `facId` VARCHAR(50))  BEGIN
    SELECT *  FROM diagnosis where patient_id = patientId AND facilityId=facId;
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `get_dispensary_records` (IN `facId` VARCHAR(50))  NO SQL
BEGIN
    SELECT a.drug,a.cost_price,a.balance as quantity, dispensary_balance as dispensary_quantity ,a.expiry_date,a.created_at,b.supplier_name as supplier 
    FROM drugpurchaserecords a JOIN suppliersinfo b ON a.supplier=b.id WHERE a.facilityId=facId AND dispensary_balance!=0 ORDER BY created_at DESC;
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `get_doctors` (IN `facId` VARCHAR(50))  BEGIN
    SELECT * FROM users WHERE role = 'doctor' AND facilityId=facId;
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `get_drugs_list` (IN `facId` VARCHAR(50))  BEGIN
    SELECT SUM(quantity) as quantity, drug from drugpurchaserecords WHERE facilityId=facId GROUP BY drug;
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `get_drugs_sold` (IN `facId` VARCHAR(50), IN `dateFrom` DATE, IN `dateTo` DATE)  NO SQL
SELECT SUM(qty_out) AS quantity, drug FROM drugs WHERE date(created_at) BETWEEN date(dateFrom) AND date(dateTo) AND source='dispensary' AND facilityId=facId GROUP BY drug  ORDER BY quantity DESC LIMIT 5$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `get_drug_price_by_id` (IN `id` INT(4), IN `facId` VARCHAR(50))  BEGIN
    SELECT price FROM `drugs` WHERE drug_id=id AND facilityId=facId;
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `get_expenses_acc_heads` (IN `facId` VARCHAR(50))  BEGIN
    SELECT head, description from account where subhead = 30000 AND facilityId=facId;
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `get_expired_drugs` (IN `facId` VARCHAR(50))  BEGIN
    SELECT * FROM `drugs` WHERE DATE_FORMAT(expiry_date, '%Y-%m-%d') < DATE_FORMAT(NOW(), '%Y-%m-%d') AND (facilityId=facId);
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `get_facility_info` (IN `fac_id` VARCHAR(50))  NO SQL
SELECT id as facility_id, name as facility_name, code, logo, type, admin FROM hospitals WHERE id = fac_id$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `get_id` (IN `facId` VARCHAR(50))  BEGIN
    select max(accountNo) + 1 from patientrecords WHERE facilityId=facId;
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `get_ids` (IN `facId` VARCHAR(50))  BEGIN
    select distinct accountNo from patientrecords WHERE facilityId=facId;
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `get_individual_report` (IN `account` VARCHAR(10), IN `fromDate` VARCHAR(30), IN `toDate` VARCHAR(30), IN `facId` VARCHAR(50))  BEGIN
    SELECT * FROM `transactions` WHERE (transaction_source=account OR destination = account) AND (createdAt BETWEEN fromDate AND toDate) AND (facilitatorId = facId);
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `get_lab_requisitions` (IN `facId` VARCHAR(50))  NO SQL
SELECT concat(firstname, ' ', surname) as name, id, dateCreated FROM `patientrecords` WHERE status = 'lab_requisition' AND facilityId=facId ORDER BY dateCreated DESC$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `get_lab_services_tree` (IN `facId` VARCHAR(50))  NO SQL
BEGIN
	SELECT head title,subhead,price  FROM lab_setup WHERE facilityId=facId;
#SELECT id, head,subhead title  FROM lab_setup WHERE facilityId=facId;
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `get_list_of_drugs` ()  BEGIN
    SELECT DISTINCT name as drug, generic_name FROM druglist ORDER BY created_at DESC;
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `get_next_lab_id` (IN `facId` VARCHAR(50))  NO SQL
BEGIN
	SELECT IFNULL(max(id),0) + 1 AS labId from lab_requisition WHERE facilityId=facId; 

	COMMIT;
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `get_next_transaction_id` (IN `facId` VARCHAR(50))  BEGIN
    select max(transaction_id) + 1 from transactions WHERE facilityId=facId;
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `get_patients_by_doctor` (IN `doc` VARCHAR(50), IN `facId` VARCHAR(50))  BEGIN
    select * from patientrecords where assigned_to = doc AND facilityId=facId ORDER BY date_assigned DESC;
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `get_patient_acc_stmt` (IN `patientId` VARCHAR(20), IN `dateFrom` DATE, IN `dateTo` DATE, IN `facId` VARCHAR(50))  BEGIN
	SELECT t.transaction_id, t.acct,t.day,t.description, t.credit, t.debit,
       @running_total:=@running_total + t.balance AS bal, @running_total:=@running_total opening
        FROM
        ( SELECT transaction_id, acct,
          date(createdAt) as day,description,credit credit, debit debit,
          sum(credit-debit) as balance
          FROM transactions WHERE client_acct = patientId  AND date(createdAt) BETWEEN dateFrom AND dateTo AND facilityId=facId
          GROUP BY transaction_id,day,description,credit,debit,acct ) t
        JOIN (SELECT @running_total:=0) r
        ORDER BY t.transaction_id;
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `get_patient_records` (IN `facId` VARCHAR(50))  BEGIN
    select * from patientrecords WHERE facilityId=facId order by accountNo desc;
   END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `get_patient_reg_breakdown_per_year` (IN `year` INT(4))  NO SQL
SELECT COUNT(*) no_of_patients, MONTH(dateCreated) month FROM `patientrecords`  
WHERE YEAR(dateCreated) = year
GROUP BY MONTH(dateCreated)$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `get_pending_lab_request` (IN `facId` VARCHAR(50))  BEGIN 
SELECT id,concat(surname, ' ', firstname, ' ', other) fullname,DOB,gender,phoneNo,assigned_to, count(lab.patient_id) no_of_test
  FROM patientrecords JOIN lab
    ON patientrecords.id = lab.patient_id WHERE lab.status = 'request' and lab.facilityId = facId GROUP BY lab.patient_id;
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `get_pending_prescription_requests` (IN `facId` VARCHAR(50))  BEGIN
    #SELECT * FROM `prescriptionrequests` WHERE facilityId=facilityId ORDER BY date DESC;
SELECT id,firstname,surname,DOB,gender,phoneNo,assigned_to FROM `patientrecords` WHERE id in (SELECT patient_id from dispensary where status = "request") and facilityId=facId;
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `get_pending_purchases` (IN `facId` VARCHAR(50))  BEGIN
    SELECT * FROM drugpurchaserecords WHERE payment_status='pending' AND facilityId=facId;
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `get_pending_transactions` (IN `facId` VARCHAR(50))  BEGIN
    SELECT * FROM `transactions` WHERE status = "pending" AND facilityId=facId ORDER BY createdAt DESC;
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `get_pharm_sales_summary` (IN `fac_id` VARCHAR(50), IN `dateFrom` DATE, IN `dateTo` DATE)  NO SQL
SELECT  ifnull(SUM(debit), 0) totalAmount, count(debit) totalSales FROM transactions WHERE DATE(createdAt) BETWEEN date(dateFrom) AND date(dateTo) AND facilityId=fac_id AND acct='Drug Sales'$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `get_pharm_total_stock` (IN `fac_id` VARCHAR(50))  NO SQL
SELECT sum(balance) AS totalStock, sum(balance*cost_price) AS totalStockAmount, sum(dispensary_balance) as totalDisp, sum(dispensary_balance*(cost_price+markUp)) as totalDispAmount FROM drugpurchaserecords WHERE facilityId = fac_id$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `get_purchase_records` (IN `facId` VARCHAR(50))  BEGIN
    SELECT a.drug,a.cost_price,a.balance as quantity, quantity as quantity_bought ,a.expiry_date,a.created_at,b.supplier_name as supplier 
    FROM drugpurchaserecords a JOIN suppliersinfo b ON a.supplier=b.id WHERE a.facilityId=facId ORDER BY created_at DESC;
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `get_receipt_date_sn` (IN `dateAppend` VARCHAR(30), IN `facId` VARCHAR(50))  BEGIN
    select receiptDateSN like dateAppend from transaction WHERE facilityId=facId;
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `get_reports` (IN `fromDate` VARCHAR(30), IN `toDate` VARCHAR(30), IN `facId` VARCHAR(50))  BEGIN
    SELECT * FROM `transactions` WHERE createdAt BETWEEN fromDate AND toDate AND facilityId = facId;
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `get_rev_acc_heads` (IN `facId` VARCHAR(50))  BEGIN
    SELECT head FROM account WHERE subhead = 'Revenue' AND head != 'Deposit' and facilityId=facId;
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `get_roles` (IN `facId` VARCHAR(50))  BEGIN
    select distinct role from users WHERE facilityId=facId;
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `get_test_by_patient` (IN `patientId` VARCHAR(20), IN `facId` VARCHAR(50))  NO SQL
SELECT * from lab WHERE patient_id = patientId AND facilityId=facId AND status in ('request')$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `get_top_5_popular_drugs` (IN `fac_id` VARCHAR(50), IN `today` DATE)  NO SQL
SELECT drug, COUNT(*) count FROM dispensary WHERE facilityId=fac_id AND DATE(created_at) = today GROUP BY drug ORDER BY count DESC LIMIT 5$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `get_total_sales` (IN `user` VARCHAR(50), IN `date` DATE, IN `facId` VARCHAR(50))  BEGIN
    SELECT SUM(credited-debited) as totalSales, date(createdAt) as date from transactions WHERE enteredBy = user and date(createdAt) = date AND facilityId=facId GROUP by date(createdAt);
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `get_unassigned` (IN `facId` VARCHAR(50))  BEGIN
    select title,surname,firstname,other, concat(firstname,' ',surname,' ',other) fullname,Gender,age,maritalstatus,DOB,dateCreated,phoneNo,email,state,lga,occupation,address,kinName,kinRelationship,kinPhone,kinEmail,kinAddress,accountNo,beneficiaryNo,balance,id,enteredBy,patientStatus,assigned_to,createdAt from patientrecords WHERE facilityId=facId order by accountNo desc;
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `get_users` (IN `facId` VARCHAR(50))  BEGIN
    SELECT *  FROM users where facilityId = facId AND role != 'developer';
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `get_user_by_id` (IN `id` VARCHAR(10), IN `facId` VARCHAR(50))  BEGIN
    select * from patientrecords where id=id AND facilityId=facId;
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `move_items_to_dispensary` (IN `drug_name` VARCHAR(100), IN `cost` INT, IN `expiry` VARCHAR(20), IN `d_code` VARCHAR(50), IN `d_price` INT, IN `unit` INT, IN `in_qty` INT, IN `userId` VARCHAR(50), IN `generic` VARCHAR(100), IN `facId` VARCHAR(50), IN `supplierId` VARCHAR(50), IN `itemSource` VARCHAR(10), IN `mark_up` INT, IN `in_receiptno` VARCHAR(50))  BEGIN
  DECLARE store_qty int;
  DECLARE dispensary_qty int;
  DECLARE drug_id INT;
  
  SELECT id INTO drug_id FROM druglist WHERE name=drug_name AND generic_name=generic;
  IF drug_id IS null THEN
  INSERT INTO druglist (name,generic_name) VALUES (drug_name,generic);
  end IF;
  
  IF itemSource = 'store' THEN
  select balance, dispensary_balance into store_qty, dispensary_qty FROM drugpurchaserecords WHERE drug=drug_name AND cost_price=cost AND expiry_date=expiry AND supplier=supplierId;
  
  UPDATE drugpurchaserecords SET balance = store_qty - in_qty, dispensary_balance = dispensary_qty + in_qty WHERE drug=drug_name AND cost_price=cost AND expiry_date=expiry AND supplier=supplierId;

  INSERT INTO drugs(drug_code,drug,expiry_date,price,
        unit_of_issue,
        qty_in,
        qty_out,
        source,
        created_by,
        genericName,
        facilityId,markup,receipt_no)
        values (d_code,drug_name,expiry,cost,unit,0,in_qty,'purchases',userId,generic,facId,mark_up,in_receiptno);
        
   INSERT INTO drugs(drug_code,drug,expiry_date,price,
        unit_of_issue,
        qty_in,
        qty_out,
        source,
        created_by,
        genericName,
        facilityId,markup,receipt_no)
        values (d_code,drug_name,expiry,cost,unit,in_qty,0,'dispensary',userId,generic,facId,mark_up,in_receiptno);
        
        ELSE
        select dispensary_balance into dispensary_qty FROM drugpurchaserecords WHERE drug=drug_name AND cost_price=cost AND expiry_date=expiry AND supplier=supplierId;
        
        IF dispensary_qty IS NOT null THEN
  
  UPDATE drugpurchaserecords SET balance=dispensary_qty + in_qty, dispensary_balance = dispensary_qty + in_qty WHERE drug=drug_name AND cost_price=cost AND expiry_date=expiry AND supplier=supplierId;
  
   INSERT INTO drugs(drug_code,drug,expiry_date,price,
        unit_of_issue,
        qty_in,
        qty_out,
        source,
        created_by,
        genericName,
        facilityId,markup,supplier,receipt_no)
        values (d_code,drug_name,expiry,cost,unit,0,in_qty,'purchases',userId,generic,facId,mark_up,supplierId,in_receiptno);
        
   INSERT INTO drugs(drug_code,drug,expiry_date,price,
        unit_of_issue,
        qty_in,
        qty_out,
        source,
        created_by,
        genericName,
        facilityId,markup,supplier,receipt_no)
        values (d_code,drug_name,expiry,cost,unit,in_qty,0,'dispensary',userId,generic,facId,mark_up,supplierId,in_receiptno);
  
  else 
  
        INSERT into drugpurchaserecords (drug_code,drug,generic_name,unit_of_issue,cost_price,markUp,quantity, by_whom,supplier,receipt_no,payment_status,expiry_date,dispensary_balance,facilityId) VALUES (d_code,drug_name,generic,unit,cost,mark_up,in_qty,userId,supplierId,'0','paid',expiry,in_qty,facId);
        
        INSERT INTO drugs(drug_code,drug,expiry_date,price,
        unit_of_issue,
        qty_in,
        qty_out,
        source,
        created_by,
        genericName,
        facilityId,markup,supplier,receipt_no)
        values (d_code,drug_name,expiry,cost,unit,0,in_qty,'purchases',userId,generic,facId,mark_up,supplierId,in_receiptno);
        
   INSERT INTO drugs(drug_code,drug,expiry_date,price,
        unit_of_issue,
        qty_in,
        qty_out,
        source,
        created_by,
        genericName,
        facilityId,markup,supplier,receipt_no)
        values (d_code,drug_name,expiry,cost,unit,in_qty,0,'dispensary',userId,generic,facId,mark_up,supplierId,in_receiptno);
        
        END IF;
        end if;

END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `move_money` (IN `amount` INT, IN `userId` VARCHAR(50), IN `facId` VARCHAR(50), IN `in_receiptDateSN` VARCHAR(50), IN `in_receiptSN` VARCHAR(50), IN `in_date` DATETIME, IN `in_descr` VARCHAR(50), IN `accFrom` VARCHAR(50), IN `accTo` VARCHAR(50))  NO SQL
BEGIN
	insert into transactions (description,acct,debit,credit,receiptDateSN,receiptNo,modeOfPayment,enteredBy,facilityId,createdAt)
            values (in_descr,accTo,amount,0 ,in_receiptDateSN,in_receiptSN,'Cash',userId,facId,in_date);
            
            insert into transactions (description,acct,debit,credit,receiptDateSN,receiptNo,modeOfPayment,enteredBy,facilityId,createdAt)
            values (in_descr,accFrom,0,amount,in_receiptDateSN,in_receiptSN,'Cash',userId,facId,in_date);
    
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `new_acc_head` (IN `head` VARCHAR(100), IN `subhead` VARCHAR(100), IN `description` VARCHAR(200), IN `balance` INT(11), IN `facId` VARCHAR(50))  BEGIN
    INSERT INTO account(head, subhead, description, balance, facilityId) VALUES (description,subhead,head,balance,facId);
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `new_comment` (IN `facId` VARCHAR(50), IN `labno` VARCHAR(50), IN `userId` VARCHAR(50), IN `t_comment` VARCHAR(4000), IN `labname` VARCHAR(50), IN `in_type` VARCHAR(50))  NO SQL
BEGIN

#DECLARE commentId int;
#SELECT id INTO commentId FROM comment WHERE booking_no=labno AND user_id=userId AND lab_name=labname AND facilityId=facId;

#IF commentId is null THEN
IF t_comment != '' THEN
INSERT INTO comment (facilityId,booking_no,user_id,comment,lab_name,comment_type)
        VALUES (facId, labno, userId, t_comment, labname,in_type);
 #  ELSE
  # UPDATE comment SET comment=t_comment WHERE booking_no=labno AND user_id=userId AND lab_name=labname AND facilityId=facId;
 
END IF;
 
 END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `new_drug_purchase` (IN `drug_name` VARCHAR(100), IN `cost` INT, IN `expiry` VARCHAR(20), IN `genericName` VARCHAR(100), IN `unit` VARCHAR(50), IN `reorder` INT, IN `mark_up` INT, IN `quantity_in` INT, IN `userId` VARCHAR(50), IN `supplierId` VARCHAR(50), IN `paymentStatus` VARCHAR(10), IN `p_date` VARCHAR(10), IN `receiptPic` VARCHAR(100), IN `expiryAlert` INT, IN `descr` VARCHAR(100), IN `source_head` VARCHAR(100), IN `amt` INT, IN `receiptsn` VARCHAR(50), IN `receiptno` VARCHAR(50), IN `payment_mode` VARCHAR(50), IN `dest_head` VARCHAR(100), IN `facId` VARCHAR(50), IN `d_code` VARCHAR(50), IN `selling_price` INT, IN `in_date` DATETIME)  NO SQL
BEGIN 
  DECLARE store_balance int;
  DECLARE drug_id INT;
  
  SELECT id INTO drug_id FROM druglist WHERE name=drug_name AND generic_name=genericName;
  IF drug_id IS null THEN
  INSERT INTO druglist (name,generic_name) VALUES (drug_name,genericName);
  end IF;
  
  SELECT balance INTO store_balance FROM drugpurchaserecords WHERE drug=drug_name AND cost_price=cost AND expiry_date=expiry AND supplier=supplierId;

  IF store_balance IS NULL THEN 

  INSERT INTO drugpurchaserecords (drug_code,drug,generic_name,unit_of_issue,reorder_level,cost_price,markUp,quantity,
                                    by_whom,supplier,receipt_no,payment_status,created_at,receipt_picture,expiry_date,
                                    expiry_alert,balance,facilityId)
    VALUES (d_code,drug_name,genericName,unit,reorder,cost,mark_up,quantity_in,userId,supplierId,receiptsn,paymentStatus,
            p_date,receiptPic,expiry,expiryAlert,quantity_in,facId);
            
  INSERT INTO drugs (drug_code,drug,expiry_date,price,unit_of_issue,qty_in,qty_out,source,supplier,receipt_no,created_by,genericName,facilityId) VALUES (d_code,drug_name,expiry,selling_price,unit,quantity_in,0,'purchases',supplierId,receiptsn,userId,genericName,facId);

  INSERT INTO transactions (description, acct, debit, credit, enteredBy, receiptDateSN, receiptNo,
                            modeOfPayment,facilityId,createdAt) 
        VALUES (descr,source_head,0,amt,userId,receiptsn,receiptno,payment_mode,facId,in_date);
  INSERT INTO transactions (description, acct, debit, credit, enteredBy, receiptDateSN, receiptNo, 
                            modeOfPayment,facilityId,createdAt) 
      VALUES (descr,dest_head,amt,0,userId,receiptsn,receiptno,payment_mode,facId,in_date);

  ELSE 
  UPDATE drugpurchaserecords set balance = store_balance + quantity_in, status='' 
    WHERE drug=drug_name AND cost_price=cost AND supplier=supplierId AND expiry_date=expiry;
    
    INSERT INTO drugs (drug_code,drug,expiry_date,price,unit_of_issue,qty_in,qty_out,source,supplier,receipt_no,created_by,genericName,facilityId) VALUES (d_code,drug_name,expiry,selling_price,unit,quantity_in,0,'purchases',supplierId,receiptsn,userId,genericName,facId);

  
  INSERT INTO transactions (description, acct, debit, credit, enteredBy, receiptDateSN, receiptNo,
                            modeOfPayment,facilityId,createdAt) 
        VALUES (descr,source_head,0,amt,userId,receiptsn,receiptno,payment_mode,facId,in_date);
  INSERT INTO transactions (description, acct, debit, credit, enteredBy, receiptDateSN, receiptNo, 
                            modeOfPayment,facilityId,createdAt) 
      VALUES (descr,dest_head,amt,0,userId,receiptsn,receiptno,payment_mode,facId,in_date);
      
 END IF;

  COMMIT;
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `new_drug_sale` (IN `drug_name` VARCHAR(100), IN `cost` INT, IN `expiry` VARCHAR(20), IN `genericName` VARCHAR(100), IN `unit` VARCHAR(50), IN `quantity_in` INT, IN `userId` VARCHAR(50), IN `supplierId` VARCHAR(50), IN `descr` VARCHAR(100), IN `source_head` VARCHAR(100), IN `amt` INT, IN `receiptsn` VARCHAR(50), IN `receiptno` VARCHAR(50), IN `payment_mode` VARCHAR(50), IN `dest_head` VARCHAR(100), IN `facId` VARCHAR(50), IN `d_code` VARCHAR(50), IN `selling_price` INT, IN `accNo` VARCHAR(50), IN `transactionType` VARCHAR(20))  BEGIN 
  DECLARE balance_dispensary int;
  DECLARE acc_balance int;
  
  IF transactionType='insta' THEN
  
  SELECT dispensary_balance INTO balance_dispensary FROM drugpurchaserecords WHERE drug=drug_name AND cost_price=cost AND expiry_date=expiry ;
  
  UPDATE drugpurchaserecords set dispensary_balance = balance_dispensary - quantity_in WHERE drug=drug_name AND cost_price=cost AND expiry_date=expiry;
  
  INSERT INTO drugs (drug_code,drug,expiry_date,price,unit_of_issue,qty_in,qty_out,source,supplier,receipt_no,created_by,genericName,facilityId,client_acct) VALUES (d_code,drug_name,expiry,selling_price,unit,quantity_in,0,'sold_items',supplierId,receiptsn,userId,genericName,facId,accNo);
  
  INSERT INTO drugs (drug_code,drug,expiry_date,price,unit_of_issue,qty_in,qty_out,source,supplier,receipt_no,created_by,genericName,facilityId,client_acct) VALUES (d_code,drug_name,expiry,selling_price,unit,0,quantity_in,'dispensary',supplierId,receiptsn,userId,genericName,facId,accNo);


 -- INSERT INTO transactions (description, acct, debit, credit, enteredBy, receiptDateSN, receiptNo,
 --                           modeOfPayment,facilityId,client_acct) 
 --       VALUES (descr,source_head,0,amt,userId,receiptsn,receiptno,payment_mode,facId,accNo);
 -- INSERT INTO transactions (description, acct, debit, credit, enteredBy, receiptDateSN, receiptNo, 
 --                           modeOfPayment,facilityId,client_acct) 
 --     VALUES (descr,dest_head,amt,0,userId,receiptsn,receiptno,payment_mode,facId,accNo);
      
     ELSEIF transactionType='deposit' THEN
      
      SELECT dispensary_balance INTO balance_dispensary FROM drugpurchaserecords WHERE drug=drug_name AND cost_price=cost AND expiry_date=expiry;
  
  UPDATE drugpurchaserecords set dispensary_balance = balance_dispensary - quantity_in WHERE drug=drug_name AND cost_price=cost AND expiry_date=expiry;
  
 INSERT INTO drugs (drug_code,drug,expiry_date,price,unit_of_issue,qty_in,qty_out,source,supplier,receipt_no,created_by,genericName,facilityId,client_acct) VALUES (d_code,drug_name,expiry,selling_price,unit,quantity_in,0,'sold_items',supplierId,receiptsn,userId,genericName,facId,accNo);
  
  INSERT INTO drugs (drug_code,drug,expiry_date,price,unit_of_issue,qty_in,qty_out,source,supplier,receipt_no,created_by,genericName,facilityId,client_acct) VALUES (d_code,drug_name,expiry,selling_price,unit,0,quantity_in,'dispensary',supplierId,receiptsn,userId,genericName,facId,accNo);


 -- INSERT INTO transactions (description, acct, debit, credit, enteredBy, receiptDateSN, receiptNo,
   --                         modeOfPayment,facilityId,client_acct) 
     --   VALUES (descr,source_head,0,amt,userId,receiptsn,receiptno,payment_mode,facId,accNo);
 -- INSERT INTO transactions (description, acct, debit, credit, enteredBy, receiptDateSN, receiptNo, 
   --                         modeOfPayment,facilityId,client_acct) 
     -- VALUES (descr,dest_head,amt,0,userId,receiptsn,receiptno,payment_mode,facId,accNo);
      
	--  SELECT balance into acc_balance from patientfileno WHERE accountNo=accNo AND facilityId=facId;
	--  UPDATE patientfileno SET balance = acc_balance - amt WHERE accountNo = accNo AND facilityId=facId;
   END IF;
COMMIT;
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `new_expense` (IN `facId` VARCHAR(50), IN `descr` VARCHAR(100), IN `source_head` VARCHAR(100), IN `dest_head` VARCHAR(100), IN `receiptsn` VARCHAR(50), IN `receiptno` VARCHAR(50), IN `payment_mode` VARCHAR(50), IN `userId` VARCHAR(50), IN `amt` INT, IN `collected` VARCHAR(100), IN `in_date` DATETIME)  BEGIN 
    INSERT INTO transactions (description, acct, debit, credit, enteredBy, receiptDateSN, receiptNo, modeOfPayment,facilityId,client_acct,createdAt) 
        VALUES (descr,source_head,0,amt,userId,receiptsn,receiptno,payment_mode,facId,collected,in_date);
    INSERT INTO transactions (description, acct, debit, credit, enteredBy, receiptDateSN, receiptNo, modeOfPayment,facilityId,client_acct,createdAt) 
      VALUES (descr,dest_head,amt,0,userId,receiptsn,receiptno,payment_mode,facId,collected,in_date);
      
       INSERT INTO transactions (description, acct, debit, credit, enteredBy, receiptDateSN, receiptNo, modeOfPayment,facilityId,client_acct,createdAt) 
      VALUES (descr,'500011',amt,0,userId,receiptsn,receiptno,payment_mode,facId,collected,in_date);
    
    COMMIT;
  END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `new_purchase_from_supplier` (IN `in_acct` INT, IN `amount_paid` INT, IN `userId` VARCHAR(50), IN `in_receiptDateSN` VARCHAR(50), IN `in_receiptSN` VARCHAR(50), IN `in_description` VARCHAR(1000), IN `in_mode_of_payment` VARCHAR(20), IN `in_facId` VARCHAR(50), IN `sourceAcct` VARCHAR(50), IN `paymentStatus` VARCHAR(50), IN `goods_amount` INT, IN `in_goods_head` VARCHAR(50), IN `in_date` DATETIME, IN `in_payables_head` VARCHAR(50))  BEGIN
    declare supplier_balance double;
    declare main_balance double;
    DECLARE balance_paid DOUBLE;
    
    select balance into supplier_balance from suppliersinfo where id=in_acct AND facilityId=in_facId;

    set main_balance = supplier_balance + goods_amount - Amount_paid;
    set balance_paid = goods_amount - Amount_paid;

    IF paymentStatus = 'Full Payment' THEN
   
    -- update patientfileno set balance= instant_balance where accountNo=in_acct AND facilityId=in_facId;
       
       insert into supplier_entries (supplier_id,dr,cr,reference_no,facilityId)
           values (in_acct,0,goods_amount,in_receiptDateSN,in_facId);
   
    insert into transactions (description,acct,debit,credit,receiptDateSN,receiptNo,modeOfPayment,enteredBy,client_acct,facilityId,createdAt)
           values (in_description,sourceAcct,0,goods_amount,in_receiptDateSN,in_receiptSN,in_mode_of_payment,userId,in_acct,in_facId,in_date);

           insert into transactions (description,acct,debit,credit,receiptDateSN,receiptNo,modeOfPayment,enteredBy,client_acct,facilityId,createdAt)
           values (in_description,in_goods_head,abs(goods_amount),0 ,in_receiptDateSN,in_receiptSN,in_mode_of_payment,userId,in_acct,in_facId,in_date);
   

     ELSEIF paymentStatus = 'Pay Later' THEN
        update suppliersinfo set balance= main_balance  where id=in_acct AND facilityId=in_facId;
        
            insert into supplier_entries(supplier_id,dr,cr,reference_no,facilityId)
            values(in_acct, goods_amount, 0, in_receiptDateSN, in_facId);

            insert into transactions(description,acct,debit,credit,receiptDateSN,receiptNo,modeOfPayment, enteredBy,client_acct,facilityId,createdAt)
            values(in_description, in_goods_head, goods_amount, 0, in_receiptDateSN, in_receiptSN, in_mode_of_payment, userId, in_acct, in_facId,in_date);

            insert into transactions(description,acct,debit,credit,receiptDateSN,receiptNo,modeOfPayment, enteredBy,client_acct,facilityId,createdAt)
            values(in_description, in_payables_head, 0, abs(goods_amount) , in_receiptDateSN, in_receiptSN, in_mode_of_payment, userId, in_acct, in_facId,in_date);

    ELSEIF paymentStatus = 'Part Payment' THEN
        update suppliersinfo set balance= main_balance  where id=in_acct AND facilityId=in_facId;

        insert into supplier_entries(supplier_id,dr,cr,reference_no,facilityId)
        values(in_acct, 0, Amount_paid, in_receiptDateSN, in_facId);

        insert into transactions(description,acct,debit,credit,receiptDateSN,receiptNo,modeOfPayment, enteredBy,client_acct,facilityId,createdAt)
        values(in_description, in_goods_head, goods_amount, 0, in_receiptDateSN, in_receiptSN, in_mode_of_payment, userId, in_acct, in_facId);

        insert into transactions(description,acct,debit,credit,receiptDateSN,receiptNo,modeOfPayment, enteredBy,client_acct,facilityId,createdAt)
        values(in_description, sourceAcct, Amount_paid, 0, in_receiptDateSN, in_receiptSN, in_mode_of_payment, userId, in_acct, in_facId,in_date);

        insert into transactions(description,acct,debit,credit,receiptDateSN,receiptNo,modeOfPayment, enteredBy,client_acct,facilityId,createdAt)
        values(in_description,in_payables_head, 0, abs(balance_paid) , in_receiptDateSN, in_receiptSN, in_mode_of_payment, userId, in_acct, in_facId,in_date);

  
    END IF;

END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `new_service` (IN `title` VARCHAR(225), IN `description` VARCHAR(225), IN `cost` INT(15), IN `accHead` VARCHAR(50), IN `facId` VARCHAR(50))  BEGIN
   INSERT INTO services(title, description, cost, accHead,facilityId) VALUES (title,description,cost,accHead,facId);
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `new_service_from_deposit` (IN `facId` VARCHAR(100), IN `patientId` VARCHAR(50), IN `amt` INT, IN `source_head` VARCHAR(100), IN `dest_head` VARCHAR(100), IN `userId` VARCHAR(50), IN `receiptsn` VARCHAR(50), IN `receiptno` VARCHAR(50), IN `payment_mode` VARCHAR(20), IN `descr` VARCHAR(100), IN `in_date` DATETIME)  NO SQL
BEGIN 
  DECLARE acc_balance int;
  SELECT balance INTO acc_balance FROM patientfileno WHERE accountNo = patientId AND facilityId=facId;
  UPDATE patientfileno SET balance = acc_balance - amt WHERE accountNo = patientId AND facilityId=facId;
  INSERT INTO transactions (description, acct, debit, credit, enteredBy, receiptDateSN, receiptNo, modeOfPayment,patient_id,facilityId,createdAt) 
    VALUES (descr,source_head,0,amt,userId,receiptsn,receiptno,payment_mode,patientId,facId,in_date);
  INSERT INTO transactions (description, acct, debit, credit, enteredBy, receiptDateSN, receiptNo, modeOfPayment,patient_id,facilityId,createdAt) 
    VALUES (descr,dest_head,amt,0,userId,receiptsn,receiptno,payment_mode,patientId,facId,in_date);
  
  COMMIT;
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `new_service_instant_payment` (IN `facId` VARCHAR(50), IN `patientId` VARCHAR(50), IN `descr` VARCHAR(100), IN `source_head` VARCHAR(100), IN `dest_head` VARCHAR(100), IN `receiptsn` VARCHAR(50), IN `receiptno` VARCHAR(50), IN `payment_mode` VARCHAR(50), IN `userId` VARCHAR(50), IN `amt` INT, IN `accNo` VARCHAR(50))  NO SQL
BEGIN 
  INSERT INTO transactions (description, acct, debit, credit, enteredBy, receiptDateSN, receiptNo, modeOfPayment,patient_id,client_acct,facilityId) 
      VALUES (descr,source_head,0,amt,userId,receiptsn,receiptno,payment_mode,patientId,accNo,facId);
    INSERT INTO transactions (description, acct, debit, credit, enteredBy, receiptDateSN, receiptNo, modeOfPayment,patient_id,client_acct,facilityId) 
      VALUES (descr,dest_head,amt,0,userId,receiptsn,receiptno,payment_mode,patientId,accNo,facId);
  
  COMMIT;
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `new_test_result` (IN `facId` VARCHAR(50), IN `res` VARCHAR(50), IN `dept` VARCHAR(50), IN `tst` VARCHAR(50), IN `bk_no` VARCHAR(50), IN `userId` VARCHAR(50))  NO SQL
UPDATE lab_requisition SET result=res, analyzed_by=userId, status='analyzed'
        WHERE department=dept AND test=tst
        AND booking_no=bk_no AND facilityId=facId$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `patients_assigned_today` (IN `date` VARCHAR(20), IN `facId` VARCHAR(50))  BEGIN
    SELECT assigned_to Doctors, COUNT(id) Patients FROM `patientrecords` where assigned_to !="" and date_assigned = date AND facilityId=facId GROUP by assigned_to ORDER BY assigned_to;
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `patient_deposit` (IN `accountNo` VARCHAR(20), IN `amount` INT(11), IN `user` VARCHAR(20), IN `receiptNo` VARCHAR(30), IN `receiptId` VARCHAR(11), IN `description` VARCHAR(200), IN `mode` VARCHAR(10), IN `facId` VARCHAR(50), IN `in_date` DATETIME)  BEGIN
    UPDATE patientfileno set balance = patientfileno.balance + amount WHERE patientfileno.accountNo = accountNo AND facilityId=facilityId;
    INSERT into transactions (transaction_source,debit,destination,credit,amount,debited,credited,enteredBy,receiptDateSN,receiptNo,description,modeOfPayment,facilityId,createdAt) VALUES (accountNo,accountNo,"Deposit","Deposit",amount,0,amount,user,receiptNo,receiptId,description,mode,facId,in_date);
   # INSERT into transactions (transaction_source,debit,destination,credit,debited,credited,enteredBy,receiptDateSN,receiptNo,description,modeOfPayment) VALUES ("Deposit",accountNo,amount,0,user,receiptNo,receiptId,description,mode);
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `patient_file_no` (IN `id` INT(10), IN `facId` VARCHAR(50))  BEGIN
   Select * from patientfileno where accountNo = id AND facilityId=facId;
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `records_breakdown_by_month` (IN `fac_id` VARCHAR(50))  NO SQL
SELECT COUNT(*) no_of_patients, MONTH(dateCreated) month, YEAR(dateCreated) year FROM `patientrecords` WHERE facilityId=facId
GROUP BY MONTH(dateCreated),YEAR(dateCreated)
ORDER BY year, month$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `record_returned_drugs` (IN `quantity_in` INT, IN `receiptsn` VARCHAR(50), IN `d_code` VARCHAR(50), IN `cost` INT, IN `expiry` DATE, IN `facId` VARCHAR(50), IN `userId` VARCHAR(50), IN `drug_name` VARCHAR(100), IN `selling_price` INT, IN `unit` INT, IN `supplierId` INT, IN `generic` INT, IN `in_accNo` INT)  NO SQL
BEGIN
DECLARE balance_dispensary int;
  DECLARE acc_balance int;
  
 -- IF transactionType='insta' THEN
  
  SELECT dispensary_balance INTO balance_dispensary FROM drugpurchaserecords WHERE drug=drug_name AND cost_price+markUp=cost AND expiry_date=expiry ;
  
  UPDATE drugpurchaserecords set dispensary_balance = balance_dispensary + quantity_in WHERE drug=drug_name AND cost_price+markUp=cost AND expiry_date=expiry;
  
  INSERT INTO drugs (drug_code,drug,expiry_date,price,unit_of_issue,qty_in,qty_out,source,supplier,receipt_no,created_by,genericName,facilityId,client_acct) VALUES (d_code,drug_name,expiry,selling_price,unit,0,quantity_in,'sold_items',supplierId,receiptsn,userId,generic,facId,in_accNo);
  
  INSERT INTO drugs (drug_code,drug,expiry_date,price,unit_of_issue,qty_in,qty_out,source,supplier,receipt_no,created_by,genericName,facilityId,client_acct) VALUES (d_code,drug_name,expiry,selling_price,unit,quantity_in,0,'dispensary',supplierId,receiptsn,userId,generic,facId,in_accNo);

END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `report` (IN `fromDate` VARCHAR(10), IN `toDate` VARCHAR(10), IN `reportType` VARCHAR(100), IN `facId` VARCHAR(50))  BEGIN
    SELECT 
day as date, mode, description,credit,debit,Account_Head,head FROM `general_report` WHERE (date(day) BETWEEN fromDate AND toDate) AND head = reportType AND facilityId=facId;
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `report_expenditure` (IN `fromDate` VARCHAR(10), IN `toDate` VARCHAR(10), IN `facId` VARCHAR(50))  BEGIN
    SELECT t.date, t.services, t.amount, @running_total:=@running_total + t.balance AS bal
        FROM
        (SELECT createdAt as date, transaction_source as services, debited as amount, SUM(debited) as balance
         FROM `expenditure_view` WHERE (createdAt BETWEEN fromDate AND toDate) AND (facilityId=facId)
         GROUP BY date, transaction_source, debited) t 
        JOIN (SELECT @running_total:=0) r
        ORDER BY t.date;
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `report_expenditure_by_accHead` (IN `fromDate` VARCHAR(10), IN `toDate` VARCHAR(10), IN `accHead` VARCHAR(20))  BEGIN
    SELECT t.date, t.services, t.amount, @running_total:=@running_total + t.balance AS bal
        FROM
        (SELECT date, transaction_source as services, debited as amount, SUM(debited) as balance
         FROM `expenditure_view` WHERE (transaction_source = accHead) AND (date BETWEEN fromDate AND toDate)
         GROUP BY date, transaction_source, debited) t 
        JOIN (SELECT @running_total:=0) r
        ORDER BY t.date;
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `report_general` (IN `facId` VARCHAR(50))  BEGIN
    SELECT t.transaction_id, t.transaction_source,t.day,t.description, t.credit, t.debit,t.mode,
       @running_total:=@running_total + t.balance AS bal
        FROM
        ( SELECT transaction_id, transaction_source,
          date(createdAt) as day,description,credited credit, debited 			debit, modeOfPayment mode,
          sum(credited-debited) as balance
          FROM transactions WHERE facilityId=facId
          GROUP BY transaction_id,day,description,credit,debit,transaction_source,mode ) t
        JOIN (SELECT @running_total:=0) r
        ORDER BY t.transaction_id;
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `report_general_by_accHead` (IN `fromDate` VARCHAR(20), IN `toDate` VARCHAR(20), IN `accHead` VARCHAR(50), IN `facId` VARCHAR(50))  BEGIN
    SELECT t.transaction_id, t.transaction_source,t.day,t.description, t.credit, t.debit,
       @running_total:=@running_total + t.balance AS bal
        FROM
        ( SELECT transaction_id, transaction_source,
          date(createdAt) as day,description,credited debit, debited credit,
          sum(debited-credited) as balance
          FROM transactions WHERE (transaction_source=accHead OR destination=accHead) and (createdAt BETWEEN fromDate AND toDate) AND facilityId=facId
          GROUP BY transaction_id,day,description,credit,debit,transaction_source ) t
        JOIN (SELECT @running_total:=0) r
        ORDER BY t.transaction_id;
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `report_general_by_date` (IN `fromDate` VARCHAR(20), IN `toDate` VARCHAR(20), IN `facId` VARCHAR(50))  BEGIN
    select description,facilityId, Account_Head, credit,debit,transaction_id,mode,day

from 

(select description,facilityId,transaction_source Account_head, amount credit,0 debit,transaction_id,modeOfPayment mode, date(createdAt) day from transactions where transaction_source in (select DISTINCT transaction_source from transactions) UNION SELECT description,facilityId,destination Account_head, 0 credit, amount debit,transaction_id,modeOfPayment mode, date(createdAt) day from transactions where destination in (select DISTINCT destination from transactions) ) stmt WHERE day BETWEEN fromDate AND toDate AND facilityId=facId order by transaction_id;
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `report_general_by_date2` (IN `fromDate` VARCHAR(20), IN `toDate` VARCHAR(20))  BEGIN
    SELECT t.transaction_id, t.mode, t.transaction_source,t.day,t.description, t.credit, t.debit,
       @running_total:=@running_total + t.balance AS bal
        FROM
        ( SELECT transaction_id, transaction_source,
          date(createdAt) as day,description,credited credit, debited debit, modeOfPayment mode,
          sum(credited-debited) as balance
          FROM transactions WHERE createdAt BETWEEN fromDate AND toDate
          GROUP BY transaction_id,day,description,credit,debit,transaction_source,modeOfPayment ) t
        JOIN (SELECT @running_total:=0) r
        ORDER BY t.transaction_id;
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `report_revenue_by_accHead` (IN `fromDate` VARCHAR(20), IN `toDate` VARCHAR(20), IN `accHead` VARCHAR(20), IN `facId` VARCHAR(50))  BEGIN
    SELECT t.date, t.services, t.amount, @running_total:=@running_total + t.balance AS total
        FROM
        (SELECT date, destination as services, debited as amount, SUM(debited) as balance
         FROM `revenue_view` 
         WHERE (destination=accHead) AND (date BETWEEN fromDate AND toDate) and facilityId=facId
         GROUP BY date, destination, debited) t 
        JOIN (SELECT @running_total:=0) r
        ORDER BY t.date;
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `report_suppliers` (IN `fromDate` DATE, IN `toDate` DATE, IN `fac_id` VARCHAR(50))  NO SQL
SELECT SUM(quantity), SUM(cost), supplier, date(date) date FROM drugpurchaserecords WHERE facilityId=fac_id AND date BETWEEN fromDate AND toDate GROUP by supplier, date$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `run_asset_deduction` (IN `facId` VARCHAR(50), IN `userId` VARCHAR(50), IN `in_code` INT, IN `in_desc` VARCHAR(100), IN `in_cost` INT, IN `in_date` DATETIME, IN `in_source_acct` VARCHAR(50), IN `in_receipt_no` VARCHAR(50), IN `in_receipt_sn` VARCHAR(50), IN `in_mode` VARCHAR(50), IN `in_nbv` INT)  BEGIN
UPDATE asset_schedule SET nbv_yearly=in_nbv, deduction_date=in_date WHERE facilityId=facId AND code=in_code AND description=in_desc;

insert into transactions (description,acct,debit,credit,receiptDateSN,receiptNo,modeOfPayment,enteredBy,facilityId,createdAt)
           values (in_desc,in_code,0,in_nbv,in_receipt_no,in_receipt_sn,in_mode,userId,facId,in_date);

insert into transactions (description,acct,debit,credit,receiptDateSN,receiptNo,modeOfPayment,enteredBy,facilityId,createdAt)
           values (in_desc,in_source_acct,in_nbv,0,in_receipt_no,in_receipt_sn,in_mode,userId,facId,in_date);

end$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `save_asset_register` (IN `facId` VARCHAR(50), IN `userId` VARCHAR(50), IN `in_code` INT, IN `in_desc` VARCHAR(100), IN `in_cost` INT, IN `in_rate` INT, IN `in_daily_rate` INT, IN `in_purchase_date` DATE, IN `in_end_date` DATE, IN `in_percentage_rate` INT, IN `in_nbv_yearly` INT, IN `in_years` INT, IN `in_nbv_monthly` INT, IN `in_date` DATETIME, IN `in_source_acct` VARCHAR(50), IN `in_receipt_no` VARCHAR(50), IN `in_receipt_sn` VARCHAR(50), IN `in_mode` VARCHAR(50))  NO SQL
BEGIN

INSERT INTO asset_schedule (code,description,cost,rate,daily_rate,purchase_date,end_date,percentage_rate,nbv_yearly,years,nbv_monthly,created_by,facilityId,depreciation) VALUES (in_code,in_desc,in_cost,in_rate,in_daily_rate,in_purchase_date,in_end_date,in_percentage_rate,in_nbv_yearly,in_years,in_nbv_monthly,userId,facId,years);

insert into transactions (description,acct,debit,credit,receiptDateSN,receiptNo,modeOfPayment,enteredBy,facilityId,createdAt)
            values (in_desc,in_source_acct,0,in_cost,in_receipt_no,in_receipt_sn,in_mode,userId,facId,in_date);

insert into transactions (description,acct,debit,credit,receiptDateSN,receiptNo,modeOfPayment,enteredBy,facilityId,createdAt)
            values (in_desc,in_code,in_cost,0,in_receipt_no,in_receipt_sn,in_mode,userId,facId,in_date);

end$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `save_new_diesel_refuel` (IN `dateCreated` VARCHAR(10), IN `gen` VARCHAR(10), IN `quantity` VARCHAR(10), IN `facId` VARCHAR(50))  BEGIN
    INSERT into dieselrefuel(createdAt,gen,quantity,facilityId) values(dateCreated,gen,quantity,facId);
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `save_new_diesel_usage` (IN `dateCreated` VARCHAR(20), IN `gen` VARCHAR(10), IN `time_started` VARCHAR(10), IN `time_stopped` VARCHAR(10))  BEGIN
    INSERT into dieselusage(createdAt,gen,time_started,time_stopped) VALUES (dateCreated,gen,time_started,time_stopped);
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `save_new_drug` (IN `drug` VARCHAR(30), IN `unitOfIssue` VARCHAR(3), IN `quantity` VARCHAR(6), IN `price` INT(7), IN `expiryDate` VARCHAR(20), IN `dateBrought` DATE, IN `facId` VARCHAR(50))  BEGIN
    INSERT INTO drugs(date_brought,drug,unit_of_issue,quantity,price,expiry_date,facilityId) VALUES (dateBrought,drug,unitOfIssue,quantity,price,expiryDate,facId);
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `save_new_error_repair_log` (IN `dateCreated` VARCHAR(11), IN `time` VARCHAR(11), IN `repairedBy` VARCHAR(50), IN `nature` VARCHAR(200))  BEGIN
    INSERT INTO repairlogs(date,time,repaired_by,nature) VALUES(dateCreated,time,repairedBy,nature);
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `save_new_service_log` (IN `dateCreated` VARCHAR(11), IN `next_service_date` VARCHAR(11))  BEGIN
    INSERT INTO servicelogs(date,createdAt,next_service_due_date) values(dateCreated,dateCreated,next_service_date);
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `save_operation_note` (IN `op_date` VARCHAR(30), IN `patient_id` VARCHAR(10), IN `diagnosis` VARCHAR(150), IN `surgery` VARCHAR(150), IN `surgeons` VARCHAR(150), IN `anesthetist` VARCHAR(80), IN `anesthetic` VARCHAR(20), IN `scrubNurse` VARCHAR(30), IN `remarks` VARCHAR(50), IN `name` VARCHAR(100), IN `pintsGiven` VARCHAR(10), IN `bloodLoss` VARCHAR(15), IN `intraOpAntibiotics` VARCHAR(20), IN `intraOpFindings` VARCHAR(2000), IN `procedureNotes` VARCHAR(2000), IN `pathologyRequest` VARCHAR(200), IN `postOpOrder` VARCHAR(1000), IN `facId` VARCHAR(50))  BEGIN
   INSERT INTO operationnotes(date, patientId, diagnosis, surgery, surgeons, anesthetist, anesthetic, scrubNurse, remarks, name, pintsGiven, bloodLoss, intraOpAntibiotics, intraOpFindings, procedureNotes, pathologyRequest, postOpOrder,facilityId) VALUES (op_date,patient_id,diagnosis, surgery, surgeons, anesthetist, anesthetic, scrubNurse, remarks, name, pintsGiven, bloodLoss, intraOpAntibiotics, intraOpFindings, procedureNotes,pathologyRequest, postOpOrder,facId);
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `search_drug` (IN `p_drug` VARCHAR(50), IN `facId` VARCHAR(50), IN `t_source` VARCHAR(20))  NO SQL
IF t_source = 'dispensary' THEN

SELECT drug,drug_code,generic_name,cost_price,cost_price+markUp as price,balance,dispensary_balance as d_balance,
        supplier,unit_of_issue,supplier, expiry_date,markUp as markup
        FROM drugpurchaserecords
        WHERE facilityId=facId AND date(created_at) = (
          SELECT MIN(date(created_at)) FROM drugpurchaserecords WHERE drug = p_drug OR drug_code = p_drug
        ) AND (drug = p_drug OR drug_code = p_drug);
        
  ELSE
  
  SELECT drug,drug_code,genericName,price as cost_price,price+markup as price, unit_of_issue,supplier, expiry_date,markup as markup
        FROM drugs
        WHERE facilityId=facId AND date(created_at) = (
          SELECT MIN(date(created_at)) FROM drugs WHERE drug = p_drug OR drug_code = p_drug
        ) AND (drug = p_drug OR drug_code = p_drug);
        
  END IF$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `select_admin_role` ()  SELECT * FROM `users` WHERE role = "Admin"$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `service_transaction` (IN `in_description` VARCHAR(1000), IN `in_acct` INT, IN `service_amount` INT, IN `in_receiptDateSN` VARCHAR(50), IN `in_receiptSN` VARCHAR(50), IN `in_mode_of_payment` VARCHAR(20), IN `patientId` VARCHAR(50), IN `in_facId` VARCHAR(50), IN `sourceAcct` VARCHAR(50), IN `userId` VARCHAR(50), IN `in_service_head` VARCHAR(50), IN `txnType` VARCHAR(10), IN `in_date` DATETIME, IN `in_payables_head` VARCHAR(50), IN `in_recievables_head` VARCHAR(50))  BEGIN
	declare client_balance int;
	declare main_balance int;
    declare receivable int;
    DECLARE instant_balance int;
   
--    declare service_description varchar(200);
	select balance into client_balance  from patientfileno where accountNo=in_acct AND facilityId=in_facId;
    
	
	
    set main_balance = client_balance-service_amount;
    set receivable  = service_amount-client_balance;
    set instant_balance = client_balance + service_amount;
    
    IF txnType = 'insta' THEN
    
    	update patientfileno set balance= instant_balance where accountNo=in_acct AND facilityId=in_facId;
        
        insert into account_entries (acct,dr,cr,reference_no,description,facilityId,createdAt)
            values (in_acct,0,service_amount,in_receiptDateSN,in_description,in_facId,in_date);
    
    	insert into transactions (description,acct,debit,credit,receiptDateSN,receiptNo,modeOfPayment,enteredBy,client_acct,patient_id,facilityId,createdAt)
            values (in_description,in_service_head,0,service_amount,in_receiptDateSN,in_receiptSN,in_mode_of_payment,userId,in_acct,patientId,in_facId,in_date);

insert into transactions (description,acct,debit,credit,receiptDateSN,receiptNo,modeOfPayment,enteredBy,client_acct,patient_id,facilityId,createdAt)
            values (in_description,'500011',0,service_amount,in_receiptDateSN,in_receiptSN,in_mode_of_payment,userId,in_acct,patientId,in_facId,in_date);


            insert into transactions (description,acct,debit,credit,receiptDateSN,receiptNo,modeOfPayment,enteredBy,client_acct,patient_id,facilityId,createdAt)
            values (in_description,sourceAcct,abs(service_amount),0 ,in_receiptDateSN,in_receiptSN,in_mode_of_payment,userId,in_acct,patientId,in_facId,in_date);
    
    ELSE

        -- IF the service amount is equal to the customer account balance (initial deposit amount)
        -- IF after the service amount is deducted, the client is still a debtor,

        if main_balance  > 0  then

            update patientfileno set balance= main_balance where accountNo=in_acct AND facilityId=in_facId;

            insert into account_entries (acct,dr,cr,reference_no,description,facilityId,createdAt)
            values (in_acct,0,service_amount,in_receiptDateSN,in_description,in_facId,in_date);

            insert into transactions (description,acct,debit,credit,receiptDateSN,receiptNo,modeOfPayment,enteredBy,client_acct,patient_id,facilityId,createdAt)
            values (in_description,in_service_head,0,service_amount,in_receiptDateSN,in_receiptSN,in_mode_of_payment,userId,in_acct,patientId,in_facId,in_date);

insert into transactions (description,acct,debit,credit,receiptDateSN,receiptNo,modeOfPayment,enteredBy,client_acct,patient_id,facilityId,createdAt)
            values (in_description,'500011',0,service_amount,in_receiptDateSN,in_receiptSN,in_mode_of_payment,userId,in_acct,patientId,in_facId,in_date);

            insert into transactions (description,acct,debit,credit,receiptDateSN,receiptNo,modeOfPayment,enteredBy,client_acct,patient_id,facilityId,createdAt)
            values (in_description,in_payables_head,abs(service_amount),0 ,in_receiptDateSN,in_receiptSN,in_mode_of_payment,userId,in_acct,patientId,in_facId,in_date);

        elseif main_balance < 0 then
            update patientfileno set balance= main_balance where accountNo=in_acct AND facilityId=in_facId;

            insert into account_entries (acct,dr,cr,reference_no,description,facilityId,createdAt)
            values (in_acct,0,service_amount,in_receiptDateSN,in_description,in_facId,in_date);

            insert into transactions (description,acct,debit,credit,receiptDateSN,receiptNo,modeOfPayment,enteredBy,client_acct,patient_id,facilityId,createdAt)
            values (in_description,in_service_head,0,service_amount,in_receiptDateSN,in_receiptSN,in_mode_of_payment,userId,in_acct,patientId,in_facId,in_date);

insert into transactions (description,acct,debit,credit,receiptDateSN,receiptNo,modeOfPayment,enteredBy,client_acct,patient_id,facilityId,createdAt)
            values (in_description,'500011',0,service_amount,in_receiptDateSN,in_receiptSN,in_mode_of_payment,userId,in_acct,patientId,in_facId,in_date);

            if client_balance = 0 then
            insert into transactions (description,acct,debit,credit,receiptDateSN,receiptNo,modeOfPayment,enteredBy,client_acct,patient_id,facilityId,createdAt)
            values (in_description,in_recievables_head,abs(service_amount),0 ,in_receiptDateSN,in_receiptSN,in_mode_of_payment,userId,in_acct,patientId,in_facId,in_date);

            -- IF client had some amount in their deposit
        elseif client_balance > 0  then

            insert into transactions (description,acct,debit,credit,receiptDateSN,receiptNo,modeOfPayment,enteredBy,client_acct,patient_id,facilityId,createdAt)
            values (in_description,in_payables_head,abs(client_balance),0 ,in_receiptDateSN,in_receiptSN,in_mode_of_payment,userId,in_acct,patientId,in_facId,in_date);

            insert into transactions (description,acct,debit,credit,receiptDateSN,receiptNo,modeOfPayment,enteredBy,client_acct,patient_id,facilityId,createdAt)
            values (in_description,in_recievables_head,abs(receivable),0 ,in_receiptDateSN,in_receiptSN,in_mode_of_payment,userId,in_acct,patientId,in_facId,in_date);
        elseif client_balance < 0  then

            insert into transactions (description,acct,debit,credit,receiptDateSN,receiptNo,modeOfPayment,enteredBy,client_acct,patient_id,facilityId,createdAt)
            values (in_description,in_recievables_head,abs(service_amount),0 ,in_receiptDateSN,in_receiptSN,in_mode_of_payment,userId,in_acct,patientId,in_facId,in_date);

            end if;
        elseif  main_balance = 0 then

            update patientfileno set balance= main_balance  where accountNo=in_acct AND facilityId=in_facId;

            insert into account_entries (acct,dr,cr,reference_no,description,facilityId,createdAt)
            values (in_acct,0,service_amount,in_receiptDateSN,in_description,in_facId,in_date);

            insert into transactions (description,acct,debit,credit,receiptDateSN,receiptNo,modeOfPayment,enteredBy,client_acct,patient_id,facilityId,createdAt)
            values (in_description,in_service_head,0,service_amount,in_receiptDateSN,in_receiptSN,in_mode_of_payment,userId,in_acct,patientId,in_facId,in_date);

insert into transactions (description,acct,debit,credit,receiptDateSN,receiptNo,modeOfPayment,enteredBy,client_acct,patient_id,facilityId,createdAt)
            values (in_description,'500011',0,service_amount,in_receiptDateSN,in_receiptSN,in_mode_of_payment,userId,in_acct,patientId,in_facId,in_date);

            insert into transactions (description,acct,debit,credit,receiptDateSN,receiptNo,modeOfPayment,enteredBy,client_acct,patient_id,facilityId,createdAt)
            values (in_description,in_payables_head,abs(client_balance),0 ,in_receiptDateSN,in_receiptSN,in_mode_of_payment,userId,in_acct,patientId,in_facId,in_date);

        -- IF the service amount is less the customer account balance
        end if;
    END IF;
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `service_transaction6` (IN `in_description` VARCHAR(1000), IN `in_acct` INT, IN `service_amount` INT, IN `in_receiptDateSN` INT)  BEGIN
declare client_balance int;
	declare main_balance int;
    declare receivable int;
   
   
   # declare service_description varchar(200);
	select balance into client_balance  from customer_table where acct=in_acct;
    
	
	
    set main_balance = client_balance-service_amount;
    set receivable  = service_amount-client_balance;
      
    #set service_description = concat(in_description,' for ',in_acct);

	#if client_balance is null then
	#insert into customer_table (Acct,name,balance)
	#values(in_acct,in_description,Amount_paid);

	#insert into transactions1 (description,acct,debit,credit,receiptDateSN)
	#values (in_description,'Cash',Amount_paid,0,in_receiptDateSN);

	#insert into transactions1 (description,acct,debit,credit,receiptDateSN)
	#values (in_description,'Payable',0,abs(Amount_paid) ,in_receiptDateSN);

	#end if;

	-- IF the service amount is equal to the customer account balance (initial deposit amount)
    -- IF after the service amount is deducted, the client is still a debtor,
    
	
	if main_balance  > 0  then
 
		update customer_table set balance= main_balance where acct=in_acct;

		insert into account_entries (acct,dr,cr)
		values (in_acct,0,service_amount);

		insert into transactions1 (description,acct,debit,credit,receiptDateSN)
		values (in_description,in_acct,0,service_amount,in_receiptDateSN);

		insert into transactions1 (description,acct,debit,credit,receiptDateSN)
		values (in_description,'Payable',abs(service_amount),0 ,in_receiptDateSN);
	elseif main_balance < 0 then
		update customer_table set balance= main_balance where acct=in_acct;

		insert into account_entries (acct,dr,cr)
		values (in_acct,service_amount,0);

		insert into transactions1 (description,acct,debit,credit,receiptDateSN)
		values (in_description,in_acct,0,service_amount,in_receiptDateSN);

		if client_balance = 0 then
		insert into transactions1 (description,acct,debit,credit,receiptDateSN)
		values (in_description,'Receivable',abs(service_amount),0 ,in_receiptDateSN);

		-- IF client had some amount in their deposit
	elseif client_balance > 0  then
            
		insert into transactions1 (description,acct,debit,credit,receiptDateSN)
		values (in_description,'payable',abs(client_balance),0 ,in_receiptDateSN);

		insert into transactions1 (description,acct,debit,credit,receiptDateSN)
		values (in_description,'Receivable',abs(receivable),0 ,in_receiptDateSN);
	elseif client_balance < 0  then
            
		insert into transactions1 (description,acct,debit,credit,receiptDateSN)
		values (in_description,'payable',abs(client_balance),0 ,in_receiptDateSN);

		insert into transactions1 (description,acct,debit,credit,receiptDateSN)
		values (in_description,'Receivable',abs(main_balance),0 ,in_receiptDateSN);
	
		end if;
	elseif  main_balance = 0 then
 
		update customer_table set balance= main_balance  where acct=in_acct;

		insert into account_entries (acct,dr,cr)
		values (in_acct,0,service_amount);
		 
		#insert into transactions1 (description,acct,debit,credit,receiptDateSN)
		#values (in_description,'Cash',service_amount,0,in_receiptDateSN);

		insert into transactions1 (description,acct,debit,credit,receiptDateSN)
		values (in_description,in_acct,0,service_amount,in_receiptDateSN);

		insert into transactions1 (description,acct,debit,credit,receiptDateSN)
		values (in_description,'Payable',abs(client_balance),0 ,in_receiptDateSN);

	-- IF the service amount is less the customer account balance
	end if;
	
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `supplier_payment` (IN `in_facId` VARCHAR(50), IN `userId` VARCHAR(50), IN `in_acct` VARCHAR(50), IN `Amount_paid` INT, IN `in_receiptDateSN` VARCHAR(50), IN `in_receiptSN` VARCHAR(50), IN `in_mode_of_payment` VARCHAR(50), IN `sourceAcct` VARCHAR(50), IN `in_description` VARCHAR(100), IN `in_date` DATETIME, IN `in_payables_head` VARCHAR(50))  NO SQL
BEGIN

declare supplier_balance double;
    declare main_balance double;
    DECLARE balance_paid DOUBLE;
    
    select balance into supplier_balance from suppliersinfo where id=in_acct AND facilityId=in_facId;

    set main_balance = supplier_balance-Amount_paid;
    
    update suppliersinfo set balance= main_balance  where id=in_acct AND facilityId=in_facId;
    
    -- we credit supplier entries with the amount paid
     insert into supplier_entries (supplier_id,dr,cr,reference_no,facilityId)
           values (in_acct,0,Amount_paid,in_receiptDateSN,in_facId);
           
      -- We debit cash/bank with the amount paid
      insert into transactions (description,acct,debit,credit,receiptDateSN,receiptNo,modeOfPayment,enteredBy,client_acct,facilityId,createdAt)
           values (in_description,sourceAcct,0,Amount_paid,in_receiptDateSN,in_receiptSN,in_mode_of_payment,userId,in_acct,in_facId,in_date);

		   -- We credit the supplier account with the amount paid
       --    insert into transactions (description,acct,debit,credit,receiptDateSN,receiptNo,modeOfPayment,enteredBy,client_acct,facilityId)
      --     values (in_description,in_acct,0,abs(Amount_paid) ,in_receiptDateSN,in_receiptSN,in_mode_of_payment,userId,in_acct,in_facId);
           
           -- we debit payable account with the amount paid
           insert into transactions (description,acct,debit,credit,receiptDateSN,receiptNo,modeOfPayment,enteredBy,client_acct,facilityId,createdAt)
           values (in_description,in_payables_head,0,abs(Amount_paid) ,in_receiptDateSN,in_receiptSN,in_mode_of_payment,userId,in_acct,in_facId,in_date);

END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `transfer` (IN `transfer_from` VARCHAR(50), IN `transfer_to` VARCHAR(50), IN `amount` INT(11), IN `comment` VARCHAR(500), IN `facId` VARCHAR(50))  BEGIN
    INSERT INTO `transfers`(`amountReceived`,`amountHandedOver`, `transfer_from`, `transfer_to`, `comment`, `facilityId`) VALUES(0,amount,transfer_from,transfer_to,comment,facId);
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `update_client_account` (IN `acc_no` VARCHAR(50), IN `amount` INT, IN `facId` VARCHAR(50))  NO SQL
BEGIN
DECLARE acc_balance int;
SELECT balance into acc_balance from patientfileno WHERE accountNo=acc_no AND facilityId=facId;
UPDATE patientfileno SET balance = acc_balance - amount WHERE accountNo = acc_no AND facilityId=facId;


END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `update_drug` (IN `drugId` VARCHAR(11), IN `drug` VARCHAR(100), IN `generic` VARCHAR(100), IN `expiryDate` VARCHAR(12), IN `qtty` INT(11), IN `price` INT(11), IN `unit_of_issue` VARCHAR(20), IN `reorder_level` VARCHAR(11), IN `expiryAlert` VARCHAR(20), IN `facId` VARCHAR(50))  BEGIN
    UPDATE drugs SET drug=drug,expiry_date=expiryDate,quantity=qtty,price=price,unit_of_issue=unit_of_issue,reorder_level=reorder_level,expiryAlert=expiryAlert,genericName=generic,facilityId=facId WHERE drug_id = drugId;
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `update_drug_qtty` (IN `drugId` VARCHAR(10), IN `qtty` VARCHAR(6), IN `facId` VARCHAR(50))  BEGIN
    UPDATE drugs SET quantity=drugs.quantity - qtty WHERE drug_id=drugId AND facilityId=facId;
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `update_services` (IN `title` VARCHAR(225), IN `description` VARCHAR(225), IN `cost` INT(15), IN `serviceId` INT(11), IN `facId` VARCHAR(50))  BEGIN
   UPDATE services SET title=title,description=description,cost=cost WHERE service_id=serviceId AND facilityId=facId;
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `update_supplier` (IN `supplierId` VARCHAR(50), IN `supp_name` VARCHAR(100), IN `addr` VARCHAR(100), IN `ph` VARCHAR(20), IN `cd` VARCHAR(50), IN `facId` VARCHAR(50))  BEGIN
	UPDATE suppliersinfo SET supplier_name=supp_name, address=addr, phone=ph, code=cd WHERE id=supplierId AND facilityId=facId;
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `update_user` (IN `in_accessTo` VARCHAR(255), IN `in_functionality` VARCHAR(2000), IN `in_id` INT, IN `in_facilityId` VARCHAR(50))  UPDATE users SET accessTo = in_accessTo,functionality = in_functionality WHERE id = in_id AND facilityId = in_facilityId$$

DELIMITER ;

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

--
-- Table structure for table `account`
--

CREATE TABLE `account` (
  `head` varchar(100) CHARACTER SET latin1 NOT NULL,
  `balance` int(11) DEFAULT NULL,
  `subhead` varchar(50) CHARACTER SET latin1 DEFAULT NULL,
  `description` varchar(500) CHARACTER SET latin1 DEFAULT NULL,
  `facilityId` varchar(50) CHARACTER SET latin1 NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `account`
--

INSERT INTO `account` (`head`, `balance`, `subhead`, `description`, `facilityId`) VALUES
('10000', 0, '', 'BINADAM OIL MILLS', 'd8d7a732-1832-4e25-9a98-e68ddc3f0b26'),
('20000', 0, '10000', 'Revenue', 'd8d7a732-1832-4e25-9a98-e68ddc3f0b26'),
('20001', 0, '20000', 'Cotton Seed Cake', 'd8d7a732-1832-4e25-9a98-e68ddc3f0b26'),
('20002', 0, '20000', 'Cutton Seed Oil', 'd8d7a732-1832-4e25-9a98-e68ddc3f0b26'),
('20003', 0, '20000', 'Laundary Soap', 'd8d7a732-1832-4e25-9a98-e68ddc3f0b26'),
('20004', 0, '20000', 'Bath Soap', 'd8d7a732-1832-4e25-9a98-e68ddc3f0b26'),
('20005', 0, '20000', 'P.K.C Cake', 'd8d7a732-1832-4e25-9a98-e68ddc3f0b26'),
('20006', 0, '20000', 'DUSA ALKAMA', 'd8d7a732-1832-4e25-9a98-e68ddc3f0b26'),
('30000', 0, '10000', 'Expenses', 'd8d7a732-1832-4e25-9a98-e68ddc3f0b26'),
('30002', 0, '30000', 'Fueling', 'd8d7a732-1832-4e25-9a98-e68ddc3f0b26'),
('40000', 0, '10000', 'Asset', 'd8d7a732-1832-4e25-9a98-e68ddc3f0b26'),
('40001', 0, '40000', 'Non Current Assets', 'd8d7a732-1832-4e25-9a98-e68ddc3f0b26'),
('400014', 0, '40001', 'Land & Building', 'd8d7a732-1832-4e25-9a98-e68ddc3f0b26'),
('400015', 0, '40001', 'Plant & Machinery', 'd8d7a732-1832-4e25-9a98-e68ddc3f0b26'),
('400016', 0, '40001', 'Motor Vehicle', 'd8d7a732-1832-4e25-9a98-e68ddc3f0b26'),
('400018', 0, '40001', 'Furniture & Fittings', 'd8d7a732-1832-4e25-9a98-e68ddc3f0b26'),
('40002', 0, '40000', 'Current Asset', 'd8d7a732-1832-4e25-9a98-e68ddc3f0b26'),
('400021', 0, '40002', 'Cash', 'd8d7a732-1832-4e25-9a98-e68ddc3f0b26'),
('400022', 0, '40002', 'Bank', 'd8d7a732-1832-4e25-9a98-e68ddc3f0b26'),
('400023', 0, '40002', 'Receivables', 'd8d7a732-1832-4e25-9a98-e68ddc3f0b26'),
('400024', 0, '40002', 'Stocks', 'd8d7a732-1832-4e25-9a98-e68ddc3f0b26'),
('4000241', 0, '400024', 'Stationaries', 'd8d7a732-1832-4e25-9a98-e68ddc3f0b26'),
('400025', 0, '40002', 'Petty Cash', 'd8d7a732-1832-4e25-9a98-e68ddc3f0b26'),
('50000', 0, '10000', 'Equity & Liability', 'd8d7a732-1832-4e25-9a98-e68ddc3f0b26'),
('50001', 0, '50000', 'Equity', 'd8d7a732-1832-4e25-9a98-e68ddc3f0b26'),
('500011', 0, '50001', 'Retained Earnings', 'd8d7a732-1832-4e25-9a98-e68ddc3f0b26'),
('500012', 0, '50001', 'Share Capital', 'd8d7a732-1832-4e25-9a98-e68ddc3f0b26'),
('500013', 0, '50001', 'Accumulated Fund', 'd8d7a732-1832-4e25-9a98-e68ddc3f0b26'),
('50002', 0, '50000', 'Liability', 'd8d7a732-1832-4e25-9a98-e68ddc3f0b26'),
('500021', 0, '50002', 'Payables', 'd8d7a732-1832-4e25-9a98-e68ddc3f0b26');

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

--
-- Table structure for table `account2`
--

CREATE TABLE `account2` (
  `head` varchar(100) CHARACTER SET latin1 NOT NULL,
  `balance` int(11) DEFAULT NULL,
  `subhead` varchar(50) CHARACTER SET latin1 DEFAULT NULL,
  `description` varchar(500) CHARACTER SET latin1 DEFAULT NULL,
  `facilityId` varchar(50) CHARACTER SET latin1 NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `account2`
--

INSERT INTO `account2` (`head`, `balance`, `subhead`, `description`, `facilityId`) VALUES
('10000', 0, '', 'Asymco Pharmac', '6c6af0c0-35ea-40d8-a928-b13a9766113a'),
('10000', 0, '', 'Optimum Diagnostics', '966a89f6-05d8-4564-b319-2f8863821e75'),
('20000', 0, '10000', 'Revenue', '6c6af0c0-35ea-40d8-a928-b13a9766113a'),
('20000', 0, '10000', 'Revenue', '966a89f6-05d8-4564-b319-2f8863821e75'),
('20001', 0, '20000', 'Drug Sales', '6c6af0c0-35ea-40d8-a928-b13a9766113a'),
('20001', 0, '20000', 'Hematology', '966a89f6-05d8-4564-b319-2f8863821e75'),
('20002', 0, '20000', 'Chemical Pathology', '966a89f6-05d8-4564-b319-2f8863821e75'),
('20003', 0, '20000', 'Microbiology', '966a89f6-05d8-4564-b319-2f8863821e75'),
('20004', 0, '20000', 'Radiology', '966a89f6-05d8-4564-b319-2f8863821e75'),
('20005', 0, '20000', 'Other income', '966a89f6-05d8-4564-b319-2f8863821e75'),
('40000', 0, '10000', 'Asset', '6c6af0c0-35ea-40d8-a928-b13a9766113a'),
('40000', 0, '10000', 'Asset', '966a89f6-05d8-4564-b319-2f8863821e75'),
('30001', 0, '30000', 'Cash', '6c6af0c0-35ea-40d8-a928-b13a9766113a'),
('40001', 0, '40000', 'Non Current Assets', '966a89f6-05d8-4564-b319-2f8863821e75'),
('400013', 0, '40001', 'Land & Building', '966a89f6-05d8-4564-b319-2f8863821e75'),
('400015', 0, '40001', 'Plant & Machinery', '966a89f6-05d8-4564-b319-2f8863821e75'),
('400016', 0, '40001', 'Motor Vehicle', '966a89f6-05d8-4564-b319-2f8863821e75'),
('400017', 0, '40001', 'Medical Equipment', '966a89f6-05d8-4564-b319-2f8863821e75'),
('400018', 0, '40001', 'Furniture & Fittings', '966a89f6-05d8-4564-b319-2f8863821e75'),
('30002', 0, '30000', 'Bank', '6c6af0c0-35ea-40d8-a928-b13a9766113a'),
('40002', 0, '40000', 'Current Asset', '966a89f6-05d8-4564-b319-2f8863821e75'),
('400021', 0, '40002', 'Cash', '966a89f6-05d8-4564-b319-2f8863821e75'),
('400022', 0, '40002', 'Bank', '966a89f6-05d8-4564-b319-2f8863821e75'),
('400023', 0, '40002', 'Receivables', '966a89f6-05d8-4564-b319-2f8863821e75'),
('400024', 0, '40002', 'Stocks', '966a89f6-05d8-4564-b319-2f8863821e75'),
('3000241', 0, '300024', 'Stationaries', '966a89f6-05d8-4564-b319-2f8863821e75'),
('3000242', 0, '300024', 'Laboratory consumables', '966a89f6-05d8-4564-b319-2f8863821e75'),
('30003', 0, '30000', 'Receivables', '6c6af0c0-35ea-40d8-a928-b13a9766113a'),
('30003', 0, '30000', 'Petty Cash', '6c6af0c0-35ea-40d8-a928-b13a9766113a'),
('30000', 0, '10000', 'Expenses', '6c6af0c0-35ea-40d8-a928-b13a9766113a'),
('30000', 0, '10000', 'Expenses', '966a89f6-05d8-4564-b319-2f8863821e75'),
('30001', 0, '30000', 'Drug Purchase', '6c6af0c0-35ea-40d8-a928-b13a9766113a'),
('30001', 0, '30000', 'COVID19 expenses', '966a89f6-05d8-4564-b319-2f8863821e75'),
('30003', 0, '30000', 'Depreciation', '966a89f6-05d8-4564-b319-2f8863821e75'),
('30004', 0, '30000', 'Reagent & Other test consumables', '966a89f6-05d8-4564-b319-2f8863821e75'),
('30005', 0, '30000', 'CT Scan expenses', '966a89f6-05d8-4564-b319-2f8863821e75'),
('30006', 0, '30000', 'Electricity expenses', '966a89f6-05d8-4564-b319-2f8863821e75'),
('30007', 0, '30000', 'Office Toiletries & Others', '966a89f6-05d8-4564-b319-2f8863821e75'),
('30008', 0, '30000', 'Repairs & Maint. Equipment', '966a89f6-05d8-4564-b319-2f8863821e75'),
('30009', 0, '30000', 'Other Repairs and Maintainance', '966a89f6-05d8-4564-b319-2f8863821e75'),
('30010', 0, '30000', 'Printing & Stationaries', '966a89f6-05d8-4564-b319-2f8863821e75'),
('30011', 0, '30000', 'Generator Repairs and Maintainance', '966a89f6-05d8-4564-b319-2f8863821e75'),
('30012', 0, '30000', 'Motor vehicle running expenses', '966a89f6-05d8-4564-b319-2f8863821e75'),
('30013', 0, '30000', 'Refund', '966a89f6-05d8-4564-b319-2f8863821e75'),
('30014', 0, '30000', 'Overtime', '966a89f6-05d8-4564-b319-2f8863821e75'),
('30015', 0, '30000', 'Outsourced tests', '966a89f6-05d8-4564-b319-2f8863821e75'),
('30016', 0, '30000', 'Entertainment expenses', '966a89f6-05d8-4564-b319-2f8863821e75'),
('30017', 0, '30000', 'Salaries and wages', '966a89f6-05d8-4564-b319-2f8863821e75'),
('30018', 0, '30000', 'Taxation expenses', '966a89f6-05d8-4564-b319-2f8863821e75'),
('30019', 0, '30000', 'Doctors reporting fees', '966a89f6-05d8-4564-b319-2f8863821e75'),
('30020', 0, '30000', 'Cleaning expenses', '966a89f6-05d8-4564-b319-2f8863821e75'),
('30021', 0, '30000', 'IOU', '966a89f6-05d8-4564-b319-2f8863821e75'),
('30022', 0, '30000', 'Transfer to CT Account', '966a89f6-05d8-4564-b319-2f8863821e75'),
('30023', 0, '30000', 'Telephone & Internet expense', '966a89f6-05d8-4564-b319-2f8863821e75'),
('30024', 0, '30000', 'Bank charges', '966a89f6-05d8-4564-b319-2f8863821e75'),
('30025', 0, '30000', 'Transport and Travelling', '966a89f6-05d8-4564-b319-2f8863821e75'),
('30026', 0, '30000', 'Advertisement and Publicity', '966a89f6-05d8-4564-b319-2f8863821e75'),
('30027', 0, '30000', 'Security expenses', '966a89f6-05d8-4564-b319-2f8863821e75'),
('30028', 0, '30000', 'Generator diesel', '966a89f6-05d8-4564-b319-2f8863821e75'),
('30029', 0, '30000', 'General office expenses', '966a89f6-05d8-4564-b319-2f8863821e75'),
('50000', 0, '10000', 'Liability', '6c6af0c0-35ea-40d8-a928-b13a9766113a'),
('50000', 0, '10000', 'Liability', '966a89f6-05d8-4564-b319-2f8863821e75'),
('50001', 0, '50000', 'Payables', '6c6af0c0-35ea-40d8-a928-b13a9766113a'),
('50001', 0, '50000', 'Payables', '966a89f6-05d8-4564-b319-2f8863821e75'),
('60000', 0, '10000', 'Other Costs', '6c6af0c0-35ea-40d8-a928-b13a9766113a'),
('60001', 0, '60000', 'Returned Drugs', '6c6af0c0-35ea-40d8-a928-b13a9766113a');

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

--
-- Table structure for table `account4`
--

CREATE TABLE `account4` (
  `head` varchar(100) NOT NULL,
  `balance` int(11) DEFAULT NULL,
  `subhead` varchar(50) DEFAULT NULL,
  `description` varchar(500) DEFAULT NULL,
  `facilityId` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `account_asym_old`
--

CREATE TABLE `account_asym_old` (
  `head` varchar(100) CHARACTER SET latin1 NOT NULL,
  `balance` int(11) DEFAULT NULL,
  `subhead` varchar(50) CHARACTER SET latin1 DEFAULT NULL,
  `description` varchar(500) CHARACTER SET latin1 DEFAULT NULL,
  `facilityId` varchar(50) CHARACTER SET latin1 NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `account_asym_old`
--

INSERT INTO `account_asym_old` (`head`, `balance`, `subhead`, `description`, `facilityId`) VALUES
('10000', 0, '', 'Asymco Pharmac', '6c6af0c0-35ea-40d8-a928-b13a9766113a'),
('10000', 0, '', 'Optimum Diagnostics', '966a89f6-05d8-4564-b319-2f8863821e75'),
('20000', 0, '10000', 'Revenue', '6c6af0c0-35ea-40d8-a928-b13a9766113a'),
('20000', 0, '10000', 'Revenue', '966a89f6-05d8-4564-b319-2f8863821e75'),
('20001', 0, '20000', 'Drug Sales', '6c6af0c0-35ea-40d8-a928-b13a9766113a'),
('20001', 0, '20000', 'Hematology', '966a89f6-05d8-4564-b319-2f8863821e75'),
('20002', 0, '20000', 'Chemical Pathology', '966a89f6-05d8-4564-b319-2f8863821e75'),
('20003', 0, '20000', 'Microbiology', '966a89f6-05d8-4564-b319-2f8863821e75'),
('20004', 0, '20000', 'Radiology', '966a89f6-05d8-4564-b319-2f8863821e75'),
('20005', 0, '20000', 'Other income', '966a89f6-05d8-4564-b319-2f8863821e75'),
('30000', 0, '10000', 'Asset', '6c6af0c0-35ea-40d8-a928-b13a9766113a'),
('30000', 0, '10000', 'Asset', '966a89f6-05d8-4564-b319-2f8863821e75'),
('30001', 0, '30000', 'Cash', '6c6af0c0-35ea-40d8-a928-b13a9766113a'),
('30001', 0, '30000', 'Non Current Assets', '966a89f6-05d8-4564-b319-2f8863821e75'),
('300014', 0, '30001', 'Land & Building', '966a89f6-05d8-4564-b319-2f8863821e75'),
('300015', 0, '30001', 'Plant & Machinery', '966a89f6-05d8-4564-b319-2f8863821e75'),
('300016', 0, '30001', 'Motor Vehicle', '966a89f6-05d8-4564-b319-2f8863821e75'),
('300017', 0, '30001', 'Medical Equipment', '966a89f6-05d8-4564-b319-2f8863821e75'),
('300018', 0, '30001', 'Furniture & Fittings', '966a89f6-05d8-4564-b319-2f8863821e75'),
('30002', 0, '30000', 'Bank', '6c6af0c0-35ea-40d8-a928-b13a9766113a'),
('30002', 0, '30000', 'Current Asset', '966a89f6-05d8-4564-b319-2f8863821e75'),
('300021', 0, '30002', 'Cash', '966a89f6-05d8-4564-b319-2f8863821e75'),
('300022', 0, '30002', 'Bank', '966a89f6-05d8-4564-b319-2f8863821e75'),
('300023', 0, '30002', 'Receivables', '966a89f6-05d8-4564-b319-2f8863821e75'),
('300024', 0, '30002', 'Stocks', '966a89f6-05d8-4564-b319-2f8863821e75'),
('3000241', 0, '300024', 'Stationaries', '966a89f6-05d8-4564-b319-2f8863821e75'),
('3000242', 0, '300024', 'Laboratory consumables', '966a89f6-05d8-4564-b319-2f8863821e75'),
('30003', 0, '30000', 'Receivables', '6c6af0c0-35ea-40d8-a928-b13a9766113a'),
('30004', 0, '30000', 'Petty Cash', '6c6af0c0-35ea-40d8-a928-b13a9766113a'),
('40000', 0, '10000', 'Expenses', '6c6af0c0-35ea-40d8-a928-b13a9766113a'),
('40000', 0, '10000', 'Expenses', '966a89f6-05d8-4564-b319-2f8863821e75'),
('50000', 0, '10000', 'Liability', '6c6af0c0-35ea-40d8-a928-b13a9766113a'),
('50000', 0, '10000', 'Liability', '966a89f6-05d8-4564-b319-2f8863821e75'),
('50001', 0, '50000', 'Payables', '6c6af0c0-35ea-40d8-a928-b13a9766113a'),
('50001', 0, '50000', 'Payables', '966a89f6-05d8-4564-b319-2f8863821e75'),
('60000', 0, '10000', 'Other Costs', '6c6af0c0-35ea-40d8-a928-b13a9766113a'),
('60001', 0, '60000', 'Returned Drugs', '6c6af0c0-35ea-40d8-a928-b13a9766113a'),
('40001', 0, '40000', 'Drug Purchase', '6c6af0c0-35ea-40d8-a928-b13a9766113a');

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

--
-- Table structure for table `account_entries`
--

CREATE TABLE `account_entries` (
  `acct` int(11) DEFAULT NULL,
  `dr` int(11) DEFAULT NULL,
  `cr` int(11) DEFAULT NULL,
  `description` varchar(100) NOT NULL,
  `reference_no` varchar(50) NOT NULL,
  `facilityId` varchar(50) NOT NULL,
  `createdAt` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `account_entries`
--

INSERT INTO `account_entries` (`acct`, `dr`, `cr`, `description`, `reference_no`, `facilityId`, `createdAt`) VALUES
(2, -2000, 0, '', '02112011', 'd8d7a732-1832-4e25-9a98-e68ddc3f0b26', '2020-11-02 02:59:14'),
(2, -3000, 0, '', '02112047', 'd8d7a732-1832-4e25-9a98-e68ddc3f0b26', '2020-11-02 03:13:33'),
(3, -40000, 0, '', '02112059', 'd8d7a732-1832-4e25-9a98-e68ddc3f0b26', '2020-11-02 03:21:01'),
(4, 5000, 0, '', '021120611', 'd8d7a732-1832-4e25-9a98-e68ddc3f0b26', '2020-11-02 03:29:34'),
(5, 9000, 0, '', '021120713', 'd8d7a732-1832-4e25-9a98-e68ddc3f0b26', '2020-11-02 03:32:04'),
(5, 20000, 0, 'Deposit from account 5', '021120815', 'd8d7a732-1832-4e25-9a98-e68ddc3f0b26', '2020-11-02 04:13:38'),
(6, 0, 0, 'Deposit from account 6', '031120118', 'd8d7a732-1832-4e25-9a98-e68ddc3f0b26', '2020-11-03 05:56:35'),
(7, 0, 0, 'Deposit from account 7', '031120220', 'd8d7a732-1832-4e25-9a98-e68ddc3f0b26', '2020-11-03 06:19:25'),
(6, 0, 4000, 'HYDROCORTSONE INJ', '031120322', 'd8d7a732-1832-4e25-9a98-e68ddc3f0b26', '2020-11-03 06:25:04');

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

--
-- Stand-in structure for view `account_head`
-- (See below for the actual view)
--
CREATE TABLE `account_head` (
`head` varchar(100)
,`subhead` varchar(50)
,`description` varchar(500)
,`des` varchar(500)
);

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

--
-- Table structure for table `account_opt`
--

CREATE TABLE `account_opt` (
  `head` varchar(100) CHARACTER SET latin1 NOT NULL,
  `balance` int(11) DEFAULT NULL,
  `subhead` varchar(50) CHARACTER SET latin1 DEFAULT NULL,
  `description` varchar(500) CHARACTER SET latin1 DEFAULT NULL,
  `facilityId` varchar(50) CHARACTER SET latin1 NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `account_opt`
--

INSERT INTO `account_opt` (`head`, `balance`, `subhead`, `description`, `facilityId`) VALUES
('10000', 0, '', 'Optimum Diagnostics', '966a89f6-05d8-4564-b319-2f8863821e75'),
('20000', 0, '10000', 'Revenue', '966a89f6-05d8-4564-b319-2f8863821e75'),
('20001', 0, '20000', 'Hematology', '966a89f6-05d8-4564-b319-2f8863821e75'),
('20002', 0, '20000', 'Chemical Pathology', '966a89f6-05d8-4564-b319-2f8863821e75'),
('20003', 0, '20000', 'Microbiology', '966a89f6-05d8-4564-b319-2f8863821e75'),
('20004', 0, '20000', 'Radiology', '966a89f6-05d8-4564-b319-2f8863821e75'),
('20005', 0, '20000', 'Other income', '966a89f6-05d8-4564-b319-2f8863821e75'),
('30000', 0, '10000', 'Expenses', '966a89f6-05d8-4564-b319-2f8863821e75'),
('30001', 0, '30000', 'COVID19 expenses', '966a89f6-05d8-4564-b319-2f8863821e75'),
('30003', 0, '30000', 'Depreciation', '966a89f6-05d8-4564-b319-2f8863821e75'),
('30004', 0, '30000', 'Reagent & Other test consumables', '966a89f6-05d8-4564-b319-2f8863821e75'),
('30005', 0, '30000', 'CT Scan expenses', '966a89f6-05d8-4564-b319-2f8863821e75'),
('30006', 0, '30000', 'Electricity expenses', '966a89f6-05d8-4564-b319-2f8863821e75'),
('30007', 0, '30000', 'Office Toiletries & Others', '966a89f6-05d8-4564-b319-2f8863821e75'),
('30008', 0, '30000', 'Repairs & Maint. Equipment', '966a89f6-05d8-4564-b319-2f8863821e75'),
('30009', 0, '30000', 'Other Repairs and Maintainance', '966a89f6-05d8-4564-b319-2f8863821e75'),
('30010', 0, '30000', 'Printing & Stationaries', '966a89f6-05d8-4564-b319-2f8863821e75'),
('30011', 0, '30000', 'Generator Repairs and Maintainance', '966a89f6-05d8-4564-b319-2f8863821e75'),
('30012', 0, '30000', 'Motor vehicle running expenses', '966a89f6-05d8-4564-b319-2f8863821e75'),
('30013', 0, '30000', 'Refund', '966a89f6-05d8-4564-b319-2f8863821e75'),
('30014', 0, '30000', 'Overtime', '966a89f6-05d8-4564-b319-2f8863821e75'),
('30015', 0, '30000', 'Outsourced tests', '966a89f6-05d8-4564-b319-2f8863821e75'),
('30016', 0, '30000', 'Entertainment expenses', '966a89f6-05d8-4564-b319-2f8863821e75'),
('30017', 0, '30000', 'Salaries and wages', '966a89f6-05d8-4564-b319-2f8863821e75'),
('30018', 0, '30000', 'Taxation expenses', '966a89f6-05d8-4564-b319-2f8863821e75'),
('30019', 0, '30000', 'Doctors reporting fees', '966a89f6-05d8-4564-b319-2f8863821e75'),
('30020', 0, '30000', 'Cleaning expenses', '966a89f6-05d8-4564-b319-2f8863821e75'),
('30021', 0, '30000', 'IOU', '966a89f6-05d8-4564-b319-2f8863821e75'),
('30022', 0, '30000', 'Transfer to CT Account', '966a89f6-05d8-4564-b319-2f8863821e75'),
('30023', 0, '30000', 'Telephone & Internet expense', '966a89f6-05d8-4564-b319-2f8863821e75'),
('30024', 0, '30000', 'Bank charges', '966a89f6-05d8-4564-b319-2f8863821e75'),
('30025', 0, '30000', 'Transport and Travelling', '966a89f6-05d8-4564-b319-2f8863821e75'),
('30026', 0, '30000', 'Advertisement and Publicity', '966a89f6-05d8-4564-b319-2f8863821e75'),
('30027', 0, '30000', 'Security expenses', '966a89f6-05d8-4564-b319-2f8863821e75'),
('30028', 0, '30000', 'Generator diesel', '966a89f6-05d8-4564-b319-2f8863821e75'),
('30029', 0, '30000', 'General office expenses', '966a89f6-05d8-4564-b319-2f8863821e75'),
('40000', 0, '10000', 'Asset', '966a89f6-05d8-4564-b319-2f8863821e75'),
('40001', 0, '40000', 'Non Current Assets', '966a89f6-05d8-4564-b319-2f8863821e75'),
('400014', 0, '40001', 'Land & Building', '966a89f6-05d8-4564-b319-2f8863821e75'),
('400015', 0, '40001', 'Plant & Machinery', '966a89f6-05d8-4564-b319-2f8863821e75'),
('400016', 0, '40001', 'Motor Vehicle', '966a89f6-05d8-4564-b319-2f8863821e75'),
('400017', 0, '40001', 'Medical Equipment', '966a89f6-05d8-4564-b319-2f8863821e75'),
('400018', 0, '40001', 'Furniture & Fittings', '966a89f6-05d8-4564-b319-2f8863821e75'),
('40002', 0, '40000', 'Current Asset', '966a89f6-05d8-4564-b319-2f8863821e75'),
('400021', 0, '40002', 'Cash', '966a89f6-05d8-4564-b319-2f8863821e75'),
('400022', 0, '40002', 'Bank', '966a89f6-05d8-4564-b319-2f8863821e75'),
('400023', 0, '40002', 'Receivables', '966a89f6-05d8-4564-b319-2f8863821e75'),
('400024', 0, '40002', 'Stocks', '966a89f6-05d8-4564-b319-2f8863821e75'),
('4000241', 0, '400024', 'Stationaries', '966a89f6-05d8-4564-b319-2f8863821e75'),
('4000242', 0, '400024', 'Laboratory consumables', '966a89f6-05d8-4564-b319-2f8863821e75'),
('400025', 0, '40002', 'Petty Cash', '966a89f6-05d8-4564-b319-2f8863821e75'),
('50000', 0, '10000', 'Equity & Liability', '966a89f6-05d8-4564-b319-2f8863821e75'),
('50001', 0, '50000', 'Equity', '966a89f6-05d8-4564-b319-2f8863821e75'),
('500011', 0, '50001', 'Retained Earnings', '966a89f6-05d8-4564-b319-2f8863821e75'),
('500012', 0, '50001', 'Share Capital', '966a89f6-05d8-4564-b319-2f8863821e75'),
('500013', 0, '50001', 'Accumulated Fund', '966a89f6-05d8-4564-b319-2f8863821e75'),
('50002', 0, '50000', 'Liability', '966a89f6-05d8-4564-b319-2f8863821e75'),
('500021', 0, '50002', 'Payables', '966a89f6-05d8-4564-b319-2f8863821e75');

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

--
-- Table structure for table `account_type`
--

CREATE TABLE `account_type` (
  `code` int(11) NOT NULL,
  `Category` varchar(40) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `account_type`
--

INSERT INTO `account_type` (`code`, `Category`) VALUES
(1, 'Expenditure'),
(2, 'Revenue'),
(3, 'Assets'),
(4, 'Liability');

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

--
-- Table structure for table `appconfig`
--

CREATE TABLE `appconfig` (
  `appName` varchar(30) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `asset_schedule`
--

CREATE TABLE `asset_schedule` (
  `code` int(11) NOT NULL,
  `description` varchar(100) NOT NULL,
  `cost` int(11) NOT NULL,
  `rate` int(11) NOT NULL,
  `daily_rate` int(11) NOT NULL,
  `purchase_date` date NOT NULL,
  `end_date` date NOT NULL,
  `deduction_date` date DEFAULT NULL,
  `percentage_rate` int(11) NOT NULL,
  `nbv_yearly` int(11) NOT NULL,
  `depreciation` varchar(50) NOT NULL,
  `amortization` varchar(50) NOT NULL,
  `years` int(11) NOT NULL,
  `nbv_monthly` int(11) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `created_by` varchar(50) NOT NULL,
  `facilityId` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `asset_schedule`
--

INSERT INTO `asset_schedule` (`code`, `description`, `cost`, `rate`, `daily_rate`, `purchase_date`, `end_date`, `deduction_date`, `percentage_rate`, `nbv_yearly`, `depreciation`, `amortization`, `years`, `nbv_monthly`, `created_at`, `created_by`, `facilityId`) VALUES
(30004, 'Office Complex', 3000000, 750000, 750000, '2020-10-08', '2024-10-08', NULL, 25, 3000000, '5', '', 5, 250000, '2020-10-08 15:51:35', 'admin', '966a89f6-05d8-4564-b319-2f8863821e75'),
(30005, 'MRI Machine', 50000000, 10000000, 10000000, '2020-10-08', '2025-10-08', NULL, 20, 50000000, '6', '', 6, 4166667, '2020-10-08 15:59:53', 'admin', '966a89f6-05d8-4564-b319-2f8863821e75'),
(30006, 'Toyota HILUX Emergency Vehicle', 12000000, 2400000, 2400000, '2020-10-08', '2025-10-08', NULL, 20, 12000000, '6', '', 6, 1000000, '2020-10-08 21:46:46', 'admin', '966a89f6-05d8-4564-b319-2f8863821e75'),
(400016, 'Toyota HILUX Emergency Vehicle', 400000, 80000, 80000, '2020-10-09', '2025-10-09', NULL, 20, 400000, '6', '', 6, 33333, '2020-10-09 15:24:20', 'admin', '966a89f6-05d8-4564-b319-2f8863821e75'),
(400014, 'Land', 1000000, 200000, 200000, '2020-10-10', '2025-10-10', NULL, 20, 1000000, '6', '', 6, 83333, '2020-10-10 19:08:48', 'admin', '966a89f6-05d8-4564-b319-2f8863821e75'),
(400014, 'Land', 1000000, 200000, 200000, '2020-10-11', '2025-10-11', NULL, 20, 1000000, '6', '', 6, 83333, '2020-10-11 11:17:05', 'admin', '966a89f6-05d8-4564-b319-2f8863821e75'),
(400014, 'Land', 6000000, 1200000, 1200000, '2020-10-11', '2025-10-11', NULL, 20, 6000000, '6', '', 6, 500000, '2020-10-11 13:01:43', 'admin', '966a89f6-05d8-4564-b319-2f8863821e75');

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

--
-- Table structure for table `assignpatient`
--

CREATE TABLE `assignpatient` (
  `diagDate` date NOT NULL,
  `patientNo` varchar(50) NOT NULL,
  `seenBy` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `audit_trail`
--

CREATE TABLE `audit_trail` (
  `facilityId` varchar(50) NOT NULL,
  `id` int(11) NOT NULL DEFAULT 0,
  `drug_name` varchar(100) NOT NULL,
  `supplier_name` varchar(100) DEFAULT NULL,
  `new_supplier_name` varchar(50) NOT NULL,
  `old_dispensary_balance` int(11) NOT NULL,
  `new_dispensary_balance` int(11) NOT NULL,
  `old_markup` int(11) NOT NULL,
  `new_markup` int(11) NOT NULL,
  `updated_by` varchar(50) NOT NULL,
  `deleted_by` varchar(50) NOT NULL,
  `source_table` varchar(50) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `audit_trail`
--

INSERT INTO `audit_trail` (`facilityId`, `id`, `drug_name`, `supplier_name`, `new_supplier_name`, `old_dispensary_balance`, `new_dispensary_balance`, `old_markup`, `new_markup`, `updated_by`, `deleted_by`, `source_table`, `created_at`) VALUES
('6c6af0c0-35ea-40d8-a928-b13a9766113a', 0, 'SALBUTAMOL SYR ', NULL, '', 100, 80, 100, 100, 'pharm_m', '', 'drugpurchaserecords', '2020-10-13 13:47:24'),
('6c6af0c0-35ea-40d8-a928-b13a9766113a', 0, 'Tabs Diazepam', NULL, '', 200, 190, 20, 20, 'pharm_m', '', 'drugpurchaserecords', '2020-10-20 08:28:10'),
('6c6af0c0-35ea-40d8-a928-b13a9766113a', 0, 'Tabs Diazepam', NULL, '', 190, 180, 20, 20, 'pharm_m', '', 'drugpurchaserecords', '2020-10-20 08:30:08'),
('6c6af0c0-35ea-40d8-a928-b13a9766113a', 0, 'Tabs Diazepam', NULL, '', 180, 170, 20, 20, 'pharm_m', '', 'drugpurchaserecords', '2020-10-20 08:31:07'),
('6c6af0c0-35ea-40d8-a928-b13a9766113a', 0, 'Tabs Diazepam', NULL, '', 170, 160, 20, 20, 'pharm_m', '', 'drugpurchaserecords', '2020-10-20 08:32:16'),
('6c6af0c0-35ea-40d8-a928-b13a9766113a', 0, 'Tabs Diazepam', NULL, '', 160, 140, 20, 20, 'pharm_m', '', 'drugpurchaserecords', '2020-10-20 08:33:26'),
('6c6af0c0-35ea-40d8-a928-b13a9766113a', 0, 'Tabs Diazepam', NULL, '', 140, 110, 20, 20, 'pharm_m', '', 'drugpurchaserecords', '2020-10-20 08:34:57'),
('6c6af0c0-35ea-40d8-a928-b13a9766113a', 0, 'Tabs Diazepam', NULL, '', 110, 90, 20, 20, 'pharm_m', '', 'drugpurchaserecords', '2020-10-20 09:30:03'),
('6c6af0c0-35ea-40d8-a928-b13a9766113a', 0, 'Tabs Diazepam', NULL, '', 90, 80, 20, 20, 'pharm_m', '', 'drugpurchaserecords', '2020-10-20 09:38:49'),
('6c6af0c0-35ea-40d8-a928-b13a9766113a', 0, 'Tabs Diazepam', NULL, '', 80, 85, 20, 20, 'pharm_m', '', 'drugpurchaserecords', '2020-10-20 09:39:07'),
('6c6af0c0-35ea-40d8-a928-b13a9766113a', 0, 'SUDREX', NULL, '', 100, 60, 50, 50, 'pharm_m', '', 'drugpurchaserecords', '2020-10-20 09:40:16'),
('6c6af0c0-35ea-40d8-a928-b13a9766113a', 0, 'SUDREX', NULL, '', 60, 70, 50, 50, 'pharm_m', '', 'drugpurchaserecords', '2020-10-20 09:40:31'),
('6c6af0c0-35ea-40d8-a928-b13a9766113a', 0, 'Tabs Diazepam', NULL, '', 85, 80, 20, 20, 'pharm_m', '', 'drugpurchaserecords', '2020-10-20 10:08:51'),
('6c6af0c0-35ea-40d8-a928-b13a9766113a', 0, 'SUDREX', NULL, '', 70, 60, 50, 50, 'pharm_m', '', 'drugpurchaserecords', '2020-10-20 10:09:15'),
('6c6af0c0-35ea-40d8-a928-b13a9766113a', 0, 'Tabs Diazepam', NULL, '', 80, 70, 20, 20, 'pharm_m', '', 'drugpurchaserecords', '2020-10-20 10:09:15'),
('6c6af0c0-35ea-40d8-a928-b13a9766113a', 0, 'SUDREX', NULL, '', 60, 65, 50, 50, 'pharm_m', '', 'drugpurchaserecords', '2020-10-20 10:09:34'),
('6c6af0c0-35ea-40d8-a928-b13a9766113a', 0, 'SUDREX', NULL, '', 65, 5, 50, 50, 'pharm_m', '', 'drugpurchaserecords', '2020-10-20 10:12:02'),
('6c6af0c0-35ea-40d8-a928-b13a9766113a', 0, 'Tabs Diazepam', NULL, '', 70, 40, 20, 20, 'pharm_m', '', 'drugpurchaserecords', '2020-10-20 10:12:03'),
('6c6af0c0-35ea-40d8-a928-b13a9766113a', 0, 'COMPI- CLOX CAPSULE', NULL, '', 100, 95, 20, 20, 'muritala1', '', 'drugpurchaserecords', '2020-10-20 12:38:42'),
('6c6af0c0-35ea-40d8-a928-b13a9766113a', 0, 'COMPI- CLOX CAPSULE', NULL, '', 95, 96, 20, 20, 'muritala1', '', 'drugpurchaserecords', '2020-10-20 12:40:11'),
('6c6af0c0-35ea-40d8-a928-b13a9766113a', 0, 'COMPI- CLOX CAPSULE', NULL, '', 96, 86, 20, 20, 'muritala1', '', 'drugpurchaserecords', '2020-10-20 13:31:53'),
('6c6af0c0-35ea-40d8-a928-b13a9766113a', 0, 'COMPI- CLOX CAPSULE', NULL, '', 86, 76, 20, 20, 'muritala1', '', 'drugpurchaserecords', '2020-10-20 13:32:30'),
('6c6af0c0-35ea-40d8-a928-b13a9766113a', 0, 'COMPI- CLOX CAPSULE', NULL, '', 76, 81, 20, 20, 'muritala1', '', 'drugpurchaserecords', '2020-10-20 13:32:49'),
('6c6af0c0-35ea-40d8-a928-b13a9766113a', 0, 'COMPI- CLOX CAPSULE', NULL, '', 81, 61, 20, 20, 'muritala1', '', 'drugpurchaserecords', '2020-10-20 13:43:36'),
('6c6af0c0-35ea-40d8-a928-b13a9766113a', 0, 'COMPI- CLOX CAPSULE', NULL, '', 61, 66, 20, 20, 'muritala1', '', 'drugpurchaserecords', '2020-10-20 13:44:13'),
('6c6af0c0-35ea-40d8-a928-b13a9766113a', 0, 'Inj Meropenum', NULL, '', 100, 80, 50, 50, 'pharm_m', '', 'drugpurchaserecords', '2020-10-21 13:06:41'),
('6c6af0c0-35ea-40d8-a928-b13a9766113a', 0, 'Inj Meropenum', NULL, '', 80, 50, 50, 50, 'pharm_m', '', 'drugpurchaserecords', '2020-10-21 13:08:08'),
('6c6af0c0-35ea-40d8-a928-b13a9766113a', 0, 'Inj Meropenum', NULL, '', 50, 60, 50, 50, 'pharm_m', '', 'drugpurchaserecords', '2020-10-21 13:08:42'),
('6c6af0c0-35ea-40d8-a928-b13a9766113a', 0, 'Inj Meropenum', NULL, '', 60, 52, 50, 50, 'pharm_m', '', 'drugpurchaserecords', '2020-10-21 13:11:38'),
('6c6af0c0-35ea-40d8-a928-b13a9766113a', 0, 'Inj Meropenum', NULL, '', 52, 45, 50, 50, 'pharm_m', '', 'drugpurchaserecords', '2020-10-21 13:12:30'),
('6c6af0c0-35ea-40d8-a928-b13a9766113a', 0, 'Inj Meropenum', NULL, '', 45, 5, 50, 50, 'pharm_m', '', 'drugpurchaserecords', '2020-10-21 13:13:44'),
('d8d7a732-1832-4e25-9a98-e68ddc3f0b26', 0, 'HYDROCORTSONE INJ', NULL, '', 0, 10, 0, 0, 'admin-user', '', 'drugpurchaserecords', '2020-11-02 14:11:55'),
('d8d7a732-1832-4e25-9a98-e68ddc3f0b26', 0, 'HYDROCORTSONE INJ', NULL, '', 10, 8, 0, 0, 'admin-user', '', 'drugpurchaserecords', '2020-11-03 05:25:03');

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

--
-- Table structure for table `barcode`
--

CREATE TABLE `barcode` (
  `patientId` int(11) NOT NULL,
  `individual_code` int(11) NOT NULL,
  `group_code` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

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

--
-- Table structure for table `chartofaccount`
--

CREATE TABLE `chartofaccount` (
  `code` varchar(3) NOT NULL,
  `head` varchar(100) DEFAULT NULL,
  `subHead` varchar(100) DEFAULT NULL,
  `description` varchar(20) NOT NULL,
  `balance` int(11) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `chartofaccount`
--

INSERT INTO `chartofaccount` (`code`, `head`, `subHead`, `description`, `balance`) VALUES
('CLN', NULL, NULL, 'clinic', 62900),
('LAB', NULL, NULL, 'lab', 0);

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

--
-- Table structure for table `comment`
--

CREATE TABLE `comment` (
  `facilityId` varchar(50) NOT NULL,
  `id` int(100) NOT NULL,
  `booking_no` varchar(100) NOT NULL,
  `user_id` varchar(100) NOT NULL,
  `comment` varchar(4000) NOT NULL,
  `comment_type` varchar(50) NOT NULL,
  `lab_name` varchar(100) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `updated_at` varchar(100) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `comment`
--

INSERT INTO `comment` (`facilityId`, `id`, `booking_no`, `user_id`, `comment`, `comment_type`, `lab_name`, `created_at`, `updated_at`) VALUES
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 1, '1-11-20-1', 'emaitee', 'satisfactory', 'doctors_comment', '3000', '2020-11-01 06:51:58', ''),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 2, '13-11-20-13', 'emaitee', 'Lorem ipsum dolor sit, amet consectetur adipisicing elit. Esse odit totam at debitis expedita quis! Nostrum error autem, labore ullam reprehenderit facilis, maxime repudiandae vel cumque, qui nihil! Adipisci ea nam, minus facilis veniam tempora aut, eaque deleniti laudantium necessitatibus reiciendis maiores illo a perferendis quos suscipit? Earum iure sed voluptatibus vitae nihil voluptate ducimus commodi debitis labore iste, quasi sapiente quod consequuntur cum ratione consectetur minus saepe asperiores suscipit, natus accusamus. Commodi, officia repellat corrupti cupiditate, cum voluptate quidem earum necessitatibus dignissimos quasi ad aliquid itaque animi quo? Alias quos aliquam corrupti! Assumenda dignissimos harum hic ad provident sit.', 'doctors_comment', '3000', '2020-11-01 09:08:52', ''),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 3, '31-11-20-31', 'emaitee', 'All looks good. Patient should be prescribed with more resting medication in order to get a bit more rest. ', 'doctors_comment', '3000', '2020-11-01 12:04:37', '');

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

--
-- Table structure for table `contacts`
--

CREATE TABLE `contacts` (
  `id` char(36) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL,
  `firstname` varchar(255) DEFAULT NULL,
  `lastname` varchar(255) DEFAULT NULL,
  `message` varchar(255) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `daily_register`
--

CREATE TABLE `daily_register` (
  `code` int(11) NOT NULL,
  `day` date NOT NULL,
  `amount` int(11) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `created_by` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `diagnosis`
--

CREATE TABLE `diagnosis` (
  `facilityId` varchar(50) NOT NULL,
  `vital_weight` varchar(10) DEFAULT NULL,
  `vital_height` varchar(10) DEFAULT NULL,
  `headcircumference` varchar(50) DEFAULT NULL,
  `muac` varchar(50) DEFAULT NULL,
  `tempreture` varchar(10) DEFAULT NULL,
  `pulse` varchar(10) DEFAULT NULL,
  `bloodpressure` varchar(15) DEFAULT NULL,
  `respiratory` varchar(15) DEFAULT NULL,
  `nutrition` varchar(50) DEFAULT NULL,
  `immunization` varchar(200) DEFAULT NULL,
  `development` varchar(200) DEFAULT NULL,
  `pbnh` varchar(200) DEFAULT NULL,
  `generalexamination` varchar(500) DEFAULT NULL,
  `cvs` varchar(50) DEFAULT NULL,
  `cns` varchar(50) DEFAULT NULL,
  `mss` varchar(50) DEFAULT NULL,
  `abdomen` varchar(50) DEFAULT NULL,
  `problem1` varchar(2000) DEFAULT NULL,
  `problem2` varchar(2000) DEFAULT NULL,
  `problem3` varchar(2000) DEFAULT NULL,
  `problem4` varchar(2000) DEFAULT NULL,
  `problem5` varchar(2000) DEFAULT NULL,
  `provisionalDiagnosis1` varchar(2000) DEFAULT NULL,
  `provisionalDiagnosis2` varchar(2000) DEFAULT NULL,
  `provisionalDiagnosis3` varchar(2000) DEFAULT NULL,
  `provisionalDiagnosis4` varchar(2000) DEFAULT NULL,
  `provisionalDiagnosis5` varchar(2000) DEFAULT NULL,
  `addedcare` varchar(2000) DEFAULT NULL,
  `partToDress` varchar(500) DEFAULT NULL,
  `dresswith` varchar(500) DEFAULT NULL,
  `seen_by` varchar(50) DEFAULT NULL,
  `patient_id` varchar(50) NOT NULL,
  `date` datetime DEFAULT current_timestamp(),
  `status` varchar(50) DEFAULT NULL,
  `appointment_date` datetime DEFAULT NULL,
  `comment` varchar(150) DEFAULT NULL,
  `pastSurgicalHistory` varchar(500) DEFAULT NULL,
  `social` varchar(400) DEFAULT NULL,
  `otherSocialHistory` varchar(2000) DEFAULT NULL,
  `obtsGyneaHistory` varchar(2000) DEFAULT NULL,
  `pasttMedicalHistory` varchar(2000) DEFAULT NULL,
  `allergy` varchar(60) DEFAULT NULL,
  `otherAllergies` varchar(2000) DEFAULT NULL,
  `drugHistory` varchar(2000) DEFAULT NULL,
  `otherSysExamination` varchar(2000) DEFAULT NULL,
  `respiratoryRate` varchar(20) DEFAULT NULL,
  `athropometry_height` varchar(10) DEFAULT NULL,
  `presenting_complaints` varchar(4000) DEFAULT NULL,
  `athropometry_weight` varchar(10) DEFAULT NULL,
  `id` int(11) NOT NULL,
  `BMR` varchar(5) DEFAULT NULL,
  `BVR` varchar(5) DEFAULT NULL,
  `LLL` varchar(5) DEFAULT NULL,
  `RLL` varchar(5) DEFAULT NULL,
  `LUL` varchar(5) DEFAULT NULL,
  `RUL` varchar(5) NOT NULL,
  `management_plan` varchar(2000) DEFAULT NULL,
  `asthmatic` varchar(5) DEFAULT NULL,
  `dehydration` varchar(20) DEFAULT NULL,
  `diabetic` varchar(5) DEFAULT NULL,
  `diabeticRegularOnMedication` varchar(50) DEFAULT NULL,
  `hypertensive` varchar(5) DEFAULT NULL,
  `hypertensiveDuration` varchar(50) DEFAULT NULL,
  `eye_opening` varchar(5) DEFAULT NULL,
  `others` varchar(50) DEFAULT NULL,
  `palor` varchar(5) DEFAULT NULL,
  `pastMedicalHistory` varchar(200) DEFAULT NULL,
  `observation_request` varchar(2000) DEFAULT NULL,
  `hypertensiveRegularOnMedication` varchar(50) DEFAULT NULL,
  `optimalSugarControl` varchar(50) DEFAULT NULL,
  `drugAllergy` varchar(50) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `diagnosis`
--

INSERT INTO `diagnosis` (`facilityId`, `vital_weight`, `vital_height`, `headcircumference`, `muac`, `tempreture`, `pulse`, `bloodpressure`, `respiratory`, `nutrition`, `immunization`, `development`, `pbnh`, `generalexamination`, `cvs`, `cns`, `mss`, `abdomen`, `problem1`, `problem2`, `problem3`, `problem4`, `problem5`, `provisionalDiagnosis1`, `provisionalDiagnosis2`, `provisionalDiagnosis3`, `provisionalDiagnosis4`, `provisionalDiagnosis5`, `addedcare`, `partToDress`, `dresswith`, `seen_by`, `patient_id`, `date`, `status`, `appointment_date`, `comment`, `pastSurgicalHistory`, `social`, `otherSocialHistory`, `obtsGyneaHistory`, `pasttMedicalHistory`, `allergy`, `otherAllergies`, `drugHistory`, `otherSysExamination`, `respiratoryRate`, `athropometry_height`, `presenting_complaints`, `athropometry_weight`, `id`, `BMR`, `BVR`, `LLL`, `RLL`, `LUL`, `RUL`, `management_plan`, `asthmatic`, `dehydration`, `diabetic`, `diabeticRegularOnMedication`, `hypertensive`, `hypertensiveDuration`, `eye_opening`, `others`, `palor`, `pastMedicalHistory`, `observation_request`, `hypertensiveRegularOnMedication`, `optimalSugarControl`, `drugAllergy`) VALUES
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '70', '1.64', '1.23', '33', '34', '23', '33', '41', 'cleared', 'cleared', 'properly developed', '', '', '12', '22', '', '11', 'headache', 'stomachache', '', '', '', 'medicine for fever', 'diagnosed with catarrh and cough', '', '', '', '', 'undefined', 'undefined', 'aminu', '', '2018-11-18 00:00:00', '', '2019-12-12 00:00:00', '', 'nothing much', 'married', 'celebrity', '', '', 'foodstuff', 'no problem', 'no past record', '', '11', '1.78', NULL, '70', 28, '3', '', '4/5', '3/5', '', '1/5', 'null', 'no', '+2', 'no', NULL, 'no', NULL, '2', 'no others', '+1', 'cleared', 'null', NULL, NULL, NULL),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '68', '1.76', '2.3', '2.132', '31', '12', '22', '23', 'well taken care of', 'immunized', 'well developed', '', '', '22', '42', '', '3.22', 'toothache', '', '', '', '', 'diagnosed with Newcastle disease', '', '', '', '', '', 'undefined', 'undefined', 'aminu', '5196', '2018-11-18 00:00:00', '', '2019-12-12 00:00:00', '', '', 'smoking', '', '', '', 'foodstuff', 'no other', 'not an addict', '', '23', '1.7', NULL, '68', 29, '4', '', '5/5', '4/5', '', '4/5', 'null', 'no', '+2', 'no', NULL, 'no', NULL, '2', '', '+3', 'cleared', 'to be observed for 2 weeks', NULL, NULL, NULL),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '80', '123', '12.5', '44', '45', '44', '34', '', '', 'proper', '', '', '', '', '', '', '', 'running stomach', '', '', '', '', '', '', '', '', '', '', 'undefined', 'undefined', 'aminu', '392-3', '2018-11-25 00:00:00', '', '2019-12-12 00:00:00', '', '', 'married', 'none', '', '', 'flower', '', 'non addict', '', '122', '123', NULL, '90', 37, '3', '', '4/5', '1/5', '', '5/5', 'null', 'no', '+1', 'no', NULL, 'yes', NULL, '3', '', '+2', 'none', 'nothing ', NULL, NULL, NULL),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '22', '44', 'dsfa', 'fsda', '22', '23', '44', '', 'dsf', 'fdsa', 'fsad', 'safdc', '', 'asf', '', 'fsa', 'aefsd', 'asdf', '', 'fasd', '', 'asfd', 'asfd', 'sadf', 'sfad', 'sdfa', 'fasd', NULL, 'fsadx', 'sdfdfgdfs', 'doctor', '392-2', '2019-12-29 01:33:27', NULL, NULL, NULL, 'fsda', ',alcohol', '', '', NULL, ',foodstuff', '', '', '', '32', 'fsad', NULL, 'sfadf', 55, '0', NULL, '0', '0', NULL, '0', 'undefined', '', 'sdaf', '', 'null', '', 'null', '0', 'asfd', 'asdf', 'asdfzXC', 'undefined', NULL, NULL, NULL),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '44', '35', 'head circumference', 'muca', '33', '32', '12', '12', 'nutrition', 'immunization', 'developmental  history', 'pregnancy', '', '12', 'cns', '112', '21', 'Problems 1', 'Problems to', 'Problems 3', 'Problems for', 'Problem 5', 'diagnosis 1 ', '2', '3', '4', '5', NULL, 'part to dress', 'drss', 'doctor', '329-2', '2019-12-31 12:35:23', NULL, NULL, NULL, 'asdf', ',married,smoking,alcohol', 'other social history', '', NULL, ',foodstuff,flower,dust,drugs', 'alergies', 'drug history', 'others', '232', 'high;len', NULL, 'wegith', 57, '2', NULL, '04', '04', NULL, '4', 'undefined', 'no', '22', 'yes', 'yes', 'yes', '2 months', '4', 'thesr', '12', 'test', 'undefined', NULL, NULL, NULL),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '332', '212', 'head circumference', 'muac', '22', '33', '23', '12', 'nutritions', 'dfgsf', 'developemental', 'pregnancy birth', '', '34', '32', '23', '22', '1', '2', '3', '4', '5', '1', '2', '3', '4', '5', NULL, 'part to dress', 'dress with', 'doctor', '329-2', '2019-12-31 18:38:36', NULL, NULL, NULL, 'dfgs', ',alcohol', 'dfsd', 'fds', NULL, ',flower', 'fdgsf', 'dfssdg', '65', '12', 'height', NULL, 'weight', 58, '01', NULL, '01', '01', NULL, '01', 'undefined', 'yes', '22', 'yes', 'yes', 'yes', '2months', '01', 'dfgas', '345', 'dfsdfas', 'undefined', NULL, NULL, NULL),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', '', 'rest', 'sdzfsd', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', NULL, '', '', 'doctor', '329-2', '2019-12-31 19:55:16', 'seen', NULL, NULL, '', '', '', '', NULL, '', '', '', '', '', 'aserd', NULL, 'test', 59, '0', NULL, '0', '0', NULL, '0', 'undefined', '', '', '', 'null', '', 'null', '0', '', '', '', 'undefined', NULL, NULL, NULL),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '24', '34', 'qwsa', '', '2', '123', '12', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', NULL, '', '', 'doctor', '329-2', '2020-01-06 17:24:08', 'seen', NULL, NULL, '', '', '', '', NULL, '', '', '', '', '23', '', NULL, 'wert', 60, '0', NULL, '0', '0', NULL, '0', 'undefined', '', '', '', 'null', '', 'null', '0', '', '', '', '', NULL, NULL, NULL),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', NULL, '', '', 'doctor', '3608-1', '2020-01-06 19:16:11', 'seen', NULL, NULL, '', '', '', '', NULL, '', '', '', '', '', '', NULL, '', 61, '0', NULL, '0', '0', NULL, '0', 'undefined', '', '', '', 'null', '', 'null', '0', '', '', '', '', NULL, NULL, NULL),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', NULL, 'more', 'dressing', 'doctor', '3608-1', '2020-01-06 19:24:56', 'seen', NULL, NULL, '', '', '', '', NULL, '', '', '', '', '', '', NULL, '', 62, '0', NULL, '0', '0', NULL, '0', 'undefined', '', '', '', 'null', '', 'null', '0', '', '', '', '', NULL, NULL, NULL),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', NULL, '', '', 'doctor', '3574-1', '2020-01-07 07:11:01', 'seen', NULL, NULL, '', '', '', '', NULL, '', '', '', '', '', '', NULL, '', 63, '0', NULL, '0', '0', NULL, '0', 'undefined', '', '', '', 'null', '', 'null', '0', '', '', '', '', NULL, NULL, NULL),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', NULL, '', '', 'doctor', '329-2', '2020-01-07 07:17:33', 'seen', NULL, NULL, '', '', '', '', NULL, '', '', '', '', '', '', NULL, '', 64, '0', NULL, '0', '0', NULL, '0', 'undefined', '', '', '', 'null', '', 'null', '0', '', '', '', '', NULL, NULL, NULL),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'yep', '', '', '', '', '', '', '', '', '', NULL, '', '', 'doctor', '3575-1', '2020-01-07 07:36:45', 'seen', NULL, NULL, '', '', '', '', NULL, '', '', '', '', '', '', NULL, '', 65, '0', NULL, '0', '0', NULL, '0', 'undefined', '', '', '', 'null', '', 'null', '0', '', '', '', '', NULL, NULL, NULL),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', NULL, '', '', 'doctor', '3580-1', '2020-01-07 07:52:08', 'seen', NULL, NULL, '', '', '', '', NULL, '', '', '', '', '', '', 'undefined', '', 66, '0', NULL, '0', '0', NULL, '0', 'undefined', '', '', '', 'null', '', 'null', '0', '', '', '', '', NULL, NULL, NULL),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', NULL, '', '', 'doctor', '3581-1', '2020-01-07 07:56:35', 'seen', NULL, NULL, '', '', '', '', NULL, '', '', '', '', '', '', 'ao sososos (asdfasfd)', '', 67, '0', NULL, '0', '0', NULL, '0', 'undefined', '', '', '', 'null', '', 'null', '0', '', '', '', '', NULL, NULL, NULL),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', NULL, '', '', 'doctor', '3587-1', '2020-02-21 16:42:17', 'seen', NULL, NULL, '', '', '', '', NULL, '', '', '', '', '', '', '', '', 68, '0', NULL, '0', '0', NULL, '0', 'undefined', '', '', '', NULL, '', 'null', '0', '', '', '', '', 'null', 'null', ''),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '78', '186', '', '', '37.3', '70', '120/80', 'resp', '', '', '', '', '', 'cvs', 'cns', '', 'abd', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', NULL, '', '', 'abdurrahman', '3742-1', '2020-03-14 14:31:31', 'seen', NULL, NULL, 'Past surgical', ',smoking,alcohol', '', '', NULL, ',foodstuff,drugs', 'none', '', '', '20', '', 'ghgj, (history 1),presenting (History2)', '', 69, '5', NULL, '2', '3', NULL, '4', 'undefined', 'yes', 'dehydr', 'yes', NULL, 'yes', '3 years', '3', '', 'palor', 'past medical', '', 'no', 'no', '');

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

--
-- Table structure for table `dieselrefuel`
--

CREATE TABLE `dieselrefuel` (
  `id` int(11) NOT NULL,
  `createdAt` datetime DEFAULT current_timestamp(),
  `gen` varchar(11) DEFAULT NULL,
  `quantity` varchar(11) DEFAULT NULL,
  `facilityId` varchar(50) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `dieselrefuel`
--

INSERT INTO `dieselrefuel` (`id`, `createdAt`, `gen`, `quantity`, `facilityId`) VALUES
(1, '2019-12-24 00:00:00', 'Gen2', '25', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
(2, '2019-12-24 00:00:00', 'Gen1', '34', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
(3, '2019-12-25 00:00:00', 'Gen2', '34', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
(4, '2019-12-25 00:00:00', 'Gen1', '80', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a');

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

--
-- Table structure for table `dieselusage`
--

CREATE TABLE `dieselusage` (
  `id` int(11) NOT NULL,
  `createdAt` datetime DEFAULT current_timestamp(),
  `gen` varchar(10) DEFAULT NULL,
  `time_started` time DEFAULT NULL,
  `time_stopped` time DEFAULT NULL,
  `facilityId` varchar(50) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `dieselusage`
--

INSERT INTO `dieselusage` (`id`, `createdAt`, `gen`, `time_started`, `time_stopped`, `facilityId`) VALUES
(1, '2019-12-22 00:00:00', 'gen1', '12:12:12', '17:45:23', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
(2, '2019-12-24 00:00:00', 'Gen2', '22:12:00', '23:45:00', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
(3, '2019-12-24 00:00:00', 'Gen1', '22:12:00', '22:12:00', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
(4, '2019-12-24 00:00:00', 'Gen1', '22:12:00', '22:12:00', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
(5, '2019-12-25 00:00:00', 'Gen2', '10:12:00', '10:12:00', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
(6, '2019-12-25 00:00:00', 'Gen1', '17:12:00', '17:12:00', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a');

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

--
-- Table structure for table `dispensary`
--

CREATE TABLE `dispensary` (
  `drug` varchar(40) DEFAULT NULL,
  `dosage` varchar(40) DEFAULT NULL,
  `quantity_dispensed` int(11) DEFAULT NULL,
  `unit_of_issue` varchar(20) DEFAULT NULL,
  `price` int(11) NOT NULL,
  `amount` varchar(11) DEFAULT NULL,
  `discount` varchar(50) NOT NULL,
  `total` int(50) NOT NULL,
  `patient_id` varchar(11) DEFAULT NULL,
  `id` int(11) NOT NULL,
  `receiptNo` varchar(11) DEFAULT NULL,
  `facilityId` varchar(50) NOT NULL,
  `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  `dispensed_by` varchar(50) DEFAULT NULL,
  `prescribed_by` varchar(50) DEFAULT NULL,
  `duration` varchar(20) DEFAULT NULL,
  `period` varchar(20) DEFAULT NULL,
  `frequency` varchar(20) DEFAULT NULL,
  `receipt_no` varchar(50) DEFAULT NULL,
  `expiry_date` date DEFAULT NULL,
  `status` varchar(20) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `doctor_entries`
--

CREATE TABLE `doctor_entries` (
  `doc_acct` int(11) DEFAULT NULL,
  `dr` int(11) DEFAULT NULL,
  `cr` int(11) DEFAULT NULL,
  `reference_no` varchar(50) CHARACTER SET utf8 NOT NULL,
  `facilityId` varchar(50) CHARACTER SET utf8 NOT NULL,
  `createdAt` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

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

--
-- Table structure for table `druglist`
--

CREATE TABLE `druglist` (
  `id` int(11) NOT NULL,
  `name` varchar(50) NOT NULL,
  `generic_name` varchar(50) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `druglist`
--

INSERT INTO `druglist` (`id`, `name`, `generic_name`, `created_at`) VALUES
(4, 'Ceftriaxone', NULL, '0000-00-00 00:00:00'),
(5, 'Ceftriaxone', NULL, '0000-00-00 00:00:00'),
(6, 'Tabs Pregabalin 75mg', NULL, '0000-00-00 00:00:00'),
(7, 'Tabs Eproxen', NULL, '0000-00-00 00:00:00'),
(8, 'Inj Ondasetron', NULL, '0000-00-00 00:00:00'),
(9, 'Inj Traxemic', NULL, '0000-00-00 00:00:00'),
(10, 'Calcium Sandox', NULL, '0000-00-00 00:00:00'),
(11, 'Tab Fleming 625mg', NULL, '0000-00-00 00:00:00'),
(12, 'Syr Antabon ', NULL, '0000-00-00 00:00:00'),
(13, 'Tab Lonart DS', NULL, '0000-00-00 00:00:00'),
(14, 'Susp Lactulose', NULL, '0000-00-00 00:00:00'),
(15, 'Inj Rocephin 1000gm', NULL, '0000-00-00 00:00:00'),
(16, 'Syr Cencold', NULL, '0000-00-00 00:00:00'),
(17, 'Tab Omeprazole 20mg', NULL, '0000-00-00 00:00:00'),
(18, 'Emal iv', 'Arthemeter', '0000-00-00 00:00:00'),
(19, 'Emal iv', 'Arthemeter', '0000-00-00 00:00:00'),
(20, 'Emal iv', 'Arthemeter', '0000-00-00 00:00:00'),
(21, 'Emal iv', 'Arthemeter', '0000-00-00 00:00:00'),
(22, 'Emal iv', 'Arthemeter', '0000-00-00 00:00:00'),
(23, 'Artesunate iv', 'Artesun', '0000-00-00 00:00:00'),
(24, 'Act', 'Arthemeter', '0000-00-00 00:00:00'),
(25, 'Cocodamol tabs', 'Analgesic', '0000-00-00 00:00:00'),
(26, 'Anorol tabs', 'Analgesic', '0000-00-00 00:00:00'),
(27, 'Ketrolac', 'Analgesic', '0000-00-00 00:00:00'),
(28, 'Tabs Baclofen', 'Analgesic', '0000-00-00 00:00:00'),
(29, 'Diclofenec tabs', 'Analgesic', '0000-00-00 00:00:00'),
(30, 'Pcm tabs', 'Analgesic ', '0000-00-00 00:00:00'),
(31, 'Inflanil tabs', 'Analgesic', '0000-00-00 00:00:00'),
(32, 'Penta iv', 'Analgesic', '0000-00-00 00:00:00'),
(33, 'Tramadol injection', 'Analgesic ', '0000-00-00 00:00:00'),
(34, 'Diclofenac iv', 'Analgesic', '0000-00-00 00:00:00'),
(35, 'Pcm iv ', 'Analgesic ', '0000-00-00 00:00:00'),
(36, 'Loratidine tabs', 'Anti Histamine', '0000-00-00 00:00:00'),
(37, 'Tabs prednisolone', 'Histamine', '0000-00-00 00:00:00'),
(38, 'Tabs piriton', 'Histamine', '0000-00-00 00:00:00'),
(39, 'Otrivine nasal', 'Histamine', '0000-00-00 00:00:00'),
(40, 'Ventolin inhaler', 'Histamine', '0000-00-00 00:00:00'),
(41, 'Xylo Acino', 'Histamine ', '0000-00-00 00:00:00'),
(42, 'Tabs Actified', 'Histamine', '0000-00-00 00:00:00'),
(43, 'Nystatin susp', 'Histamines ', '0000-00-00 00:00:00'),
(44, 'Dicynon iv', 'Histamines ', '0000-00-00 00:00:00'),
(45, 'Tabs Rebeprazole', 'GIT', '0000-00-00 00:00:00'),
(46, 'Tabs Rebeprazole', 'GIT', '0000-00-00 00:00:00'),
(47, 'Ranitidine tabs', 'GIT', '0000-00-00 00:00:00'),
(48, 'Floranum ', 'GIT', '0000-00-00 00:00:00'),
(49, 'Domperidone tabs', 'GIT ', '0000-00-00 00:00:00'),
(50, 'Injection Omeprazole', 'GIT', '0000-00-00 00:00:00'),
(51, 'Inj Rebeprazole ', 'GIT', '0000-00-00 00:00:00'),
(52, 'Tabs Albendazole', 'GIT', '0000-00-00 00:00:00'),
(53, 'Tabs Buscopan', 'GIT', '0000-00-00 00:00:00'),
(54, 'Tabs Dulcolax', 'GIT', '0000-00-00 00:00:00'),
(55, 'Tabs zinc sulphate', 'GIT', '0000-00-00 00:00:00'),
(56, 'Tabs navidoxime', 'GIT', '0000-00-00 00:00:00'),
(57, 'Tabs metoclopromide', 'GIT', '0000-00-00 00:00:00'),
(58, 'Tabs Ondasectron', 'GIT', '0000-00-00 00:00:00'),
(59, 'Inj metoclopromide', 'GIT', '0000-00-00 00:00:00'),
(60, 'Inj Ondasectron', 'GIT', '0000-00-00 00:00:00'),
(61, 'Inj promethazine', 'GIT', '0000-00-00 00:00:00'),
(62, 'Tabs Tegretol', 'Anti convulsant', '0000-00-00 00:00:00'),
(63, 'Calamine lotion', 'Anti conversant ', '0000-00-00 00:00:00'),
(64, 'Tabs phenytoin', 'Anti convulsant', '0000-00-00 00:00:00'),
(65, 'Tabs neurobion', 'Multivite', '0000-00-00 00:00:00'),
(66, 'Vit c tabs', 'Multivite', '0000-00-00 00:00:00'),
(67, 'Vit E tabs', 'Multivite', '0000-00-00 00:00:00'),
(68, 'Neurotex tabs', 'Multivite', '0000-00-00 00:00:00'),
(69, 'Tabs vit A', 'Multivite', '0000-00-00 00:00:00'),
(70, 'Maxiron capsule', 'Multivite', '0000-00-00 00:00:00'),
(71, 'Calcimax tabs', 'Multivite', '0000-00-00 00:00:00'),
(72, 'Tabs Metoprolol', 'Anti HTN', '0000-00-00 00:00:00'),
(73, 'Tabs lisinopril', 'Anti HTN', '0000-00-00 00:00:00'),
(74, 'Bendro tabs', 'Anti HTN', '0000-00-00 00:00:00'),
(75, 'Bendro 5mg', 'Anti HTN', '0000-00-00 00:00:00'),
(76, 'Losartan tabs', 'Anti HTN', '0000-00-00 00:00:00'),
(77, 'Tabs Torsmide', 'Anti HTN', '0000-00-00 00:00:00'),
(78, 'Tabs Amlozaar', 'Anti HTN', '0000-00-00 00:00:00'),
(79, 'Amlodipine tabs 5mg', 'Anti HTN', '0000-00-00 00:00:00'),
(80, 'Amlodipine tabs 10mg', 'Anti HTN', '0000-00-00 00:00:00'),
(81, 'Peridopril', 'Anti HTN', '0000-00-00 00:00:00'),
(82, 'Tabs Nifidipine', 'Anti HTN', '0000-00-00 00:00:00'),
(83, 'Tabs vasoprin', 'Anti HTN', '0000-00-00 00:00:00'),
(84, 'Pradaxa tabs ', 'Dabigatrin/ Anti Embolism', '0000-00-00 00:00:00'),
(85, 'Chymoral tabs', 'Chymotrypcin/Embolism', '0000-00-00 00:00:00'),
(86, 'Tabs Lexotan ', 'Embolism', '0000-00-00 00:00:00'),
(87, 'Tabs Diazepam', 'Anti Embolism', '0000-00-00 00:00:00'),
(88, 'Tabs Acetazolamide', 'Añxiolytic', '0000-00-00 00:00:00'),
(89, 'Inj Dexametheson', 'Anti Embolism', '0000-00-00 00:00:00'),
(90, 'Iv flagyl', 'Ant Biotic', '0000-00-00 00:00:00'),
(91, 'Iv Augmenting ', 'Anti Biotic', '0000-00-00 00:00:00'),
(92, 'Iv Tavanic', 'Anti Boitic', '0000-00-00 00:00:00'),
(93, 'Inj Meropenum', 'AntiBiotic', '0000-00-00 00:00:00'),
(94, 'Inj Gentamycin', 'Anti Boitic', '0000-00-00 00:00:00'),
(95, 'Iv ciprofloxacin', 'Anti Boitic', '0000-00-00 00:00:00'),
(96, 'Tabs ciprofloxacin', 'Anti Boitic', '0000-00-00 00:00:00'),
(97, 'Tabs flagyl', 'Anti Biotic', '0000-00-00 00:00:00'),
(98, 'Tabs Clarithromycin', 'Anti Biotic', '0000-00-00 00:00:00'),
(99, 'Tabs Clindamycin', 'Anti Biotic', '0000-00-00 00:00:00'),
(100, 'Tabs Cefixime', 'Anti Boitic', '0000-00-00 00:00:00'),
(101, 'Tabs Augmenting 625', 'Anti Biotic', '0000-00-00 00:00:00'),
(102, 'Tabs Levofloxacin ', 'Anti Biotic', '0000-00-00 00:00:00'),
(103, 'Tabs Amoxicillin', 'Anti Biotic', '0000-00-00 00:00:00'),
(104, 'Tabs Ampiclox', 'Anti Biotic', '0000-00-00 00:00:00'),
(105, 'Tabs Cefuroxime', 'Anti Biotic', '0000-00-00 00:00:00'),
(106, 'Tabs Azithromycin', 'Anti Biotic', '0000-00-00 00:00:00'),
(107, 'Tabs Ofloxacin', 'Anti Biotic', '0000-00-00 00:00:00'),
(108, 'Relcer gel susp', 'GIT', '0000-00-00 00:00:00'),
(109, 'Acipep susp', 'GIT', '0000-00-00 00:00:00'),
(110, 'Inj Aminophylline', 'Aminophy', '0000-00-00 00:00:00'),
(111, 'Inj piriton', 'Anti Histamine ', '0000-00-00 00:00:00'),
(112, 'Inj Hyoscin', 'Hyocin', '0000-00-00 00:00:00'),
(113, 'Inj Frusemide', 'Lasix', '0000-00-00 00:00:00'),
(114, 'Inj Andrenaline', 'Andr', '0000-00-00 00:00:00'),
(115, 'Inj B12', 'Multivit', '0000-00-00 00:00:00'),
(116, 'Inj B-Complex', 'Vitamines', '0000-00-00 00:00:00'),
(117, 'Inj Hydrocotisine', 'Hydrocot', '0000-00-00 00:00:00'),
(118, 'B-Complex syr', 'Vitamine', '0000-00-00 00:00:00'),
(119, 'Menthodex syr', 'Anti Histamine', '0000-00-00 00:00:00'),
(120, 'Broncholyte syr', 'Anti Histamine', '0000-00-00 00:00:00'),
(121, 'Loratidine syr', 'Anti Histamine', '0000-00-00 00:00:00'),
(122, 'Cefixime syr', 'Anti Biotic', '0000-00-00 00:00:00'),
(123, 'Cefuroxime syr', 'Anti Biotic', '0000-00-00 00:00:00'),
(124, 'Allergin syr', 'Piriton', '0000-00-00 00:00:00'),
(125, 'Albendazole syr', 'GIT', '0000-00-00 00:00:00'),
(126, 'Liquid parafin', 'GIT', '0000-00-00 00:00:00'),
(127, 'Pcm syr', 'Analgesic ', '0000-00-00 00:00:00'),
(128, 'Brustan N syr', 'Analgesic ', '0000-00-00 00:00:00'),
(129, 'Promethazine Syr', 'Prometh', '0000-00-00 00:00:00'),
(130, 'Erythromycin Syr', 'Anti Biotic', '0000-00-00 00:00:00'),
(131, 'Vitamine C', 'Multivite', '0000-00-00 00:00:00'),
(132, 'Cencold Syr', 'Analgesic ', '0000-00-00 00:00:00'),
(133, 'Albendazole syr', NULL, '0000-00-00 00:00:00'),
(134, 'BONABEBE', 'BONABEBE', '0000-00-00 00:00:00'),
(135, 'PANDA COLD DROP', 'PANDA COLD', '0000-00-00 00:00:00'),
(136, 'BRUSTAN N SYRUP ', 'BRUSTAN N SYRUP ', '0000-00-00 00:00:00'),
(137, 'PANDA DROP', 'PANDA DROP', '0000-00-00 00:00:00'),
(138, 'AVIPOL SYRUP', 'PARACETAMOL SYRUP', '0000-00-00 00:00:00'),
(139, 'TEGRETOL TAB  ', 'CARBAMAZEPINE', '0000-00-00 00:00:00'),
(140, 'BUSCOPAN TAB', 'HYOSCINE BUTYL BROMIDE', '0000-00-00 00:00:00'),
(141, 'N0SPAMIN DROP', 'N0SPAMIN DROP ', '0000-00-00 00:00:00'),
(142, 'MZOR PARACETAMOL TAB', 'PARACETANOL', '0000-00-00 00:00:00'),
(143, 'PANADOL EXTRA', 'GSK', '0000-00-00 00:00:00'),
(144, 'PANADOL REGULAR', 'GSK', '0000-00-00 00:00:00'),
(145, 'CELEBREX', 'CELEBBREX', '0000-00-00 00:00:00'),
(146, 'CLOFENAC ', 'DICLOFENAC', '0000-00-00 00:00:00'),
(147, 'CLOFENAC A', 'DICLOFENAC', '0000-00-00 00:00:00'),
(148, 'ARTHROTEC', 'ARTHROTEC', '0000-00-00 00:00:00'),
(149, 'VOLTAREN', 'DICLOFENAC', '0000-00-00 00:00:00'),
(150, 'CHYMOCIN', 'CHYMOTRYPCIN', '0000-00-00 00:00:00'),
(151, 'DICLOWIN INJ', 'DICLOFENAC', '0000-00-00 00:00:00'),
(152, 'PEMASON INJ', 'PARACETAMOL', '0000-00-00 00:00:00'),
(153, 'NOSPA', 'NOSPA', '0000-00-00 00:00:00'),
(154, 'MIXANAL', 'MIXANAL', '0000-00-00 00:00:00'),
(155, 'SUDREX', 'PARACETAMOL AND CAFFEN', '0000-00-00 00:00:00'),
(156, 'BOSKA', 'BOSKA', '0000-00-00 00:00:00'),
(157, 'IBEX', 'SANOPI', '0000-00-00 00:00:00'),
(158, 'ASHTON AND PERSON', 'ASHTON AND PERSON', '0000-00-00 00:00:00'),
(159, 'BRUSTAN - N TABLET', 'IBUPROFEN', '0000-00-00 00:00:00'),
(160, 'INFLANIL', 'DICLOFENAC AND PARACETAMOL', '0000-00-00 00:00:00'),
(161, 'ZYLORIC ', 'ALLOPURINOL', '0000-00-00 00:00:00'),
(162, 'FLOTEC ', 'NORVATIS', '0000-00-00 00:00:00'),
(163, '0RTHOPAIN - A', 'MELOXICAM', '0000-00-00 00:00:00'),
(164, 'FELXICAM', 'PIROXICAM', '0000-00-00 00:00:00'),
(165, 'PAUSE', 'TRANEXAMIC ACID', '0000-00-00 00:00:00'),
(166, 'MELOCAP 7.5MG', 'MELOXICAM', '0000-00-00 00:00:00'),
(167, 'GESTID SUSP', 'GESTID', '0000-00-00 00:00:00'),
(168, 'RELCER SUSP', 'RELCER', '0000-00-00 00:00:00'),
(169, 'RULOX', 'RULOX', '0000-00-00 00:00:00'),
(170, 'GESTID TABLET', 'GESTID', '0000-00-00 00:00:00'),
(171, 'DANACID', 'DANACID ', '0000-00-00 00:00:00'),
(172, 'AZMUCAINE', 'AZMU', '0000-00-00 00:00:00'),
(173, 'ASAD BIG BOTTLE', 'MAGNESIUM TRISILICATE', '0000-00-00 00:00:00'),
(174, 'HYCID TABLET', 'OMEPRAZOLE', '0000-00-00 00:00:00'),
(175, 'BAROLE', 'RABEPRAZOLE', '0000-00-00 00:00:00'),
(176, 'RANITAB 150MG', 'RANITADINE', '0000-00-00 00:00:00'),
(177, 'GETZOME POWDER 40MG', 'OMEPRAZOLE ', '0000-00-00 00:00:00'),
(178, 'KRISCET 200MG', 'CIMETADINE', '0000-00-00 00:00:00'),
(179, 'MEZOL - C INJ', 'OMEPRAZOLE', '0000-00-00 00:00:00'),
(180, 'GV PAINT', 'MOKO', '0000-00-00 00:00:00'),
(181, 'SPIRIT', 'AICON', '0000-00-00 00:00:00'),
(182, 'EUSOL', 'AICON', '0000-00-00 00:00:00'),
(183, 'HYDROGEN', 'AICON', '0000-00-00 00:00:00'),
(184, 'ANUSOL SUPPOSITORIES', 'ANUSOL', '0000-00-00 00:00:00'),
(185, 'BELAX', 'BISACODYI', '0000-00-00 00:00:00'),
(186, 'DAFFLON', 'DAFFLON', '0000-00-00 00:00:00'),
(187, 'LIQIUD PARAFIN', 'SKG', '0000-00-00 00:00:00'),
(188, 'COLON CLEANSER TEA', 'KEDI', '0000-00-00 00:00:00'),
(189, 'PANFOR 1G ', 'METFORMIN', '0000-00-00 00:00:00'),
(190, 'DIAMACRON 80MG', 'DIAMACRON', '0000-00-00 00:00:00'),
(191, 'GLUCOPHAGE', 'METFORMIN', '0000-00-00 00:00:00'),
(192, 'PERGLIM 2MG', 'GLIMEPRIDE', '0000-00-00 00:00:00'),
(193, 'PERGLIM 4MG', 'GLIMEPRIDE', '0000-00-00 00:00:00'),
(194, 'AMARYL 2MG', 'GLIMEPRIDE', '0000-00-00 00:00:00'),
(195, 'AMARYL 4MG', 'GLIMEPRIDE', '0000-00-00 00:00:00'),
(196, 'B COMPLEX COUNT', 'B COMPLEX', '0000-00-00 00:00:00'),
(197, 'VIT -C WHITE COUNT', 'VIT C', '0000-00-00 00:00:00'),
(198, 'FOLIC ACID COUNT', 'FOLIC ACID', '0000-00-00 00:00:00'),
(199, 'EMVITE COUNT', 'MULTIVITAMIN', '0000-00-00 00:00:00'),
(200, 'THIAZAMIDE 500MG', 'SULPHATHIAZOLE 500MG', '0000-00-00 00:00:00'),
(201, 'LIQUID QUININE', 'QUININE', '0000-00-00 00:00:00'),
(202, 'CAMOSUNATE  - P', 'ARTEMISININ ', '0000-00-00 00:00:00'),
(203, 'MALDOX SYR', 'MZOR', '0000-00-00 00:00:00'),
(204, 'LONART SUSP', 'ARTEMETHER AND LUMEFANTRINE', '0000-00-00 00:00:00'),
(205, 'P/ALAXIN SUSP', 'DIHYDROARTEMISININ AND PIPERAQUINE', '0000-00-00 00:00:00'),
(206, 'SWIDAR', 'SWIPHA', '0000-00-00 00:00:00'),
(207, 'ARENAX PLUS FORTE', 'SWIPHA', '0000-00-00 00:00:00'),
(208, 'COATEM 80/480', 'NORVATIS', '0000-00-00 00:00:00'),
(209, 'CARTEF DS', 'ARTEMETHER AND LUMEFANTRINE', '0000-00-00 00:00:00'),
(210, 'P/ALAXIN TABLET', 'DIHYDROARTEMISININ AND PIPERAQUINE', '0000-00-00 00:00:00'),
(211, 'ARTEQUICK', 'ARTEMISININ 62.5MG AND PIPERAQUINE 375MG', '0000-00-00 00:00:00'),
(212, 'ARTEQUINE ADULT', 'ARTESUNATE AND MEFLOQUINE', '0000-00-00 00:00:00'),
(213, 'ARTEQUINE CHILD ', 'ARTESUNATE AND MEFLOQUINE', '0000-00-00 00:00:00'),
(214, 'AMATEM SOFT GEL ', 'ARTEMETHER AND LUMEFANTRIN', '0000-00-00 00:00:00'),
(215, 'QUININE TABLET', 'QUININE', '0000-00-00 00:00:00'),
(216, 'ARTENITER INJ', 'ARTEMETHER', '0000-00-00 00:00:00'),
(217, 'AZMAN ', 'ARTEETHER', '0000-00-00 00:00:00'),
(218, 'EMAL 75MG', 'ARTEETHER', '0000-00-00 00:00:00'),
(219, 'EMAL 150MG', 'ARTEETHER', '0000-00-00 00:00:00'),
(220, 'VISKART INJ', 'ARTESUNATE', '0000-00-00 00:00:00'),
(221, 'QUININE INJ', 'QUININE', '0000-00-00 00:00:00'),
(222, 'ZINNAT SUSP', 'CEFUROXIME', '0000-00-00 00:00:00'),
(223, 'SUITROX SUSP', 'AZITHROMYCIN', '0000-00-00 00:00:00'),
(224, '0CEFIX 100ML', 'CEFIXIME', '0000-00-00 00:00:00'),
(225, 'TROZ 100ML', 'METRONIDAZOLE INFUSION', '0000-00-00 00:00:00'),
(226, 'NYSTATIN DROP', 'NYSTATIN', '0000-00-00 00:00:00'),
(227, 'NYSTATIN DROP', 'NYSTATIN', '0000-00-00 00:00:00'),
(228, 'FLUCAMED SYR', 'FLUCONAZOLE', '0000-00-00 00:00:00'),
(229, 'REFUCIL SYR', 'GRISEOFULVIN', '0000-00-00 00:00:00'),
(230, 'ORELOX SUSP ', 'CEFPODOXIME', '0000-00-00 00:00:00'),
(231, '0RACIP INFUSION', 'CIPR0FLOXACIN', '0000-00-00 00:00:00'),
(232, 'AMOKSIKLAV 625', 'AMOXIL AND CLAVUNATE', '0000-00-00 00:00:00'),
(233, 'AUGMENTIN 625', 'GSK', '0000-00-00 00:00:00'),
(234, 'AUGMENTIN 1G', 'GSK', '0000-00-00 00:00:00'),
(235, 'AMOKSIKLAV 1G', 'AMOXIL AND CLAVUNATE ACID', '0000-00-00 00:00:00'),
(236, 'ROSCILOX SUSP', 'AMPICLOX', '0000-00-00 00:00:00'),
(237, 'AMPICLOX DROP   ', 'GSK', '0000-00-00 00:00:00'),
(238, 'COMPI- CLOX SUSP', 'AMPICLOX', '0000-00-00 00:00:00'),
(239, 'DRAMOXILIN SUSP', 'DGF', '0000-00-00 00:00:00'),
(240, 'RANOXYL SUSP', 'AMOXIL', '0000-00-00 00:00:00'),
(241, 'JAWACLOX SUSP', 'JAWA', '0000-00-00 00:00:00'),
(242, 'AKKAFAXONE IV', 'CEFTRIAZONE', '0000-00-00 00:00:00'),
(243, 'ROCEPHIN', 'NORVATIS', '0000-00-00 00:00:00'),
(244, 'OCEXONE', 'SWIPHA', '0000-00-00 00:00:00'),
(245, 'LOXAGYL 400MG', 'METRONIDAZOLE', '0000-00-00 00:00:00'),
(246, 'AZITHROMYCIN TAB X10', 'AZITROMYCIN', '0000-00-00 00:00:00'),
(247, 'LEVOTIL 500MG', 'LEVOFLOXACINE M&B', '0000-00-00 00:00:00'),
(248, 'OFLOMED 200MG', 'OFL0XACIN', '0000-00-00 00:00:00'),
(249, 'ERYTHROMYCIN ', 'SIVO', '0000-00-00 00:00:00'),
(250, 'CIPROTAB', 'FIDSON', '0000-00-00 00:00:00'),
(251, 'ZINNAT 250MG', 'CEFUROXIME', '0000-00-00 00:00:00'),
(252, 'LOXAGYL SUSP', 'METRONIDAZOLE M&B', '0000-00-00 00:00:00'),
(253, 'TINIFLOX ', 'TINIDAZOLE & OFLOXACIN', '0000-00-00 00:00:00'),
(254, 'DOXYCAP', 'DOXYCYCLINE', '0000-00-00 00:00:00'),
(255, 'COMPI- CLOX CAPSULE', 'DGF', '0000-00-00 00:00:00'),
(256, 'TETRACYCLINE 250MG', 'FIDSON', '0000-00-00 00:00:00'),
(257, 'GENTALAK INJ', 'GENTAMYCIN', '0000-00-00 00:00:00'),
(258, 'AMPICLOX CAP  BICHEM', 'GSK', '0000-00-00 00:00:00'),
(259, 'DRAMOXILIN 500MG', 'DGF', '0000-00-00 00:00:00'),
(260, 'KRISMOX 500MG', 'AMOXIL', '0000-00-00 00:00:00'),
(261, 'OLICLOX 500MG', 'AMPICLOX', '0000-00-00 00:00:00'),
(262, 'CIKAMOX 250MG', 'AMOXIL', '0000-00-00 00:00:00'),
(263, 'SECWID 500MG', 'SECNIDAZOLE', '0000-00-00 00:00:00'),
(264, 'OCEFIX 400MG', 'CEFIXIME', '0000-00-00 00:00:00'),
(265, 'TRIMAC FORTE', 'SWIPHA', '0000-00-00 00:00:00'),
(266, 'PRIMPEX TABLET', 'SKG', '0000-00-00 00:00:00'),
(267, 'PRIMPEX SYR', 'SKG', '0000-00-00 00:00:00'),
(268, 'COPTRIN SYR', 'DGF', '0000-00-00 00:00:00'),
(269, 'REFUCIL TABLET', 'GRISEOFULVIN', '0000-00-00 00:00:00'),
(270, 'DRUTAZOLE', 'ALBENDAZOLE DGF', '0000-00-00 00:00:00'),
(271, 'ZENTEL TAB', 'ALBENDAZOLE', '0000-00-00 00:00:00'),
(272, 'RETRAX TABLET', 'LEVAMISOLE 40MG', '0000-00-00 00:00:00'),
(273, 'VERMOX', 'MEBENDAZOLE', '0000-00-00 00:00:00'),
(274, 'NOVACAN 150MG', 'FLUCONAZOLE', '0000-00-00 00:00:00'),
(275, 'ADAY KIT ', 'FLUCONAZOLE, AZITHROMYCIN& SECNIDAZOLR', '0000-00-00 00:00:00'),
(276, 'VIT - C DROP', 'SKG', '0000-00-00 00:00:00'),
(277, 'ASTYFER SYR 110ML', 'FIDSON', '0000-00-00 00:00:00'),
(278, 'EMVITE SYR ', 'MZOR', '0000-00-00 00:00:00'),
(279, 'CALCIMAX ', 'CALCIUM M&B', '0000-00-00 00:00:00'),
(280, 'GARLIC CAPSULE', 'GARLIC', '0000-00-00 00:00:00'),
(281, 'LIVOLIN FORTE', 'MEGA', '0000-00-00 00:00:00'),
(282, 'AFRAB VITE DROP', 'MULTIVITAMIN ', '0000-00-00 00:00:00'),
(283, 'KVIT PLUS', 'MULTIVITAMINE', '0000-00-00 00:00:00'),
(284, 'NEUROVITE FORTE', 'HOVID', '0000-00-00 00:00:00'),
(285, 'ZIMOTIL', 'LOPERAMIDE', '0000-00-00 00:00:00'),
(286, 'ASTYFER CAPSULE', 'FIDSON', '0000-00-00 00:00:00'),
(287, 'ASTYMIN CAPSULE', 'FIDSON', '0000-00-00 00:00:00'),
(288, 'VENTOLIN  INHALER', 'SALBUTAMOL', '0000-00-00 00:00:00'),
(289, 'VENTOLIN TABLET', 'SALBUTAMOL', '0000-00-00 00:00:00'),
(290, 'OTRIVIN CHILD ', 'GSK', '0000-00-00 00:00:00'),
(291, 'OTRIVIN ADULT', 'GSK', '0000-00-00 00:00:00'),
(292, 'SALBUTAMOL SYR ', 'JAWA', '0000-00-00 00:00:00'),
(293, 'VIT- A CAPSULE', 'VIT- A ', '0000-00-00 00:00:00'),
(294, 'VENTOLIN SYR', 'GSK', '0000-00-00 00:00:00'),
(295, 'BRONCHOLYTE SYR', 'NGC', '0000-00-00 00:00:00'),
(296, 'SIVOTHEOM0L', 'SIVO', '0000-00-00 00:00:00'),
(297, 'MOMENTO TABLET', 'DISLORATADINE', '0000-00-00 00:00:00'),
(298, 'ZYNCET TABLET', 'CITRIZINE', '0000-00-00 00:00:00'),
(299, 'PRITONE TABLET', 'PRITONE', '0000-00-00 00:00:00'),
(300, 'RETADINE', 'LORATYN', '0000-00-00 00:00:00'),
(301, 'NAVIDOXINE', 'NAVIDOXINE', '0000-00-00 00:00:00'),
(302, 'AVONUM ', 'PROMETHAZINE', '0000-00-00 00:00:00'),
(303, 'PREDNISOLONE', 'PREDNISOLONE', '0000-00-00 00:00:00'),
(304, 'HYDROCORTSONE INJ', 'HYDROCORTSONE ', '0000-00-00 00:00:00'),
(305, 'PROCOLD', 'PROCOLD', '0000-00-00 00:00:00'),
(306, 'MIXAGRIP', 'MIXAGRIP', '0000-00-00 00:00:00'),
(307, 'KOLD TIME', 'KOLD TIME', '0000-00-00 00:00:00'),
(308, 'NEW DIVINE', 'CONTEX', '0000-00-00 00:00:00'),
(309, 'ORT', 'ORT', '0000-00-00 00:00:00'),
(310, 'ZINC TABLET', 'MZ0R', '0000-00-00 00:00:00'),
(311, 'TUXIL D ADULT ', 'FIDSON', '0000-00-00 00:00:00'),
(312, 'NGC ADULT', 'NGC', '0000-00-00 00:00:00'),
(313, 'NGC SYR CHILD ', 'NGC ', '0000-00-00 00:00:00'),
(314, 'COFEX SYR', 'COFEX', '0000-00-00 00:00:00'),
(315, 'COFLAX ADULT', 'DGF', '0000-00-00 00:00:00'),
(316, 'COFLAX CHILD ', 'DGF', '0000-00-00 00:00:00'),
(317, 'EMZOLYN CHILD', 'MZOR', '0000-00-00 00:00:00'),
(318, 'EMZOLYN ADULT', 'MZOR', '0000-00-00 00:00:00'),
(319, 'D KOFF', 'JAWA', '0000-00-00 00:00:00'),
(320, 'ASCOREX', 'ASCOREX', '0000-00-00 00:00:00'),
(321, 'NISE PLUS 100ML', 'JAWA', '0000-00-00 00:00:00'),
(322, 'LORATADINE SYR', 'AFRAB', '0000-00-00 00:00:00'),
(323, 'LORATADINE SYR ', 'AZMU', '0000-00-00 00:00:00'),
(324, 'ZYNCET SYR', 'CITRIZINE', '0000-00-00 00:00:00'),
(325, 'MOMENTO SYR', 'DISLORATADINE', '0000-00-00 00:00:00'),
(326, 'ROPHEGAN SYR', 'PROMETHAZINE M&B', '0000-00-00 00:00:00'),
(327, 'CAC SANDOZ 1000MG', 'CALCIUM AND VIT - C', '0000-00-00 00:00:00'),
(328, 'STREPSIL ', 'STREPSIL', '0000-00-00 00:00:00'),
(329, 'SHALTOUTH', 'SHALINA', '0000-00-00 00:00:00'),
(330, 'VIT - E CAPSULE', 'VITAMIN E [MZOR]', '0000-00-00 00:00:00'),
(331, 'B COMPLEX INJ', 'DGF', '0000-00-00 00:00:00'),
(332, 'PETAZINE INJ', 'PROMETHAZINE', '0000-00-00 00:00:00'),
(333, 'NISE SYR', 'PRITON', '0000-00-00 00:00:00'),
(334, 'VIT - C GLUCOSE', 'NUTRICI', '0000-00-00 00:00:00'),
(335, 'EMVITE C TABLET', 'VIT C', '0000-00-00 00:00:00'),
(336, 'THEOPHYLINE INJ', 'THEOPHYLINE ', '0000-00-00 00:00:00'),
(337, 'PLASIL INJ', 'METOCLOPRAMIDE', '0000-00-00 00:00:00'),
(338, 'AMIL0DIPINE 5MG TEVA', 'AMILODIPINE', '0000-00-00 00:00:00'),
(339, 'LISNOPRIL 10MG ', 'TEVA', '0000-00-00 00:00:00'),
(340, 'ANGIZAAR 25MG', 'LOSARTAN', '0000-00-00 00:00:00'),
(341, 'ANGIZAAR 50MG', 'LOSARTAN', '0000-00-00 00:00:00'),
(342, 'T0RSINEX 100MG', 'MICRO LAB', '0000-00-00 00:00:00'),
(343, 'AMILODGE', 'AMILODIPINE', '0000-00-00 00:00:00'),
(344, 'SIMLO - 5 ', 'LEOTETRA', '0000-00-00 00:00:00'),
(345, 'SWIVASC 10MG', 'SWIPHA', '0000-00-00 00:00:00'),
(346, 'SWIVASC 5MG', 'SWIPHA', '0000-00-00 00:00:00'),
(347, 'BENDRO 5MG ', 'ZMC', '0000-00-00 00:00:00'),
(348, 'BENDRO 2.5MG ', 'ZMC', '0000-00-00 00:00:00'),
(349, 'ATENOLOL 50MG', 'IMPULSE', '0000-00-00 00:00:00'),
(350, 'FUROSEMIDE INJ ', 'CHUPET PHARM', '0000-00-00 00:00:00'),
(351, 'DOPATAB 250MG', 'HOVID', '0000-00-00 00:00:00'),
(352, 'NIFECARD 30MG', 'LEK', '0000-00-00 00:00:00'),
(353, 'HECARD 20MG', 'KLUSYL INT..', '0000-00-00 00:00:00'),
(354, 'SPINOTONE 25MG', 'LA-LID PHARM', '0000-00-00 00:00:00'),
(355, 'VASOPRIL', 'JUHEL', '0000-00-00 00:00:00'),
(356, 'NORMORETIC ', 'NEIMETH', '0000-00-00 00:00:00'),
(357, 'NORVASC 5MG', 'AMILODIPINE', '0000-00-00 00:00:00'),
(358, 'NORVASC 10MG', 'AMILODIPIN', '0000-00-00 00:00:00'),
(359, '5% DEXTRO ', 'FIDSON', '0000-00-00 00:00:00'),
(360, '5% DEXTRO SALINE ', 'FIDSON', '0000-00-00 00:00:00'),
(361, '5% NORMAL SALINE', 'FIDSON', '0000-00-00 00:00:00'),
(362, '4.3 DEXTRO & SALINE ', 'FIDSON', '0000-00-00 00:00:00'),
(363, '21G', 'AGARY', '0000-00-00 00:00:00'),
(364, '22G', 'AGARY', '0000-00-00 00:00:00'),
(365, '23G', 'AGARY', '0000-00-00 00:00:00'),
(366, 'DRIP GIVING SET', 'AGARY', '0000-00-00 00:00:00'),
(367, '5ML SYRINGE  ', 'AGARY', '0000-00-00 00:00:00'),
(368, '2ML SYRINGE', 'CENT JECT', '0000-00-00 00:00:00'),
(369, '10ML SYRINGE', 'AGARY', '0000-00-00 00:00:00'),
(370, 'SWIDON', 'SWIPHA', '0000-00-00 00:00:00'),
(371, 'PENTAZOCIN INJ', 'FIDSON', '0000-00-00 00:00:00'),
(372, 'TALENT 1.5MG', 'SWIPHA', '0000-00-00 00:00:00'),
(373, 'SWICLONE 7.5MG', 'SWIPHA', '0000-00-00 00:00:00'),
(374, 'UNIVAL 10MG', 'UNIVAL', '0000-00-00 00:00:00'),
(375, 'TOFRANIL ', 'AS0SS0', '0000-00-00 00:00:00'),
(376, 'TRIHALT INJ', 'TRIHALT', '0000-00-00 00:00:00'),
(377, 'MOLFIX SIGE 3 MIDI', 'MOLFIX', '0000-00-00 00:00:00'),
(378, 'COMFO', 'COMFO', '0000-00-00 00:00:00'),
(379, 'NYCIL ', 'NYCIL', '0000-00-00 00:00:00'),
(380, 'REVIVE BOTTLE', 'KEDI', '0000-00-00 00:00:00'),
(381, 'REVIVE X10', 'KEDI', '0000-00-00 00:00:00'),
(382, 'DAKTACORT 15G CREAM', 'JANSSEN', '0000-00-00 00:00:00'),
(383, 'MANIX', 'MANIX', '0000-00-00 00:00:00'),
(384, 'Vitamine C', 'Multivite', '0000-00-00 00:00:00'),
(385, 'Erythromycin Syr', 'Anti Biotic', '0000-00-00 00:00:00'),
(386, 'LABBAIK', 'LABBAIK', '0000-00-00 00:00:00'),
(387, 'STUD 100', 'STUD', '0000-00-00 00:00:00'),
(388, 'PT STRIP', 'LABACON', '0000-00-00 00:00:00'),
(389, 'FUNBACT A CREAM', 'BLISS', '0000-00-00 00:00:00'),
(390, 'PENICILLIN OINTMENT', 'DGF', '0000-00-00 00:00:00'),
(391, 'CLIN CAP CREAM', 'EMBASSAY', '0000-00-00 00:00:00'),
(392, 'POSTPILL', 'DKT', '0000-00-00 00:00:00'),
(393, 'ADHESIVE PLASTER', 'MOREC-C', '0000-00-00 00:00:00'),
(394, 'ROLL PLASTER', 'AGARRY', '0000-00-00 00:00:00'),
(395, 'BABY TRIBOTAN', 'FIDSON', '0000-00-00 00:00:00'),
(396, 'DRUJELA', 'DGF', '0000-00-00 00:00:00'),
(397, 'WOSAN  OINTMENT', 'JAWA', '0000-00-00 00:00:00'),
(398, 'BROMERGON', 'LEK', '0000-00-00 00:00:00'),
(399, 'ZEESKIN', 'SAMIN PHARM', '0000-00-00 00:00:00'),
(400, 'ABF CREAM', 'ABF', '0000-00-00 00:00:00'),
(401, 'NIZORAL CREAM', 'KETOCONAZOLE', '0000-00-00 00:00:00'),
(402, 'KY GEL', 'K-Y', '0000-00-00 00:00:00'),
(403, 'SURGICAL HAND GLOVES', 'CENTURY CARE LTD', '0000-00-00 00:00:00'),
(404, 'LATEX HAND GLOVES ', 'AGARRY', '0000-00-00 00:00:00'),
(405, 'CREPE BANDAGE', 'AGARRY', '0000-00-00 00:00:00'),
(406, 'CUTTON WOOOL', 'ALHERI', '0000-00-00 00:00:00'),
(407, 'FIESTA ', 'DKT', '0000-00-00 00:00:00'),
(408, 'DEPO PROVERA ', 'PFIZER', '0000-00-00 00:00:00'),
(409, 'BELLOSS FIBER', 'KITSUI', '0000-00-00 00:00:00'),
(410, 'COLLOMACK', 'OCTOBER PHARM', '0000-00-00 00:00:00'),
(411, 'MYCOTEN CREAM', 'DGF', '0000-00-00 00:00:00'),
(412, 'DUREX', 'DUREX', '0000-00-00 00:00:00'),
(413, 'KETOFUNG CREAM', 'DGF', '0000-00-00 00:00:00'),
(414, 'NIXODERM CREAM', 'NIXODERM ', '0000-00-00 00:00:00'),
(415, 'CHLORAMPHENICOL OINT', 'FREESBONE ', '0000-00-00 00:00:00'),
(416, 'PENICILLIN EYE OINT', 'DGF', '0000-00-00 00:00:00'),
(417, 'FLOBOID EYE DROP', 'MICRO LAB', '0000-00-00 00:00:00'),
(418, 'DEXATROL', 'DEXATROL', '0000-00-00 00:00:00'),
(419, 'CIPROMED EYE DROP', 'EUROLIFE', '0000-00-00 00:00:00'),
(420, 'OFLOXILAB EYE DROP', 'OFLXACIN', '0000-00-00 00:00:00'),
(421, 'CIFLAXIN EYE DROP', 'DGF', '0000-00-00 00:00:00'),
(422, 'CHLORAMPHENICOL    ', 'DGF', '0000-00-00 00:00:00'),
(423, 'EFEMOLIN EYE DROP', 'RUSAT SAHIBI PHARM', '0000-00-00 00:00:00'),
(424, 'OCULLERG', 'OCCULLERG', '0000-00-00 00:00:00'),
(425, 'DICLO EYE DROP', 'DGF', '0000-00-00 00:00:00'),
(426, 'EPICROM EYE DROP', 'SODIUM CROMOGLYCATE', '0000-00-00 00:00:00'),
(427, 'BETADRONE - N', 'DGF', '0000-00-00 00:00:00'),
(428, 'STADEXOLENE EYE DROP', 'DGF', '0000-00-00 00:00:00'),
(429, 'FLOBOID DX EYE DROP', 'MICRO LAB', '0000-00-00 00:00:00'),
(430, 'MONTRAL', 'MONTRAL', '0000-00-00 00:00:00'),
(431, 'BRETT MOUTH WASH', 'DEKO PHARM', '0000-00-00 00:00:00'),
(432, 'CLOMID', 'CLOMID', '0000-00-00 00:00:00'),
(433, 'NEUROGESIC  EXTRA', 'DGF', '0000-00-00 00:00:00'),
(434, 'NEUROGESIC CREAM ', 'DGF', '0000-00-00 00:00:00'),
(435, 'SENSODYNE  RAPID', 'GSK', '0000-00-00 00:00:00'),
(436, 'OLFEN INJ', 'ACINO', '0000-00-00 00:00:00'),
(437, 'GAVISCON ', 'GAVISCON', '0000-00-00 00:00:00'),
(438, 'GAVISCON D&A', 'GAVISCON', '0000-00-00 00:00:00'),
(439, 'AMOXIL BICHEM 250MG', 'GSK', '0000-00-00 00:00:00'),
(440, 'AMOXIL BICHEM 500MG', 'GSK', '0000-00-00 00:00:00'),
(441, 'ZOLERIC', 'ZOLERIC', '0000-00-00 00:00:00'),
(442, 'DRUGMOL SYR', 'DGF', '0000-00-00 00:00:00'),
(443, 'DRUGMOL TABLET', 'DGF', '0000-00-00 00:00:00'),
(444, 'LORATYN HOVID', 'HOVID', '0000-00-00 00:00:00'),
(445, 'AMILODIFINE 10MG', 'TEVA', '0000-00-00 00:00:00'),
(446, 'LISNOPRIL 5MG', 'SAM', '0000-00-00 00:00:00'),
(447, 'SINUFED SYR', 'SKG', '0000-00-00 00:00:00'),
(448, 'COMPI- CLOX COUNT', 'DGF', '0000-00-00 00:00:00'),
(449, 'NYSTATIN TABLET', 'NYSTATIN', '0000-00-00 00:00:00'),
(450, 'NEO-PRESOL ', 'DGF', '0000-00-00 00:00:00'),
(451, 'MICOZOL PLUS', 'DGF', '0000-00-00 00:00:00'),
(452, 'PRIM0LUT - N TABLET', 'BAYER', '0000-00-00 00:00:00'),
(453, 'GRESIO - CREAM', 'ALPHA LAB', '0000-00-00 00:00:00'),
(454, 'MOLFIX SIZE 4 MAXI', 'MOLFIX', '0000-00-00 00:00:00'),
(455, 'M0LPIX SIGE 2 MINI', 'MOLFIX', '0000-00-00 00:00:00'),
(456, 'MOLFIX SIGE 3 JUMBO', 'MOLFIX', '0000-00-00 00:00:00'),
(457, 'FRESH MORE', 'FRESH MORE', '0000-00-00 00:00:00'),
(458, 'EGO BODY SPRAY', 'EGO', '0000-00-00 00:00:00'),
(459, 'CHA-PET ', 'PRIME', '0000-00-00 00:00:00'),
(460, 'DUPHASTON', 'DUPHASTON', '0000-00-00 00:00:00'),
(461, 'DRULLOMACK', 'DGF', '0000-00-00 00:00:00'),
(462, 'LASIX 40MG', 'FUROSAMIDE', '0000-00-00 00:00:00'),
(463, 'ZITHROMAX SUSP', 'PFIZER', '0000-00-00 00:00:00'),
(464, 'AMITRIPPLINE TAB', 'TEVA', '0000-00-00 00:00:00'),
(465, 'CENOX TAB', 'CIPROFLOXACIN', '0000-00-00 00:00:00'),
(466, 'IMODIUM ', 'JANSSEN', '0000-00-00 00:00:00'),
(467, 'ARTE- JET INJ', 'ARTEMETHER', '0000-00-00 00:00:00'),
(468, 'SKINEAL', 'SKINEAL', '0000-00-00 00:00:00'),
(469, 'STERI-TIN ', 'FAISAL PHARM', '0000-00-00 00:00:00'),
(470, 'BIO-VEIN YELLOW', 'AGARRY', '0000-00-00 00:00:00'),
(471, 'BIO-VEIN PINK', 'AGARRY', '0000-00-00 00:00:00'),
(472, 'Vitamin', 'musa', '0000-00-00 00:00:00'),
(473, 'Acetaminophen', 'drug', '0000-00-00 00:00:00'),
(474, 'Alprazolam', 'drug', '0000-00-00 00:00:00'),
(475, 'Amitriptyline', 'drug', '0000-00-00 00:00:00'),
(476, 'Cencold Syr', 'Analgesic', '0000-00-00 00:00:00'),
(477, 'Vitamine C', 'Multivite', '0000-00-00 00:00:00'),
(478, 'Lizopril 10', 'Lisinopril', '0000-00-00 00:00:00'),
(479, 'another new', 'samson', '0000-00-00 00:00:00'),
(480, 'SUDREX', '', '2020-08-21 17:49:13'),
(481, 'DANACID', '', '2020-08-21 17:49:13'),
(482, 'ANGIZAAR 25MG', '', '2020-08-23 05:00:27'),
(483, 'SALBUTAMOL SYR ', '', '2020-08-23 05:00:27'),
(484, 'HYDROCORTSONE INJ', '', '2020-08-23 05:22:55'),
(485, 'ANGIZAAR 50MG', '', '2020-08-23 06:04:45'),
(486, 'ANGIZAAR 50MG', 'METFORMIN', '2020-09-11 15:26:30'),
(487, 'Inj Ondasetron', NULL, '2020-09-14 19:31:25'),
(488, 'Ceftriaxone', 'ZMC', '2020-10-06 13:48:47'),
(489, 'Cotton Seed Cake', '', '2020-11-03 07:17:22'),
(490, 'Bath Soap', '', '2020-11-03 08:08:36'),
(491, 'Laundary Soap', '', '2020-11-03 09:25:13');

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

--
-- Table structure for table `drugpurchaserecords`
--

CREATE TABLE `drugpurchaserecords` (
  `drug_code` varchar(50) NOT NULL,
  `drug` varchar(30) NOT NULL,
  `generic_name` varchar(100) NOT NULL,
  `unit_of_issue` varchar(100) NOT NULL,
  `reorder_level` int(11) NOT NULL,
  `cost_price` varchar(50) NOT NULL,
  `markUp` varchar(50) NOT NULL,
  `quantity` int(11) DEFAULT 0,
  `by_whom` varchar(100) DEFAULT NULL,
  `supplier` varchar(40) NOT NULL,
  `receipt_no` varchar(20) DEFAULT NULL,
  `payment_status` varchar(10) DEFAULT NULL,
  `created_at` datetime DEFAULT current_timestamp(),
  `receipt_picture` blob DEFAULT NULL,
  `expiry_date` date NOT NULL,
  `expiry_alert` int(5) NOT NULL,
  `balance` varchar(50) DEFAULT NULL,
  `dispensary_balance` int(11) NOT NULL,
  `status` varchar(10) NOT NULL,
  `facilityId` varchar(50) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `drugpurchaserecords`
--

INSERT INTO `drugpurchaserecords` (`drug_code`, `drug`, `generic_name`, `unit_of_issue`, `reorder_level`, `cost_price`, `markUp`, `quantity`, `by_whom`, `supplier`, `receipt_no`, `payment_status`, `created_at`, `receipt_picture`, `expiry_date`, `expiry_alert`, `balance`, `dispensary_balance`, `status`, `facilityId`) VALUES
('', 'HYDROCORTSONE INJ', '', '1', 20, '2000', '0', 50, 'admin-user', '4', '02112023', 'paid', '2020-11-02 00:00:00', '', '2029-12-21', 0, '40', 8, '', 'd8d7a732-1832-4e25-9a98-e68ddc3f0b26'),
('', 'Cotton Seed Cake', '', '1', 20, '2000', '0', 60, 'admin-user', '', '031120425', 'paid', '2020-11-03 00:00:00', '', '0000-00-00', 0, '60', 0, '', 'd8d7a732-1832-4e25-9a98-e68ddc3f0b26'),
('123456', 'Bath Soap', '', '1', 20, '30000', '0', 40, 'admin-user', '4', '031120527', 'paid', '2020-11-03 00:00:00', '', '0000-00-00', 0, '40', 0, '', 'd8d7a732-1832-4e25-9a98-e68ddc3f0b26'),
('', 'Laundary Soap', '', '1', 20, '400', '0', 100, 'admin-user', '4', '031120629', 'paid', '2020-11-03 00:00:00', '', '0000-00-00', 0, '100', 0, '', 'd8d7a732-1832-4e25-9a98-e68ddc3f0b26');

--
-- Triggers `drugpurchaserecords`
--
DELIMITER $$
CREATE TRIGGER `after_dispensary_quantity_and_markup_edit` AFTER UPDATE ON `drugpurchaserecords` FOR EACH ROW BEGIN
    IF OLD.dispensary_balance <> new.dispensary_balance OR OLD.markUp <> new.markUp THEN
        INSERT INTO audit_trail(id,drug_name,facilityId,	old_dispensary_balance,new_dispensary_balance,old_markup,new_markup,source_table,updated_by)
        VALUES(old.drug_code,old.drug, old.facilityId, old.dispensary_balance,new.dispensary_balance, old.markUp,new.markUp, 'drugpurchaserecords', new.by_whom);
    END IF;
END
$$
DELIMITER ;

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

--
-- Table structure for table `drugs`
--

CREATE TABLE `drugs` (
  `drug_code` varchar(50) NOT NULL,
  `drug` varchar(20) DEFAULT NULL,
  `expiry_date` varchar(10) DEFAULT NULL,
  `price` int(10) NOT NULL DEFAULT 0,
  `unit_of_issue` varchar(20) DEFAULT '0',
  `qty_in` int(11) NOT NULL,
  `qty_out` int(11) NOT NULL,
  `source` varchar(100) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `supplier` varchar(100) DEFAULT NULL,
  `receipt_no` varchar(11) NOT NULL DEFAULT '0',
  `store_award_no` int(10) NOT NULL DEFAULT 0,
  `created_by` varchar(30) DEFAULT NULL,
  `receipt_image` blob DEFAULT NULL,
  `genericName` varchar(50) DEFAULT NULL,
  `markup` int(11) NOT NULL,
  `client_acct` varchar(50) NOT NULL,
  `facilityId` varchar(50) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `drugs`
--

INSERT INTO `drugs` (`drug_code`, `drug`, `expiry_date`, `price`, `unit_of_issue`, `qty_in`, `qty_out`, `source`, `created_at`, `supplier`, `receipt_no`, `store_award_no`, `created_by`, `receipt_image`, `genericName`, `markup`, `client_acct`, `facilityId`) VALUES
('', 'HYDROCORTSONE INJ', '2029-12-21', 0, '1', 50, 0, 'purchases', '2020-11-02 14:07:15', '4', '02112023', 0, 'admin-user', NULL, '', 0, '', 'd8d7a732-1832-4e25-9a98-e68ddc3f0b26'),
('', 'HYDROCORTSONE INJ', '2029-12-21', 2000, '0', 0, 10, 'purchases', '2020-11-02 14:11:56', NULL, '02112035', 0, 'admin-user', NULL, '', 1000, '', 'd8d7a732-1832-4e25-9a98-e68ddc3f0b26'),
('', 'HYDROCORTSONE INJ', '2029-12-21', 2000, '0', 10, 0, 'dispensary', '2020-11-02 14:11:56', NULL, '02112035', 0, 'admin-user', NULL, '', 1000, '', 'd8d7a732-1832-4e25-9a98-e68ddc3f0b26'),
('', 'HYDROCORTSONE INJ', '2029-12-21', 3000, '0', 2, 0, 'sold_items', '2020-11-03 05:25:04', NULL, '031120322', 0, 'admin-user', NULL, '', 0, '6', 'd8d7a732-1832-4e25-9a98-e68ddc3f0b26'),
('', 'HYDROCORTSONE INJ', '2029-12-21', 3000, '0', 0, 2, 'dispensary', '2020-11-03 05:25:04', NULL, '031120322', 0, 'admin-user', NULL, '', 0, '6', 'd8d7a732-1832-4e25-9a98-e68ddc3f0b26'),
('', 'Cotton Seed Cake', '', 0, '1', 60, 0, 'purchases', '2020-11-03 07:17:24', '', '031120425', 0, 'admin-user', NULL, '', 0, '', 'd8d7a732-1832-4e25-9a98-e68ddc3f0b26'),
('123456', 'Bath Soap', '', 0, '1', 40, 0, 'purchases', '2020-11-03 08:08:36', '4', '031120527', 0, 'admin-user', NULL, '', 0, '', 'd8d7a732-1832-4e25-9a98-e68ddc3f0b26'),
('', 'Laundary Soap', '', 0, '1', 100, 0, 'purchases', '2020-11-03 09:25:13', '4', '031120629', 0, 'admin-user', NULL, '', 0, '', 'd8d7a732-1832-4e25-9a98-e68ddc3f0b26');

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

--
-- Stand-in structure for view `expenditure_view`
-- (See below for the actual view)
--
CREATE TABLE `expenditure_view` (
`subhead` varchar(50)
,`description` varchar(225)
,`modeOfPayment` varchar(15)
,`acct` varchar(100)
,`createdAt` datetime
,`amount` int(50)
,`facilityId` varchar(50)
,`client_acct` varchar(11)
,`enteredBy` varchar(20)
);

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

--
-- Table structure for table `feedbacks`
--

CREATE TABLE `feedbacks` (
  `id` char(36) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL,
  `userId` varchar(255) DEFAULT NULL,
  `message` varchar(255) DEFAULT NULL,
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `hospitals`
--

CREATE TABLE `hospitals` (
  `id` varchar(50) NOT NULL,
  `name` varchar(255) DEFAULT NULL,
  `code` varchar(255) DEFAULT NULL,
  `address` varchar(255) DEFAULT NULL,
  `admin` varchar(225) DEFAULT NULL,
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL,
  `logo` varchar(200) DEFAULT NULL,
  `type` varchar(20) DEFAULT NULL,
  `hasStore` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `hospitals`
--

INSERT INTO `hospitals` (`id`, `name`, `code`, `address`, `admin`, `createdAt`, `updatedAt`, `logo`, `type`, `hasStore`) VALUES
('07c4fc06-1329-4b59-99f6-c8e135cd5219', 'Pharmacy', '', 'Kawo', 'tttt2', '2020-09-19 15:16:35', '2020-09-19 15:16:35', 'https://res.cloudinary.com/emaitee/image/upload/v1583943949/bits_his_logo.png', 'pharmacy', 0),
('18ed9422-5a43-4ff6-8e76-1f7af2b8e977', 'Demo Pharmacy', 'DPH', 'No. 3 Sabo Bakin Zuwo Road, Kano', 'demo_pharm', '2020-04-05 18:46:05', '2020-04-05 18:46:05', 'https://res.cloudinary.com/emaitee/image/upload/v1583943949/bits_his_logo.png', 'pharmacy', 0),
('1aba07df-882a-460f-8aa2-6a162807f0cd', 'Test Pharm', '', 'Kawo', 'test2', '2020-09-14 04:59:09', '2020-09-14 04:59:09', 'https://res.cloudinary.com/emaitee/image/upload/v1583943949/bits_his_logo.png', 'pharmacy', 0),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'Prime Specialist Clinic, Kano', 'PSC', 'No. 4 Lamido Crescent, Nassarawa G.R.A. Kano', 'abdurrahman', '2020-01-06 05:23:50', '2020-01-06 05:23:50', 'https://res.cloudinary.com/emaitee/image/upload/v1583943941/pscprime_logo.png', 'hospital', 0),
('1d401e9f-0cb3-494d-98a5-901e0886a5c8', 'Remedix Pharmacy Ltd', '', 'Kano', 'remedix', '2020-08-23 04:56:17', '2020-08-23 04:56:17', 'https://res.cloudinary.com/emaitee/image/upload/v1583943949/bits_his_logo.png', 'pharmacy', NULL),
('2228e653-9a90-4453-9566-785db75c15c9', 'Bits-HIS Specialist', 'BIT', 'No. 3 Sabo Bakin Zuwo Road Beside Ministry of special Dutie', 'emaitee', '2020-01-06 07:57:39', '2020-01-06 07:57:39', 'https://res.cloudinary.com/emaitee/image/upload/v1583943949/bits_his_logo.png', 'hospital', 0),
('26161120-f7b9-48e6-b4eb-5e9dc27a02b9', 'Whatever Pharmacu', '', 'Kawo', 'test2020', '2020-09-22 17:13:58', '2020-09-22 17:13:58', 'https://res.cloudinary.com/emaitee/image/upload/v1583943949/bits_his_logo.png', 'pharmacy', 0),
('3eb31e94-6e70-4cbc-97d4-1c476983fa8d', 'Admin Pharmacy', '', 'Kano', 'testest', '2020-09-14 19:15:11', '2020-09-14 19:15:11', 'https://res.cloudinary.com/emaitee/image/upload/v1583943949/bits_his_logo.png', 'pharmacy', 0),
('6c6af0c0-35ea-40d8-a928-b13a9766113a', 'My Pharmacy', 'MPH', 'Kano', 'pharm_m', '2020-07-15 09:33:36', '2020-07-15 09:33:36', 'https://res.cloudinary.com/emaitee/image/upload/v1583943949/bits_his_logo.png', 'pharmacy', 0),
('966a89f6-05d8-4564-b319-2f8863821e75', 'Optimum Diagnostics Center', 'ODC', 'Zaria Road, Kano', 'admin', '2020-08-11 11:51:40', '2020-08-11 11:51:40', 'https://res.cloudinary.com/emaitee/image/upload/v1583943949/bits_his_logo.png', 'laboratory', 0),
('a2cc3c63-2dd3-4e64-aed4-4f4af98d17ca', 'Test Me', '', 'nigeria', 'testme', '2020-09-14 19:08:23', '2020-09-14 19:08:23', 'https://res.cloudinary.com/emaitee/image/upload/v1583943949/bits_his_logo.png', 'pharmacy', 0),
('a60711d5-192b-4226-8b20-576246f12499', 'Test3', '', 'Kawo', 'testmysales', '2020-09-22 17:07:46', '2020-09-22 17:07:46', 'https://res.cloudinary.com/emaitee/image/upload/v1583943949/bits_his_logo.png', 'pharmacy', 0),
('b8823207-58e1-438c-bb62-f3c6c16d8d3d', 'LUDPHA BIO TECH', 'LUD', 'Sadauna Crescent, Kano', 'isahboy01', '2020-03-13 20:00:03', '2020-03-13 20:00:03', 'https://res.cloudinary.com/emaitee/image/upload/v1584268238/ludpha_logo.png', 'pharmacy', 0),
('d8d7a732-1832-4e25-9a98-e68ddc3f0b26', 'BINADAM OIL MILLS', '', 'Kano', 'admin-user', '2020-11-02 13:52:36', '2020-11-02 13:52:36', 'https://res.cloudinary.com/emaitee/image/upload/v1583943949/bits_his_logo.png', 'factory', 0),
('db18f81d-8238-4f3a-a0c5-8d12ed173767', 'Test Facility', 'TFT', 'Whatsapp', 'test_admin', '2020-09-01 07:46:36', '2020-09-01 07:46:36', 'https://res.cloudinary.com/emaitee/image/upload/v1583943949/bits_his_logo.png', 'pharmacy', NULL),
('ee83be9e-5b9b-412f-81e7-95b9417c2782', 'Demo', '', '123 Kano road.', 'demo-user', '2020-11-01 05:06:33', '2020-11-01 05:06:33', 'https://res.cloudinary.com/emaitee/image/upload/v1583943949/bits_his_logo.png', 'hospital', 0),
('f7b3caa8-2c43-4344-9855-db3f534283c5', 'Another Test', 'ATA', 'Whatsapp', 'meme', '2020-09-01 07:49:46', '2020-09-01 07:49:46', 'https://res.cloudinary.com/emaitee/image/upload/v1583943949/bits_his_logo.png', 'pharmacy', NULL);

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

--
-- Table structure for table `lab`
--

CREATE TABLE `lab` (
  `test_id` int(10) NOT NULL,
  `date` datetime DEFAULT current_timestamp(),
  `patient_id` varchar(20) DEFAULT NULL,
  `test` varchar(100) DEFAULT NULL,
  `status` varchar(20) DEFAULT NULL,
  `requested_by` varchar(20) DEFAULT NULL,
  `sample` varchar(100) DEFAULT NULL,
  `result` varchar(50) DEFAULT NULL,
  `appearance` varchar(50) DEFAULT NULL,
  `microscopy` varchar(50) DEFAULT NULL,
  `culture` varchar(50) DEFAULT NULL,
  `antibiotic` varchar(50) DEFAULT NULL,
  `comment` varchar(200) DEFAULT NULL,
  `facilityId` varchar(50) DEFAULT NULL,
  `updated_at` date DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `lab`
--

INSERT INTO `lab` (`test_id`, `date`, `patient_id`, `test`, `status`, `requested_by`, `sample`, `result`, `appearance`, `microscopy`, `culture`, `antibiotic`, `comment`, `facilityId`, `updated_at`) VALUES
(1, '2020-01-02 00:00:00', '329-2', 'followUp', 'request', 'x-ray', 'fore-arm', 'positive', 'yeah', 'undefined', 'undefined', 'undefined', '12/12/2012', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', NULL),
(2, '2020-01-02 00:00:00', '329-1', 'x-ray', 'request', 'aminu', 'leg', 'hhhhjj', 'normal', 'nothing spectacular', '', 'safe', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', NULL),
(3, '2020-01-02 00:00:00', '329-2', 'x-ray', 'request', 'aminu', 'leg', 'jjjjjj', '', '', '', '', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', NULL),
(4, '2020-01-02 00:00:00', '329-2', 'x-ray', 'request', 'aminu', 'leg', 'jjjjjj', '', '', '', '', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', NULL),
(5, '2020-01-02 00:00:00', '329-1', 'x-ray', 'request', 'aminu', 'leg', 'hhhhjj', 'seem defect', '', 'yeah', 'nothing', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', NULL),
(6, '2020-01-02 00:00:00', '329-1', 'gamma', 'request', 'emaitee', 'leg', 'yyyyyy', '', '', '', '', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', NULL),
(7, '2020-01-02 00:00:00', '329-1', 'beta', 'request', 'teetee', 'hand', 'hhhhjj', '', '', '', '', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', NULL),
(8, '2020-01-02 00:00:00', '3333-1', 'red', 'request', 'uack', 'blood', 'hhhhjj', '', '', '', '', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', NULL),
(9, '2020-01-02 00:00:00', '3291-2', 'y-ray', 'request', 'tech', 'ggg', 'hhhhjj', '', '', '', '', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', NULL),
(10, '2020-01-02 00:00:00', '329-2', 'x-ray', 'request', 'aminu', 'leg', '', '', '', '', '', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', NULL),
(11, '2020-01-02 00:00:00', '3608-1', 'htf', 'request', 'aminu', 'rese', '', '', '', '', '', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', NULL),
(12, '2020-01-02 00:00:00', '329-2', 'urine test', 'request', 'aminu', 'urine', '', '', '', '', '', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', NULL),
(13, '2020-01-02 00:00:00', '329-2', 'blood test', 'request', 'aminu', 'blood', '', '', '', '', '', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', NULL),
(14, '2020-01-02 00:00:00', '329-2', 'urine test', 'request', 'aminu', 'urine', '', '', '', '', '', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', NULL),
(15, '2020-01-02 00:00:00', '3233-1', 'blood test', 'request', 'aminu', 'blood', '', '', '', '', '', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', NULL),
(16, '2020-01-02 00:00:00', '329-2', 'blood test', 'request', 'aminu', 'blood', '', '', '', '', '', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', NULL),
(17, '2020-01-02 00:00:00', '329-2', 'x-ray', 'request', 'aminu', 'leg', '', '', '', '', '', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', NULL),
(18, '2020-01-02 00:00:00', '329-1', 'urine test', 'request', 'aminu', 'urine', '', '', '', '', '', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', NULL),
(19, '2020-01-02 00:00:00', '329-2', 'urea test', 'request', 'aminu', 'urine', '', '', '', '', '', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', NULL),
(20, '2020-01-02 00:00:00', '3608-1', 'urea', 'request', 'Aisha', 'urine', '', '', '', '', '', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', NULL),
(21, '2020-01-02 00:00:00', '329-2', 'x-ray', 'request', 'Aisha', 'arm', '', '', '', '', '', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', NULL),
(22, '2020-01-02 00:00:00', '3608-1', 'urea', 'request', 'Aisha', 'urine', '', '', '', '', '', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', NULL),
(23, '2020-01-06 17:24:08', '329-2', 'test', 'request', 'doctor', 'test sample', NULL, NULL, NULL, NULL, NULL, NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', NULL),
(24, '2020-01-06 19:16:11', '3608-1', 'testing microphone', 'request', 'doctor', 'yea yeah', NULL, NULL, NULL, NULL, NULL, NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', NULL),
(25, '2020-01-06 19:24:56', '3608-1', 'yaya yepa', 'request', 'doctor', 'another', NULL, NULL, NULL, NULL, NULL, NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', NULL),
(26, '2020-01-07 07:36:45', '3575-1', 'afsd', 'request', 'doctor', 'asdf', NULL, NULL, NULL, NULL, NULL, NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', NULL),
(27, '2020-01-13 15:17:15', '3588-1', 'pcv', 'request', 'abdurrahman', 'blood', NULL, NULL, NULL, NULL, NULL, NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', NULL),
(28, '2020-01-13 15:17:15', '3588-1', 'u/e/cr', 'request', 'abdurrahman', 'blood', NULL, NULL, NULL, NULL, NULL, NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', NULL),
(29, '2020-02-22 11:47:34', '3584-1', 'L;K\'L', 'request', 'doctor', ';L[\\', NULL, NULL, NULL, NULL, NULL, NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', NULL),
(30, '2020-03-14 14:31:31', '3742-1', 'fbc', 'request', 'abdurrahman', 'blood', NULL, NULL, NULL, NULL, NULL, NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', NULL),
(31, '2020-03-14 14:31:31', '3742-1', 'uecr', 'request', 'abdurrahman', 'blood', NULL, NULL, NULL, NULL, NULL, NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', NULL);

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

--
-- Table structure for table `labservices`
--

CREATE TABLE `labservices` (
  `labhead` varchar(50) DEFAULT NULL,
  `labsubhead` varchar(50) DEFAULT NULL,
  `test` varchar(50) DEFAULT NULL,
  `unit` varchar(50) DEFAULT NULL,
  `value` varchar(50) DEFAULT NULL,
  `test_range` varchar(50) DEFAULT NULL,
  `id` int(20) NOT NULL,
  `facilityId` varchar(50) NOT NULL,
  `createdAt` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `labservices`
--

INSERT INTO `labservices` (`labhead`, `labsubhead`, `test`, `unit`, `value`, `test_range`, `id`, `facilityId`, `createdAt`) VALUES
('max', 'add', NULL, 'blue', 'dnffj', '12333', 1, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2020-01-23 05:21:27'),
('maxss', 'add', 'dnffj', 'blue', NULL, '12333', 2, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2020-01-23 05:21:27'),
('max', 'add', 'dnffj', 'blue', NULL, '12333', 3, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2020-01-23 05:21:27'),
('max', 'add', 'dnffj', 'blue', NULL, '12333', 4, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2020-01-23 05:21:27'),
('max', 'add', 'dnffj', 'blue', NULL, '12333', 5, '22', '2020-01-23 12:39:37'),
('ssssddddd', 'weeew', 'uby', 'sd', NULL, '324567', 6, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2020-01-23 13:07:42'),
('prime', 'prime lab', 'emathology', 'mm/g', NULL, '12-20', 7, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2020-01-23 13:13:33'),
('ssssddddd', 'weeew', 'uby', 'eee', NULL, '324567', 8, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2020-01-23 14:15:06'),
('ssssddddd', 'weeew', 'uby', 'sd', NULL, '324567', 9, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2020-01-23 14:38:04'),
('ssssddddd', 'weeew', 'wertyu', 'eee', NULL, '324567', 10, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2020-02-17 10:49:14'),
('ssssddddd', 'weeew', 'uby', 'hjdskjsdjjkds', NULL, '12-20', 11, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2020-02-17 11:15:56'),
('prime', 'prime_lab', 'urine_test', '34', NULL, '324567', 12, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2020-02-17 17:22:49'),
('prime', 'prime_lab', 'urine_test', '34', NULL, '324567', 13, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2020-02-17 17:23:35'),
('ssssddddd', 'ghhjskjdjkd', '', 'sd', NULL, '', 14, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2020-02-19 15:43:16'),
('ssssddddd', 'ghhjskjdjkd', '', 'sd', NULL, '', 15, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2020-02-19 15:43:38'),
('ssssddddd', 'ghhjskjdjkd', '', 'sd', NULL, '', 16, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2020-02-19 15:44:53'),
('ssssddddd', 'ghhjskjdjkd', 'uby', 'sd', NULL, '324567', 17, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2020-02-19 15:45:04'),
('fahad', 'ado', 'urine', 'sd', NULL, '12-20', 18, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2020-02-26 15:45:07');

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

--
-- Stand-in structure for view `lab_info`
-- (See below for the actual view)
--
CREATE TABLE `lab_info` (
`created_at` timestamp
,`facilityId` varchar(50)
,`id` int(100)
,`code` varchar(50)
,`booking_no` varchar(100)
,`patient_id` int(100)
,`head` varchar(100)
,`subhead` varchar(100)
,`unit` varchar(100)
,`range_from` varchar(100)
,`range_to` varchar(100)
,`price` int(100)
,`description` varchar(200)
,`specimen` varchar(100)
,`noOfLabels` int(11)
,`department` varchar(50)
,`result` varchar(4000)
,`appearance` varchar(4000)
,`serology` varchar(4000)
,`culture_yielded` varchar(4000)
,`status` varchar(20)
,`created_by` varchar(50)
,`sample_collected_by` varchar(50)
,`analyzed_by` varchar(50)
,`result_by` varchar(50)
,`reviewed_by` varchar(50)
,`printed_by` varchar(50)
);

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

--
-- Table structure for table `lab_inventory_table`
--

CREATE TABLE `lab_inventory_table` (
  `id` int(11) NOT NULL,
  `batch_code` varchar(50) NOT NULL,
  `item_name` varchar(100) NOT NULL,
  `supplier` varchar(100) NOT NULL,
  `price` varchar(100) NOT NULL,
  `quantity` varchar(100) NOT NULL,
  `invoice_no` varchar(100) NOT NULL,
  `re_order_level` varchar(100) NOT NULL,
  `facilityId` varchar(50) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `created_by` varchar(50) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `lab_inventory_table`
--

INSERT INTO `lab_inventory_table` (`id`, `batch_code`, `item_name`, `supplier`, `price`, `quantity`, `invoice_no`, `re_order_level`, `facilityId`, `created_at`, `created_by`) VALUES
(0, '1', 'Reagent', 'undefined', '100', '20', '', '10', '966a89f6-05d8-4564-b319-2f8863821e75', '2020-10-09 14:18:16', 'admin');

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

--
-- Table structure for table `lab_numbers`
--

CREATE TABLE `lab_numbers` (
  `id` int(11) NOT NULL,
  `patient_acc_no` int(11) NOT NULL,
  `patient_id` varchar(50) NOT NULL,
  `lab_no` varchar(50) NOT NULL,
  `history` varchar(4000) DEFAULT NULL,
  `status` varchar(200) NOT NULL,
  `facilityId` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `lab_numbers`
--

INSERT INTO `lab_numbers` (`id`, `patient_acc_no`, `patient_id`, `lab_no`, `history`, `status`, `facilityId`) VALUES
(1, 1, '8', '1-11-20-1', '', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
(2, 1, '9', '7-11-20-7', '', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
(3, 1, '4', '13-11-20-13', NULL, '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
(4, 1, '6', '19-11-20-19', NULL, '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
(5, 1, '10', '25-11-20-25', '', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
(6, 1, '19', '31-11-20-31', NULL, '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
(7, 1, '6', '37-11-20-37', NULL, '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a');

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

--
-- Stand-in structure for view `lab_process`
-- (See below for the actual view)
--
CREATE TABLE `lab_process` (
`created_at` timestamp
,`facilityId` varchar(50)
,`id` int(100)
,`code` varchar(50)
,`booking_no` varchar(100)
,`patient_id` int(100)
,`head` varchar(100)
,`subhead` varchar(100)
,`unit` varchar(100)
,`range_from` varchar(100)
,`range_to` varchar(100)
,`price` int(100)
,`description` varchar(200)
,`specimen` varchar(100)
,`noOfLabels` int(11)
,`group_head` varchar(200)
,`department` varchar(50)
,`department_head` varchar(200)
,`result` varchar(4000)
,`appearance` varchar(4000)
,`serology` varchar(4000)
,`culture_yielded` varchar(4000)
,`status` varchar(20)
,`created_by` varchar(50)
,`sample_collected_by` varchar(50)
,`analyzed_by` varchar(50)
,`result_by` varchar(50)
,`reviewed_by` varchar(50)
,`printed_by` varchar(50)
);

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

--
-- Stand-in structure for view `lab_request2`
-- (See below for the actual view)
--
CREATE TABLE `lab_request2` (
`created_at` timestamp
,`facilityId` varchar(50)
,`id` int(100)
,`code` varchar(50)
,`booking_no` varchar(100)
,`patient_id` int(100)
,`head` varchar(100)
,`subhead` varchar(100)
,`unit` varchar(100)
,`range_from` varchar(100)
,`range_to` varchar(100)
,`price` int(100)
,`description` varchar(200)
,`specimen` varchar(100)
,`noOfLabels` int(11)
,`group_head` varchar(200)
,`department` varchar(50)
,`result` varchar(4000)
,`appearance` varchar(4000)
,`serology` varchar(4000)
,`culture_yielded` varchar(4000)
,`status` varchar(20)
,`created_by` varchar(50)
,`sample_collected_by` varchar(50)
,`analyzed_by` varchar(50)
,`result_by` varchar(50)
,`reviewed_by` varchar(50)
,`printed_by` varchar(50)
);

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

--
-- Stand-in structure for view `lab_requests`
-- (See below for the actual view)
--
CREATE TABLE `lab_requests` (
`department` varchar(50)
,`patient_id` int(100)
,`status` varchar(200)
);

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

--
-- Table structure for table `lab_requisition`
--

CREATE TABLE `lab_requisition` (
  `facilityId` varchar(50) NOT NULL,
  `id` int(100) NOT NULL,
  `code` varchar(50) NOT NULL,
  `booking_no` varchar(100) NOT NULL,
  `patient_id` int(100) NOT NULL,
  `test` varchar(100) NOT NULL,
  `price` int(11) NOT NULL,
  `percentage` int(11) NOT NULL,
  `result` varchar(4000) NOT NULL,
  `appearance` varchar(4000) NOT NULL,
  `serology` varchar(4000) NOT NULL,
  `culture_yielded` varchar(4000) NOT NULL,
  `department` varchar(50) NOT NULL,
  `test_group` varchar(50) NOT NULL,
  `status` varchar(20) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `updated_at` varchar(100) NOT NULL,
  `created_by` varchar(50) NOT NULL,
  `sample_collected_by` varchar(50) NOT NULL,
  `analyzed_by` varchar(50) NOT NULL,
  `result_by` varchar(50) NOT NULL,
  `reviewed_by` varchar(50) NOT NULL,
  `printed_by` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `lab_requisition`
--

INSERT INTO `lab_requisition` (`facilityId`, `id`, `code`, `booking_no`, `patient_id`, `test`, `price`, `percentage`, `result`, `appearance`, `serology`, `culture_yielded`, `department`, `test_group`, `status`, `created_at`, `updated_at`, `created_by`, `sample_collected_by`, `analyzed_by`, `result_by`, `reviewed_by`, `printed_by`) VALUES
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 1, '20118', '1-11-20-1', 8, '30011', 600, 0, '4', '', '', '', '3000', '3001', 'result', '2020-11-01 06:51:58', '', '', 'emaitee', 'emaitee', 'emaitee', '', ''),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 2, '20118', '1-11-20-1', 8, '30012', 600, 0, '135', '', '', '', '3000', '3001', 'result', '2020-11-01 06:51:58', '', '', 'emaitee', 'emaitee', 'emaitee', '', ''),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 3, '20118', '1-11-20-1', 8, '30013', 600, 0, '4', '', '', '', '3000', '3001', 'result', '2020-11-01 06:51:58', '', '', 'emaitee', 'emaitee', 'emaitee', '', ''),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 4, '20118', '1-11-20-1', 8, '30014', 600, 0, '15', '', '', '', '3000', '3001', 'result', '2020-11-01 06:51:58', '', '', 'emaitee', 'emaitee', 'emaitee', '', ''),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 5, '20118', '1-11-20-1', 8, '30015', 600, 0, '100', '', '', '', '3000', '3001', 'result', '2020-11-01 06:51:58', '', '', 'emaitee', 'emaitee', 'emaitee', '', ''),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 6, '20118', '1-11-20-1', 8, '30016', 1000, 0, '60', '', '', '', '3000', '3001', 'result', '2020-11-01 06:51:58', '', '', 'emaitee', 'emaitee', 'emaitee', '', ''),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 7, '20114', '7-11-20-7', 9, '30011', 600, 0, '', '', '', '', '3000', '3001', 'pending', '2020-11-01 08:55:18', '', '', '', '', '', '', ''),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 8, '20114', '7-11-20-7', 9, '30012', 600, 0, '', '', '', '', '3000', '3001', 'pending', '2020-11-01 08:55:18', '', '', '', '', '', '', ''),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 9, '20114', '7-11-20-7', 9, '30013', 600, 0, '', '', '', '', '3000', '3001', 'pending', '2020-11-01 08:55:18', '', '', '', '', '', '', ''),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 10, '20114', '7-11-20-7', 9, '30014', 600, 0, '', '', '', '', '3000', '3001', 'pending', '2020-11-01 08:55:18', '', '', '', '', '', '', ''),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 11, '20114', '7-11-20-7', 9, '30015', 600, 0, '', '', '', '', '3000', '3001', 'pending', '2020-11-01 08:55:18', '', '', '', '', '', '', ''),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 12, '20114', '7-11-20-7', 9, '30016', 1000, 0, '', '', '', '', '3000', '3001', 'pending', '2020-11-01 08:55:18', '', '', '', '', '', '', ''),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 13, '20118', '13-11-20-13', 4, '30011', 600, 0, '78', '', '', '', '3000', '3001', 'result', '2020-11-01 09:08:51', '', '', 'emaitee', 'emaitee', 'emaitee', '', ''),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 14, '20118', '13-11-20-13', 4, '30012', 600, 0, '7', '', '', '', '3000', '3001', 'result', '2020-11-01 09:08:51', '', '', 'emaitee', 'emaitee', 'emaitee', '', ''),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 15, '20118', '13-11-20-13', 4, '30013', 600, 0, '4', '', '', '', '3000', '3001', 'result', '2020-11-01 09:08:51', '', '', 'emaitee', 'emaitee', 'emaitee', '', ''),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 16, '20118', '13-11-20-13', 4, '30014', 600, 0, '6', '', '', '', '3000', '3001', 'result', '2020-11-01 09:08:51', '', '', 'emaitee', 'emaitee', 'emaitee', '', ''),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 17, '20118', '13-11-20-13', 4, '30015', 600, 0, '95', '', '', '', '3000', '3001', 'result', '2020-11-01 09:08:51', '', '', 'emaitee', 'emaitee', 'emaitee', '', ''),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 18, '20118', '13-11-20-13', 4, '30016', 1000, 0, '69', '', '', '', '3000', '3001', 'result', '2020-11-01 09:08:51', '', '', 'emaitee', 'emaitee', 'emaitee', '', ''),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 19, '20113', '19-11-20-19', 6, '30011', 600, 0, '', '', '', '', '3000', '3001', 'pending', '2020-11-01 09:00:57', '', '', '', '', '', '', ''),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 20, '20113', '19-11-20-19', 6, '30012', 600, 0, '', '', '', '', '3000', '3001', 'pending', '2020-11-01 09:00:57', '', '', '', '', '', '', ''),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 21, '20113', '19-11-20-19', 6, '30013', 600, 0, '', '', '', '', '3000', '3001', 'pending', '2020-11-01 09:00:57', '', '', '', '', '', '', ''),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 22, '20113', '19-11-20-19', 6, '30014', 600, 0, '', '', '', '', '3000', '3001', 'pending', '2020-11-01 09:00:57', '', '', '', '', '', '', ''),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 23, '20113', '19-11-20-19', 6, '30015', 600, 0, '', '', '', '', '3000', '3001', 'pending', '2020-11-01 09:00:57', '', '', '', '', '', '', ''),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 24, '20113', '19-11-20-19', 6, '30016', 1000, 0, '', '', '', '', '3000', '3001', 'pending', '2020-11-01 09:00:57', '', '', '', '', '', '', ''),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 25, '20118', '25-11-20-25', 10, '30011', 600, 0, '', '', '', '', '3000', '3001', 'pending', '2020-11-01 11:49:54', '', '', '', '', '', '', ''),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 26, '20118', '25-11-20-25', 10, '30012', 600, 0, '', '', '', '', '3000', '3001', 'pending', '2020-11-01 11:49:54', '', '', '', '', '', '', ''),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 27, '20118', '25-11-20-25', 10, '30013', 600, 0, '', '', '', '', '3000', '3001', 'pending', '2020-11-01 11:49:54', '', '', '', '', '', '', ''),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 28, '20118', '25-11-20-25', 10, '30014', 600, 0, '', '', '', '', '3000', '3001', 'pending', '2020-11-01 11:49:54', '', '', '', '', '', '', ''),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 29, '20118', '25-11-20-25', 10, '30015', 600, 0, '', '', '', '', '3000', '3001', 'pending', '2020-11-01 11:49:54', '', '', '', '', '', '', ''),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 30, '20118', '25-11-20-25', 10, '30016', 1000, 0, '', '', '', '', '3000', '3001', 'pending', '2020-11-01 11:49:54', '', '', '', '', '', '', ''),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 31, '20119', '31-11-20-31', 19, '30011', 600, 0, '3', '', '', '', '3000', '3001', 'result', '2020-11-01 12:04:37', '', '', 'emaitee', 'emaitee', 'emaitee', '', ''),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 32, '20119', '31-11-20-31', 19, '30012', 600, 0, '140', '', '', '', '3000', '3001', 'result', '2020-11-01 12:04:37', '', '', 'emaitee', 'emaitee', 'emaitee', '', ''),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 33, '20119', '31-11-20-31', 19, '30013', 600, 0, '4', '', '', '', '3000', '3001', 'result', '2020-11-01 12:04:37', '', '', 'emaitee', 'emaitee', 'emaitee', '', ''),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 34, '20119', '31-11-20-31', 19, '30014', 600, 0, '22', '', '', '', '3000', '3001', 'result', '2020-11-01 12:04:37', '', '', 'emaitee', 'emaitee', 'emaitee', '', ''),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 35, '20119', '31-11-20-31', 19, '30015', 600, 0, '100', '', '', '', '3000', '3001', 'result', '2020-11-01 12:04:37', '', '', 'emaitee', 'emaitee', 'emaitee', '', ''),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 36, '20119', '31-11-20-31', 19, '30016', 1000, 0, '40', '', '', '', '3000', '3001', 'result', '2020-11-01 12:04:37', '', '', 'emaitee', 'emaitee', 'emaitee', '', ''),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 37, '20113', '37-11-20-37', 6, '30011', 600, 0, '', '', '', '', '3000', '3001', 'pending', '2020-11-01 16:55:27', '', '', '', '', '', '', ''),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 38, '20113', '37-11-20-37', 6, '30012', 600, 0, '', '', '', '', '3000', '3001', 'pending', '2020-11-01 16:55:27', '', '', '', '', '', '', ''),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 39, '20113', '37-11-20-37', 6, '30013', 600, 0, '', '', '', '', '3000', '3001', 'pending', '2020-11-01 16:55:27', '', '', '', '', '', '', ''),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 40, '20113', '37-11-20-37', 6, '30014', 600, 0, '', '', '', '', '3000', '3001', 'pending', '2020-11-01 16:55:27', '', '', '', '', '', '', ''),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 41, '20113', '37-11-20-37', 6, '30015', 600, 0, '', '', '', '', '3000', '3001', 'pending', '2020-11-01 16:55:27', '', '', '', '', '', '', ''),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 42, '20113', '37-11-20-37', 6, '30016', 1000, 0, '', '', '', '', '3000', '3001', 'pending', '2020-11-01 16:55:27', '', '', '', '', '', '', '');

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

--
-- Table structure for table `lab_setup`
--

CREATE TABLE `lab_setup` (
  `subhead` varchar(100) DEFAULT NULL,
  `head` varchar(100) DEFAULT NULL,
  `description` varchar(200) NOT NULL,
  `unit` varchar(100) DEFAULT NULL,
  `range_from` varchar(100) DEFAULT NULL,
  `range_to` varchar(100) DEFAULT NULL,
  `specimen` varchar(100) DEFAULT NULL,
  `price` int(100) DEFAULT NULL,
  `percentage` int(11) NOT NULL,
  `noOfLabels` int(11) NOT NULL,
  `created_at` timestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `updated_at` varchar(100) DEFAULT NULL,
  `facilityId` varchar(50) NOT NULL,
  `created_by` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `lab_setup`
--

INSERT INTO `lab_setup` (`subhead`, `head`, `description`, `unit`, `range_from`, `range_to`, `specimen`, `price`, `percentage`, `noOfLabels`, `created_at`, `updated_at`, `facilityId`, `created_by`) VALUES
('2000', '1000', 'Hematology', NULL, NULL, NULL, '', NULL, 0, 0, '2020-10-14 11:01:38', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('3000', '1000', 'Chemical Pathology', NULL, NULL, NULL, '', NULL, 0, 0, '2020-10-15 14:46:06', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('4000', '1000', 'Microbiology', NULL, NULL, NULL, '', NULL, 0, 0, '2020-10-14 11:58:37', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5000', '1000', 'Radiology', NULL, NULL, NULL, '', NULL, 0, 0, '2020-10-15 10:08:39', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('1000', '', 'Optimum Diagnostics', NULL, NULL, NULL, '', NULL, 0, 0, '2020-10-16 08:54:16', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('2001', '2000', 'PCV', '', '', '', '', 600, 0, 1, '2020-10-16 08:58:07', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('2002', '2000', 'PTTK/APTT', '', '', '', '', 2500, 0, 1, '2020-10-16 08:58:07', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('2003', '2000', 'Prothrombin time', '', '', '', '', 2500, 0, 1, '2020-10-16 08:58:07', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('2004', '2000', 'Reticulocyte', '', '', '', '', 7000, 0, 1, '2020-10-16 08:58:07', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('2005', '2000', 'Thrombin Time', '', '', '', '', 1000, 0, 1, '2020-10-16 08:58:07', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('2006', '2000', 'VITAMIN B12', '', '', '', '', 8000, 0, 1, '2020-10-16 08:58:07', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('2007', '2000', 'Blood group & RH', '', '', '', '', 800, 0, 1, '2020-10-16 08:58:07', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('2008', '2000', 'Direct Coombs Test', '', '', '', '', 1000, 0, 1, '2020-10-16 08:58:07', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('2009', '2000', 'ESR', '', '', '', '', 1000, 0, 1, '2020-10-16 08:58:07', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('2010', '2000', 'FOLATE', '', '', '', '', 8000, 0, 1, '2020-10-16 08:58:07', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('2011', '2000', 'Full Blood Count', '', '', '', '', 2200, 0, 1, '2020-10-16 08:58:07', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('2012', '2000', 'HPLC Test', '', '', '', '', 6500, 0, 1, '2020-10-16 08:58:07', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('2013', '2000', 'Haemoglobin Hb', '', '', '', '', 600, 0, 1, '2020-10-16 08:58:07', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('2014', '2000', 'Indirect Coombs Test', '', '', '', '', 1500, 0, 1, '2020-10-16 08:58:07', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('2015', '2000', 'Fine Niddle Aspiration', '', '', '', '', 5000, 0, 1, '2020-10-16 08:58:07', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('30001', '3000', '2H PP', '', '', '', '', 600, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('30002', '3000', '6 POINT GLUCOSE ', '', '', '', '', 3500, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('30003', '3000', 'ALP', '', '', '', '', 600, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('30004', '3000', 'ALT (SGPT)', '', '', '', '', 600, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('30005', '3000', 'ASCITIC FLUID CHEMISTRY', '', '', '', '', 2000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('30006', '3000', 'ASCITIC FLUID LDH', '', '', '', '', 1500, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('30007', '3000', 'ASCITIC FLUID PROTEIN', '', '', '', '', 1000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('30008', '3000', 'AST (SGOT)', '', '', '', '', 600, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('30009', '3000', 'Acid Phosphatase', '', '', '', '', 2000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('30010', '3000', 'Albumin', '', '', '', '', 600, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('30011', '3000', 'Albumin Creatinine Ratio (ACR)', '', '', '', '', 5000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('30012', '3000', 'BONE CHEMISTRY', '', '', '', '', 1200, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('30013', '3000', 'Bilirubin (Direct)', '', '', '', '', 600, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('30014', '3000', 'Bilirubin (Total)', '', '', '', '', 600, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('30015', '3000', 'CA - 15 - 3', '', '', '', '', 10000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('30016', '3000', 'CA 125', '', '', '', '', 7000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('30017', '3000', 'CA 19.9', '', '', '', '', 7000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('30018', '3000', 'C ? REACTIVE PROTEIN (CRP)', '', '', '', '', 6000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('30019', '3000', 'CD4 Count', '', '', '', '', 7000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('30020', '3000', 'CEA', '', '', '', '', 7000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('30021', '3000', 'CK MB', '', '', '', '', 2500, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('30022', '3000', 'CL', '', '', '', '', 600, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('30023', '3000', 'CREATIVE KINASE', '', '', '', '', 5000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('30024', '3000', 'CSF (Albumin & Glucose)', '', '', '', '', 1500, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('30025', '3000', 'CSF BIOCHEMISTRY', '', '', '', '', 1500, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('30026', '3000', 'CSF Culture', '', '', '', '', 3000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('30027', '3000', 'Calcium', '', '', '', '', 600, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('30028', '3000', 'Cholesterol', '', '', '', '', 1200, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('30029', '3000', 'Cortisol', '', '', '', '', 5000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('30030', '3000', 'Creatinine', '', '', '', '', 1000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('30031', '3000', 'Creatinine Clearance', '', '', '', '', 3000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('30032', '3000', 'D - DIMER', '', '', '', '', 6000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('30033', '3000', 'DEXAMETHASONE SUPPRESSION TEST', '', '', '', '', 25000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('30034', '3000', 'ESTRADIOL', '', '', '', '', 5000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('30035', '3000', 'FPG/FBS', '', '', '', '', 600, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('30036', '3000', 'FSH', '', '', '', '', 5000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('30037', '3000', 'GFR (Glomerula Filtration Rate)', '', '', '', '', 5000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('30038', '3000', 'GH - GLUCOSE SEPERATION TEST', '', '', '', '', 30000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('30039', '3000', 'GROWTH HORMONE', '', '', '', '', 5000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('30040', '3000', 'Gamma GT', '', '', '', '', 3500, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('30041', '3000', 'Globulin.', '', '', '', '', 600, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('30042', '3000', 'Glucose (CSF)', '', '', '', '', 600, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('30043', '3000', 'HCG', '', '', '', '', 6000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('30044', '3000', 'HCO3', '', '', '', '', 600, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('30045', '3000', 'HDL - Cholesterol', '', '', '', '', 1000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('30046', '3000', 'Hb A1 c (STRIP)', '', '', '', '', 3500, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('30047', '3000', 'INSULIN', '', '', '', '', 6000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('30048', '3000', 'Inorganic Phosphorus', '', '', '', '', 600, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('30049', '3000', 'K', '', '', '', '', 600, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('30050', '3000', 'KARYOTYPING', '', '', '', '', 70000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('30051', '3000', 'LDH', '', '', '', '', 1500, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('30052', '3000', 'LEG ULTRASOUND', '', '', '', '', 4000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('30053', '3000', 'LH', '', '', '', '', 5500, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('30054', '3000', 'LIPASE', '', '', '', '', 5000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('30055', '3000', 'LIVER FUNCTION TESTS', '', '', '', '', 3500, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('30056', '3000', 'Leg X-ray (Unilateral)', '', '', '', '', 3200, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('30057', '3000', 'MICROALBUMINURIA', '', '', '', '', 4000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('30058', '3000', 'Magnesium (Mg2+)', '', '', '', '', 1600, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('30059', '3000', 'Myoglobin', '', '', '', '', 2500, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('30060', '3000', 'Na', '', '', '', '', 600, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('30061', '3000', 'OGTT', '', '', '', '', 3500, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('30062', '3000', 'Oestrogen', '', '', '', '', 5000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('30063', '3000', 'PERICARDIAL FLUID (GLUCOSE & PROTEIN)', '', '', '', '', 2000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('30064', '3000', 'PLEURAL FLUID CHEMISTRY (GLUCOSE, PROTEIN, LDH)', '', '', '', '', 3500, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('30065', '3000', 'PROTEIN ESTIMATION', '', '', '', '', 2500, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('30066', '3000', 'PSA', '', '', '', '', 5500, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('30067', '3000', 'Pregnancy Test (BHCG Qualitative)', '', '', '', '', 600, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('30068', '3000', 'Progesterone', '', '', '', '', 5500, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('30069', '3000', 'Prolactin', '', '', '', '', 5500, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('30070', '3000', 'Protein (CSF)', '', '', '', '', 1000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('30071', '3000', 'RHEUMATOID FACTOR', '', '', '', '', 6500, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('30072', '3000', 'RPG/RBS', '', '', '', '', 600, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('30073', '3000', 'SHORT SYNAETHON STIMULATE TEST', '', '', '', '', 30000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('30074', '3000', 'STOOL REDUCING SUBSTANCES', '', '', '', '', 2000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('30075', '3000', 'T.Protein', '', '', '', '', 1000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('30076', '3000', 'T3', '', '', '', '', 2500, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('30077', '3000', 'T4', '', '', '', '', 2500, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('30078', '3000', 'TSH', '', '', '', '', 2500, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('30079', '3000', 'Testosterone', '', '', '', '', 5000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('30080', '3000', 'Triglycerides', '', '', '', '', 1000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('30081', '3000', 'Troponin-I', '', '', '', '', 6500, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('30083', '3000', 'URINARY ALBUMIN ', '', '', '', '', 5000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('30084', '3000', 'URINARY CREATININE', '', '', '', '', 1000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('30085', '3000', 'URINARY MICROALBUMIN', '', '', '', '', 5000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('30086', '3000', 'URINE CALCIUM', '', '', '', '', 600, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('30087', '3000', 'URINE DRUG', '', '', '', '', 10000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('30088', '3000', 'URINE ELECTROLYTE', '', '', '', '', 3000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('30089', '3000', 'URINE PO4', '', '', '', '', 500, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('30090', '3000', 'URINE REDUCING SUBSTANCES', '', '', '', '', 2000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('30091', '3000', 'Urea', '', '', '', '', 600, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('30092', '3000', 'Uric acid', '', '', '', '', 1000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('30093', '3000', 'WATER DEPRIVATION TEST', '', '', '', '', 50000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('30094', '3000', 'HbA1c', '', '', '', '', 6500, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('4001', '4000', 'AFP', '', '', '', '', 7000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('4002', '4000', 'ASCITIC FLUID M/C/S', '', '', '', '', 3000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('4003', '4000', 'BLOOD CULTURE*3', '', '', '', '', 9000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('4004', '4000', 'Blood Culture', '', '', '', '', 3000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('4005', '4000', 'Brain Abscess M/C/S', '', '', '', '', 3000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('4006', '4000', 'Chlamydia-Serum', '', '', '', '', 2500, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('4007', '4000', 'Chloride (csf)', '', '', '', '', 600, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('4008', '4000', 'ECHO', '', '', '', '', 10000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('4009', '4000', 'Ear M/C/S', '', '', '', '', 3000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('4010', '4000', 'Eye Swab M/C/S', '', '', '', '', 3000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('4011', '4000', 'Fungal Studies', '', '', '', '', 1500, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('4012', '4000', 'HBs Ag', '', '', '', '', 1200, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('4013', '4000', 'HCV Ab', '', '', '', '', 1200, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('4014', '4000', 'HIV Viral Load', '', '', '', '', 25000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('4015', '4000', 'HVS Culture', '', '', '', '', 3000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('4016', '4000', 'Helicobacter pylori', '', '', '', '', 1500, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('4017', '4000', 'Hepatitis B Combo.', '', '', '', '', 3200, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('4018', '4000', 'Hepatitis B Viral Load', '', '', '', '', 25000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('4019', '4000', 'Hepatitis C Viral Load', '', '', '', '', 35000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('4020', '4000', 'MALARIA PARASITES', '', '', '', '', 800, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('4021', '4000', 'Malaria RDT?s', '', '', '', '', 500, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('4022', '4000', 'PERICARDIAL AFB', '', '', '', '', 700, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('4023', '4000', 'PERICARDINAL FLUID AFB', '', '', '', '', 700, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('4024', '4000', 'PERICARDINAL FLUID M/C/S', '', '', '', '', 3000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('4025', '4000', 'PLURAL FLUID M/C/S', '', '', '', '', 3000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('4026', '4000', 'Pregnancy Test (Urine)', '', '', '', '', 600, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('4027', '4000', 'Prostatic C/S', '', '', '', '', 3000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('4028', '4000', 'Pus culture & Sen.', '', '', '', '', 3000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('4029', '4000', 'Retroviral Screening', '', '', '', '', 1600, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('4030', '4000', 'SWAB M/C/S', '', '', '', '', 3000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('4031', '4000', 'Sputum AFB', '', '', '', '', 700, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('4032', '4000', 'Sputum M/C/S', '', '', '', '', 3000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('4033', '4000', 'Stool M/C/S', '', '', '', '', 3000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('4034', '4000', 'Stool Microscopy', '', '', '', '', 500, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('4035', '4000', 'THROAT SWAB', '', '', '', '', 3000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('4036', '4000', 'TORCHES', '', '', '', '', 1000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('4037', '4000', 'URETHRAL SWAB M/C/S', '', '', '', '', 3000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('4038', '4000', 'Urinalysis', '', '', '', '', 600, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('4039', '4000', 'Urine M/C/S', '', '', '', '', 3000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('4040', '4000', 'Urine Microscopy', '', '', '', '', 500, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('4041', '4000', 'VDRL', '', '', '', '', 1400, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('4042', '4000', 'WIDAL TEST Ab.', '', '', '', '', 800, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('4043', '4000', 'Wound C/S', '', '', '', '', 3000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5001', '5000', 'ABDOMEN (KUB) X-RAY', '', '', '', '', 3200, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5002', '5000', 'ABDOMEN.', '', '', '', '', 40000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5003', '5000', 'ABDOMINAL DOPPLER USS', '', '', '', '', 13000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5004', '5000', 'ABDOMINAL ULTRASOUND SCAN', '', '', '', '', 2300, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5005', '5000', 'ANKLE', '', '', '', '', 4000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5006', '5000', 'ANKLE BOTH', '', '', '', '', 7000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5007', '5000', 'Amylase', '', '', '', '', 2500, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5008', '5000', 'Arm X-ray (Both Arms)', '', '', '', '', 7000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5009', '5000', 'Arm X-ray (Single)', '', '', '', '', 4000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5010', '5000', 'BARIUM ENEMA', '', '', '', '', 18000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5011', '5000', 'BARIUM MEAL', '', '', '', '', 15000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5012', '5000', 'BARIUM SWALLOW', '', '', '', '', 8000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5013', '5000', 'BOTH HANDS', '', '', '', '', 5000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5014', '5000', 'BRAIN', '', '', '', '', 35000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5015', '5000', 'BREAST ULTRASOUND SCAN', '', '', '', '', 3500, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5016', '5000', 'BREAST USS DOPPLER', '', '', '', '', 13000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5017', '5000', 'BUTTOCKS X-RAY', '', '', '', '', 3000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5018', '5000', 'Burnning image on DVD/CD', '', '', '', '', 1000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5019', '5000', 'CARDIAC MARKERS', '', '', '', '', 6000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5020', '5000', 'CAROTID ARTERIES DOPPLER USS', '', '', '', '', 13000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5021', '5000', 'CAVERNOSOGRAM', '', '', '', '', 20000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5022', '5000', 'CHEST', '', '', '', '', 40000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5023', '5000', 'CHEST X-RAY (AP AND LAT)', '', '', '', '', 6000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5024', '5000', 'CHEST X-RAY (AP OR PA VIEWS)', '', '', '', '', 3200, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5025', '5000', 'CHEST X-RAY (LATERAL VEIW)', '', '', '', '', 3200, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5026', '5000', 'CIRCLE OF WILLIS', '', '', '', '', 60000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5027', '5000', 'CLAVICLES', '', '', '', '', 3000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5028', '5000', 'CT-ANGIOGRAM', '', '', '', '', 55000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5029', '5000', 'CT-BRONCHOGRAPHY', '', '', '', '', 40000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5030', '5000', 'CT-CERVICAL SPINE', '', '', '', '', 35000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5031', '5000', 'CT-COLONOGRAPHY', '', '', '', '', 45000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5032', '5000', 'CT-FOOT (BOTH)', '', '', '', '', 40000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5033', '5000', 'CT-IVU', '', '', '', '', 40000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5034', '5000', 'CT-LUMBAR SPINE', '', '', '', '', 35000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5035', '5000', 'CT-MYELOGRAM', '', '', '', '', 65000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5036', '5000', 'CT-NECK', '', '', '', '', 35000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5037', '5000', 'CT-PARANASAL SINUSES', '', '', '', '', 35000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5038', '5000', 'CT-PELVIS', '', '', '', '', 40000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5039', '5000', 'CT-SHOULDER', '', '', '', '', 35000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5040', '5000', 'CT-THORACIC SPINE', '', '', '', '', 35000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5041', '5000', 'CXR REPORT', '', '', '', '', 800, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5042', '5000', 'Cervical X-ray', '', '', '', '', 4200, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5043', '5000', 'DOPPLER SCAN OF THE PENIS', '', '', '', '', 22000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5044', '5000', 'DOPPLER VELOCIMETRY', '', '', '', '', 13000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5045', '5000', 'ECG', '', '', '', '', 3400, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5046', '5000', 'ECG (Rest and Stress)', '', '', '', '', 40000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5047', '5000', 'ECS M/C/S', '', '', '', '', 3000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5048', '5000', 'ELBOW', '', '', '', '', 3200, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5049', '5000', 'ELBOW (BOTH)', '', '', '', '', 6000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5050', '5000', 'ERECT AND SUPINE', '', '', '', '', 6000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5051', '5000', 'FACIAL BONES', '', '', '', '', 4000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5052', '5000', 'FACIAL USS', '', '', '', '', 3000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5053', '5000', 'FEMUR AP/LT', '', '', '', '', 4200, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5054', '5000', 'FEMUR (BOTH)', '', '', '', '', 7500, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5055', '5000', 'FOOT (BOTH)', '', '', '', '', 6000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5056', '5000', 'FOOT AP', '', '', '', '', 4200, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5057', '5000', 'FORE ARM AP/LT', '', '', '', '', 3200, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5058', '5000', 'FORE ARM (WRIST & ELBOW)', '', '', '', '', 6000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5059', '5000', 'FORE ARM AP/LT (BOTH)', '', '', '', '', 5000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5060', '5000', 'GLUTEAL ULTRASOUND SCAN', '', '', '', '', 3000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5061', '5000', 'HAND', '', '', '', '', 3200, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5062', '5000', 'HAND (BOTH)', '', '', '', '', 6000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5063', '5000', 'HIGH RESOLUTION (SCROTAL) USS', '', '', '', '', 3200, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5064', '5000', 'HIGH RESOLUTION CT SCAN', '', '', '', '', 50000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5065', '5000', 'HIGH RESOLUTION ULTRASOUND SCAN', '', '', '', '', 3200, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5066', '5000', 'HIP', '', '', '', '', 3200, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5067', '5000', 'HIP X-RAY (Both)', '', '', '', '', 6000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5068', '5000', 'HSG', '', '', '', '', 13500, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5069', '5000', 'IVU', '', '', '', '', 17000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5070', '5000', 'JAW', '', '', '', '', 3200, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5071', '5000', 'JAW (AP/RT/LT) OBLIQUE', '', '', '', '', 6000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5072', '5000', 'KNEE', '', '', '', '', 3200, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5073', '5000', 'KNEE X RAY (BOTH)', '', '', '', '', 6000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5074', '5000', 'LDL ? Cholesterol', '', '', '', '', 1000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5075', '5000', 'LOW DOSE DEXA. SUPPESSION TEST', '', '', '', '', 25000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5076', '5000', 'LOWER LIMB DOPPLER ULTRASOUND SCAN BILATERAL', '', '', '', '', 22000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5077', '5000', 'LOWER LIMB DOPPLER ULTRASOUND SCAN UNILATERAL', '', '', '', '', 13000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5078', '5000', 'LUMBO-SACRAL', '', '', '', '', 4500, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5079', '5000', 'Leg X-ray (Bilateral)', '', '', '', '', 6000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5080', '5000', 'Lipids Profile.', '', '', '', '', 3200, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5081', '5000', 'Lower Limb (Both Limbs)', '', '', '', '', 11000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5082', '5000', 'Lower Limb (One Limb)', '', '', '', '', 6000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5083', '5000', 'MCUG', '', '', '', '', 12000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5084', '5000', 'NECK', '', '', '', '', 3000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5085', '5000', 'NECK DOPPLER ULTRASOUND SCAN', '', '', '', '', 13000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5086', '5000', 'NECK DOPPLER USS', '', '', '', '', 13000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5087', '5000', 'NECK/THORACIC AP & LAT', '', '', '', '', 6000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5088', '5000', 'NECK/THYROID ULTRASOUND SCAN', '', '', '', '', 3200, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5089', '5000', 'OBSTETRIC DOPPLER SCAN', '', '', '', '', 10000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5090', '5000', 'OBSTETRIC ULTRASOUND SCAN', '', '', '', '', 2200, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5091', '5000', 'OCCULAR ULTRASOUND SCAN', '', '', '', '', 3000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5092', '5000', 'ORBITS', '', '', '', '', 3200, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5093', '5000', 'ORBITAL CUTS / CT ORBITS', '', '', '', '', 35000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5094', '5000', 'PARANASAL SINUSES', '', '', '', '', 5000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5095', '5000', 'PAROTID ULTRASOUND SCAN', '', '', '', '', 3200, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5096', '5000', 'PELVIC ULTRASOUND SCAN', '', '', '', '', 2200, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5097', '5000', 'PELVIS X-RAY', '', '', '', '', 3200, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5098', '5000', 'PELVIS X-RAY (BOTH)', '', '', '', '', 5000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5099', '5000', 'PENILE DOPPLER USS/ CAVERNOSOGRAPHY', '', '', '', '', 22000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5100', '5000', 'PETROMASTOID CT', '', '', '', '', 35000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5101', '5000', 'POST-NASAL SPACE', '', '', '', '', 3000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5102', '5000', 'PULMONARY ANGIOGRAPHY', '', '', '', '', 60000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5103', '5000', 'RENAL DOPPLER ULTRASOUND SCAN', '', '', '', '', 15000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5104', '5000', 'RENAL ULTRASOUND SCAN', '', '', '', '', 3000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5105', '5000', 'ROUTINE ABDOMINO-PELVIC ULTRASOUND SCAN', '', '', '', '', 3200, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5106', '5000', 'RUG', '', '', '', '', 10500, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5107', '5000', 'RUG/MCUG', '', '', '', '', 14500, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5108', '5000', 'Reporting CT Scan done elsewhere', '', '', '', '', 5000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5109', '5000', 'Reporting Plain Radiographs from elsewhere', '', '', '', '', 1000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5110', '5000', 'Reporting Special X-Ray Exam done elsewhere', '', '', '', '', 3000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5111', '5000', 'SCAPULA', '', '', '', '', 3200, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5112', '5000', 'SCROTAL DOPPLER ULTRASOUND SCAN', '', '', '', '', 13000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5113', '5000', ' SCROTAL ULTRASOUND ', '', '', '', '', 3200, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5114', '5000', 'SHOULDER', '', '', '', '', 3200, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5115', '5000', 'SKULL', '', '', '', '', 3200, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5116', '5000', 'SPINE', '', '', '', '', 25000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5117', '5000', 'SUPRAPUBIC DOPPLER', '', '', '', '', 13000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5118', '5000', 'Shoulder (Both)', '', '', '', '', 6000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5119', '5000', 'TESTICULAR DOPPLER SCAN', '', '', '', '', 13000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5120', '5000', 'TESTICULAR ULTRASOUND SCAN', '', '', '', '', 3200, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5121', '5000', 'THORACIC AP & LATERAL', '', '', '', '', 3200, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5122', '5000', 'THORACO-LUMBAR', '', '', '', '', 4000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5123', '5000', 'THORACO-LUMBO-SACRAL', '', '', '', '', 6000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5124', '5000', 'TRANS-PERINEAL ULRASOUND SCAN', '', '', '', '', 3200, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5125', '5000', 'TRANS-RECTAL ULTRASOUND SCAN', '', '', '', '', 3200, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5126', '5000', 'TRANS-VAGINAL ULTRASOUND SCAN', '', '', '', '', 6000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5127', '5000', 'TRANSCRANIAL DOPPLER ULTRASOUND SCAN', '', '', '', '', 10000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5128', '5000', 'TRANSFRONTANNEL ULTRASOUND SCAN', '', '', '', '', 3000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5129', '5000', 'UPPER LIMB (BOTH)', '', '', '', '', 11000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5130', '5000', 'UPPER LIMB DOPPLER USS', '', '', '', '', 13000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5131', '5000', 'UPPER LIMB DOPPLER USS (BOTH)', '', '', '', '', 22000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5132', '5000', 'UPPER LIMB ULTRASOUND SCAN', '', '', '', '', 13000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5133', '5000', 'UPPER LIMB X-RAY (ONE LIMB)', '', '', '', '', 6000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5134', '5000', 'WRIST', '', '', '', '', 3200, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5135', '5000', 'WRIST (BOTH)', '', '', '', '', 6000, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('5136', '5000', 'hs CRP', '', '', '', '', 2500, 0, 1, '2020-10-16 09:02:48', '', '966a89f6-05d8-4564-b319-2f8863821e75', ''),
('300951', '30095', 'Urea', 'mmol/L', '2.1', '6.9', 'Blood', 600, 0, 0, '2020-10-16 10:20:01', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', 'admin'),
('300953', '30095', 'K', 'mmol/L', '3.0', '5.6', 'Blood', 600, 0, 0, '2020-10-16 10:20:01', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', 'admin'),
('300952', '30095', 'Na', 'mmol/L', '130', '146', 'Blood', 600, 0, 0, '2020-10-16 10:20:01', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', 'admin'),
('30095', '3000', 'Urea, Electrolyte & Creatinine', '', '', '', 'Blood', 0, 0, 2, '2020-10-16 10:20:01', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', 'admin'),
('300955', '30095', 'CL', 'mmol/L', '94', '108', 'Blood', 600, 0, 0, '2020-10-16 10:20:02', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', 'admin'),
('300954', '30095', 'HCO3', 'mmol/L', '20', '28', 'Blood', 600, 0, 0, '2020-10-16 10:20:02', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', 'admin'),
('300956', '30095', 'Creatinine', 'mmol/L', '30', '111', 'Blood', 600, 0, 0, '2020-10-16 10:20:03', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', 'admin'),
('30096', '3000', 'Lipid Profile', '', '', '', '', 0, 0, 1, '2020-10-17 08:36:15', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', 'admin'),
('300962', '30096', 'LDL ? Cholesterol', '', '', '', '', 1000, 0, 0, '2020-10-17 08:36:15', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', 'admin'),
('300961', '30096', 'Cholesterol', '', '', '', '', 1200, 0, 0, '2020-10-17 08:36:15', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', 'admin'),
('300963', '30096', 'HDL - Cholesterol', '', '', '', '', 1000, 0, 0, '2020-10-17 08:36:15', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', 'admin'),
('300964', '30096', 'Triglycerides', '', '', '', '', 1000, 0, 0, '2020-10-17 08:36:15', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', 'admin'),
('30097', '3000', 'Liver Function Test (LFT)', '', '', '', '', 0, 0, 1, '2020-10-17 08:46:17', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', 'admin'),
('300971', '30097', 'ALP', 'U/L', '42', '110', '', 600, 0, 0, '2020-10-17 08:46:17', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', 'admin'),
('300972', '30097', 'ALT (SGPT)', 'U/L', '4', '34', '', 600, 0, 0, '2020-10-17 08:46:17', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', 'admin'),
('300973', '30097', 'AST (SGOT)', 'U/L', '7', '45', '', 600, 0, 0, '2020-10-17 08:46:17', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', 'admin'),
('300974', '30097', 'Gamma GT', 'U/L', '8', '46', '', 3500, 0, 0, '2020-10-17 08:46:17', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', 'admin'),
('300975', '30097', 'Bilirubin (Total)', 'umol/L', '4', '18', '', 600, 0, 0, '2020-10-17 08:46:17', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', 'admin'),
('300976', '30097', 'Bilirubin (Direct)', 'umol/L', '0', '7', '', 600, 0, 0, '2020-10-17 08:46:17', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', 'admin'),
('300977', '30097', 'T.Protein', 'g/L', '59', '86', '', 1000, 0, 0, '2020-10-17 08:46:17', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', 'admin'),
('300978', '30097', 'Albumin', 'g/L', '32', '51', '', 600, 0, 0, '2020-10-17 08:46:17', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', 'admin'),
('300979', '30097', 'Globulin.', 'g/L', '20', '43', '', 600, 0, 0, '2020-10-17 08:46:18', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', 'admin'),
('30099', '3000', 'Ceresbrospinal Fluid (CSF)', '', '', '', '', 0, 0, 1, '2020-10-17 09:09:25', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', 'admin'),
('300992', '30099', 'Protein (CSF)', 'mg/dl', '15', '40', '', 1000, 0, 0, '2020-10-17 09:09:25', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', 'admin'),
('300993', '30099', 'Chloride (csf)', 'mmol/L', '', '', '', 600, 0, 0, '2020-10-17 09:09:25', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', 'admin'),
('300991', '30099', 'Glucose (CSF)', 'mg/dl', '2.5', '4.4', '', 600, 0, 0, '2020-10-17 09:09:25', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', 'admin'),
('30098', '3000', 'Tumor Markers', '', '', '', '', 0, 0, 1, '2020-10-17 09:19:54', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', 'admin'),
('300985', '30098', 'CA - 15 - 3', '', '', '', '', 10000, 0, 0, '2020-10-17 09:19:54', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', 'admin'),
('300986', '30098', 'VITAMIN B12', '', '', '', '', 8000, 0, 0, '2020-10-17 09:19:54', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', 'admin'),
('300987', '30098', 'FOLATE', '', '', '', '', 8000, 0, 0, '2020-10-17 09:19:54', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', 'admin'),
('300989', '30098', 'AFP', 'U/L', '0', '5', '', 7000, 0, 0, '2020-10-17 09:19:54', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', 'admin'),
('3009810', '30098', 'Amylase', '', '', '', '', 2500, 0, 0, '2020-10-17 09:19:54', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', 'admin'),
('3009811', '30098', 'LIPASE', '', '', '', '', 5000, 0, 0, '2020-10-17 09:19:54', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', 'admin'),
('300983', '30098', 'CEA', '', '', '', '', 7000, 0, 0, '2020-10-17 09:19:54', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', 'admin'),
('300981', '30098', 'PSA', 'ng/ml', '0', '4', '', 5500, 0, 0, '2020-10-17 09:19:54', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', 'admin'),
('300982', '30098', 'HCG', 'm/u/l', '', '<4', '', 6000, 0, 0, '2020-10-17 09:19:54', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', 'admin'),
('300984', '30098', 'CA 125', '', '', '', '', 7000, 0, 0, '2020-10-17 09:19:55', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', 'admin'),
('300100', '3000', 'Hormones', '', '', '', '', 0, 0, 0, '2020-10-17 09:28:09', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', 'admin'),
('30010012', '300100', 'C - REACTIVE PROTEIN (CRP)', '', '', '', '', 6000, 0, 0, '2020-10-17 09:28:09', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', 'admin'),
('30010013', '300100', 'HbA1c', '', '', '', '', 6500, 0, 0, '2020-10-17 09:28:09', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', 'admin'),
('30010014', '300100', 'ESTRADIOL', '', '', '', '', 5000, 0, 0, '2020-10-17 09:28:09', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', 'admin'),
('3001001', '300100', 'Prolactin', 'mu/L', '72', '511', '', 5500, 0, 0, '2020-10-17 09:28:09', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', 'admin'),
('3001002', '300100', 'Testosterone', 'ng/ml', '', '', '', 5000, 0, 0, '2020-10-17 09:28:09', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', 'admin'),
('3001003', '300100', 'T3', 'nmol/L', '1.3', '3.1', '', 2500, 0, 0, '2020-10-17 09:28:09', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', 'admin'),
('3001004', '300100', 'T4', 'nmol/L', '66', '181', '', 2500, 0, 0, '2020-10-17 09:28:09', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', 'admin'),
('3001005', '300100', 'TSH', 'mu/L', '0.3', '4.2', '', 2500, 0, 0, '2020-10-17 09:28:09', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', 'admin'),
('3001006', '300100', 'Oestrogen', 'pg/ml', '', '', '', 5000, 0, 0, '2020-10-17 09:28:10', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', 'admin'),
('3001007', '300100', 'Troponin-I', 'lng/L', '', '', '', 6500, 0, 0, '2020-10-17 09:28:10', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', 'admin'),
('3001008', '300100', 'RHEUMATOID FACTOR', '', '', '', '', 6500, 0, 0, '2020-10-17 09:28:10', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', 'admin'),
('3001009', '300100', 'Progesterone', 'ng/I', '', '', '', 5500, 0, 0, '2020-10-17 09:28:10', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', 'admin'),
('30010010', '300100', 'D - DIMER', '', '', '', '', 6000, 0, 0, '2020-10-17 09:28:10', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', 'admin'),
('30010011', '300100', 'Cortisol', '', '', '', '', 5000, 0, 0, '2020-10-17 09:28:10', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', 'admin'),
('20161', '2016', 'Test 1', 'mol', '1', '2', 'EDTA Blood', 500, 20, 0, '2020-10-19 09:24:47', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', 'admin'),
('2016', '2000', 'Test Group', '', '', '', 'EDTA Blood', 0, 20, 2, '2020-10-19 09:24:47', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', 'admin'),
('20162', '2016', 'Test 2', 'mol', '3', '4', 'EDTA Blood', 1000, 20, 0, '2020-10-19 09:24:47', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', 'admin'),
('20171', '2017', 'test 3', 'mmol', '1', '5', 'Floride Fasting', 1000, 25, 2, '2020-10-19 11:31:10', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', 'admin'),
('20172', '2017', 'test 4', 'mmol', '5', '10', 'Floride Fasting', 900, 25, 2, '2020-10-19 11:31:10', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', 'admin'),
('2017', '2000', 'Group 2', '', '', '', 'Floride Fasting', 0, 25, 0, '2020-10-19 11:31:10', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', 'admin'),
('1000', '', 'PSC Prime Lab', NULL, NULL, NULL, '', NULL, 0, 0, '2020-11-01 06:16:47', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', ''),
('2000', '1000', 'Hematology', '', '', '', 'Blood', 0, 0, 2, '2020-11-01 06:18:04', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'emaitee'),
('20001', '2000', '', '', '', '', 'Blood', 0, 0, 0, '2020-11-01 06:18:04', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'emaitee'),
('3000', '1000', 'Chemical Pathology', NULL, NULL, NULL, '', NULL, 0, 0, '2020-11-01 06:47:18', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', ''),
('3001', '3000', 'Urea, Electrolyte & Creatinine', '', '', '', 'Blood + Serum', 0, 0, 2, '2020-11-01 06:22:36', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'emaitee'),
('30014', '3001', 'HCO3', 'mmol/L', '20', '28', 'Blood + Serum', 600, 0, 0, '2020-11-01 06:22:36', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'emaitee'),
('30011', '3001', 'Urea', 'mmol/L', '2.1', '6.9', 'Blood + Serum', 600, 0, 0, '2020-11-01 06:22:36', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'emaitee'),
('30012', '3001', 'Na', 'mmol/L', '130', '146', 'Blood + Serum', 600, 0, 0, '2020-11-01 06:22:36', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'emaitee'),
('30015', '3001', 'CL', 'mmol/L', '94', '108', 'Blood + Serum', 600, 0, 0, '2020-11-01 06:22:36', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'emaitee'),
('30016', '3001', 'Creatinine', 'mmol/L', '30', '111', 'Blood + Serum', 1000, 0, 0, '2020-11-01 06:22:36', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'emaitee'),
('30013', '3001', 'K', 'mmol/L', '3.0', '5.6', 'Blood + Serum', 600, 0, 0, '2020-11-01 06:22:36', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'emaitee');

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

--
-- Table structure for table `lab_setup2`
--

CREATE TABLE `lab_setup2` (
  `id` int(100) NOT NULL DEFAULT 0,
  `subhead` varchar(100) CHARACTER SET latin1 DEFAULT NULL,
  `head` varchar(100) CHARACTER SET latin1 DEFAULT NULL,
  `description` varchar(200) CHARACTER SET latin1 NOT NULL,
  `unit` varchar(100) CHARACTER SET latin1 DEFAULT NULL,
  `range_from` varchar(100) CHARACTER SET latin1 DEFAULT NULL,
  `range_to` varchar(100) CHARACTER SET latin1 DEFAULT NULL,
  `specimen` varchar(100) CHARACTER SET latin1 DEFAULT NULL,
  `price` int(100) DEFAULT NULL,
  `noOfLabels` int(11) NOT NULL,
  `created_at` timestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `updated_at` varchar(100) CHARACTER SET latin1 DEFAULT NULL,
  `facilityId` varchar(50) CHARACTER SET latin1 NOT NULL,
  `created_by` varchar(50) CHARACTER SET latin1 NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `lab_setup2`
--

INSERT INTO `lab_setup2` (`id`, `subhead`, `head`, `description`, `unit`, `range_from`, `range_to`, `specimen`, `price`, `noOfLabels`, `created_at`, `updated_at`, `facilityId`, `created_by`) VALUES
(2, '', 'Optimum Diagnostics', '', NULL, NULL, NULL, '', NULL, 0, '2020-08-16 09:30:37', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', ''),
(3, 'Optimum Diagnostics', 'Hematology', '', NULL, NULL, NULL, 'Swab', NULL, 0, '2020-08-23 16:00:26', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', ''),
(13, 'Hematology', 'Full Blood Count', '', '', '', '', 'Blood', 0, 0, '2020-08-28 07:46:53', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', '41'),
(14, 'Full Blood Count', 'PCV', '', '%', '', '', 'Blood', 300, 0, '2020-08-28 07:46:53', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', '41'),
(15, 'Full Blood Count', 'Hb', '', 'g/dl', '', '', 'Blood', 500, 0, '2020-08-28 07:46:53', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', '41'),
(16, 'Full Blood Count', 'RBC', '', 'x10^12/L', '', '', 'Blood', 900, 0, '2020-08-28 07:46:53', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', '41'),
(17, 'Full Blood Count', 'MCV', '', 'FI', '', '', 'Blood', 900, 0, '2020-08-28 07:46:53', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', '41'),
(18, 'Full Blood Count', 'MCHC', '', 'g/dl', '', '', 'Blood', 200, 0, '2020-08-28 07:46:53', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', '41'),
(19, 'Full Blood Count', 'WBC', '', '10/L', '', '', 'Blood', 300, 0, '2020-08-28 07:46:53', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', '41'),
(20, 'Full Blood Count', 'Neutropils', '', '%', '', '', 'Blood', 400, 0, '2020-08-28 07:46:53', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', '41'),
(21, 'Full Blood Count', 'Lymphoytes', '', '%', '', '', 'Blood', 150, 0, '2020-08-28 07:46:53', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', '41'),
(22, 'Full Blood Count', 'Ecsinophils', '', '%', '', '', 'Blood', 450, 0, '2020-08-28 07:46:53', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', '41'),
(23, 'Full Blood Count', 'Basophils', '', '%', '', '', 'Blood', 200, 0, '2020-08-28 07:46:53', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', '41'),
(24, 'Full Blood Count', 'Moncoytes', '', '%', '', '', 'Blood', 100, 0, '2020-08-28 07:46:53', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', '41'),
(25, 'Full Blood Count', 'Others', '', '', '', '', 'Blood', 200, 0, '2020-08-28 07:46:53', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', '41'),
(28, 'Hematology', 'Prombtrobir time', '', '', '', '', '', 0, 0, '2020-08-28 12:02:01', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', '41'),
(29, 'Prombtrobir time', 'Control', '', 'secs', '', '', '', 0, 0, '2020-08-28 12:02:01', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', '41'),
(32, 'Optimum Diagnostics', 'Chemical Pathology', '', NULL, NULL, NULL, '', NULL, 0, '2020-08-28 15:21:52', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', ''),
(33, 'Chemical Pathology', 'Blood Glucose', '', '', '', '', '', 0, 0, '2020-08-28 15:28:00', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', '41'),
(34, 'Blood Glucose', 'Random', '', 'mmol/L', '3.0', '8.2', '', 900, 0, '2020-08-28 15:28:00', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', '41'),
(35, 'Blood Glucose', 'Fasting', '', 'mmol/L', '3.0', '5.8', '', 500, 0, '2020-08-28 15:28:00', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', '41'),
(36, 'Blood Glucose', '2hrs PP', '', 'mmol', '', '', '', 200, 0, '2020-08-28 15:28:00', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', '41'),
(37, 'Chemical Pathology', 'Cardiac Enzymes', '', '', '', '', '', 0, 0, '2020-08-28 15:35:34', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', '41'),
(38, 'Cardiac Enzymes', 'AST', '', 'U/L', '948', '', '', 900, 0, '2020-08-28 15:35:34', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', '41'),
(39, 'Cardiac Enzymes', 'CPK', '', 'AU/L', '24', '17', '', 500, 0, '2020-08-28 15:35:34', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', '41'),
(40, 'Cardiac Enzymes', 'CKMB (Female)', '', 'U/L', '0.1', '0.49', '', 500, 0, '2020-08-28 15:35:34', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', '41'),
(41, 'Cardiac Enzymes', 'CKMB (Male)', '', 'U/L', '0.2', '0.88', '', 500, 0, '2020-08-28 15:35:34', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', '41'),
(42, 'Optimum Diagnostics', 'Microbiology', '', '', '', '', '', 0, 0, '2020-08-28 17:34:26', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', '41'),
(43, 'Microbiology', 'Analysis', '', '', '', '', '', 1000, 0, '2020-08-28 17:34:26', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', '41'),
(44, 'Microbiology', 'Microscopy (Special)', '', '', '', '', '', 900, 0, '2020-08-28 17:34:26', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', '41'),
(45, 'Microbiology', 'Culture and Sensitivity', '', '', '', '', '', 500, 0, '2020-08-28 17:34:26', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', '41'),
(46, 'Microbiology', 'Microscopy (General)', '', '', '', '', '', 500, 0, '2020-08-28 17:34:26', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', '41'),
(47, 'Optimum Diagnostics', 'Radiology', '', '', '', '', '', 0, 0, '2020-08-28 18:21:11', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', '41'),
(48, 'Radiology', 'ABDOMEN (Bilateral View) X-RAY', '', '', '', '', '', 5800, 0, '2020-08-28 18:21:11', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', '41'),
(53, 'Urea, Electrolyes & Creatinine', 'Na', '', 'mmol/L', '130', '146', '', 500, 0, '2020-08-31 06:45:31', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', '41'),
(54, 'Urea, Electrolyes & Creatinine', 'Urea', '', 'mmol/L', '2.1', '6.9', '', 500, 0, '2020-08-31 06:45:31', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', '41'),
(55, 'Chemical Pathology', 'Urea, Electrolyes & Creatinine', '', '', '', '', '', 0, 0, '2020-08-31 06:45:31', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', '41'),
(56, 'Urea, Electrolyes & Creatinine', 'K', '', 'mmol/L', '30', '5.6', '', 500, 0, '2020-08-31 06:45:31', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', '41'),
(57, 'Urea, Electrolyes & Creatinine', 'HCO3', '', 'mmol/L', '20', '28', '', 500, 0, '2020-08-31 06:45:31', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', '41'),
(58, 'Urea, Electrolyes & Creatinine', 'CL', '', 'mmol/L', '94', '108', '', 500, 0, '2020-08-31 06:45:31', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', '41'),
(59, 'Urea, Electrolyes & Creatinine', 'Creatinine', '', 'mmol/L', '30', '111', '', 1000, 0, '2020-08-31 06:45:31', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', '41'),
(60, 'Urea, Electrolyes & Creatinine', 'Creatinine Clearance', '', 'mmol/L', '30', '111', '', 2500, 0, '2020-08-31 06:45:31', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', '41'),
(61, 'Chemical Pathology', 'Bormones', '', '', '', '', '', 0, 0, '2020-08-31 06:50:30', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', '41'),
(62, 'Bormones', 'T3', '', 'mmol/L', '1.3', '3.1', '', 0, 0, '2020-08-31 06:50:30', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', '41'),
(63, 'Microbiology', 'Serology', '', '', '', '', '', 0, 0, '2020-08-31 06:58:25', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', '41'),
(64, 'Serology', 'Chlamydia', '', '', '', '', '', 2500, 0, '2020-08-31 06:58:25', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', '41'),
(65, 'Serology', 'RVS', '', '', '', '', '', 0, 0, '2020-08-31 06:58:25', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', '41'),
(66, 'Serology', 'Helicobacter pylori', '', '', '', '', '', 1500, 0, '2020-08-31 06:58:25', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', '41'),
(67, 'Serology', 'Aso titer', '', '', '', '', '', 500, 0, '2020-08-31 06:58:25', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', '41'),
(68, 'Serology', 'HCVab', '', '', '', '', '', 1000, 0, '2020-08-31 06:58:25', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', '41'),
(69, 'Serology', 'VDRL', '', '', '', '', '', 1200, 0, '2020-08-31 06:58:25', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', '41'),
(70, 'Chemical Pathology', 'Test', '', '', '', '', 'Blood', 0, 0, '2020-09-18 16:48:58', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', 'admin'),
(71, 'Test', 'test2', '', 'mm', '31', '60', 'Blood', 1000, 0, '2020-09-18 16:48:58', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', 'admin'),
(72, 'Test', 'test1', '', 'mmol/L', '1', '2', 'Blood', 500, 0, '2020-09-18 16:48:58', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', 'admin');

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

--
-- Table structure for table `main_account`
--

CREATE TABLE `main_account` (
  `code` varchar(20) NOT NULL,
  `Description` varchar(50) NOT NULL,
  `type` int(11) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `main_account`
--

INSERT INTO `main_account` (`code`, `Description`, `type`) VALUES
('100010', 'Capital Account', 4),
('100020', 'Deposit Account', 4),
('100030', 'Suupliers Account', 4),
('600010', 'cash Account', 3),
('600020', 'Bank Account', 3),
('700010', 'Wages', 1),
('700020', 'Fuel', 1),
('800020', 'Drugs', 2),
('800010', 'Labs', 2);

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

--
-- Table structure for table `members`
--

CREATE TABLE `members` (
  `name` varchar(50) NOT NULL,
  `email` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `members`
--

INSERT INTO `members` (`name`, `email`) VALUES
('adi', 'kamal'),
('abbba', 'sanio'),
('kamilu', 'danbata'),
('abba', 'collipad'),
('sarki', 'aliyu'),
('aminu', 'salim'),
('undefined', 'undefined'),
('undefined', 'undefined'),
('undefined', 'undefined'),
('undefined', 'undefined'),
('undefined', 'mubrak@gmail.ocm');

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

--
-- Table structure for table `monthly_register`
--

CREATE TABLE `monthly_register` (
  `code` int(11) NOT NULL,
  `month` varchar(20) NOT NULL,
  `amount` int(11) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `created_by` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `operationnotes`
--

CREATE TABLE `operationnotes` (
  `facilityId` varchar(50) DEFAULT NULL,
  `id` int(11) NOT NULL,
  `date` varchar(20) DEFAULT NULL,
  `patientId` varchar(10) NOT NULL,
  `diagnosis` varchar(150) DEFAULT NULL,
  `surgeons` varchar(300) DEFAULT NULL,
  `surgery` varchar(150) DEFAULT NULL,
  `anesthetist` varchar(80) DEFAULT NULL,
  `anesthetic` varchar(20) DEFAULT NULL,
  `scrubNurse` varchar(30) DEFAULT NULL,
  `remarks` varchar(50) DEFAULT NULL,
  `name` varchar(100) DEFAULT NULL,
  `pintsGiven` varchar(10) DEFAULT NULL,
  `bloodLoss` varchar(15) DEFAULT NULL,
  `intraOpAntibiotics` varchar(20) DEFAULT NULL,
  `intraOpFindings` varchar(2000) DEFAULT NULL,
  `procedureNotes` varchar(2000) DEFAULT NULL,
  `pathologyRequest` varchar(2000) DEFAULT NULL,
  `postOpOrder` varchar(1500) DEFAULT NULL,
  `createdAt` timestamp NOT NULL DEFAULT current_timestamp(),
  `updatedAt` varchar(50) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `operationnotes`
--

INSERT INTO `operationnotes` (`facilityId`, `id`, `date`, `patientId`, `diagnosis`, `surgeons`, `surgery`, `anesthetist`, `anesthetic`, `scrubNurse`, `remarks`, `name`, `pintsGiven`, `bloodLoss`, `intraOpAntibiotics`, `intraOpFindings`, `procedureNotes`, `pathologyRequest`, `postOpOrder`, `createdAt`, `updatedAt`) VALUES
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 7, '28-2', 'Tonsilliti', 'Dr. Hamisu Abdullahi', 'Tonsillectomy', 'Ahassan', 'GA', '', 'Satisfactory', 'AZIZA ALI-MUKTAR', '', '', '', '', '', '', '', '2019-12-10 23:25:14', '2020-01-05 21:34:26', '1');

--
-- Triggers `operationnotes`
--
DELIMITER $$
CREATE TRIGGER `default_date` BEFORE INSERT ON `operationnotes` FOR EACH ROW if ( isnull(new.date) ) then
 set new.date=curdate();
end if
$$
DELIMITER ;
DELIMITER $$
CREATE TRIGGER `set_op_notes_updateAt` BEFORE UPDATE ON `operationnotes` FOR EACH ROW SET NEW.updatedAt = NOW()
$$
DELIMITER ;

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

--
-- Stand-in structure for view `overview`
-- (See below for the actual view)
--
CREATE TABLE `overview` (
`drug` varchar(20)
,`quantity_bought` int(11)
,`amount_bought` double
,`quantity_in_store` varchar(50)
,`amount_in_store` double
,`quantity_sold` int(11)
,`amount_sold` bigint(22)
,`quantity_in_shelf` bigint(12)
,`amount_in_shelf` bigint(23)
,`sales_date` timestamp
,`purchase_date` datetime
,`facilityId` varchar(50)
);

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

--
-- Stand-in structure for view `overview_wo_store`
-- (See below for the actual view)
--
CREATE TABLE `overview_wo_store` (
`drug` varchar(20)
,`price` bigint(12)
,`quantity_in_shelf` decimal(33,0)
,`amount_in_shelf` decimal(44,0)
,`quantity_sold` decimal(33,0)
,`amount_sold` decimal(44,0)
,`expiry_date` varchar(10)
,`created_at` timestamp
,`facilityId` varchar(50)
);

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

--
-- Table structure for table `patientfileinfo`
--

CREATE TABLE `patientfileinfo` (
  `id` int(11) NOT NULL,
  `accountNo` varchar(7) NOT NULL,
  `firstname` varchar(50) NOT NULL,
  `surname` varchar(50) NOT NULL,
  `beneficiaries` int(5) NOT NULL,
  `balance` int(11) NOT NULL,
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `patientfileno`
--

CREATE TABLE `patientfileno` (
  `id` int(11) NOT NULL,
  `facilityId` varchar(50) DEFAULT NULL,
  `accountNo` int(7) NOT NULL,
  `accName` varchar(50) DEFAULT NULL,
  `description` varchar(100) DEFAULT NULL,
  `accountType` varchar(50) NOT NULL,
  `contactName` varchar(100) NOT NULL,
  `contactAddress` varchar(500) NOT NULL,
  `contactPhone` varchar(20) NOT NULL,
  `contactEmail` varchar(50) NOT NULL,
  `contactWebsite` varchar(50) NOT NULL,
  `firstname` varchar(50) DEFAULT NULL,
  `surname` varchar(50) DEFAULT NULL,
  `beneficiaries` bigint(21) NOT NULL DEFAULT 0,
  `balance` int(11) NOT NULL DEFAULT 0,
  `status` varchar(50) NOT NULL DEFAULT 'pending',
  `guarantor_name` varchar(50) NOT NULL,
  `guarantor_address` varchar(100) NOT NULL,
  `guarantor_phone` varchar(20) NOT NULL,
  `createdAt` datetime NOT NULL DEFAULT current_timestamp(),
  `created_by` varchar(50) NOT NULL,
  `approved_at` datetime NOT NULL,
  `approved_by` varchar(50) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `patientfileno`
--

INSERT INTO `patientfileno` (`id`, `facilityId`, `accountNo`, `accName`, `description`, `accountType`, `contactName`, `contactAddress`, `contactPhone`, `contactEmail`, `contactWebsite`, `firstname`, `surname`, `beneficiaries`, `balance`, `status`, `guarantor_name`, `guarantor_address`, `guarantor_phone`, `createdAt`, `created_by`, `approved_at`, `approved_by`) VALUES
(1, '6c6af0c0-35ea-40d8-a928-b13a9766113a', 1, 'Instant Payment', NULL, 'Family', '', '', '', '', '', NULL, NULL, 0, 80920, 'approved', '', '', '', '2020-10-20 08:27:36', '', '0000-00-00 00:00:00', ''),
(2, '6c6af0c0-35ea-40d8-a928-b13a9766113a', 2, 'Adamu Aliyu', NULL, 'Family', '', '', '09065467832', '', '', NULL, NULL, 0, -3100, 'approved', '', '', '', '2020-10-20 08:34:40', '', '0000-00-00 00:00:00', ''),
(3, '966a89f6-05d8-4564-b319-2f8863821e75', 1, 'Instant Payment', NULL, 'Family', '', '', '', '', '', NULL, NULL, 0, -3000, 'approved', '', '', '', '2020-10-31 10:36:04', '', '0000-00-00 00:00:00', ''),
(4, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 1, 'Instant Payment', NULL, 'Family', '', '', '', '', '', NULL, NULL, 0, -7000, 'approved', '', '', '', '2020-10-31 11:30:50', '', '0000-00-00 00:00:00', ''),
(5, 'd8d7a732-1832-4e25-9a98-e68ddc3f0b26', 1, 'Adewale ', NULL, 'Family', '', '', '09065467832', '', '', NULL, NULL, 0, -2000, 'approved', '', '', '', '2020-11-02 13:55:02', '', '0000-00-00 00:00:00', ''),
(6, 'd8d7a732-1832-4e25-9a98-e68ddc3f0b26', 2, 'Muritala Salami', NULL, 'Family', '', '', '', '', '', NULL, NULL, 0, -5000, 'approved', '', '', '', '2020-11-02 13:59:14', '', '0000-00-00 00:00:00', ''),
(7, 'd8d7a732-1832-4e25-9a98-e68ddc3f0b26', 3, 'Isah Muhammad', NULL, 'Family', '', '', '09065467832', '', '', NULL, NULL, 0, -40000, 'approved', '', '', '', '2020-11-02 14:21:01', '', '0000-00-00 00:00:00', ''),
(8, 'd8d7a732-1832-4e25-9a98-e68ddc3f0b26', 4, 'Mustapha Issa,Toyin', NULL, 'Family', '', '45B Lamido Crescent, Nassarawa G.R.A Kano', '', 'dev.issatoyin@gmail.com', '', NULL, NULL, 0, 5000, 'approved', '', '', '', '2020-11-02 14:29:34', '', '0000-00-00 00:00:00', ''),
(9, 'd8d7a732-1832-4e25-9a98-e68ddc3f0b26', 5, 'Adeyemo Wasiu', NULL, 'Family', '', '', '', '', '', NULL, NULL, 0, 11000, 'approved', '', '', '', '2020-11-02 14:32:04', '', '0000-00-00 00:00:00', ''),
(10, 'd8d7a732-1832-4e25-9a98-e68ddc3f0b26', 6, 'Mustapha Issa,Toyin', NULL, 'Family', '', '', '', '', '', NULL, NULL, 0, -4000, 'approved', 'Mustapha', 'No 146 Alimi road, ilorin. kwara st', '12334i34', '2020-11-03 04:56:36', '', '0000-00-00 00:00:00', ''),
(11, 'd8d7a732-1832-4e25-9a98-e68ddc3f0b26', 7, 'Instant Payment', NULL, 'Family', '', '', '', '', '', NULL, NULL, 0, 0, 'approved', '', '', '', '2020-11-03 05:19:25', '', '0000-00-00 00:00:00', '');

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

--
-- Table structure for table `patientrecords`
--

CREATE TABLE `patientrecords` (
  `facilityId` varchar(50) NOT NULL,
  `title` varchar(10) DEFAULT NULL,
  `surname` varchar(50) DEFAULT NULL,
  `firstname` varchar(50) DEFAULT NULL,
  `other` varchar(50) DEFAULT NULL,
  `Gender` varchar(10) DEFAULT NULL,
  `age` int(3) DEFAULT 0,
  `maritalstatus` varchar(20) DEFAULT '0',
  `DOB` varchar(20) DEFAULT NULL,
  `dateCreated` datetime DEFAULT current_timestamp(),
  `phoneNo` varchar(30) DEFAULT '',
  `email` varchar(50) DEFAULT '',
  `state` varchar(50) DEFAULT '',
  `lga` varchar(50) DEFAULT '',
  `occupation` varchar(50) DEFAULT '',
  `address` varchar(500) DEFAULT '',
  `kinName` varchar(100) DEFAULT '',
  `kinRelationship` varchar(20) DEFAULT '',
  `kinPhone` varchar(30) NOT NULL DEFAULT '0',
  `kinEmail` varchar(50) NOT NULL DEFAULT '0',
  `kinAddress` varchar(500) NOT NULL DEFAULT '0',
  `accountNo` int(7) NOT NULL,
  `beneficiaryNo` int(3) NOT NULL,
  `balance` int(11) NOT NULL DEFAULT 0,
  `id` varchar(10) NOT NULL,
  `patient_id` int(11) NOT NULL,
  `enteredBy` varchar(20) DEFAULT NULL,
  `patientStatus` varchar(10) DEFAULT NULL,
  `assigned_to` varchar(20) DEFAULT NULL,
  `createdAt` varchar(20) DEFAULT NULL,
  `date_assigned` datetime DEFAULT NULL,
  `status` varchar(50) NOT NULL DEFAULT 'registered',
  `hematology` varchar(20) NOT NULL,
  `microbiology` varchar(20) NOT NULL,
  `chem_path` varchar(20) NOT NULL,
  `radiology` varchar(20) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `patientrecords`
--

INSERT INTO `patientrecords` (`facilityId`, `title`, `surname`, `firstname`, `other`, `Gender`, `age`, `maritalstatus`, `DOB`, `dateCreated`, `phoneNo`, `email`, `state`, `lga`, `occupation`, `address`, `kinName`, `kinRelationship`, `kinPhone`, `kinEmail`, `kinAddress`, `accountNo`, `beneficiaryNo`, `balance`, `id`, `patient_id`, `enteredBy`, `patientStatus`, `assigned_to`, `createdAt`, `date_assigned`, `status`, `hematology`, `microbiology`, `chem_path`, `radiology`) VALUES
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', NULL, 'Instant', 'Payment', NULL, '', 0, '', '', '2020-10-31 11:30:51', '', 'undefined', '', '', '', '', '', '', '0', '0', '0', 1, 1, 0, '1-1', 1, NULL, NULL, NULL, NULL, NULL, 'registered', '', '', '', ''),
('6c6af0c0-35ea-40d8-a928-b13a9766113a', NULL, 'Instant', 'Payment', NULL, '', 0, '', '', '2020-10-20 08:27:36', '', 'undefined', '', '', '', '', '', '', '0', '0', '0', 1, 1, 0, '1-1', 1, NULL, NULL, NULL, NULL, NULL, 'registered', '', '', '', ''),
('966a89f6-05d8-4564-b319-2f8863821e75', NULL, 'Instant', 'Payment', NULL, '', 0, '', '', '2020-10-31 10:36:04', '', 'undefined', '', '', '', '', '', '', '0', '0', '0', 1, 1, 0, '1-1', 1, NULL, NULL, NULL, NULL, NULL, 'registered', '', '', '', ''),
('d8d7a732-1832-4e25-9a98-e68ddc3f0b26', NULL, 'Adewale', '', NULL, '', 0, '', '', '2020-11-02 13:55:03', '', 'undefined', '', '', '', '', '', '', '0', '0', '0', 1, 1, 0, '1-1', 1, NULL, NULL, NULL, NULL, NULL, 'registered', '', '', '', ''),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', NULL, 'John', 'Snow', '', 'Male', 0, '0', '2000-10-31', '2020-10-31 11:35:29', '', '', '', '', '', '', '', '', '0', '0', '0', 1, 0, 0, '', 2, NULL, NULL, NULL, NULL, NULL, 'registered', '', '', '', ''),
('6c6af0c0-35ea-40d8-a928-b13a9766113a', NULL, 'Adamu', 'Aliyu', NULL, 'Male', 0, 'Single', '2000-12-31', '2020-10-20 08:34:41', '', 'undefined', '', '', '', '', '', '', '0', '0', '0', 2, 1, 0, '2-1', 2, NULL, NULL, NULL, NULL, NULL, 'registered', '', '', '', ''),
('966a89f6-05d8-4564-b319-2f8863821e75', NULL, 'Maroof', 'Abdullah', '', 'Male', 0, '0', '1990-10-31', '2020-10-31 10:36:25', '09065467832', 'dev.issatoyin@gmail.com', '', '', '', '', '', '', '0', '0', '0', 1, 0, 0, '', 2, NULL, NULL, NULL, NULL, NULL, 'registered', '', '', '', ''),
('d8d7a732-1832-4e25-9a98-e68ddc3f0b26', NULL, 'Muritala', 'Salami', NULL, '', 0, '', '', '2020-11-02 13:59:15', '', 'undefined', '', '', '', '', '', '', '0', '0', '0', 2, 1, 0, '2-1', 2, NULL, NULL, NULL, NULL, NULL, 'registered', '', '', '', ''),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', NULL, 'Kemi', 'Adesua', '', 'Male', 0, '0', '1955-10-31', '2020-10-31 11:37:07', '07062942291', 'issa.emaitee@gmail.com', '', '', '', '', '', '', '0', '0', '0', 1, 0, 0, '', 3, NULL, NULL, NULL, NULL, NULL, 'registered', '', '', '', ''),
('966a89f6-05d8-4564-b319-2f8863821e75', NULL, 'Pasuma', 'Alabi', '', 'Male', 0, '0', '1965-10-31', '2020-10-31 11:21:22', '', '', '', '', '', '', '', '', '0', '0', '0', 1, 0, 0, '', 3, NULL, NULL, NULL, NULL, NULL, 'registered', '', '', '', ''),
('d8d7a732-1832-4e25-9a98-e68ddc3f0b26', NULL, 'Isah', 'Muhammad', NULL, '', 0, '', '', '2020-11-02 14:21:03', '', 'undefined', '', '', '', '', '', '', '0', '0', '0', 3, 1, 0, '3-1', 3, NULL, NULL, NULL, NULL, NULL, 'registered', '', '', '', ''),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', NULL, 'Abeni', 'Salawa', '', 'Male', 0, '0', '1980-11-01', '2020-11-01 05:57:27', '', 'dev.issatoyin@gmail.com', '', '', '', '', '', '', '0', '0', '0', 1, 0, 0, '', 4, NULL, NULL, NULL, NULL, NULL, 'registered', '', '', '', ''),
('d8d7a732-1832-4e25-9a98-e68ddc3f0b26', NULL, 'Mustapha', 'Issa,Toyin', NULL, '', 0, '', '', '2020-11-02 14:29:35', '', 'dev.issatoyin@gmail.com', '', '', '', '', '', '', '0', '0', '0', 4, 1, 0, '4-1', 4, NULL, NULL, NULL, NULL, NULL, 'registered', '', '', '', ''),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', NULL, 'Saheed', 'Salawu', '', 'Male', 0, '0', '1977-11-01', '2020-11-01 05:59:53', '', '', '', '', '', '', '', '', '0', '0', '0', 1, 0, 0, '', 5, NULL, NULL, NULL, NULL, NULL, 'registered', '', '', '', ''),
('d8d7a732-1832-4e25-9a98-e68ddc3f0b26', NULL, 'Adeyemo', 'Wasiu', NULL, '', 0, '', '', '2020-11-02 14:32:05', '', 'undefined', '', '', '', '', '', '', '0', '0', '0', 5, 1, 0, '5-1', 5, NULL, NULL, NULL, NULL, NULL, 'registered', '', '', '', ''),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', NULL, 'Onoja', 'Racheal', '', 'Female', 0, '0', '1986-11-01', '2020-11-01 06:01:47', '09090909090', 'issa.emaitee@gmail.com', '', '', '', '', '', '', '0', '0', '0', 1, 0, 0, '', 6, NULL, NULL, NULL, NULL, NULL, 'registered', '', '', '', ''),
('d8d7a732-1832-4e25-9a98-e68ddc3f0b26', NULL, 'Mustapha', 'Issa,Toyin', NULL, '', 0, '', '', '2020-11-03 04:56:37', '', 'undefined', '', '', '', '', '', '', '0', '0', '0', 6, 1, 0, '6-1', 6, NULL, NULL, NULL, NULL, NULL, 'registered', '', '', '', ''),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', NULL, 'Issa', 'Mustapha', 'Toyin', 'Male', 0, '0', '1988-11-01', '2020-11-01 06:13:20', '', '', '', '', '', '', '', '', '0', '0', '0', 1, 0, 0, '', 7, NULL, NULL, NULL, NULL, NULL, 'registered', '', '', '', ''),
('d8d7a732-1832-4e25-9a98-e68ddc3f0b26', NULL, 'Instant', 'Payment', NULL, '', 0, '', '', '2020-11-03 05:19:26', '', 'undefined', '', '', '', '', '', '', '0', '0', '0', 7, 1, 0, '7-1', 7, NULL, NULL, NULL, NULL, NULL, 'registered', '', '', '', ''),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', NULL, 'Umar', 'Sanni', '', 'Male', 0, '0', '1988-11-01', '2020-11-01 06:23:01', '', '', '', '', '', '', '', '', '0', '0', '0', 1, 0, 0, '', 8, NULL, NULL, NULL, NULL, NULL, 'registered', '', '', '', ''),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', NULL, 'Ado', 'Fahad', '', 'Male', 0, '0', '1921-11-01', '2020-11-01 08:55:16', '', 'issa.emaitee@gmail.com', '', '', '', '', '', '', '0', '0', '0', 1, 0, 0, '', 9, NULL, NULL, NULL, NULL, NULL, 'registered', '', '', '', ''),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', NULL, 'Owo', 'Afeex', '', 'Male', 0, '0', '1966-11-01', '2020-11-01 11:49:54', '', '', '', '', '', '', '', '', '0', '0', '0', 1, 0, 0, '', 10, NULL, NULL, NULL, NULL, NULL, 'registered', '', '', '', ''),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 'Sulaiman', 'Abba', '', 'Male', 51, 'Married', '1967-06-26', '2018-06-26 00:00:00', '08033662489', '', 'KANO', '', '', 'GATE2  T/YOLA', 'Yusuf Abba', 'SON', '08033779888', '', '', 238, 1, 0, ' 238-1', 11, '', '', '', '9/11/2019 1:25', NULL, 'registered', '', '', '', ''),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 'Ibrahim', 'Musa', '', 'Male', 45, 'Married', '1973-06-27', '2018-06-27 00:00:00', '08073398417', '', '', '', 'MEDICAL PRACTITIONER', '19  Lamido CRESCENT', '', '', '', '', '', 1, 1, 0, '1-1', 12, '', '', '', '9/11/2019 1:25', NULL, 'registered', '', '', '', ''),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 'Ibrahim', 'Aliyu', '', 'Male', 19, 'Single', '1999-06-27', '2018-06-27 00:00:00', '', '', '', '', '', '', '', '', '', '', '', 1, 10, 0, '1-10', 13, '', '', '', '9/11/2019 1:25', NULL, 'registered', '', '', '', ''),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 'Abdulkarim', 'Yusuf', '', 'Male', 24, 'Single', '1994-06-27', '2018-06-27 00:00:00', '', '', '', '', '', '', '', '', '', '', '', 1, 11, 0, '1-11', 14, '', '', '', '9/11/2019 1:25', NULL, 'registered', '', '', '', ''),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 'Ibrahim', 'Ado', 'Yaya', 'Male', 53, 'Single', '1965-06-27', '2018-06-27 00:00:00', '', '', '', '', '', '', '', '', '', '', '', 1, 12, 0, '1-12', 15, '', '', '', '9/11/2019 1:25', NULL, 'registered', '', '', '', ''),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 'Yusuf', 'Aisha', '', 'Female', 50, 'Single', '1968-06-27', '2018-06-27 00:00:00', '', '', '', '', '', '', '', '', '', '', '', 1, 13, 0, '1-13', 16, '', '', '', '9/11/2019 1:25', NULL, 'registered', '', '', '', ''),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 'Abubakar', 'Maryam', 'Danlami', 'Female', 6, 'Single', '2012-06-27', '2018-06-27 00:00:00', '', '', '', '', '', '', '', '', '', '', '', 1, 14, 0, '1-14', 17, '', '', '', '9/11/2019 1:25', NULL, 'registered', '', '', '', ''),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 'Abdullahi', 'Aliyu', '', 'Male', 28, 'Single', '1990-06-27', '2018-06-27 00:00:00', '', '', '', '', '', '', '', '', '', '', '', 1, 15, 0, '1-15', 18, '', '', '', '9/11/2019 1:25', NULL, 'registered', '', '', '', ''),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 'Luqman', 'Hafsat', '', 'Female', 0, 'Single', '2019-10-24', '2018-06-27 00:00:00', '', '', '', '', '', '', '', '', '', '', '', 1, 16, 0, '1-16', 19, '', '', '', '9/11/2019 1:25', NULL, 'registered', '', '', '', ''),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 'Sabo', 'Umar', 'Sulaiman', 'Male', 34, 'Single', '1984-06-27', '2018-06-27 00:00:00', '', '', '', '', '', '', '', '', '', '', '', 1, 17, 0, '1-17', 20, '', '', '', '9/11/2019 1:25', NULL, 'registered', '', '', '', ''),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 'Ibrahim', 'Hadiza', '', 'Female', 38, 'Single', '2019-10-24', '2018-06-27 00:00:00', '', '', '', '', '', '', '', '', '', '', '', 1, 18, 0, '1-18', 21, '', '', '', '9/11/2019 1:25', NULL, 'registered', '', '', '', '');

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

--
-- Table structure for table `prescriptionrequests`
--

CREATE TABLE `prescriptionrequests` (
  `facilityId` varchar(50) NOT NULL,
  `date` date DEFAULT NULL,
  `patient_id` varchar(11) NOT NULL,
  `dosage` varchar(10) NOT NULL,
  `drug_status` varchar(10) NOT NULL,
  `seen_by` varchar(20) NOT NULL,
  `duration` varchar(10) NOT NULL,
  `period` varchar(5) NOT NULL,
  `drug` varchar(15) NOT NULL,
  `frequency` int(5) NOT NULL,
  `drug_request_id` int(30) NOT NULL,
  `price` int(10) NOT NULL,
  `quantity_dispensed` int(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `prescriptionrequests`
--

INSERT INTO `prescriptionrequests` (`facilityId`, `date`, `patient_id`, `dosage`, `drug_status`, `seen_by`, `duration`, `period`, `drug`, `frequency`, `drug_request_id`, `price`, `quantity_dispensed`) VALUES
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2018-11-18', '5197', '3', 'pending', 'aminu', '2', 'day', 'Boska', 11, 55, 120, 2),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2018-11-18', '5197', '3', 'pending', 'aminu', '56', 'week', 'panadol', 12, 56, 300, 3),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2018-11-18', '5197', '3', 'pending', 'aminu', '57', 'hour', 'Ibucap', 1, 57, 100, 4),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2018-11-18', '5197', '3', 'pending', 'aminu', '58', 'week', 'Quatem', 1, 58, 1300, 5),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2018-11-18', '5197', '3', 'pending', 'aminu', '59', 'day', 'paracetamol', 3, 59, 20, 6),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2018-11-25', '5202', '3', 'pending', 'aminu', '1', 'day', 'paracetamol', 2, 60, 20, 10),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2018-11-25', '5202', '3', 'pending', 'aminu', '2', 'week', 'Boska', 12, 61, 120, 20),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2018-12-15', '5231', '12', 'pending', 'Aisha', '1', 'hour', 'paracetamol', 2, 62, 20, 0),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2018-12-15', '5231', '4', 'pending', 'Aisha', '4', 'hour', 'amatem', 4, 64, 120, 0),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2018-12-27', '5193', '3', 'pending', 'Aisha', '1', 'hour', 'panadol', 2, 65, 300, 0);

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

--
-- Table structure for table `referrals`
--

CREATE TABLE `referrals` (
  `id` char(36) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL,
  `referee` varchar(255) DEFAULT NULL,
  `refereeContact` varchar(255) DEFAULT NULL,
  `referer` varchar(255) DEFAULT NULL,
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `referrals`
--

INSERT INTO `referrals` (`id`, `referee`, `refereeContact`, `referer`, `createdAt`, `updatedAt`) VALUES
('082e4afa-9f99-4175-a8a1-9dfdb1cf5ac7', '', 'issatoyin@gmail.com', '34', '2020-05-16 18:34:17', '2020-05-16 18:34:17');

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

--
-- Table structure for table `repairlogs`
--

CREATE TABLE `repairlogs` (
  `facilityId` varchar(50) NOT NULL,
  `id` int(11) NOT NULL,
  `date` varchar(255) DEFAULT NULL,
  `time` varchar(255) DEFAULT NULL,
  `repaired_by` varchar(255) DEFAULT NULL,
  `nature` varchar(255) DEFAULT NULL,
  `createdAt` datetime NOT NULL DEFAULT current_timestamp(),
  `updatedAt` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `repairlogs`
--

INSERT INTO `repairlogs` (`facilityId`, `id`, `date`, `time`, `repaired_by`, `nature`, `createdAt`, `updatedAt`) VALUES
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 1, '2019-12-24', '12:34', 'Aminu', 'reservice', '2019-12-24 15:38:11', NULL),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 2, '2019-12-24', '23:12', 'ggggg', 'nljnkm', '2019-12-24 22:43:52', NULL),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 3, '2019-12-25', '10:12', 'fahad', 'out of oil', '2019-12-25 09:48:13', NULL),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 4, '2019-12-25', '17:12', 'glo', 'illness', '2019-12-25 16:11:46', NULL);

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

--
-- Table structure for table `report_templates`
--

CREATE TABLE `report_templates` (
  `id` int(11) NOT NULL,
  `name` varchar(100) NOT NULL,
  `department` varchar(50) NOT NULL,
  `header` varchar(200) NOT NULL,
  `body` varchar(4000) NOT NULL,
  `facilityId` varchar(50) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `created_by` varchar(50) NOT NULL,
  `updated_at` datetime NOT NULL,
  `updated_by` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `report_templates`
--

INSERT INTO `report_templates` (`id`, `name`, `department`, `header`, `body`, `facilityId`, `created_at`, `created_by`, `updated_at`, `updated_by`) VALUES
(4, 'Result', 'Microbiology', 'Results', 'Lorem ipsum dolor sit amet consectetur adipisicing elit. Sunt repudiandae non sapiente provident facere, ratione praesentium molestiae reprehenderit perspiciatis deleniti fugiat accusantium quaerat autem dolore possimus harum aliquam pariatur exercitationem. Alias officia incidunt reprehenderit ut libero rem consectetur reiciendis eligendi voluptatibus facilis eaque similique iste, exercitationem suscipit fugit harum deleniti delectus amet cum architecto consequatur! Aspernatur omnis suscipit, id, officia expedita, accusantium nihil fugiat totam magnam recusandae vel itaque provident eos. Tenetur pariatur cupiditate a quasi amet reprehenderit officia minima facere voluptate quod. Eius dolorem sapiente, nobis iusto nisi commodi neque porro qui, labore asperiores ipsa ut dicta fuga aliquam nostrum, ea alias sunt recusandae facere doloremque! Explicabo voluptatem minus ullam quisquam earum, delectus fuga unde culpa ad quod placeat, et, nemo sapiente animi! Suscipit aperiam perspiciatis, recusandae inventore dolor nemo repellat nulla sit? Pariatur architecto maxime modi eos, amet doloribus aut ipsum libero autem voluptatibus quam repellendus consequatur, iure aspernatur laboriosam sapiente debitis, magni eum molestias nostrum possimus iste ex! Sapiente aspernatur dignissimos aperiam suscipit cumque facilis quia debitis placeat? Excepturi iste, quisquam temporibus blanditiis, facilis obcaecati dolorum hic voluptate impedit aspernatur qui repellat nisi nesciunt odio quos vel, provident ut similique nam eius molestiae! Consectetur animi possimus voluptatem vitae molestiae perferendis minima placeat, consequatur nisi similique aperiam consequuntur voluptate iusto voluptatum vel? Facilis blanditiis, vitae ad non deleniti aut qui exercitationem itaque expedita, quaerat obcaecati repudiandae debitis eum ex repellendus. Sit vitae illum quisquam, dolor sint veritatis quam asperiores maiores praesentium eum corrupti nesciunt, doloremque molestias cum recusandae expedita. Perferendis veritatis placeat soluta libero velit porro odit voluptates illum repellat ad aperiam dicta ab, maiores accusamus qui expedita quibusdam dolorum blanditiis minima dolor quaerat. In debitis ratione consequatur porro molestiae nisi quas, similique quo repellendus voluptatem dolor autem, consectetur ut quod asperiores distinctio tempore labore sint. Fugit error nisi et ut dolor vel quos ab assumenda eum laborum, nemo placeat consequuntur vero. Illum porro doloribus excepturi et eligendi aspernatur tempora assumenda ducimus, placeat odit nisi ab sapiente dolorum exercitationem accusamus quasi architecto repellat nihil mollitia quis neque a veniam adipisci temporibus! Possimus ut autem repellat magni animi architecto eaque aliquam, culpa distinctio debitis deleniti nam eos ducimus obcaecati et blanditiis? Voluptatem cupiditate ipsa ut eos neque natus rem sapiente sequi quae quisquam aspernatur ipsum reiciendis eius tenetur, doloribus blanditiis non nulla rerum voluptates vel nostrum aperiam. Nihil dolor esse delectus omnis eum! Dicta maiores reprehenderit animi fugiat ad odit necessitatibus maxime alias incidunt, sunt deleniti natus quos aliquam explicabo beatae nobis eaque vel voluptates est saepe provident vitae voluptate minima! In maiores aspernatur hic, rerum assumenda natus sit autem architecto enim optio facilis dolores distinctio temporibus at, magni, eligendi nobis libero blanditiis. Nostrum odio laudantium enim eum fugiat minus exercitationem tempore. Unde cupiditate sunt beatae animi labore odit debitis sequi suscipit. Dolorum quidem animi, molestias blanditiis esse dolores est vel ad voluptatum voluptatem eius nam accusantium sed necessitatibus temporibus corporis labore qui voluptatibus, itaque ut. Aliquam nam optio, suscipit repellat assumenda saepe velit qui voluptatum nostrum nobis adipisci voluptate earum, sint in fugiat temporibus consequatur quae. Totam beatae, maxime, doloremque laudantium nostrum et veniam perspiciatis praesentium architecto ad m', '966a89f6-05d8-4564-b319-2f8863821e75', '2020-09-01 09:26:18', '41', '0000-00-00 00:00:00', ''),
(5, 'Result', 'Radiology', 'Result', '<p>some design</p>\n', '966a89f6-05d8-4564-b319-2f8863821e75', '2020-09-18 11:51:47', 'admin', '0000-00-00 00:00:00', '');

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

--
-- Table structure for table `sensitivity_list`
--

CREATE TABLE `sensitivity_list` (
  `id` int(11) NOT NULL,
  `antibiotic` varchar(100) NOT NULL,
  `facilityId` varchar(50) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `created_by` varchar(50) NOT NULL,
  `updated_at` datetime NOT NULL,
  `updated_by` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `sensitivity_list`
--

INSERT INTO `sensitivity_list` (`id`, `antibiotic`, `facilityId`, `created_at`, `created_by`, `updated_at`, `updated_by`) VALUES
(1, 'Cloxacillin', '966a89f6-05d8-4564-b319-2f8863821e75', '2020-08-27 08:49:34', '', '0000-00-00 00:00:00', ''),
(2, 'Penicillin', '966a89f6-05d8-4564-b319-2f8863821e75', '2020-08-27 08:49:34', '', '0000-00-00 00:00:00', ''),
(3, 'Flucloxacillin', '966a89f6-05d8-4564-b319-2f8863821e75', '2020-08-27 08:49:34', '', '0000-00-00 00:00:00', ''),
(4, 'Tetracycline', '966a89f6-05d8-4564-b319-2f8863821e75', '2020-08-27 08:49:34', '', '0000-00-00 00:00:00', ''),
(5, 'Ampicilin', '966a89f6-05d8-4564-b319-2f8863821e75', '2020-08-27 08:49:34', '', '0000-00-00 00:00:00', ''),
(10, 'sample', '966a89f6-05d8-4564-b319-2f8863821e75', '2020-09-01 11:38:30', '41', '0000-00-00 00:00:00', '');

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

--
-- Table structure for table `sensitivity_results`
--

CREATE TABLE `sensitivity_results` (
  `id` int(11) NOT NULL,
  `antibiotic` varchar(50) NOT NULL,
  `R` varchar(10) NOT NULL,
  `S` varchar(10) NOT NULL,
  `I` varchar(10) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `created_by` varchar(50) NOT NULL,
  `updated_at` datetime NOT NULL,
  `updated_by` varchar(50) NOT NULL,
  `labno` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `servicelogs`
--

CREATE TABLE `servicelogs` (
  `facilityId` varchar(50) NOT NULL,
  `id` int(11) NOT NULL,
  `date` varchar(255) DEFAULT NULL,
  `next_service_due_date` varchar(255) DEFAULT NULL,
  `createdAt` datetime DEFAULT current_timestamp(),
  `updatedAt` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `servicelogs`
--

INSERT INTO `servicelogs` (`facilityId`, `id`, `date`, `next_service_due_date`, `createdAt`, `updatedAt`) VALUES
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 1, NULL, '2019-12-30', '2019-12-24 00:00:00', NULL);

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

--
-- Table structure for table `services`
--

CREATE TABLE `services` (
  `facilityId` varchar(50) NOT NULL,
  `title` varchar(225) DEFAULT NULL,
  `description` varchar(225) DEFAULT NULL,
  `accHead` varchar(50) NOT NULL,
  `cost` varchar(7) DEFAULT '0',
  `service_id` int(11) NOT NULL,
  `createdAt` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `services`
--

INSERT INTO `services` (`facilityId`, `title`, `description`, `accHead`, `cost`, `service_id`, `createdAt`) VALUES
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'Staff Medical Bill', 'Companies', 'Income', '0', 23, '2019-12-21 19:39:03'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'Consultations (Ortho, Neurosurgeon)', '', 'Income', '7000', 2, '2019-12-19 16:21:39'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'Enema', '', 'Income', '5000', 3, '2019-12-19 16:23:10'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'Surgery', '', 'Income', '0', 4, '2019-12-19 16:36:55'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'Consultation (Regular)', '', 'Income', '3000', 6, '2019-12-20 09:58:14'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'Registration (Single)', '', 'Income', '5000', 7, '2019-12-20 09:58:45'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'Registration (Family)', '', 'Income', '7000', 8, '2019-12-20 09:59:09'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'Consultation (Neurology)', '', 'Income', '8000', 9, '2019-12-20 09:59:49'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'Consultation (Specialist) F/Up', '', 'Income', '6000', 10, '2019-12-20 10:00:41'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'Consultation (Ortho, Neurosurgeon) F/Up', '', 'Income', '4000', 11, '2019-12-20 10:31:32'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'Consultation (ENT)', '', 'Income', '8000', 12, '2019-12-20 10:35:19'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'Consultation (Nephrology)', '', 'Income', '8000', 13, '2019-12-20 10:35:57'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'Consultation (Psycharist)', '', 'Income', '8000', 14, '2019-12-20 10:36:39'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'Consultation (Paediatrics)', '', 'Income', '6000', 15, '2019-12-20 10:37:07'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'Consultation (Cardiology)', '', 'Income', '8000', 16, '2019-12-20 10:37:53'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'Medication', 'Dispensed drugs, injection s and treatment', 'Income', '0', 24, '2019-12-22 10:08:36'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'Wound Dressing (Minor)', '', 'Income', '1000', 19, '2019-12-20 10:39:05'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'Wound Dressing (Major)', '', 'Income', '2000', 20, '2019-12-20 10:39:05'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'ECG', '', 'Income', '4000', 21, '2019-12-20 10:39:05'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'General Ward', '', 'Income', '7000', 25, '2019-12-22 11:15:36'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'House (White, Blue, Green)', '', 'Income', '19000', 26, '2019-12-22 11:16:59'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'PSC (0,1,2,3)', '', 'Income', '17000', 27, '2019-12-22 11:17:25'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'Private (1, 2, Yellow)', '', 'Income', '12000', 28, '2019-12-22 11:17:57'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'Professional Management', 'In-patient consultations', 'Income', '4000', 29, '2019-12-22 11:27:22'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'Investigation', '', 'Income', '0', 30, '2019-12-22 11:50:36'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'Consultation (Urology)', 'Payment before cosultation', 'Income', '8000', 31, '2019-12-22 19:17:33'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'Consultation (Orthopedic)', 'Regular Orthopedic Consultation', 'Income', '7000', 32, '2019-12-23 11:52:27'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'Orthopedic Registration (Family)', '', 'Income', '9000', 33, '2019-12-24 12:08:12'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'Ear syringing', '', 'Income', '7000', 34, '2019-12-25 16:53:20'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'Registration /Specialist Consultation (Family)', '', 'Income', '10000', 35, '2019-12-25 17:04:08'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'conversion of file', '', 'Income', '2000', 36, '2019-12-25 17:10:01'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'Orthopedic Registration', '', 'Income', '7000', 37, '2019-12-25 17:13:16'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'Uncology (Registration/Consultation)', '', 'Income', '8000', 38, '2019-12-26 14:00:06'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'Laboratory (RBS)', '', 'Income', '500', 39, '2019-12-26 14:04:08'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'Lab', '', 'Income', '0', 40, '2019-12-26 14:04:35'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'Neurosurgeon (Registration)', '', 'Income', '7000', 42, '2019-12-27 14:35:36'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'Urologist Registration', '', 'Income', '8000', 43, '2019-12-27 15:41:18'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'Theatre fee', '', 'Income', '0', 44, '2019-12-29 13:45:01'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'Implants', 'Screws and Rod', 'Income', '0', 45, '2019-12-29 13:48:29'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'Nebulizer', '', 'Income', '0', 46, '2019-12-31 08:26:37'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'Hospitalization Deposit', '', 'Income', '0', 47, '2020-01-01 19:16:05'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'Orthopaedic F/up', 'Wages', 'Income', '4000', 48, '2020-01-02 18:47:42'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'Admission', '', 'Income', '0', 49, '2020-01-03 17:29:05'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'Specialist', 'First visit', 'Income', '8000', 50, '2020-01-04 19:10:25'),
('6c6af0c0-35ea-40d8-a928-b13a9766113a', 'Wound Dressing', '', 'Consultation', '2050', 53, '2020-07-15 21:56:59'),
('6c6af0c0-35ea-40d8-a928-b13a9766113a', 'Admission', '', 'Consultation', '3000', 54, '2020-07-15 21:57:17'),
('966a89f6-05d8-4564-b319-2f8863821e75', 'Admission', '', 'Other Income', '1000', 55, '2020-08-16 09:33:44');

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

--
-- Table structure for table `specimen`
--

CREATE TABLE `specimen` (
  `id` int(11) NOT NULL,
  `department` varchar(50) NOT NULL,
  `sample` varchar(50) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `facilityId` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `specimen`
--

INSERT INTO `specimen` (`id`, `department`, `sample`, `created_at`, `facilityId`) VALUES
(1, 'Hematology', 'Blood', '2020-10-16 09:44:33', '966a89f6-05d8-4564-b319-2f8863821e75'),
(2, 'Chemical Pathology', 'Swab', '2020-10-16 09:44:33', '966a89f6-05d8-4564-b319-2f8863821e75'),
(3, 'Hematology', 'EDTA Blood', '2020-10-16 09:44:40', '966a89f6-05d8-4564-b319-2f8863821e75'),
(4, 'Chemical Pathology', 'Serum Refrigerated', '2020-10-16 09:44:40', '966a89f6-05d8-4564-b319-2f8863821e75'),
(5, 'Hematology', 'Floride Fasting', '2020-10-16 09:50:17', '966a89f6-05d8-4564-b319-2f8863821e75'),
(6, 'Hematology', 'Urine', '2020-10-16 09:57:42', '966a89f6-05d8-4564-b319-2f8863821e75'),
(7, 'Chemical Pathology', 'Stool', '2020-10-16 09:57:42', '966a89f6-05d8-4564-b319-2f8863821e75');

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

--
-- Table structure for table `staff`
--

CREATE TABLE `staff` (
  `id` int(11) NOT NULL,
  `Names` varchar(50) NOT NULL,
  `Address` varchar(100) NOT NULL,
  `role` varchar(100) NOT NULL,
  `Phone` varchar(30) NOT NULL,
  `code` varchar(10) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `suppliersinfo`
--

CREATE TABLE `suppliersinfo` (
  `facilityId` varchar(50) NOT NULL,
  `id` int(11) NOT NULL,
  `supplier_name` varchar(100) DEFAULT NULL,
  `date` datetime NOT NULL DEFAULT current_timestamp(),
  `address` varchar(250) DEFAULT NULL,
  `phone` varchar(30) DEFAULT NULL,
  `code` varchar(10) NOT NULL,
  `balance` int(11) NOT NULL,
  `status` varchar(20) NOT NULL,
  `website` varchar(100) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `suppliersinfo`
--

INSERT INTO `suppliersinfo` (`facilityId`, `id`, `supplier_name`, `date`, `address`, `phone`, `code`, `balance`, `status`, `website`) VALUES
('6c6af0c0-35ea-40d8-a928-b13a9766113a', 1, 'Lamco Pharmaceuticals', '2020-09-25 08:22:27', 'Kawo bus stop, Kano', '09090909090', '', 0, '', ''),
('966a89f6-05d8-4564-b319-2f8863821e75', 3, 'Adex Medical Stores', '2020-10-09 14:07:57', 'Julius Berger Street, Lagos', '09090909090', '', 0, '', ''),
('d8d7a732-1832-4e25-9a98-e68ddc3f0b26', 4, 'Supplier 1', '2020-11-02 14:01:36', 'Kawo bus stop, Kano', '09065467832', '', 0, '', '');

--
-- Triggers `suppliersinfo`
--
DELIMITER $$
CREATE TRIGGER `after_supplier_edit` AFTER UPDATE ON `suppliersinfo` FOR EACH ROW BEGIN
    IF OLD.supplier_name <> new.supplier_name THEN
        INSERT INTO audit_trail(id,facilityId,	supplier_name, new_supplier_name,source_table)
        VALUES(old.id, old.facilityId, old.supplier_name,new.supplier_name,'suppliersinfo');
    END IF;
END
$$
DELIMITER ;

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

--
-- Table structure for table `supplier_entries`
--

CREATE TABLE `supplier_entries` (
  `supplier_id` varchar(50) NOT NULL,
  `dr` int(11) NOT NULL,
  `cr` int(11) NOT NULL,
  `reference_no` varchar(50) NOT NULL,
  `facilityId` varchar(50) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `supplier_entries`
--

INSERT INTO `supplier_entries` (`supplier_id`, `dr`, `cr`, `reference_no`, `facilityId`, `created_at`) VALUES
('4', 0, 20000, '02112035', 'd8d7a732-1832-4e25-9a98-e68ddc3f0b26', '2020-11-02 14:11:55');

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

--
-- Table structure for table `test`
--

CREATE TABLE `test` (
  `id` int(11) NOT NULL,
  `description` varchar(50) NOT NULL,
  `debit` varchar(50) NOT NULL,
  `amount` int(11) NOT NULL,
  `credit` varchar(50) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

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

--
-- Stand-in structure for view `test1`
-- (See below for the actual view)
--
CREATE TABLE `test1` (
`head` varchar(100)
,`subhead` varchar(50)
,`des` varchar(500)
,`acct` varchar(100)
,`debit` int(50)
,`credit` int(50)
,`description` varchar(225)
,`facilityId` varchar(50)
,`createdAt` datetime
,`transaction_id` int(11)
,`enteredBy` varchar(20)
,`receiptDateSN` varchar(18)
,`receiptNo` int(7)
,`modeOfPayment` varchar(15)
,`status` varchar(10)
,`approvedBy` varchar(20)
,`paymentStatus` varchar(11)
,`client_acct` varchar(11)
,`patient_id` varchar(50)
);

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

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

CREATE TABLE `transactions` (
  `facilityId` varchar(50) DEFAULT NULL,
  `createdAt` datetime NOT NULL,
  `transaction_id` int(11) NOT NULL,
  `id` int(11) NOT NULL,
  `description` varchar(225) DEFAULT NULL,
  `acct` varchar(100) DEFAULT NULL,
  `debit` int(50) DEFAULT NULL,
  `credit` int(50) DEFAULT NULL,
  `enteredBy` varchar(20) DEFAULT NULL,
  `receiptDateSN` varchar(18) NOT NULL DEFAULT '0',
  `receiptNo` int(7) DEFAULT 0,
  `modeOfPayment` varchar(15) DEFAULT NULL,
  `bank_name` varchar(50) NOT NULL,
  `status` varchar(10) DEFAULT 'pending',
  `approvedBy` varchar(20) DEFAULT NULL,
  `paymentStatus` varchar(11) NOT NULL DEFAULT '',
  `client_acct` varchar(11) DEFAULT NULL,
  `patient_id` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

INSERT INTO `transactions` (`facilityId`, `createdAt`, `transaction_id`, `id`, `description`, `acct`, `debit`, `credit`, `enteredBy`, `receiptDateSN`, `receiptNo`, `modeOfPayment`, `bank_name`, `status`, `approvedBy`, `paymentStatus`, `client_acct`, `patient_id`) VALUES
('d8d7a732-1832-4e25-9a98-e68ddc3f0b26', '2020-11-02 02:59:14', 1, 0, 'Deposit from account 2', '400021', -2000, 0, 'admin-user', '02112011', 1, 'Cash', '', 'pending', NULL, '', '2', '2'),
('d8d7a732-1832-4e25-9a98-e68ddc3f0b26', '2020-11-02 02:59:14', 2, 0, 'Deposit from account 2', '500021', 0, 2000, 'admin-user', '02112011', 1, 'Cash', '', 'pending', NULL, '', '2', '2'),
('d8d7a732-1832-4e25-9a98-e68ddc3f0b26', '2020-11-02 03:07:15', 3, 0, 'HYDROCORTSONE INJ', '30001', 0, 100000, 'admin-user', '02112023', 2, 'Cash', '', 'pending', NULL, '', NULL, ''),
('d8d7a732-1832-4e25-9a98-e68ddc3f0b26', '2020-11-02 03:07:15', 4, 0, 'HYDROCORTSONE INJ', '', 100000, 0, 'admin-user', '02112023', 2, 'Cash', '', 'pending', NULL, '', NULL, ''),
('d8d7a732-1832-4e25-9a98-e68ddc3f0b26', '2020-11-02 03:11:55', 5, 0, 'Drugs Purchased from ', '400021', 0, 20000, 'admin-user', '02112035', 3, 'Cash', '', 'pending', NULL, '', '4', ''),
('d8d7a732-1832-4e25-9a98-e68ddc3f0b26', '2020-11-02 03:11:55', 6, 0, 'Drugs Purchased from ', '30001', 20000, 0, 'admin-user', '02112035', 3, 'Cash', '', 'pending', NULL, '', '4', ''),
('d8d7a732-1832-4e25-9a98-e68ddc3f0b26', '2020-11-02 03:13:33', 7, 0, 'Deposit from account 2', '400021', -3000, 0, 'admin-user', '02112047', 4, 'cash', '', 'pending', NULL, '', '2', '2'),
('d8d7a732-1832-4e25-9a98-e68ddc3f0b26', '2020-11-02 03:13:33', 8, 0, 'Deposit from account 2', '400023', 0, 3000, 'admin-user', '02112047', 4, 'cash', '', 'pending', NULL, '', '2', '2'),
('d8d7a732-1832-4e25-9a98-e68ddc3f0b26', '2020-11-02 03:21:01', 9, 0, 'Deposit from account 3', '400021', -40000, 0, 'admin-user', '02112059', 5, 'Cash', '', 'pending', NULL, '', '3', '3'),
('d8d7a732-1832-4e25-9a98-e68ddc3f0b26', '2020-11-02 03:21:01', 10, 0, 'Deposit from account 3', '400023', 0, 40000, 'admin-user', '02112059', 5, 'Cash', '', 'pending', NULL, '', '3', '3'),
('d8d7a732-1832-4e25-9a98-e68ddc3f0b26', '2020-11-02 03:29:34', 11, 0, 'Deposit from account 4', '400021', 5000, 0, 'admin-user', '021120611', 6, 'Cash', '', 'pending', NULL, '', '4', '4'),
('d8d7a732-1832-4e25-9a98-e68ddc3f0b26', '2020-11-02 03:29:34', 12, 0, 'Deposit from account 4', '400023', 0, 5000, 'admin-user', '021120611', 6, 'Cash', '', 'pending', NULL, '', '4', '4'),
('d8d7a732-1832-4e25-9a98-e68ddc3f0b26', '2020-11-02 03:32:04', 13, 0, 'Deposit from account 5', '400021', 9000, 0, 'admin-user', '021120713', 7, 'Cash', '', 'pending', NULL, '', '5', '5'),
('d8d7a732-1832-4e25-9a98-e68ddc3f0b26', '2020-11-02 03:32:04', 14, 0, 'Deposit from account 5', '400023', 0, 9000, 'admin-user', '021120713', 7, 'Cash', '', 'pending', NULL, '', '5', '5'),
('d8d7a732-1832-4e25-9a98-e68ddc3f0b26', '2020-11-02 04:13:38', 15, 0, 'Deposit from account 5', '400021', 20000, 0, 'admin-user', '021120815', 8, 'cash', '', 'pending', NULL, '', '5', '5'),
('d8d7a732-1832-4e25-9a98-e68ddc3f0b26', '2020-11-02 04:13:38', 16, 0, 'Deposit from account 5', '400023', 0, 9000, 'admin-user', '021120815', 8, 'cash', '', 'pending', NULL, '', '5', '5'),
('d8d7a732-1832-4e25-9a98-e68ddc3f0b26', '2020-11-02 04:13:38', 17, 0, 'Deposit from account 5', '500021', 0, 11000, 'admin-user', '021120815', 8, 'cash', '', 'pending', NULL, '', '5', '5'),
('d8d7a732-1832-4e25-9a98-e68ddc3f0b26', '2020-11-03 05:56:35', 18, 0, 'Deposit from account 6', '400022', 0, 0, 'admin-user', '031120118', 1, 'Bank Transfer', 'Jaiz', 'pending', NULL, '', '6', '6'),
('d8d7a732-1832-4e25-9a98-e68ddc3f0b26', '2020-11-03 05:56:35', 19, 0, 'Deposit from account 6', '500021', 0, 0, 'admin-user', '031120118', 1, 'Bank Transfer', 'Jaiz', 'pending', NULL, '', '6', '6'),
('d8d7a732-1832-4e25-9a98-e68ddc3f0b26', '2020-11-03 06:19:25', 20, 0, 'Deposit from account 7', '400021', 0, 0, 'admin-user', '031120220', 2, 'Cash', '', 'pending', NULL, '', '7', '7'),
('d8d7a732-1832-4e25-9a98-e68ddc3f0b26', '2020-11-03 06:19:25', 21, 0, 'Deposit from account 7', '500021', 0, 0, 'admin-user', '031120220', 2, 'Cash', '', 'pending', NULL, '', '7', '7'),
('d8d7a732-1832-4e25-9a98-e68ddc3f0b26', '2020-11-03 06:25:04', 22, 0, 'HYDROCORTSONE INJ', '20001', 0, 4000, 'admin-user', '031120322', 3, 'cash', '', 'pending', NULL, '', '6', '6'),
('d8d7a732-1832-4e25-9a98-e68ddc3f0b26', '2020-11-03 06:25:04', 23, 0, 'HYDROCORTSONE INJ', '500011', 0, 4000, 'admin-user', '031120322', 3, 'cash', '', 'pending', NULL, '', '6', '6'),
('d8d7a732-1832-4e25-9a98-e68ddc3f0b26', '2020-11-03 06:25:04', 24, 0, 'HYDROCORTSONE INJ', '400023', 4000, 0, 'admin-user', '031120322', 3, 'cash', '', 'pending', NULL, '', '6', '6'),
('d8d7a732-1832-4e25-9a98-e68ddc3f0b26', '2020-11-03 08:17:21', 25, 0, 'Cotton Seed Cake', '30001', 0, 120000, 'admin-user', '031120425', 4, 'Cash', '', 'pending', NULL, '', NULL, ''),
('d8d7a732-1832-4e25-9a98-e68ddc3f0b26', '2020-11-03 08:17:21', 26, 0, 'Cotton Seed Cake', '', 120000, 0, 'admin-user', '031120425', 4, 'Cash', '', 'pending', NULL, '', NULL, ''),
('d8d7a732-1832-4e25-9a98-e68ddc3f0b26', '2020-11-03 09:08:36', 27, 0, 'Bath Soap', '30001', 0, 1200000, 'admin-user', '031120527', 5, 'Cash', '', 'pending', NULL, '', NULL, ''),
('d8d7a732-1832-4e25-9a98-e68ddc3f0b26', '2020-11-03 09:08:36', 28, 0, 'Bath Soap', '', 1200000, 0, 'admin-user', '031120527', 5, 'Cash', '', 'pending', NULL, '', NULL, ''),
('d8d7a732-1832-4e25-9a98-e68ddc3f0b26', '2020-11-03 10:25:12', 29, 0, 'Laundary Soap', '30001', 0, 40000, 'admin-user', '031120629', 6, 'Cash', '', 'pending', NULL, '', NULL, ''),
('d8d7a732-1832-4e25-9a98-e68ddc3f0b26', '2020-11-03 10:25:12', 30, 0, 'Laundary Soap', '', 40000, 0, 'admin-user', '031120629', 6, 'Cash', '', 'pending', NULL, '', NULL, '');

--
-- Triggers `transactions`
--
DELIMITER $$
CREATE TRIGGER `set_txn_date` BEFORE INSERT ON `transactions` FOR EACH ROW BEGIN
    		IF (isnull(new.createdAt)) THEN
    			SET NEW.createdAt=CURDATE();
            END IF;
        END
$$
DELIMITER ;

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

--
-- Table structure for table `transactionsetup`
--

CREATE TABLE `transactionsetup` (
  `id` int(11) NOT NULL,
  `title` varchar(50) NOT NULL,
  `debit` varchar(50) NOT NULL,
  `credit` varchar(50) NOT NULL,
  `facilityId` varchar(50) NOT NULL,
  `createdBy` varchar(50) NOT NULL,
  `createdAt` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `transactionsetup`
--

INSERT INTO `transactionsetup` (`id`, `title`, `debit`, `credit`, `facilityId`, `createdBy`, `createdAt`) VALUES
(8, 'Payment from somewhere else', 'Hematology', 'Trade Payable', '966a89f6-05d8-4564-b319-2f8863821e75', '41', '2020-08-15 13:03:14'),
(9, '', 'Revenue', 'Cash', '6c6af0c0-35ea-40d8-a928-b13a9766113a', '40', '2020-08-17 08:13:26'),
(10, '', 'Registration & Testing fees', 'Cash', '966a89f6-05d8-4564-b319-2f8863821e75', '41', '2020-08-28 10:36:52');

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

--
-- Table structure for table `transaction_backup`
--

CREATE TABLE `transaction_backup` (
  `facilityId` varchar(50) CHARACTER SET latin1 DEFAULT NULL,
  `createdAt` datetime NOT NULL,
  `transaction_id` int(11) NOT NULL DEFAULT 0,
  `id` int(11) NOT NULL,
  `description` varchar(225) CHARACTER SET latin1 DEFAULT NULL,
  `acct` varchar(100) CHARACTER SET latin1 DEFAULT NULL,
  `debit` int(50) DEFAULT NULL,
  `credit` int(50) DEFAULT NULL,
  `enteredBy` varchar(20) CHARACTER SET latin1 DEFAULT NULL,
  `receiptDateSN` varchar(18) CHARACTER SET latin1 NOT NULL DEFAULT '0',
  `receiptNo` int(7) DEFAULT 0,
  `modeOfPayment` varchar(15) CHARACTER SET latin1 DEFAULT NULL,
  `status` varchar(10) CHARACTER SET latin1 DEFAULT 'pending',
  `approvedBy` varchar(20) CHARACTER SET latin1 DEFAULT NULL,
  `paymentStatus` varchar(11) CHARACTER SET latin1 NOT NULL DEFAULT '',
  `client_acct` varchar(11) CHARACTER SET latin1 DEFAULT NULL,
  `patient_id` varchar(50) CHARACTER SET latin1 NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `transaction_backup`
--

INSERT INTO `transaction_backup` (`facilityId`, `createdAt`, `transaction_id`, `id`, `description`, `acct`, `debit`, `credit`, `enteredBy`, `receiptDateSN`, `receiptNo`, `modeOfPayment`, `status`, `approvedBy`, `paymentStatus`, `client_acct`, `patient_id`) VALUES
('966a89f6-05d8-4564-b319-2f8863821e75', '2020-10-09 03:32:07', 1, 0, 'Deposit from account 1', '400021', 0, 0, 'admin', '09102011', 1, 'Cash', 'pending', NULL, '', '1', '1'),
('966a89f6-05d8-4564-b319-2f8863821e75', '2020-10-09 03:32:07', 2, 0, 'Deposit from account 1', '500021', 0, 0, 'admin', '09102011', 1, 'Cash', 'pending', NULL, '', '1', '1'),
('966a89f6-05d8-4564-b319-2f8863821e75', '2020-10-09 03:32:48', 3, 0, 'Deposit from account 2', '400021', 0, 0, 'admin', '09102023', 2, 'Cash', 'pending', NULL, '', '2', '2'),
('966a89f6-05d8-4564-b319-2f8863821e75', '2020-10-09 03:32:48', 4, 0, 'Deposit from account 2', '500021', 0, 0, 'admin', '09102023', 2, 'Cash', 'pending', NULL, '', '2', '2'),
('966a89f6-05d8-4564-b319-2f8863821e75', '2020-10-09 03:33:05', 5, 0, 'Deposit from account 2', '400021', 50000, 0, 'admin', '09102035', 3, 'cash', 'pending', NULL, '', '2', '2'),
('966a89f6-05d8-4564-b319-2f8863821e75', '2020-10-09 03:33:05', 6, 0, 'Deposit from account 2', '500021', 0, 50000, 'admin', '09102035', 3, 'cash', 'pending', NULL, '', '2', '2'),
('966a89f6-05d8-4564-b319-2f8863821e75', '2020-10-09 03:34:32', 7, 0, 'New Lab Request for account 2', '20001', 0, 4600, 'admin', '09102047', 4, '', 'pending', NULL, '', '2', '3'),
('966a89f6-05d8-4564-b319-2f8863821e75', '2020-10-09 03:34:32', 8, 0, 'New Lab Request for account 2', '500021', 4600, 0, 'admin', '09102047', 4, '', 'pending', NULL, '', '2', '3'),
('966a89f6-05d8-4564-b319-2f8863821e75', '2020-10-09 03:39:16', 9, 0, 'New Lab Request for account 2', '20003', 0, 1900, 'admin', '09102059', 5, '', 'pending', NULL, '', '2', '4'),
('966a89f6-05d8-4564-b319-2f8863821e75', '2020-10-09 03:39:16', 10, 0, 'New Lab Request for account 2', '500021', 1900, 0, 'admin', '09102059', 5, '', 'pending', NULL, '', '2', '4'),
('966a89f6-05d8-4564-b319-2f8863821e75', '2020-10-09 03:39:16', 11, 0, 'New Lab Request for account 2', '20004', 0, 5800, 'admin', '09102059', 5, '', 'pending', NULL, '', '2', '4'),
('966a89f6-05d8-4564-b319-2f8863821e75', '2020-10-09 03:39:16', 12, 0, 'New Lab Request for account 2', '20002', 0, 4000, 'admin', '09102059', 5, '', 'pending', NULL, '', '2', '4'),
('966a89f6-05d8-4564-b319-2f8863821e75', '2020-10-09 03:39:16', 13, 0, 'New Lab Request for account 2', '500021', 5800, 0, 'admin', '09102059', 5, '', 'pending', NULL, '', '2', '4'),
('966a89f6-05d8-4564-b319-2f8863821e75', '2020-10-09 03:39:16', 14, 0, 'New Lab Request for account 2', '500021', 4000, 0, 'admin', '09102059', 5, '', 'pending', NULL, '', '2', '4'),
('966a89f6-05d8-4564-b319-2f8863821e75', '2020-10-09 03:51:10', 15, 0, 'Sanitizer', '400021', 0, 2000, 'admin', '091020615', 6, 'Cash', 'pending', NULL, '', 'Fahad', ''),
('966a89f6-05d8-4564-b319-2f8863821e75', '2020-10-09 03:51:10', 16, 0, 'Sanitizer', '30001', 2000, 0, 'admin', '091020615', 6, 'Cash', 'pending', NULL, '', 'Fahad', ''),
('966a89f6-05d8-4564-b319-2f8863821e75', '2020-10-09 03:55:23', 17, 0, 'Hydrogen Reagent', '400021', 0, 50000, 'admin', '091020717', 7, 'Cash', 'pending', NULL, '', 'Murtala', ''),
('966a89f6-05d8-4564-b319-2f8863821e75', '2020-10-09 03:55:23', 18, 0, 'Hydrogen Reagent', '30004', 50000, 0, 'admin', '091020717', 7, 'Cash', 'pending', NULL, '', 'Murtala', ''),
('966a89f6-05d8-4564-b319-2f8863821e75', '2020-10-09 03:57:46', 19, 0, 'Deposit from account 3', '400022', 50000000, 0, 'admin', '091020819', 8, 'cash', 'pending', NULL, '', '3', '3'),
('966a89f6-05d8-4564-b319-2f8863821e75', '2020-10-09 03:57:46', 20, 0, 'Deposit from account 3', '500012', 0, 50000000, 'admin', '091020819', 8, 'cash', 'pending', NULL, '', '3', '3'),
('966a89f6-05d8-4564-b319-2f8863821e75', '2020-10-09 04:24:19', 21, 0, 'Toyota HILUX Emergency Vehicle', '400022', 0, 400000, 'admin', '091020921', 9, 'Bank', 'pending', NULL, '', NULL, ''),
('966a89f6-05d8-4564-b319-2f8863821e75', '2020-10-09 04:24:19', 22, 0, 'Toyota HILUX Emergency Vehicle', '400016', 400000, 0, 'admin', '091020921', 9, 'Bank', 'pending', NULL, '', NULL, ''),
('6c6af0c0-35ea-40d8-a928-b13a9766113a', '2020-10-10 09:18:35', 23, 0, 'Deposit from account 1', '30001', 0, 0, 'pharm_m', '10102011', 1, 'Cash', 'pending', NULL, '', '1', '1'),
('6c6af0c0-35ea-40d8-a928-b13a9766113a', '2020-10-10 09:18:35', 24, 0, 'Deposit from account 1', '500021', 0, 0, 'pharm_m', '10102011', 1, 'Cash', 'pending', NULL, '', '1', '1'),
('6c6af0c0-35ea-40d8-a928-b13a9766113a', '2020-10-10 09:18:57', 25, 0, 'SUDREX', '20001', 0, 250, 'pharm_m', '101020225', 2, 'cash', 'pending', NULL, '', '1', '1'),
('6c6af0c0-35ea-40d8-a928-b13a9766113a', '2020-10-10 09:18:57', 26, 0, 'SUDREX', '30001', 250, 0, 'pharm_m', '101020225', 2, 'cash', 'pending', NULL, '', '1', '1'),
('6c6af0c0-35ea-40d8-a928-b13a9766113a', '2020-10-10 09:18:58', 27, 0, 'ZIMOTIL', '20001', 0, 150, 'pharm_m', '101020225', 2, 'cash', 'pending', NULL, '', '1', '1'),
('6c6af0c0-35ea-40d8-a928-b13a9766113a', '2020-10-10 09:18:58', 28, 0, 'ZIMOTIL', '30001', 150, 0, 'pharm_m', '101020225', 2, 'cash', 'pending', NULL, '', '1', '1'),
('6c6af0c0-35ea-40d8-a928-b13a9766113a', '2020-10-10 09:18:58', 29, 0, 'DANACID', '20001', 0, 350, 'pharm_m', '101020225', 2, 'cash', 'pending', NULL, '', '1', '1'),
('6c6af0c0-35ea-40d8-a928-b13a9766113a', '2020-10-10 09:18:58', 30, 0, 'DANACID', '30001', 350, 0, 'pharm_m', '101020225', 2, 'cash', 'pending', NULL, '', '1', '1'),
('6c6af0c0-35ea-40d8-a928-b13a9766113a', '2020-10-10 09:57:06', 31, 0, 'Deposit from account 2', '30001', 1000, 0, 'pharm_m', '101020331', 3, 'cash', 'pending', NULL, '', '2', '2'),
('6c6af0c0-35ea-40d8-a928-b13a9766113a', '2020-10-10 09:57:06', 32, 0, 'Deposit from account 2', '500021', 0, 1000, 'pharm_m', '101020331', 3, 'cash', 'pending', NULL, '', '2', '2'),
('6c6af0c0-35ea-40d8-a928-b13a9766113a', '2020-10-10 09:59:05', 33, 0, 'Deposit from account 3', '30001', 0, 0, 'pharm_m', '101020433', 4, 'Cash', 'pending', NULL, '', '3', '3'),
('6c6af0c0-35ea-40d8-a928-b13a9766113a', '2020-10-10 09:59:05', 34, 0, 'Deposit from account 3', '500021', 0, 0, 'pharm_m', '101020433', 4, 'Cash', 'pending', NULL, '', '3', '3'),
('6c6af0c0-35ea-40d8-a928-b13a9766113a', '2020-10-10 09:59:46', 35, 0, 'DANACID', '20001', 0, 350, 'pharm_m', '101020535', 5, 'Deposit', 'pending', NULL, '', '3', '3'),
('6c6af0c0-35ea-40d8-a928-b13a9766113a', '2020-10-10 09:59:46', 36, 0, 'DANACID', '30003', 350, 0, 'pharm_m', '101020535', 5, 'Deposit', 'pending', NULL, '', '3', '3'),
('6c6af0c0-35ea-40d8-a928-b13a9766113a', '2020-10-10 10:00:39', 37, 0, 'Deposit from account 3', '30002', 0, 0, 'pharm_m', '101020637', 6, 'Deposit', 'pending', NULL, '', '3', '3'),
('6c6af0c0-35ea-40d8-a928-b13a9766113a', '2020-10-10 10:00:39', 38, 0, 'Deposit from account 3', '30003', 0, 0, 'pharm_m', '101020637', 6, 'Deposit', 'pending', NULL, '', '3', '3'),
('6c6af0c0-35ea-40d8-a928-b13a9766113a', '2020-10-10 10:00:40', 39, 0, 'ZIMOTIL', '20001', 0, 3000, 'pharm_m', '101020637', 6, 'Deposit', 'pending', NULL, '', '3', '3'),
('6c6af0c0-35ea-40d8-a928-b13a9766113a', '2020-10-10 10:00:40', 40, 0, 'ZIMOTIL', '30003', 3000, 0, 'pharm_m', '101020637', 6, 'Deposit', 'pending', NULL, '', '3', '3'),
('6c6af0c0-35ea-40d8-a928-b13a9766113a', '2020-10-10 10:01:20', 41, 0, 'ZIMOTIL', '30001', 0, 300, 'pharm_m', '101020637', 0, 'Cash', 'pending', NULL, '', '1', '1'),
('6c6af0c0-35ea-40d8-a928-b13a9766113a', '2020-10-10 10:01:20', 42, 0, 'ZIMOTIL', '60001', 300, 0, 'pharm_m', '101020637', 0, 'Cash', 'pending', NULL, '', '1', '1'),
('6c6af0c0-35ea-40d8-a928-b13a9766113a', '2020-10-10 10:13:41', 43, 0, 'DANACID', '20001', 0, 1050, 'pharm_m', '101020743', 7, 'cash', 'pending', NULL, '', '1', '1'),
('6c6af0c0-35ea-40d8-a928-b13a9766113a', '2020-10-10 10:13:41', 44, 0, 'DANACID', '30001', 1050, 0, 'pharm_m', '101020743', 7, 'cash', 'pending', NULL, '', '1', '1'),
('6c6af0c0-35ea-40d8-a928-b13a9766113a', '2020-10-10 10:13:43', 45, 0, 'SUDREX', '20001', 0, 1000, 'pharm_m', '101020743', 7, 'cash', 'pending', NULL, '', '1', '1'),
('6c6af0c0-35ea-40d8-a928-b13a9766113a', '2020-10-10 10:13:43', 46, 0, 'SUDREX', '30001', 1000, 0, 'pharm_m', '101020743', 7, 'cash', 'pending', NULL, '', '1', '1'),
('6c6af0c0-35ea-40d8-a928-b13a9766113a', '2020-10-10 10:13:44', 47, 0, 'ZIMOTIL', '20001', 0, 450, 'pharm_m', '101020743', 7, 'cash', 'pending', NULL, '', '1', '1'),
('6c6af0c0-35ea-40d8-a928-b13a9766113a', '2020-10-10 10:13:44', 48, 0, 'ZIMOTIL', '30001', 450, 0, 'pharm_m', '101020743', 7, 'cash', 'pending', NULL, '', '1', '1'),
('6c6af0c0-35ea-40d8-a928-b13a9766113a', '2020-10-10 10:44:59', 49, 0, 'Deposit from account 3', '30002', 0, 0, 'pharm_m', '101020849', 8, 'Deposit', 'pending', NULL, '', '3', '3'),
('6c6af0c0-35ea-40d8-a928-b13a9766113a', '2020-10-10 10:44:59', 50, 0, 'Deposit from account 3', '30003', 0, 0, 'pharm_m', '101020849', 8, 'Deposit', 'pending', NULL, '', '3', '3'),
('6c6af0c0-35ea-40d8-a928-b13a9766113a', '2020-10-10 10:45:00', 51, 0, 'ZIMOTIL', '20001', 0, 300, 'pharm_m', '101020849', 8, 'Deposit', 'pending', NULL, '', '3', '3'),
('6c6af0c0-35ea-40d8-a928-b13a9766113a', '2020-10-10 10:45:00', 52, 0, 'ZIMOTIL', '30003', 300, 0, 'pharm_m', '101020849', 8, 'Deposit', 'pending', NULL, '', '3', '3'),
('6c6af0c0-35ea-40d8-a928-b13a9766113a', '2020-10-10 10:45:00', 53, 0, 'SUDREX', '20001', 0, 500, 'pharm_m', '101020849', 8, 'Deposit', 'pending', NULL, '', '3', '3'),
('6c6af0c0-35ea-40d8-a928-b13a9766113a', '2020-10-10 10:45:00', 54, 0, 'SUDREX', '30003', 500, 0, 'pharm_m', '101020849', 8, 'Deposit', 'pending', NULL, '', '3', '3'),
('6c6af0c0-35ea-40d8-a928-b13a9766113a', '2020-10-10 11:01:51', 55, 0, 'Deposit from account 3', '30001', 4150, 0, 'pharm_m', '101020955', 9, 'cash', 'pending', NULL, '', '3', '3'),
('6c6af0c0-35ea-40d8-a928-b13a9766113a', '2020-10-10 11:01:51', 56, 0, 'Deposit from account 3', '30003', 0, 4150, 'pharm_m', '101020955', 9, 'cash', 'pending', NULL, '', '3', '3'),
('6c6af0c0-35ea-40d8-a928-b13a9766113a', '2020-10-10 11:02:47', 57, 0, 'Deposit from account 3', '30002', 0, 0, 'pharm_m', '1010201057', 10, 'Deposit', 'pending', NULL, '', '3', '3'),
('6c6af0c0-35ea-40d8-a928-b13a9766113a', '2020-10-10 11:02:47', 58, 0, 'Deposit from account 3', '30003', 0, 0, 'pharm_m', '1010201057', 10, 'Deposit', 'pending', NULL, '', '3', '3'),
('6c6af0c0-35ea-40d8-a928-b13a9766113a', '2020-10-10 11:02:49', 59, 0, 'SUDREX', '20001', 0, 1000, 'pharm_m', '1010201057', 10, 'Deposit', 'pending', NULL, '', '3', '3'),
('6c6af0c0-35ea-40d8-a928-b13a9766113a', '2020-10-10 11:02:49', 60, 0, 'SUDREX', '30003', 1000, 0, 'pharm_m', '1010201057', 10, 'Deposit', 'pending', NULL, '', '3', '3'),
('6c6af0c0-35ea-40d8-a928-b13a9766113a', '2020-10-10 11:02:50', 61, 0, 'ZIMOTIL', '20001', 0, 450, 'pharm_m', '1010201057', 10, 'Deposit', 'pending', NULL, '', '3', '3'),
('6c6af0c0-35ea-40d8-a928-b13a9766113a', '2020-10-10 11:02:50', 62, 0, 'ZIMOTIL', '30003', 450, 0, 'pharm_m', '1010201057', 10, 'Deposit', 'pending', NULL, '', '3', '3'),
('6c6af0c0-35ea-40d8-a928-b13a9766113a', '2020-10-10 11:02:51', 63, 0, 'DANACID', '20001', 0, 1050, 'pharm_m', '1010201057', 10, 'Deposit', 'pending', NULL, '', '3', '3'),
('6c6af0c0-35ea-40d8-a928-b13a9766113a', '2020-10-10 11:02:51', 64, 0, 'DANACID', '30003', 1050, 0, 'pharm_m', '1010201057', 10, 'Deposit', 'pending', NULL, '', '3', '3'),
('6c6af0c0-35ea-40d8-a928-b13a9766113a', '2020-10-10 11:03:50', 65, 0, 'SUDREX', '30001', 0, 500, 'pharm_m', '1010201057', 0, 'Cash', 'pending', NULL, '', '3', '3'),
('6c6af0c0-35ea-40d8-a928-b13a9766113a', '2020-10-10 11:03:50', 66, 0, 'SUDREX', '60001', 500, 0, 'pharm_m', '1010201057', 0, 'Cash', 'pending', NULL, '', '3', '3');

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

--
-- Stand-in structure for view `transaction_view`
-- (See below for the actual view)
--
CREATE TABLE `transaction_view` (
`facilityId` varchar(50)
,`createdAt` datetime
,`acct` varchar(100)
,`debit` int(50)
,`description` varchar(225)
,`patient_id` varchar(50)
);

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

--
-- Stand-in structure for view `transaction_view2`
-- (See below for the actual view)
--
CREATE TABLE `transaction_view2` (
`date` timestamp
,`drug` varchar(20)
,`quantity` int(11)
,`price` int(10)
,`profit` bigint(21)
,`amount` bigint(22)
,`facilityId` varchar(50)
);

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

--
-- Table structure for table `transfers`
--

CREATE TABLE `transfers` (
  `id` int(11) NOT NULL,
  `facilityId` varchar(50) DEFAULT NULL,
  `date` datetime NOT NULL DEFAULT current_timestamp(),
  `amountReceived` int(12) NOT NULL DEFAULT 0,
  `amountHandedOver` int(12) DEFAULT 0,
  `transfer_from` varchar(50) NOT NULL,
  `transfer_to` varchar(50) NOT NULL,
  `status` varchar(10) NOT NULL DEFAULT 'pending',
  `comment` varchar(500) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `transfers`
--

INSERT INTO `transfers` (`id`, `facilityId`, `date`, `amountReceived`, `amountHandedOver`, `transfer_from`, `transfer_to`, `status`, `comment`) VALUES
(1, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2020-02-03 08:49:08', 0, 4000, 'Manager', 'Kemi', 'pending', '02-02-2020 / cash in'),
(2, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2020-02-05 09:54:39', 0, 129200, 'Patience', 'Manager', 'pending', 'Yesterday\'s day cash'),
(3, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2020-02-05 09:55:57', 0, 75200, 'Manager', 'Patience', 'pending', 'Today cash'),
(4, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2020-02-16 09:38:19', 0, 62000, 'Kemi', 'Manager', 'pending', '15-02 CASH IN'),
(5, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2020-03-14 14:50:51', 0, 50000, 'Manager', 'Kemi', 'pending', 'test'),
(6, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2020-03-14 14:51:20', 0, 30000, 'Manager', 'abdurrahman', 'pending', 'netest'),
(7, 'b8823207-58e1-438c-bb62-f3c6c16d8d3d', '2020-03-19 14:51:59', 0, 1, 'isahboy01', 'isahboy01', 'pending', '');

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

--
-- Stand-in structure for view `trialbalance`
-- (See below for the actual view)
--
CREATE TABLE `trialbalance` (
`head` varchar(100)
,`subhead` varchar(50)
,`des` varchar(500)
,`acct` varchar(100)
,`description` varchar(500)
,`debit` decimal(65,0)
,`credit` decimal(65,0)
,`date` date
,`facilityId` varchar(50)
);

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

--
-- Stand-in structure for view `trial_balance`
-- (See below for the actual view)
--
CREATE TABLE `trial_balance` (
`acct` varchar(100)
,`narration` varchar(225)
,`Acct_source` varchar(500)
,`parent_account` varchar(500)
,`debit` int(50)
,`credit` int(50)
,`facilityId` varchar(50)
,`createdAt` datetime
,`enteredBy` varchar(20)
,`receiptDateSN` varchar(18)
,`receiptNo` int(7)
,`modeOfPayment` varchar(15)
,`client_acct` varchar(11)
);

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

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

CREATE TABLE `users` (
  `id` int(11) NOT NULL,
  `firstname` varchar(255) DEFAULT NULL,
  `lastname` varchar(255) DEFAULT NULL,
  `privilege` int(11) DEFAULT 4,
  `role` varchar(255) DEFAULT NULL,
  `speciality` varchar(50) DEFAULT NULL,
  `accessTo` varchar(255) DEFAULT NULL,
  `functionalities` varchar(4000) NOT NULL,
  `username` varchar(255) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `prefix` varchar(5) DEFAULT NULL,
  `userType` varchar(10) DEFAULT NULL,
  `serviceCost` varchar(10) DEFAULT NULL,
  `licenceNo` varchar(50) DEFAULT NULL,
  `password` varchar(255) DEFAULT NULL,
  `status` varchar(20) DEFAULT 'pending',
  `loggedIn` varchar(200) DEFAULT NULL,
  `availableDays` varchar(200) DEFAULT NULL,
  `availableFromTime` varchar(20) DEFAULT NULL,
  `availableToTime` varchar(20) DEFAULT NULL,
  `address` varchar(200) DEFAULT NULL,
  `phone` varchar(50) DEFAULT NULL,
  `paymentMethod` varchar(50) NOT NULL,
  `paymentAmount` int(11) NOT NULL,
  `referralId` varchar(50) DEFAULT NULL,
  `lastLogin` varchar(20) DEFAULT NULL,
  `image` varchar(255) DEFAULT NULL,
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL,
  `facilityId` varchar(50) NOT NULL,
  `createdBy` varchar(50) DEFAULT NULL,
  `department` varchar(50) NOT NULL,
  `functionality` varchar(2000) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

INSERT INTO `users` (`id`, `firstname`, `lastname`, `privilege`, `role`, `speciality`, `accessTo`, `functionalities`, `username`, `email`, `prefix`, `userType`, `serviceCost`, `licenceNo`, `password`, `status`, `loggedIn`, `availableDays`, `availableFromTime`, `availableToTime`, `address`, `phone`, `paymentMethod`, `paymentAmount`, `referralId`, `lastLogin`, `image`, `createdAt`, `updatedAt`, `facilityId`, `createdBy`, `department`, `functionality`) VALUES
(1, 'Adewale', 'Muritala', 8, 'Developer', 'Neurosurgery', 'Records,Doctors,Accounts,Pharmacy,Laboratory,Admin,Operation,Theater,Maintenance,Reports', '', 'emaitee', 'adewale@gmail.com', 'MST', 'admin', NULL, NULL, '$2a$10$mPqL/ehjm7v5UIy0pG9FFeWa1vfzfWo05.KyYHn/L3hmjoF8yM0vS', 'approved', NULL, NULL, NULL, NULL, NULL, NULL, '', 0, NULL, NULL, NULL, '2019-10-11 19:08:28', '2019-10-11 19:08:28', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', NULL, '', 'Drug Sales,Inventory Overview,Report Summary,Analytics,Daily Sales,Profit,Suppliers Overview,Create User,Manage Users,Settings,Hospital Billings,Create a Client Account,Make Deposit,Record Expenses,Generate Account Report,Account Statement,Create/Edit Services,Setup Account Chart,Setup Transactions,Cash Handover,Drug Sales,Drug Dispensary,Store Record,Manage Suppliers,Drug List,Dashboard,Returned Drugs,Create New Facility,Drug Sales,Inventory Overview,Report Summary,Analytics,Daily Sales,Profit,Suppliers Overview,Create User,Manage Users,Settings,Hospital Billings,Create a Client Account,Make Deposit,Record Expenses,Generate Account Report,Account Statement,Create/Edit Services,Setup Account Chart,Setup Transactions,Cash Handover,Drug Sales,Drug Dispensary,Store Record,Manage Suppliers,Drug List,Dashboard,Returned Drugs,Create New Facility,Setup Lab Test,Registrations,Client Registrations,Customer Approval,Donations Report,Registration Report,Report Form,Sample Collection,Sample Analysis,Microbiology Analysis,Radiology Analysis,Completed Lab Test,Print Lab Test,Inventary,Track Lab Test,Online Lab Requisition,Online Lab Analysis,Doctor Payment Wallet,Doctor Comment,Organization Report,Antibiotics Form,Hematology Analysis,Chemical Pathology Analysis,Asset Register,Rent Register,Cash Movement'),
(2, 'Adewale', 'Muritala', 8, 'Developer', 'Neurosurgery', 'Records,Doctors,Account,Pharmacy,Laboratory,Admin,Operation,Theater,Maintenance,Nurse', '', 'sammie', 'adewale@gmail.com', NULL, NULL, NULL, NULL, '$2a$10$9PVSwNYnpnc0I9MGzV5VeeLqqrM1oNH9B/uvqc9F28/0msIUIH9MW', 'approved', NULL, NULL, NULL, NULL, NULL, NULL, '', 0, NULL, NULL, 'null', '2019-12-02 18:05:19', '2019-12-02 18:05:19', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', NULL, '', ''),
(3, 'Adewale', 'Muritala', 4, 'Developer', 'Neurosurgery', 'Records,Doctors,Account,Pharmacy,Laboratory,Admin,Operation,Theater,Maintenance,Nurse', '', 'isahboy', 'adewale@gmail.com', NULL, NULL, NULL, NULL, '$2a$10$c4ST/4CkMe0/emlRNcelmuJiQH1ExriJJ1P0lZvqjpxTRbDpyn2tC', 'approved', NULL, NULL, NULL, NULL, NULL, NULL, '', 0, NULL, NULL, NULL, '2019-12-02 18:40:13', '2019-12-02 18:40:13', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', NULL, '', ''),
(14, 'Adewale', 'Muritala', 4, 'Developer', 'Neurosurgery', 'Records,Account,Pharmacy,Laboratory,Admin,Doctors,Theater,Maintenance', '', '8790fahad', 'adewale@gmail.com', NULL, NULL, NULL, NULL, '$2a$10$jDIOqVdkgccu2rBLtZ1Uw.2luU/5ZovyApZTbZiHjZgrswMPUaDFy', 'approved', NULL, NULL, NULL, NULL, NULL, NULL, '', 0, NULL, NULL, NULL, '2019-12-09 16:11:49', '2019-12-09 16:11:49', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', NULL, '', ''),
(29, 'Adewale', 'Muritala', 4, 'Admin', 'Neurosurgery', 'Pharmacy,Account,Admin', '', 'isahboy01', 'adewale@gmail.com', NULL, NULL, NULL, NULL, '$2a$10$jAnsQNTfzUqqXXZvCBxRceHPYhNj6GID/5GrHD5w5vmrU8n3U5zcW', 'approved', NULL, NULL, NULL, NULL, NULL, NULL, '', 0, NULL, NULL, NULL, '2020-03-13 20:00:05', '2020-03-13 20:00:05', 'b8823207-58e1-438c-bb62-f3c6c16d8d3d', NULL, '', ''),
(35, 'Adewale2', 'Muritala2', 4, 'Doctor', 'Neurosurgery2', 'Doctors', '', 'wasiu', 'adewale@gmail.com', 'WAS', 'admin', '4000', '0993774774', '$2a$10$53oc7NfNr.m/O.zaLSzceuECbT5tbxTczEnyiO3/tgQQncnsICiVO', 'approved ', NULL, 'Monday,Tuesday,Wedne', '08:00', '21:00', 'Maiduguri', '07062942291', '', 0, 'ckaz8jcx10000ucvd4dk1hm4o', NULL, '', '2020-05-15 05:00:48', '2020-06-23 09:25:22', 'doctors', NULL, '', ''),
(40, 'My', 'User', 4, 'Admin', NULL, 'Admin,Pharmacy,Accounts,Reports', '', 'pharm_m', 'email@whats.com', NULL, NULL, NULL, NULL, '$2a$10$piWegS40cO/lwWsyXAm6Iel8fcCF7EGCy2M2jIP02F3l3VQp2PHmm', 'approved ', NULL, NULL, NULL, NULL, NULL, NULL, '', 0, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-07-15 09:33:37', '2020-08-05 06:02:58', '6c6af0c0-35ea-40d8-a928-b13a9766113a', NULL, '', 'Drug Sales,Inventory Overview,Report Summary,Analytics,Daily Sales,Profit,Suppliers Overview,Create User,Manage Users,Settings,Hospital Billings,Create a Client Account,Make Deposit,Record Expenses,Generate Account Report,Account Statement,Create/Edit Services,Setup Account Chart,Setup Transactions,Cash Handover,Drug Sales,Drug Dispensary,Store Record,Manage Suppliers,Drug List,Dashboard,Returned Drugs,Create New Facility'),
(41, 'Samson', 'Pius', 4, 'Receptionist', '', 'Laboratory,Accounts,Admin,Human Resource', '', 'admin', 'sam@pharm.com', NULL, NULL, NULL, NULL, '$2a$10$qBGwRQSnwhQXrF5a95Mf5.xRLt6TnRjb6kOpLf2a7g6OTe2hmA0Hq', 'approved ', NULL, NULL, NULL, NULL, NULL, NULL, '', 0, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-07-15 09:45:00', '2020-08-05 06:03:01', '966a89f6-05d8-4564-b319-2f8863821e75', NULL, '', 'Drug Sales,Inventory Overview,Report Summary,Analytics,Daily Sales,Profit,Suppliers Overview,Create User,Manage Users,Settings,Hospital Billings,Create a Client Account,Make Deposit,Record Expenses,Generate Account Report,Account Statement,Create/Edit Services,Setup Account Chart,Setup Transactions,Cash Handover,Drug Sales,Drug Dispensary,Store Record,Manage Suppliers,Drug List,Dashboard,Returned Drugs,Create New Facility,Setup Lab Test,Registrations,Client Registrations,Customer Approval,Donations Report,Registration Report,Report Form,Sample Collection,Sample Analysis,Microbiology Analysis,Radiology Analysis,Completed Lab Test,Print Lab Test,Inventary,Track Lab Test,Online Lab Requisition,Online Lab Analysis,Doctor Payment Wallet,Doctor Comment,Organization Report,Antibiotics Form,Hematology Analysis,Chemical Pathology Analysis,Asset Register,Rent Register,Cash Movement'),
(43, 'Mustapha', 'Issa', 4, '', '', 'Accounts,Accounts(Admin),Pharmacy,Admin,Reports', '', 'muritala1', 'issatoyin@gmail.com', NULL, NULL, NULL, NULL, '$2a$10$EKqf/m.N67vcwYMLLEQTueCDsovuW1Y4zaR09K1rgUqFYyL2i61kq', 'approved ', NULL, NULL, NULL, NULL, NULL, NULL, '', 0, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-08-20 08:52:20', '2020-09-14 12:43:13', '6c6af0c0-35ea-40d8-a928-b13a9766113a', NULL, '', 'Drug Sales,Inventory Overview,Report Summary,Analytics,Daily Sales,Profit,Suppliers Overview,Create User,Manage Users,Settings,Hospital Billings,Create a Client Account,Make Deposit,Record Expenses,Generate Account Report,Account Statement,Create/Edit Services,Setup Account Chart,Setup Transactions,Cash Handover,Drug Sales,Drug Dispensary,Store Record,Manage Suppliers,Drug List,Dashboard,Returned Drugs,Create New Facility'),
(45, 'Lukman', 'Me', 4, 'Admin', NULL, 'Admin,Pharmacy,Reports,Accounts', '', 'remedix', 'issatoyin@gmail.com', NULL, NULL, NULL, NULL, '$2a$10$ltD0hfEjdSueMhFsXDUUuu2YtiNdy9faSi3tRHR7O0cAtH/uE/DPe', 'approved ', NULL, NULL, NULL, NULL, NULL, NULL, '', 0, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1598164009/mylikita/profile_images/WIN_20200302_16_52_40_Pro.jpg.png', '2020-08-23 04:56:18', '2020-08-23 06:26:49', '1d401e9f-0cb3-494d-98a5-901e0886a5c8', NULL, '', ''),
(46, 'Saro', 'Awal', 4, 'Admin', NULL, 'Admin,Pharmacy,Reports,Accounts', '', 'meme', 'yemight@whatsapp.cosm', NULL, NULL, NULL, NULL, '$2a$10$oMic9wRhW2W9YWiuRZAJ2.7Wr9WJWdkOCxIVhOCvsJ2ftT4xdCSiO', 'pending', NULL, NULL, NULL, NULL, NULL, NULL, '', 0, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-09-01 07:49:46', '2020-09-01 07:49:46', 'f7b3caa8-2c43-4344-9855-db3f534283c5', NULL, '', ''),
(47, 'Issa', 'Toyin', 4, 'Developer', '', 'Pharmacy,Accounts,Reports', '', 'tttt', 'dev.emaitee@gmail.com', NULL, NULL, NULL, NULL, '$2a$10$72pbkGz/woUYm4ZPOxxoGOWx7STpW76ybjIqL6hJSAoezMInO0kem', 'approved', NULL, NULL, NULL, NULL, NULL, NULL, '', 0, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-09-12 16:42:31', '2020-09-12 16:42:31', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '1', '', 'Setup Lab Test,Inventory Overview,Analytics,Daily Sales,Drug Sales,Manage Suppliers,Drug List,Store Record,Create a Client Account,Hospital Billings,Account Statement'),
(48, 'Saro', 'Awal', 4, 'Admin', NULL, 'Admin,Pharmacy,Reports,Accounts', '', 'test2', 'issatoyin@gmail.com', NULL, NULL, NULL, NULL, '$2a$10$5.R9m2g42O4L6JgaUEn5Iek9psx3DZaVe5zFq98rvhPgp2Eamc0Ya', 'approved ', NULL, NULL, NULL, NULL, NULL, NULL, '', 0, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-09-14 04:59:09', '2020-09-14 06:39:32', '1aba07df-882a-460f-8aa2-6a162807f0cd', NULL, '', 'Create User,Manage Users,Settings,Drug Sales,Drug Dispensary,Store Record,Returned Drugs,Manage Suppliers,Drug List,Dashboard,Report Summary,Inventory Overview,Analytics,Daily Sales,Profit,Suppliers Overview,Hospital Billings,Create a Client Account,Make Deposit,Record Expenses,Generate Account Report,Account Statement,Create/Edit Services,Setup Account Chart,Setup Transactions,Cash Handover'),
(49, 'test', 'me', 4, 'Admin', NULL, 'Admin,Pharmacy,Reports,Account', '', 'testme', '', NULL, NULL, NULL, NULL, '$2a$10$YTp.uvxRoLpxU8vlzBXB7.6Z83pImvJkG1h0sE9vAO8bq7Zti9I/W', 'approved', NULL, NULL, NULL, NULL, NULL, NULL, '', 0, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-09-14 19:08:23', '2020-09-14 19:08:23', 'a2cc3c63-2dd3-4e64-aed4-4f4af98d17ca', NULL, '', 'Create User,Manage Users,Settings,Drug Sales,Drug Dispensary,Store Record,Returned Drugs,Manage Suppliers,Drug List,Dashboard,Report Summary,Inventory Overview,Analytics,Daily Sales,Profit,Suppliers Overview,Hospital Billings,Create a Client Account,Make Deposit,Record Expenses,Generate Account Report,Account Statement,Create/Edit Services,Setup Account Chart,Setup Transactions,Cash Handover'),
(50, 'My', 'Name', 4, 'Admin', NULL, 'Admin,Pharmacy,Reports,Accounts', '', 'testest', 'issatoyin@gmail.com', NULL, NULL, NULL, NULL, '$2a$10$FoPr8GPtRSCD9jR1K30YIuJK5hvtdTLx2uPPspmjhU0hZNyQu3LFy', 'approved', NULL, NULL, NULL, NULL, NULL, NULL, '', 0, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-09-14 19:15:12', '2020-09-14 19:15:12', '3eb31e94-6e70-4cbc-97d4-1c476983fa8d', NULL, '', 'Create User,Manage Users,Settings,Drug Sales,Drug Dispensary,Store Record,Returned Drugs,Manage Suppliers,Drug List,Dashboard,Report Summary,Inventory Overview,Analytics,Daily Sales,Profit,Suppliers Overview,Hospital Billings,Create a Client Account,Make Deposit,Record Expenses,Generate Account Report,Account Statement,Create/Edit Services,Setup Account Chart,Setup Transactions,Cash Handover'),
(51, 'Idris', 'Dangana', 4, 'Manager', '', 'Laboratory', '', 'idris', '', NULL, NULL, NULL, NULL, '$2a$10$q0jYuE1B3e2T37e.WEdtNeyJCvA6uN1guLy6Xp.RiJybpPV1UweXa', 'approved ', NULL, NULL, NULL, NULL, NULL, NULL, '', 0, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-09-19 13:51:31', '2020-09-19 13:54:37', '966a89f6-05d8-4564-b319-2f8863821e75', 'admin', 'Hamotology', 'Registrations'),
(52, 'Issa', 'Toyin', 4, 'Admin', NULL, 'Admin,Pharmacy,Reports,Account', '', 'tttt2', 'dev.emaitee@gmail.com', NULL, NULL, NULL, NULL, '$2a$10$EkFJNt1Qo8fH2A/D6Slak.6HvFZNhkJ.dQu.l48WeassVMtFuci.a', 'approved', NULL, NULL, NULL, NULL, NULL, NULL, '', 0, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-09-19 15:16:35', '2020-09-19 15:16:35', '07c4fc06-1329-4b59-99f6-c8e135cd5219', NULL, '', 'Create User,Manage Users,Settings,Drug Sales,Drug Dispensary,Store Record,Returned Drugs,Manage Suppliers,Drug List,Dashboard,Report Summary,Inventory Overview,Analytics,Daily Sales,Profit,Suppliers Overview,Hospital Billings,Create a Client Account,Make Deposit,Record Expenses,Generate Account Report,Account Statement,Create/Edit Services,Setup Account Chart,Setup Transactions,Cash Handover'),
(53, 'Issa', 'Toyin', 4, 'Admin', NULL, 'Admin,Pharmacy,Reports,Accounts', '', 'test2020', '', NULL, NULL, NULL, NULL, '$2a$10$M8A8KGyXxUr54La.v3ABoOi.rJn9knkFemqnsCIdqt0u.6qaZzmhu', 'approved', NULL, NULL, NULL, NULL, NULL, NULL, '', 0, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-09-22 17:13:58', '2020-09-22 17:13:58', '26161120-f7b9-48e6-b4eb-5e9dc27a02b9', NULL, '', 'Create User,Manage Users,Settings,Drug Sales,Drug Dispensary,Store Record,Returned Drugs,Manage Suppliers,Drug List,Dashboard,Report Summary,Inventory Overview,Analytics,Daily Sales,Profit,Suppliers Overview,Hospital Billings,Create a Client Account,Make Deposit,Record Expenses,Generate Account Report,Account Statement,Create/Edit Services,Setup Account Chart,Setup Transactions,Cash Handover'),
(54, 'Sales', 'Guy', 4, '', '', 'Pharmacy', '', 'salesguy', 'whatever@here.com', NULL, NULL, NULL, NULL, '$2a$10$1i1EgoG0RXSTKb1o0rErmOcdd705KFb7Rk1P9LWuypG7wtBZtLOe.', 'approved ', NULL, NULL, NULL, NULL, NULL, NULL, '', 0, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-09-24 03:46:30', '2020-09-24 03:49:01', '6c6af0c0-35ea-40d8-a928-b13a9766113a', 'pharm_m', '', 'Drug Sales,Returned Drugs'),
(56, 'hematology', 'test', 4, 'Technician', '', 'Laboratory', '', 'hematology', 'hematology@optimum.com', NULL, NULL, NULL, NULL, '$2a$10$KYZ33QSrMfcxtVUdGleL4e2C4WOqOHD6kye7rMtR2cPlgxZTw8kPG', 'approved ', NULL, NULL, NULL, NULL, NULL, NULL, '', 0, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-10-13 05:37:03', '2020-10-13 05:39:24', '966a89f6-05d8-4564-b319-2f8863821e75', 'admin', 'Hamotology', 'Hematology Analysis'),
(57, 'chemical', 'pathology', 4, 'Technician', '', 'Laboratory', '', 'chemistry', 'chemistry@gmail.com', NULL, NULL, NULL, NULL, '$2a$10$kUePPG1cLlzLnPNG5Js4Pu/m9bm0jNSIXMTNSXJRrud1MZFpj5zuW', 'approved ', NULL, NULL, NULL, NULL, NULL, NULL, '', 0, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-10-13 05:47:14', '2020-10-13 05:49:35', '966a89f6-05d8-4564-b319-2f8863821e75', 'admin', 'Chemical', 'Chemical Pathology Analysis'),
(58, 'Doctor', 'Doctor', 4, 'Doctor', 'ENT', 'Laboratory', '', 'doctor', 'doctor@optimum.com', NULL, NULL, NULL, NULL, '$2a$10$MeXkdc8fbpsO.8uDV28y8.KrukrP91Ek2UFCBWjYauLD1HIHvHlPW', 'approved ', NULL, NULL, NULL, NULL, NULL, NULL, '', 0, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-10-13 05:49:54', '2020-10-13 05:50:04', '966a89f6-05d8-4564-b319-2f8863821e75', 'admin', '-- Choose --', 'Doctor Comment'),
(59, 'Sample', 'Collection', 4, 'Sample Collector', '', 'Laboratory', '', 'collection', 'collection@optimum.com', NULL, NULL, NULL, NULL, '$2a$10$f1FKESafiDNqQl98xl1XAOTaaag3/9RpOhCu2200Dp75adr3YgxqC', 'approved ', NULL, NULL, NULL, NULL, NULL, NULL, '', 0, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-10-13 06:26:18', '2020-10-13 06:28:29', '966a89f6-05d8-4564-b319-2f8863821e75', 'admin', '', 'Sample Collection'),
(60, 'Microbiology', 'tech', 4, 'Technician', '', 'Laboratory', '', 'microbiology', 'microbiology@optimum.com', NULL, NULL, NULL, NULL, '$2a$10$eemPKpi.5ljgexGSlN.mWOd2JJ6pmhqV.DcJcPgPD2w.Pff7bEYbO', 'approved ', NULL, NULL, NULL, NULL, NULL, NULL, '', 0, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-10-13 06:29:00', '2020-10-13 06:34:18', '966a89f6-05d8-4564-b319-2f8863821e75', 'admin', 'Microbiology', 'Microbiology Analysis'),
(61, 'Radiology', 'tech', 4, 'Technician', '', 'Laboratory', '', 'radiology', 'radiology@optimum.com', NULL, NULL, NULL, NULL, '$2a$10$RON9DWwvTf4G7lzOGXtAM.M.SPn0f2dc2fxLQhiPyO7xJ9NliBTXG', 'approved ', NULL, NULL, NULL, NULL, NULL, NULL, '', 0, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-10-13 06:29:53', '2020-10-13 06:34:20', '966a89f6-05d8-4564-b319-2f8863821e75', 'admin', 'Radiology', 'Radiology Analysis'),
(62, 'Abubakar', 'Aminu', 4, 'Receptionist', '', 'Laboratory', '', 'abu', 'abu@hotmail.com', NULL, NULL, NULL, NULL, '$2a$10$ZrR4EM9TbfgBwK7jqO0fyuaRLAq6Fow9K4kX.iSvXJpfU8dPqclBS', 'pending', NULL, NULL, NULL, NULL, NULL, NULL, '', 0, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-10-31 11:28:49', '2020-10-31 11:28:49', '966a89f6-05d8-4564-b319-2f8863821e75', 'admin', 'Microbiology', 'Setup Lab Test'),
(63, 'Aliyu', 'Saminu', 4, 'Developer', '', 'Laboratory', '', 'alisam', 'alisam@gmail.com', NULL, NULL, NULL, NULL, '$2a$10$XvVYZlFKZjsGRGMVwsJoIOTJMGqAPvdJwMUv/VBNTDph9C0saK7NS', 'pending', NULL, NULL, NULL, NULL, NULL, NULL, '', 0, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-10-31 11:29:46', '2020-10-31 11:29:46', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'emaitee', '', 'Setup Lab Test'),
(64, 'Sala', 'Abeh', 4, 'Receptionist', '', 'Laboratory', '', 'salabeh', 'salabeh@whatever.com', NULL, NULL, NULL, NULL, '$2a$10$v2/h9ujoUNe9yJpNWUdRm.tB5ZexWCaAm7jxbCi3xq0pEUZjRlJKa', 'approved ', NULL, NULL, NULL, NULL, NULL, NULL, '', 0, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-11-01 04:58:46', '2020-11-01 05:02:37', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'emaitee', '', 'Registrations,Client Registrations,Setup Lab Test'),
(65, 'Demo', 'user', 4, 'Admin', NULL, 'Pharmacy,Reports,Laboratory', '', 'demo-user', '', NULL, NULL, NULL, NULL, '$2a$10$3H/84jkRtrL0JGf4VPWgReo7kCt01PasOy1/1Vji/6k2F1.h38Ul6', 'approved ', NULL, NULL, NULL, NULL, NULL, NULL, '', 0, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-11-01 05:06:33', '2020-11-01 05:44:35', 'ee83be9e-5b9b-412f-81e7-95b9417c2782', NULL, '', 'Create User,Manage Users,Settings,Drug Sales,Drug Dispensary,Store Record,Returned Drugs,Manage Suppliers,Drug List,Dashboard,Report Summary,Inventory Overview,Analytics,Daily Sales,Profit,Suppliers Overview,Dashboard,Setup Lab Test,Registrations,Client Registrations,Customer Approval,Donations Report,Organization Report,Report Form,Sample Collection,Chemical Pathology Analysis,Hematology Analysis,Microbiology Analysis,Radiology Analysis,Doctor Comment,Completed Lab Test,Print Lab Test,Antibiotics Form,Inventary,Track Lab Test,Online Lab Requisition,Online Lab Analysis,Doctor Payment Wallet,Generate Bar Code,Hospital Billings,Create a Client Account,Make Deposit,Record Expenses,Generate Account Report,Account Statement,Asset Register,Rent Register,Create/Edit Services,Setup Account Chart,Setup Transactions,Cash Handover'),
(66, 'Lab ', 'Guy', 4, 'Lab Technician', '', 'Laboratory', '', 'labguy', 'labguy@me.com', NULL, NULL, NULL, NULL, '$2a$10$exXLspqVVgyFpigBTchjFeT4kiNkKrPHvXtnBDieD7I06.xSaF/b6', 'approved ', NULL, NULL, NULL, NULL, NULL, NULL, '', 0, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-11-01 05:53:22', '2020-11-01 05:53:47', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'emaitee', '', 'Registrations,Client Registrations'),
(67, 'Admin', 'User', 4, 'Admin', NULL, 'Admin,Store,Reports,Accounts', '', 'admin-user', '', NULL, NULL, NULL, NULL, '$2a$10$b95Iuvc909O6Jv.YTAqE0.wzuUyCXjM6xdPweZmCpnPJKJtHiLKK2', 'approved ', NULL, NULL, NULL, NULL, NULL, NULL, '', 0, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-11-02 13:52:38', '2020-11-02 13:57:07', 'd8d7a732-1832-4e25-9a98-e68ddc3f0b26', NULL, '', 'Drug Sales,Inventory Overview,Report Summary,Analytics,Daily Sales,Profit,Suppliers Overview,Create User,Manage Users,Settings,Hospital Billings,Create a Client Account,Make Deposit,Record Expenses,Generate Account Report,Account Statement,Create/Edit Services,Setup Account Chart,Setup Transactions,Cash Handover,Drug Sales,Drug Dispensary,Store Record,Manage Suppliers,Drug List,Dashboard,Returned Drugs,Create New Facility,Drug Sales,Inventory Overview,Report Summary,Analytics,Daily Sales,Profit,Suppliers Overview,Create User,Manage Users,Settings,Hospital Billings,Create a Client Account,Make Deposit,Record Expenses,Generate Account Report,Account Statement,Create/Edit Services,Setup Account Chart,Setup Transactions,Cash Handover,Drug Sales,Drug Dispensary,Store Record,Manage Suppliers,Drug List,Dashboard,Returned Drugs,Create New Facility,Setup Lab Test,Registrations,Client Registrations,Customer Approval,Donations Report,Registration Report,Report Form,Sample Collection,Sample Analysis,Microbiology Analysis,Radiology Analysis,Completed Lab Test,Print Lab Test,Inventary,Track Lab Test,Online Lab Requisition,Online Lab Analysis,Doctor Payment Wallet,Doctor Comment,Organization Report,Antibiotics Form,Hematology Analysis,Chemical Pathology Analysis,Asset Register,Rent Register,Cash Movement');

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

--
-- Table structure for table `voucher`
--

CREATE TABLE `voucher` (
  `vo_No` int(11) NOT NULL,
  `debit` varchar(40) NOT NULL,
  `Amount` int(11) NOT NULL,
  `credit` varchar(40) NOT NULL,
  `description` varchar(50) NOT NULL,
  `authorizedby` varchar(40) NOT NULL,
  `approveBy` varchar(40) NOT NULL,
  `PatientAcct` varchar(20) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `wholesale_transaction`
--

CREATE TABLE `wholesale_transaction` (
  `id` char(36) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL,
  `date` varchar(100) NOT NULL,
  `time` varchar(50) DEFAULT NULL,
  `name` varchar(50) DEFAULT NULL,
  `phone_no` varchar(50) DEFAULT NULL,
  `unit` int(11) DEFAULT NULL,
  `amount` varchar(50) NOT NULL,
  `type` varchar(20) NOT NULL,
  `giver` varchar(100) DEFAULT NULL,
  `reciever` varchar(100) DEFAULT NULL,
  `description` varchar(100) DEFAULT NULL,
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Structure for view `account_head`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `account_head`  AS  select `a`.`head` AS `head`,`a`.`subhead` AS `subhead`,`a`.`description` AS `description`,`b`.`description` AS `des` from (`account` `a` join `account` `b` on(`a`.`head` = `b`.`subhead`)) ;

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

--
-- Structure for view `expenditure_view`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `expenditure_view`  AS  select `a`.`subhead` AS `subhead`,`b`.`description` AS `description`,`b`.`modeOfPayment` AS `modeOfPayment`,`b`.`acct` AS `acct`,`b`.`createdAt` AS `createdAt`,`b`.`debit` AS `amount`,`b`.`facilityId` AS `facilityId`,`b`.`client_acct` AS `client_acct`,`b`.`enteredBy` AS `enteredBy` from (`account` `a` join `transactions` `b`) where `a`.`head` = `b`.`acct` and `a`.`subhead` = 'Expenditure' ;

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

--
-- Structure for view `lab_info`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `lab_info`  AS  select `lab_requisition`.`created_at` AS `created_at`,`lab_requisition`.`facilityId` AS `facilityId`,`lab_requisition`.`id` AS `id`,`lab_requisition`.`code` AS `code`,`lab_requisition`.`booking_no` AS `booking_no`,`lab_requisition`.`patient_id` AS `patient_id`,`lab_setup`.`head` AS `head`,`lab_setup`.`subhead` AS `subhead`,`lab_setup`.`unit` AS `unit`,`lab_setup`.`range_from` AS `range_from`,`lab_setup`.`range_to` AS `range_to`,`lab_setup`.`price` AS `price`,`lab_setup`.`description` AS `description`,`lab_setup`.`specimen` AS `specimen`,`lab_setup`.`noOfLabels` AS `noOfLabels`,`lab_requisition`.`department` AS `department`,`lab_requisition`.`result` AS `result`,`lab_requisition`.`appearance` AS `appearance`,`lab_requisition`.`serology` AS `serology`,`lab_requisition`.`culture_yielded` AS `culture_yielded`,`lab_requisition`.`status` AS `status`,`lab_requisition`.`created_by` AS `created_by`,`lab_requisition`.`sample_collected_by` AS `sample_collected_by`,`lab_requisition`.`analyzed_by` AS `analyzed_by`,`lab_requisition`.`result_by` AS `result_by`,`lab_requisition`.`reviewed_by` AS `reviewed_by`,`lab_requisition`.`printed_by` AS `printed_by` from (`lab_setup` join `lab_requisition` on(`lab_setup`.`subhead` = `lab_requisition`.`test`)) where `lab_requisition`.`facilityId` = `lab_setup`.`facilityId` ;

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

--
-- Structure for view `lab_process`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `lab_process`  AS  select `a`.`created_at` AS `created_at`,`a`.`facilityId` AS `facilityId`,`a`.`id` AS `id`,`a`.`code` AS `code`,`a`.`booking_no` AS `booking_no`,`a`.`patient_id` AS `patient_id`,`a`.`head` AS `head`,`a`.`subhead` AS `subhead`,`a`.`unit` AS `unit`,`a`.`range_from` AS `range_from`,`a`.`range_to` AS `range_to`,`a`.`price` AS `price`,`a`.`description` AS `description`,`a`.`specimen` AS `specimen`,`a`.`noOfLabels` AS `noOfLabels`,`a`.`group_head` AS `group_head`,`a`.`department` AS `department`,`b`.`description` AS `department_head`,`a`.`result` AS `result`,`a`.`appearance` AS `appearance`,`a`.`serology` AS `serology`,`a`.`culture_yielded` AS `culture_yielded`,`a`.`status` AS `status`,`a`.`created_by` AS `created_by`,`a`.`sample_collected_by` AS `sample_collected_by`,`a`.`analyzed_by` AS `analyzed_by`,`a`.`result_by` AS `result_by`,`a`.`reviewed_by` AS `reviewed_by`,`a`.`printed_by` AS `printed_by` from (`lab_request2` `a` join `lab_setup` `b` on(`a`.`department` = `b`.`subhead`)) where `a`.`facilityId` = `b`.`facilityId` ;

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

--
-- Structure for view `lab_request2`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `lab_request2`  AS  select `lab_info`.`created_at` AS `created_at`,`lab_info`.`facilityId` AS `facilityId`,`lab_info`.`id` AS `id`,`lab_info`.`code` AS `code`,`lab_info`.`booking_no` AS `booking_no`,`lab_info`.`patient_id` AS `patient_id`,`lab_info`.`head` AS `head`,`lab_info`.`subhead` AS `subhead`,`lab_info`.`unit` AS `unit`,`lab_info`.`range_from` AS `range_from`,`lab_info`.`range_to` AS `range_to`,`lab_info`.`price` AS `price`,`lab_info`.`description` AS `description`,`lab_info`.`specimen` AS `specimen`,`lab_info`.`noOfLabels` AS `noOfLabels`,`lab_setup`.`description` AS `group_head`,`lab_info`.`department` AS `department`,`lab_info`.`result` AS `result`,`lab_info`.`appearance` AS `appearance`,`lab_info`.`serology` AS `serology`,`lab_info`.`culture_yielded` AS `culture_yielded`,`lab_info`.`status` AS `status`,`lab_info`.`created_by` AS `created_by`,`lab_info`.`sample_collected_by` AS `sample_collected_by`,`lab_info`.`analyzed_by` AS `analyzed_by`,`lab_info`.`result_by` AS `result_by`,`lab_info`.`reviewed_by` AS `reviewed_by`,`lab_info`.`printed_by` AS `printed_by` from (`lab_info` join `lab_setup` on(`lab_setup`.`subhead` = `lab_info`.`head`)) where `lab_info`.`facilityId` = `lab_setup`.`facilityId` ;

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

--
-- Structure for view `lab_requests`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `lab_requests`  AS  select `a`.`department` AS `department`,`a`.`patient_id` AS `patient_id`,`b`.`status` AS `status` from (`lab_requisition` `a` join `lab_numbers` `b` on(`a`.`patient_id` = `b`.`patient_id`)) ;

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

--
-- Structure for view `overview`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `overview`  AS  select `a`.`drug` AS `drug`,`b`.`quantity` AS `quantity_bought`,`b`.`quantity` * `b`.`cost_price` AS `amount_bought`,`b`.`balance` AS `quantity_in_store`,`b`.`balance` * `b`.`cost_price` AS `amount_in_store`,`a`.`qty_out` AS `quantity_sold`,(`a`.`price` + `a`.`markup`) * `a`.`qty_out` AS `amount_sold`,`b`.`dispensary_balance` - `a`.`qty_out` AS `quantity_in_shelf`,(`b`.`dispensary_balance` - `a`.`qty_out`) * (`a`.`price` + `a`.`markup`) AS `amount_in_shelf`,`a`.`created_at` AS `sales_date`,`b`.`created_at` AS `purchase_date`,`a`.`facilityId` AS `facilityId` from (`drugs` `a` join `drugpurchaserecords` `b` on(`a`.`drug_code` = `b`.`drug_code`)) where `a`.`source` = 'dispensary' and `a`.`qty_out` <> 0 ;

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

--
-- Structure for view `overview_wo_store`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `overview_wo_store`  AS  select `drugs`.`drug` AS `drug`,`drugs`.`price` + `drugs`.`markup` AS `price`,sum(`drugs`.`qty_in`) - sum(`drugs`.`qty_out`) AS `quantity_in_shelf`,(sum(`drugs`.`qty_in`) - sum(`drugs`.`qty_out`)) * `drugs`.`price` + `drugs`.`markup` AS `amount_in_shelf`,(select sum(`drugs`.`qty_in`) - sum(`drugs`.`qty_out`) from `drugs` where `drugs`.`source` = 'sold_items') AS `quantity_sold`,(select sum(`drugs`.`qty_in`) - sum(`drugs`.`qty_out`) from `drugs` where `drugs`.`source` = 'sold_items') * (`drugs`.`price` + `drugs`.`markup`) AS `amount_sold`,`drugs`.`expiry_date` AS `expiry_date`,`drugs`.`created_at` AS `created_at`,`drugs`.`facilityId` AS `facilityId` from `drugs` where `drugs`.`source` = 'dispensary' ;

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

--
-- Structure for view `test1`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `test1`  AS  select distinct `a`.`head` AS `head`,`a`.`subhead` AS `subhead`,`a`.`description` AS `des`,`b`.`acct` AS `acct`,`b`.`debit` AS `debit`,`b`.`credit` AS `credit`,`b`.`description` AS `description`,`b`.`facilityId` AS `facilityId`,`b`.`createdAt` AS `createdAt`,`b`.`transaction_id` AS `transaction_id`,`b`.`enteredBy` AS `enteredBy`,`b`.`receiptDateSN` AS `receiptDateSN`,`b`.`receiptNo` AS `receiptNo`,`b`.`modeOfPayment` AS `modeOfPayment`,`b`.`status` AS `status`,`b`.`approvedBy` AS `approvedBy`,`b`.`paymentStatus` AS `paymentStatus`,`b`.`client_acct` AS `client_acct`,`b`.`patient_id` AS `patient_id` from (`account` `a` join `transactions` `b` on(`b`.`acct` = `a`.`head`)) ;

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

--
-- Structure for view `transaction_view`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `transaction_view`  AS  select `transactions`.`facilityId` AS `facilityId`,`transactions`.`createdAt` AS `createdAt`,`transactions`.`acct` AS `acct`,`transactions`.`debit` AS `debit`,`transactions`.`description` AS `description`,`transactions`.`patient_id` AS `patient_id` from `transactions` where `transactions`.`debit` <> 0 ;

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

--
-- Structure for view `transaction_view2`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `transaction_view2`  AS  select `drugs`.`created_at` AS `date`,`drugs`.`drug` AS `drug`,`drugs`.`qty_in` AS `quantity`,`drugs`.`price` AS `price`,`drugs`.`qty_in` * `drugs`.`markup` AS `profit`,(`drugs`.`price` + `drugs`.`markup`) * `drugs`.`qty_in` AS `amount`,`drugs`.`facilityId` AS `facilityId` from `drugs` where `drugs`.`source` = 'dispensary' and `drugs`.`qty_in` <> 0 ;

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

--
-- Structure for view `trialbalance`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `trialbalance`  AS  select `a`.`head` AS `head`,`a`.`subhead` AS `subhead`,`a`.`des` AS `des`,`a`.`acct` AS `acct`,`b`.`description` AS `description`,sum(`a`.`debit`) - sum(`a`.`credit`) AS `debit`,sum(`a`.`debit`) - sum(`a`.`credit`) AS `credit`,cast(`a`.`createdAt` as date) AS `date`,`a`.`facilityId` AS `facilityId` from (`test1` `a` join `account` `b` on(`a`.`subhead` = `b`.`head`)) group by `a`.`head`,`a`.`subhead`,`b`.`head`,`a`.`des`,`a`.`acct`,`b`.`description` <> 0 and `a`.`facilityId` = '966a89f6-05d8-4564-b319-2f8863821e75' ;

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

--
-- Structure for view `trial_balance`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `trial_balance`  AS  select distinct `a`.`acct` AS `acct`,`a`.`description` AS `narration`,`a`.`des` AS `Acct_source`,`b`.`description` AS `parent_account`,`a`.`debit` AS `debit`,`a`.`credit` AS `credit`,`a`.`facilityId` AS `facilityId`,`a`.`createdAt` AS `createdAt`,`a`.`enteredBy` AS `enteredBy`,`a`.`receiptDateSN` AS `receiptDateSN`,`a`.`receiptNo` AS `receiptNo`,`a`.`modeOfPayment` AS `modeOfPayment`,`a`.`client_acct` AS `client_acct` from (`test1` `a` join `account` `b`) where `a`.`subhead` = `b`.`head` and `b`.`facilityId` = '6c6af0c0-35ea-40d8-a928-b13a9766113a' ;

--
-- Indexes for dumped tables
--

--
-- Indexes for table `account`
--
ALTER TABLE `account`
  ADD PRIMARY KEY (`head`,`facilityId`);

--
-- Indexes for table `account4`
--
ALTER TABLE `account4`
  ADD PRIMARY KEY (`head`,`facilityId`);

--
-- Indexes for table `account_opt`
--
ALTER TABLE `account_opt`
  ADD PRIMARY KEY (`head`,`facilityId`);

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

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

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

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

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

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

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

--
-- Indexes for table `drugpurchaserecords`
--
ALTER TABLE `drugpurchaserecords`
  ADD PRIMARY KEY (`drug`,`expiry_date`,`cost_price`);

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

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

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

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

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

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

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

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

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

--
-- Indexes for table `patientrecords`
--
ALTER TABLE `patientrecords`
  ADD PRIMARY KEY (`patient_id`,`facilityId`);

--
-- Indexes for table `prescriptionrequests`
--
ALTER TABLE `prescriptionrequests`
  ADD PRIMARY KEY (`drug_request_id`);

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

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

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

--
-- Indexes for table `services`
--
ALTER TABLE `services`
  ADD PRIMARY KEY (`service_id`);

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

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

--
-- Indexes for table `transactions`
--
ALTER TABLE `transactions`
  ADD PRIMARY KEY (`transaction_id`);

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

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

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

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

--
-- AUTO_INCREMENT for dumped tables
--

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

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

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

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

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

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

--
-- AUTO_INCREMENT for table `lab`
--
ALTER TABLE `lab`
  MODIFY `test_id` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=32;

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

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

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

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

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

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

--
-- AUTO_INCREMENT for table `patientrecords`
--
ALTER TABLE `patientrecords`
  MODIFY `patient_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=22;

--
-- AUTO_INCREMENT for table `prescriptionrequests`
--
ALTER TABLE `prescriptionrequests`
  MODIFY `drug_request_id` int(30) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=66;

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

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

--
-- AUTO_INCREMENT for table `services`
--
ALTER TABLE `services`
  MODIFY `service_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=56;

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

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

--
-- AUTO_INCREMENT for table `transactions`
--
ALTER TABLE `transactions`
  MODIFY `transaction_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=31;

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

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

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

