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

START TRANSACTION;



--
-- Database: `prime_220921`
--

DELIMITER $$
--
-- Procedures
--
CREATE DEFINER=`root`@`localhost` PROCEDURE `addExpensesRemarks` (IN `in_remarks_id` VARCHAR(20), IN `in_request_no` VARCHAR(50), IN `in_remarks` VARCHAR(100), IN `in_remarks_by` VARCHAR(50), IN `in_date` VARCHAR(20), IN `in_general_remarks` VARCHAR(100), IN `in_facilityId` VARCHAR(50))  NO SQL
INSERT INTO remarks(remarks_id,request_no,remarks,remarks_by,date,general_remarks,facilityId)
VALUES(in_remarks_id,in_request_no,in_remarks,in_remarks_by,in_date,in_general_remarks,in_facilityId)$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `addNewExpenses` (IN `in_date` VARCHAR(20), IN `in_month` VARCHAR(20), IN `in_branch_name` VARCHAR(50), IN `in_request_no` VARCHAR(20), IN `in_particulars` VARCHAR(50), IN `in_quantity` VARCHAR(50), IN `in_price` VARCHAR(50), IN `in_amount` VARCHAR(50), IN `in_remarks` VARCHAR(100), IN `in_status` VARCHAR(50), IN `in_expense` VARCHAR(100), IN `in_facilityId` VARCHAR(50), IN `in_type_of_expenses` VARCHAR(100))  NO SQL
BEGIN

INSERT INTO expense(date,month,branch_name,request_no,particulars,quantity,price,amount,remarks,status,expense_id,facilityId,type_of_expenses)
        VALUES(in_date,in_month,in_branch_name,in_request_no,in_particulars,in_quantity,
        in_price,in_amount,in_remarks,in_status,in_expense,in_facilityId,in_type_of_expenses);
        call update_number_generator("exp",in_request_no);
END$$

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,sort_index) VALUES (labhead, labsubhead,descr , facId,spec,no_of_label,1);
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, IN `in_index` INT)  BEGIN
    INSERT INTO lab_setup(head, subhead, description, noOfLabels, unit, facilityId, range_from, range_to, specimen, price, percentage, created_by,sort_index) VALUES (labhead, labsubhead, descr, no_of_labels, unit, facId, test_from, test_to, spec, test_price, in_percentage, userId,in_index);
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `add_new_store` (IN `in_receive_date` VARCHAR(20), IN `in_item_name` VARCHAR(50), IN `in_po_no` VARCHAR(20), IN `in_qty_in` VARCHAR(50), IN `in_qty_out` VARCHAR(50), IN `in_store_type` VARCHAR(20), IN `in_grm_no` VARCHAR(20), IN `query_type` VARCHAR(20), IN `in_expiring_date` VARCHAR(20), IN `in_unit_price` VARCHAR(30), IN `in_mark_up` VARCHAR(20), IN `in_selling_price` VARCHAR(10), IN `in_transfer_from` VARCHAR(50), IN `in_status` VARCHAR(20), IN `in_transfer_to` VARCHAR(50), IN `in_branch_name` VARCHAR(30), IN `in_facilityId` VARCHAR(50), IN `in_trn_no` INT(50), IN `in_uniqueId` VARCHAR(50), IN `in_item_category` VARCHAR(100))  NO SQL
BEGIN
if query_type= "received" then
##update purchase_order set status="received" where po_id=in_po_no;
INSERT INTO store (receive_date, item_name, po_no, qty_in,qty_out,store_type,grm_no,expiring_date,unit_price,mark_up,selling_price,transfer_from,transfer_to, branch_name,facilityId,uniqueId,item_category) VALUES(in_receive_date,in_item_name,in_po_no,in_qty_in, in_qty_out,in_store_type,in_grm_no, in_expiring_date,in_unit_price,in_mark_up,in_selling_price,in_transfer_from,in_transfer_to,in_branch_name,in_facilityId,in_uniqueId,in_item_category);
call update_number_generator("grn",in_grm_no);

ELSEIF query_type="transfer" then
INSERT INTO store (receive_date, item_name, po_no, qty_in,qty_out,store_type,grm_no,expiring_date,unit_price,mark_up,selling_price,transfer_from,transfer_to, branch_name,facilityId,trn_number,uniqueId,item_category) VALUES(in_receive_date,in_item_name,in_po_no,in_qty_in, in_qty_out,in_store_type,in_grm_no, in_expiring_date,in_unit_price,in_mark_up,in_selling_price,in_transfer_from,in_transfer_to,in_branch_name,in_facilityId,in_trn_no,uniqueId,in_item_category);

call add_sale_department(in_trn_no,in_item_name,in_qty_out,in_expiring_date,in_selling_price,in_transfer_to,in_receive_date,in_item_category);
end if;

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 `add_purchase_order` (IN `in_po_no` INT(40), IN `in_date` DATE, IN `in_type` VARCHAR(50), IN `in_vendor` VARCHAR(100), IN `in_client` VARCHAR(100), IN `in_total_amount` VARCHAR(100), IN `in_status` VARCHAR(100), IN `in_facilityId` VARCHAR(50), IN `in_exchange_type` VARCHAR(50), IN `in_exchange_rate` INT(50), IN `in_supplier_code` INT(10), IN `in_processed_by` VARCHAR(50))  NO SQL
BEGIN 
INSERT INTO purchase_order(po_id,date,type,vendor,client,total_amount,status,facilityId,exchange_type,exchange_rate,supplier_code,processed_by)VALUES
(in_po_no,in_date,in_type,in_vendor,in_client,in_total_amount,in_status,in_facilityId,in_exchange_type,in_exchange_rate,in_supplier_code,in_processed_by);
call update_number_generator("po",in_po_no);
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `add_purchase_order_list` (IN `in_exchange_rate` INT(50), IN `in_item_name` VARCHAR(100), IN `in_specification` VARCHAR(100), IN `in_quantity_available` INT(100), IN `in_propose_quantity` INT(100), IN `in_price` INT(100), IN `in_propose_amount` INT(100), IN `in_exchange_type` VARCHAR(50), IN `in_po_id` VARCHAR(50), IN `in_type` VARCHAR(100), IN `in_identifier` VARCHAR(100), IN `in_facilityId` VARCHAR(100), IN `in_date` DATE, IN `in_status` VARCHAR(100), IN `in_remark` VARCHAR(100), IN `in_remarks_id` VARCHAR(50), IN `in_item_category` VARCHAR(100), IN `in_expired_status` VARCHAR(11))  NO SQL
INSERT INTO purchase_order_list(
      exchange_rate,
      item_name,
      specification,
      quantity_available,
      propose_quantity,
      price,
      propose_amount,
  
      exchange_type,
      po_id,
      type,
      identifier,
    remark,
    remarks_id,
      facilityId,
    date,
    status,
    item_category,
    expired_status
      )
      VALUES(
          in_exchange_rate,
      in_item_name,
      in_specification,
      in_quantity_available,
      in_propose_quantity,
      in_price,
      in_propose_amount,
    
      in_exchange_type,
      in_po_id,
      in_type,
      in_identifier,
          in_remark,
          in_remarks_id,
      in_facilityId,
          in_date,
          in_status,
          in_item_category,
          in_expired_status
      )$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `add_sale_department` (IN `in_trn_number` INT(50), IN `in_item_name` VARCHAR(100), IN `in_qty_in` INT(100), IN `in_expiring_date` VARCHAR(100), IN `in_selling_price` INT(100), IN `in_branch_location` VARCHAR(100), IN `in_transaction_date` VARCHAR(20), IN `in_item_category` VARCHAR(50))  NO SQL
BEGIN
INSERT INTO sale_department(trn_number,	item_name,	qty_in	,expiring_date,	selling_price	,location_from,location_to,transaction_date,qty_out,item_category) VALUES(in_trn_number,in_item_name,in_qty_in,in_expiring_date,in_selling_price,in_branch_location,"pos",in_transaction_date,0,in_item_category);

UPDATE sale_department SET selling_price=in_selling_price WHERE item_name=in_item_name AND location_from=in_branch_location;
-- INSERT INTO branch_store(trn_number,item_name,qty_out,expiring_date,selling_price,location_to,location_from,transaction_date) VALUES(in_trn_number,in_item_name,in_qty_in,in_expiring_date,in_selling_price,in_branch_location,"pos",in_transaction_date);

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 `bed_allocation` (IN `in_query_type` VARCHAR(20), IN `in_bed` VARCHAR(50), IN `in_user` VARCHAR(50), IN `in_facId` VARCHAR(50), IN `in_date` TIMESTAMP, IN `in_patientId` VARCHAR(50), IN `in_allocation_id` VARCHAR(50), IN `in_status` VARCHAR(20))  NO SQL
IF in_query_type = 'new' THEN
	INSERT INTO bed_allocation (bed_id,patient_id,allocated,allocation_status,allocated_by,facilityId) VALUES (in_bed, in_patientId, in_date,in_status, in_user, in_facId);
ELSEIF in_query_type = 'discharge' THEN
	UPDATE bed_allocation SET ended=in_date, allocation_status='discharged', ended_by=in_user WHERE id=in_allocation_id;
END IF$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `consultation_record` (IN `in_query_type` VARCHAR(50), IN `in_consultation_note` VARCHAR(4000), IN `in_decision` VARCHAR(50), IN `in_dressing_request` VARCHAR(500), IN `in_nursing_request` VARCHAR(500), IN `in_user_id` VARCHAR(50), IN `in_facId` VARCHAR(50), IN `in_consult_id` VARCHAR(50), IN `in_pid` VARCHAR(50), IN `in_treatment_plan` VARCHAR(4000))  NO SQL
IF in_query_type = 'insert' THEN
INSERT INTO consultations (id, consultation_notes,userId, decision, dressing_request, nursing_request,facilityId,patient_id,treatmentPlan) VALUES (in_consult_id, in_consultation_note, in_user_id, in_decision, in_dressing_request, in_nursing_request,in_facId,in_pid,in_treatment_plan);

ELSEIF in_query_type = 'update' THEN
UPDATE consultations SET consultation_notes=in_consultation_note, treatmentPlan=in_treatment_plan WHERE id=in_consult_id;

ELSEIF in_query_type = 'list by patient' THEN
	SELECT * FROM consultations WHERE patient_id=in_pid ORDER BY created_at;
ELSEIF in_query_type = 'by_id' THEN
	SELECT * FROM consultations WHERE id=in_consult_id;
ELSEIF in_query_type = 'pending nursing requests' THEN
	SELECT id, nursing_request,dressing_request, nursing_request_status,treatmentPlan FROM consultations WHERE nursing_request_status='pending' AND facilityId=in_facId;
ELSEIF in_query_type = 'complete nursing req' THEN
	UPDATE consultations SET nursing_request_status='completed' WHERE id=in_consult_id;
END if$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `createbooking_list` (IN `in_request_id` INT)  NO SQL
BEGIN
	DECLARE test_data,department_data, test_group_data INTEGER;
	declare finished integer default 0;
	DECLARE print_type_data,patient_id_data varchar(100) ;
	

	DEClARE curLabtest 
		CURSOR FOR 
        
            SELECT test,print_type,department,patient_id,test_group FROM lab_requisition where  request_id=in_request_id;
            
            
	-- declare NOT FOUND handler
	DECLARE CONTINUE HANDLER 
        FOR NOT FOUND SET finished = 1;

	OPEN curLabtest;

	getLab: LOOP
		FETCH curLabtest INTO test_data,print_type_data,department_data,patient_id_data,test_group_data;

		
		IF finished = 1 THEN 
			LEAVE getLab;
		END IF;
		
    if  print_type_data='single' then 
		BLOCK2: begin
                declare maxCode, labCodeNumber int;
                declare no_more_rows2 integer default 0;
                declare cursor2 cursor for
                   
 		        select  max(booking)+1,concat(year_code,max(booking)+1) from booking_no;
		
                declare continue handler for not found
                    set no_more_rows2 =1;
                open cursor2;
                LOOP2: loop
                    fetch cursor2 into  maxCode, labCodeNumber;
                    
                    
                    update lab_requisition set booking_no=labCodeNumber where test=test_data and print_type='single' and
                        request_id=in_request_id ;
            
                    update booking_no set booking=maxcode;
    
	
                    if no_more_rows2 =1 then
                        close cursor2;
                        leave LOOP2;
                    end if;
	

                end loop LOOP2;
            end BLOCK2;
    elseif  print_type_data = 'grouped' then 
		BLOCK2: begin
                declare maxCode, labCodeNumber int;
                declare no_more_rows2 integer default 0;
                declare cursor2 cursor for
                   
 		        select  max(booking)+1,concat(year_code,max(booking)+1) from booking_no;
		
                declare continue handler for not found
                    set no_more_rows2 =1;
                open cursor2;
                LOOP2: loop
                    fetch cursor2 into  maxCode, labCodeNumber;
                    
                    update lab_requisition set booking_no=labCodeNumber where  department=department_data and print_type = 'grouped' and  request_id=in_request_id;

                update booking_no set booking=maxcode;
                    if no_more_rows2 =1 then
                        close cursor2;
                        leave LOOP2;
                    end if;
		

                

                end loop LOOP2;
               
            end BLOCK2;

    elseif  print_type_data='singular_group' then 
		BLOCK2: begin
                declare maxCode, labCodeNumber int;
                declare no_more_rows2 integer default 0;
                declare cursor2 cursor for
                   
 		 select  max(booking)+1,concat(year_code,max(booking)+1) from booking_no;
		
                declare continue handler for not found
                    set no_more_rows2 =1;
                open cursor2;
                LOOP2: loop
                    fetch cursor2 into  maxCode, labCodeNumber;
                    
                    
                    update lab_requisition set booking_no=labCodeNumber where  department=department_data and print_type='singular_group' 
                        and request_id=in_request_id;
                    update booking_no set booking=maxcode;
	
	
                    if no_more_rows2 =1 then
                        close cursor2;
                        leave LOOP2;
                    end if;
		

                end loop LOOP2;
               	
            end BLOCK2;
    
	 end if;

	END LOOP getLab;
	CLOSE curLabtest;

END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `createlabcode_list` (IN `in_request_id` INT(100))  BEGIN
	DECLARE test_data,department_data, test_group_data INTEGER;
	declare finished integer default 0;
	DECLARE booking_no_data,label_type_data,patient_id_data varchar(100) ;
	

	DEClARE curLabtest 
		CURSOR FOR 
        
			SELECT booking_no,test,label_type,department,patient_id,test_group FROM lab_requisition where  request_id=in_request_id;
            
            
        

	-- declare NOT FOUND handler
	DECLARE CONTINUE HANDLER 
        FOR NOT FOUND SET finished = 1;

	OPEN curLabtest;

	getLab: LOOP
		FETCH curLabtest INTO booking_no_data,test_data,label_type_data,department_data,patient_id_data,test_group_data;

		
		IF finished = 1 THEN 
			LEAVE getLab;
		END IF;
		
  if  label_type_data='single' then 
		BLOCK2: begin
                declare maxCode, barcodeNumber int;
                declare no_more_rows2 integer default 0;
                declare cursor2 cursor for
                   
 		 select  max(barcode)+1,concat(initials,year_code,max(barcode)+1) from barcode where lab_code=department_data;
		
                declare continue handler for not found
                    set no_more_rows2 =1;
                open cursor2;
               LOOP2: loop
                    fetch cursor2 into  maxCode, barcodeNumber;
                    
                    
 update lab_requisition set code=barcodeNumber where booking_no=booking_no_data and test=test_data and label_type='single' and  request_id=in_request_id ;
		
    update barcode set barcode=maxcode where lab_code=department_data;
    
	
                    if no_more_rows2 =1 then
                        close cursor2;
                        leave LOOP2;
                    end if;
		



                end loop LOOP2;
            end BLOCK2;
elseif  label_type_data = 'grouped' then 
		BLOCK2: begin
                declare maxCode, barcodeNumber int;
                declare no_more_rows2 integer default 0;
                declare cursor2 cursor for
                   
 		 select  max(barcode)+1,concat(initials,year_code,max(barcode)+1) from barcode where lab_code=department_data;
		
                declare continue handler for not found
                    set no_more_rows2 =1;
                open cursor2;
               LOOP2: loop
                    fetch cursor2 into  maxCode, barcodeNumber;
                    
                    
                    if no_more_rows2 =1 then
                        close cursor2;
                        leave LOOP2;
                    end if;
		

 update lab_requisition set code=barcodeNumber where department=department_data and label_type = 'grouped' and  request_id=in_request_id;
           update barcode set barcode=maxcode where lab_code=department_data;

                end loop LOOP2;
               
            end BLOCK2;

            elseif  label_type_data='grouped_single' then 
		BLOCK2: begin
                declare maxCode, barcodeNumber int;
                declare no_more_rows2 integer default 0;
                declare cursor2 cursor for
                   
 		 select  max(barcode)+1,concat(initials,year_code,max(barcode)+1) from barcode where lab_code=department_data;
		
                declare continue handler for not found
                    set no_more_rows2 =1;
                open cursor2;
               LOOP2: loop
                    fetch cursor2 into  maxCode, barcodeNumber;
                    
                    
  update lab_requisition set code=barcodeNumber where  label_type='grouped_single'and  request_id=in_request_id and test_group=test_group_data;
                update barcode set barcode=maxcode where lab_code=department_data;
	
	
                    if no_more_rows2 =1 then
                        close cursor2;
                        leave LOOP2;
                    end if;
		

            

                end loop LOOP2;
               	
            end BLOCK2;
    
	 end if;

	END LOOP getLab;
	CLOSE curLabtest;

END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `create_bed` (IN `in_query_type` VARCHAR(20), IN `in_class` VARCHAR(20), IN `in_price` INT, IN `in_bed` VARCHAR(100), IN `in_facId` VARCHAR(50), IN `noOfBeds` INT)  NO SQL
IF in_query_type  = 'newBed' THEN
	INSERT INTO bedlist (class_type, price, name,facilityId,no_of_beds) VALUES (in_class, in_price, in_bed,in_facId,noOfBeds);
END IF$$

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 `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), IN `kName` VARCHAR(200), IN `kPhone` VARCHAR(100), IN `kRel` VARCHAR(20), IN `kEmail` VARCHAR(50), IN `kAddress` VARCHAR(200), IN `in_receiptsn` VARCHAR(50), IN `in_receiptno` VARCHAR(50), IN `in_sourceAcct` VARCHAR(50), IN `paybles_head` VARCHAR(50), IN `recievables_head` VARCHAR(50), IN `in_description` VARCHAR(50), IN `in_type` VARCHAR(50))  NO SQL
BEGIN
	DECLARE acc_no INT;
    select ifnull(max(accountNo), 0) + 1 INTO acc_no FROM patientfileno WHERE facilityId=facId;
    
    IF in_type = 'update' THEN
    	INSERT INTO patientfileno (accountNo, facilityId,accountType,accName,contactName,
                                       contactAddress,contactPhone, contactEmail, contactWebsite,
                                       firstname,surname) 
               VALUES (acc_no, facId, accType, concat(s_name,' ',f_name), c_name, 
                                               c_address, c_phone, c_email, web, f_name, s_name);
		UPDATE patientrecords set accountNo=acc_no, beneficiaryNo=1, id=concat(acc_no,'-',1) WHERE patient_id = patientId AND facilityId=facId;
    
    ELSE
    	IF accType = 'family' THEN
        	INSERT INTO patientfileno (accountNo, facilityId,accountType,accName,contactName,
                                       contactAddress,contactPhone, contactEmail, contactWebsite,
                                       firstname,surname) 
               VALUES (acc_no, facId, accType, concat(s_name,' ',f_name), c_name, 
                                               c_address, c_phone, c_email, web, f_name, s_name);
        	INSERT INTO patientrecords (accountNo, beneficiaryNo, id, facilityId,surname,firstname,
                                        gender,maritalstatus,DOB,phoneNo,email, occupation,
                                        address,patient_id,kinName,kinRelationship,kinPhone,
                                        kinEmail,kinAddress) 
               VALUES (acc_no,1,concat(acc_no,'-',1), facId,s_name,f_name,gender,maritalStatus, dob, 
                                                c_phone,c_email,p_occupation, c_address, 
                                                patientId,kName,kRel,kPhone,kEmail,kAddress);

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

    	END IF;
    END IF;
    
    IF depositAmount > 0 THEN
    	CALL customer_deposit(acc_no,depositAmount,userId,in_receiptsn, in_receiptno, in_description, in_modeOfPayment, facId,in_sourceAcct,concat(s_name,' ', f_name),accType,NOW(),c_address,c_phone,c_email,web,paybles_head,recievables_head,'','','','');
   	END IF;
    
COMMIT;
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `create_new_lab_client` (IN `client_acc` 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))  BEGIN 

INSERT INTO patientrecords (accountNo,beneficiaryNo,id,firstname,surname,other,Gender, DOB,email,facilityId,phoneNo) VALUES (acc_no,ben_no,CONCAT(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), IN `in_pid` VARCHAR(50), IN `in_txn_status` 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,client_id,txn_status)
		values (in_acct,abs(Amount_paid),0,in_receiptDateSN,in_description,in_facId,in_date,in_pid,in_txn_status);
        
		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,client_id,txn_status)
		values (in_acct,abs(Amount_paid),0,in_receiptDateSN,in_description,in_facId,in_date,in_pid,in_txn_status);
        
		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,client_id,txn_status)
		values (in_acct,abs(Amount_paid),0,in_receiptDateSN,in_description,in_facId,in_date,in_pid,in_txn_status);
		 
		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,client_id,txn_status)
		values (in_acct,Amount_paid,0,in_receiptDateSN, in_description,in_facId, in_date,in_pid,in_txn_status);

		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,client_id,txn_status)
		values (in_acct,abs(Amount_paid),0,in_receiptDateSN,in_description,in_facId,in_date,in_pid,in_txn_status);

		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 `deleteOperationNote` (IN `in_id` INT, IN `facId` VARCHAR(50))  NO SQL
DELETE FROM operationnotes where id=in_id and facilityId=facId$$

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 `department` (IN `in_query_type` VARCHAR(10), IN `in_facId` VARCHAR(50), IN `in_name` VARCHAR(50), IN `in_user_id` VARCHAR(50))  NO SQL
if in_query_type = 'new' THEN
	INSERT INTO department (dept_name, created_by, facilityId) VALUES (in_name,in_user_id,in_facId);
ELSEIF in_query_type = 'get' THEN
	SELECT * FROM department WHERE facilityId=in_facId;
END IF$$

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 `getLabReceipt` (IN `in_receiptNo` VARCHAR(50), IN `in_facilityId` VARCHAR(50))  NO SQL
SELECT description,credit as price, patient_id,createdAt,enteredBy,modeOfPayment FROM  transactions    WHERE receiptDateSN = in_receiptNo  AND  credit !=0 AND facilityId=in_facilityId$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `getQTY` (IN `in_item_name` VARCHAR(40))  NO SQL
SELECT SUM(qty_in-qty_out) as qty FROM `store` WHERE item_name=in_item_name$$

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,price FROM account WHERE facilityId=facId;
    #SELECT head,subhead title FROM account WHERE facilityId=facId;
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `get_acc_head_for_acc` (IN `in_description` VARCHAR(100), IN `in_facId` VARCHAR(50))  NO SQL
SELECT * from account where description=in_description AND facilityId=in_facId$$

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_beds` (IN `in_query_type` VARCHAR(20), IN `in_facId` VARCHAR(50))  NO SQL
IF in_query_type = 'classes' THEN
	SELECT DISTINCT class_type FROM bedlist WHERE facilityId=in_facId;
ELSEIF in_query_type = 'bedlist' THEN
	SELECT * FROM bedlist_view WHERE facilityId=in_facId;
ELSEIF in_query_type = 'available' THEN
	SELECT * FROM bedlist_view WHERE occupied != no_of_beds AND facilityId=in_facId;
END IF$$

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 concat(a.drug, ' (', a.generic_name,')') as 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), IN `in_query_type` VARCHAR(20))  IF in_query_type = 'specialist' THEN
    	SELECT * FROM users WHERE role = 'doctor' AND speciality != 'General' AND facilityId=facId;
    ELSE
    	SELECT * FROM users WHERE role = 'doctor' AND facilityId=facId;
	END IF$$

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_freq` (IN `facId` INT)  NO SQL
SELECT description FROM drug_frequency$$

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 like '3%' 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 FROM hospitals WHERE id = fac_id$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `get_id` (IN `facId` VARCHAR(50))  BEGIN
    select ifnull(max(accountNo), 0) + 1 as nextId 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_inventory` ()  NO SQL
SELECT * from list_items WHERE balance>0$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `get_item_category` (IN `in_subhead` VARCHAR(50), IN `in_fadId` VARCHAR(50))  NO SQL
SELECT * FROM `item_description` where subhead = in_subhead and facilityId=in_fadId$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `get_lab` (IN `in_query_type` VARCHAR(50), IN `in_facId` VARCHAR(50), IN `in_status` VARCHAR(50))  NO SQL
BEGIN
	IF in_query_type = 'sample collection' THEN
    	SELECT DISTINCT concat(b.surname, ' ', b.firstname) as name,a.booking_no as labno,  code,
        COUNT(DISTINCT department) AS no_of_tests, department_head AS department, a.patient_id
        FROM lab_process a JOIN patientrecords b ON a.patient_id=b.patient_id 
        WHERE a.status = in_status AND a.facilityId=in_facId AND b.facilityId=in_facId
        GROUP BY booking_no,name;
    END IF;

END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `get_lab_by_status` (IN `in_query_type` INT, IN `in_status` INT, IN `facId` INT)  NO SQL
IF in_query_type = 'list' THEN
	SELECT a.booking_no, concat(b.firstname, ' ', b.surname) as name,a.patient_id,a.created_at,
        a.department
        FROM lab_requisition a JOIN patientrecords b ON a.patient_id=b.id
        WHERE a.status IN (in_status) AND
        a.facilityId=facId AND b.facilityId=facId
        GROUP BY booking_no,a.patient_id,date(a.created_at),name
        order by a.created_at DESC;
END IF$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `get_lab_list` (IN `in_query_type` VARCHAR(10), IN `in_facId` VARCHAR(50), IN `in_pid` VARCHAR(50), IN `date_from` DATE, IN `date_to` DATE)  NO SQL
IF in_query_type = 'all' THEN
	SELECT a.booking_no, concat(b.firstname, ' ', b.surname) as name,a.patient_id,a.created_at,a.department,count(a.status) as tests,
    (SELECT COUNT(*) FROM lab_requisition WHERE status IN ('pending') AND booking_no=a.booking_no ) as pending,
	(SELECT COUNT(*) FROM lab_requisition WHERE status IN ('Sample Collected', 'saved') AND booking_no=a.booking_no ) as collected,
	(SELECT COUNT(*) FROM lab_requisition WHERE status IN ('analyzed') AND booking_no=a.booking_no ) as analyzed,
    (SELECT COUNT(*) FROM lab_requisition WHERE status='result' AND booking_no=a.booking_no AND facilityId=in_facId) as completed
		FROM lab_requisition a JOIN patientrecords b ON a.patient_id=b.id 
        WHERE a.facilityId=in_facId AND a.status!='printed'
        AND (a.created_at BETWEEN date(date_from) AND date(date_to)) AND b.facilityId=in_facId 
        GROUP BY booking_no, a.patient_id, a.created_at, name order by count(a.status)-completed, count(a.status)-analyzed, 
        a.created_at DESC;
    ELSE
    	
       SELECT booking_no, patient_id,created_at,department,count(status) as tests,(SELECT COUNT(*) FROM lab_requisition WHERE status='result' AND booking_no=booking_no AND facilityId=in_facId) as completed
		FROM lab_requisition WHERE patient_id=in_pid AND facilityId=in_facId GROUP BY booking_no, created_at order by count(status)-completed, created_at DESC;
        END IF$$

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_result` (IN `query_type` VARCHAR(20), IN `in_labno` VARCHAR(50), IN `facId` VARCHAR(50))  NO SQL
IF query_type = 'completed' THEN
	SELECT specimen,code,receiptNo,booking_no, description as test, description, group_head as test_group, 
        group_head, a.department, ifnull(a.result, '') result, unit, 
        range_from, range_to, o_value, h_value, appearance,serology,culture_yielded,resistivity,sensitivity, intermediaryTo,
        a.status, a.created_by, a.created_at, a.sample_collected_by,a.report_type,
        CONCAT(b.firstname, ' ', b.lastname) AS result_by,
        result_at, reviewed_by 
        FROM lab_process 
        a JOIN users b ON a.result_by = b.username
        WHERE booking_no=in_labno AND a.facilityId=facId 
        AND b.facilityId=facId
        GROUP BY description
        ORDER BY created_at DESC;
ELSEIF query_type = 'uncompleted' THEN
	SELECT specimen,code,receiptNo,booking_no, description as test, description, group_head as test_group, 
        group_head, department, ifnull(result,'') result, unit,  o_value, h_value,
        range_from, range_to, appearance,serology,culture_yielded,resistivity,sensitivity, intermediaryTo,
        status, created_by, created_at, sample_collected_by, result_by, result_at, reviewed_by, report_type
        FROM lab_process 
        WHERE booking_no=in_labno AND facilityId=facId
        group by description
        ORDER BY group_head;
ELSEIF query_type = 'doctor' THEN
SELECT specimen,code,receiptNo,booking_no, description as test, description, group_head as test_group, 
        group_head, department, ifnull(result,'') result, unit,  o_value, h_value,
        range_from, range_to, appearance,serology,culture_yielded,resistivity,sensitivity, intermediaryTo,
        status, created_by, created_at, date(created_at) as requested_date, sample_collected_by, result_by, result_at, reviewed_by, report_type
        FROM lab_process 
        WHERE patient_id=in_labno AND facilityId=facId
        ORDER BY created_at DESC;
END IF$$

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_nursing_reports` (IN `query_type` VARCHAR(10), IN `facId` VARCHAR(50))  NO SQL
IF query_type = 'all' THEN
	SELECT * FROM nursing_report where facilityId=facId;
END IF$$

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_drug_schedule` (IN `query_type` VARCHAR(20), IN `in_patient_id` VARCHAR(50), IN `facId` VARCHAR(50), IN `in_date` DATE)  NO SQL
IF query_type = 'all_schedule' THEN
	SELECT * FROM drug_schedule where patient_id = in_patient_id ORDER BY time_stamp ASC;
ELSEIF query_type = 'by_date' THEN
	IF in_patient_id = 'all' THEN
    	SELECT a.id, b.patient_name as name, a.patient_id, b.name as bed_name, b.class_type, a.drug as drug_name, a.dosage, a.route, time_stamp, a.status, administered_by, a.facilityId FROM drug_schedule_view a JOIN in_patient_list b ON a.patient_id = b.patient_id where a.status != 'stop' AND date(time_stamp) = in_date AND a.facilityId=facId ORDER BY time_stamp ASC;
    ELSE
		SELECT * FROM drug_schedule where patient_id = in_patient_id AND a.status != 'stop' AND date(time_stamp) = in_date ORDER BY time_stamp ASC;
    END IF;
END IF$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `get_patient_list` (IN `in_facilityId` VARCHAR(50), IN `in_condition` VARCHAR(20), IN `in_query_type` VARCHAR(20))  NO SQL
IF in_query_type = 'in_patients' THEN
	SELECT * FROM in_patient_list WHERE facilityId=in_facilityId ORDER BY sort_index;
ELSEIF in_query_type = 'in_patient' THEN
	SELECT * FROM in_patient_list  WHERE allocation_id=in_condition AND facilityId=in_facilityId ORDER BY sort_index;
ELSEIF in_query_type = 'in_patient_by_id' THEN
	SELECT * FROM in_patient_list  WHERE patient_id=in_condition AND facilityId=in_facilityId ORDER BY sort_index;
ELSEIF in_query_type = 'by_status' THEN
	SELECT * FROM in_patient_list  WHERE status=in_condition AND facilityId=in_facilityId ORDER BY sort_index;
    
ELSE
	SELECT id, patient_id, concat(surname, ' ', firstname) as name, dob, Gender as gender, ifnull(phoneNo,'') as phoneNo, ifnull(email, '') as email
        FROM patientrecords WHERE surname!=in_condition  AND facilityId=in_facilityId ORDER BY dateCreated DESC;
        END IF$$

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_patient_txn` (IN `query_type` VARCHAR(20), IN `in_patient_id` VARCHAR(50), IN `facId` VARCHAR(50))  NO SQL
IF query_type = 'all' THEN
	SELECT * FROM transactions where patient_id=in_patient_id AND debit<>0 AND facilityId=facId;
END IF$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `get_pending_lab` (IN `query_type` VARCHAR(10), IN `in_dept` VARCHAR(50), IN `facId` VARCHAR(50), IN `fromDate` DATE, IN `toDate` DATE)  NO SQL
BEGIN SELECT DISTINCT a.booking_no as labno, concat(b.surname, ' ', b.firstname) as name, a.department_head AS department, COUNT(distinct description) AS no_of_tests, a.patient_id, description,a.subhead,a.code FROM lab_process a JOIN patientrecords b ON a.patient_id=b.id WHERE a.status = query_type AND a.department_head=in_dept AND a.facilityId=facId AND b.facilityId=facId 
AND date(created_at) BETWEEN date(fromDate) AND date(toDate)
GROUP by labno, description,a.patient_id; END$$

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_nursing_requests` (IN `in_facId` VARCHAR(50))  NO SQL
SELECT nursing_request, dressing_request FROM consultations WHERE nursing_request_status='pending' AND facilityId = in_facId$$

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_purchase_order` (IN `in_query_type` VARCHAR(10), IN `from_date` DATE, IN `to_date` DATE)  NO SQL
IF in_query_type = 'reviewer' THEN
	SELECT a.id,po_id,date,type,vendor,client,item_name,specification,quantity_in_stock,
    	proposed_quantity,exchange_type,exchange_rate,unit_price,a.amount,
        status,insected_by,renew,po_number,total_amount+SUM( ifNull(b.amount,0)) as total_amount,grn_number,
        auditor_remark,management_remark,supplier_code,supplier_account,processed_by 
	FROM purchase_order a LEFT JOIN other_expenses b ON a.po_id=b.PONo 
    where status IN ("pending","ManagementReject", "BackToAuditor") 
    GROUP BY po_id ORDER by po_id;
    
ELSEIF in_query_type = 'auditor' THEN
	SELECT a.id,po_id,date,type,vendor,client,item_name,specification,quantity_in_stock,
    	proposed_quantity,exchange_type,exchange_rate,unit_price,a.amount,
        status,insected_by,renew,po_number,total_amount+SUM( ifNull(b.amount,0)) as total_amount,grn_number,
        auditor_remark,management_remark,supplier_code,supplier_account,processed_by 
	FROM purchase_order a LEFT JOIN other_expenses b ON a.po_id=b.PONo 
    where status IN ("BackToAuditor", "ManagementApproved","Reviewer") 
    GROUP BY po_id ORDER by po_id;
    
ELSEIF in_query_type = 'account' THEN
    SELECT a.id,po_id,date,type,vendor,client,item_name,specification,quantity_in_stock,
    	proposed_quantity,exchange_type,exchange_rate,unit_price,a.amount,
        status,insected_by,renew,po_number,total_amount+SUM( ifNull(b.amount,0)) as total_amount,grn_number,
        auditor_remark,management_remark,supplier_code,supplier_account,processed_by 
		FROM purchase_order a LEFT JOIN other_expenses b ON a.po_id=b.PONo 
    where status = "ReviewerApproved"
    	GROUP BY po_id 
    	ORDER by po_id;
ELSEIF in_query_type = 'all' THEN
	#SELECT * FROM purchase_order where facilityId=in_facilityId ORDER BY po_id DESC
    SELECT a.id,po_id,date,type,vendor,client,item_name,specification,quantity_in_stock,
    	proposed_quantity,exchange_type,exchange_rate,unit_price,a.amount,
        status,insected_by,renew,po_number,total_amount+SUM( ifNull(b.amount,0)) as total_amount,grn_number,
auditor_remark,management_remark,supplier_code,supplier_account,processed_by 
		FROM purchase_order a LEFT JOIN other_expenses b ON a.po_id=b.PONo   WHERE date(date)BETWEEN date(from_date) AND date(to_date) 
    	GROUP BY po_id 
    	ORDER by po_id;
ELSEIF in_query_type = 'management' THEN
	SELECT a.id, po_id,date,type,vendor,client,item_name, specification, quantity_in_stock, proposed_quantity,
exchange_type, exchange_rate, unit_price, a.amount, status, insected_by, renew,po_number,
total_amount+SUM( ifNull(b.amount,0)) as total_amount, grn_number, auditor_remark, management_remark, supplier_code, supplier_account, processed_by 
FROM purchase_order a LEFT JOIN other_expenses b ON a.po_id=b.PONo where status IN ("Audited","BackToManagement","ReviewerReject") GROUP BY po_id ORDER by po_id;

END IF$$

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_prescribed_drugs` (IN `query_type` VARCHAR(10), IN `in_patient_id` VARCHAR(50), IN `facId` VARCHAR(50))  NO SQL
IF query_type = 'pending' THEN
	SELECT drug,dosage,patient_id,a.id as prescription_id, created_at,duration,period,frequency, b.time_start, b.interval_, b.interval_uom FROM dispensary a JOIN drug_frequency b on a.frequency=b.description WHERE patient_id=in_patient_id AND schedule_status='pending' AND facilityId = facId;
ELSEIF query_type ='current' THEN
	SELECT created_at, concat(route,' ', drug,' ',dosage, ' ', frequency, ' for ', duration, ' ', period) as medication, duration, period, id, created_at FROM dispensary WHERE id in (SELECT prescription_id FROM drug_schedule WHERE status = 'scheduled') AND patient_id=in_patient_id AND facilityId = facId;
    
END IF$$

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_report_by_type` (IN `type` VARCHAR(50), IN `facId` VARCHAR(50), IN `fromDate` DATE, IN `toDate` DATE)  NO SQL
BEGIN
	IF type = 'revenue' THEN
    	SELECT transaction_id, transaction_date, description, acct, credit, receiptDateSN, modeOfPayment,client_acct, concat(b.surname, ' ', b.firstname) as patient_id FROM `transactions` a JOIN patientrecords b ON (a.patient_id = b.id AND a.facilityId=b.facilityId) where credit <> 0 AND acct like '20%'  AND a.facilityId=facId AND date(transaction_date) BETWEEN date(fromDate) AND date(toDate);
        
    ELSEIF type = 'expenses' THEN
    	SELECT transaction_id, transaction_date, description, acct, debit, receiptDateSN, modeOfPayment,client_acct FROM `transactions` where debit <> 0 AND acct like '30%' AND facilityId=facId AND date(transaction_date) BETWEEN date(fromDate) AND date(toDate);
        
    ELSEIF type = 'trialbalance' THEN
    	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.credit) - sum(a.debit)) AS credit,a.transaction_date AS date,a.facilityId AS facilityId 
		FROM (test1 a JOIN account b ON ((a.subhead = b.head))) 
    	WHERE a.transaction_date BETWEEN date(fromDate) and date(toDate)
    	GROUP BY head,a.subhead,a.head,a.des,a.acct,(b.description <> 0);
    
    ELSEIF type = 'profitloss' THEN
    	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.credit) - sum(a.debit)) AS credit,a.transaction_date AS date,a.facilityId AS facilityId 
		FROM (test1 a JOIN account b ON ((a.subhead = b.head))) 
    	WHERE a.subhead like '200%' OR a.subhead like '300%' AND a.transaction_date BETWEEN date(fromDate) and date(toDate)
    	GROUP BY head,a.subhead,a.head,a.des,a.acct,(b.description <> 0);
    	
    END IF;
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `get_request_no` (IN `in_facilityId` VARCHAR(50))  SELECT ifnull(max(request_id), 0) + 1 as request_id FROM lab_requisition WHERE facilityId=in_facilityId$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `get_rev_acc_heads` (IN `facId` VARCHAR(50))  BEGIN
    SELECT head as title, subhead, description, price FROM account WHERE subhead = '20000' 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 `good_received` (IN `in_status` VARCHAR(50), IN `in_id` INT(50))  NO SQL
BEGIN

if in_status="unfinished purchase" 
THEN
select a.item_name,a.price,a.type,a.item_category,a.propose_quantity,a.po_id,a.exchange_rate,sum(b.qty_in) as qty_in, (a.propose_quantity - (select sum(b.qty_in) from store a where a.po_no=in_id GROUP by po_no )) as quantity,expired_status from purchase_order_list a join store b on a.po_id=b.po_no AND a.po_id =in_id GROUP by a.item_name,a.price,a.type, a.propose_quantity,a.po_id,a.exchange_rate;

ELSEIF in_status ="new order" THEN
SELECT id,item_name, price,propose_quantity ,type,item_category, po_id,identifier,exchange_rate,date,received_qty, expired_status FROM purchase_order_list WHERE po_id=in_id AND status="new order";
end if;
End$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `lab_summary` (IN `in_query_type` VARCHAR(50), IN `in_facId` VARCHAR(50), IN `in_fromdate` DATE, IN `in_todate` DATE, IN `in_report_by` VARCHAR(50))  NO SQL
BEGIN
	IF in_query_type = 'patient income' THEN
    	if in_report_by = 'all' THEN
    	SELECT concat(b.firstname,' ',b.surname) as fullname, sum(debit)as debit, sum(credit) as credit, sum(debit - credit) as balance, a.createdAt FROM transactions a JOIN patientrecords b ON a.patient_id=b.id AND a.facilityId=b.facilityId WHERE a.facilityId=in_facId AND date(a.createdAt) between in_fromdate AND in_todate GROUP BY fullname, date(a.createdAt) ORDER BY createdAt DESC;
        ELSE
        	SELECT concat(b.firstname,' ',b.surname) as fullname, sum(debit) as debit, sum(credit) as credit, sum(debit - credit) as balance, a.createdAt FROM transactions a JOIN patientrecords b ON a.patient_id=b.id AND a.facilityId=b.facilityId WHERE a.facilityId=in_facId AND a.enteredBy=in_report_by AND date(a.createdAt) between in_fromdate AND in_todate GROUP BY fullname, date(a.createdAt) ORDER BY createdAt DESC;
            END IF;
        
    ELSEIF in_query_type = 'daily total' THEN
    	IF in_report_by = 'all' THEN
    	SELECT date(createdAt) as createdAt, Acct_source, sum(debit) as amount, acct FROM trial_balance where facilityId=in_facId AND acct in (400021,400022,400023,400024,400025) AND date(createdAt) between in_fromdate AND in_todate GROUP BY Acct_source, acct, date(createdAt) ORDER BY createdAt desc;
        ELSE 
        	SELECT date(createdAt) as createdAt, Acct_source, sum(debit) as amount, acct FROM trial_balance where facilityId=in_facId AND enteredBy=in_report_by AND acct in (400021,400022,400023,400024,400025) AND date(createdAt) between in_fromdate AND in_todate GROUP BY Acct_source, acct, date(createdAt) ORDER BY createdAt desc;
            END IF;
        
    END IF;
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `ldl_formula` (IN `TC` INT, IN `HDL` INT, IN `TG` INT, OUT `LDL` INT)  NO SQL
BEGIN

SELECT TC - HDL - (TG/2.2) AS LDL;
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), IN `in_shift` VARCHAR(20))  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,shift)
        values (d_code,drug_name,expiry,cost,unit,0,in_qty,'purchases',userId,generic,facId,mark_up,in_receiptno,in_shift);
        
   INSERT INTO drugs(drug_code,drug,expiry_date,price,
        unit_of_issue,
        qty_in,
        qty_out,
        source,
        created_by,
        genericName,
        facilityId,markup,receipt_no,shift)
        values (d_code,drug_name,expiry,cost,unit,in_qty,0,'dispensary',userId,generic,facId,mark_up,in_receiptno,in_shift);
        
        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,shift)
        values (d_code,drug_name,expiry,cost,unit,0,in_qty,'purchases',
                userId,generic,facId,mark_up,supplierId,in_receiptno,in_shift);
        
   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,shift)
        values (d_code,drug_name,expiry,cost,unit,in_qty,0,'dispensary',
                userId,generic,facId,mark_up,supplierId,in_receiptno, in_shift);
  
  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,shift)
        values (d_code,drug_name,expiry,cost,unit,0,in_qty,'purchases',userId,
                generic,facId,mark_up,supplierId,in_receiptno,in_shift);
        
   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,shift)
        values (d_code,drug_name,expiry,cost,unit,in_qty,0,'dispensary',userId,
                generic,facId,mark_up,supplierId,in_receiptno,in_shift);
        
        END IF;
        end if;

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), IN `txn_date` DATE)  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 `patient_history` (IN `in_patient_id` VARCHAR(50), IN `in_req_id` INT, IN `in_history` VARCHAR(1000), IN `in_file` VARCHAR(200), IN `in_query_type` VARCHAR(50), IN `in_facId` VARCHAR(50))  NO SQL
IF in_query_type='insert' THEN
	INSERT INTO patient_history (patient_id,request_id,history,file,facilityId) VALUES (in_patient_id,in_req_id,in_history,in_file,in_facId);
ELSEIF in_query_type = 'get_history' THEN
	SELECT concat(a.firstname, ' ', a.surname) as name, a.dob, a.Gender as gender, a.Gender as sex, a.id,
        DOB as dob, ifnull(a.phoneNo,'') as phoneNo,b.history 
        FROM patientrecords a JOIN patient_history b
        WHERE a.id = in_patient_id AND b.request_id=in_req_id AND a.facilityId=in_facId;
END IF$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `pending_prescription` (IN `in_status` VARCHAR(50), IN `facId` VARCHAR(50))  NO SQL
SELECT a.request_id, a.patient_id, count(drug) as count, prescribed_by, concat(b.firstname, ' ', b.surname) as name 
      FROM dispensary a JOIN patientrecords b ON (a.patient_id=b.accountNo) 
      WHERE a.status=in_status and a.facilityId=facId
      group by a.request_id, a.patient_id, prescribed_by,name$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `save_vitals` (IN `in_query_type` VARCHAR(20), IN `in_b_temp` VARCHAR(10), IN `in_pulse` VARCHAR(10), IN `in_b_p` VARCHAR(10), IN `in_resp_rate` VARCHAR(10), IN `in_fasting` VARCHAR(10), IN `in_random` VARCHAR(10), IN `in_user` VARCHAR(50), IN `in_facId` VARCHAR(50), IN `in_patient_id` VARCHAR(50), IN `in_created_at` TIMESTAMP)  NO SQL
IF in_query_type = 'new' THEN
	INSERT INTO vital_signs (body_temp,pulse_rate,blood_pressure,respiratory_rate,
  fasting_blood_sugar, random_blood_sugar,created_by,facilityId,patient_id,created_at) VALUES (in_b_temp,in_pulse,in_b_p,in_resp_rate,in_fasting,in_random,in_user,in_facId,in_patient_id,in_created_at);
ELSEIF in_query_type = 'list by patient' THEN
	SELECT * FROM vital_signs WHERE patient_id=in_patient_id ORDER BY created_at DESC;
END IF$$

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), IN `in_bank_name` VARCHAR(50), IN `in_txn_date` DATE, IN `in_discount` INT, IN `in_discount_head` VARCHAR(50), IN `txn_status` VARCHAR(30))  BEGIN
	declare client_balance int;
	declare main_balance int;
    declare receivable int;
    DECLARE instant_balance int;
    DECLARE cash_amount int;
   
--    declare service_description varchar(200);
	select balance into client_balance  from patientfileno where accountNo=in_acct AND facilityId=in_facId;
	
    set cash_amount = service_amount - in_discount;
    set main_balance = client_balance-cash_amount;
    set receivable  = cash_amount-client_balance;
    set instant_balance = client_balance + cash_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,bank_name,transaction_date)
            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,in_bank_name,in_txn_date);

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


            insert into transactions (description,acct,debit,credit,receiptDateSN,receiptNo,modeOfPayment,enteredBy,client_acct,patient_id,facilityId,createdAt,bank_name,transaction_date)
            values (in_description,sourceAcct,abs(cash_amount),0 ,in_receiptDateSN,in_receiptSN,in_mode_of_payment,userId,in_acct,patientId,in_facId,in_date,in_bank_name,in_txn_date);
            
            IF in_discount > 0 THEN
            	insert into transactions (description,acct,debit,credit,receiptDateSN,receiptNo,modeOfPayment,enteredBy,client_acct,patient_id,facilityId,createdAt,bank_name,transaction_date)
            values (in_description,in_discount_head,in_discount,0 ,in_receiptDateSN,in_receiptSN,in_mode_of_payment,userId,in_acct,patientId,in_facId,in_date,in_bank_name,in_txn_date);
            END IF;
    
    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,bank_name,transaction_date)
            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,in_bank_name,in_txn_date);

# insert into transactions (description,acct,debit,credit,receiptDateSN,receiptNo,modeOfPayment,enteredBy,
 #                         client_acct,patient_id,facilityId,createdAt,bank_name,transaction_date)
  #          values (in_description,'500011',0,service_amount,in_receiptDateSN,in_receiptSN,in_mode_of_payment,
  #                  userId,in_acct,patientId,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,transaction_date)
            values (in_description,in_payables_head,abs(cash_amount),0 ,in_receiptDateSN,in_receiptSN,in_mode_of_payment,userId,in_acct,patientId,in_facId,in_date,in_bank_name,in_txn_date);
            
            IF in_discount > 0 THEN
            	insert into transactions (description,acct,debit,credit,receiptDateSN,receiptNo,modeOfPayment,enteredBy,client_acct,patient_id,facilityId,createdAt,bank_name,transaction_date)
            values (in_description,in_discount_head,in_discount,0 ,in_receiptDateSN,in_receiptSN,in_mode_of_payment,userId,in_acct,patientId,in_facId,in_date,in_bank_name,in_txn_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,bank_name,transaction_date)
            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,in_bank_name,in_txn_date);

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

            if client_balance = 0 then
            insert into transactions (description,acct,debit,credit,receiptDateSN,receiptNo,modeOfPayment,enteredBy,client_acct,patient_id,facilityId,createdAt,bank_name,transaction_date)
            values (in_description,in_recievables_head,abs(cash_amount),0 ,in_receiptDateSN,in_receiptSN,in_mode_of_payment,userId,in_acct,patientId,in_facId,in_date,in_bank_name,in_txn_date);
            
            IF in_discount > 0 THEN
            	insert into transactions (description,acct,debit,credit,receiptDateSN,receiptNo,modeOfPayment,enteredBy,client_acct,patient_id,facilityId,createdAt,bank_name,transaction_date)
            values (in_description,in_discount_head,in_discount,0 ,in_receiptDateSN,in_receiptSN,in_mode_of_payment,userId,in_acct,patientId,in_facId,in_date,in_bank_name,in_txn_date);
            END IF;

            -- 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,bank_name,transaction_date)
            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,in_bank_name,in_txn_date);

            insert into transactions (description,acct,debit,credit,receiptDateSN,receiptNo,modeOfPayment,enteredBy,client_acct,patient_id,facilityId,createdAt,bank_name,transaction_date)
            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,in_bank_name,in_txn_date);
            
            IF in_discount > 0 THEN
            	insert into transactions (description,acct,debit,credit,receiptDateSN,receiptNo,modeOfPayment,enteredBy,client_acct,patient_id,facilityId,createdAt,bank_name,transaction_date)
            values (in_description,in_discount_head,in_discount,0 ,in_receiptDateSN,in_receiptSN,in_mode_of_payment,userId,in_acct,patientId,in_facId,in_date,in_bank_name,in_txn_date);
            END IF;
            
        elseif client_balance < 0  then

            insert into transactions (description,acct,debit,credit,receiptDateSN,receiptNo,modeOfPayment,enteredBy,client_acct,patient_id,facilityId,createdAt,bank_name,transaction_date)
            values (in_description,in_recievables_head,abs(cash_amount),0 ,in_receiptDateSN,in_receiptSN,in_mode_of_payment,userId,in_acct,patientId,in_facId,in_date,in_bank_name,in_txn_date);
            
            IF in_discount > 0 THEN
            	insert into transactions (description,acct,debit,credit,receiptDateSN,receiptNo,modeOfPayment,enteredBy,client_acct,patient_id,facilityId,createdAt,bank_name,transaction_date)
            values (in_description,in_discount_head,in_discount,0 ,in_receiptDateSN,in_receiptSN,in_mode_of_payment,userId,in_acct,patientId,in_facId,in_date,in_bank_name,in_txn_date);
            END IF;

            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,bank_name,transaction_date)
            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,in_bank_name,in_txn_date);

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

            insert into transactions (description,acct,debit,credit,receiptDateSN,receiptNo,modeOfPayment,enteredBy,client_acct,patient_id,facilityId,createdAt,bank_name,transaction_date)
            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,in_bank_name,in_txn_date);
            
            IF in_discount > 0 THEN
            	insert into transactions (description,acct,debit,credit,receiptDateSN,receiptNo,modeOfPayment,enteredBy,client_acct,patient_id,facilityId,createdAt,bank_name,transaction_date)
            values (in_description,in_discount_head,in_discount,0 ,in_receiptDateSN,in_receiptSN,in_mode_of_payment,userId,in_acct,patientId,in_facId,in_date,in_bank_name,in_txn_date);
            END IF;

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

CREATE DEFINER=`root`@`localhost` PROCEDURE `surgeon` (IN `in_name` VARCHAR(100), IN `in_type` VARCHAR(100), IN `in_id` INT(11), IN `facId` VARCHAR(50), IN `query_type` VARCHAR(20))  NO SQL
BEGIN
IF query_type = 'select' THEN
SELECT name, type, id FROM surgeons_list WHERE facilityId =facId;
ELSEIF query_type = 'by_type' THEN
SELECT name, type, id FROM surgeons_list WHERE type=in_type AND facilityId =facId;
ELSEIF  query_type = 'update' THEN
UPDATE surgeons_list SET name=in_name, type=in_type where id=in_id and facilityId =facId;
ELSEIF  query_type = 'delete' THEN
DELETE from surgeons_list WHERE id=in_id and facilityId =facId;
ELSEIF  query_type = 'select_one' THEN
SELECT * from surgeons_list WHERE id=in_id and facilityId =facId;
END IF;
END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `update_dispensary` (IN `in_query_type` VARCHAR(50), IN `in_status` VARCHAR(50), IN `in_pr_id` VARCHAR(50))  NO SQL
IF in_query_type = 'new schedule' THEN
	UPDATE dispensary SET schedule_status = 'scheduled' WHERE id = in_pr_id;
ELSE 
	UPDATE dispensary SET schedule_status = in_status WHERE id = in_pr_id;
END IF$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `update_prescription` (IN `in_schedule_id` VARCHAR(50), IN `in_served_by` VARCHAR(50), IN `in_facId` VARCHAR(50), IN `in_reason` VARCHAR(500), IN `in_query_type` VARCHAR(20))  NO SQL
IF in_query_type = 'served' THEN
	UPDATE drug_schedule SET status=in_query_type, served_by=in_served_by WHERE id=in_schedule_id AND facilityId=in_facId; 
ELSEIF in_query_type = 'not served' THEN
	UPDATE drug_schedule SET status=in_query_type, served_by=in_served_by, reason=in_reason WHERE id=in_schedule_id AND facilityId=in_facId; 
ELSEIF in_query_type = 'stop' THEN
	UPDATE drug_schedule SET status = in_query_type, stopped_by=in_served_by WHERE prescription_id = in_schedule_id AND status='scheduled' AND facilityId=in_facId;
    CALL update_dispensary(in_query_type,in_query_type,in_schedule_id);

END IF$$

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,
  `price` int(11) 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`, `price`, `facilityId`) VALUES
('10000', 0, '', 'PSC Specialist Hospital Limited', 0, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('20000', 0, '10000', 'Revenue', 0, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('30000', 0, '10000', 'Expenses', 0, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('40000', 0, '10000', 'Asset', 0, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('50000', 0, '10000', 'Equity & Liability', 0, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('40001', 0, '40000', 'Non Current Assets', 0, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('40002', 0, '40000', 'Current Asset', 0, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('400021', 0, '40002', 'Cash', 0, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('400022', 0, '40002', 'Bank', 0, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('400023', 0, '40002', 'Recievables', 0, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('400024', 0, '40002', 'Stocks', 0, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('400025', 0, '40002', 'Petty Cash', 0, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('50001', 0, '50000', 'Equity', 0, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('50002', 0, '50000', 'Liability', 0, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('500011', 0, '50001', 'Retained Earnings', 0, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('500012', 0, '50001', 'Share Capital', 0, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('500013', 0, '50001', 'Accumulated Fund', 0, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('500021', 0, '50002', 'Payables', 0, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('400011', 0, '40001', 'Land & Building', 0, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('400012', 0, '40001', 'Plant & Machinery', 0, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('400013', 0, '40001', 'Motor Vehicle', 0, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('400014', 0, '40001', 'Furniture & Fittings', 0, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('20001', 0, '20000', 'Registration ( Single )', 5000, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('20002', 0, '20000', 'Registration ( Family )', 7000, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('20003', 0, '20000', 'Regular Consultation', 3000, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('20004', 0, '20000', 'Specialist Consultation', 8000, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('20005', 0, '20000', 'General Ward ( 1, 2, 3 )', 7000, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('20006', 0, '20000', 'Private ( 1, 2, Yellow )', 12000, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('20007', 0, '20000', 'PSC ANNEX ( 0, 1, 2, 3, )', 17000, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('20008', 0, '20000', 'Houses ( White, Blue, Green, Annex Double )', 19000, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('20009', 0, '20000', 'ICU', 70000, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('20010', 0, '20000', 'Dressing', 1000, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('20011', 0, '20000', 'Enema Wash-Out', 5000, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('20012', 0, '20000', 'Suturing', 5000, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('20013', 0, '20000', 'Nebulisting Session', 3000, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('20014', 0, '20000', 'Chemotherapy Session', 10000, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('20015', 0, '20000', 'Chemotherapy Session Extended', 15000, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('20016', 0, '20000', 'Oxygen Therapy: Concentrator', 4000, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('20017', 0, '20000', 'Oxygen Therapy 100%', 15000, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('20018', 0, '20000', 'Theatre Fee', 0, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('20019', 0, '20000', 'Anaesthetist Fee', 0, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('20020', 0, '20000', 'Anaesthesia Consumable', 0, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('20021', 0, '20000', 'Debridement', 20000, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('20022', 0, '20000', 'Urethral Catheter Changing, Foley', 4000, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('20023', 0, '20000', 'Urethral Catheter Changing, Silicon', 7000, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('20024', 0, '20000', 'POP Applicator', 20000, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('20025', 0, '20000', 'Pharmacy ( 25% Mark Up )', 0, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('20026', 0, '20000', 'Laboratory ( 15% Mark Up )', 0, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('20027', 0, '20000', 'Surgeon Fee', 80000, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('20028', 0, '20000', 'Physiotherapy', 5000, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('30001', 0, '30000', 'Direct Expenses', 0, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('30002', 0, '30000', 'Other Expenses', 0, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('300011', 0, '30001', 'Consumable and Drugs', 0, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('300012', 0, '30001', 'Surgery Accessories', 0, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('300013', 0, '30001', 'Physio and Accessories', 0, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('300014', 0, '30001', 'Laboratory', 0, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('300031', 0, '30002', 'Building and Equipment', 0, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('300022', 0, '30002', 'Energy ( Kedco, Diesel ETC)', 0, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('300023', 0, '30002', 'Wages and Salaries', 0, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('300024', 0, '30002', 'Gardening and Insecticide', 0, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('300025', 0, '30002', 'Laundary, Bedsheets and Cleaning', 0, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('300026', 0, '30002', 'Repair and Maintenance', 0, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('300027', 0, '30002', 'Refund to Patients/Doctor', 0, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('300028', 0, '30002', 'Miscellaneous Expenses', 0, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('300029', 0, '30002', 'Patients Contact and PR', 0, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('3000210', 0, '30002', 'Printing', 0, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('3000211', 0, '30002', 'Loan', 0, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('3000212', 0, '30002', 'Tax and Levies', 0, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('3000213', 0, '30002', 'Training, Workshop, License', 0, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('3000214', 0, '30002', 'Insurance', 0, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('3000215', 0, '30002', 'Telephone, Couries, Internet, and Subscription', 0, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('3000216', 0, '30002', 'Transport', 0, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('20029', 0, '20000', 'Surgery and hospitalization', 0, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('300015', 0, '30001', 'Professional fee/Consultation ', 0, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('20030', 0, '20000', 'Medications', 0, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('20031', 0, '20000', 'Hospitalization', 0, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('20032', 0, '20000', 'File Conversion', 0, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('20033', 0, '20000', 'Consultation F/up Neurosurgery/ Ortho', 4000, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('20034', 0, '20000', 'Specialist F/up', 6000, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('20035', 0, '20000', 'Observation', 0, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('20036', 0, '20000', 'Total Sales', 0, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('20037', 0, '20000', 'ECG', 4000, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('20038', 0, '20000', 'Spirometry', 6000, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('20039', 0, '20000', 'Ear Syringing', 7000, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('20040', 0, '20000', 'Specialist (Neuro/ ortho)', 7000, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('20041', 0, '20000', 'Medical Service (Staff)', 0, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('30003', 0, '30000', 'Laboratory Expenses', 0, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('20042', 0, '20000', 'Floroscopy Guided Injection', 0, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('20043', 0, '20000', 'Capitation HMO', 0, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a');

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

--
-- 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'),
('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'),
('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,
  `client_id` varchar(50) NOT NULL,
  `txn_status` varchar(50) NOT NULL,
  `quantity` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

INSERT INTO `account_entries` (`acct`, `dr`, `cr`, `description`, `reference_no`, `facilityId`, `createdAt`, `client_id`, `txn_status`, `quantity`) VALUES
(5989, 0, 300, 'Lipton', '19092111', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-09-19 10:05:54', '', '', 0),
(5989, 0, 400, 'amatem', '19092111', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-09-19 10:05:54', '', '', 0),
(5989, 0, 400, 'amatem', '19092129', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-09-19 10:24:48', '', '', 0),
(5989, 0, 1600, 'amatem', '190921311', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-09-19 10:25:13', '', '', 0),
(NULL, 0, 0, 'Deposit from account null', '200921113', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-09-20 09:43:26', '1', 'completed', 0),
(1, 0, 0, 'Deposit from account 1', '200921215', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-09-20 09:43:54', '2', 'completed', 0),
(1, 0, 400, 'amatem', '210921317', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-09-21 12:18:23', '', '', 0),
(1, 0, 300, 'Lipton', '210921317', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-09-21 12:18:23', '', '', 0),
(2, 0, 0, 'Deposit from account 2', '220921121', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-09-22 06:08:49', '3', 'completed', 0),
(3, 0, 0, 'Deposit from account 3', '220921223', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-09-22 06:15:29', '4', 'completed', 0),
(4, 0, 0, 'Deposit from account 4', '220921325', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-09-22 07:39:06', '5', 'completed', 0),
(5, 0, 0, 'Deposit from account 5', '220921427', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-09-22 07:50:32', '6', 'completed', 0),
(5, 0, 0, 'Admission in PSC 1 for 0 days', '220921529', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-09-22 08:03:37', '', '', 0),
(2, 0, 0, 'Admission in Blue House for 0 days', '220921631', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-09-22 08:09:42', '', '', 0),
(3, 0, 0, 'Admission in Private 1 for 0 days', '220921733', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-09-22 08:09:50', '', '', 0),
(4, 0, 0, 'Admission in Yellow   for 0 days', '220921835', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-09-22 08:09:54', '', '', 0),
(6, 0, 0, 'Deposit from account 6', '260921137', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-09-26 06:16:49', '7', 'completed', 0),
(7, 0, 0, 'Deposit from account 7', '260921239', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-09-26 07:27:25', '8', 'completed', 0),
(1, 0, 554, 'Lipton', '260921341', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-09-26 08:55:25', '', '', 0),
(1, 0, 1000, 'amatem', '260921341', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-09-26 08:55:26', '', '', 0),
(8, 0, 0, 'Deposit from account 8', '280921145', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-09-28 10:32:14', '9', 'completed', 0),
(8, 0, 1000, 'amatem', '280921247', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-09-28 10:38:07', '', '', 0),
(8, 0, 554, 'Lipton', '280921247', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-09-28 10:38:07', '', '', 0),
(8, 0, 0, 'Admission in Private 1 for 0 days', '280921351', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-09-28 10:39:50', '', '', 0),
(2, 0, 1000, 'amatem', '011021153', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-10-01 05:57:07', '', '', 0),
(2, 0, 440, 'Folic Acid', '011021153', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-10-01 05:57:07', '', '', 0),
(2, 0, 554, 'Lipton', '011021153', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-10-01 05:57:07', '', '', 0);

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

--
-- 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
('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 `account_ubec`
--

CREATE TABLE `account_ubec` (
  `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,
  `price` int(11) DEFAULT NULL,
  `facilityId` varchar(50) CHARACTER SET latin1 NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `account_ubec`
--

INSERT INTO `account_ubec` (`head`, `balance`, `subhead`, `description`, `price`, `facilityId`) VALUES
('10000', 0, '', 'UBEC', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a');

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

--
-- 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 14: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 14: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 20: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 14: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 18: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 10: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 12:01:43', 'admin', '966a89f6-05d8-4564-b319-2f8863821e75'),
(400012, 'Laptop', 120000, 30000, 30000, '2020-11-29', '2024-11-29', NULL, 25, 120000, '5', '', 5, 10000, '2020-11-29 15:04:44', 'bits', '121bb692-9a44-472f-b396-b68ebf798b30');

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

--
-- 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
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 0, 'amatem', NULL, '', 200, 196, 100, 100, 'abdurrahman', '', 'drugpurchaserecords', '2021-09-19 04:33:53'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 0, 'amatem', NULL, '', 196, 190, 100, 100, 'abdurrahman', '', 'drugpurchaserecords', '2021-09-19 06:36:50'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 0, 'amatem', NULL, '', 190, 186, 100, 100, 'abdurrahman', '', 'drugpurchaserecords', '2021-09-19 08:25:13');

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

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

CREATE TABLE `barcode` (
  `id` int(11) NOT NULL,
  `lab_code` int(11) NOT NULL,
  `initials` int(11) NOT NULL,
  `year_code` int(11) NOT NULL,
  `barcode` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `barcode`
--

INSERT INTO `barcode` (`id`, `lab_code`, `initials`, `year_code`, `barcode`) VALUES
(1, 2000, 2, 21, 126),
(2, 3000, 3, 21, 8),
(3, 4000, 4, 21, 30),
(4, 5000, 5, 21, 1);

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

--
-- Table structure for table `bedlist`
--

CREATE TABLE `bedlist` (
  `id` int(11) NOT NULL,
  `sort_index` int(11) NOT NULL DEFAULT 0,
  `class_type` varchar(50) NOT NULL,
  `account` varchar(10) NOT NULL,
  `price` int(11) NOT NULL,
  `name` varchar(100) NOT NULL,
  `no_of_beds` int(11) NOT NULL,
  `facilityId` varchar(50) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `bedlist`
--

INSERT INTO `bedlist` (`id`, `sort_index`, `class_type`, `account`, `price`, `name`, `no_of_beds`, `facilityId`) VALUES
(1, 1, 'Executive Suite', '', 19000, 'White House', 1, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
(2, 2, 'Executive Suite', '', 19000, 'Blue House', 1, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
(3, 3, 'Executive Suite', '', 19000, 'Green House', 1, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
(4, 4, 'Private Room', '', 12000, 'Private 1', 1, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
(5, 5, 'Private Room', '', 12000, 'Private 2', 1, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
(6, 6, 'Private Room', '', 12000, 'Yellow  ', 1, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
(7, 7, 'PSC Annex', '', 17000, 'PSC 1', 1, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
(8, 8, 'PSC Annex', '', 17000, 'PSC 2', 1, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
(9, 9, 'PSC Annex', '', 17000, 'PSC 3', 1, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
(10, 10, 'PSC Annex', '', 17000, 'Medical Ward', 1, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
(11, 11, 'PSC Annex', '', 17000, 'Medical Ward 2', 1, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
(12, 12, 'General Ward', '', 7000, 'Ward 1', 3, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
(13, 13, 'General Ward', '', 7000, 'Ward 2', 4, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
(14, 14, 'General Ward', '', 7000, 'Ward 3', 3, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
(15, 15, 'ICU', '', 70000, 'ICU', 1, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
(16, 16, 'PSC Annex', '', 17000, 'PSC 0', 1, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
(17, 17, 'PSC Annex', '', 19000, 'Double Annex', 1, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
(18, 0, 'ICU', '', 0, 'yu', 1, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a');

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

--
-- Stand-in structure for view `bedlist_view`
-- (See below for the actual view)
--
CREATE TABLE `bedlist_view` (
`id` int(11)
,`sort_index` int(11)
,`class_type` varchar(50)
,`price` int(11)
,`name` varchar(100)
,`no_of_beds` int(11)
,`occupied` bigint(21)
,`facilityId` varchar(50)
);

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

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

CREATE TABLE `beds` (
  `id` int(11) NOT NULL,
  `headtitle` varchar(100) DEFAULT NULL,
  `headcode` int(11) DEFAULT NULL,
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `bed_allocation`
--

CREATE TABLE `bed_allocation` (
  `id` int(11) NOT NULL,
  `bed_id` int(11) NOT NULL,
  `patient_id` varchar(50) NOT NULL,
  `allocation_status` varchar(20) DEFAULT NULL,
  `allocated` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `ended` timestamp NULL DEFAULT NULL,
  `allocated_by` varchar(50) NOT NULL,
  `ended_by` varchar(50) DEFAULT NULL,
  `facilityId` varchar(50) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `bed_allocation`
--

INSERT INTO `bed_allocation` (`id`, `bed_id`, `patient_id`, `allocation_status`, `allocated`, `ended`, `allocated_by`, `ended_by`, `facilityId`) VALUES
(1, 1, '6-1', 'allocated', '2021-09-26 08:15:34', NULL, 'abdurrahman', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
(2, 2, '2-1', 'allocated', '2021-09-26 08:43:19', NULL, 'abdurrahman', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
(3, 3, '1-1', 'allocated', '2021-09-26 08:53:35', NULL, 'abdurrahman', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
(4, 6, '8-1', 'allocated', '2021-09-28 10:38:38', NULL, 'abdurrahman', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
(5, 4, '8-1', 'discharged', '2021-09-28 21:39:50', '2021-09-28 09:39:50', 'abdurrahman', 'abdurrahman', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a');

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

--
-- Table structure for table `booking_no`
--

CREATE TABLE `booking_no` (
  `id` int(11) NOT NULL,
  `lab_code` int(11) NOT NULL,
  `year_code` int(11) NOT NULL,
  `booking` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `booking_no`
--

INSERT INTO `booking_no` (`id`, `lab_code`, `year_code`, `booking`) VALUES
(1, 0, 21, 84);

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

--
-- Table structure for table `branches`
--

CREATE TABLE `branches` (
  `id` int(11) NOT NULL,
  `branch_name` varchar(50) DEFAULT NULL,
  `state` varchar(50) DEFAULT NULL,
  `address` varchar(100) DEFAULT NULL,
  `created_time` timestamp NULL DEFAULT NULL,
  `facilityId` varchar(20) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `bulk_tx`
--

CREATE TABLE `bulk_tx` (
  `facilityId` varchar(50) DEFAULT NULL,
  `createdAt` datetime NOT NULL,
  `transaction_id` int(11) NOT NULL DEFAULT 0,
  `transaction_date` date DEFAULT NULL,
  `id` int(11) DEFAULT 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) DEFAULT NULL,
  `status` varchar(30) DEFAULT 'pending',
  `approvedBy` varchar(20) DEFAULT NULL,
  `paymentStatus` varchar(11) NOT NULL DEFAULT '',
  `client_acct` varchar(200) DEFAULT NULL,
  `patient_id` varchar(50) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `bulk_tx`
--

INSERT INTO `bulk_tx` (`facilityId`, `createdAt`, `transaction_id`, `transaction_date`, `id`, `description`, `acct`, `debit`, `credit`, `enteredBy`, `receiptDateSN`, `receiptNo`, `modeOfPayment`, `bank_name`, `status`, `approvedBy`, `paymentStatus`, `client_acct`, `patient_id`) VALUES
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2020-12-08 06:09:18', 1, '2020-12-01', NULL, 'Medications', '20030', 0, 1100, 'abdurrahman', '08122011', 1, 'cash', '', 'pending', NULL, '', '4708', '4667-1'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-02-18 05:47:49', 5382, '2021-02-01', NULL, 'Specialist F/up', '400022', 6000, 0, 'Manager', '180221165381', 16, 'POS', '', 'pending', NULL, '', '4708', '3975-1');

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

--
-- 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) DEFAULT NULL,
  `id` int(100) NOT NULL,
  `booking_no` varchar(100) DEFAULT NULL,
  `user_id` varchar(100) DEFAULT NULL,
  `comment` varchar(3000) DEFAULT NULL,
  `useTemplate` varchar(50) DEFAULT NULL,
  `comment_type` varchar(50) DEFAULT NULL,
  `lab_name` varchar(100) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `consultations`
--

CREATE TABLE `consultations` (
  `id` varchar(50) NOT NULL,
  `patient_id` varchar(50) NOT NULL,
  `userId` varchar(50) NOT NULL,
  `consultation_notes` varchar(4000) NOT NULL,
  `treatmentPlan` varchar(4000) NOT NULL,
  `decision` varchar(50) NOT NULL,
  `dressing_request` varchar(500) NOT NULL,
  `nursing_request` varchar(500) NOT NULL,
  `nursing_request_status` varchar(20) NOT NULL DEFAULT 'pending',
  `facilityId` varchar(50) NOT NULL,
  `created_at` timestamp NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `consultations`
--

INSERT INTO `consultations` (`id`, `patient_id`, `userId`, `consultation_notes`, `treatmentPlan`, `decision`, `dressing_request`, `nursing_request`, `nursing_request_status`, `facilityId`, `created_at`) VALUES
('490b8565-6ce0-47a7-8db0-2f3549042cad', '6-1', 'abdurrahman', 'ertyghjkl;wesdrfghjkm', '', '', 'ujyhgf', 'iouyjhgtfdsrtyhj', 'completed', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', NULL),
('76ac7838-963e-4824-9feb-e7c434be7e62', '8-1', 'abdurrahman', '9348459', '348998', '', 'Dressing for sure', 'Linda', 'pending', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-10-04 21:45:38'),
('d7c9ae10-8d1d-41d5-b88e-2b57ca2d8680', '6-1', 'abdurrahman', 'some consultation notes', 'and treatment plan', '', 'afijdaf', 'adfdf', 'pending', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-10-02 19:28:57'),
('e9bf4383-7440-453c-8804-96a3ab9398db', '1-1', 'abdurrahman', 'beautiful is your name, wonderful is what you are to me, in you are see my life, everyday and I pray for you, queen of my life you\'re so beautiful mama, you\'re beautiful', 'Treatment plan start from admitting the patient for 2 days and taking care of any other medical bills from A to Z.', '', 'Patient wants to be dressed as neatly as possible. Full stop you are a fool.', '', 'pending', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-10-03 19:54:21'),
('fb493bc7-7fa0-4914-9482-1d4b5502f6ff', '1-1', 'abdurrahman', 'some prescription reports that can be viewed later before anything else', '', '', 'discharge request from the facility', 'nurses should take care', 'completed', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-10-02 09:55:27');

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

--
-- 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(2000) 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,
  `dressing_request` varchar(500) DEFAULT NULL,
  `nursing_request` varchar(500) DEFAULT NULL,
  `nursing_request_status` 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`, `dressing_request`, `nursing_request`, `nursing_request_status`) VALUES
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', NULL, 'undefined', 'undefined', 'abdurrahman', '6-1', '2021-09-26 19:14:38', 'seen', NULL, NULL, 'undefined', 'undefined', 'undefined', 'undefined', NULL, 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'some information entered from the server machine in this client machine from the vocal apparatus of the doctor and also used for the nurses.\n\nOther information can also be captured and be inspected from any interface\n\nAll medications prescribed to this patients are also kept into consideration to achieve the desired output\n\nTake note of anything observed by the nurses, other instructions can be found in the nursing and dressing requests sections.', 'undefined', 1, 'undef', NULL, 'undef', 'undef', NULL, 'undef', 'undefined', 'undef', 'undefined', 'undef', NULL, 'undef', 'undefined', 'undef', 'undefined', 'undef', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', NULL, NULL, NULL),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', NULL, 'undefined', 'undefined', 'abdurrahman', '2-1', '2021-09-26 19:42:13', 'seen', NULL, NULL, 'undefined', 'undefined', 'undefined', 'undefined', NULL, 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'More information about the sickness faced by the patienst is actially captured in full details\n\n\nCefriaxone has once been prescribe d for the patient which makes it impossible prescribe amoxilin\n\nAn optiional antibiotics has also been prescribed\n\nThanks.', 'undefined', 2, 'undef', NULL, 'undef', 'undef', NULL, 'undef', 'undefined', 'undef', 'undefined', 'undef', NULL, 'undef', 'undefined', 'undef', 'undefined', 'undef', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', NULL, NULL, NULL),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', NULL, 'undefined', 'undefined', 'abdurrahman', '1-1', '2021-09-26 19:53:18', 'seen', NULL, NULL, 'undefined', 'undefined', 'undefined', 'undefined', NULL, 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'New consultation sheet filled with information that are found useful from proper medication.\nInformation about the previous visits of the patient can not be found on our server which is why I had to enter some new information regardless of the receptionists said.\n\nI am ready to be held responsible for whatever discrepances found the document of this patient and any other employee that has tempered with the patient record would also be liable to the so call information.\n\nOther precautions have also been taken not of. Patient would be admitted.\nThank you for reading all this rubbish thus far.', 'undefined', 3, 'undef', NULL, 'undef', 'undef', NULL, 'undef', 'undefined', 'undef', 'undefined', 'undef', NULL, 'undef', 'undefined', 'undef', 'undefined', 'undef', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', NULL, NULL, NULL),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', NULL, 'undefined', 'undefined', 'abdurrahman', '1-1', '2021-09-26 21:12:58', 'seen', NULL, NULL, 'undefined', 'undefined', 'undefined', 'undefined', NULL, 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'The following information should be noted about the patient:\n1. Patient hypertensive\n2. Has headache\n3. Some other bulletted points\n\nInjection can be prescribed for the patient', 'undefined', 4, 'undef', NULL, 'undef', 'undef', NULL, 'undef', 'undefined', 'undef', 'undefined', 'undef', NULL, 'undef', 'undefined', 'undef', 'undefined', 'undef', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', NULL, NULL, NULL),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', NULL, 'undefined', 'undefined', 'abdurrahman', '6-1', '2021-09-27 18:27:16', 'seen', NULL, NULL, 'undefined', 'undefined', 'undefined', 'undefined', NULL, 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'some new notest can be recorded here and any other information\n\nso clean and simple', 'undefined', 5, 'undef', NULL, 'undef', 'undef', NULL, 'undef', 'undefined', 'undef', 'undefined', 'undef', NULL, 'undef', 'undefined', 'undef', 'undefined', 'undef', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', NULL, NULL, NULL),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', NULL, 'undefined', 'undefined', 'abdurrahman', '4-1', '2021-09-27 19:26:30', 'seen', NULL, NULL, 'undefined', 'undefined', 'undefined', 'undefined', NULL, 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'rectfgvhjnkml,;rtcgfvhbjn kml,;', 'undefined', 6, 'undef', NULL, 'undef', 'undef', NULL, 'undef', 'undefined', 'undef', 'undefined', 'undef', NULL, 'undef', 'undefined', 'undef', 'undefined', 'undef', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', NULL, NULL, NULL),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', NULL, 'undefined', 'undefined', 'abdurrahman', '1-1', '2021-09-27 19:32:40', 'seen', NULL, NULL, 'undefined', 'undefined', 'undefined', 'undefined', NULL, 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'dstfygbudhijfok,/sbd', 'undefined', 7, 'undef', NULL, 'undef', 'undef', NULL, 'undef', 'undefined', 'undef', 'undefined', 'undef', NULL, 'undef', 'undefined', 'undef', 'undefined', 'undef', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', NULL, NULL, NULL),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', NULL, 'undefined', 'undefined', 'abdurrahman', '7-1', '2021-09-28 13:27:23', 'seen', NULL, NULL, 'undefined', 'undefined', 'undefined', 'undefined', NULL, 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'some cosuasfasdf', 'undefined', 8, 'undef', NULL, 'undef', 'undef', NULL, 'undef', 'undefined', 'undef', 'undefined', 'undef', NULL, 'undef', 'undefined', 'undef', 'undefined', 'undef', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', NULL, NULL, NULL),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', NULL, 'undefined', 'undefined', 'abdurrahman', '7-1', '2021-09-28 14:22:39', 'seen', NULL, NULL, 'undefined', 'undefined', 'undefined', 'undefined', NULL, 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'some consut', 'undefined', 9, 'undef', NULL, 'undef', 'undef', NULL, 'undef', 'undefined', 'undef', 'undefined', 'undef', NULL, 'undef', 'undefined', 'undef', 'undefined', 'undef', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', NULL, NULL, NULL),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', NULL, 'undefined', 'undefined', 'abdurrahman', '7-1', '2021-09-28 18:38:03', 'seen', NULL, NULL, 'undefined', 'undefined', 'undefined', 'undefined', NULL, 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'some lab recomended for the patient', 'undefined', 10, 'undef', NULL, 'undef', 'undef', NULL, 'undef', 'undefined', 'undef', 'undefined', 'undef', NULL, 'undef', 'undefined', 'undef', 'undefined', 'undef', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', NULL, NULL, NULL),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', NULL, 'undefined', 'undefined', 'abdurrahman', '7-1', '2021-09-28 18:52:07', 'seen', NULL, NULL, 'undefined', 'undefined', 'undefined', 'undefined', NULL, 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'some requests sent to the lab', 'undefined', 11, 'undef', NULL, 'undef', 'undef', NULL, 'undef', 'undefined', 'undef', 'undefined', 'undef', NULL, 'undef', 'undefined', 'undef', 'undefined', 'undef', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', NULL, NULL, NULL),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', NULL, 'undefined', 'undefined', 'abdurrahman', '7-1', '2021-09-28 18:55:17', 'seen', NULL, NULL, 'undefined', 'undefined', 'undefined', 'undefined', NULL, 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'some other erea;sdfioadsfj', 'undefined', 12, 'undef', NULL, 'undef', 'undef', NULL, 'undef', 'undefined', 'undef', 'undefined', 'undef', NULL, 'undef', 'undefined', 'undef', 'undefined', 'undef', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', NULL, NULL, NULL),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', NULL, 'undefined', 'undefined', 'abdurrahman', '6-1', '2021-09-28 20:25:49', 'seen', NULL, NULL, 'undefined', 'undefined', 'undefined', 'undefined', NULL, 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'some informatin gottent from a few research done in the general department\n\nOther Noticed Symptoms include:\n1. Nausea\n2. Dizziness\n3. Vomiting\n4. Chronic Headache and others\n\nCeftryazone was prescribed for the patient with some other injection', 'undefined', 13, 'undef', NULL, 'undef', 'undef', NULL, 'undef', 'undefined', 'undef', 'undefined', 'undef', NULL, 'undef', 'undefined', 'undef', 'undefined', 'undef', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', NULL, NULL, NULL),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', NULL, 'undefined', 'undefined', 'abdurrahman', '6-1', '2021-09-28 21:27:58', 'seen', NULL, NULL, 'undefined', 'undefined', 'undefined', 'undefined', NULL, 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', '', 'undefined', 14, 'undef', NULL, 'undef', 'undef', NULL, 'undef', 'undefined', 'undef', 'undefined', 'undef', NULL, 'undef', 'undefined', 'undef', 'undefined', 'undef', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', NULL, NULL, NULL),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', NULL, 'undefined', 'undefined', 'abdurrahman', '8-1', '2021-09-28 21:37:36', 'seen', NULL, NULL, 'undefined', 'undefined', 'undefined', 'undefined', NULL, 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'Patient admitted 3 days on account of headache.\n\n', 'undefined', 15, 'undef', NULL, 'undef', 'undef', NULL, 'undef', 'undefined', 'undef', 'undefined', 'undef', NULL, 'undef', 'undefined', 'undef', 'undefined', 'undef', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', NULL, NULL, NULL),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', NULL, 'undefined', 'undefined', 'abdurrahman', 'undefined', '2021-09-29 05:35:42', 'seen', NULL, NULL, 'undefined', 'undefined', 'undefined', 'undefined', NULL, 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', '', 'undefined', 16, 'undef', NULL, 'undef', 'undef', NULL, 'undef', 'undefined', 'undef', 'undefined', 'undef', NULL, 'undef', 'undefined', 'undef', 'undefined', 'undef', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', NULL, NULL, NULL),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', NULL, 'undefined', 'undefined', 'abdurrahman', '8-1', '2021-09-29 05:49:59', 'seen', NULL, NULL, 'undefined', 'undefined', 'undefined', 'undefined', NULL, 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'Assigned patient has been seen\n\nThanks for checking tho.', 'undefined', 17, 'undef', NULL, 'undef', 'undef', NULL, 'undef', 'undefined', 'undef', 'undefined', 'undef', NULL, 'undef', 'undefined', 'undef', 'undefined', 'undef', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', NULL, NULL, NULL),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', NULL, 'undefined', 'undefined', 'abdurrahman', '8-1', '2021-09-29 05:51:59', 'seen', NULL, NULL, 'undefined', 'undefined', 'undefined', 'undefined', NULL, 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'Patient seen the second time because the first one was npt correctly captured.\n\nother info as your own risk.', 'undefined', 18, 'undef', NULL, 'undef', 'undef', NULL, 'undef', 'undefined', 'undef', 'undefined', 'undef', NULL, 'undef', 'undefined', 'undef', 'undefined', 'undef', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', NULL, NULL, NULL),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', NULL, 'undefined', 'undefined', 'abdurrahman', '6-1', '2021-09-30 10:39:16', 'seen', NULL, NULL, 'undefined', 'undefined', 'undefined', 'undefined', NULL, 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'some prescription schedule test data for accuracy and any other info', 'undefined', 19, 'undef', NULL, 'undef', 'undef', NULL, 'undef', 'undefined', 'undef', 'undefined', 'undef', NULL, 'undef', 'undefined', 'undef', 'undefined', 'undef', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', NULL, NULL, NULL),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', NULL, 'undefined', 'undefined', 'abdurrahman', '6-1', '2021-09-30 10:44:38', 'seen', NULL, NULL, 'undefined', 'undefined', 'undefined', 'undefined', NULL, 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'add more drug for patient because of no changes in condition', 'undefined', 20, 'undef', NULL, 'undef', 'undef', NULL, 'undef', 'undefined', 'undef', 'undefined', 'undef', NULL, 'undef', 'undefined', 'undef', 'undefined', 'undef', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', NULL, NULL, NULL),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', NULL, 'undefined', 'undefined', 'abdurrahman', '2-1', '2021-09-30 10:56:36', 'seen', NULL, NULL, 'undefined', 'undefined', 'undefined', 'undefined', NULL, 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'some prescription test', 'undefined', 21, 'undef', NULL, 'undef', 'undef', NULL, 'undef', 'undefined', 'undef', 'undefined', 'undef', NULL, 'undef', 'undefined', 'undef', 'undefined', 'undef', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', NULL, NULL, NULL),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', NULL, 'undefined', 'undefined', 'abdurrahman', '2-1', '2021-09-30 10:57:30', 'seen', NULL, NULL, 'undefined', 'undefined', 'undefined', 'undefined', NULL, 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'stopping drug for patent', 'undefined', 22, 'undef', NULL, 'undef', 'undef', NULL, 'undef', 'undefined', 'undef', 'undefined', 'undef', NULL, 'undef', 'undefined', 'undef', 'undefined', 'undef', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', NULL, NULL, NULL),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', NULL, 'undefined', 'undefined', 'abdurrahman', '2-1', '2021-09-30 10:59:12', 'seen', NULL, NULL, 'undefined', 'undefined', 'undefined', 'undefined', NULL, 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'asfdjkknaskfnj', 'undefined', 23, 'undef', NULL, 'undef', 'undef', NULL, 'undef', 'undefined', 'undef', 'undefined', 'undef', NULL, 'undef', 'undefined', 'undef', 'undefined', 'undef', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', NULL, NULL, NULL),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', NULL, 'undefined', 'undefined', 'abdurrahman', '8-1', '2021-09-30 13:34:19', 'seen', NULL, NULL, 'undefined', 'undefined', 'undefined', 'undefined', NULL, 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', 'some prescription to be prescribed for patient \nand watch progress over time', 'undefined', 24, 'undef', NULL, 'undef', 'undef', NULL, 'undef', 'undefined', 'undef', 'undefined', 'undef', NULL, 'undef', 'undefined', 'undef', 'undefined', 'undef', 'undefined', 'undefined', 'undefined', 'undefined', 'undefined', NULL, NULL, NULL);

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

--
-- 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` varchar(50) 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,
  `schedule_status` varchar(50) NOT NULL DEFAULT 'pending',
  `request_id` varchar(50) NOT NULL,
  `route` varchar(20) NOT NULL,
  `additionalInfo` varchar(500) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `dispensary`
--

INSERT INTO `dispensary` (`drug`, `dosage`, `quantity_dispensed`, `unit_of_issue`, `price`, `amount`, `discount`, `total`, `patient_id`, `id`, `receiptNo`, `facilityId`, `created_at`, `dispensed_by`, `prescribed_by`, `duration`, `period`, `frequency`, `receipt_no`, `expiry_date`, `status`, `schedule_status`, `request_id`, `route`, `additionalInfo`) VALUES
('Lipton', '12mg', NULL, NULL, 0, NULL, '', 0, '2-1', '977b7a48-a336-4f34-8f26-bd07f7aa2d71', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-09-30 10:56:37', 'abdurrahman', 'abdurrahman', '2', 'days', '12 Hourly', NULL, NULL, 'Dispense', 'scheduled', 'b4b41fd0-0569-4c13-b981-56e41e5f577c', 'Tabs', NULL),
('amatem', '5L', NULL, NULL, 0, NULL, '', 0, '2-1', '7c5a8b7e-0191-4b4c-8282-445a8d0a53cd', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-09-30 10:56:37', 'abdurrahman', 'abdurrahman', '2', 'days', '6 Hourly', NULL, NULL, 'Dispense', 'stop', 'b4b41fd0-0569-4c13-b981-56e41e5f577c', 'IV', NULL),
('Folic Acid', '12mg3', NULL, NULL, 0, NULL, '', 0, '2-1', 'ab3c3587-0383-434d-87d9-38497d836786', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-09-30 10:59:12', 'abdurrahman', 'abdurrahman', '4', 'days', '8 hourly', NULL, NULL, 'Dispense', 'scheduled', '1010087d-0dc5-4f85-914b-85a600b743a4', 'Tabs', NULL),
('Lipton', '12g', NULL, NULL, 0, NULL, '', 0, '8-1', '234bdc29-a14e-4ebd-b186-490ec5c3adc7', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-09-30 13:34:19', NULL, 'abdurrahman', '3', 'days', '6 Hourly', NULL, NULL, 'request', 'scheduled', '188e0964-3817-4e78-ae86-f642b1df2851', 'Susp', NULL),
('amatem', '12mg', NULL, NULL, 0, NULL, '', 0, '1-1', '259535a7-3280-4bce-b9cf-250d0e8c2faf', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-10-02 09:55:27', NULL, 'abdurrahman', '5', 'days', '12 Hourly', NULL, NULL, 'request', 'stop', 'fb493bc7-7fa0-4914-9482-1d4b5502f6ff', 'IM', NULL),
('Lipton', '12mg', NULL, NULL, 0, NULL, '', 0, '1-1', '77b5a9e5-c8ea-453c-b1b4-2759525e54b7', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-10-03 19:54:21', NULL, 'abdurrahman', '2', 'days', '12 Hourly', NULL, NULL, 'request', 'scheduled', 'e9bf4383-7440-453c-8804-96a3ab9398db', 'IM', NULL),
('Folic Acid', '4L', NULL, NULL, 0, NULL, '', 0, '1-1', 'b7c7b8b2-3747-40e1-a81a-40f27521f017', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-10-03 19:54:21', NULL, 'abdurrahman', '3', 'days', 'Once Daily', NULL, NULL, 'request', 'scheduled', 'e9bf4383-7440-453c-8804-96a3ab9398db', 'IM', NULL),
('amatem', '2', NULL, NULL, 0, NULL, '', 0, '8-1', '47008fe0-654c-49dd-bdb0-236c014dd9a8', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-10-04 21:45:38', NULL, 'abdurrahman', '5', 'days', '4 Hourly', NULL, NULL, 'request', 'pending', '76ac7838-963e-4824-9feb-e7c434be7e62', 'IV', NULL),
('Folic Acid', '32', NULL, NULL, 0, NULL, '', 0, '8-1', 'a7ad9f0c-2f84-4ee0-973e-2b7f4f20f418', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-10-04 21:45:38', NULL, 'abdurrahman', '8', 'months', 'STAT', NULL, NULL, 'request', 'pending', '76ac7838-963e-4824-9feb-e7c434be7e62', 'Susp', NULL),
('Lipton', '2', NULL, NULL, 0, NULL, '', 0, '8-1', 'cc28dbfd-84b3-4674-b0ba-37256bbfd288', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-10-04 21:45:38', NULL, 'abdurrahman', '9', 'years', '4 Hourly', NULL, NULL, 'request', 'pending', '76ac7838-963e-4824-9feb-e7c434be7e62', 'Tabs', NULL);

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

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

CREATE TABLE `doctor_entries` (
  `doc_acct` varchar(50) 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
(1, 'amatem', '', '2021-09-19 03:25:59'),
(2, 'Lipton', 'Tea', '2021-09-19 06:50:33'),
(3, 'Folic Acid', 'Anti Histamine', '2021-09-30 10:43:48');

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

--
-- 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,
  `shift` varchar(20) 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`, `shift`, `status`, `facilityId`) VALUES
('', 'Cutton Seed Oil', '', '0', 0, '12000', '0', 700, 'admin-user', 'Production', '0', 'paid', '2020-11-04 16:48:57', NULL, '0000-00-00', 0, NULL, 700, '', '', 'd8d7a732-1832-4e25-9a98-e68ddc3f0b26'),
('', 'Cotton Seed Cake', '', '0', 0, '9000', '0', 55, 'admin-user', 'Production', '0', 'paid', '2020-11-04 16:52:53', NULL, '0000-00-00', 0, NULL, 55, '', '', 'd8d7a732-1832-4e25-9a98-e68ddc3f0b26'),
('', 'Laundary Soap', '', '0', 0, '1000', '0', 80, 'admin-user', 'Production', '0', 'paid', '2020-11-04 16:52:53', NULL, '0000-00-00', 0, NULL, 80, '', '', 'd8d7a732-1832-4e25-9a98-e68ddc3f0b26'),
('', 'FLOTEC ', 'NORVATIS', '0', 0, '200', '100', 100, 'abdurrahman', '1', '0', 'paid', '2020-11-28 18:49:40', NULL, '2022-02-02', 0, NULL, 100, '', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('', 'amatem', '', '0', 0, '900', '100', 200, 'abdurrahman', '13', '0', 'paid', '2021-09-19 04:25:59', NULL, '2021-10-13', 0, NULL, 186, '', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('6001085003782', 'Lipton', 'Tea', '0', 0, '454', '100', 400, 'abdurrahman', '11', '0', 'paid', '2021-09-19 07:50:33', NULL, '2022-02-08', 0, NULL, 400, '', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('', 'Folic Acid', 'Anti Histamine', '0', 0, '400', '40', 400, 'abdurrahman', '11', '0', 'paid', '2021-09-30 10:43:48', NULL, '2024-04-04', 0, NULL, 400, '', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a');

--
-- 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,
  `shift` varchar(20) 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`, `shift`, `facilityId`) VALUES
('', 'amatem', '2021-10-13', 300, '0', 0, 200, 'purchases', '2021-09-19 03:25:59', '13', '19092121125', 0, 'abdurrahman', NULL, '', 100, '', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('', 'amatem', '2021-10-13', 300, '0', 200, 0, 'dispensary', '2021-09-19 03:25:59', '13', '19092121125', 0, 'abdurrahman', NULL, '', 100, '', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('', 'amatem', '2021-10-13', 0, '', 4, 0, 'sold_items', '2021-09-19 04:33:53', '', '19092131125', 0, 'abdurrahman', NULL, '', 0, '5989-1', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('', 'amatem', '2021-10-13', 0, '', 0, 4, 'dispensary', '2021-09-19 04:33:53', '', '19092131125', 0, 'abdurrahman', NULL, '', 0, '5989-1', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('', 'amatem', '2021-10-13', 0, '', 6, 0, 'sold_items', '2021-09-19 06:36:50', '', '19092131125', 0, 'abdurrahman', NULL, '', 0, '', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('', 'amatem', '2021-10-13', 0, '', 0, 6, 'dispensary', '2021-09-19 06:36:50', '', '19092131125', 0, 'abdurrahman', NULL, '', 0, '', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('', 'amatem', '2021-10-13', 400, '', 12, 0, 'sold_items', '2021-09-19 06:37:08', '13', '19092141125', 0, 'abdurrahman', NULL, '', 0, '', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('', 'amatem', '2021-10-13', 400, '', 0, 12, 'dispensary', '2021-09-19 06:37:08', '13', '19092141125', 0, 'abdurrahman', NULL, '', 0, '', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('', 'amatem', '2021-10-13', 400, '', 6, 0, 'sold_items', '2021-09-19 06:41:40', '13', '19092141125', 0, 'abdurrahman', NULL, '', 0, '', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('', 'amatem', '2021-10-13', 400, '', 0, 6, 'dispensary', '2021-09-19 06:41:40', '13', '19092141125', 0, 'abdurrahman', NULL, '', 0, '', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('', 'amatem', '2021-10-13', 400, '', 6, 0, 'sold_items', '2021-09-19 06:43:00', '13', '19092141125', 0, 'abdurrahman', NULL, '', 0, '', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('', 'amatem', '2021-10-13', 400, '', 0, 6, 'dispensary', '2021-09-19 06:43:00', '13', '19092141125', 0, 'abdurrahman', NULL, '', 0, '', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('6001085003782', 'Lipton', '2022-02-08', 200, '0', 0, 400, 'purchases', '2021-09-19 06:50:33', '11', '19092141125', 0, 'abdurrahman', NULL, 'Tea', 100, '', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('6001085003782', 'Lipton', '2022-02-08', 200, '0', 400, 0, 'dispensary', '2021-09-19 06:50:33', '11', '19092141125', 0, 'abdurrahman', NULL, 'Tea', 100, '', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('', 'amatem', '2021-10-13', 400, '', 12, 0, 'sold_items', '2021-09-19 06:58:18', '13', '19092141125', 0, 'abdurrahman', NULL, '', 0, '', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('', 'amatem', '2021-10-13', 400, '', 0, 12, 'dispensary', '2021-09-19 06:58:18', '13', '19092141125', 0, 'abdurrahman', NULL, '', 0, '', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('', 'amatem', '2021-10-13', 400, '', 12, 0, 'sold_items', '2021-09-19 07:02:07', '13', '19092111', 0, 'abdurrahman', NULL, '', 0, '', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('', 'amatem', '2021-10-13', 400, '', 0, 12, 'dispensary', '2021-09-19 07:02:07', '13', '19092111', 0, 'abdurrahman', NULL, '', 0, '', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('', 'amatem', '2021-10-13', 400, '', 4, 0, 'sold_items', '2021-09-19 07:42:46', '13', '19092111', 0, 'abdurrahman', NULL, '', 0, '', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('6001085003782', 'Lipton', '2022-02-08', 300, '', 5, 0, 'sold_items', '2021-09-19 07:42:46', '11', '19092111', 0, 'abdurrahman', NULL, 'Tea', 0, '', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('', 'amatem', '2021-10-13', 400, '', 0, 4, 'dispensary', '2021-09-19 07:42:46', '13', '19092111', 0, 'abdurrahman', NULL, '', 0, '', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('6001085003782', 'Lipton', '2022-02-08', 300, '', 0, 5, 'dispensary', '2021-09-19 07:42:46', '11', '19092111', 0, 'abdurrahman', NULL, 'Tea', 0, '', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('', 'amatem', '2021-10-13', 400, '', 4, 0, 'sold_items', '2021-09-19 07:56:42', '13', '19092111', 0, 'abdurrahman', NULL, '', 0, '', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('', 'amatem', '2021-10-13', 400, '', 0, 4, 'dispensary', '2021-09-19 07:56:42', '13', '19092111', 0, 'abdurrahman', NULL, '', 0, '', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('', 'amatem', '2021-10-13', 400, '', 12, 0, 'sold_items', '2021-09-19 08:02:34', '13', '19092111', 0, 'abdurrahman', NULL, '', 0, '5990', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('', 'amatem', '2021-10-13', 400, '', 0, 12, 'dispensary', '2021-09-19 08:02:34', '13', '19092111', 0, 'abdurrahman', NULL, '', 0, '5990', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('6001085003782', 'Lipton', '2022-02-08', 300, '', 12, 0, 'sold_items', '2021-09-19 08:02:34', '11', '19092111', 0, 'abdurrahman', NULL, 'Tea', 0, '5990', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('6001085003782', 'Lipton', '2022-02-08', 300, '', 0, 12, 'dispensary', '2021-09-19 08:02:34', '11', '19092111', 0, 'abdurrahman', NULL, 'Tea', 0, '5990', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('', 'amatem', '2021-10-13', 400, '', 22, 0, 'sold_items', '2021-09-19 08:05:54', '13', '19092111', 0, 'abdurrahman', NULL, '', 0, '5989', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('', 'amatem', '2021-10-13', 400, '', 0, 22, 'dispensary', '2021-09-19 08:05:54', '13', '19092111', 0, 'abdurrahman', NULL, '', 0, '5989', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('6001085003782', 'Lipton', '2022-02-08', 300, '', 43, 0, 'sold_items', '2021-09-19 08:05:54', '11', '19092111', 0, 'abdurrahman', NULL, 'Tea', 0, '5989', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('6001085003782', 'Lipton', '2022-02-08', 300, '', 0, 43, 'dispensary', '2021-09-19 08:05:54', '11', '19092111', 0, 'abdurrahman', NULL, 'Tea', 0, '5989', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('', 'amatem', '2021-10-13', 400, '', 5, 0, 'sold_items', '2021-09-19 08:24:48', '13', '19092129', 0, 'abdurrahman', NULL, '', 0, '5989', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('', 'amatem', '2021-10-13', 400, '', 0, 5, 'dispensary', '2021-09-19 08:24:48', '13', '19092129', 0, 'abdurrahman', NULL, '', 0, '5989', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('', 'amatem', '2021-10-13', 0, '', 4, 0, 'sold_items', '2021-09-19 08:25:13', '', '190921311', 0, 'abdurrahman', NULL, '', 0, '5989-1', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('', 'amatem', '2021-10-13', 0, '', 0, 4, 'dispensary', '2021-09-19 08:25:13', '', '190921311', 0, 'abdurrahman', NULL, '', 0, '5989-1', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('', 'amatem', '2021-10-13', 400, '', 21, 0, 'sold_items', '2021-09-20 23:18:23', '13', '210921317', 0, 'abdurrahman', NULL, '', 0, '1', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('6001085003782', 'Lipton', '2022-02-08', 300, '', 22, 0, 'sold_items', '2021-09-20 23:18:23', '11', '210921317', 0, 'abdurrahman', NULL, 'Tea', 0, '1', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('', 'amatem', '2021-10-13', 400, '', 0, 21, 'dispensary', '2021-09-20 23:18:23', '13', '210921317', 0, 'abdurrahman', NULL, '', 0, '1', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('6001085003782', 'Lipton', '2022-02-08', 300, '', 0, 22, 'dispensary', '2021-09-20 23:18:23', '11', '210921317', 0, 'abdurrahman', NULL, 'Tea', 0, '1', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('6001085003782', 'Lipton', '2022-02-08', 554, '', 8, 0, 'sold_items', '2021-09-26 19:55:25', '11', '260921341', 0, 'abdurrahman', NULL, 'Tea', 0, '1', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('', 'amatem', '2021-10-13', 1000, '', 5, 0, 'sold_items', '2021-09-26 19:55:25', '13', '260921341', 0, 'abdurrahman', NULL, '', 0, '1', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('6001085003782', 'Lipton', '2022-02-08', 554, '', 0, 8, 'dispensary', '2021-09-26 19:55:25', '11', '260921341', 0, 'abdurrahman', NULL, 'Tea', 0, '1', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('', 'amatem', '2021-10-13', 1000, '', 0, 5, 'dispensary', '2021-09-26 19:55:25', '13', '260921341', 0, 'abdurrahman', NULL, '', 0, '1', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('', 'amatem', '2021-10-13', 1000, '', 6, 0, 'sold_items', '2021-09-28 21:38:07', '13', '280921247', 0, 'abdurrahman', NULL, '', 0, '8', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('', 'amatem', '2021-10-13', 1000, '', 0, 6, 'dispensary', '2021-09-28 21:38:07', '13', '280921247', 0, 'abdurrahman', NULL, '', 0, '8', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('6001085003782', 'Lipton', '2022-02-08', 554, '', 48, 0, 'sold_items', '2021-09-28 21:38:07', '11', '280921247', 0, 'abdurrahman', NULL, 'Tea', 0, '8', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('6001085003782', 'Lipton', '2022-02-08', 554, '', 0, 48, 'dispensary', '2021-09-28 21:38:07', '11', '280921247', 0, 'abdurrahman', NULL, 'Tea', 0, '8', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('', 'Folic Acid', '2024-04-04', 400, '0', 0, 400, 'purchases', '2021-09-30 10:43:48', '11', '300921153', 0, 'abdurrahman', NULL, 'Anti Histamine', 40, '', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('', 'Folic Acid', '2024-04-04', 400, '0', 400, 0, 'dispensary', '2021-09-30 10:43:48', '11', '300921153', 0, 'abdurrahman', NULL, 'Anti Histamine', 40, '', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('', 'amatem', '2021-10-13', 1000, '', 5, 0, 'sold_items', '2021-10-01 16:57:07', '13', '011021153', 0, 'abdurrahman', NULL, '', 0, '2', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('', 'Folic Acid', '2024-04-04', 440, '', 5, 0, 'sold_items', '2021-10-01 16:57:07', '11', '011021153', 0, 'abdurrahman', NULL, 'Anti Histamine', 0, '2', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('6001085003782', 'Lipton', '2022-02-08', 554, '', 5, 0, 'sold_items', '2021-10-01 16:57:07', '11', '011021153', 0, 'abdurrahman', NULL, 'Tea', 0, '2', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('', 'amatem', '2021-10-13', 1000, '', 0, 5, 'dispensary', '2021-10-01 16:57:07', '13', '011021153', 0, 'abdurrahman', NULL, '', 0, '2', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('', 'Folic Acid', '2024-04-04', 440, '', 0, 5, 'dispensary', '2021-10-01 16:57:07', '11', '011021153', 0, 'abdurrahman', NULL, 'Anti Histamine', 0, '2', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
('6001085003782', 'Lipton', '2022-02-08', 554, '', 0, 5, 'dispensary', '2021-10-01 16:57:07', '11', '011021153', 0, 'abdurrahman', NULL, 'Tea', 0, '2', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a');

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

--
-- Table structure for table `drug_frequency`
--

CREATE TABLE `drug_frequency` (
  `id` int(11) NOT NULL,
  `description` varchar(20) NOT NULL,
  `time_start` time DEFAULT NULL,
  `interval_` int(11) DEFAULT NULL,
  `interval_uom` varchar(10) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `drug_frequency`
--

INSERT INTO `drug_frequency` (`id`, `description`, `time_start`, `interval_`, `interval_uom`) VALUES
(1, 'Once Daily', '10:00:00', 24, 'hour'),
(2, '12 Hourly', '06:00:00', 12, 'hour'),
(3, '8 hourly', '06:00:00', 8, 'hour'),
(4, '6 Hourly', '06:00:00', 6, 'hour'),
(5, '4 Hourly', '12:00:00', 4, 'hour'),
(6, 'STAT', NULL, 1, 'day'),
(7, 'PRN', NULL, NULL, '');

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

--
-- Table structure for table `drug_schedule`
--

CREATE TABLE `drug_schedule` (
  `id` int(11) NOT NULL,
  `allocation_id` varchar(50) NOT NULL,
  `patient_id` varchar(50) NOT NULL,
  `prescription_id` varchar(50) NOT NULL,
  `drug_name` varchar(50) NOT NULL,
  `time_stamp` timestamp NULL DEFAULT NULL,
  `status` varchar(10) NOT NULL DEFAULT 'scheduled',
  `administered_by` varchar(50) NOT NULL,
  `facilityId` varchar(50) NOT NULL,
  `served_by` varchar(50) DEFAULT NULL,
  `stopped_by` varchar(50) NOT NULL,
  `reason` varchar(500) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `drug_schedule`
--

INSERT INTO `drug_schedule` (`id`, `allocation_id`, `patient_id`, `prescription_id`, `drug_name`, `time_stamp`, `status`, `administered_by`, `facilityId`, `served_by`, `stopped_by`, `reason`) VALUES
(1, '', '2-1', '977b7a48-a336-4f34-8f26-bd07f7aa2d71', 'Lipton', '2021-09-30 06:00:00', 'Served', 'abdurrahman', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman', '', NULL),
(2, '', '2-1', '977b7a48-a336-4f34-8f26-bd07f7aa2d71', 'Lipton', '2021-09-30 18:00:00', 'Served', 'abdurrahman', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman', '', NULL),
(3, '', '2-1', '977b7a48-a336-4f34-8f26-bd07f7aa2d71', 'Lipton', '2021-10-01 06:00:00', 'Not Served', 'abdurrahman', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman', '', 'i do what i like and it is none of your business'),
(4, '', '2-1', '977b7a48-a336-4f34-8f26-bd07f7aa2d71', 'Lipton', '2021-10-01 18:00:00', 'scheduled', 'abdurrahman', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', NULL, '', NULL),
(5, '', '2-1', '7c5a8b7e-0191-4b4c-8282-445a8d0a53cd', 'amatem', '2021-09-30 06:00:00', 'Not Served', 'abdurrahman', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman', '', 'whatever'),
(6, '', '2-1', '7c5a8b7e-0191-4b4c-8282-445a8d0a53cd', 'amatem', '2021-09-30 12:00:00', 'stop', 'abdurrahman', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', NULL, 'abdurrahman', NULL),
(7, '', '2-1', '7c5a8b7e-0191-4b4c-8282-445a8d0a53cd', 'amatem', '2021-09-30 18:00:00', 'stop', 'abdurrahman', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', NULL, 'abdurrahman', NULL),
(8, '', '2-1', '7c5a8b7e-0191-4b4c-8282-445a8d0a53cd', 'amatem', '2021-10-01 00:00:00', 'stop', 'abdurrahman', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', NULL, 'abdurrahman', NULL),
(9, '', '2-1', '7c5a8b7e-0191-4b4c-8282-445a8d0a53cd', 'amatem', '2021-10-01 06:00:00', 'stop', 'abdurrahman', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', NULL, 'abdurrahman', NULL),
(10, '', '2-1', '7c5a8b7e-0191-4b4c-8282-445a8d0a53cd', 'amatem', '2021-10-01 12:00:00', 'stop', 'abdurrahman', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', NULL, 'abdurrahman', NULL),
(11, '', '2-1', '7c5a8b7e-0191-4b4c-8282-445a8d0a53cd', 'amatem', '2021-10-01 18:00:00', 'stop', 'abdurrahman', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', NULL, 'abdurrahman', NULL),
(12, '', '2-1', 'ab3c3587-0383-434d-87d9-38497d836786', 'Folic Acid', '2021-09-30 06:00:00', 'Served', 'abdurrahman', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman', '', NULL),
(13, '', '2-1', 'ab3c3587-0383-434d-87d9-38497d836786', 'Folic Acid', '2021-09-30 14:00:00', 'Served', 'abdurrahman', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman', '', NULL),
(14, '', '2-1', 'ab3c3587-0383-434d-87d9-38497d836786', 'Folic Acid', '2021-09-30 22:00:00', 'Not Served', 'abdurrahman', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman', '', 'i do what i like and it is none of your business'),
(15, '', '2-1', 'ab3c3587-0383-434d-87d9-38497d836786', 'Folic Acid', '2021-10-01 06:00:00', 'Served', 'abdurrahman', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman', '', NULL),
(16, '', '2-1', 'ab3c3587-0383-434d-87d9-38497d836786', 'Folic Acid', '2021-10-01 14:00:00', 'scheduled', 'abdurrahman', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', NULL, '', NULL),
(17, '', '2-1', 'ab3c3587-0383-434d-87d9-38497d836786', 'Folic Acid', '2021-10-01 22:00:00', 'scheduled', 'abdurrahman', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', NULL, '', NULL),
(18, '', '2-1', 'ab3c3587-0383-434d-87d9-38497d836786', 'Folic Acid', '2021-10-02 06:00:00', 'Not Served', 'abdurrahman', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman', '', 'fdlkjslidg'),
(19, '', '2-1', 'ab3c3587-0383-434d-87d9-38497d836786', 'Folic Acid', '2021-10-02 14:00:00', 'scheduled', 'abdurrahman', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', NULL, '', NULL),
(20, '', '2-1', 'ab3c3587-0383-434d-87d9-38497d836786', 'Folic Acid', '2021-10-02 22:00:00', 'scheduled', 'abdurrahman', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', NULL, '', NULL),
(21, '', '2-1', 'ab3c3587-0383-434d-87d9-38497d836786', 'Folic Acid', '2021-10-03 06:00:00', 'scheduled', 'abdurrahman', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', NULL, '', NULL),
(22, '', '2-1', 'ab3c3587-0383-434d-87d9-38497d836786', 'Folic Acid', '2021-10-03 14:00:00', 'scheduled', 'abdurrahman', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', NULL, '', NULL),
(23, '', '2-1', 'ab3c3587-0383-434d-87d9-38497d836786', 'Folic Acid', '2021-10-03 22:00:00', 'scheduled', 'abdurrahman', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', NULL, '', NULL),
(24, '', '8-1', '234bdc29-a14e-4ebd-b186-490ec5c3adc7', 'Lipton', '2021-09-30 06:00:00', 'Not Served', 'abdurrahman', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman', '', 'os'),
(25, '', '8-1', '234bdc29-a14e-4ebd-b186-490ec5c3adc7', 'Lipton', '2021-09-30 12:00:00', 'Served', 'abdurrahman', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman', '', NULL),
(26, '', '8-1', '234bdc29-a14e-4ebd-b186-490ec5c3adc7', 'Lipton', '2021-09-30 18:00:00', 'Served', 'abdurrahman', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman', '', NULL),
(27, '', '8-1', '234bdc29-a14e-4ebd-b186-490ec5c3adc7', 'Lipton', '2021-10-01 00:00:00', 'Served', 'abdurrahman', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman', '', NULL),
(28, '', '8-1', '234bdc29-a14e-4ebd-b186-490ec5c3adc7', 'Lipton', '2021-10-01 06:00:00', 'Served', 'abdurrahman', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman', '', NULL),
(29, '', '8-1', '234bdc29-a14e-4ebd-b186-490ec5c3adc7', 'Lipton', '2021-10-01 12:00:00', 'Served', 'abdurrahman', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman', '', NULL),
(30, '', '8-1', '234bdc29-a14e-4ebd-b186-490ec5c3adc7', 'Lipton', '2021-10-01 18:00:00', 'scheduled', 'abdurrahman', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', NULL, '', NULL),
(31, '', '8-1', '234bdc29-a14e-4ebd-b186-490ec5c3adc7', 'Lipton', '2021-10-02 00:00:00', 'Served', 'abdurrahman', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman', '', NULL),
(32, '', '8-1', '234bdc29-a14e-4ebd-b186-490ec5c3adc7', 'Lipton', '2021-10-02 06:00:00', 'scheduled', 'abdurrahman', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', NULL, '', NULL),
(33, '', '8-1', '234bdc29-a14e-4ebd-b186-490ec5c3adc7', 'Lipton', '2021-10-02 12:00:00', 'scheduled', 'abdurrahman', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', NULL, '', NULL),
(34, '', '8-1', '234bdc29-a14e-4ebd-b186-490ec5c3adc7', 'Lipton', '2021-10-02 18:00:00', 'scheduled', 'abdurrahman', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', NULL, '', NULL),
(35, '', '1-1', '259535a7-3280-4bce-b9cf-250d0e8c2faf', 'amatem', '2021-10-02 06:00:00', 'stop', 'abdurrahman', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', NULL, 'abdurrahman', NULL),
(36, '', '1-1', '259535a7-3280-4bce-b9cf-250d0e8c2faf', 'amatem', '2021-10-02 18:00:00', 'stop', 'abdurrahman', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', NULL, 'abdurrahman', NULL),
(37, '', '1-1', '259535a7-3280-4bce-b9cf-250d0e8c2faf', 'amatem', '2021-10-03 06:00:00', 'stop', 'abdurrahman', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', NULL, 'abdurrahman', NULL),
(38, '', '1-1', '259535a7-3280-4bce-b9cf-250d0e8c2faf', 'amatem', '2021-10-03 18:00:00', 'stop', 'abdurrahman', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', NULL, 'abdurrahman', NULL),
(39, '', '1-1', '259535a7-3280-4bce-b9cf-250d0e8c2faf', 'amatem', '2021-10-04 06:00:00', 'stop', 'abdurrahman', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', NULL, 'abdurrahman', NULL),
(40, '', '1-1', '259535a7-3280-4bce-b9cf-250d0e8c2faf', 'amatem', '2021-10-04 18:00:00', 'stop', 'abdurrahman', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', NULL, 'abdurrahman', NULL),
(41, '', '1-1', '259535a7-3280-4bce-b9cf-250d0e8c2faf', 'amatem', '2021-10-05 06:00:00', 'stop', 'abdurrahman', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', NULL, 'abdurrahman', NULL),
(42, '', '1-1', '259535a7-3280-4bce-b9cf-250d0e8c2faf', 'amatem', '2021-10-05 18:00:00', 'stop', 'abdurrahman', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', NULL, 'abdurrahman', NULL),
(43, '', '1-1', '259535a7-3280-4bce-b9cf-250d0e8c2faf', 'amatem', '2021-10-06 06:00:00', 'stop', 'abdurrahman', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', NULL, 'abdurrahman', NULL),
(44, '', '1-1', '259535a7-3280-4bce-b9cf-250d0e8c2faf', 'amatem', '2021-10-06 18:00:00', 'stop', 'abdurrahman', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', NULL, 'abdurrahman', NULL),
(45, '', '1-1', 'b7c7b8b2-3747-40e1-a81a-40f27521f017', 'Folic Acid', '2021-10-03 10:00:00', 'scheduled', 'abdurrahman', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', NULL, '', NULL),
(46, '', '1-1', 'b7c7b8b2-3747-40e1-a81a-40f27521f017', 'Folic Acid', '2021-10-04 10:00:00', 'scheduled', 'abdurrahman', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', NULL, '', NULL),
(47, '', '1-1', 'b7c7b8b2-3747-40e1-a81a-40f27521f017', 'Folic Acid', '2021-10-05 10:00:00', 'scheduled', 'abdurrahman', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', NULL, '', NULL),
(48, '', '1-1', '77b5a9e5-c8ea-453c-b1b4-2759525e54b7', 'Lipton', '2021-10-03 06:00:00', 'scheduled', 'abdurrahman', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', NULL, '', NULL),
(49, '', '1-1', '77b5a9e5-c8ea-453c-b1b4-2759525e54b7', 'Lipton', '2021-10-03 18:00:00', 'scheduled', 'abdurrahman', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', NULL, '', NULL),
(50, '', '1-1', '77b5a9e5-c8ea-453c-b1b4-2759525e54b7', 'Lipton', '2021-10-04 06:00:00', 'scheduled', 'abdurrahman', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', NULL, '', NULL),
(51, '', '1-1', '77b5a9e5-c8ea-453c-b1b4-2759525e54b7', 'Lipton', '2021-10-04 18:00:00', 'scheduled', 'abdurrahman', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', NULL, '', NULL);

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

--
-- Stand-in structure for view `drug_schedule_view`
-- (See below for the actual view)
--
CREATE TABLE `drug_schedule_view` (
`drug` varchar(40)
,`dosage` varchar(40)
,`patient_id` varchar(11)
,`created_at` datetime
,`prescription_id` varchar(50)
,`id` int(11)
,`prescribed_by` varchar(50)
,`administered_by` varchar(50)
,`stopped_by` varchar(50)
,`reason` varchar(500)
,`duration` varchar(20)
,`period` varchar(20)
,`frequency` varchar(20)
,`route` varchar(20)
,`time_stamp` timestamp
,`status` varchar(10)
,`facilityId` varchar(50)
);

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

--
-- 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(200)
,`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;

--
-- Dumping data for table `feedbacks`
--

INSERT INTO `feedbacks` (`id`, `userId`, `message`, `createdAt`, `updatedAt`) VALUES
('c0394335-c2a3-4cde-82a9-1fefcb8bf9bd', 'zaks', 'please come an see something  on micro biology', '2021-03-03 10:05:43', '2021-03-03 10:05:43');

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

--
-- 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,
  `useLetterHead` varchar(10) DEFAULT NULL,
  `printTitle` varchar(100) DEFAULT NULL,
  `printSubtitle1` varchar(200) DEFAULT NULL,
  `printSubtitle2` varchar(200) DEFAULT NULL,
  `modules` varchar(100) DEFAULT NULL,
  `features` varchar(500) 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`, `useLetterHead`, `printTitle`, `printSubtitle1`, `printSubtitle2`, `modules`, `features`, `createdAt`, `updatedAt`, `logo`, `type`, `hasStore`) VALUES
('07c4fc06-1329-4b59-99f6-c8e135cd5219', 'Pharmacy', '', 'Kawo', 'tttt2', NULL, NULL, NULL, NULL, NULL, NULL, '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),
('121bb692-9a44-472f-b396-b68ebf798b30', 'Brainstorm IT Solutions', '', 'No 3. Sabo Bakin Zuwo Road, Kano', 'bits', NULL, NULL, NULL, NULL, NULL, NULL, '2020-11-24 11:39:13', '2020-11-24 11:39:13', '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', NULL, NULL, NULL, NULL, NULL, NULL, '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', NULL, NULL, NULL, NULL, NULL, NULL, '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', 'PSC Specialist Hospital Limited', 'PSC', '19 Lamido Crescent, off Tarauni, Kano', 'abdurrahman', 'no', 'PSC SPECIALIST HOSPITAL LIMITED', '19 Lamido Crescent, off Tarauni, Kano', NULL, NULL, NULL, '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', NULL, NULL, NULL, NULL, NULL, NULL, '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', NULL, NULL, NULL, NULL, NULL, NULL, '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', NULL, NULL, NULL, NULL, NULL, NULL, '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', NULL, NULL, NULL, NULL, NULL, NULL, '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),
('422cc2dd-861e-4ec5-9e4b-412ca033c8fe', 'RISCAN', '', 'Kano', 'riscan-admin', NULL, NULL, NULL, NULL, NULL, NULL, '2020-12-10 15:30:49', '2020-12-10 15:30:49', 'https://res.cloudinary.com/emaitee/image/upload/v1607617793/logo192.png', 'diagnosticCenter', 1),
('6c6af0c0-35ea-40d8-a928-b13a9766113a', 'My Pharmacy', 'MPH', 'Kano', 'pharm_m', NULL, NULL, NULL, NULL, NULL, NULL, '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 AND CLINICAL SERVICES LIMITED', 'ODC', 'Zaria Road, Kano', 'admin', NULL, NULL, NULL, NULL, NULL, NULL, '2020-08-11 11:51:40', '2020-08-11 11:51:40', 'https://res.cloudinary.com/emaitee/image/upload/v1606851273/mylikita/logos/optimum-logo.jpg', 'diagnosticCenter', 0),
('a2cc3c63-2dd3-4e64-aed4-4f4af98d17ca', 'Test Me', '', 'nigeria', 'testme', NULL, NULL, NULL, NULL, NULL, NULL, '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', NULL, NULL, NULL, NULL, NULL, NULL, '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', NULL, NULL, NULL, NULL, NULL, NULL, '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),
('d7dd5507-d46f-4c02-841c-f9d42476c74c', 'mylike', 'myl', 'standard st', 'bernaddoke', NULL, NULL, NULL, NULL, NULL, NULL, '2021-04-17 14:48:30', '2021-04-17 14:48:30', 'https://res.cloudinary.com/emaitee/image/upload/v1583943949/bits_his_logo.png', 'Hospital', 0),
('d8d7a732-1832-4e25-9a98-e68ddc3f0b26', 'BINADAM OIL MILLS', '', 'Kano', 'admin-user', NULL, NULL, NULL, NULL, NULL, NULL, '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', NULL, NULL, NULL, NULL, NULL, NULL, '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', NULL, NULL, NULL, NULL, NULL, NULL, '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);

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

--
-- Stand-in structure for view `in_patient_list`
-- (See below for the actual view)
--
CREATE TABLE `in_patient_list` (
`sort_index` int(11)
,`bed_id` int(11)
,`allocation_id` int(11)
,`allocation_status` varchar(20)
,`allocated` timestamp
,`allocated_by` varchar(50)
,`patient_name` varchar(101)
,`patient_id` varchar(50)
,`accountNo` int(7)
,`name` varchar(100)
,`class_type` varchar(50)
,`account` varchar(10)
,`price` int(11)
,`facilityId` varchar(50)
);

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

--
-- 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');

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

--
-- Table structure for table `lab_codes`
--

CREATE TABLE `lab_codes` (
  `lab_code_number` int(10) NOT NULL,
  `code_initial` int(5) NOT NULL,
  `lab_year` int(5) NOT NULL,
  `lab_id` int(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `lab_codes`
--

INSERT INTO `lab_codes` (`lab_code_number`, `code_initial`, `lab_year`, `lab_id`) VALUES
(2000, 2, 21, 0),
(3000, 3, 21, 0),
(4000, 4, 21, 0),
(5000, 5, 21, 0);

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

--
-- Stand-in structure for view `lab_info`
-- (See below for the actual view)
--
CREATE TABLE `lab_info` (
`sn` int(11)
,`created_at` timestamp
,`facilityId` varchar(50)
,`id` int(100)
,`code` varchar(50)
,`booking_no` varchar(100)
,`request_id` int(50)
,`patient_id` varchar(50)
,`qms_dept_id` int(11)
,`head` varchar(100)
,`subhead` varchar(100)
,`unit` varchar(100)
,`range_from` varchar(100)
,`range_to` varchar(100)
,`price` int(100)
,`old_price` int(100)
,`commission_type` varchar(50)
,`percentage` int(11)
,`description` varchar(200)
,`specimen` varchar(100)
,`noOfLabels` int(11)
,`label_type` varchar(20)
,`label_name` varchar(100)
,`department` varchar(50)
,`result` varchar(200)
,`h_value` varchar(20)
,`o_value` varchar(20)
,`appearance` varchar(200)
,`serology` varchar(200)
,`culture_yielded` varchar(100)
,`sensitivity` varchar(200)
,`resistivity` varchar(200)
,`intermediaryTo` varchar(200)
,`lab_code` int(11)
,`selectable` varchar(20)
,`status` varchar(20)
,`print_type` varchar(20)
,`report_type` varchar(20)
,`collect_sample` varchar(20)
,`to_be_reported` varchar(20)
,`to_be_analyzed` varchar(20)
,`created_by` varchar(50)
,`sample_collected_by` varchar(50)
,`sample_collected_at` datetime
,`analyzed_by` varchar(50)
,`analyzed_at` datetime
,`result_by` varchar(50)
,`result_at` datetime
,`reviewed_by` varchar(50)
,`reviewed_at` datetime
,`printed_by` varchar(50)
,`printed_at` datetime
,`n_unit` varchar(20)
,`n_range_from` varchar(20)
,`n_range_to` varchar(20)
,`receiptNo` varchar(50)
,`sop_instance_id` varchar(200)
,`uploaded_at` varchar(50) DEFAULT NULL
,`uploaded_by` varchar(100)
,`payment_status` varchar(20)
,`approval_status` 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 13: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(2000) DEFAULT NULL,
  `status` varchar(200) DEFAULT NULL,
  `facilityId` varchar(50) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Stand-in structure for view `lab_process`
-- (See below for the actual view)
--
CREATE TABLE `lab_process` (
`sn` int(11)
,`created_at` timestamp
,`facilityId` varchar(50)
,`id` int(100)
,`qms_dept_id` int(11)
,`code` varchar(50)
,`booking_no` varchar(100)
,`request_id` int(50)
,`patient_id` varchar(50)
,`name` varchar(101)
,`DOB` varchar(20)
,`Gender` varchar(10)
,`head` varchar(100)
,`subhead` varchar(100)
,`unit` varchar(100)
,`range_from` varchar(100)
,`range_to` varchar(100)
,`price` int(100)
,`old_price` int(100)
,`commission_type` varchar(50)
,`percentage` int(11)
,`description` varchar(200)
,`specimen` varchar(100)
,`noOfLabels` int(11)
,`label_type` varchar(20)
,`label_name` varchar(100)
,`group_head` varchar(200)
,`department` varchar(50)
,`department_head` varchar(200)
,`result` varchar(200)
,`h_value` varchar(20)
,`o_value` varchar(20)
,`appearance` varchar(200)
,`serology` varchar(200)
,`culture_yielded` varchar(100)
,`sensitivity` varchar(200)
,`resistivity` varchar(200)
,`intermediaryTo` varchar(200)
,`lab_code` int(11)
,`selectable` varchar(20)
,`status` varchar(20)
,`print_type` varchar(20)
,`report_type` varchar(20)
,`collect_sample` varchar(20)
,`to_be_reported` varchar(20)
,`to_be_analyzed` varchar(20)
,`created_by` varchar(50)
,`sample_collected_by` varchar(50)
,`sample_collected_at` datetime
,`analyzed_by` varchar(50)
,`analyzed_at` datetime
,`result_by` varchar(50)
,`result_at` datetime
,`reviewed_by` varchar(50)
,`reviewed_at` datetime
,`printed_by` varchar(50)
,`printed_at` datetime
,`n_unit` varchar(20)
,`n_range_from` varchar(20)
,`n_range_to` varchar(20)
,`receiptNo` varchar(50)
,`sop_instance_id` varchar(200)
,`uploaded_at` varchar(50) DEFAULT NULL
,`uploaded_by` varchar(100)
,`payment_status` varchar(20)
,`approval_status` varchar(50)
);

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

--
-- Stand-in structure for view `lab_request2`
-- (See below for the actual view)
--
CREATE TABLE `lab_request2` (
`sn` int(11)
,`created_at` timestamp
,`facilityId` varchar(50)
,`id` int(100)
,`qms_dept_id` int(11)
,`code` varchar(50)
,`booking_no` varchar(100)
,`request_id` int(50)
,`patient_id` varchar(50)
,`head` varchar(100)
,`subhead` varchar(100)
,`unit` varchar(100)
,`range_from` varchar(100)
,`range_to` varchar(100)
,`price` int(100)
,`old_price` int(100)
,`commission_type` varchar(50)
,`percentage` int(11)
,`description` varchar(200)
,`specimen` varchar(100)
,`noOfLabels` int(11)
,`label_type` varchar(20)
,`label_name` varchar(100)
,`group_head` varchar(200)
,`department` varchar(50)
,`result` varchar(200)
,`h_value` varchar(20)
,`o_value` varchar(20)
,`appearance` varchar(200)
,`serology` varchar(200)
,`culture_yielded` varchar(100)
,`sensitivity` varchar(200)
,`resistivity` varchar(200)
,`intermediaryTo` varchar(200)
,`lab_code` int(11)
,`selectable` varchar(20)
,`status` varchar(20)
,`print_type` varchar(20)
,`report_type` varchar(20)
,`collect_sample` varchar(20)
,`to_be_reported` varchar(20)
,`to_be_analyzed` varchar(20)
,`created_by` varchar(50)
,`sample_collected_by` varchar(50)
,`sample_collected_at` datetime
,`analyzed_by` varchar(50)
,`analyzed_at` datetime
,`result_by` varchar(50)
,`result_at` datetime
,`reviewed_by` varchar(50)
,`reviewed_at` datetime
,`printed_by` varchar(50)
,`printed_at` datetime
,`n_unit` varchar(20)
,`n_range_from` varchar(20)
,`n_range_to` varchar(20)
,`receiptNo` varchar(50)
,`sop_instance_id` varchar(200)
,`uploaded_at` varchar(50) DEFAULT NULL
,`uploaded_by` varchar(100)
,`payment_status` varchar(20)
,`approval_status` varchar(50)
);

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

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

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

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

CREATE TABLE `lab_requisition` (
  `facilityId` varchar(50) DEFAULT NULL,
  `id` int(100) NOT NULL,
  `code` varchar(50) DEFAULT NULL,
  `booking_no` varchar(100) DEFAULT NULL,
  `token` varchar(64) DEFAULT NULL,
  `request_id` int(50) DEFAULT NULL,
  `patient_id` varchar(50) DEFAULT NULL,
  `test` varchar(100) DEFAULT NULL,
  `price` int(11) DEFAULT NULL,
  `percentage` int(11) DEFAULT NULL,
  `result` varchar(200) DEFAULT NULL,
  `h_value` varchar(20) DEFAULT NULL,
  `o_value` varchar(20) DEFAULT NULL,
  `appearance` varchar(200) DEFAULT NULL,
  `serology` varchar(200) DEFAULT NULL,
  `culture_yielded` varchar(100) DEFAULT NULL,
  `sensitivity` varchar(200) DEFAULT NULL,
  `resistivity` varchar(200) DEFAULT NULL,
  `intermediaryTo` varchar(200) DEFAULT NULL,
  `department` varchar(50) DEFAULT NULL,
  `test_group` varchar(50) DEFAULT NULL,
  `status` varchar(20) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT current_timestamp(),
  `updated_at` varchar(100) DEFAULT NULL,
  `created_by` varchar(50) DEFAULT NULL,
  `sample_collected_by` varchar(50) DEFAULT NULL,
  `sample_collected_at` datetime DEFAULT NULL,
  `analyzed_by` varchar(50) DEFAULT NULL,
  `analyzed_at` datetime DEFAULT NULL,
  `result_by` varchar(50) DEFAULT NULL,
  `result_at` datetime DEFAULT NULL,
  `sop_instance_id` varchar(200) DEFAULT NULL,
  `uploaded_at` timestamp NULL DEFAULT NULL,
  `uploaded_by` varchar(100) DEFAULT NULL,
  `reviewed_by` varchar(50) DEFAULT NULL,
  `reviewed_at` datetime DEFAULT NULL,
  `printed_by` varchar(50) DEFAULT NULL,
  `printed_at` datetime DEFAULT NULL,
  `unit` varchar(20) DEFAULT NULL,
  `range_from` varchar(20) DEFAULT NULL,
  `range_to` varchar(20) DEFAULT NULL,
  `receiptNo` varchar(50) DEFAULT NULL,
  `payment_status` varchar(20) NOT NULL,
  `label_type` varchar(20) NOT NULL,
  `noOfLabels` int(11) NOT NULL,
  `print_type` varchar(20) NOT NULL,
  `approval_status` varchar(50) NOT NULL DEFAULT 'pending'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

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

INSERT INTO `lab_requisition` (`facilityId`, `id`, `code`, `booking_no`, `token`, `request_id`, `patient_id`, `test`, `price`, `percentage`, `result`, `h_value`, `o_value`, `appearance`, `serology`, `culture_yielded`, `sensitivity`, `resistivity`, `intermediaryTo`, `department`, `test_group`, `status`, `created_at`, `updated_at`, `created_by`, `sample_collected_by`, `sample_collected_at`, `analyzed_by`, `analyzed_at`, `result_by`, `result_at`, `sop_instance_id`, `uploaded_at`, `uploaded_by`, `reviewed_by`, `reviewed_at`, `printed_by`, `printed_at`, `unit`, `range_from`, `range_to`, `receiptNo`, `payment_status`, `label_type`, `noOfLabels`, `print_type`, `approval_status`) VALUES
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 1, '221120', '2171', NULL, 1, '7-1', '2001', 700, 15, '5', 'null', 'null', '', '', '', '', '', '', '2000', NULL, 'analyzed', '2021-09-28 18:55:25', NULL, 'abdurrahman', NULL, NULL, 'abdurrahman', '2021-09-28 08:02:32', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '280921145', 'completed', 'grouped', 1, 'grouped', 'pending'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 2, '221120', '2171', NULL, 1, '7-1', '20021', 834, 15, '1', 'null', 'null', '', '', '', '', '', '', '2000', '2002', 'analyzed', '2021-09-28 18:55:25', NULL, 'abdurrahman', NULL, NULL, 'abdurrahman', '2021-09-28 08:02:32', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '280921145', 'completed', 'grouped', 1, 'grouped', 'pending'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 3, '221120', '2171', NULL, 1, '7-1', '20022', 833, 15, '2', 'null', 'null', '', '', '', '', '', '', '2000', '2002', 'analyzed', '2021-09-28 18:55:25', NULL, 'abdurrahman', NULL, NULL, 'abdurrahman', '2021-09-28 08:02:32', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '280921145', 'completed', 'grouped', 1, 'grouped', 'pending'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 4, '221120', '2171', NULL, 1, '7-1', '20023', 833, 15, '3', 'null', 'null', '', '', '', '', '', '', '2000', '2002', 'analyzed', '2021-09-28 18:55:25', NULL, 'abdurrahman', NULL, NULL, 'abdurrahman', '2021-09-28 08:02:32', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '280921145', 'completed', 'grouped', 1, 'grouped', 'pending'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 5, '221120', '2171', NULL, 1, '7-1', '2005', 1000, 15, '6', 'null', 'null', '', '', '', '', '', '', '2000', NULL, 'analyzed', '2021-09-28 18:55:25', NULL, 'abdurrahman', NULL, NULL, 'abdurrahman', '2021-09-28 08:02:32', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '280921145', 'completed', 'grouped', 1, 'grouped', 'pending'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 6, '42128', '2172', NULL, 1, '7-1', '4020', 700, 15, 'mp+ seen', 'null', 'null', '', '', '', '', '', '', '4000', NULL, 'analyzed', '2021-09-28 18:55:25', NULL, 'abdurrahman', NULL, NULL, 'abdurrahman', '2021-09-28 08:03:01', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '280921145', 'completed', 'grouped', 1, 'single', 'pending'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 7, '42128', '2176', NULL, 1, '7-1', '40422', 200, 15, '', '1/20', '1/20', '', '', '', '', '', '', '4000', '4042', 'analyzed', '2021-09-28 18:55:25', NULL, 'abdurrahman', NULL, NULL, 'abdurrahman', '2021-09-28 08:03:45', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '280921145', 'completed', 'grouped', 1, 'grouped', 'pending'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 8, '42128', '2176', NULL, 1, '7-1', '40423', 200, 15, '', '1/20', '1/20', '', '', '', '', '', '', '4000', '4042', 'analyzed', '2021-09-28 18:55:25', NULL, 'abdurrahman', NULL, NULL, 'abdurrahman', '2021-09-28 08:03:45', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '280921145', 'completed', 'grouped', 1, 'grouped', 'pending'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 9, '42128', '2176', NULL, 1, '7-1', '40424', 200, 15, '', '1/20', '1/20', '', '', '', '', '', '', '4000', '4042', 'analyzed', '2021-09-28 18:55:25', NULL, 'abdurrahman', NULL, NULL, 'abdurrahman', '2021-09-28 08:03:45', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '280921145', 'completed', 'grouped', 1, 'grouped', 'pending'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 10, '42128', '2176', NULL, 1, '7-1', '40425', 200, 15, '', '1/20', '1/20', '', '', '', '', '', '', '4000', '4042', 'analyzed', '2021-09-28 18:55:25', NULL, 'abdurrahman', NULL, NULL, 'abdurrahman', '2021-09-28 08:03:45', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '280921145', 'completed', 'grouped', 1, 'grouped', 'pending'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 11, '42129', '2177', NULL, 1, '7-1', '4002', 3000, 15, '', 'null', 'null', 'some ', 'other', 'result', 'Penicillin,Tetracycline,', 'Cloxacillin,Ampicilin,', 'Flucloxacillin,', '4000', NULL, 'analyzed', '2021-09-28 18:55:25', NULL, 'abdurrahman', NULL, NULL, 'abdurrahman', '2021-09-28 08:02:50', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '280921145', 'completed', 'single', 1, 'single', 'pending'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 12, '42130', '2178', NULL, 1, '7-1', '4039', 3000, 15, '', 'null', 'null', 'other', 'new resu', 'lt', 'Flucloxacillin,Tetracycline,', 'Cloxacillin,Penicillin,', 'Ampicilin,', '4000', NULL, 'analyzed', '2021-09-28 18:55:25', NULL, 'abdurrahman', NULL, NULL, 'abdurrahman', '2021-09-28 08:03:16', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '280921145', 'completed', 'single', 1, 'single', 'pending'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 13, '221126', '2184', NULL, 2, '8-1', '2000192', 1250, 15, '3', 'null', 'null', '', '', '', '', '', '', '2000', '200019', 'analyzed', '2021-09-28 21:45:15', NULL, 'abdurrahman', NULL, NULL, 'abdurrahman', '2021-09-28 10:45:49', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '280921453', 'completed', 'grouped', 1, 'grouped', 'pending'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 14, '221126', '2184', NULL, 2, '8-1', '2000193', 1250, 15, '23', 'null', 'null', '', '', '', '', '', '', '2000', '200019', 'analyzed', '2021-09-28 21:45:15', NULL, 'abdurrahman', NULL, NULL, 'abdurrahman', '2021-09-28 10:45:49', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '280921453', 'completed', 'grouped', 1, 'grouped', 'pending'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 15, '221126', '2184', NULL, 2, '8-1', '2001', 700, 15, '34', 'null', 'null', '', '', '', '', '', '', '2000', NULL, 'analyzed', '2021-09-28 21:45:15', NULL, 'abdurrahman', NULL, NULL, 'abdurrahman', '2021-09-28 10:45:49', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '280921453', 'completed', 'grouped', 1, 'grouped', 'pending'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 16, '221126', '2184', NULL, 2, '8-1', '20021', 834, 15, '34', 'null', 'null', '', '', '', '', '', '', '2000', '2002', 'analyzed', '2021-09-28 21:45:15', NULL, 'abdurrahman', NULL, NULL, 'abdurrahman', '2021-09-28 10:45:49', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '280921453', 'completed', 'grouped', 1, 'grouped', 'pending'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 17, '221126', '2184', NULL, 2, '8-1', '20022', 833, 15, '34', 'null', 'null', '', '', '', '', '', '', '2000', '2002', 'analyzed', '2021-09-28 21:45:15', NULL, 'abdurrahman', NULL, NULL, 'abdurrahman', '2021-09-28 10:45:49', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '280921453', 'completed', 'grouped', 1, 'grouped', 'pending'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 18, '221126', '2184', NULL, 2, '8-1', '20023', 833, 15, '34', 'null', 'null', '', '', '', '', '', '', '2000', '2002', 'analyzed', '2021-09-28 21:45:15', NULL, 'abdurrahman', NULL, NULL, 'abdurrahman', '2021-09-28 10:45:49', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '280921453', 'completed', 'grouped', 1, 'grouped', 'pending');

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

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

CREATE TABLE `lab_setup` (
  `id` binary(0) DEFAULT NULL,
  `subhead` varchar(100) CHARACTER SET latin1 NOT NULL,
  `qms_dept_id` int(11) NOT NULL,
  `description` varchar(200) CHARACTER SET latin1 NOT NULL,
  `price` int(100) NOT NULL,
  `old_price` int(100) NOT NULL,
  `sort_index` int(11) NOT NULL,
  `account` varchar(50) DEFAULT NULL,
  `head` varchar(100) 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,
  `other_range` varchar(50) CHARACTER SET utf8 COLLATE utf8_swedish_ci DEFAULT NULL,
  `specimen` varchar(100) CHARACTER SET latin1 NOT NULL,
  `commission_type` varchar(50) NOT NULL,
  `percentage` int(11) NOT NULL,
  `noOfLabels` int(11) NOT NULL,
  `label_type` varchar(20) DEFAULT NULL,
  `report_type` varchar(20) DEFAULT NULL,
  `print_type` varchar(20) DEFAULT NULL,
  `collect_sample` varchar(20) DEFAULT NULL,
  `to_be_analyzed` varchar(20) DEFAULT NULL,
  `to_be_reported` varchar(20) DEFAULT NULL,
  `upload_doc` varchar(20) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT current_timestamp(),
  `updated_at` varchar(100) DEFAULT NULL,
  `facilityId` varchar(50) CHARACTER SET latin1 NOT NULL,
  `created_by` varchar(50) CHARACTER SET latin1 NOT NULL,
  `lab_head` int(10) NOT NULL,
  `lab_code` int(11) NOT NULL,
  `selectable` varchar(20) NOT NULL,
  `label_name` varchar(100) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

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

INSERT INTO `lab_setup` (`id`, `subhead`, `qms_dept_id`, `description`, `price`, `old_price`, `sort_index`, `account`, `head`, `unit`, `range_from`, `range_to`, `other_range`, `specimen`, `commission_type`, `percentage`, `noOfLabels`, `label_type`, `report_type`, `print_type`, `collect_sample`, `to_be_analyzed`, `to_be_reported`, `upload_doc`, `created_at`, `updated_at`, `facilityId`, `created_by`, `lab_head`, `lab_code`, `selectable`, `label_name`) VALUES
(NULL, '1000', 0, 'PSC Specialist Clinic', 0, 0, 0, NULL, '', NULL, NULL, NULL, '', '', '', 0, 1, 'single', NULL, NULL, 'no', 'yes', NULL, NULL, '2021-05-20 13:10:29', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 0, 0, 'not allowed', 'PSC Specialist Clinic'),
(NULL, '2000', 3, 'Hematology', 0, 0, 0, NULL, '1000', '', '', '', '', 'No specimen', '', 0, 1, 'grouped', NULL, NULL, 'no', 'yes', NULL, NULL, '2021-05-20 13:10:29', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 2000, 0, 'not allowed', 'Hematology'),
(NULL, '200019', 3, 'INR', 2500, 2500, 10, '20001', '2022', '', '', '', NULL, 'Blood', 'percentage', 15, 1, 'grouped', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-11 06:03:50', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 2000, 2000, '', 'INR'),
(NULL, '2000192', 3, 'Sample (PT)', 1250, 0, 0, '20001', '200019', 'secs', '', '', NULL, 'Blood', 'percentage', 15, 1, 'grouped', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-20 13:10:29', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 2000, 2000, 'not allowed', 'INR'),
(NULL, '2000193', 3, 'INR (PT)', 1250, 0, 0, '20001', '200019', 'secs', '', '', NULL, 'Blood', 'percentage', 15, 1, 'grouped', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-20 13:10:29', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 2000, 2000, 'not allowed', 'INR'),
(NULL, '2001', 3, 'PCV', 700, 600, 10, '20001', '2022', '%', '34', '45', '', 'Blood', 'percentage', 15, 1, 'grouped', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-11 06:03:50', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 2000, 2000, '', 'PCV'),
(NULL, '2002', 3, 'PTTK/APTT', 2500, 2500, 10, '20001', '2022', '', '', '', '', 'Blood', 'percentage', 15, 1, 'grouped', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-11 06:03:50', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 2000, 2000, '', 'PTTK/APTT'),
(NULL, '20021', 3, 'Control(PTT)', 834, 0, 1, '20001', '2002', 'secs', '', '', NULL, 'Blood', 'percentage', 15, 1, 'grouped', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-20 13:10:29', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 2000, 2000, 'not allowed', 'PTTK/APTT'),
(NULL, '20022', 3, 'Sample(PTT)', 833, 0, 2, '20001', '2002', 'secs', '', '', NULL, 'Blood', 'percentage', 15, 1, 'grouped', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-20 13:10:29', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 2000, 2000, 'not allowed', 'PTTK/APTT'),
(NULL, '20023', 3, 'Ratio(PTT)', 833, 0, 3, '20001', '2002', NULL, '', '', NULL, 'Blood', 'percentage', 15, 1, 'grouped', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-20 13:10:29', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 2000, 2000, 'not allowed', 'PTTK/APTT'),
(NULL, '2003', 3, 'Prothrombin time', 2500, 2500, 10, '20001', '2022', '', '', '', '', 'Blood', 'percentage', 15, 1, 'grouped', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-11 06:03:50', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 2000, 2000, '', 'Prothrombin time'),
(NULL, '20031', 3, 'Control(PT)', 834, 0, 1, '20001', '2003', 'secs', '', '', NULL, 'Blood', 'percentage', 15, 1, 'grouped', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-20 13:10:29', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 2000, 2000, 'not allowed', 'Prothrombin time'),
(NULL, '20032', 3, 'Sample(PT)', 833, 0, 2, '20001', '2003', '', '', '', NULL, 'Blood', 'percentage', 15, 1, 'grouped', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-20 13:10:29', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 2000, 2000, 'not allowed', 'Prothrombin time'),
(NULL, '20033', 3, 'INR(PT)', 833, 0, 3, '20001', '2003', 'secs', '', '', NULL, 'Blood', 'percentage', 15, 1, 'grouped', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-20 13:10:29', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 2000, 2000, 'not allowed', 'Prothrombin time'),
(NULL, '2004', 3, 'Reticulocyte', 7000, 7000, 10, '20001', '2022', '', '', '', '', 'Blood', 'percentage', 15, 1, 'grouped', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-11 06:03:50', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 2000, 2000, '', 'Reticulocyte'),
(NULL, '2005', 3, 'Thrombin Time', 1000, 1000, 10, '20001', '2022', '', '', '', '', 'Blood', 'percentage', 15, 1, 'grouped', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-11 06:03:50', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 2000, 2000, '', 'Thrombin Time'),
(NULL, '2006', 3, 'VITAMIN B12', 8000, 8000, 10, '20001', '2022', '', '', '', '', 'Blood', 'percentage', 15, 1, 'grouped', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-11 06:03:50', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 2000, 2000, '', 'VITAMIN B12'),
(NULL, '2007', 3, 'Blood group & RH', 1000, 800, 10, '20001', '2022', '', '', '', '', 'Blood', 'percentage', 15, 1, 'grouped', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-11 06:03:50', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 2000, 2000, '', 'Blood group & RH'),
(NULL, '2008', 3, 'Direct Coombs Test', 1000, 1000, 10, '20001', '2022', '', '', '', '', 'Blood', 'percentage', 15, 1, 'grouped', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-11 06:03:50', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 2000, 2000, '', 'Direct Coombs Test'),
(NULL, '2009', 3, 'ESR', 1200, 1000, 10, '20001', '2022', '', '', '', '', 'Blood', 'percentage', 15, 1, 'single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-06-01 13:19:23', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 2000, 2000, '', 'ESR'),
(NULL, '2010', 3, 'FOLATE', 8000, 8000, 10, '20001', '2022', '', '', '', '', 'Blood', 'percentage', 15, 1, 'grouped', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-11 06:03:50', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 0, 2000, '', 'FOLATE'),
(NULL, '2013', 3, 'Haemoglobin Hb', 600, 600, 10, '20001', '2022', 'g/dL', '13', '15.5', '', 'Blood', 'percentage', 15, 1, 'grouped', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-11 06:03:50', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 0, 2000, '', 'Haemoglobin Hb'),
(NULL, '2014', 3, 'Indirect Coombs Test', 1500, 1500, 10, '20001', '2022', '', '', '', '', 'Blood', 'percentage', 15, 1, 'grouped', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-11 06:03:50', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 0, 2000, '', 'Indirect Coombs Test'),
(NULL, '2015', 3, 'Fine Niddle Aspiration', 5000, 5000, 10, '20001', '2022', '', '', '', '', 'Blood', 'percentage', 15, 1, 'grouped', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-11 06:03:50', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 0, 2000, '', 'Fine Niddle Aspiration'),
(NULL, '2019', 3, 'Clothing Profile', 5000, 5000, 3, '20001', '2022', '', '', '', NULL, 'Blood', 'percentage', 15, 1, 'grouped', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-11 06:03:50', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 0, 2000, '', 'Clothing Profile'),
(NULL, '20191', 3, 'Control (PTT)', 833, 0, 0, '20001', '2019', 'secs', '', '', NULL, 'Blood', '', 0, 1, 'grouped', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-20 13:10:29', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 0, 2000, 'not allowed', 'Clothing Profile'),
(NULL, '20192', 3, 'Sample (PTT)', 833, 0, 0, '20001', '2019', 'secs', '', '', NULL, 'Blood', '', 0, 1, 'grouped', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-20 13:10:29', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 0, 2000, 'not allowed', 'Clothing Profile'),
(NULL, '20193', 3, 'Ratio (PTT)', 833, 0, 0, '20001', '2019', '', '', '', NULL, 'Blood', '', 0, 1, 'grouped', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-20 13:10:29', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 0, 2000, 'not allowed', 'Clothing Profile'),
(NULL, '20194', 3, 'Control (PT)', 833, 0, 0, '20001', '2019', 'secs', '', '', NULL, 'Blood', '', 0, 1, 'grouped', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-20 13:10:29', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 0, 2000, 'not allowed', 'Clothing Profile'),
(NULL, '20195', 3, 'Sample (PT)', 833, 0, 4, '20001', '2019', 'secs', '', '', NULL, 'Blood', 'percentage', 15, 1, 'grouped', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-20 13:10:29', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 0, 2000, 'not allowed', 'Clothing Profile'),
(NULL, '20196', 3, 'INR (PT)', 834, 0, 5, '20001', '2019', '', '', '', NULL, 'Blood', 'percentage', 15, 1, 'grouped', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-20 13:10:29', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 0, 2000, 'not allowed', 'Clothing Profile'),
(NULL, '2020', 3, 'HPLC Test', 8000, 6500, 2, '20001', '2022', '', '', '', NULL, 'Blood', 'percentage', 15, 2, 'grouped', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-11 06:03:50', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 0, 2000, '', 'HPLC Test'),
(NULL, '20201', 3, 'HbC(hplc)', 650, 0, 1, '20001', '2020', '%', '', '', NULL, 'Blood', '', 0, 1, 'grouped', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-20 13:10:29', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 0, 2000, 'not allowed', 'HPLC Test'),
(NULL, '202010', 3, 'P3(hplc)', 650, 0, 8, '20001', '2020', '%', '', '', NULL, 'Blood', '', 0, 1, 'grouped', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-20 13:10:29', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 0, 2000, 'not allowed', 'HPLC Test'),
(NULL, '20202', 3, 'LA1c/CHb-1(hplc)', 650, 0, 9, '20001', '2020', '%', '', '', NULL, 'Blood', '', 0, 1, 'grouped', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-20 13:10:29', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 0, 2000, 'not allowed', 'HPLC Test'),
(NULL, '20203', 3, 'HbS(hplc)', 650, 0, 10, '20001', '2020', '%', '', '', NULL, 'Blood', '', 0, 1, 'grouped', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-20 13:10:29', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 0, 2000, 'not allowed', 'HPLC Test'),
(NULL, '20204', 3, 'A1a(hplc)', 650, 0, 2, '20001', '2020', '%', '', '', NULL, 'Blood', '', 0, 1, 'grouped', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-20 13:10:29', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 0, 2000, 'not allowed', 'HPLC Test'),
(NULL, '20205', 3, 'A1b(hplc)', 650, 0, 3, '20001', '2020', '%', '', '', NULL, 'Blood', '', 0, 1, 'grouped', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-20 13:10:29', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 0, 2000, 'not allowed', 'HPLC Test'),
(NULL, '20206', 3, 'A1c(hplc)', 650, 0, 4, '20001', '2020', '%', '', '', NULL, 'Blood', '', 0, 1, 'grouped', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-20 13:10:29', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 0, 2000, 'not allowed', 'HPLC Test'),
(NULL, '20207', 3, 'A0(hplc)', 650, 0, 5, '20001', '2020', '%', '', '', NULL, 'Blood', '', 0, 1, 'grouped', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-20 13:10:29', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 0, 2000, 'not allowed', 'HPLC Test'),
(NULL, '20208', 3, 'A2(hplc)', 650, 0, 6, '20001', '2020', '%', '', '', NULL, 'Blood', '', 0, 1, 'grouped', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-20 13:10:29', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 0, 2000, 'not allowed', 'HPLC Test'),
(NULL, '20209', 3, 'F(hplc)', 650, 0, 7, '20001', '2020', '%', '', '', NULL, 'Blood', '', 0, 1, 'grouped', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-20 13:10:29', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 0, 2000, 'not allowed', 'HPLC Test'),
(NULL, '2021', 3, 'Full Blood Count', 2200, 2000, 1, '20001', '2022', '', '', '', NULL, 'Blood', 'percentage', 15, 1, 'grouped_single', 'table', 'singular_group', 'no', 'no', 'yes', NULL, '2021-06-01 13:16:24', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 0, 2000, '', 'Full Blood Count'),
(NULL, '20211', 3, 'WBC', 0, 0, 1, '20001', '2021', '0.02x10^9/L', '4.00', '10.00', NULL, 'Blood', 'percentage', 15, 1, 'grouped_single', 'table', 'singular_group', 'no', 'no', 'yes', NULL, '2021-05-31 09:40:47', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 0, 2000, 'not allowed', 'Full Blood Count'),
(NULL, '202110', 3, 'HCT', 0, 0, 10, '20001', '2021', '0.1 %', '35', '50', NULL, 'Blood', 'percentage', 15, 1, 'grouped_single', 'table', 'singular_group', 'no', 'no', 'yes', NULL, '2021-05-31 09:41:00', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 0, 2000, 'not allowed', 'Full Blood Count'),
(NULL, '202111', 3, 'MCV', 0, 0, 11, '20001', '2021', 'fL', '80', '99', NULL, 'Blood', 'percentage', 15, 1, 'grouped_single', 'table', 'singular_group', 'no', 'no', 'yes', NULL, '2021-05-31 09:41:06', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 0, 2000, 'not allowed', 'Full Blood Count'),
(NULL, '202112', 3, 'MCH', 0, 0, 12, '20001', '2021', 'pg', '26.5', '33.5', NULL, 'Blood', 'percentage', 15, 1, 'grouped_single', 'table', 'singular_group', 'no', 'no', 'yes', NULL, '2021-05-31 09:41:15', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 0, 2000, 'not allowed', 'Full Blood Count'),
(NULL, '202113', 3, 'MCHC', 0, 0, 13, '20001', '2021', 'g/L', '320', '360', NULL, 'Blood', 'percentage', 15, 1, 'grouped_single', 'table', 'singular_group', 'no', 'no', 'yes', NULL, '2021-05-31 09:41:20', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 0, 2000, 'not allowed', 'Full Blood Count'),
(NULL, '202114', 3, 'RDW-SD', 0, 0, 14, '20001', '2021', 'fL', '35.0', '56.0', NULL, 'Blood', 'percentage', 15, 1, 'grouped_single', 'table', 'singular_group', 'no', 'no', 'yes', NULL, '2021-05-31 09:41:25', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 0, 2000, 'not allowed', 'Full Blood Count'),
(NULL, '202115', 3, 'RDW-CV', 0, 0, 15, '20001', '2021', '%', '10.0', '15.0', NULL, 'Blood', 'percentage', 15, 1, 'grouped_single', 'table', 'singular_group', 'no', 'no', 'yes', NULL, '2021-05-31 09:41:29', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 0, 2000, 'not allowed', 'Full Blood Count'),
(NULL, '202116', 3, 'PLT', 0, 0, 16, '20001', '2021', '8x10^9/L', '100', '300', NULL, 'Blood', 'percentage', 15, 1, 'grouped_single', 'table', 'singular_group', 'no', 'no', 'yes', NULL, '2021-05-31 09:41:34', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 0, 2000, 'not allowed', 'Full Blood Count'),
(NULL, '202117', 3, 'MPV', 0, 0, 17, '20001', '2021', 'fL', '7', '11', NULL, 'Blood', 'percentage', 15, 1, 'grouped_single', 'table', 'singular_group', 'no', 'no', 'yes', NULL, '2021-05-31 09:41:39', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 0, 2000, 'not allowed', 'Full Blood Count'),
(NULL, '202118', 3, 'PDW', 2200, 2200, 18, '20001', '2021', '%', '10', '18', NULL, 'Blood', 'percentage', 15, 1, 'grouped_single', 'table', 'singular_group', 'no', 'no', 'yes', NULL, '2021-05-31 09:41:48', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 0, 2000, 'not allowed', 'Full Blood Count'),
(NULL, '202119', 3, 'PCT', 0, 0, 19, '20001', '2021', '%', '0.100', '0.500', NULL, 'Blood', 'percentage', 15, 1, 'grouped_single', 'table', 'singular_group', 'no', 'no', 'yes', NULL, '2021-05-31 09:41:53', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 0, 2000, 'not allowed', 'Full Blood Count'),
(NULL, '20212', 3, 'LYM#', 0, 0, 2, '20001', '2021', '10^9/L', '0.60', '4.10', NULL, 'Blood', 'percentage', 15, 1, 'grouped_single', 'table', 'singular_group', 'no', 'no', 'yes', NULL, '2021-05-31 09:41:57', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 0, 2000, 'not allowed', 'Full Blood Count'),
(NULL, '202120', 3, 'P-LCR', 0, 0, 20, '20001', '2021', '%', '13', '43', NULL, 'Blood', 'percentage', 15, 1, 'grouped_single', 'table', 'singular_group', 'no', 'no', 'yes', NULL, '2021-05-31 09:42:01', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 0, 2000, 'not allowed', 'Full Blood Count'),
(NULL, '20213', 3, 'MID#', 0, 0, 3, '20001', '2021', '10^9/L', '0.10', '0.90', NULL, 'Blood', 'percentage', 15, 1, 'grouped_single', 'table', 'singular_group', 'no', 'no', 'yes', NULL, '2021-05-31 09:42:06', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 0, 2000, 'not allowed', 'Full Blood Count'),
(NULL, '20214', 3, 'GRA#', 0, 0, 4, '20001', '2021', '10^9/L', '2.00', '7.80', NULL, 'Blood', 'percentage', 15, 1, 'grouped_single', 'table', 'singular_group', 'no', 'no', 'yes', NULL, '2021-05-31 09:42:14', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 0, 2000, 'not allowed', 'Full Blood Count'),
(NULL, '20215', 3, 'LYM%', 0, 0, 5, '20001', '2021', '%', '20.0', '50.0', NULL, 'Blood', 'percentage', 15, 1, 'grouped_single', 'table', 'singular_group', 'no', 'no', 'yes', NULL, '2021-05-31 09:42:18', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 0, 2000, 'not allowed', 'Full Blood Count'),
(NULL, '20216', 3, 'MID%', 0, 0, 6, '20001', '2021', '%', '3.0', '10', NULL, 'Blood', 'percentage', 15, 1, 'grouped_single', 'table', 'singular_group', 'no', 'no', 'yes', NULL, '2021-05-31 09:42:26', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 0, 2000, 'not allowed', 'Full Blood Count'),
(NULL, '20217', 3, 'GRA%', 0, 0, 7, '20001', '2021', '%', '40', '70', NULL, 'Blood', 'percentage', 15, 1, 'grouped_single', 'table', 'singular_group', 'no', 'no', 'yes', NULL, '2021-05-31 09:42:31', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 0, 2000, 'not allowed', 'Full Blood Count'),
(NULL, '20218', 3, 'RBC', 0, 0, 8, '20001', '2021', '0.02 10^12/L', '3.8', '5.8', NULL, 'Blood', 'percentage', 15, 1, 'grouped_single', 'table', 'singular_group', 'no', 'no', 'yes', NULL, '2021-05-31 09:42:36', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 0, 2000, 'not allowed', 'Full Blood Count'),
(NULL, '20219', 3, 'HGB', 0, 0, 9, '20001', '2021', '0.0 g/dL', '11', '16.5', NULL, 'Blood', 'percentage', 15, 1, 'grouped_single', 'table', 'singular_group', 'no', 'no', 'yes', NULL, '2021-05-31 09:42:40', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 0, 2000, 'not allowed', 'Full Blood Count'),
(NULL, '2022', 3, 'Others', 0, 0, 1, '20001', '2000', NULL, NULL, NULL, NULL, '', '', 0, 1, 'grouped', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-20 13:10:29', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 2000, 2000, 'not allowed', 'Others'),
(NULL, '3000', 3, 'Chemical Pathology', 0, 0, 0, NULL, '1000', '', '', '', '', 'No specimen', '', 0, 1, 'grouped', NULL, NULL, 'no', 'yes', NULL, NULL, '2021-05-20 13:10:29', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 3000, 0, 'not allowed', 'Chemical Pathology'),
(NULL, '30001', 3, '2H PP', 800, 600, 10, '20002', '300102', 'mmol/L', '3.5', '7.7', '', 'Blood', 'percentage', 15, 1, 'single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-15 08:43:50', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 3000, 3000, '', '2H PP'),
(NULL, '30002', 3, '6 POINT GLUCOSE ', 3500, 3500, 10, '20002', '300102', '', '', '', '', 'Blood', 'percentage', 15, 1, 'grouped', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-15 08:43:50', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 3000, 3000, '', '6 POINT GLUCOSE '),
(NULL, '30005', 3, 'ASCITIC FLUID CHEMISTRY', 2000, 2000, 10, '20002', '300102', '', '7', '45', '', 'Ascitic Fluid', 'percentage', 15, 1, 'grouped', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-26 10:54:50', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 3000, 3000, '', 'ASCITIC FLUID CHEMISTRY'),
(NULL, '30006', 3, 'ASCITIC FLUID LDH', 1500, 1500, 10, '20002', '300102', 'U/I', '200', '400', '', 'Ascitic Fluid', 'percentage', 15, 1, 'grouped', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-26 10:54:56', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 3000, 3000, '', 'ASCITIC FLUID LDH'),
(NULL, '30007', 3, 'ASCITIC FLUID PROTEIN', 1000, 1000, 10, '20002', '300102', '', '7', '45', '', 'Ascitic Fluid', 'percentage', 15, 1, 'grouped', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-26 10:55:00', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 3000, 3000, '', 'ASCITIC FLUID PROTEIN'),
(NULL, '30009', 3, 'Acid Phosphatase', 2000, 2000, 10, '20002', '300102', '', '', '', '', 'No specimen', 'percentage', 15, 1, 'grouped', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-15 08:43:50', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 3000, 3000, '', 'Acid Phosphatase'),
(NULL, '300100', 3, 'Hormones', 0, 0, 1, '20002', '3000', '', '', '', '', 'Urine', 'percentage', 15, 1, 'grouped', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-20 13:10:29', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 3000, 3000, 'not allowed', 'Hormones'),
(NULL, '3001001', 3, 'Oestrogen', 5000, 5500, 0, '20002', '300100', 'pg/ml', '', '', '', 'Urine', 'percentage', 15, 1, 'grouped', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-20 13:10:29', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 3000, 3000, '', 'Oestrogen'),
(NULL, '30010010', 3, 'Prolactin', 5500, 6000, 0, '20002', '300100', 'mu/L', '72', '511', '', 'Urine', 'percentage', 15, 1, 'grouped', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-20 13:10:29', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 3000, 3000, '', 'Prolactin'),
(NULL, '30010011', 3, 'Testosterone', 5500, 5000, 0, '20002', '300100', 'ng/ml', '', '', '', 'Urine', 'percentage', 15, 1, 'grouped', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-20 13:10:29', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 3000, 3000, '', 'Testosterone'),
(NULL, '30010012', 3, 'T3', 2700, 6000, 0, '20002', '300100', 'nmol/L', '1.3', '3.1', '', 'Blood', 'percentage', 15, 1, 'grouped', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-06-01 13:10:59', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 3000, 3000, '', 'T3'),
(NULL, '30010013', 3, 'T4', 2700, 6500, 0, '20002', '300100', 'nmol/L', '66', '181', '', 'Urine', 'percentage', 15, 1, 'grouped', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-20 13:10:29', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 3000, 3000, '', 'T4'),
(NULL, '30010014', 3, 'TSH', 2700, 5000, 0, '20002', '300100', 'mu/L', '0.3', '4.2', '', 'Urine', 'percentage', 15, 1, 'grouped', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-20 13:10:29', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 3000, 3000, '', 'TSH'),
('', '30010015', 3, 'HbA1c (STRIP)', 3500, 0, 14, '20002', '300100', '', '', '', NULL, 'Urine', '', 15, 1, 'single', 'table', NULL, 'no', NULL, NULL, NULL, '2021-05-20 13:10:29', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 3000, 3000, '', 'HbA1c (STRIP)'),
('', '30010016', 3, 'CRP', 6000, 0, 15, '20002', '300100', '', '', '', NULL, 'Urine', '', 15, 1, 'grouped', 'table', NULL, 'no', NULL, NULL, NULL, '2021-05-20 13:10:29', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 3000, 3000, '', 'CRP'),
('', '30010017', 3, 'SERUM FERRITIN', 7000, 0, 16, '20002', '300100', '', '', '', NULL, 'Blood', '', 15, 1, 'grouped', 'table', NULL, 'no', NULL, NULL, NULL, '2021-05-20 13:10:29', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 3000, 3000, '', 'SERUM FERRITIN'),
(NULL, '3001002', 3, 'Troponin-I', 6500, 5000, 0, '20002', '300100', 'lng/L', '', '', '', 'Urine', 'percentage', 15, 1, 'grouped', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-20 13:10:29', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 3000, 3000, '', 'Troponin-I'),
(NULL, '3001003', 3, 'RHEUMATOID FACTOR', 6500, 2500, 0, '20002', '300100', '', '', '', '', 'Urine', 'percentage', 15, 1, 'grouped', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-20 13:10:29', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 3000, 3000, '', 'RHEUMATOID FACTOR'),
(NULL, '3001004', 3, 'Progesterone', 5500, 2500, 0, '20002', '300100', 'ng/I', '', '', '', 'Urine', 'percentage', 15, 1, 'grouped', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-20 13:10:29', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 3000, 3000, '', 'Progesterone'),
(NULL, '3001005', 3, 'D - DIMER', 6000, 2500, 0, '20002', '300100', '', '', '', '', 'Blood', 'percentage', 15, 1, 'grouped', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-26 10:50:27', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 3000, 3000, '', 'D - DIMER'),
(NULL, '3001006', 3, 'Cortisol', 7000, 5000, 0, '20002', '300100', '', '', '', '', 'Urine', 'percentage', 15, 1, 'grouped', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-20 13:10:29', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 3000, 3000, '', 'Cortisol'),
(NULL, '3001007', 3, 'C - REACTIVE PROTEIN (CRP)', 6000, 6500, 0, '20002', '300100', '', '', '', '', 'Urine', 'percentage', 15, 1, 'grouped', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-20 13:10:29', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 3000, 3000, '', 'C - REACTIVE PROTEIN (CRP)'),
(NULL, '3001008', 3, 'HbA1c', 6500, 6500, 0, '20002', '300100', '', '', '', '', 'Urine', 'percentage', 15, 1, 'single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-20 13:10:29', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 3000, 3000, '', 'HbA1c'),
(NULL, '3001009', 3, 'ESTRADIOL', 7500, 5500, 0, '20002', '300100', '', '', '', '', 'Urine', 'percentage', 15, 1, 'grouped', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-20 13:10:29', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 3000, 3000, '', 'ESTRADIOL'),
(NULL, '300101', 3, 'Serum Proteins', 0, 0, 8, '20002', '300102', '', '', '', NULL, 'Blood', 'percentage', 15, 1, 'single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-11 05:59:27', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 3000, 3000, '', 'Serum Proteins'),
(NULL, '3001011', 3, 'T.Protein', 1000, 1000, 0, '20002', '300101', 'g/L', '59', '86', NULL, 'Blood', 'percentage', 15, 1, 'single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-20 13:10:29', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 3000, 3000, 'not allowed', 'Serum Proteins'),
(NULL, '3001013', 3, 'Globulin.', 600, 600, 0, '20002', '300101', 'g/L', '20', '43', NULL, 'Blood', 'percentage', 15, 1, 'single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-20 13:10:29', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 3000, 3000, 'not allowed', 'Serum Proteins'),
(NULL, '300102', 3, 'Others', 0, 0, 3, NULL, '3000', NULL, NULL, NULL, NULL, '', 'percentage', 15, 1, 'single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-20 13:10:29', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 3000, 3000, 'not allowed', 'Others'),
('', '30010280', 3, 'CONPRHENSIVE GPR ESTIMATION', 20000, 0, 79, '20002', '300102', '', '', '', NULL, 'Blood', '', 15, 1, 'single', 'table', NULL, 'no', NULL, NULL, NULL, '2021-05-15 08:43:50', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 3000, 3000, '', 'CONPRHENSIVE GPR ESTIMATION'),
('', '300103', 3, '24 HR VMA/HMMAESTIMATION', 35000, 0, 10, '20002', '300102', NULL, NULL, NULL, NULL, 'Blood', 'percentage', 15, 1, 'single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-11 05:59:27', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 3000, 3000, '', '24 HR VMA/HMMAESTIMATION'),
(NULL, '30011', 3, 'Albumin Creatinine Ratio (ACR)', 5000, 5000, 10, '20002', '300102', '', '32', '51', '', 'Blood', 'percentage', 15, 1, 'single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-11 05:59:27', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 3000, 3000, '', 'Albumin Creatinine Ratio (ACR)'),
(NULL, '30012', 3, 'BONE CHEMISTRY', 1500, 1200, 10, '20002', '300102', '', '', '', '', 'Blood', 'percentage', 15, 1, 'single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-11 05:59:27', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 3000, 3000, '', 'BONE CHEMISTRY'),
(NULL, '30015', 3, 'CA - 15 - 3', 8000, 10000, 10, '20002', '300102', '', '', '', '', 'Urine', 'percentage', 15, 1, 'single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-11 05:59:27', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 3000, 3000, '', 'CA - 15 - 3'),
(NULL, '30016', 3, 'CA 125', 8000, 7000, 10, '20002', '300102', '', '', '', '', 'Blood', 'percentage', 15, 1, 'grouped', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-20 09:49:28', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 3000, 3000, '', 'CA 125'),
(NULL, '30017', 3, 'CA 19.9', 8000, 7000, 10, '20002', '300102', '', '', '', '', 'Blood', 'percentage', 15, 1, 'single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-11 05:59:27', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 3000, 3000, '', 'CA 19.9'),
(NULL, '30018', 3, 'C - REACTIVE PROTEIN (CRP)', 6000, 6000, 10, '20002', '300102', '', '', '', '', 'Blood', 'percentage', 15, 1, 'single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-11 05:59:27', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 3000, 3000, '', 'C - REACTIVE PROTEIN (CRP)'),
(NULL, '30019', 3, 'CD4 Count', 7000, 7000, 10, '20002', '300102', '', '', '', '', 'Urine', 'percentage', 15, 1, 'single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-11 05:59:27', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 3000, 3000, '', 'CD4 Count'),
(NULL, '30020', 3, 'CEA', 7000, 7000, 10, '20002', '300102', '', '', '', '', 'Urine', 'percentage', 15, 1, 'single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-11 05:59:27', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 3000, 3000, '', 'CEA'),
(NULL, '30021', 3, 'CK MB', 2500, 2500, 10, '20002', '300102', '', '', '', '', 'Blood', 'percentage', 15, 1, 'single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-11 05:59:27', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 3000, 3000, '', 'CK MB'),
(NULL, '30023', 3, 'CREATIVE KINASE', 5000, 5000, 10, '20002', '300102', '', '', '', '', 'Urine', 'percentage', 15, 1, 'single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-11 05:59:27', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 3000, 3000, '', 'CREATIVE KINASE'),
(NULL, '30024', 3, 'CSF (Albumin & Glucose)', 1500, 1500, 10, '20002', '300102', '', '', '', '', 'CSF', 'percentage', 15, 1, 'single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-26 11:02:19', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 3000, 3000, '', 'CSF (Albumin & Glucose)'),
(NULL, '30025', 3, 'CSF BIOCHEMISTRY', 1500, 1500, 10, '20002', '300102', '', '', '', '', 'CSF', 'percentage', 15, 1, 'single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-26 11:02:41', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 3000, 3000, '', 'CSF BIOCHEMISTRY'),
(NULL, '30026', 3, 'CSF Culture', 3000, 3000, 10, '20002', '300102', '', '', '', '', 'Urine', 'percentage', 15, 1, 'single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-11 05:59:27', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 3000, 3000, '', 'CSF Culture'),
(NULL, '30027', 3, 'Calcium', 800, 600, 10, '20002', '300102', 'mmol/L', '2.15', '2.55', '', 'Blood', 'percentage', 15, 1, 'single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-11 05:59:27', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 3000, 3000, '', 'Calcium'),
(NULL, '30029', 3, 'Cortisol', 7000, 5000, 10, '20002', '300102', '', '', '', '', 'Urine', 'percentage', 15, 1, 'single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-11 05:59:27', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 3000, 3000, '', 'Cortisol'),
(NULL, '30031', 3, 'Creatinine Clearance', 3000, 3000, 10, '20002', '300102', 'mmol/L', '55', '110', '', 'Blood', 'percentage', 15, 1, 'single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-11 05:59:27', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 3000, 3000, '', 'Creatinine Clearance'),
(NULL, '30032', 3, 'D - DIMER', 6000, 6000, 10, '20002', '300102', '', '', '', '', 'Blood', 'percentage', 15, 1, 'single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-11 05:59:27', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 3000, 3000, '', 'D - DIMER'),
(NULL, '30033', 3, 'DEXAMETHASONE SUPPRESSION TEST', 25000, 25000, 10, '20002', '300102', '', '', '', '', 'Urine', 'percentage', 15, 1, 'single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-11 05:59:27', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 3000, 3000, '', 'DEXAMETHASONE SUPPRESSION TEST'),
(NULL, '30034', 3, 'ESTRADIOL', 7500, 5000, 10, '20002', '300102', '', '', '', '', 'No specimen', 'percentage', 15, 1, 'single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-11 05:59:27', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 3000, 3000, '', 'ESTRADIOL'),
(NULL, '30035', 3, 'FPG/FBS', 600, 600, 10, '20002', '300102', 'mmol/L', '3', '5.8', '', 'Blood', 'percentage', 15, 1, 'single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-20 09:49:50', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 3000, 3000, '', 'FPG/FBS'),
(NULL, '30036', 3, 'FSH', 5500, 5000, 10, '20002', '300102', '', '', '', '', 'Blood', 'percentage', 15, 1, 'single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-11 05:59:27', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 3000, 3000, '', 'FSH'),
(NULL, '30037', 3, 'GFR (Glomerula Filtration Rate)', 5000, 5000, 10, '20002', '300102', '', '', '', '', 'Urine', 'percentage', 15, 1, 'single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-11 05:59:27', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 3000, 3000, '', 'GFR (Glomerula Filtration Rate)'),
(NULL, '30038', 3, 'GH - GLUCOSE SEPERATION TEST', 30000, 30000, 10, '20002', '300102', '', '', '', '', 'Urine', 'percentage', 15, 1, 'single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-11 05:59:27', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 3000, 3000, '', 'GH - GLUCOSE SEPERATION TEST'),
(NULL, '30039', 3, 'GROWTH HORMONE', 5000, 5000, 10, '20002', '300102', '', '', '', '', 'Urine', 'percentage', 15, 1, 'single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-11 05:59:27', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 3000, 3000, '', 'GROWTH HORMONE'),
(NULL, '30040', 3, 'Gamma GT', 3500, 3500, 10, '20002', '300102', 'U/I', '7', '45', '', 'Urine', 'percentage', 15, 1, 'single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-11 05:59:27', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 3000, 3000, '', 'Gamma GT'),
(NULL, '30041', 3, 'Globulin.', 600, 600, 10, '20002', '300102', 'g/L', '20', '45', '', 'Blood', 'percentage', 15, 1, 'single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-11 05:59:27', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 3000, 3000, '', 'Globulin.'),
(NULL, '30042', 3, 'Glucose (CSF)', 600, 600, 10, '20002', '300102', '', '', '', '', 'Blood', 'percentage', 15, 1, 'single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-11 05:59:27', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 3000, 3000, '', 'Glucose (CSF)'),
(NULL, '30043', 3, 'HCG', 6000, 6000, 10, '20002', '300102', '', '', '', '', 'Blood', 'percentage', 15, 1, 'single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-11 05:59:27', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 3000, 3000, '', 'HCG'),
(NULL, '30046', 3, 'Hb A1 c (STRIP)', 3500, 3500, 10, '20002', '300102', '', '', '', '', 'Blood', 'percentage', 15, 1, 'single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-11 05:59:27', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 3000, 3000, '', 'Hb A1 c (STRIP)'),
(NULL, '30047', 3, 'INSULIN', 6000, 6000, 10, '20002', '300102', '', '', '', '', 'Urine', 'percentage', 15, 1, 'single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-11 05:59:27', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 3000, 3000, '', 'INSULIN'),
(NULL, '30048', 3, 'Inorganic Phosphorus', 700, 600, 10, '20002', '300102', 'mmol/L', '0.94', '1.71', '', 'Blood', 'percentage', 15, 1, 'single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-11 05:59:27', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 3000, 3000, '', 'Inorganic Phosphorus'),
(NULL, '30050', 3, 'KARYOTYPING', 70000, 70000, 10, '20002', '300102', '', '', '', '', 'No specimen', 'percentage', 15, 1, 'single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-11 05:59:27', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 3000, 3000, '', 'KARYOTYPING'),
(NULL, '30051', 3, 'LDH', 1500, 1500, 10, '20002', '300102', '', '', '', '', 'Blood', 'percentage', 15, 1, 'single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-11 05:59:27', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 3000, 3000, '', 'LDH'),
(NULL, '30053', 3, 'LH', 5500, 5500, 10, '20002', '300102', '', '', '', '', 'Urine', 'percentage', 15, 1, 'single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-11 05:59:27', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 3000, 3000, '', 'LH'),
(NULL, '30054', 3, 'LIPASE', 5000, 5000, 10, '20002', '300102', '', '', '', '', 'Blood', 'percentage', 15, 1, 'single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-11 05:59:27', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 3000, 3000, '', 'LIPASE'),
(NULL, '30057', 3, 'MICROALBUMINURIA', 4000, 4000, 10, '20002', '300102', '', '', '', '', 'Urine', 'percentage', 15, 1, 'single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-11 05:59:27', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 3000, 3000, '', 'MICROALBUMINURIA'),
(NULL, '30058', 3, 'Magnesium (Mg2+)', 1600, 1600, 10, '20002', '300102', 'mmol/L', '0.7', '1.2', '', 'Blood', 'percentage', 15, 1, 'single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-11 05:59:27', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 3000, 3000, '', 'Magnesium (Mg2+)'),
(NULL, '30059', 3, 'Myoglobin', 5500, 2500, 10, '20002', '300102', '', '', '', '', 'Urine', 'percentage', 15, 1, 'single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-11 05:59:27', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 3000, 3000, '', 'Myoglobin'),
(NULL, '30061', 3, 'OGTT', 3500, 3500, 0, '20002', '300102', '', '', '', '', 'Blood', 'percentage', 15, 4, 'single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-11 05:59:27', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 3000, 3000, '', 'OGTT'),
(NULL, '300612', 0, '1Hr PP (OGTT)', 0, 0, 1, NULL, '30061', 'mmol / l', '4', '10.5', NULL, 'Blood', '', 15, 1, 'single', NULL, NULL, 'no', NULL, NULL, NULL, '2021-06-25 11:30:09', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 3000, 3000, 'not allowed', 'OGTT'),
(NULL, '300613', 0, '2H PP', 800, 0, 2, NULL, '30061', 'mmol / l', '3.5', '7.7', NULL, 'Blood', '', 15, 1, 'single', NULL, NULL, 'no', NULL, NULL, NULL, '2021-06-25 11:30:09', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 3000, 3000, 'not allowed', 'OGTT'),
(NULL, '300614', 0, '3Hr PP (OGTT)', 0, 0, 3, NULL, '30061', 'mmol / l', '3.8', '6', NULL, 'Blood', '', 15, 1, 'single', NULL, NULL, 'no', NULL, NULL, NULL, '2021-06-25 11:30:09', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 3000, 3000, 'not allowed', 'OGTT'),
(NULL, '30063', 3, 'PERICARDIAL FLUID (GLUCOSE & PROTEIN)', 2000, 2000, 10, '20002', '300102', '', '', '', '', 'No specimen', 'percentage', 15, 1, 'single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-11 05:59:27', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 3000, 3000, '', 'PERICARDIAL FLUID (GLUCOSE & PROTEIN)'),
(NULL, '30064', 3, 'PLEURAL FLUID CHEMISTRY (GLUCOSE, PROTEIN, LDH)', 3500, 3500, 10, '20002', '300102', '', '', '', '', 'Urine', 'percentage', 15, 1, 'single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-11 05:59:27', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 3000, 3000, '', 'PLEURAL FLUID CHEMISTRY (GLUCOSE, PROTEIN, LDH)'),
(NULL, '30065', 3, 'PROTEIN ESTIMATION', 2500, 2500, 10, '20002', '300102', '', '', '', '', 'Urine', 'percentage', 15, 1, 'single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-11 05:59:27', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 3000, 3000, '', 'PROTEIN ESTIMATION'),
(NULL, '30066', 3, 'PSA', 5500, 5500, 10, '20002', '300102', '', '', '', '', 'Blood', 'percentage', 15, 1, 'single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-11 05:59:27', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 3000, 3000, '', 'PSA'),
(NULL, '30067', 3, 'Pregnancy Test (BHCG Qualitative)', 700, 600, 10, '20002', '300102', '', '', '', '', 'Blood', 'percentage', 15, 1, 'single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-11 05:59:27', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 3000, 3000, '', 'Pregnancy Test (BHCG Qualitative)'),
(NULL, '30070', 3, 'Protein (CSF)', 1000, 1000, 10, '20002', '300102', '', '', '', '', 'CSF', 'percentage', 15, 1, 'single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-26 11:05:54', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 3000, 3000, '', 'Protein (CSF)'),
(NULL, '30071', 3, 'RHEUMATOID FACTOR', 6500, 6500, 10, '20002', '300102', '', '', '', '', 'Blood', 'percentage', 15, 1, 'single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-11 05:59:27', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 3000, 3000, '', 'RHEUMATOID FACTOR'),
(NULL, '30072', 3, 'RPG/RBS', 800, 600, 10, '20002', '300102', 'mmol/L', '3.2', '7.7', '', 'Blood', 'percentage', 15, 1, 'single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-11 05:59:27', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 3000, 3000, '', 'RPG/RBS'),
(NULL, '30073', 3, 'SHORT SYNAETHON STIMULATE TEST', 30000, 30000, 10, '20002', '300102', '', '', '', '', 'Urine', 'percentage', 15, 1, 'single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-11 05:59:27', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 3000, 3000, '', 'SHORT SYNAETHON STIMULATE TEST'),
(NULL, '30074', 3, 'STOOL REDUCING SUBSTANCES', 2000, 2000, 10, '20002', '300102', '', '', '', '', 'Urine', 'percentage', 15, 1, 'single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-11 05:59:27', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 3000, 3000, '', 'STOOL REDUCING SUBSTANCES'),
(NULL, '30075', 3, 'T.Protein', 1000, 1000, 10, '20002', '300102', 'g/L', '55', '85', '', 'Blood', 'percentage', 15, 1, 'single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-11 05:59:27', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 3000, 3000, '', 'T.Protein'),
(NULL, '30076', 3, 'T3', 2700, 2500, 10, '20002', '300102', '', '', '', '', 'Blood', 'percentage', 15, 1, 'grouped', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-20 09:47:42', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 3000, 3000, '', 'T3'),
(NULL, '30077', 3, 'T4', 2700, 2500, 10, '20002', '300102', '', '', '', '', 'Blood', 'percentage', 15, 1, 'grouped', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-20 09:47:24', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 3000, 3000, '', 'T4'),
(NULL, '30078', 3, 'TSH', 2700, 2500, 10, '20002', '300102', '', '', '', '', 'Blood', 'percentage', 15, 1, 'grouped', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-20 09:47:06', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 3000, 3000, '', 'TSH'),
(NULL, '30080', 3, 'Triglycerides', 1000, 1000, 10, '20002', '300102', '', '', '', '', 'Blood', 'percentage', 15, 1, 'single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-11 05:59:27', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 3000, 3000, '', 'Triglycerides'),
(NULL, '30081', 3, 'Troponin-I', 6500, 6500, 10, '20002', '300102', '', '', '', '', 'Blood', 'percentage', 15, 1, 'single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-11 05:59:27', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 3000, 3000, '', 'Troponin-I'),
(NULL, '30083', 3, 'URINARY ALBUMIN ', 5000, 5000, 10, '20002', '300102', '', '', '', '', 'Urine', 'percentage', 15, 1, 'single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-11 05:59:27', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 3000, 3000, '', 'URINARY ALBUMIN '),
(NULL, '30084', 3, 'URINARY CREATININE', 1000, 1000, 10, '20002', '300102', '', '', '', '', 'Urine', 'percentage', 15, 1, 'single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-11 05:59:27', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 3000, 3000, '', 'URINARY CREATININE'),
(NULL, '30085', 3, 'URINARY MICROALBUMIN', 5000, 5000, 10, '20002', '300102', '', '', '', '', 'Urine', 'percentage', 15, 1, 'single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-11 05:59:27', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 3000, 3000, '', 'URINARY MICROALBUMIN'),
(NULL, '30086', 3, 'URINE CALCIUM', 600, 600, 10, '20002', '300102', '', '', '', '', 'Urine', 'percentage', 15, 1, 'single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-11 05:59:27', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 3000, 3000, '', 'URINE CALCIUM'),
(NULL, '30087', 3, 'URINE DRUG', 10000, 10000, 10, '20002', '300102', '', '', '', '', 'Urine', 'percentage', 15, 1, 'single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-11 05:59:27', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 3000, 3000, '', 'URINE DRUG'),
(NULL, '30088', 3, 'URINE ELECTROLYTE', 3000, 3000, 10, '20002', '300102', '', '', '', '', 'Urine', 'percentage', 15, 1, 'single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-11 05:59:27', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 3000, 3000, '', 'URINE ELECTROLYTE'),
(NULL, '30089', 3, 'URINE PO4', 500, 500, 10, '20002', '300102', '', '', '', '', 'Urine', 'percentage', 15, 1, 'single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-11 05:59:27', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 3000, 3000, '', 'URINE PO4'),
(NULL, '30090', 3, 'URINE REDUCING SUBSTANCES', 2000, 2000, 10, '20002', '300102', '', '', '', '', 'Urine', 'percentage', 15, 1, 'single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-11 05:59:27', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 3000, 3000, '', 'URINE REDUCING SUBSTANCES'),
(NULL, '30092', 3, 'Uric Acid', 1000, 1000, 10, '20002', '300102', 'umol/L', '200', '430', '', 'Blood', 'percentage', 15, 1, 'grouped', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-11 05:59:27', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 3000, 3000, '', 'Uric Acid'),
(NULL, '30093', 3, 'WATER DEPRIVATION TEST', 50000, 50000, 10, '20002', '300102', '', '', '', '', 'Urine', 'percentage', 15, 1, 'single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-11 05:59:27', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 3000, 3000, '', 'WATER DEPRIVATION TEST'),
(NULL, '30094', 3, 'HbA1c', 6500, 6500, 10, '20002', '300102', '%', '4.6', '6', '', 'Blood', 'percentage', 15, 1, 'single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-11 05:59:27', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 3000, 3000, '', 'HbA1c'),
(NULL, '30095', 3, 'Urea, Electrolyte & Creatinine', 3000, 0, 4, '20002', '300102', '', '', '', NULL, 'Blood', 'percentage', 15, 1, 'grouped', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-15 08:43:50', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 3000, 3000, '', 'Urea, Electrolyte & Creatinine'),
(NULL, '300951', 3, 'Urea', 800, 600, 1, '20002', '30095', 'mmol/L', '2.1', '6.9', '', 'Blood', 'percentage', 15, 1, 'grouped', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-20 13:10:29', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 3000, 3000, 'not allowed', 'Urea, Electrolyte & Creatinine'),
(NULL, '3009510', 3, 'Na', 700, 600, 2, '20002', '300102', 'mmol/L', '134', '145', '', 'Blood', 'percentage', 15, 1, 'grouped', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-20 13:10:29', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 3000, 3000, '', 'Na'),
(NULL, '3009511', 3, 'CL', 700, 600, 5, '20002', '300102', 'mmol/L', '94', '108', '', 'Blood', 'percentage', 15, 1, 'grouped', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-20 13:10:29', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 3000, 3000, '', 'CL'),
(NULL, '3009512', 3, 'HCO3', 700, 600, 4, '20002', '300102', 'mmol/L', '22', '28', '', 'Blood', 'percentage', 15, 1, 'grouped_single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-20 13:10:29', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 3000, 3000, '', 'HCO3'),
(NULL, '300952', 3, 'K', 700, 600, 3, '20002', '30095', 'mmol/L', '3.4', '5.5', '', 'Blood', 'percentage', 15, 1, 'grouped', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-20 13:10:29', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 3000, 3000, 'not allowed', 'Urea, Electrolyte & Creatinine'),
(NULL, '300953', 3, 'Na', 700, 600, 2, '20002', '30095', 'mmol/L', '134', '145', '', 'Blood', 'percentage', 15, 1, 'grouped', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-20 13:10:29', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 3000, 3000, 'not allowed', 'Urea, Electrolyte & Creatinine'),
(NULL, '300954', 3, 'CL', 700, 600, 5, '20002', '30095', 'mmol/L', '94', '108', '', 'Blood', 'percentage', 15, 1, 'grouped', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-20 13:10:29', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 3000, 3000, 'not allowed', 'Urea, Electrolyte & Creatinine'),
(NULL, '300955', 3, 'HCO3', 700, 600, 4, '20002', '30095', 'mmol/L', '22', '28', '', 'Blood', 'percentage', 15, 1, 'grouped', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-20 13:10:29', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 3000, 3000, 'not allowed', 'Urea, Electrolyte & Creatinine'),
(NULL, '300956', 3, 'Creatinine', 1000, 600, 6, '20002', '30095', 'mmol/L', '55', '110', '', 'Blood', 'percentage', 15, 1, 'grouped', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-20 13:10:29', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 3000, 3000, 'not allowed', 'Urea, Electrolyte & Creatinine');
INSERT INTO `lab_setup` (`id`, `subhead`, `qms_dept_id`, `description`, `price`, `old_price`, `sort_index`, `account`, `head`, `unit`, `range_from`, `range_to`, `other_range`, `specimen`, `commission_type`, `percentage`, `noOfLabels`, `label_type`, `report_type`, `print_type`, `collect_sample`, `to_be_analyzed`, `to_be_reported`, `upload_doc`, `created_at`, `updated_at`, `facilityId`, `created_by`, `lab_head`, `lab_code`, `selectable`, `label_name`) VALUES
(NULL, '300958', 3, 'Urea', 800, 600, 1, '20002', '300102', 'mmol/L', '2.1', '6.9', '', 'Blood', 'percentage', 15, 1, 'grouped', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-20 13:10:29', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 3000, 3000, '', 'Urea'),
(NULL, '3009580', 3, 'Creatinine', 1000, 600, 6, '20002', '300102', 'mmol/L', '55', '110', '', 'Blood', 'percentage', 15, 1, 'grouped', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-20 13:10:29', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 3000, 3000, '', 'Creatinine'),
(NULL, '300959', 3, 'K', 700, 600, 3, '20002', '300102', 'mmol/L', '3.4', '5.5', '', 'Blood', 'percentage', 15, 1, 'grouped', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-20 13:10:29', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 3000, 3000, '', 'K'),
(NULL, '30096', 3, 'Lipids Profile.', 3300, 4200, 5, '20002', '300102', '', '', '', '', 'Blood', 'percentage', 15, 1, 'grouped', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-26 12:13:23', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 3000, 3000, '', 'Lipids Profile.'),
(NULL, '300961', 3, 'Cholesterol', 1200, 1200, 0, '20002', '30096', 'mmol/L', '2.5', '6', '', 'Urine', 'percentage', 15, 1, 'single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-20 13:10:29', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 3000, 3000, 'not allowed', 'Lipids Profile.'),
(NULL, '3009610', 3, 'Cholesterol', 1200, 1200, 0, '20002', '300102', 'mmol/L', '2.5', '6', '', 'Urine', 'percentage', 15, 1, 'single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-20 13:10:29', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 3000, 3000, '', 'Cholesterol'),
(NULL, '300962', 3, 'LDL-Cholesterol', 1000, 1000, 0, '20002', '30096', 'mmol/L', '0.8', '4.3', '', 'Urine', 'percentage', 15, 1, 'single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-20 13:10:29', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 3000, 3000, 'not allowed', 'Lipids Profile.'),
(NULL, '3009620', 3, 'LDL-Cholesterol', 1000, 1000, 0, '20002', '300102', 'mmol/L', '0.8', '4.3', '', 'Urine', 'percentage', 15, 1, 'single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-20 13:10:29', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 3000, 3000, '', 'LDL-Cholesterol'),
(NULL, '300963', 3, 'HDL - Cholesterol', 1000, 1000, 0, '20002', '30096', 'mmol/L', '0.8', '2.6', '', 'Urine', 'percentage', 15, 1, 'single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-20 13:10:29', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 3000, 3000, 'not allowed', 'Lipids Profile.'),
(NULL, '3009630', 3, 'HDL - Cholesterol', 1000, 1000, 0, '20002', '300102', 'mmol/L', '0.8', '2.6', '', 'Urine', 'percentage', 15, 1, 'single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-20 13:10:29', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 3000, 3000, '', 'HDL - Cholesterol'),
(NULL, '300964', 3, 'Triglycerides', 1000, 1000, 0, '20002', '30096', 'mmol/L', '0.5', '2.8', '', 'Urine', 'percentage', 15, 1, 'single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-20 13:10:29', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 3000, 3000, 'not allowed', 'Lipids Profile.'),
(NULL, '3009640', 3, 'Triglycerides', 1000, 1000, 0, '20002', '300102', 'mmol/L', '0.5', '2.8', '', 'Urine', 'percentage', 15, 1, 'single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-20 13:10:29', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 3000, 3000, '', 'Triglycerides'),
(NULL, '30097', 3, 'Liver Function Test (LFT)', 4000, 8700, 6, '20002', '300102', '', '', '', '', 'Blood', 'percentage', 15, 1, 'grouped_single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-06-01 14:13:11', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 3000, 3000, '', 'Liver Function Test (LFT)'),
(NULL, '300971', 3, 'ALP', 700, 600, 0, '20002', '30097', 'U/I', '42', '110', '', 'Urine', 'percentage', 15, 1, 'grouped_single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-20 13:10:29', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 3000, 3000, 'not allowed', 'Liver Function Test (LFT)'),
(NULL, '3009710', 3, 'ALP', 700, 600, 0, '20002', '300102', 'U/I', '42', '110', '', 'Urine', 'percentage', 15, 1, 'single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-20 13:10:29', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 3000, 3000, '', 'ALP'),
(NULL, '300972', 3, 'ALT (SGPT)', 700, 600, 0, '20002', '30097', 'U/I', '0', '44', '', 'Urine', 'percentage', 15, 1, 'grouped_single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-20 13:10:29', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 3000, 3000, 'not allowed', 'Liver Function Test (LFT)'),
(NULL, '3009720', 3, 'ALT (SGPT)', 700, 600, 0, '20002', '300102', 'U/I', '0', '44', '', 'Urine', 'percentage', 15, 1, 'single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-20 13:10:29', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 3000, 3000, '', 'ALT (SGPT)'),
(NULL, '300973', 3, 'AST (SGOT)', 700, 600, 0, '20002', '30097', 'U/I', '0', '44', '', 'Urine', 'percentage', 15, 1, 'grouped_single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-20 13:10:29', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 3000, 3000, 'not allowed', 'Liver Function Test (LFT)'),
(NULL, '3009730', 3, 'AST (SGOT)', 700, 600, 0, '20002', '300102', 'U/I', '0', '44', '', 'Urine', 'percentage', 15, 1, 'single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-20 13:10:29', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 3000, 3000, '', 'AST (SGOT)'),
(NULL, '300974', 3, 'Gamma GT', 3500, 3500, 0, '20002', '30097', 'U/I', '7', '45', '', 'Urine', 'percentage', 15, 1, 'grouped_single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-20 13:10:29', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 3000, 3000, 'not allowed', 'Liver Function Test (LFT)'),
(NULL, '3009740', 3, 'Gamma GT', 3500, 3500, 0, '20002', '300102', 'U/I', '7', '45', '', 'Urine', 'percentage', 15, 1, 'single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-20 13:10:29', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 3000, 3000, '', 'Gamma GT'),
(NULL, '300975', 3, 'Bilirubin (Total)', 700, 600, 0, '20002', '30097', 'umol/L', '4', '18', '', 'Urine', 'percentage', 15, 1, 'grouped_single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-20 13:10:29', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 3000, 3000, 'not allowed', 'Liver Function Test (LFT)'),
(NULL, '3009750', 3, 'Bilirubin (Total)', 700, 600, 0, '20002', '300102', 'umol/L', '4', '18', '', 'Urine', 'percentage', 15, 1, 'grouped', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-20 13:10:29', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 3000, 3000, '', 'Bilirubin (Total)'),
(NULL, '300976', 3, 'Bilirubin (Direct)', 700, 600, 0, '20002', '30097', 'umol/L', '0', '7', '', 'Urine', 'percentage', 15, 1, 'grouped_single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-20 13:10:29', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 3000, 3000, 'not allowed', 'Liver Function Test (LFT)'),
(NULL, '3009760', 3, 'Bilirubin (Direct)', 700, 600, 0, '20002', '300102', 'umol/L', '0', '7', '', 'Urine', 'percentage', 15, 1, 'grouped', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-20 13:10:29', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 3000, 3000, '', 'Bilirubin (Direct)'),
(NULL, '300977', 3, 'T.Protein', 1000, 1000, 0, '20002', '30097', 'g/L', '55', '85', '', 'Urine', 'percentage', 15, 1, 'grouped_single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-20 13:10:29', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 3000, 3000, 'not allowed', 'Liver Function Test (LFT)'),
(NULL, '3009770', 3, 'T.Protein', 1000, 1000, 0, '20002', '300102', 'g/L', '55', '85', '', 'Urine', 'percentage', 15, 1, 'single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-20 13:10:29', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 3000, 3000, '', 'T.Protein'),
(NULL, '300978', 3, 'Albumin', 1000, 600, 0, '20002', '30097', 'g/L', '32', '52', '', 'Urine', 'percentage', 15, 1, 'grouped_single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-20 13:10:29', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 3000, 3000, 'not allowed', 'Liver Function Test (LFT)'),
(NULL, '3009780', 3, 'Albumin', 1000, 600, 0, '20002', '300102', 'g/L', '32', '52', '', 'Urine', 'percentage', 15, 1, 'grouped', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-20 13:10:29', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 3000, 3000, '', 'Albumin'),
(NULL, '300979', 3, 'Globulin.', 600, 600, 0, '20002', '30097', 'g/L', '20', '45', '', 'Urine', 'percentage', 15, 1, 'grouped_single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-20 13:10:29', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 3000, 3000, 'not allowed', 'Liver Function Test (LFT)'),
(NULL, '3009790', 3, 'Globulin.', 600, 600, 0, '20002', '300102', 'g/L', '20', '45', '', 'Urine', 'percentage', 15, 1, 'single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-20 13:10:29', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 3000, 3000, '', 'Globulin.'),
(NULL, '30098', 3, 'Tumor Markers', 0, 0, 2, '20002', '3000', '', '', '', '', 'Urine', 'percentage', 15, 1, 'single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-20 13:10:29', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 3000, 3000, '', 'Tumor Markers'),
(NULL, '300981', 3, 'PSA', 5500, 5500, 0, '20002', '30098', 'ng/ml', '0', '4', '', 'Urine', 'percentage', 15, 1, 'single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-11 05:59:27', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 3000, 3000, '', 'PSA'),
(NULL, '3009810', 3, 'Amylase', 2500, 2500, 0, '20002', '30098', '', '', '', '', 'Urine', 'percentage', 15, 1, 'single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-11 05:59:27', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 3000, 3000, '', 'Amylase'),
(NULL, '3009811', 3, 'LIPASE', 5000, 5000, 0, '20002', '30098', '', '', '', '', 'Urine', 'percentage', 15, 1, 'single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-11 05:59:27', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 3000, 3000, '', 'LIPASE'),
(NULL, '300982', 3, 'HCG', 6000, 6000, 0, '20002', '30098', 'm/u/l', '', '<4', '', 'Urine', 'percentage', 15, 1, 'single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-11 05:59:27', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 3000, 3000, '', 'HCG'),
(NULL, '300983', 3, 'CEA', 7000, 7000, 0, '20002', '30098', '', '', '', '', 'Urine', 'percentage', 15, 1, 'single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-11 05:59:27', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 3000, 3000, '', 'CEA'),
(NULL, '300984', 3, 'CA 125', 8000, 7000, 0, '20002', '30098', '', '', '', '', 'Urine', 'percentage', 15, 1, 'single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-11 05:59:27', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 3000, 3000, '', 'CA 125'),
(NULL, '300985', 3, 'CA - 15 - 3', 8000, 10000, 0, '20002', '30098', '', '', '', '', 'Urine', 'percentage', 15, 1, 'single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-11 05:59:27', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 3000, 3000, '', 'CA - 15 - 3'),
(NULL, '300986', 3, 'VITAMIN B12', 8000, 8000, 0, '20002', '30098', '', '', '', '', 'Urine', 'percentage', 15, 1, 'single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-11 05:59:27', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 3000, 3000, '', 'VITAMIN B12'),
(NULL, '300987', 3, 'FOLATE', 8000, 8000, 0, '20002', '30098', '', '', '', '', 'Urine', 'percentage', 15, 1, 'single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-11 05:59:27', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 3000, 3000, '', 'FOLATE'),
(NULL, '300989', 3, 'AFP', 7000, 7000, 0, '20002', '30098', 'U/L', '0', '5', '', 'Urine', 'percentage', 15, 1, 'single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-11 05:59:27', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 3000, 3000, '', 'AFP'),
(NULL, '30099', 3, 'Ceresbrospinal Fluid (CSF)', 0, 0, 7, '20002', '300102', '', '', '', '', 'Urine', 'percentage', 15, 1, 'single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-11 05:59:27', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 3000, 3000, '', 'Ceresbrospinal Fluid (CSF)'),
(NULL, '300991', 3, 'Glucose (CSF)', 600, 600, 0, '20002', '30099', 'mg/dl', '2.5', '4.4', '', 'Urine', 'percentage', 15, 1, 'single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-20 13:10:29', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 3000, 3000, 'not allowed', 'Ceresbrospinal Fluid (CSF)'),
(NULL, '3009910', 3, 'Glucose (CSF)', 600, 600, 0, '20002', '300102', 'mg/dl', '2.5', '4.4', '', 'Urine', 'percentage', 15, 1, 'single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-20 13:10:29', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 3000, 3000, '', 'Glucose (CSF)'),
(NULL, '300992', 3, 'Protein (CSF)', 1000, 1000, 0, '20002', '30099', 'mg/dl', '15', '40', '', 'Urine', 'percentage', 15, 1, 'single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-20 13:10:29', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 3000, 3000, 'not allowed', 'Ceresbrospinal Fluid (CSF)'),
(NULL, '3009920', 3, 'Protein (CSF)', 1000, 1000, 0, '20002', '300102', 'mg/dl', '15', '40', '', 'Urine', 'percentage', 15, 1, 'single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-20 13:10:29', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 3000, 3000, '', 'Protein (CSF)'),
(NULL, '300993', 3, 'Chloride (csf)', 700, 600, 0, '20002', '30099', 'mmol/L', '', '', '', 'Urine', 'percentage', 15, 1, 'single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-20 13:10:29', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 3000, 3000, 'not allowed', 'Ceresbrospinal Fluid (CSF)'),
(NULL, '3009930', 3, 'Chloride (csf)', 700, 600, 0, '20002', '300102', 'mmol/L', '', '', '', 'Urine', 'percentage', 15, 1, 'single', 'table', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-20 13:10:29', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 3000, 3000, '', 'Chloride (csf)'),
(NULL, '4000', 3, 'Microbiology', 0, 0, 0, NULL, '1000', NULL, NULL, NULL, '', 'No specimen', '', 0, 1, 'single', NULL, NULL, 'no', 'yes', NULL, NULL, '2021-05-20 13:10:29', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 4000, 0, 'not allowed', 'Microbiology'),
(NULL, '4001', 3, 'AFB', 700, 7000, 4, '20003', '4044', '', '', '', '', 'Sputum', 'percentage', 15, 1, 'single', 'macroscopy', 'single', 'no', 'yes', 'yes', NULL, '2021-05-11 05:59:27', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 4000, 4000, '', 'AFB'),
(NULL, '4002', 3, 'ASCITIC FLUID M/C/S', 3000, 3000, 4, '20003', '4044', '', '', '', '', 'Ascitic Fluid', 'percentage', 15, 1, 'single', 'microbiology_form', 'single', 'no', 'yes', 'yes', NULL, '2021-05-26 10:55:06', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 4000, 4000, '', 'ASCITIC FLUID M/C/S'),
(NULL, '4003', 3, 'BLOOD CULTURE*3', 9000, 9000, 4, '20003', '4044', '', '', '', '', 'Blood', 'percentage', 15, 1, 'single', 'microbiology_form', 'single', 'no', 'yes', 'yes', NULL, '2021-05-11 05:59:27', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 4000, 4000, '', 'BLOOD CULTURE*3'),
(NULL, '4004', 3, 'Blood Culture', 3000, 3000, 4, '20003', '4044', '', '', '', '', 'Blood', 'percentage', 15, 1, 'single', 'microbiology_form', 'single', 'no', 'yes', 'yes', NULL, '2021-05-11 05:59:27', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 4000, 4000, '', 'Blood Culture'),
(NULL, '4005', 3, 'Brain Abscess M/C/S', 3000, 3000, 4, '20003', '4044', '', '', '', '', 'Fluid', 'percentage', 15, 1, 'single', 'microbiology_form', 'single', 'no', 'yes', 'yes', NULL, '2021-05-11 05:59:27', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 4000, 4000, '', 'Brain Abscess M/C/S'),
(NULL, '4006', 3, 'Chlamydia-Serum', 2500, 2500, 4, '20003', '4045', '', '', '', '', 'Serum', 'percentage', 15, 1, 'grouped', 'input', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-28 11:52:48', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 4000, 4000, '', 'Chlamydia-Serum'),
(NULL, '4007', 3, 'Chloride (csf)', 700, 600, 4, '20003', '4044', '', '', '', '', 'Fluid', 'percentage', 15, 1, 'single', 'microbiology_form', 'single', 'no', 'yes', 'yes', NULL, '2021-05-11 05:59:27', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 4000, 4000, '', 'Chloride (csf)'),
(NULL, '4009', 3, 'Ear M/C/S', 3000, 3000, 4, '20003', '4044', '', '', '', '', 'Swab', 'percentage', 15, 1, 'single', 'microbiology_form', 'single', 'no', 'yes', 'yes', NULL, '2021-05-11 05:59:27', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 4000, 4000, '', 'Ear M/C/S'),
(NULL, '4010', 3, 'Eye Swab M/C/S', 3000, 3000, 4, '20003', '4044', '', '', '', '', 'Swab', 'percentage', 15, 1, 'single', 'microbiology_form', 'single', 'no', 'yes', 'yes', NULL, '2021-05-11 05:59:27', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 0, 4000, '', 'Eye Swab M/C/S'),
(NULL, '4011', 3, 'Fungal Studies', 1500, 1500, 4, '20003', '4044', '', '', '', '', 'No specimen', 'percentage', 15, 1, 'single', 'microbiology_form', 'single', 'no', 'yes', 'yes', NULL, '2021-05-11 05:59:27', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 0, 4000, '', 'Fungal Studies'),
(NULL, '4012', 3, 'HBs Ag', 1400, 1200, 0, '20003', '4045', '', '', '', '', 'Blood', 'percentage', 15, 1, 'grouped', 'input', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-28 11:48:11', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 0, 4000, '', 'HBs Ag'),
(NULL, '4013', 3, 'HCV Ab', 1400, 1200, 0, '20003', '4045', '', '', '', '', 'Blood', 'percentage', 15, 1, 'grouped', 'input', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-28 11:51:00', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 0, 4000, '', 'HCV Ab'),
(NULL, '4014', 3, 'HIV Viral Load', 25000, 25000, 0, '20003', '4045', '', '', '', '', 'Blood', 'percentage', 15, 1, 'grouped', 'input', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-28 11:48:37', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 0, 4000, '', 'HIV Viral Load'),
(NULL, '4015', 3, 'HVS Culture', 3000, 3000, 4, '20003', '4044', '', '', '', '', 'Swab', 'percentage', 15, 1, 'single', 'microbiology_form', 'single', 'no', 'yes', 'yes', NULL, '2021-05-11 05:59:27', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 0, 4000, '', 'HVS Culture'),
(NULL, '4016', 3, 'Helicobacter pylori', 1500, 1500, 0, '20003', '4045', '', '', '', '', 'Blood', 'percentage', 15, 1, 'grouped', 'input', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-28 11:51:28', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 0, 4000, '', 'Helicobacter pylori'),
(NULL, '4017', 3, 'Hepatitis B Combo.', 3500, 3200, 0, '20003', '4045', '', '', '', '', 'Blood', 'percentage', 15, 1, 'grouped', 'input', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-28 11:49:01', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 0, 4000, '', 'Hepatitis B Combo.'),
(NULL, '4018', 3, 'Hepatitis B Viral Load', 25000, 25000, 0, '20003', '4045', '', '', '', '', 'Blood', 'percentage', 15, 1, 'grouped', 'input', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-28 11:49:29', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 0, 4000, '', 'Hepatitis B Viral Load'),
(NULL, '4019', 3, 'Hepatitis C Viral Load', 35000, 35000, 0, '20003', '4045', '', '', '', '', 'Blood', 'percentage', 15, 1, 'grouped', 'input', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-28 11:49:38', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 0, 4000, '', 'Hepatitis C Viral Load'),
(NULL, '4020', 3, 'MALARIA PARASITES', 700, 800, 0, '20003', '4045', '', '', '', '', 'Blood', 'percentage', 15, 1, 'grouped', 'input', 'single', 'no', 'yes', 'yes', NULL, '2021-05-22 13:50:52', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 0, 4000, '', 'MALARIA PARASITES'),
(NULL, '4021', 3, 'Malaria RDTs', 500, 500, 0, '20003', '4045', '', '', '', '', 'Blood', 'percentage', 15, 1, 'grouped', 'input', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-20 09:46:43', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 0, 4000, '', 'Malaria RDTs'),
(NULL, '4022', 3, 'PERICARDIAL AFB', 700, 700, 4, '20003', '4044', '', '', '', '', 'Sputum', 'percentage', 15, 1, 'single', 'microbiology_form', 'single', 'no', 'yes', 'yes', NULL, '2021-05-11 05:59:27', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 0, 4000, '', 'PERICARDIAL AFB'),
(NULL, '4023', 3, 'PERICARDINAL FLUID AFB', 700, 700, 4, '20003', '4044', '', '', '', '', 'Fluid', 'percentage', 15, 1, 'single', 'microbiology_form', 'single', 'no', 'yes', 'yes', NULL, '2021-05-11 05:59:27', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 0, 4000, '', 'PERICARDINAL FLUID AFB'),
(NULL, '4024', 3, 'PERICARDINAL FLUID M/C/S', 3000, 3000, 4, '20003', '4044', '', '', '', '', 'Fluid', 'percentage', 15, 1, 'single', 'microbiology_form', 'single', 'no', 'yes', 'yes', NULL, '2021-05-11 05:59:27', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 0, 4000, '', 'PERICARDINAL FLUID M/C/S'),
(NULL, '4025', 3, 'PLURAL FLUID M/C/S', 3000, 3000, 4, '20003', '4044', '', '', '', '', 'Fluid', 'percentage', 15, 1, 'single', 'microbiology_form', 'single', 'no', 'yes', 'yes', NULL, '2021-05-11 05:59:27', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 0, 4000, '', 'PLURAL FLUID M/C/S'),
(NULL, '4026', 3, 'Pregnancy Test (Urine)', 600, 600, 4, '20003', '4045', '', '', '', '', 'Urine', 'percentage', 15, 1, 'grouped', 'input', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-28 11:50:38', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 0, 4000, '', 'Pregnancy Test (Urine)'),
(NULL, '4027', 3, 'Prostatic C/S', 3000, 3000, 4, '20003', '4044', '', '', '', '', 'No specimen', 'percentage', 15, 1, 'single', 'microbiology_form', 'single', 'no', 'yes', 'yes', NULL, '2021-05-11 05:59:27', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 0, 4000, '', 'Prostatic C/S'),
(NULL, '4028', 3, 'Pus culture & Sen.', 3000, 3000, 4, '20003', '4044', '', '', '', '', 'Pus', 'percentage', 15, 1, 'single', 'microbiology_form', 'single', 'no', 'yes', 'yes', NULL, '2021-05-11 05:59:27', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 0, 4000, '', 'Pus culture & Sen.'),
(NULL, '4029', 3, 'Retroviral Screening', 1700, 1600, 0, '20003', '4045', '', '', '', '', 'Blood', 'percentage', 15, 1, 'grouped', 'input', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-28 11:52:27', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 0, 4000, '', 'Retroviral Screening'),
(NULL, '4030', 3, 'SWAB M/C/S', 3000, 3000, 4, '20003', '4044', '', '', '', '', 'Swab', 'percentage', 15, 1, 'single', 'microbiology_form', 'single', 'no', 'yes', 'yes', NULL, '2021-05-11 05:59:27', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 0, 4000, '', 'SWAB M/C/S'),
(NULL, '4031', 3, 'Sputum AFB', 800, 700, 4, '20003', '4044', '', '', '', '', 'Sputum', 'percentage', 15, 1, 'single', 'macroscopy', 'single', 'no', 'yes', 'yes', NULL, '2021-05-11 05:59:27', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 0, 4000, '', 'Sputum AFB'),
(NULL, '4032', 3, 'Sputum M/C/S', 3000, 3000, 4, '20003', '4044', '', '', '', '', 'Sputum', 'percentage', 15, 1, 'single', 'microbiology_form', 'single', 'no', 'yes', 'yes', NULL, '2021-05-11 05:59:27', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 0, 4000, '', 'Sputum M/C/S'),
(NULL, '4033', 3, 'Stool M/C/S', 3000, 3000, 4, '20003', '4044', '', '', '', '', 'Stool', 'percentage', 15, 1, 'single', 'microbiology_form', 'single', 'no', 'yes', 'yes', NULL, '2021-05-11 05:59:27', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 0, 4000, '', 'Stool M/C/S'),
(NULL, '4034', 3, 'Stool Microscopy', 600, 500, 4, '20003', '4044', '', '', '', '', 'Stool', 'percentage', 15, 1, 'single', 'macroscopy', 'single', 'no', 'yes', 'yes', NULL, '2021-05-11 05:59:27', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 0, 4000, '', 'Stool Microscopy'),
(NULL, '4035', 3, 'THROAT SWAB', 3000, 3000, 4, '20003', '4044', '', '', '', '', 'Swab', 'percentage', 15, 1, 'single', 'microbiology_form', 'single', 'no', 'yes', 'yes', NULL, '2021-05-11 05:59:27', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 0, 4000, '', 'THROAT SWAB'),
(NULL, '4036', 3, 'TORCHES', 1000, 1000, 4, '20003', '4044', '', '', '', '', 'No specimen', 'percentage', 15, 1, 'single', 'microbiology_form', 'single', 'no', 'yes', 'yes', NULL, '2021-05-11 05:59:27', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 0, 4000, '', 'TORCHES'),
(NULL, '4037', 3, 'URETHRAL SWAB M/C/S', 3000, 3000, 4, '20003', '4044', '', '', '', '', 'Swab', 'percentage', 15, 1, 'single', 'microbiology_form', 'single', 'no', 'yes', 'yes', NULL, '2021-05-11 05:59:27', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 0, 4000, '', 'URETHRAL SWAB M/C/S'),
(NULL, '4038', 3, 'Urinalysis', 700, 600, 4, '20003', '4044', '', '', '', '', 'Urine', 'percentage', 15, 1, 'single', 'macroscopy', 'single', 'no', 'yes', 'yes', NULL, '2021-05-11 05:59:27', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 0, 4000, '', 'Urinalysis'),
(NULL, '4039', 3, 'Urine M/C/S', 3000, 3000, 4, '20003', '4044', '', '', '', '', 'Urine', 'percentage', 15, 1, 'single', 'microbiology_form', 'single', 'no', 'yes', 'yes', NULL, '2021-05-11 05:59:27', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 0, 4000, '', 'Urine M/C/S'),
(NULL, '4040', 3, 'Urine Microscopy', 600, 500, 4, '20003', '4044', '', '', '', '', 'Urine', 'percentage', 15, 1, 'single', 'macroscopy', 'single', 'no', 'yes', 'yes', NULL, '2021-05-11 05:59:27', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 0, 4000, '', 'Urine Microscopy'),
(NULL, '4041', 3, 'VDRL', 1500, 1400, 4, '20003', '4045', '', '', '', '', 'Blood', 'percentage', 15, 1, 'single', 'microbiology_form', 'single', 'no', 'yes', 'yes', NULL, '2021-06-04 11:21:20', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 0, 4000, '', 'VDRL'),
(NULL, '4042', 3, 'WIDAL TEST Ab.', 800, 800, 0, '20003', '4045', '', '', '', '', 'Blood', 'percentage', 15, 1, 'grouped', 'input', 'single', 'no', 'yes', 'yes', NULL, '2021-05-22 13:54:49', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 0, 4000, '', 'WIDAL TEST Ab.'),
('', '40422', 3, 'S. Paratyphi A (O, H)', 200, 0, 2, NULL, '4042', '', '', '', NULL, 'Blood', 'percentage', 15, 1, 'grouped', 'ho_widal', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-20 13:10:29', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 0, 4000, 'not allowed', 'WIDAL TEST Ab.'),
('', '40423', 3, 'S. Paratyphi B (O, H)', 200, 0, 3, NULL, '4042', '', '', '', NULL, 'Blood', 'percentage', 15, 1, 'grouped', 'ho_widal', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-20 13:10:29', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 0, 4000, 'not allowed', 'WIDAL TEST Ab.'),
('', '40424', 3, 'S. Typhi (O, H)', 200, 0, 1, NULL, '4042', '', '', '', NULL, 'Blood', 'percentage', 15, 1, 'grouped', 'ho_widal', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-20 13:10:29', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 0, 4000, 'not allowed', 'WIDAL TEST Ab.'),
('', '40425', 3, 'S. Paratyphi C (O, H)', 200, 0, 4, NULL, '4042', '', '', '', NULL, 'Blood', 'percentage', 15, 1, 'grouped', 'ho_widal', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-20 13:10:29', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 0, 4000, 'not allowed', 'WIDAL TEST Ab.'),
(NULL, '4043', 3, 'Wound C/S', 3000, 3000, 4, '20003', '4044', '', '', '', '', 'Swab', 'percentage', 15, 1, 'single', 'microbiology_form', 'single', 'no', 'yes', 'yes', NULL, '2021-05-11 05:59:27', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 0, 4000, '', 'Wound C/S'),
(NULL, '4044', 3, 'Microbiology', 0, 0, 4, NULL, '4000', NULL, NULL, NULL, NULL, '', '', 0, 1, 'single', 'microbiology_form', NULL, 'no', 'yes', NULL, NULL, '2021-05-20 13:10:29', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 0, 4000, 'not allowed', 'Microbiology'),
('', '404432', 3, 'ASPIRATE M/C/S', 3000, 0, 31, '20003', '4044', '', '', '', NULL, 'Ascitic Fluid', 'percentage', 15, 1, 'single', 'microbiology_form', 'grouped', 'no', 'yes', 'yes', NULL, '2021-05-26 10:57:47', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 0, 4000, '', 'ASPIRATE M/C/S'),
('', '404433', 3, 'Helicobacter Pylori (Using Stool)', 2000, 0, 32, '20003', '4044', '', '', '', NULL, '', '', 0, 1, 'grouped', 'microbiology_form', NULL, 'no', NULL, NULL, NULL, '2021-05-28 11:51:37', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 0, 4000, '', 'Helicobacter Pylori (Using Stool)'),
('', '404434', 3, 'MANTOUX', 1000, 0, 33, '20003', '4044', '', '', '', NULL, '', '', 0, 1, 'single', 'microbiology_form', NULL, 'no', NULL, NULL, NULL, '2021-05-20 13:10:29', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 0, 4000, '', 'MANTOUX'),
('', '404435', 3, 'MASTOIDS', 4000, 0, 34, '20003', '4044', '', '', '', NULL, '', '', 0, 1, 'single', 'microbiology_form', NULL, 'no', NULL, NULL, NULL, '2021-05-20 13:10:29', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 0, 4000, '', 'MASTOIDS'),
(NULL, '404436', 3, 'ECS M/C/S', 3000, 3000, 0, '20004', '4044', '', '', '', '', 'Tissue/Vaginal Smear', 'percentage', 15, 1, 'grouped', NULL, 'single', 'no', 'yes', 'yes', NULL, '2021-05-26 11:04:46', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 0, 4000, '', 'ECS M/C/S'),
(NULL, '4045', 3, 'Serology', 0, 0, 1, NULL, '4000', NULL, NULL, NULL, NULL, '', '', 0, 1, 'single', NULL, NULL, 'no', 'yes', NULL, NULL, '2021-05-20 13:10:29', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 0, 4000, 'not allowed', 'Serology'),
('', '404512', 3, 'RVS Viral Load', 25000, 0, 11, '20003', '4045', '', '', '', NULL, '', '', 0, 1, 'grouped', 'input', 'grouped', 'no', NULL, NULL, NULL, '2021-05-28 11:53:12', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'admin', 0, 4000, '', 'RVS Viral Load');

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

--
-- 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 08:30:37', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', ''),
(72, 'Test', 'test1', '', 'mmol/L', '1', '2', 'Blood', 500, 0, '2020-09-18 15:48:58', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', 'admin');

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

--
-- Table structure for table `lab_setup3`
--

CREATE TABLE `lab_setup3` (
  `id` int(11) NOT NULL,
  `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_setup3`
--

INSERT INTO `lab_setup3` (`id`, `subhead`, `head`, `description`, `unit`, `range_from`, `range_to`, `specimen`, `price`, `percentage`, `noOfLabels`, `created_at`, `updated_at`, `facilityId`, `created_by`) VALUES
(1, '2000', '1000', 'Hematology', NULL, NULL, NULL, 'No specimen', NULL, 0, 0, '2020-11-16 05:55:46', NULL, '966a89f6-05d8-4564-b319-2f8863821e75', ''),
(361, '30013', '3001', 'K', 'mmol/L', '3.0', '5.6', 'Urine', 600, 0, 0, '2020-11-16 05:54:01', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'emaitee');

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

--
-- Table structure for table `lab_setup4`
--

CREATE TABLE `lab_setup4` (
  `id` int(11) NOT NULL DEFAULT 0,
  `subhead` varchar(100) CHARACTER SET latin1 NOT 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,
  `other_range` varchar(50) DEFAULT NULL,
  `specimen` varchar(100) CHARACTER SET latin1 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) 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_setup4`
--

INSERT INTO `lab_setup4` (`id`, `subhead`, `head`, `description`, `unit`, `range_from`, `range_to`, `other_range`, `specimen`, `price`, `percentage`, `noOfLabels`, `created_at`, `updated_at`, `facilityId`, `created_by`) VALUES
(351, '1000', '', 'PSC Prime Lab', NULL, NULL, NULL, '', '', NULL, 0, 0, '0000-00-00 00:00:00', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', ''),
(292, '5136', '5000', 'hs CRP', '', '', '', '', '', 2500, 0, 1, '2020-11-17 20:24:22', '', '966a89f6-05d8-4564-b319-2f8863821e75', '');

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

--
-- 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 `nursing_report`
--

CREATE TABLE `nursing_report` (
  `id` int(11) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `created_by` varchar(50) NOT NULL,
  `report` varchar(2000) NOT NULL,
  `facilityId` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `nursing_report`
--

INSERT INTO `nursing_report` (`id`, `created_at`, `created_by`, `report`, `facilityId`) VALUES
(1, '2021-09-08 06:19:02', 'Manager', '', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a');

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

--
-- 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(50) 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', 1, '7/8/2015', '28-2', 'Tonsillitis', 'Dr. Hamisu Abdullahi', 'Tonsillectomy', 'Ahassan', 'GA', '', 'Satisfactory', 'AZIZA ALI-MUKTAR', '', '', '', '', '', '', '', '2019-12-11 05:25:14', '2020-01-05 22:34:26'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 1304, '2021-09-18', '5706-1', 'L5/S1 disk prolapse', 'Dr Musa Ibrahim,Dr Abubakar Musa,Dr Mukhtar Teli,Dr Ibrahim Abba', 'L5/S1 transforaminal endoscopic decompression', 'Dr. Dalhat Salahu,Mal Jamilu', 'GA', '', 'Satisfactory', 'A. Anka Mohammed ', '', '', '1g Ceftriaxone', '', '', '', 'IV Cefriaxone 1g daily for 2 days\n\nIM Diclofenac 75mg bd for 1 day\n\nIV paracetamol 900mg tds for 2 days\n\nIV Pentazocine 30mg 8 hourly for 1 day\n\nIVF Normal Saline 1L 8 hourly for 1 day', '2021-09-18 17:54:42', NULL);

--
-- 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) DEFAULT NULL,
  `accName` varchar(50) DEFAULT NULL,
  `description` varchar(100) DEFAULT NULL,
  `accountType` varchar(50) DEFAULT NULL,
  `contactName` varchar(100) DEFAULT NULL,
  `contactAddress` varchar(500) DEFAULT NULL,
  `contactPhone` varchar(20) DEFAULT NULL,
  `contactEmail` varchar(50) DEFAULT NULL,
  `contactWebsite` varchar(50) DEFAULT 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 'approved',
  `guarantor_name` varchar(50) DEFAULT NULL,
  `guarantor_address` varchar(100) DEFAULT NULL,
  `guarantor_phone` varchar(20) DEFAULT NULL,
  `created_by` varchar(50) DEFAULT NULL,
  `approved_by` varchar(50) DEFAULT NULL,
  `createdAt` timestamp NULL DEFAULT current_timestamp(),
  `approved_at` timestamp NULL DEFAULT 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`, `created_by`, `approved_by`, `createdAt`, `approved_at`) VALUES
(1, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', NULL, 'Sulaiman Arikewuyo', NULL, 'Single', NULL, '', '09044543000', '', '', NULL, NULL, 0, 0, 'approved', '', '', '', NULL, NULL, '2021-09-20 19:43:26', NULL),
(2, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 1, 'Sulaiman Adele', NULL, 'Single', NULL, '', '09044543333', '', '', NULL, NULL, 0, -2254, 'approved', '', '', '', NULL, NULL, '2021-09-20 19:43:54', NULL),
(3, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 2, 'Some Name', NULL, 'Single', NULL, '', '090', '', '', NULL, NULL, 0, -1994, 'approved', '', '', '', NULL, NULL, '2021-09-22 05:08:49', NULL),
(4, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 3, 'James Kagudu', NULL, 'Single', NULL, '', '0901', '', '', NULL, NULL, 0, 0, 'approved', '', '', '', NULL, NULL, '2021-09-22 05:15:29', NULL),
(5, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 4, 'Sunday Abegunde', NULL, 'Single', NULL, '', '080', '', '', NULL, NULL, 0, 0, 'approved', '', '', '', NULL, NULL, '2021-09-22 06:39:06', NULL),
(6, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 5, 'Salihu Aferumole', NULL, 'Single', NULL, '', '09034567788', '', '', NULL, NULL, 0, 0, 'approved', '', '', '', NULL, NULL, '2021-09-22 06:50:32', NULL),
(7, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 6, 'Mmm Nnn', NULL, 'Single', NULL, '', '09041547787', '', '', NULL, NULL, 0, 0, 'approved', '', '', '', NULL, NULL, '2021-09-26 17:16:49', NULL),
(8, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 7, 'Testing Couchdb', NULL, 'Single', NULL, 'Someadd', '08032145698', '', '', NULL, NULL, 0, 0, 'approved', '', '', '', NULL, NULL, '2021-09-26 18:27:25', NULL),
(9, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 8, 'Na Kwarai Mabukachi', NULL, 'Single', NULL, '', '090434', '', '', NULL, NULL, 0, -1554, 'approved', '', '', '', NULL, NULL, '2021-09-28 21:32:14', NULL);

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

--
-- Table structure for table `patientfileno2`
--

CREATE TABLE `patientfileno2` (
  `id` int(11) NOT NULL DEFAULT 0,
  `facilityId` varchar(50) DEFAULT NULL,
  `accountNo` int(7) DEFAULT NULL,
  `accName` varchar(50) DEFAULT NULL,
  `description` varchar(100) DEFAULT NULL,
  `accountType` varchar(50) DEFAULT NULL,
  `contactName` varchar(100) DEFAULT NULL,
  `contactAddress` varchar(500) DEFAULT NULL,
  `contactPhone` varchar(20) DEFAULT NULL,
  `contactEmail` varchar(50) DEFAULT NULL,
  `contactWebsite` varchar(50) DEFAULT 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) DEFAULT NULL,
  `guarantor_address` varchar(100) DEFAULT NULL,
  `guarantor_phone` varchar(20) DEFAULT NULL,
  `created_by` varchar(50) DEFAULT NULL,
  `approved_by` varchar(50) DEFAULT NULL,
  `createdAt` timestamp NULL DEFAULT current_timestamp(),
  `approved_at` timestamp NULL DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `patientfileno2`
--

INSERT INTO `patientfileno2` (`id`, `facilityId`, `accountNo`, `accName`, `description`, `accountType`, `contactName`, `contactAddress`, `contactPhone`, `contactEmail`, `contactWebsite`, `firstname`, `surname`, `beneficiaries`, `balance`, `status`, `guarantor_name`, `guarantor_address`, `guarantor_phone`, `created_by`, `approved_by`, `createdAt`, `approved_at`) VALUES
(1, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 238, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Abba', 'Sulaiman', 2, 0, 'pending', NULL, NULL, NULL, NULL, NULL, '2019-12-19 14:29:26', NULL),
(8237, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 4678, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Salisu', 'Sani', 1, 0, 'pending', NULL, NULL, NULL, NULL, NULL, '2020-12-03 12:33:53', NULL);

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

--
-- Stand-in structure for view `patientfileno_full`
-- (See below for the actual view)
--
CREATE TABLE `patientfileno_full` (
`id` int(11)
,`acc_count` bigint(21)
,`accountNo` int(7)
,`beneficiaries` bigint(21)
,`firstname` varchar(50)
,`surname` varchar(50)
,`status` varchar(50)
,`createdAt` timestamp
,`accName` varchar(50)
,`description` varchar(100)
,`accountType` varchar(50)
,`contactName` varchar(100)
,`contactAddress` varchar(500)
,`contactPhone` varchar(20)
,`contactEmail` varchar(50)
,`contactWebsite` varchar(50)
,`balance` int(11)
,`guarantor_name` varchar(50)
,`guarantor_address` varchar(100)
,`guarantor_phone` varchar(20)
,`created_by` varchar(50)
,`approved_by` varchar(50)
,`approved_at`  timestamp NULL DEFAULT NULL
);

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

--
-- Table structure for table `patientfileno_test`
--

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

--
-- Dumping data for table `patientfileno_test`
--

INSERT INTO `patientfileno_test` (`id`, `acc_count`, `accountNo`, `beneficiaries`, `firstname`, `surname`, `status`, `createdAt`, `accName`, `description`, `accountType`, `contactName`, `contactAddress`, `contactPhone`, `contactEmail`, `contactWebsite`, `balance`, `guarantor_name`, `guarantor_address`, `guarantor_phone`, `created_by`, `approved_by`, `approved_at`) VALUES
(7563, 1, 1, 1, 'Hauwa', 'Musbahu', 'pending', '2020-12-03 12:33:53', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL),
(8237, 1, 4678, 1, 'Salisu', 'Sani', 'pending', '2020-12-03 12:33:53', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL);

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

--
-- 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` varchar(50) DEFAULT NULL,
  `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) DEFAULT '0',
  `kinEmail` varchar(50) DEFAULT '0',
  `kinAddress` varchar(500) DEFAULT '0',
  `accountNo` int(7) DEFAULT NULL,
  `beneficiaryNo` int(3) DEFAULT NULL,
  `balance` int(11) DEFAULT 0,
  `id` varchar(10) DEFAULT 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) DEFAULT 'registered',
  `hematology` varchar(20) DEFAULT NULL,
  `microbiology` varchar(20) DEFAULT NULL,
  `chem_path` varchar(20) DEFAULT NULL,
  `radiology` varchar(20) DEFAULT 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', '', 'Sulaiman', 'Adele', '', 'Male', 0, 'Married', '1988-09-20', '2021-09-20', '09044543333', '', '', '', 'Teacher', '', '', '', '', '', '', 1, 1, 0, '1-1', 2, NULL, NULL, '0', NULL, NULL, 'registered', NULL, NULL, NULL, NULL),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 'Some', 'Name', '', 'Male', 0, 'Single', '1971-09-22', '2021-09-22', '090', '', '', '', 'Manual', '', '', '', '', '', '', 2, 1, 0, '2-1', 3, NULL, NULL, '0', NULL, NULL, 'registered', NULL, NULL, NULL, NULL),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 'James', 'Kagudu', '', 'Male', 0, 'Married', '1989-09-22', '2021-09-22', '0901', '', '', '', 'Dentuak', '', '', '', '', '', '', 3, 1, 0, '3-1', 4, NULL, NULL, '0', NULL, NULL, 'registered', NULL, NULL, NULL, NULL),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 'Sunday', 'Abegunde', '', 'Male', 0, '', '1965-09-22', '2021-09-22', '080', '', '', '', 'Pilot', '', '', '', '', '', '', 4, 1, 0, '4-1', 5, NULL, NULL, '0', NULL, NULL, 'registered', NULL, NULL, NULL, NULL),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 'Salihu', 'Aferumole', '', 'Male', 0, 'Married', '1931-09-22', '2021-09-22', '09034567788', '', '', '', 'Former Teacher', '', '', '', '', '', '', 5, 1, 0, '5-1', 6, NULL, NULL, '0', NULL, NULL, 'registered', NULL, NULL, NULL, NULL),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 'Mmm', 'Nnn', '', 'Female', 0, 'Single', '2001-09-26', '2021-09-26', '09041547787', '', '', '', 'Mema', '', '', '', '', '', '', 6, 1, 0, '6-1', 7, NULL, NULL, '0', NULL, NULL, 'registered', NULL, NULL, NULL, NULL),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 'Testing', 'Couchdb', '', 'Female', 0, 'Single', '2010-09-26', '2021-09-26', '08032145698', 'Some', '', '', 'Some occ', 'Someadd', '', '', '', '', '', 7, 1, 0, '7-1', 8, NULL, NULL, '0', NULL, NULL, 'registered', NULL, NULL, NULL, NULL),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '', 'Na Kwarai', 'Mabukachi', '', 'Male', 0, '', '1991-09-28', '2021-09-28', '090434', '', '', '', '', '', '', '', '', '', '', 8, 1, 0, '8-1', 9, NULL, NULL, '0', NULL, NULL, 'registered', NULL, NULL, NULL, NULL);

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

--
-- Stand-in structure for view `patient_bed`
-- (See below for the actual view)
--
CREATE TABLE `patient_bed` (
`allocation_id` int(11)
,`bed_id` int(11)
,`allocated` timestamp
,`allocated_by` varchar(50)
,`allocation_status` varchar(20)
,`patient_name` varchar(101)
,`patient_id` varchar(50)
,`accountNo` int(7)
,`facilityId` varchar(50)
);

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

--
-- Table structure for table `patient_history`
--

CREATE TABLE `patient_history` (
  `id` int(11) NOT NULL,
  `patient_id` varchar(50) NOT NULL,
  `request_id` int(11) NOT NULL,
  `history` varchar(1000) NOT NULL,
  `file` varchar(200) NOT NULL,
  `createdAt` timestamp NOT NULL DEFAULT current_timestamp(),
  `facilityId` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `patient_history`
--

INSERT INTO `patient_history` (`id`, `patient_id`, `request_id`, `history`, `file`, `createdAt`, `facilityId`) VALUES
(1, '7-1', 1, '', '', '2021-09-28 18:55:25', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
(2, '8-1', 2, '', '', '2021-09-28 21:45:15', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a');

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

--
-- 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 `prime_old_lab`
--

CREATE TABLE `prime_old_lab` (
  `id` int(11) NOT NULL DEFAULT 0,
  `account` varchar(50) CHARACTER SET utf8mb4 DEFAULT NULL,
  `subhead` varchar(100) NOT NULL,
  `head` varchar(100) NOT NULL,
  `description` varchar(200) NOT NULL,
  `unit` varchar(100) DEFAULT NULL,
  `range_from` varchar(100) DEFAULT NULL,
  `range_to` varchar(100) DEFAULT NULL,
  `other_range` varchar(50) CHARACTER SET utf8mb4 DEFAULT NULL,
  `specimen` varchar(100) NOT NULL,
  `price` int(100) NOT NULL,
  `commission_type` varchar(50) CHARACTER SET utf8mb4 NOT 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=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `prime_old_lab`
--

INSERT INTO `prime_old_lab` (`id`, `account`, `subhead`, `head`, `description`, `unit`, `range_from`, `range_to`, `other_range`, `specimen`, `price`, `commission_type`, `percentage`, `noOfLabels`, `created_at`, `updated_at`, `facilityId`, `created_by`) VALUES
(351, '20026', '1000', '', 'PSC Prime Lab', NULL, NULL, NULL, '', '', 0, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', ''),
(352, '20026', '2000', '1000', 'Hematology', '', '', '', '', 'No specimen', 0, '', 0, 2, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'emaitee'),
(354, '20026', '3000', '1000', 'Chemical Pathology', '', '', '', '', '', 0, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', ''),
(355, '20026', '3001', '3000', 'Urea, Electrolyte & Creatinine', '', '', '', '', 'Urine', 0, '', 0, 2, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'emaitee'),
(357, '20026', '30011', '3001', 'Urea', 'mmol/L', '2.1', '6.9', '', 'Urine', 600, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'emaitee'),
(358, '20026', '30012', '3001', 'Na', 'mmol/L', '134', '145', '', 'Urine', 600, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'emaitee'),
(361, '20026', '30013', '3001', 'K', 'mmol/L', '3.4', '5.5', '', 'Urine', 600, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'emaitee'),
(356, '20026', '30014', '3001', 'HCO3', 'mmol/L', '22', '28', '', 'Urine', 600, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'emaitee'),
(359, '20026', '30015', '3001', 'CL', 'mmol/L', '94', '108', '', 'Urine', 600, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'emaitee'),
(360, '20026', '30016', '3001', 'Creatinine', 'umol/L', '55', '110', '', 'Urine', 1000, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'emaitee'),
(0, '20026', '20003', '2000', 'Clothing Profile', '', '', '', NULL, 'No specimen', 4500, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman'),
(0, '20026', '200031', '20003', 'Prothrombin time', 'secs', '', '', NULL, 'Blood', 0, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman'),
(0, '20026', '200032', '20003', 'INR', 'secs', '', '', NULL, 'Blood', 0, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman'),
(0, '20026', '200033', '20003', 'PTTK/APTT', 'secs', '', '', NULL, 'Blood', 0, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman'),
(0, '20026', '200034', '20003', 'Thrombin time', 'secs', '', '', NULL, 'Blood', 0, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman'),
(0, '20026', '200035', '20003', 'Fibrinogen Deg. Products (FDP)', '', '', '', NULL, 'Blood', 0, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman'),
(0, '20026', '200036', '20003', 'Factor Assay (specify)', '', '', '', NULL, 'Blood', 0, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman'),
(0, '20026', '20004', '2000', 'ESR', 'mm/hr', '', '', NULL, 'Blood', 2000, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman'),
(0, '20026', '20005', '2000', 'G6PD assay', '', '', '', NULL, 'No specimen', 0, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman'),
(0, '20026', '20006', '2000', 'Foetal Haemoglobin', '', '', '', NULL, 'No specimen', 8000, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman'),
(0, '20026', '20008', '2000', 'Indirect Coomb\'s Test', '', '', '', NULL, 'No specimen', 5000, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman'),
(0, '20026', '20009', '2000', 'Reticulocyte', '', '', '', NULL, 'No specimen', 0, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman'),
(0, '20026', '200010', '2000', 'Blood group', '', '', '', NULL, 'No specimen', 1000, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman'),
(0, '20026', '20007', '2000', 'Direct Coomb\'s Test', '', '', '', NULL, 'No specimen', 3500, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman'),
(0, '20026', '30002', '3000', 'Blood Glucose', '', '', '', NULL, '', 0, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman'),
(0, '20026', '300021', '30002', 'Fasting', 'mmol/L', '3.0', '5.8', NULL, 'Blood', 0, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman'),
(0, '20026', '300023', '30002', '2 Hrs PP', 'mmol/L', '', '', NULL, 'Blood', 0, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman'),
(0, '20026', '300022', '30002', 'Random', 'mmol/L', '3.0', '8.2', NULL, 'Blood', 0, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman'),
(0, '20026', '3000', '1000', 'Chemical Pathology', '', '', '', NULL, '', 0, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', ''),
(0, '20026', '3000', '1000', 'Chemical Pathology', '', '', '', NULL, '', 0, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', ''),
(0, '20026', '4000', '1000', 'Microbiology', NULL, NULL, NULL, NULL, '', 0, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', ''),
(0, '20026', '300031', '30003', 'CPK', 'AU/L', '24', '17', NULL, 'Blood', 0, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman'),
(0, '20026', '30003', '3000', 'Cardiac Enzymes', '', '', '', NULL, '', 0, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman'),
(0, '20026', '300032', '30003', 'AST', 'U/L', '0', '948', NULL, 'Blood', 0, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman'),
(0, '20026', '300033', '30003', 'LDH', 'U/L', '89', '221', NULL, 'Blood', 0, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman'),
(0, '20026', '300034', '30003', 'CKMB', 'U/L', '0.1', '4.9', NULL, 'Blood', 0, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman'),
(0, '20026', '300035', '30003', 'Troponin', 'ng/L', '0', '0.1', NULL, 'Blood', 0, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman'),
(0, '20026', '30004', '3000', 'Hormone Assays', '', '', '', NULL, '', 0, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman'),
(0, '20026', '300041', '30004', 'T3', 'mmol/L', '1.3', '3.1', NULL, '', 0, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman'),
(0, '20026', '300042', '30004', 'T4', 'mmol/L', '66', '181', NULL, '', 0, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman'),
(0, '20026', '300043', '30004', 'TSH', 'mu/L', '0.3', '4.2', NULL, '', 0, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman'),
(0, '20026', '300044', '30004', 'Oestrogen', 'pg/ml', '', '', NULL, '', 0, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman'),
(0, '20026', '300045', '30004', 'Progesterone', 'ng/l', '', '', NULL, '', 0, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman'),
(0, '20026', '300046', '30004', 'Prolactin', '', '72', '511', NULL, '', 0, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman'),
(0, '20026', '300047', '30004', 'FSH', 'mu/L', '', '', NULL, '', 0, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman'),
(0, '20026', '300048', '30004', 'LH', 'mu/L', '', '', NULL, '', 0, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman'),
(0, '20026', '300049', '30004', 'Testosterone', 'ng/ml', '', '', NULL, '', 0, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman'),
(0, '20026', '30005', '3000', 'Lipid Profile', '', '', '', NULL, '', 0, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman'),
(0, '20026', '300051', '30005', 'T. Chol', 'mmol/L', '2.5', '6.4', NULL, 'Blood', 0, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman'),
(0, '20026', '300052', '30005', 'HDL', 'mmol/L', '0.8', '2.6', NULL, 'Blood', 0, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman'),
(0, '20026', '300053', '30005', 'TRIG', 'mmol/L', '0.5', '2.8', NULL, 'Blood', 0, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman'),
(0, '20026', '300054', '30005', 'IDL', 'mmol/L', '0.8', '4.3', NULL, 'Blood', 0, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman'),
(0, '20026', '300062', '30006', 'ALT (SGPT)', 'U/L', '4', '34', NULL, '', 0, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman'),
(0, '20026', '300061', '30006', 'ALP Alkaline Phosphatase', 'U/L', '42', '110', NULL, '', 0, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman'),
(0, '20026', '300065', '30006', 'Bilirubin Total', 'Umol/L', '4', '18', NULL, '', 0, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman'),
(0, '20026', '30006', '3000', 'Liver Function Tests', '', '', '', NULL, '', 0, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman'),
(0, '20026', '300063', '30006', 'AST (SGOT)', 'U/L', '7', '45', NULL, '', 0, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman'),
(0, '20026', '300064', '30006', 'GAMMAGT', 'U/L', '8', '46', NULL, '', 0, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman'),
(0, '20026', '300066', '30006', 'Bilirubin Direct', 'Umol/L', '0', '7', NULL, '', 0, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman'),
(0, '20026', '300069', '30006', 'Globulin', 'g/L', '20', '43', NULL, '', 0, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman'),
(0, '20026', '300068', '30006', 'Albumin', 'g/L', '32', '51', NULL, '', 0, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman'),
(0, '20026', '300067', '30006', 'T/Protein', 'g/L', '59', '86', NULL, '', 0, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman'),
(0, '20026', '300072', '30007', 'Albumin', 'g/L', '32', '51', NULL, 'Blood', 0, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman'),
(0, '20026', '300071', '30007', 'T/Protein', 'g/L', '59', '86', NULL, 'Blood', 0, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman'),
(0, '20026', '300073', '30007', 'Globulin', 'g/L', '20', '43', NULL, 'Blood', 0, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman'),
(0, '20026', '30007', '3000', 'Serum Proteins', '', '', '', NULL, '', 0, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman'),
(0, '20026', '300081', '30008', 'Calcium', 'mmol/L', '2.1', '2.80', NULL, 'Blood', 0, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman'),
(0, '20026', '30008', '3000', 'Bone Chemistry', '', '', '', NULL, '', 0, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman'),
(0, '20026', '300082', '30008', 'Inorg. Phosphate', 'mmol/L', '0.94', '1.70', NULL, 'Blood', 0, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman'),
(0, '20026', '30009', '3000', 'Cerebrpspinal Fluid (CSF)', '', '', '', NULL, '', 0, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman'),
(0, '20026', '300091', '30009', 'Glucose', 'mg/ml', '2.5', '4.4', NULL, 'Blood', 0, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman'),
(0, '20026', '300092', '30009', 'Protein', 'mg/ml', '15', '40', NULL, 'Blood', 0, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman'),
(0, '20026', '300093', '30009', 'Chloride', 'mmol/L', '', '', NULL, 'Blood', 0, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman'),
(0, '20026', '3000101', '300010', 'PSA', 'ng/ml', '0', '4', NULL, 'Blood', 0, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman'),
(0, '20026', '300010', '3000', 'Tumour Markers', '', '', '', NULL, '', 0, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman'),
(0, '20026', '3000103', '300010', 'BCG', 'm/u/l', '0', '4', NULL, 'Blood', 0, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman'),
(0, '20026', '3000102', '300010', 'AFP', 'U/L', '0', '5', NULL, 'Blood', 0, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman'),
(0, '20026', '300012', '3000', 'Creatinine Clearance', 'ml/min', '', '', NULL, '', 0, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman'),
(0, '20026', '300013', '3000', 'Serum Anylase', 'U/L', '31', '142', NULL, '', 0, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman'),
(0, '20026', '300011', '3000', 'Uric Acid', 'mmol/L', '209', '446', NULL, '', 0, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman'),
(0, '20026', '40001', '4000', 'Blood Culture', NULL, NULL, NULL, NULL, 'Blood', 0, '', 0, 1, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', ''),
(0, '20026', '40002', '4000', 'Eye Swab M/C/S', NULL, NULL, NULL, NULL, 'Swab', 0, '', 0, 1, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', ''),
(0, '20026', '40003', '4000', 'Hepatitis B Combo.', NULL, NULL, NULL, NULL, 'Blood', 0, '', 0, 1, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', ''),
(0, '20026', '200013', '20001', 'GRA#', '10ˆ9/L', '2', '7.8', NULL, 'Blood', 0, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman'),
(0, '20026', '200011', '20001', 'MID#', '10ˆ9/L', '0.10', '0.90', NULL, 'Blood', 0, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman'),
(0, '20026', '200014', '20001', 'LYM%', '%', '20', '50', NULL, 'Blood', 0, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman'),
(0, '20026', '20001', '2000', 'Full Blood Count (FBC)', '', '', '', NULL, 'Blood', 0, '', 0, 1, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman'),
(0, '20026', '200015', '20001', 'MCV', 'fL', '80', '99', NULL, 'Blood', 0, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman'),
(0, '20026', '2000111', '20001', 'MCHC', 'g/L', '320', '360', NULL, 'Blood', 0, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman'),
(0, '20026', '200012', '20001', 'WBC', '10ˆ9/L', '4', '10', NULL, 'Blood', 0, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman'),
(0, '20026', '200018', '20001', 'GRA%', '%', '40', '70', NULL, 'Blood', 0, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman'),
(0, '20026', '200017', '20001', 'RBC', '10ˆ12/L', '3.8', '5.8', NULL, 'Blood', 0, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman'),
(0, '20026', '200016', '20001', 'LYM#', '10ˆ9/L', '0.6', '4.10', NULL, 'Blood', 0, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman'),
(0, '20026', '200019', '20001', 'MID%', '%', '3', '10', NULL, 'Blood', 0, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman'),
(0, '20026', '2000113', '20001', 'HCT', '%', '35', '50', NULL, 'Blood', 0, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman'),
(0, '20026', '2000112', '20001', 'MCH', 'pg', '26.5', '33.5', NULL, 'Blood', 0, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman'),
(0, '20026', '2000110', '20001', 'HGB', 'g/dL', '11', '16.5', NULL, 'Blood', 0, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman'),
(0, '20026', '2000115', '20001', 'RDW-SD', 'fL', '35', '56', NULL, 'Blood', 0, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman'),
(0, '20026', '2000114', '20001', 'RDW-CV', '%', '10', '15', NULL, 'Blood', 0, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman'),
(0, '20026', '2000117', '20001', 'PDW', '%', '10', '18', NULL, 'Blood', 0, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman'),
(0, '20026', '2000118', '20001', 'PLT', '10ˆ9/L', '100', '300', NULL, 'Blood', 0, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman'),
(0, '20026', '2000116', '20001', 'MPV', 'fL', '7', '11', NULL, 'Blood', 0, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman'),
(0, '20026', '2000119', '20001', 'PCT', '%', '0.1', '0.5', NULL, 'Blood', 0, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman'),
(0, '20026', '2000120', '20001', 'P-LCR', '%', '13', '43', NULL, 'Blood', 0, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman'),
(0, '20026', '20002', '2000', 'HPLC', '', '', '', NULL, 'Blood', 0, '', 0, 1, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman'),
(0, '20026', '200021', '20002', 'HbC', '', '', '', NULL, 'Blood', 0, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman'),
(0, '20026', '200024', '20002', 'A1c', '', '', '', NULL, 'Blood', 0, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman'),
(0, '20026', '200022', '20002', 'A1a', '', '', '', NULL, 'Blood', 0, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman'),
(0, '20026', '200023', '20002', 'A1b', '', '', '', NULL, 'Blood', 0, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman'),
(0, '20026', '200025', '20002', 'A0', '', '', '', NULL, 'Blood', 0, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman'),
(0, '20026', '200026', '20002', 'A2', '', '', '', NULL, 'Blood', 0, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman'),
(0, '20026', '200027', '20002', 'F', '', '', '', NULL, 'Blood', 0, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman'),
(0, '20026', '200029', '20002', 'LA1C/CHB-1', '', '', '', NULL, 'Blood', 0, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman'),
(0, '20026', '200028', '20002', 'P3', '', '', '', NULL, 'Blood', 0, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman'),
(0, '20026', '2000210', '20002', 'HbS', '', '', '', NULL, 'Blood', 0, '', 0, 0, '2020-12-01 18:47:54', NULL, '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman');

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

--
-- 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(3000) 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 ape', '966a89f6-05d8-4564-b319-2f8863821e75', '2020-09-01 08: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 10:51:47', 'admin', '0000-00-00 00:00:00', '');

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

--
-- Stand-in structure for view `saved_pending_request`
-- (See below for the actual view)
--
CREATE TABLE `saved_pending_request` (
`labno` varchar(100)
,`booking_no` varchar(100)
,`name` varchar(101)
,`code` varchar(50)
,`patient_id` varchar(50)
,`status` varchar(20)
,`department` varchar(200)
,`head` varchar(100)
,`test_group` varchar(200)
,`description` varchar(200)
,`subhead` varchar(100)
);

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

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

CREATE TABLE `sensitivity_list` (
  `id` int(11) NOT NULL,
  `antibiotic` varchar(100) DEFAULT NULL,
  `facilityId` varchar(50) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT current_timestamp(),
  `created_by` varchar(50) DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL,
  `updated_by` varchar(50) DEFAULT 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 07:49:34', '', '0000-00-00 00:00:00', ''),
(2, 'Penicillin', '966a89f6-05d8-4564-b319-2f8863821e75', '2020-08-27 07:49:34', '', '0000-00-00 00:00:00', ''),
(3, 'Flucloxacillin', '966a89f6-05d8-4564-b319-2f8863821e75', '2020-08-27 07:49:34', '', '0000-00-00 00:00:00', ''),
(4, 'Tetracycline', '966a89f6-05d8-4564-b319-2f8863821e75', '2020-08-27 07:49:34', '', '0000-00-00 00:00:00', ''),
(5, 'Ampicilin', '966a89f6-05d8-4564-b319-2f8863821e75', '2020-08-27 07:49:34', '', '0000-00-00 00:00:00', ''),
(6, 'Cloxacillin', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-03-14 10:53:23', 'abdurrahman', NULL, NULL),
(7, 'Penicillin', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-03-14 10:54:23', 'abdurrahman', NULL, NULL),
(8, 'Flucloxacillin', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-03-14 10:54:32', 'abdurrahman', NULL, NULL),
(9, 'Tetracycline', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-03-14 10:54:42', 'abdurrahman', NULL, NULL),
(10, 'Ampicilin', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-03-14 10:54:50', 'abdurrahman', NULL, NULL);

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

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

CREATE TABLE `sensitivity_results` (
  `antibiotic` varchar(50) NOT NULL,
  `isolates` varchar(50) DEFAULT 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 DEFAULT 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 18:39:03'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'Consultations (Ortho, Neurosurgeon)', '', 'Income', '7000', 2, '2019-12-19 15:21:39'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'Enema', '', 'Income', '5000', 3, '2019-12-19 15:23:10'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'Surgery', '', 'Income', '0', 4, '2019-12-19 15:36:55'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'Consultation (Regular)', '', 'Income', '3000', 6, '2019-12-20 08:58:14'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'Registration (Single)', '', 'Income', '5000', 7, '2019-12-20 08:58:45'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'Registration (Family)', '', 'Income', '7000', 8, '2019-12-20 08:59:09'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'Consultation (Neurology)', '', 'Income', '8000', 9, '2019-12-20 08:59:49'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'Consultation (Specialist) F/Up', '', 'Income', '6000', 10, '2019-12-20 09:00:41'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'Consultation (Ortho, Neurosurgeon) F/Up', '', 'Income', '4000', 11, '2019-12-20 09:31:32'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'Consultation (ENT)', '', 'Income', '8000', 12, '2019-12-20 09:35:19'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'Consultation (Nephrology)', '', 'Income', '8000', 13, '2019-12-20 09:35:57'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'Consultation (Psycharist)', '', 'Income', '8000', 14, '2019-12-20 09:36:39'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'Consultation (Paediatrics)', '', 'Income', '6000', 15, '2019-12-20 09:37:07'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'Consultation (Cardiology)', '', 'Income', '8000', 16, '2019-12-20 09:37:53'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'Medication', 'Dispensed drugs, injection s and treatment', 'Income', '0', 24, '2019-12-22 09:08:36'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'Wound Dressing (Minor)', '', 'Income', '1000', 19, '2019-12-20 09:39:05'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'Wound Dressing (Major)', '', 'Income', '2000', 20, '2019-12-20 09:39:05'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'ECG', '', 'Income', '4000', 21, '2019-12-20 09:39:05'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'General Ward', '', 'Income', '7000', 25, '2019-12-22 10:15:36'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'House (White, Blue, Green)', '', 'Income', '19000', 26, '2019-12-22 10:16:59'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'PSC (0,1,2,3)', '', 'Income', '17000', 27, '2019-12-22 10:17:25'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'Private (1, 2, Yellow)', '', 'Income', '12000', 28, '2019-12-22 10:17:57'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'Professional Management', 'In-patient consultations', 'Income', '4000', 29, '2019-12-22 10:27:22'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'Investigation', '', 'Income', '0', 30, '2019-12-22 10:50:36'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'Consultation (Urology)', 'Payment before cosultation', 'Income', '8000', 31, '2019-12-22 18:17:33'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'Consultation (Orthopedic)', 'Regular Orthopedic Consultation', 'Income', '7000', 32, '2019-12-23 10:52:27'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'Orthopedic Registration (Family)', '', 'Income', '9000', 33, '2019-12-24 11:08:12'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'Ear syringing', '', 'Income', '7000', 34, '2019-12-25 15:53:20'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'Registration /Specialist Consultation (Family)', '', 'Income', '10000', 35, '2019-12-25 16:04:08'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'conversion of file', '', 'Income', '2000', 36, '2019-12-25 16:10:01'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'Orthopedic Registration', '', 'Income', '7000', 37, '2019-12-25 16:13:16'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'Uncology (Registration/Consultation)', '', 'Income', '8000', 38, '2019-12-26 13:00:06'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'Laboratory (RBS)', '', 'Income', '500', 39, '2019-12-26 13:04:08'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'Lab', '', 'Income', '0', 40, '2019-12-26 13:04:35'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'Neurosurgeon (Registration)', '', 'Income', '7000', 42, '2019-12-27 13:35:36'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'Urologist Registration', '', 'Income', '8000', 43, '2019-12-27 14:41:18'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'Theatre fee', '', 'Income', '0', 44, '2019-12-29 12:45:01'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'Implants', 'Screws and Rod', 'Income', '0', 45, '2019-12-29 12:48:29'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'Nebulizer', '', 'Income', '0', 46, '2019-12-31 07:26:37'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'Hospitalization Deposit', '', 'Income', '0', 47, '2020-01-01 18:16:05'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'Orthopaedic F/up', 'Wages', 'Income', '4000', 48, '2020-01-02 17:47:42'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'Admission', '', 'Income', '0', 49, '2020-01-03 16:29:05'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'Specialist', 'First visit', 'Income', '8000', 50, '2020-01-04 18:10:25'),
('6c6af0c0-35ea-40d8-a928-b13a9766113a', 'Wound Dressing', '', 'Consultation', '2050', 53, '2020-07-15 20:56:59'),
('6c6af0c0-35ea-40d8-a928-b13a9766113a', 'Admission', '', 'Consultation', '3000', 54, '2020-07-15 20:57:17'),
('966a89f6-05d8-4564-b319-2f8863821e75', 'Admission', '', 'Other Income', '1000', 55, '2020-08-16 08: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 08:44:33', '966a89f6-05d8-4564-b319-2f8863821e75'),
(2, 'Chemical Pathology', 'Swab', '2020-10-16 08:44:33', '966a89f6-05d8-4564-b319-2f8863821e75'),
(3, 'Hematology', 'EDTA Blood', '2020-10-16 08:44:40', '966a89f6-05d8-4564-b319-2f8863821e75'),
(4, 'Chemical Pathology', 'Serum Refrigerated', '2020-10-16 08:44:40', '966a89f6-05d8-4564-b319-2f8863821e75'),
(5, 'Hematology', 'Floride Fasting', '2020-10-16 08:50:17', '966a89f6-05d8-4564-b319-2f8863821e75'),
(6, 'Hematology', 'Urine', '2020-10-16 08:57:42', '966a89f6-05d8-4564-b319-2f8863821e75'),
(7, 'Chemical Pathology', 'Stool', '2020-10-16 08: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
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 1, 'Wellcare Pharmacy', '2020-11-28 18:42:37', 'Kano', '08034653480', '', -1000, '', ''),
('18ed9422-5a43-4ff6-8e76-1f7af2b8e977', 19, 'AJM 123 Pharmacy', '2020-04-05 18:50:40', 'Lamido Crescent', '07038349783', '01', 0, '', ''),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 13, 'Worldwide Comm Venture Ltd (Galvus Met)', '2020-01-20 19:44:37', 'Matori Lagos', '08117995324', '06', 0, '', ''),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 8, 'Abdulmaleek Medicine Store', '2020-01-20 17:31:45', 'D- line S/ Gari Kano', '08039510740', '01', 30000, '', ''),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 9, 'AJM 123 Pharmacy', '2020-01-20 17:33:44', 'Lamido Crescent', '07038349783', '02', 0, '', ''),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 10, 'Lamco', '2020-01-20 17:34:17', 'AKTH EXIT GATE', '080222000000', '03', 0, '', ''),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 11, 'Madachi Phamacy co', '2020-01-20 19:43:19', 'Bata House', '08133361456', '04', 0, '', ''),
('f24b0b8d-92bf-434e-8dd2-7d412ca002a7', 21, 'AJM 123 Pharmacy', '0000-00-00 00:00:00', 'Lamido Crescent', '09090909090', '1', 0, '', ''),
('f24b0b8d-92bf-434e-8dd2-7d412ca002a7', 31, 'Abdulmaleek Medicine Store', '0000-00-00 00:00:00', 'D-line S/ Gari Kano', '08037810040', '2', 0, '', ''),
('f24b0b8d-92bf-434e-8dd2-7d412ca002a7', 41, 'Isah bala', '0000-00-00 00:00:00', 'No 12627', '08070703646', '3', 0, '', ''),
('f24b0b8d-92bf-434e-8dd2-7d412ca002a7', 71, 'Worldwide Comm Venture Ltd (Galvus Met)1', '0000-00-00 00:00:00', 'Kano', '08034653480', '4', 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
('1', 0, 10000, '01122011', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2020-12-01 16:11:28'),
('1', 0, 5000, '01122023', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2020-12-01 16:12:57'),
('8', 30000, 0, '0409211211083', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-09-04 19:13:35'),
('1', 14000, 0, '0409211311085', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-09-04 19:26:58');

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

--
-- Table structure for table `surgeons_list`
--

CREATE TABLE `surgeons_list` (
  `id` int(11) NOT NULL,
  `name` varchar(100) NOT NULL,
  `type` varchar(50) NOT NULL,
  `facilityId` varchar(50) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `created_by` varchar(50) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `surgeons_list`
--

INSERT INTO `surgeons_list` (`id`, `name`, `type`, `facilityId`, `created_at`, `created_by`) VALUES
(1, 'Dr. Abdurrahman', 'Surgeon', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2020-09-04 14:42:09', '1'),
(11, 'Dr. Hassan Ismail', 'Surgeon', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2020-09-04 14:43:10', '1'),
(21, 'Dr. Nasiru Jinjiri', 'Surgeon', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2020-09-04 14:43:25', '1'),
(31, 'Dr. Misbahu Haruna', 'Surgeon', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2020-09-04 14:43:37', '1'),
(41, 'Dr. M. K. Abubakar', 'Surgeon', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2020-09-04 14:44:27', '1'),
(51, 'Dr. Abdullahi Orthopedic', 'Surgeon', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2020-09-04 14:44:33', '1'),
(61, 'Dr. Aluko', 'Surgeon', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2020-09-04 14:44:51', '1'),
(71, 'Dr. Ibrahim Karofi', 'Surgeon', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2020-09-04 14:46:47', '1'),
(81, 'Dr. Dalhat Salahu', 'Anesthetists', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2020-09-04 14:47:10', '1'),
(91, 'Dr. Nuhu', 'Anesthetists', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2020-09-04 14:47:34', '1'),
(101, 'Dr. Alfa', 'Anesthetists', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2020-09-04 14:47:43', '1'),
(121, 'Mal Ibrahim', 'Scrub Nurse', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2020-09-04 23:22:55', '5'),
(141, 'Dr Nasiru', 'Anesthetists', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2020-09-04 23:23:51', '5'),
(151, 'Dr Mukhtar Teli', 'Surgeon', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2020-09-06 22:49:08', '5'),
(161, 'Dr Musa Tauhid', 'Surgeon', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2020-09-06 23:16:27', '5'),
(171, 'Dr Garko', 'Anesthetists', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2020-09-06 23:16:45', '5'),
(194, 'Dr Abubakar Nagoma', 'Anesthetists', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-06-06 19:10:28', 'abdurrahman'),
(191, 'Dr Musa Ibrahim', 'Surgeon', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2020-09-06 23:18:06', '5'),
(193, 'Dr Ibrahim Abba', 'Surgeon', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-06-03 18:50:33', 'abdurrahman'),
(195, 'Dr Yakubu Orthopedics', 'Surgeon', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-06-19 11:07:51', 'abdurrahman'),
(196, 'Dr Magashi', 'Surgeon', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-06-27 15:55:29', 'abdurrahman'),
(197, 'Dr Mubarak', 'Surgeon', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-07-05 18:22:17', 'abdurrahman'),
(198, 'Dr Abubakar Musa', 'Surgeon', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-07-05 18:22:53', 'abdurrahman'),
(199, 'Dr Shobode', 'Surgeon', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-08-29 21:18:42', 'abdurrahman'),
(200, 'Mal Jamilu', 'Anesthetists', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-08-29 21:24:34', 'abdurrahman');

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

--
-- 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` date
,`transaction_date` date
,`transaction_id` int(11)
,`enteredBy` varchar(20)
,`receiptDateSN` varchar(18)
,`receiptNo` int(7)
,`modeOfPayment` varchar(15)
,`status` varchar(30)
,`approvedBy` varchar(20)
,`paymentStatus` varchar(11)
,`client_acct` varchar(200)
,`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,
  `transaction_date` date DEFAULT NULL,
  `id` int(11) DEFAULT 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) DEFAULT NULL,
  `status` varchar(30) DEFAULT 'pending',
  `approvedBy` varchar(20) DEFAULT NULL,
  `paymentStatus` varchar(11) NOT NULL DEFAULT '',
  `client_acct` varchar(200) DEFAULT NULL,
  `patient_id` varchar(50) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

INSERT INTO `transactions` (`facilityId`, `createdAt`, `transaction_id`, `transaction_date`, `id`, `description`, `acct`, `debit`, `credit`, `enteredBy`, `receiptDateSN`, `receiptNo`, `modeOfPayment`, `bank_name`, `status`, `approvedBy`, `paymentStatus`, `client_acct`, `patient_id`) VALUES
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-09-19 10:05:54', 5, '2021-09-19', NULL, 'Lipton', '20025', 0, 300, 'abdurrahman', '19092111', 1, 'Deposit', '', 'pending', NULL, '', '5989', '5989-1'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-09-19 10:05:54', 6, '2021-09-19', NULL, 'Lipton', '500021', 300, 0, 'abdurrahman', '19092111', 1, 'Deposit', '', 'pending', NULL, '', '5989', '5989-1'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-09-19 10:05:54', 7, '2021-09-19', NULL, 'amatem', '20025', 0, 400, 'abdurrahman', '19092111', 1, 'Deposit', '', 'pending', NULL, '', '5989', '5989-1'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-09-19 10:05:54', 8, '2021-09-19', NULL, 'amatem', '500021', 400, 0, 'abdurrahman', '19092111', 1, 'Deposit', '', 'pending', NULL, '', '5989', '5989-1'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-09-19 10:24:48', 9, '2021-09-19', NULL, 'amatem', '20025', 0, 400, 'abdurrahman', '19092129', 2, 'Deposit', '', 'pending', NULL, '', '5989', '5989-1'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-09-19 10:24:48', 10, '2021-09-19', NULL, 'amatem', '500021', 400, 0, 'abdurrahman', '19092129', 2, 'Deposit', '', 'pending', NULL, '', '5989', '5989-1'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-09-19 10:25:13', 11, '2021-09-19', NULL, 'amatem', '20025', 0, 1600, 'abdurrahman', '190921311', 3, 'cash', '', 'pending', NULL, '', '5989', ''),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-09-19 10:25:13', 12, '2021-09-19', NULL, 'amatem', '400021', 1600, 0, 'abdurrahman', '190921311', 3, 'cash', '', 'pending', NULL, '', '5989', ''),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-09-20 09:43:26', 13, NULL, NULL, 'Deposit from account null', '400022', 0, 0, 'abdurrahman', '200921113', 1, '', '', 'pending', NULL, '', NULL, NULL),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-09-20 09:43:26', 14, NULL, NULL, 'Deposit from account null', '500021', 0, 0, 'abdurrahman', '200921113', 1, '', '', 'pending', NULL, '', NULL, NULL),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-09-20 09:43:54', 15, NULL, NULL, 'Deposit from account 1', '400022', 0, 0, 'abdurrahman', '200921215', 2, '', '', 'pending', NULL, '', '1', '1'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-09-20 09:43:54', 16, NULL, NULL, 'Deposit from account 1', '500021', 0, 0, 'abdurrahman', '200921215', 2, '', '', 'pending', NULL, '', '1', '1'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-09-21 12:18:23', 17, '2021-09-21', NULL, 'amatem', '20025', 0, 400, 'abdurrahman', '210921317', 3, 'Deposit', '', 'pending', NULL, '', '1', '1-1'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-09-21 12:18:23', 18, '2021-09-21', NULL, 'amatem', '400023', 400, 0, 'abdurrahman', '210921317', 3, 'Deposit', '', 'pending', NULL, '', '1', '1-1'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-09-21 12:18:23', 19, '2021-09-21', NULL, 'Lipton', '20025', 0, 300, 'abdurrahman', '210921317', 3, 'Deposit', '', 'pending', NULL, '', '1', '1-1'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-09-21 12:18:23', 20, '2021-09-21', NULL, 'Lipton', '400023', 300, 0, 'abdurrahman', '210921317', 3, 'Deposit', '', 'pending', NULL, '', '1', '1-1'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-09-22 06:08:49', 21, NULL, NULL, 'Deposit from account 2', '400022', 0, 0, 'abdurrahman', '220921121', 1, '', '', 'pending', NULL, '', '2', '2'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-09-22 06:08:49', 22, NULL, NULL, 'Deposit from account 2', '500021', 0, 0, 'abdurrahman', '220921121', 1, '', '', 'pending', NULL, '', '2', '2'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-09-22 06:15:29', 23, NULL, NULL, 'Deposit from account 3', '400022', 0, 0, 'abdurrahman', '220921223', 2, '', '', 'pending', NULL, '', '3', '3'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-09-22 06:15:29', 24, NULL, NULL, 'Deposit from account 3', '500021', 0, 0, 'abdurrahman', '220921223', 2, '', '', 'pending', NULL, '', '3', '3'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-09-22 07:39:06', 25, NULL, NULL, 'Deposit from account 4', '400022', 0, 0, 'abdurrahman', '220921325', 3, '', '', 'pending', NULL, '', '4', '4'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-09-22 07:39:06', 26, NULL, NULL, 'Deposit from account 4', '500021', 0, 0, 'abdurrahman', '220921325', 3, '', '', 'pending', NULL, '', '4', '4'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-09-22 07:50:32', 27, NULL, NULL, 'Deposit from account 5', '400022', 0, 0, 'abdurrahman', '220921427', 4, '', '', 'pending', NULL, '', '5', '5'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-09-22 07:50:32', 28, NULL, NULL, 'Deposit from account 5', '500021', 0, 0, 'abdurrahman', '220921427', 4, '', '', 'pending', NULL, '', '5', '5'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-09-22 08:03:37', 29, '2021-09-22', NULL, 'Admission in PSC 1 for 0 days', '', 0, 0, 'abdurrahman', '220921529', 5, 'deposit', '', 'pending', NULL, '', '5', '5-1'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-09-22 08:03:37', 30, '2021-09-22', NULL, 'Admission in PSC 1 for 0 days', '500021', 0, 0, 'abdurrahman', '220921529', 5, 'deposit', '', 'pending', NULL, '', '5', '5-1'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-09-22 08:09:42', 31, '2021-09-22', NULL, 'Admission in Blue House for 0 days', '', 0, 0, 'abdurrahman', '220921631', 6, 'deposit', '', 'pending', NULL, '', '2', '2-1'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-09-22 08:09:42', 32, '2021-09-22', NULL, 'Admission in Blue House for 0 days', '500021', 0, 0, 'abdurrahman', '220921631', 6, 'deposit', '', 'pending', NULL, '', '2', '2-1'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-09-22 08:09:50', 33, '2021-09-22', NULL, 'Admission in Private 1 for 0 days', '', 0, 0, 'abdurrahman', '220921733', 7, 'deposit', '', 'pending', NULL, '', '3', '3-1'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-09-22 08:09:50', 34, '2021-09-22', NULL, 'Admission in Private 1 for 0 days', '500021', 0, 0, 'abdurrahman', '220921733', 7, 'deposit', '', 'pending', NULL, '', '3', '3-1'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-09-22 08:09:54', 35, '2021-09-22', NULL, 'Admission in Yellow   for 0 days', '', 0, 0, 'abdurrahman', '220921835', 8, 'deposit', '', 'pending', NULL, '', '4', '4-1'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-09-22 08:09:54', 36, '2021-09-22', NULL, 'Admission in Yellow   for 0 days', '500021', 0, 0, 'abdurrahman', '220921835', 8, 'deposit', '', 'pending', NULL, '', '4', '4-1'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-09-26 06:16:49', 37, NULL, NULL, 'Deposit from account 6', '400021', 0, 0, 'abdurrahman', '260921137', 1, 'Cash', '', 'pending', NULL, '', '6', '6'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-09-26 06:16:49', 38, NULL, NULL, 'Deposit from account 6', '500021', 0, 0, 'abdurrahman', '260921137', 1, 'Cash', '', 'pending', NULL, '', '6', '6'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-09-26 07:27:25', 39, NULL, NULL, 'Deposit from account 7', '400022', 0, 0, 'abdurrahman', '260921239', 2, '', '', 'pending', NULL, '', '7', '7'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-09-26 07:27:25', 40, NULL, NULL, 'Deposit from account 7', '500021', 0, 0, 'abdurrahman', '260921239', 2, '', '', 'pending', NULL, '', '7', '7'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-09-26 08:55:25', 41, '2021-09-26', NULL, 'Lipton', '20025', 0, 554, 'abdurrahman', '260921341', 3, 'Deposit', '', 'pending', NULL, '', '1', '1-1'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-09-26 08:55:25', 42, '2021-09-26', NULL, 'Lipton', '400023', 554, 0, 'abdurrahman', '260921341', 3, 'Deposit', '', 'pending', NULL, '', '1', '1-1'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-09-26 08:55:26', 43, '2021-09-26', NULL, 'amatem', '20025', 0, 1000, 'abdurrahman', '260921341', 3, 'Deposit', '', 'pending', NULL, '', '1', '1-1'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-09-26 08:55:26', 44, '2021-09-26', NULL, 'amatem', '400023', 1000, 0, 'abdurrahman', '260921341', 3, 'Deposit', '', 'pending', NULL, '', '1', '1-1'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-09-28 10:32:14', 45, NULL, NULL, 'Deposit from account 8', '400022', 0, 0, 'abdurrahman', '280921145', 1, '', '', 'pending', NULL, '', '8', '8'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-09-28 10:32:14', 46, NULL, NULL, 'Deposit from account 8', '500021', 0, 0, 'abdurrahman', '280921145', 1, '', '', 'pending', NULL, '', '8', '8'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-09-28 10:38:07', 47, '2021-09-28', NULL, 'amatem', '20025', 0, 1000, 'abdurrahman', '280921247', 2, 'Deposit', '', 'pending', NULL, '', '8', '8-1'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-09-28 10:38:07', 48, '2021-09-28', NULL, 'amatem', '400023', 1000, 0, 'abdurrahman', '280921247', 2, 'Deposit', '', 'pending', NULL, '', '8', '8-1'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-09-28 10:38:07', 49, '2021-09-28', NULL, 'Lipton', '20025', 0, 554, 'abdurrahman', '280921247', 2, 'Deposit', '', 'pending', NULL, '', '8', '8-1'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-09-28 10:38:07', 50, '2021-09-28', NULL, 'Lipton', '400023', 554, 0, 'abdurrahman', '280921247', 2, 'Deposit', '', 'pending', NULL, '', '8', '8-1'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-09-28 10:39:50', 51, '2021-09-28', NULL, 'Admission in Private 1 for 0 days', '', 0, 0, 'abdurrahman', '280921351', 3, 'deposit', '', 'pending', NULL, '', '8', '8-1'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-09-28 10:39:50', 52, '2021-09-28', NULL, 'Admission in Private 1 for 0 days', '400023', 0, 0, 'abdurrahman', '280921351', 3, 'deposit', '', 'pending', NULL, '', '8', '8-1'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-10-01 05:57:07', 53, '2021-10-01', NULL, 'amatem', '20025', 0, 1000, 'abdurrahman', '011021153', 1, 'Deposit', '', 'pending', NULL, '', '2', '2-1'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-10-01 05:57:07', 54, '2021-10-01', NULL, 'amatem', '400023', 1000, 0, 'abdurrahman', '011021153', 1, 'Deposit', '', 'pending', NULL, '', '2', '2-1'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-10-01 05:57:07', 55, '2021-10-01', NULL, 'Folic Acid', '20025', 0, 440, 'abdurrahman', '011021153', 1, 'Deposit', '', 'pending', NULL, '', '2', '2-1'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-10-01 05:57:07', 56, '2021-10-01', NULL, 'Folic Acid', '400023', 440, 0, 'abdurrahman', '011021153', 1, 'Deposit', '', 'pending', NULL, '', '2', '2-1'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-10-01 05:57:07', 57, '2021-10-01', NULL, 'Lipton', '20025', 0, 554, 'abdurrahman', '011021153', 1, 'Deposit', '', 'pending', NULL, '', '2', '2-1'),
('1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', '2021-10-01 05:57:07', 58, '2021-10-01', NULL, 'Lipton', '400023', 554, 0, 'abdurrahman', '011021153', 1, 'Deposit', '', 'pending', NULL, '', '2', '2-1');

--
-- 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 12:03:14'),
(9, '', 'Revenue', 'Cash', '6c6af0c0-35ea-40d8-a928-b13a9766113a', '40', '2020-08-17 07:13:26'),
(10, '', 'Registration & Testing fees', 'Cash', '966a89f6-05d8-4564-b319-2f8863821e75', '41', '2020-08-28 09: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;

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

--
-- Stand-in structure for view `transaction_view`
-- (See below for the actual view)
--
CREATE TABLE `transaction_view` (
`facilityId` varchar(50)
,`createdAt` date
,`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)
,`createdAt` date
,`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` date
,`created_at` date
,`enteredBy` varchar(20)
,`receiptDateSN` varchar(18)
,`receiptNo` int(7)
,`modeOfPayment` varchar(15)
,`client_acct` varchar(200)
);

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

--
-- 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(2000) DEFAULT NULL,
  `username` varchar(255) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `prefix` varchar(50) DEFAULT NULL,
  `userType` varchar(10) DEFAULT NULL,
  `serviceCost` varchar(10) DEFAULT NULL,
  `licenceNo` varchar(50) DEFAULT NULL,
  `placeOfWork` varchar(100) 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) DEFAULT NULL,
  `paymentAmount` int(11) DEFAULT NULL,
  `referralId` varchar(50) DEFAULT NULL,
  `lastLogin` varchar(20) DEFAULT NULL,
  `image` varchar(255) DEFAULT NULL,
  `createdAt` datetime DEFAULT NULL,
  `updatedAt` datetime DEFAULT NULL,
  `facilityId` varchar(50) NOT NULL,
  `createdBy` varchar(50) DEFAULT NULL,
  `department` varchar(50) DEFAULT NULL,
  `functionality` varchar(2000) DEFAULT NULL,
  `branch_name` varchar(50) DEFAULT 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`, `placeOfWork`, `password`, `status`, `loggedIn`, `availableDays`, `availableFromTime`, `availableToTime`, `address`, `phone`, `paymentMethod`, `paymentAmount`, `referralId`, `lastLogin`, `image`, `createdAt`, `updatedAt`, `facilityId`, `createdBy`, `department`, `functionality`, `branch_name`) VALUES
(1, 'Mustapha', 'Issa', 8, 'Developer', 'Surgery', 'Records,Doctors,Account,Pharmacy,Lab,Admin,Operation,Theater,Maintenance', '', 'emaitee', 'issatoyin@gmail.com', NULL, 'admin', '5000', NULL, NULL, '$2a$10$mPqL/ehjm7v5UIy0pG9FFeWa1vfzfWo05.KyYHn/L3hmjoF8yM0vS', 'approved', NULL, NULL, NULL, NULL, 'Kano', '07062942291', NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2019-10-11 19:08:28', '2019-10-11 19:08:28', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', NULL, 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', NULL),
(2, 'Sam', 'Pius', 8, 'Developer', NULL, 'Records,Doctors,Account,Pharmacy,Lab,Admin,Operation,Theater,Maintenance,Nurse', '', 'sammie', 'samsonpius@gmail.com', NULL, NULL, NULL, NULL, NULL, '$2a$10$9PVSwNYnpnc0I9MGzV5VeeLqqrM1oNH9B/uvqc9F28/0msIUIH9MW', 'approved', NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2019-12-02 18:05:19', '2019-12-02 18:05:19', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', NULL, NULL, NULL, NULL),
(3, 'Isah', 'Muhd', 4, 'Developer', NULL, 'Records,Doctors,Account,Pharmacy,Lab,Admin,Operation,Theater,Maintenance,Nurse', '', 'isahboy', 'isahboy@gmail.com', NULL, NULL, NULL, NULL, NULL, '$2a$10$c4ST/4CkMe0/emlRNcelmuJiQH1ExriJJ1P0lZvqjpxTRbDpyn2tC', 'approved', NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2019-12-02 18:40:13', '2019-12-02 18:40:13', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', NULL, NULL, NULL, NULL),
(5, 'Abdurrahman', 'Nasir', 8, 'Doctor', 'Neurosurgery', 'Records,Accounts,Admin,Doctors,Theater,Laboratory,Reports,Pharmacy,Nurse', '', 'abdurrahman', 'drmuhsin@live.com', 'AN', 'admin', NULL, NULL, NULL, '$2a$10$H0F7Gm3KYYRk.ISxcWksYet9JSBtI3PbZf47Ss3BKBMkdmaJph.f2', 'approved', NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2019-12-06 04:14:07', '2019-12-06 04:14:07', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', NULL, NULL, 'Add New Patient,Bed Allocation,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,Cash Handover,Create User,Manage Users,Settings,Patient List,Appointments,Consultations,Lab Results,Video Chat,Add New Account Note,Dashboard,Setup Lab Test,Registrations,Client Registrations,Antibiotics Form,Report Summary,Inventory Overview,Analytics,Daily Sales,Profit,Suppliers Overview,Drug Sales,Drug Dispensary,Store Record,Returned Drugs,Manage Suppliers,Drug List,Sample Analysis,Account Review,Drug Schedule,Nursing Report,Lab Archive,In-Patient Vitals,In-Patients,Out-Patient Prescriptions,Nursing Requests', NULL),
(11, 'Ibrahim', 'Jubril', 4, 'Manager', NULL, 'Accounts,Pharmacy,Reports,Laboratory,Doctors,Records,Nurse,Theater', '', 'Manager', 'ibrahim@pscprime.com', NULL, NULL, NULL, NULL, NULL, '$2a$10$TSiuyaQj1CGn4Kj1zMqb7epDAO.av30M5EFfOrK/joMpVdTL5Aj9C', 'approved', NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2019-12-07 11:31:21', '2019-12-07 11:31:21', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', NULL, NULL, 'Hospital Billings,Record Expenses,Create/Edit Services,Account Statement,Generate Account Report,Make Deposit,Setup Account Chart,Drug Sales,Drug Dispensary,Returned Drugs,Manage Suppliers,Drug List,Dashboard,Report Summary,Inventory Overview,Analytics,Daily Sales,Profit,Suppliers Overview,Registrations,Sample Analysis,Setup Lab Test,Antibiotics Form,Patient List,Appointments,Consultations,Lab Results,Video Chat,Client Registrations,Report Form,Store Record,Add New Patient,Bed Allocation,Account Review,In-Patient Vitals,Drug Schedule,Nursing Report,Add New Account Note', NULL),
(14, 'Fahad', 'Ado', 4, 'Developer', NULL, 'Records,Account,Pharmacy,Lab,Admin,Doctors,Theater,Maintenance', '', '8790fahad', '8790fahadado@gmail.com', NULL, NULL, NULL, NULL, NULL, '$2a$10$jDIOqVdkgccu2rBLtZ1Uw.2luU/5ZovyApZTbZiHjZgrswMPUaDFy', 'approved', NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2019-12-09 16:11:49', '2019-12-09 16:11:49', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', NULL, NULL, NULL, NULL),
(17, 'Kemi', 'Momo', 4, 'Receptionist', NULL, 'Records,Accounts', '', 'Kemi', 'kemi@pscprime.com', NULL, NULL, NULL, NULL, NULL, '$2a$10$PJ4zTcAtx62PJTTVpRtN/uU5TyAZfqyGD20Qij1V.fMdg7I8RMYf6', 'approved', NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2019-12-22 15:54:18', '2019-12-22 15:54:18', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', NULL, NULL, 'Add New Patient,Bed Allocation,Hospital Billings,Make Deposit,Record Expenses', NULL),
(18, 'Patience', 'Samuel', 4, 'Receptionist', 'null', 'Records,Accounts', '', 'Patience', '', NULL, NULL, 'null', NULL, NULL, '$2a$10$V3Uxge6Rim1lf5vJcf2oHuHQLhIYYx8A/wRsfkqHdg.dK3pA5VzHi', 'approved ', NULL, NULL, NULL, NULL, 'Kawo Busstop', '', NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1607936234/mylikita/profile_images/Dr%20Sharif.pdf.png', '2019-12-22 15:59:50', '2020-12-14 08:57:17', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', NULL, NULL, 'Add New Patient,Bed Allocation,Hospital Billings,Make Deposit,Record Expenses', NULL),
(22, 'PSC', 'Admin', 4, 'Admin', NULL, 'Records,Doctors,Account,Pharmacy,Lab,Admin,Operation,Theater,Maintenance,Nurse', '', 'psc_admin', '', NULL, NULL, NULL, NULL, NULL, '$2a$10$JqXl5llx/cNnfLTFzcvhcOkH4IfG3w2Wib8eiq0ADXvlbLNNDgYwG', 'approved ', NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-01-06 05:23:53', '2021-03-23 21:49:34', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', NULL, NULL, NULL, NULL),
(24, 'Doctor', 'Likita', 4, 'Doctor', 'General', 'Doctors,Theater', '', 'Likita', 'likita@pscprime.com', NULL, NULL, NULL, NULL, NULL, '$2a$10$CNF2E/py0J/F9keg1tIKX.gRmu7cnddg7fIWe18ErP44J8lV1vM/i', 'approved ', NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-01-07 22:21:13', '2021-03-23 22:06:22', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', NULL, NULL, NULL, NULL),
(26, 'Hassan', 'Ismail', 4, 'Doctor', 'Neurosurgeon', 'Doctors', '', 'Hassan', 'h.ismail@pscprime.com', NULL, NULL, NULL, NULL, NULL, '$2a$10$905hmCv5R/AJuYhDEPIDSO0Q5oAfRTL/J2c.yNX.3zfnOitJNwwXa', 'approved ', NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-02-02 15:15:34', '2021-03-23 22:06:31', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', NULL, NULL, 'Patient List,Appointments,Consultations,Lab Results,Video Chat', NULL),
(29, 'Isah', 'Muhammad Rabiu', 4, 'Admin', NULL, 'Pharmacy,Account,Admin', '', 'isahboy01', '', NULL, NULL, NULL, NULL, NULL, '$2a$10$jAnsQNTfzUqqXXZvCBxRceHPYhNj6GID/5GrHD5w5vmrU8n3U5zcW', 'approved', NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-03-13 20:00:05', '2020-03-13 20:00:05', 'b8823207-58e1-438c-bb62-f3c6c16d8d3d', NULL, NULL, NULL, NULL),
(31, 'Musa', 'Ibrahim', 4, 'Doctor', 'Neurosurgeon', 'Doctors,Theater,Records,Account,Pharmacy,Lab', '', 'Musa', 'musa@pscprime.com', NULL, NULL, NULL, NULL, NULL, '$2a$10$yuszlJbsQdjijIf4vC26RuljXRZFYR2zCQvna8hmrQkhYwwkSC0Ba', 'approved', NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-03-29 19:42:15', '2020-03-29 19:42:15', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', NULL, NULL, NULL, NULL),
(32, 'Demo', 'Pharmacy', 4, 'Admin', NULL, 'Pharmacy,Account,Admin', '', 'demo_pharm', '', NULL, NULL, NULL, NULL, NULL, '$2a$10$/Ki/uaEZyTKHZxk.xWclhO5BvkFJ0MOO6FHgaaWC7dzbovbuk.6T6', 'approved', NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-04-05 18:46:50', '2020-04-05 18:46:50', '18ed9422-5a43-4ff6-8e76-1f7af2b8e977', NULL, NULL, NULL, NULL),
(33, 'Doctor', 'Doctor', 4, 'Doctor', 'General', 'Records,Doctors,Theater,Account', '', 'doctor', '', NULL, 'LEAD', NULL, NULL, NULL, '$2a$10$oFcx03qz5BOOtG07iIEOfudVOhSd4C6iqgJrQap4b38WVt49cX8sm', 'suspended ', NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, 'ckb53ogmy00000nx6ci0z5l4s', NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-04-09 19:39:19', '2021-03-23 22:06:40', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', NULL, NULL, NULL, NULL),
(34, 'Mustapha', 'Bash', 4, 'Doctor', 'General', 'Doctors', '', 'bash', 'bashar@yy.com', 'BASH', NULL, '2000', NULL, NULL, '$2a$10$UwVpUi.Ma4JFWQIWcRv94uo7zqhEEuae9aFrfdmE5q1LJ8s4E8ZNS', 'suspended ', NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-05-01 14:51:26', '2021-02-08 10:38:51', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', NULL, NULL, NULL, NULL),
(41, 'Samson', 'Pius', 4, 'Receptionist', '', 'Laboratory,Accounts,Admin,Human Resource', '', 'admin', 'sam@pharm.com', NULL, 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,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', NULL),
(51, 'Idris', 'Dangana', 4, 'Manager', '', 'Laboratory', '', 'idris', '', NULL, 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', NULL),
(56, 'hematology', 'test', 4, 'Technician', '', 'Laboratory', '', 'hematology', 'hematology@optimum.com', NULL, 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', NULL),
(57, 'chemical', 'pathology', 4, 'Technician', '', 'Laboratory', '', 'chemistry', 'chemistry@gmail.com', NULL, 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', NULL),
(58, 'Doctor', 'Doctor', 4, 'Doctor', 'ENT', 'Laboratory', '', 'doctor', 'doctor@optimum.com', NULL, 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', NULL),
(59, 'Sample', 'Collection', 4, 'Sample Collector', '', 'Laboratory', '', 'collection', 'collection@optimum.com', NULL, 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', NULL),
(60, 'Microbiology', 'tech', 4, 'Technician', '', 'Laboratory', '', 'microbiology', 'microbiology@optimum.com', NULL, 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', NULL),
(61, 'Radiology', 'tech', 4, 'Technician', '', 'Laboratory', '', 'radiology', 'radiology@optimum.com', NULL, 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', NULL),
(62, 'Abubakar', 'Aminu', 4, 'Receptionist', '', 'Laboratory', '', 'abu', 'abu@hotmail.com', NULL, NULL, NULL, NULL, NULL, '$2a$10$ZrR4EM9TbfgBwK7jqO0fyuaRLAq6Fow9K4kX.iSvXJpfU8dPqclBS', '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-31 11:28:49', '2020-12-04 07:30:24', '966a89f6-05d8-4564-b319-2f8863821e75', 'admin', 'Microbiology', 'Setup Lab Test', NULL),
(71, 'Adewale', 'Murtala', 4, 'Developer', NULL, 'Records,Pharmacy,Lab,Admin,Doctors,Theater,Account,Maintenance', '', 'murtala', 'adewalemurthador@gmail.com', NULL, NULL, NULL, NULL, NULL, '$2a$10$UA8wfiANY94EX9BYfbrHc.h.qISfBymKx7lhSs5s4R6Kcljt7gsIm', 'approved', NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-05-13 16:22:27', '2020-05-13 16:22:27', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', NULL, NULL, NULL, NULL),
(101, 'Dangana', NULL, 4, 'Doctor', NULL, 'Doctors', '', 'Dangana', 'dangana@di-hub.com', NULL, NULL, NULL, NULL, NULL, '$2a$10$2bo9/ncpSDiYwFKGMJ/pme92vXBgy2fe4L3UK4HTyEvg4Ud2rmNW6', 'suspended ', NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-05-14 07:41:38', '2020-06-06 14:04:08', 'doctors', NULL, NULL, 'Patient List,Appointments,Consultations,Lab Results,Video Chat', NULL),
(111, 'Dangana', NULL, 4, 'Doctor', NULL, 'Doctors', '', 'Dangana1', 'dangana@di-hub.com', NULL, NULL, NULL, NULL, NULL, '$2a$10$Qt2WaHo9LIb4gotwdFMMw.s9cZ7KXkC.nh./vtBVSEQdVUhQRVlkG', 'suspended ', NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-05-14 21:04:24', '2020-06-06 14:01:58', 'doctors', NULL, NULL, 'Patient List,Appointments,Consultations,Lab Results,Video Chat', NULL),
(281, 'Akinyemi', NULL, 4, 'Doctor', 'Neurosurgery', 'Doctors', '', 'emaitee2', 'issa.emaitee@gmail.com', 'ADW', NULL, NULL, '0993774774', NULL, '$2a$10$FAHoANZl0VLm0ItF.cqPveUsZqKncxm8dlhApJarw9jWEWBDeE0Ye', 'suspended ', NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-05-16 19:40:06', '2020-06-19 11:04:23', 'doctors', NULL, NULL, 'Patient List,Appointments,Consultations,Lab Results,Video Chat', NULL),
(291, 'Akinyemi', 'Salam', 4, 'Doctor', 'Neurosurgery', 'Doctors', '', 'wasiu', 'pick4me2019@gmail.com', 'WAS', 'admin', '300', '0993774774', NULL, '$2a$10$tSqe9cWSEpga8Cw24j35AuQpyXj8kgliZxYsyCRmuWcGX7kr5s96y', 'approved', NULL, 'Monday,Tuesday,Wednesday', '08:00', '09:00', 'Kano', '07062942291', NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-05-17 16:16:18', '2020-06-24 22:13:41', 'doctors', NULL, NULL, 'Patient List,Appointments,Consultations,Lab Results,Video Chat', NULL),
(301, 'Charles', 'Umeh', 4, 'Doctor', 'Surgery', 'Doctors', '', 'noblesmathsmagic', 'noblesmathsmagic@gmail.com', 'Dr', NULL, NULL, 'FM80333', NULL, '$2a$10$IDgV4OR1klo0p5fXJ.wi7uat7E9oq1KIbUx2UaK92iAIX19OQi.IG', 'approved', NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-05-20 17:45:18', '2020-05-20 17:45:18', 'doctors', NULL, NULL, 'Patient List,Appointments,Consultations,Lab Results,Video Chat', NULL),
(321, 'Adewale', 'Muritala Akinyemi', 4, 'Doctor', 'ENT', 'Doctors', '', 'muritala', 'adwale1@gmail.com', 'MUR', 'LEAD', '3000', '2345678i99io', NULL, '$2a$10$ZbJjoxy5Ma5QfYkwqCExG.lSZNYqjatHVOBbnChNV2T9HiaEaTtS2', 'approved', NULL, 'Sunday,Tuesday,Thursday', '14:30', '17:04', 'Nassarawa, Kano', '08063847421', NULL, NULL, 'ckazcouxy00000nylb5fj6ku7', NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593621121/mylikita/profile_images/130780-ORLRD3-583.jpg.png', '2020-05-22 20:43:58', '2020-07-01 16:32:07', 'doctors', NULL, NULL, 'Patient List,Appointments,Consultations,Lab Results,Video Chat', NULL),
(331, 'Demo', 'User', 4, 'Demo', '', 'Records,Pharmacy,Theater,Account,Doctors', '', 'demo_user', 'user@demo.com', NULL, NULL, NULL, NULL, NULL, '$2a$10$XeQ1ju3.FlIJOzaGOwLYSOWnldQXfnOET6Ue.Du.4zuUohLLHL8sq', 'approved', NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-05-22 21:09:10', '2020-05-22 21:09:10', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', NULL, NULL, NULL, NULL),
(341, 'My', 'Likita', 4, 'Doctor', '', 'Doctors', '', 'mylikita', 'mylikita@gmail.com', 'MLT', 'LEAD', NULL, '70000', NULL, '$2a$10$x5NHTHDxvXFJxUmjPnFtb.O8fEwjgDU1kFYFPAJ339bvck2WQjucG', 'approved', NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, 'ckb187egh00010nxu9stwd9hf', NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-05-24 09:31:49', '2020-06-04 20:22:16', 'doctors', NULL, NULL, 'Patient List,Appointments,Consultations,Lab Results,Video Chat', NULL),
(361, 'Musa', 'Ibrahim', 4, 'Doctor', '', 'Doctors', '', 'Musa Ibrahim', 'zarenawa1@yahoo.com', 'MIZ', 'LEAD', NULL, '25139', NULL, '$2a$10$L3gUh6RhPOCDZ9GcpIxE6eZ75dH8/NwLaOPTY6YlW5xJcaoYgYqBu', 'approved ', NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, 'ckaztpsiu00010ntcf7g998ld', NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-05-26 19:33:39', '2020-06-06 14:23:07', 'doctors', NULL, NULL, 'Patient List,Appointments,Consultations,Lab Results,Video Chat', NULL),
(371, 'Shaheeda', 'Labaran', 4, 'Doctor', '', 'Doctors', '', 'shahidafalab@yahoo.com', 'shahidafalab@yahoo.com', 'SLF', NULL, NULL, '69393', NULL, '$2a$10$EiCiRU8vrraEEgCml6B0w.zT2Zd5oW2EIDYY0KO.TGWUrv5vJ0OM6', 'approved', NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-05-27 16:06:03', '2020-05-27 16:06:03', 'doctors', NULL, NULL, 'Patient List,Appointments,Consultations,Lab Results,Video Chat', NULL),
(381, '', 'Murtala', 4, 'Doctor', '', 'Doctors', '', 'drabukur', 'alabukury@yahoo.com', 'MURY', 'LEAD', NULL, '69384', NULL, '$2a$10$hyG10hW08WZa745IzgMMI.EVN6VoIvBQxlFmPOicWdGc.ARYZqujO', 'approved', NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, 'ckb1870bp00000nxu44xgcp7p', NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-05-28 13:27:57', '2020-06-04 20:21:57', 'doctors', NULL, NULL, 'Patient List,Appointments,Consultations,Lab Results,Video Chat', NULL),
(411, 'Suleiman', '', 4, 'Doctor', '', 'Doctors', '', 'Sallau19', 'manusallau@gmail.com', 'SBS019', NULL, NULL, '67415', NULL, '$2a$10$ritRnbY/75cvumJIf0ehseiIYC/57DM9jleNjRXqiMKxzk9U7FMPS', 'approved', NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-05-29 15:07:01', '2020-05-29 15:07:01', 'doctors', NULL, NULL, 'Patient List,Appointments,Consultations,Lab Results,Video Chat', NULL),
(421, 'Godpower', 'Michael', 4, 'Doctor', '', 'Doctors', '', 'gcmichael ', 'drgcmichael@gmail.com', 'GCM', NULL, NULL, '30398', NULL, '$2a$10$XQN2QiRlRThKmtM8f108eewTwa.sU/KhDec2G55fwSdb7KO2R7SUu', 'approved', NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-05-30 13:29:55', '2020-05-30 13:29:55', 'doctors', NULL, NULL, 'Patient List,Appointments,Consultations,Lab Results,Video Chat', NULL),
(431, 'Shaima\'u', 'Munir', 4, 'Doctor', '', 'Doctors', '', 'Shaima', 'munirshaimau@gmail.com', 'SMM', NULL, NULL, '45017', NULL, '$2a$10$fL6LTxsbyEoL2TeFvrc.me.qIgsbADK/BKwHAbvvpy5rB8DIdcuMC', 'approved', NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-05-30 14:17:18', '2020-05-30 14:17:18', 'doctors', NULL, NULL, 'Patient List,Appointments,Consultations,Lab Results,Video Chat', NULL),
(451, 'Malam', 'Likita', 4, 'Doctor', '', 'Doctors', '', 'malamlikita', 'malamlikita@gmail.com', 'DML', NULL, NULL, '70994', NULL, '$2a$10$1A1J3nab9/eXKEmRknE/Q.PO/.5Dptn4ns8rviP2OMqLk81W9DgYO', 'approved', NULL, NULL, NULL, NULL, NULL, '08034653480', NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-05-30 15:32:11', '2020-05-30 15:32:11', 'doctors', NULL, NULL, 'Patient List,Appointments,Consultations,Lab Results,Video Chat', NULL),
(461, 'Abdulgafar', 'Lekan', 4, 'Doctor', '', 'Doctors', '', 'Abdulgafar', 'abdulgafarolawumi@yahoo.com', 'ALO', NULL, NULL, '56941', NULL, '$2a$10$Xd4/.xeZ6iEorIBrRs4DDObR4jf23uzAEt5hQZ0dPQ6.7NSGo.xwK', 'approved', NULL, NULL, NULL, NULL, NULL, '8035110923', NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-06-01 08:39:52', '2020-06-01 08:39:52', 'doctors', NULL, NULL, 'Patient List,Appointments,Consultations,Lab Results,Video Chat', NULL),
(471, 'Dadasdasd', NULL, 4, 'Doctor', 'DASAS', 'Doctors', '', 'asdasdasasdaSSAAS', 'DAS', 'S', NULL, NULL, 'ASDASDa', NULL, '$2a$10$OWVGyw5vPCOMGlwfhGeQIeRu3WSjXHdP93u3fqESc5VfVXtCcvR/u', 'pending', NULL, NULL, NULL, NULL, NULL, '0909090903', NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-06-03 13:42:56', '2020-06-03 13:42:56', 'doctors', '12345', NULL, 'Patient List,Appointments,Consultations,Lab Results,Video Chat', NULL),
(481, 'BABA', NULL, 4, 'Doctor', 'Neurosurgery', 'Doctors', '', 'BABA', 'WDEFWFWEFEF@gmail.com', 'S', NULL, NULL, 'ASDASDa', NULL, '$2a$10$7wSQtKSZb2aMXTtK0BhWIuoj2D1imn779anWstOmBKDoDVKPblIMG', 'pending', NULL, NULL, NULL, NULL, NULL, '0909090903', NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-06-03 13:44:47', '2020-06-03 13:44:47', 'doctors', '12345', NULL, 'Patient List,Appointments,Consultations,Lab Results,Video Chat', NULL),
(491, 'USMAN', 'MOHAMMED', 4, 'Doctor', 'Surgery', 'Doctors', '', 'bellom01', 'belloum01@yahoo.co.uk', 'UMB', NULL, NULL, '5423', NULL, '$2a$10$.8M69Uk5KbTVP1jgiHwf7ehfx.yEL9/9TCkYMzjDVysRTPsx9CcEO', 'approved ', NULL, NULL, NULL, NULL, NULL, '08036893332', NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-06-21 15:43:45', '2020-06-21 15:45:24', 'doctors', '', NULL, 'Patient List,Appointments,Consultations,Lab Results,Video Chat', NULL),
(501, 'Demo', 'User', 4, 'Admin', NULL, 'Records,Doctors,Account,Pharmacy,Lab,Admin,Operation,Theater,Maintenance,Nurse', '', 'demo', 'issa.emaitee@gmail.com', NULL, NULL, NULL, NULL, NULL, '$2a$10$sti4/iOG1VMD9s48MpKYEepgRvrDIFPpqHNuKvwWyc9/aIdXMrQdq', 'approved', NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-06-22 08:45:56', '2020-07-15 11:04:57', 'f24b0b8d-92bf-434e-8dd2-7d412ca002a7', NULL, NULL, NULL, NULL),
(511, 'Akinpelu', 'Muritala ', 4, 'Doctor', 'Surgery', 'Doctors', '', 'akinpelu', 'adewalemurthador@gmail.com', NULL, NULL, NULL, NULL, NULL, '$2a$10$jVWkk4HKyuluHAQahE1AC.K.Uzh/uhN0DJqGm0xshbBk1kOx6kMJq', 'approved', NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-06-22 17:56:08', '2020-07-15 11:05:21', 'f24b0b8d-92bf-434e-8dd2-7d412ca002a7', NULL, NULL, NULL, NULL),
(521, 'Adewale,dm', 'Akinyemimkds', 4, NULL, NULL, 'Records,Doctors,Account,Pharmacy,Lab,Admin,Operation,Theater,Maintenance,Nurse', '', 'ertyuio', 'adewalemurthasddor@gmail.com', NULL, NULL, NULL, NULL, NULL, '$2a$10$.JFm1uQpfq.Mmy.xdaD.xul9zkb.IPSudplKDmalV31pC95O/LO8e', 'pending', NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-06-23 21:42:27', '2020-06-23 21:42:27', '', NULL, NULL, NULL, NULL),
(531, 'Adewale', 'Akinyemi', 4, NULL, NULL, 'Records,Doctors,Account,Pharmacy,Lab,Admin,Operation,Theater,Maintenance,Nurse', '', 'sdeadwe', 'adewalemurthador@gmail.com', NULL, NULL, NULL, NULL, NULL, '$2a$10$SQTtcEBPdIxlPqWoERz7.eq2TaNJXNMnQ3laVn/ooWF3K6vBxnwAG', 'pending', NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-06-23 21:53:45', '2020-06-23 21:53:45', '', NULL, NULL, NULL, NULL),
(541, 'M', 'B', 4, 'Doctor', 'Surgery', 'Doctors', '', 'balahsn', 'balahsn@yahoo.co.uk', 'BH', NULL, NULL, '0001', NULL, '$2a$10$MhtbEk6YPbq5WEODpgAJB.zEgdWr42RGKhNPYI1HIjubqNCF7m32q', 'approved ', NULL, NULL, NULL, NULL, NULL, '08054524745', NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-06-24 09:21:17', '2020-07-01 13:10:57', 'doctors', '', NULL, 'Patient List,Appointments,Consultations,Lab Results,Video Chat', NULL),
(551, 'Adewale', 'Muritala', 4, 'Doctor', 'ENT', 'Doctors', '', 'adewalemurthador@gmail.com', 'adewalemurthaddfghor@gmail.com', 'DFGHJKL;', NULL, NULL, '2345678i99io', NULL, '$2a$10$Tvr4FeRlAWxECivbKJ7EAOwz3rV7lJvog0T/licvjSaZW2N4p.RNS', 'suspended ', NULL, 'Monday', '14:29', '22:31', NULL, '08063847421', NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-06-24 21:19:09', '2020-07-01 08:26:51', 'doctors', '', NULL, 'Patient List,Appointments,Consultations,Lab Results,Video Chat', NULL),
(561, 'Kabiru', 'Haladu', 4, 'Admin', NULL, 'Pharmacy,Account,Admin', '', 'kbhealth2008', 'kbhealth2008@gmail.com', NULL, NULL, NULL, NULL, NULL, '$2a$10$OEoXeYr6zQTvaikPUOwPxeyrYVQ6cNlbDwHlX.Y93sYtrv133lscm', 'approved ', NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-06-30 16:43:07', '2020-07-02 11:50:43', '9b3dea20-2dff-468b-a3a6-fae2bcc83c02', NULL, NULL, NULL, NULL),
(571, 'Aliyu', 'Idris', 4, 'Doctor', 'General', 'Doctors', '', 'balacin2002', 'a.idris@pscprime.com', NULL, NULL, NULL, NULL, NULL, '$2a$10$GpkY0cWIDz0Qx8pBBJV5Cekup.PVkpFyUHcpQD/iQGxGO9Z/NFbgK', 'approved ', NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-06-30 16:56:37', '2020-06-30 16:59:36', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', NULL, NULL, 'Patient List,Appointments,Consultations,Lab Results,Video Chat', NULL),
(581, 'Prime', 'Clinic', 4, 'Doctor', 'General', 'Doctors', '', 'Prime', 'prime@pscprime.com', NULL, NULL, NULL, NULL, NULL, '$2a$10$zXBKuDTnwcfTPb/aF0RZvOPb0Vt3D6.XprAhAOzjk3fXub50Frmi2', 'approved ', NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593935556/mylikita/profile_images/DSC_0405.JPG.png', '2020-07-01 17:09:23', '2020-07-14 20:10:20', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', NULL, NULL, NULL, NULL),
(591, 'Ib', NULL, 4, 'Doctor', 'Neurosurgery', 'Doctors', '', 'Ib', 'ib@gml.com', 'IBN', NULL, NULL, '123456', NULL, '$2a$10$/RsdeympVmU338dC.YedGOxPWbhEMSvXxEK1KwFENxdmY2oO.6LtW', 'pending', NULL, NULL, NULL, NULL, NULL, '08012345678', NULL, NULL, NULL, NULL, '', '2020-07-02 07:57:18', '2020-07-02 07:57:18', 'doctors', '', NULL, 'Patient List,Appointments,Consultations,Lab Results,Video Chat', NULL),
(601, 'Usre', 'Me', 4, NULL, NULL, 'Admin,Pharmacy,Account', '', 'wasiu2', 'email@whats.com', NULL, NULL, NULL, NULL, NULL, '$2a$10$atIZiwZR7LXuxU8.bJdJmuOOEkfvv8JHNv.VC1aCaISVGnMKntZPG', 'pending', NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-07-02 11:58:17', '2020-07-02 11:58:17', '', NULL, NULL, NULL, NULL),
(611, 'ABDULLAHI', 'ISA', 4, 'Admin', NULL, 'Admin,Records,Account,Pharmacy,Lab', '', 'Abdullahi', 'lafiyadiagnostic54@gmail.com', NULL, NULL, NULL, NULL, NULL, '$2a$10$9EyCsGoNnnhGorNnJWZTGOkDQwwY6PkmH62mTH.EtdausLQcJupl2', 'approved ', NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-07-14 10:25:25', '2020-07-14 14:21:33', 'a9c88573-84d2-4e2d-aeff-088d1c35c6fb', NULL, NULL, NULL, NULL),
(621, 'Prime Specialist', 'Clinic', 4, '', '', 'Theater,Doctors', '', 'Prime Clinic', 'prime@pscprime.com', NULL, NULL, NULL, NULL, NULL, '$2a$10$1PCwn08HT1B9cNMr0wj0Zu.5z/pY8l8McRfTmrjH/JKgBcgSQnj4S', 'approved ', NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-07-14 20:09:08', '2020-12-04 07:30:31', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', NULL, NULL, NULL, NULL),
(631, 'PSC', 'Prime', 4, 'Doctor', 'General', 'Doctors,Theater', '', 'PSC Prime', 'psc@pscprime.com', NULL, NULL, NULL, NULL, NULL, '$2a$10$EGD5wT7qKY/PpZ2ryBGPbecA/byyeVQfIDNFltHjc7M5BOwEGubW6', 'approved ', NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-07-14 20:12:35', '2020-07-14 20:13:02', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', NULL, NULL, NULL, NULL),
(641, 'Zakariyya', 'Alhassan', 4, 'Lab Scientist', '', 'Laboratory', '', 'zaks', 'xakariyyaalhassan5@gmail.com', NULL, NULL, 'null', NULL, NULL, '$2a$10$d0KLxWm/aqaGb/iXTM1ugOh2lQRiEb7bJwYdm6z6kcJAF8fAexyAe', 'approved ', NULL, NULL, NULL, NULL, 'null', '08030778559', NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-10-31 10:59:52', '2020-10-31 11:58:47', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', NULL, NULL, 'Registrations,Setup Lab Test,Sample Analysis,Antibiotics Form', NULL),
(642, 'Admin', 'User', 4, 'Admin', NULL, 'Admin,Pharmacy,Reports,Lab,Operation,Laboratory,Accounts', NULL, 'demo-admin', '', NULL, NULL, NULL, NULL, NULL, '$2a$10$kMm7zheHYRHA2rliJZgqVeYZc6HOo0SKOfNUbx4eCrz1HqRzKm5n.', 'approved ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-11-02 06:00:25', '2020-11-02 06:02:49', 'd7280578-7456-45f3-b253-86fb450b1d6e', NULL, NULL, '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,Manage Users', NULL),
(643, 'Sales ', 'Rep', 4, 'Sales Rep', '', 'Pharmacy', NULL, 'sales-rep', 'sales0rep@mylikita.clinic', NULL, NULL, NULL, NULL, NULL, '$2a$10$CFhyPWg2MwnYN6NMakt0W.U4iTwT/uXLOCXjI07WbfRyGhCCyaMhC', 'approved ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-11-02 06:03:11', '2020-11-02 06:03:22', 'd7280578-7456-45f3-b253-86fb450b1d6e', 'demo-admin', '', 'Drug Sales,Returned Drugs,Store Record,Drug Dispensary', NULL),
(644, 'Demo', 'Hospital', 4, 'Manager', '', 'Accounts,Records,Doctors,Pharmacy,Theater,Maintenance,Reports,Admin,Laboratory', NULL, 'hospital', '', NULL, NULL, NULL, NULL, NULL, '$2a$10$SA3jd8QpFJsQw7ocbwaSTOmS7KAQX4Bc9S54yi3saStltfQ79VcKC', 'approved ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-11-02 06:17:07', '2020-11-02 06:19:22', 'd7280578-7456-45f3-b253-86fb450b1d6e', 'demo-admin', '', 'Hospital Billings,Create a Client Account,Make Deposit,Generate Account Report,Record Expenses,Account Statement,Asset Register,Rent Register,Create/Edit Services,Setup Account Chart,Cash Handover,Add New Patient,Bed Allocation,Patient List,Appointments,Consultations,Lab Results,Video Chat,Drug Sales,Drug Dispensary,Store Record,Returned Drugs,Manage Suppliers,Drug List,Dashboard,Add New Account Note,Report Summary,Inventory Overview,Analytics,Daily Sales,Profit,Suppliers Overview,Create User,Manage Users,Settings,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', NULL),
(645, 'Lab', 'User', 4, 'Lab Scientist', '', 'Laboratory,Accounts', NULL, 'lab', 'lab@mylikita.clinic', NULL, NULL, NULL, NULL, NULL, '$2a$10$FnOhIGonwFHHx2Dhg5pzD.jZZUR6iqjwDsTkDO1Xj5eifboqHwAXm', 'approved ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-11-05 05:59:47', '2020-11-05 05:59:59', 'd7280578-7456-45f3-b253-86fb450b1d6e', 'hospital', '', 'Registrations,Setup Lab Test,Client Registrations,Sample Collection,Chemical Pathology Analysis,Hematology Analysis,Microbiology Analysis,Radiology Analysis,Doctor Comment,Antibiotics Form,Hospital Billings,Create a Client Account,Make Deposit,Record Expenses,Generate Account Report,Account Statement,Create/Edit Services,Setup Account Chart', NULL),
(646, 'Pharmacy', 'User', 4, 'Pharmacist', '', 'Pharmacy,Reports,Accounts', NULL, 'pharmacy', 'pharmacy@mylikita.clinic', NULL, NULL, NULL, NULL, NULL, '$2a$10$KwhgPK2xvIwU508n0Op4LeYn9PqdNHNQkAcZA31dLEXLj2Uf.uop.', 'approved ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-11-05 06:03:15', '2020-11-05 06:03:25', 'd7280578-7456-45f3-b253-86fb450b1d6e', 'hospital', '', 'Drug Sales,Drug Dispensary,Store Record,Returned Drugs,Manage Suppliers,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,Setup Account Chart', NULL),
(647, 'Dr.', 'Demo', 4, 'Doctor', 'Neurosurgery', 'Doctors', NULL, 'demo-doctor', 'doctor@mylikita.clinic', NULL, NULL, NULL, NULL, NULL, '$2a$10$nNgVRbdmMVKB86XLYzJ7J.YPN7BrAi1ia0Q4en2lN8uOzgxZ2tAMm', 'approved ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-11-18 09:49:12', '2020-11-18 09:49:41', 'd7280578-7456-45f3-b253-86fb450b1d6e', 'demo-admin', '', 'Patient List,Appointments,Consultations,Lab Results,Video Chat', NULL),
(648, 'Idris', 'Dangana', 4, 'Admin', NULL, 'Admin,Pharmacy,Reports,Accounts', NULL, 'bits', 'info@brainstormng.com', NULL, NULL, NULL, NULL, NULL, '$2a$10$8rEs1/oyA6T7JjrFlmTZ5.zeytlIuOQBbjvw86SIEszgNrC9RbbWa', 'approved ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-11-24 11:39:14', '2020-11-24 11:39:58', '121bb692-9a44-472f-b396-b68ebf798b30', NULL, 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,Asset Register,Rent Register,Create/Edit Services,Setup Account Chart,Setup Transactions,Cash Handover', NULL),
(649, 'Abdulrazak', 'Liman', 4, 'User', '', 'Accounts', NULL, 'Abdulrazak', 'abdulrazakyliman@gmail.com', NULL, NULL, NULL, NULL, NULL, '$2a$10$wOsyIUw14BuJXQxl7usDI.lPRGICg/be.MtgLYrCQq9nT5Unt3vie', 'approved ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-11-26 07:22:32', '2020-11-26 07:25:17', '121bb692-9a44-472f-b396-b68ebf798b30', 'bits', '', 'Record Expenses', NULL),
(650, 'Adewle ', 'Muritala Akinyemi', 4, 'User', '', 'Accounts', NULL, 'akinyemi1472', 'adewalemurthador@gmail.com', NULL, NULL, NULL, NULL, NULL, '$2a$10$fPL/qzfU8kYLg1o0vpYhp.AKaYGxWI1rHt8w9SWuUSryV.uCKMcKm', 'approved ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-11-26 07:35:51', '2020-11-26 07:36:00', '121bb692-9a44-472f-b396-b68ebf798b30', 'bits', '', 'Make Deposit,Record Expenses', NULL),
(651, 'Mustapha', 'Issa', 4, 'Sample', '', 'Laboratory', NULL, 'musty', '', NULL, NULL, NULL, NULL, NULL, '$2a$10$WyaapfuWQDABdX4OXI5WJeoSnSURXw9Es040AIM29/iiGOwESeLkO', 'approved ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-12-02 19:34:57', '2020-12-02 19:37:17', '966a89f6-05d8-4564-b319-2f8863821e75', 'admin', 'Microbiology', 'Registrations', NULL),
(652, 'Rabiu', 'Abdullahi', 4, '', '', 'Laboratory', NULL, 'abdullahi1', '', NULL, NULL, NULL, NULL, NULL, '$2a$10$u9MXRGaiBswLKh7yrR77hOyayB8wQh6O9VXUhsRDcprdXsuy0EqcK', 'approved ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-12-02 19:42:59', '2020-12-10 15:20:06', '966a89f6-05d8-4564-b319-2f8863821e75', 'admin', '', 'Sample Collection,Chemical Pathology Analysis,Hematology Analysis,Sample Analysis', NULL),
(653, 'Muhammad', 'Mustapha', 4, 'Admin', '', 'Laboratory,Admin,Accounts,Reports', NULL, 'musty1', 'muhammadmustapha2@gmail.com', NULL, NULL, NULL, NULL, NULL, '$2a$10$pqYwYyb74sfhiLi94C92IOSjbLLviwONAhTa56HCBOcpSC8A15M/S', 'approved ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-12-02 19:48:19', '2020-12-02 19:48:28', '966a89f6-05d8-4564-b319-2f8863821e75', 'admin', '', 'Registrations,Sample Collection,Sample Analysis,Chemical Pathology Analysis,Hematology Analysis,Microbiology Analysis,Radiology Analysis,Doctor Comment,Create User,Manage Users,Antibiotics Form,Settings,Setup Lab Test,Client Registrations,Donations Report,Report Form,Organization Report,Customer Approval,Dashboard,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,Report Summary,Inventory Overview,Analytics,Daily Sales,Profit,Suppliers Overview', NULL),
(655, 'Amina', 'Aminu', 4, 'Receptionist', '', 'Laboratory', NULL, 'amina12', '', NULL, NULL, NULL, NULL, NULL, '$2a$10$3xGTTbpJ9mMeOdfR19TvJOkVclP6.Ys3RwjPxiJFCawxyr3Tn7Oay', 'approved ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-12-04 13:53:37', '2020-12-04 14:03:13', '966a89f6-05d8-4564-b319-2f8863821e75', 'musty1', '', 'Registrations', NULL),
(656, 'Halima', 'Abdulsalam', 4, 'Receptionist', '', 'Laboratory', NULL, 'halima', '', NULL, NULL, NULL, NULL, NULL, '$2a$10$CQ7dWLd.BnXtlpHPUnYgm.1EfM1LaFg5YNWFH5qrXD10DGbI0XnBS', 'approved ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-12-04 14:04:50', '2020-12-04 14:07:16', '966a89f6-05d8-4564-b319-2f8863821e75', 'musty1', '', 'Registrations', NULL),
(657, 'Halima', 'Idriss', 4, 'Receptionist', '', 'Laboratory', NULL, 'halima02', '', NULL, NULL, NULL, NULL, NULL, '$2a$10$3d.t5.cbzXVx9GNl92Fx2.7Q6pIcj19noBH/b/bEq063l57mVqmUi', 'approved ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-12-04 14:12:00', '2020-12-04 14:14:21', '966a89f6-05d8-4564-b319-2f8863821e75', 'musty1', '', 'Registrations', NULL),
(658, 'Haliru', 'Surajo', 4, 'Receptionist', '', 'Laboratory', NULL, 'haliru', '', NULL, NULL, NULL, NULL, NULL, '$2a$10$I.ncB0bfzRwxbMEI1bwAD.W4BBZoCIPIiOkkNYnbX3R8qywJ7wv6y', 'approved ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-12-04 14:14:09', '2020-12-04 14:16:57', '966a89f6-05d8-4564-b319-2f8863821e75', 'musty1', '', 'Registrations', NULL),
(659, 'Mastura', 'Mustapha', 4, 'Receptionist', '', 'Laboratory', NULL, 'mastura03', '', NULL, NULL, NULL, NULL, NULL, '$2a$10$vAhgm57Ra9MzlAdqc96qO.3QCqWpU37hlhT7chfzTKhB85jTg0e2W', 'approved ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-12-04 14:19:11', '2020-12-04 14:21:57', '966a89f6-05d8-4564-b319-2f8863821e75', 'musty1', '', 'Registrations', NULL),
(660, 'Maimuna', 'Sulaiman', 4, 'Receptionist', '', 'Laboratory', NULL, 'maimuna01', '', NULL, NULL, NULL, NULL, NULL, '$2a$10$ED3EXTGxOH7.l9VhV2vEoOm5tIsf6FnQZLDdCEMVeKxiUKPxFgeK2', 'approved ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-12-04 14:23:06', '2020-12-04 14:23:31', '966a89f6-05d8-4564-b319-2f8863821e75', 'musty1', '', 'Registrations', NULL),
(661, 'Enoch', 'A.', 4, 'Receptionist', '', 'Records,Pharmacy', NULL, 'Enoch', '', NULL, NULL, NULL, NULL, NULL, '$2a$10$60FDeodar/Co0oavKngkD.oqSaqGopkEtw58JJD2ofh02e/xTDQMy', 'approved ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-12-05 07:50:31', '2020-12-05 07:58:50', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman', '', 'Add New Patient,Bed Allocation,Drug Dispensary,Drug Sales,Returned Drugs,Manage Suppliers', NULL),
(662, 'Sourayya', 'kabir', 4, 'Technician', '', 'Laboratory', NULL, 'surraya', '', NULL, NULL, NULL, NULL, NULL, '$2a$10$Z5Y9Uqm3s2ydCbHF3Ck/X.u2a9C.YbWOH3x0fJcf1bSH4FAk4BnJq', 'approved ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-12-06 07:45:44', '2020-12-06 07:48:08', '966a89f6-05d8-4564-b319-2f8863821e75', 'musty1', '', 'Radiology Analysis', NULL),
(663, 'Kamal', 'Ibrahim Sunusi', 4, 'Technician', '', 'Laboratory', NULL, 'kamal02', '', NULL, NULL, NULL, NULL, NULL, '$2a$10$xwy8N0llLa6mPU9kwqumd.QGV1lEPUhY7Q1FXCIlHn8rK9OhKzWPq', 'approved ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-12-06 07:47:52', '2020-12-06 07:50:33', '966a89f6-05d8-4564-b319-2f8863821e75', 'musty1', '', 'Radiology Analysis', NULL),
(664, 'Mahmmood', 'Sani', 4, 'Technician', '', 'Laboratory', NULL, 'mahmmood02', '', NULL, NULL, NULL, NULL, NULL, '$2a$10$PWgsAL9B4viKM0IQfqRTPehrRl1bJ3dCYRavBpOpsjHELLqq6.J3e', 'approved ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-12-06 07:50:09', '2020-12-06 07:52:54', '966a89f6-05d8-4564-b319-2f8863821e75', 'musty1', '', 'Radiology Analysis', NULL),
(665, 'Yakubu', 'Muhammad', 4, 'Technician', '', 'Laboratory', NULL, 'yakubu01', '', NULL, NULL, NULL, NULL, NULL, '$2a$10$UtWnACjPhtKJaDLjRHMvDuiY07BVZh90zsdQ3zvJz8HYpY//0fJvm', 'approved ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-12-06 07:52:01', '2020-12-06 11:02:49', '966a89f6-05d8-4564-b319-2f8863821e75', 'musty1', '', 'Radiology Analysis', NULL),
(666, 'Abdulmalik', 'Saleh', 4, 'Technician', '', 'Laboratory', NULL, 'abdulmalik02', '', NULL, NULL, NULL, NULL, NULL, '$2a$10$ndsS9aVLgNr2oIV2C5DL4eguh2BJrk0omLvN8Y85ohJ86PTtyL1Ky', 'approved ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-12-06 11:00:31', '2020-12-06 11:02:52', '966a89f6-05d8-4564-b319-2f8863821e75', 'musty1', '', 'Radiology Analysis', NULL);
INSERT INTO `users` (`id`, `firstname`, `lastname`, `privilege`, `role`, `speciality`, `accessTo`, `functionalities`, `username`, `email`, `prefix`, `userType`, `serviceCost`, `licenceNo`, `placeOfWork`, `password`, `status`, `loggedIn`, `availableDays`, `availableFromTime`, `availableToTime`, `address`, `phone`, `paymentMethod`, `paymentAmount`, `referralId`, `lastLogin`, `image`, `createdAt`, `updatedAt`, `facilityId`, `createdBy`, `department`, `functionality`, `branch_name`) VALUES
(667, 'Huzaifa', 'Yusuf', 4, 'Technician', '', 'Laboratory', NULL, 'huzee02', 'hoozyconnect@yahoo.com', NULL, NULL, NULL, NULL, NULL, '$2a$10$jXLGraa/qx8r16fkRouDvOY917uZLOgqcZetYkETeOrzEFpEAF6Qa', 'approved ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-12-06 11:04:13', '2020-12-06 11:04:37', '966a89f6-05d8-4564-b319-2f8863821e75', 'musty1', '', 'Radiology Analysis', NULL),
(668, 'Abdulhayat', 'Muhammad', 4, 'Technician', '', 'Laboratory', NULL, 'abdulhayat06', '', NULL, NULL, NULL, NULL, NULL, '$2a$10$aMrmBjUPwKxQ9QMkeUTE3OzhGrtCZn9wCkA3Sk8Y/byJiyGCR.2Qy', 'approved ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-12-06 11:10:17', '2020-12-06 11:13:39', '966a89f6-05d8-4564-b319-2f8863821e75', 'musty1', '', 'Sample Collection,Chemical Pathology Analysis,Microbiology Analysis,Sample Analysis,Hematology Analysis', NULL),
(669, 'Usman', 'yahaya Usman', 4, 'Technician', '', 'Laboratory', NULL, 'usman00', '', NULL, NULL, NULL, NULL, NULL, '$2a$10$iJZHzPTdpDbB.BvfqEZ3S.QUmEQkj8jrFyEC5OPbaQh7x0ZS1K.KC', 'approved ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-12-06 11:14:19', '2020-12-06 11:17:45', '966a89f6-05d8-4564-b319-2f8863821e75', 'musty1', '', 'Sample Collection,Chemical Pathology Analysis,Microbiology Analysis,Hematology Analysis,Sample Analysis', NULL),
(670, 'Umar', 'Muhammad Danbatta', 4, 'Manager', '', 'Accounts,Reports,Laboratory', NULL, 'danbatta', '', NULL, NULL, NULL, NULL, NULL, '$2a$10$WNHbWzhH7Y9ngjblopnpU.m.MhsiDlA5/H1CHEY0n937/0J76XxJK', 'approved ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-12-06 11:23:05', '2020-12-06 11:25:50', '966a89f6-05d8-4564-b319-2f8863821e75', 'musty1', '', 'Setup Account Chart,Account Statement,Generate Account Report,Record Expenses,Make Deposit,Create a Client Account,Report Summary,Inventory Overview,Analytics,Daily Sales,Profit,Suppliers Overview', NULL),
(671, 'Jibril ', 'Adamu', 4, 'Manager', '', 'Laboratory,Reports,Admin', NULL, 'jibril00', 'jibrilonlines@gmail.com', NULL, NULL, NULL, NULL, NULL, '$2a$10$EbLhYEXNIS1IiXjkM9AXF.b/ncH/7js0cpo7BXce.P9UTJ9ve39Gi', 'approved ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-12-06 11:26:44', '2020-12-06 11:27:32', '966a89f6-05d8-4564-b319-2f8863821e75', 'musty1', '', 'Dashboard,Registrations,Create User,Manage Users', NULL),
(672, 'usman', 'yahaya', 4, 'Manager', '', 'Reports,Admin,Laboratory', NULL, 'usman03', '', NULL, NULL, NULL, NULL, NULL, '$2a$10$K1JNmIAeW/NG33yELOKPQOrq.k1i2Q.nOk58643f/unmBEtOtayBy', 'approved ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-12-06 11:33:49', '2020-12-06 11:39:59', '966a89f6-05d8-4564-b319-2f8863821e75', 'musty1', '', 'Report Summary,Inventory Overview,Analytics,Daily Sales,Profit,Suppliers Overview,Dashboard,Registrations,Create User,Manage Users', NULL),
(673, 'Nasiru', 'Usma', 4, 'Doctor', '', 'Laboratory', NULL, 'nasir00', 'nasrah_429@yahoo.com', NULL, NULL, NULL, NULL, NULL, '$2a$10$k7Irg9ZAjQfjGydk.bCHrOSepqoWN2Qymk.SmIFOnoaY0j74MH68e', 'approved ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-12-06 11:56:16', '2020-12-06 11:56:31', '966a89f6-05d8-4564-b319-2f8863821e75', 'musty1', '', 'Dashboard,Report Form,Donations Report,Setup Lab Test,Microbiology Analysis,Doctor Comment,Antibiotics Form,Sample Collection,Organization Report', NULL),
(674, 'Sulaiman', 'Dadykowa', 4, 'Technician', '', 'Laboratory', NULL, 'sulaiman00', '', NULL, NULL, NULL, NULL, NULL, '$2a$10$NVQsubTdNpJfSf15Y9grDu6OIY6LgcEyL1kpK.3n8L1kSkeySkoam', 'approved ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-12-06 12:34:43', '2020-12-06 12:37:25', '966a89f6-05d8-4564-b319-2f8863821e75', 'musty1', '', 'Chemical Pathology Analysis,Sample Collection,Sample Analysis,Hematology Analysis,Microbiology Analysis', NULL),
(675, 'Fero', 'Omini', 4, 'Technician', '', 'Laboratory', NULL, 'fero01', '', NULL, NULL, NULL, NULL, NULL, '$2a$10$fSbOKq7zrHLJKH7NIqVM1.2mXcQ6o//XBxjAds.mlxE7sBwOVHElS', 'approved ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-12-06 12:37:01', '2020-12-06 12:39:36', '966a89f6-05d8-4564-b319-2f8863821e75', 'musty1', '', 'Sample Collection,Chemical Pathology Analysis,Sample Analysis,Hematology Analysis,Microbiology Analysis', NULL),
(676, 'Elizabeth', 'Ajayi', 4, 'Technician', '', 'Laboratory', NULL, 'elizabeth00', '', NULL, NULL, NULL, NULL, NULL, '$2a$10$y3ApjpNHekTDdKkYOPudiuIBZTuVrzYc3aJgLgNaQKYB/i9QLHsOi', 'approved ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-12-06 12:42:17', '2020-12-06 12:45:35', '966a89f6-05d8-4564-b319-2f8863821e75', 'musty1', '', 'Sample Collection,Chemical Pathology Analysis,Hematology Analysis,Microbiology Analysis,Sample Analysis', NULL),
(677, 'Gabriel', 'Chucks', 4, 'Technician', '', 'Laboratory', NULL, 'gabriel01', '', NULL, NULL, NULL, NULL, NULL, '$2a$10$lEH99wZcE4Fcp3hLSbP8Yeeg5jD5FDey9u./z7rpL/vF8f49pMLm6', 'approved ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-12-06 12:47:11', '2020-12-06 12:52:57', '966a89f6-05d8-4564-b319-2f8863821e75', 'musty1', '', 'Chemical Pathology Analysis,Sample Analysis,Sample Collection,Hematology Analysis,Microbiology Analysis', NULL),
(678, 'Mashood', 'Abimbola', 4, 'Technician', '', 'Laboratory', NULL, 'mashood03', '', NULL, NULL, NULL, NULL, NULL, '$2a$10$lgV53I4rdKneVTnZ8UUhLuUAraavlZPUXfgjbBVdWE0EqAHe4UAlW', 'approved ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-12-06 12:50:46', '2020-12-06 12:53:42', '966a89f6-05d8-4564-b319-2f8863821e75', 'musty1', '', 'Microbiology Analysis,Sample Collection,Chemical Pathology Analysis,Hematology Analysis', NULL),
(679, 'Usman', 'Abdullahi makuku', 4, 'Doctor', '', 'Laboratory', NULL, 'usman05', 'usmanmaxman@gmail.com', NULL, NULL, NULL, NULL, NULL, '$2a$10$GH4GBBuO6WoEMyWO2vo7YOiKjpsLGOtUpxqAMYaweecJbDoj5om.O', 'approved ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-12-07 17:30:58', '2020-12-07 17:31:17', '966a89f6-05d8-4564-b319-2f8863821e75', 'musty1', '', 'Hematology Analysis,Sample Analysis,Dashboard,Doctor Comment,Antibiotics Form,Report Form', NULL),
(680, 'Sherifah', 'Usman sherif', 4, 'Doctor', '', 'Laboratory', NULL, 'sherifah02', 'drshereefer@yahoo.com', NULL, NULL, NULL, NULL, NULL, '$2a$10$rV9lgeTgtAcipaepV82M4emO/kbq8x43Zvx6XJWFbm0QjQv0R6kq6', 'approved ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-12-07 17:35:41', '2020-12-07 17:36:06', '966a89f6-05d8-4564-b319-2f8863821e75', 'musty1', '', 'Dashboard,Report Form,Doctor Comment,Chemical Pathology Analysis,Sample Analysis,Antibiotics Form', NULL),
(681, 'Bawa', 'Ibrahim Abubakar', 4, 'Doctor', '', 'Laboratory', NULL, 'bawa02', 'abubakarbawa22@yahoo.com', NULL, NULL, NULL, NULL, NULL, '$2a$10$B5BVCqXz/L.xS364vJ9S9uZr1oPak.mceIMjMmBqFeVh7PRODbDT2', 'approved ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-12-07 17:40:21', '2020-12-07 17:40:36', '966a89f6-05d8-4564-b319-2f8863821e75', 'musty1', '', 'Report Form,Doctor Comment,Chemical Pathology Analysis', NULL),
(682, 'Usman ', 'Ali', 4, 'Doctor', '', 'Laboratory', NULL, 'usman06', 'hafisali@yahoo.com', NULL, NULL, NULL, NULL, NULL, '$2a$10$VEuGPNGB1DmUOU8NyzdiDOKUWoAPyAaegemWowK7XDDcxG0/C8CD6', 'approved ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-12-07 17:43:22', '2020-12-07 17:43:42', '966a89f6-05d8-4564-b319-2f8863821e75', 'musty1', '', 'Dashboard,Report Form,Doctor Comment,Chemical Pathology Analysis', NULL),
(683, 'Rabiu', 'Dauda', 4, 'Technician', '', 'Laboratory', NULL, 'rabiu05', '', NULL, NULL, NULL, NULL, NULL, '$2a$10$ACc9qdK6mhcOeMdhbrTVD.8bhsOyESd.rllvEQWUo2gTiCTnLRsCq', 'approved ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-12-10 09:32:08', '2020-12-10 09:37:04', '966a89f6-05d8-4564-b319-2f8863821e75', 'musty1', '', 'Chemical Pathology Analysis,Sample Collection,Sample Analysis,Hematology Analysis,Microbiology Analysis', NULL),
(684, 'Abdulfatah', 'Isah', 4, 'Technician', '', 'Laboratory', NULL, 'abdulfatah00', '', NULL, NULL, NULL, NULL, NULL, '$2a$10$NJIph7R9W01BQwR8y0e09OmNC3qw33qRKPea9XB.a9CNi9OmMtfLC', 'approved ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-12-10 09:43:29', '2020-12-10 09:51:02', '966a89f6-05d8-4564-b319-2f8863821e75', 'musty1', '', 'Sample Collection,Sample Analysis,Chemical Pathology Analysis,Hematology Analysis,Microbiology Analysis', NULL),
(685, 'Usman ', 'Musa', 4, 'Manager', '', 'Laboratory,Admin', NULL, 'usman04', '', NULL, NULL, NULL, NULL, NULL, '$2a$10$WFDHRBv5IxjpJ2GjhjrWquSZFgKLC9GINM4L0ENzuLBJ.aSuGgrDe', 'approved ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-12-10 09:51:02', '2020-12-10 09:51:15', '966a89f6-05d8-4564-b319-2f8863821e75', 'musty1', '', 'Report Form,Registrations,Setup Lab Test,Client Registrations,Donations Report,Customer Approval,Organization Report,Sample Collection,Sample Analysis,Chemical Pathology Analysis,Hematology Analysis,Microbiology Analysis,Radiology Analysis,Antibiotics Form,Doctor Comment,Dashboard', NULL),
(686, 'Riscan', 'Admin', 4, 'Admin', NULL, 'Admin,Lab,Account,Laboratory,Accounts', NULL, 'riscan-admin', '', NULL, NULL, NULL, NULL, NULL, '$2a$10$Q0Hv/Jmqov.urJWCjnhhsuLuGCCq.I8Iji9lEDVN4yNFu0RLlhNga', 'suspended ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-12-10 15:30:52', '2020-12-12 17:08:48', '422cc2dd-861e-4ec5-9e4b-412ca033c8fe', NULL, NULL, 'Create a Client Account,Make Deposit,Record Expenses,Generate Account Report,Account Statement,Create User,Manage Users,Settings,Dashboard,Setup Lab Test,Registrations,Chemical Pathology Analysis,Hematology Analysis,Microbiology Analysis,Radiology Analysis,Doctor Comment,Antibiotics Form,Sample Collection,Setup Account Chart', NULL),
(687, 'Sample', 'Collection', 4, 'Sample Collection', '', 'Laboratory', NULL, 'sample-collection', '', NULL, NULL, NULL, NULL, NULL, '$2a$10$0hVAgNgRzItFN.G6farjo.tjPfxl2DXUfG4gydzgbsxPJDcsfKmGK', 'suspended ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-12-10 16:03:46', '2020-12-12 17:08:23', '422cc2dd-861e-4ec5-9e4b-412ca033c8fe', 'riscan-admin', '', 'Sample Collection', NULL),
(688, 'Lab', 'Reception', 4, '', '', 'Laboratory', NULL, 'reception01', '', NULL, NULL, NULL, NULL, NULL, '$2a$10$KCalDHu8BF43SyLqOKo9Vev/S.1uq..CxAk9jVSIFdRppL5F4gdYu', 'suspended ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-12-10 16:04:37', '2020-12-12 17:08:25', '422cc2dd-861e-4ec5-9e4b-412ca033c8fe', 'riscan-admin', '', 'Registrations', NULL),
(689, 'Sample', 'Collection', 4, 'Sample Collection', '', 'Laboratory', NULL, 'collection01', '', NULL, NULL, NULL, NULL, NULL, '$2a$10$8VzpyCfCt/2BWQ9RJzKFB.tRSc7ss44twNf7Vk2R16BteF4LB7gs2', 'approved ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-12-10 16:10:17', '2020-12-12 17:10:29', '422cc2dd-861e-4ec5-9e4b-412ca033c8fe', 'riscan-admin', '', 'Sample Collection', NULL),
(690, 'Hematology', 'Scientist', 4, '', '', 'Laboratory', NULL, 'hematology01', '', NULL, NULL, NULL, NULL, NULL, '$2a$10$zpBF9ef7t.88qkNdeFuEgeSu/aQZh3BLfA2sJYRFfyhEdLp/gtAWK', 'suspended ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-12-10 16:11:12', '2020-12-12 17:08:36', '422cc2dd-861e-4ec5-9e4b-412ca033c8fe', 'riscan-admin', '', 'Hematology Analysis', NULL),
(691, 'Chemical', 'Pathology', 4, 'Lab Scientist', '', 'Laboratory', NULL, 'chempath01', '', NULL, NULL, NULL, NULL, NULL, '$2a$10$FhtRvjeUfhn6.9g7HwWhIOkO7tdqpuAb0qbbN5oTYeBkrkrBoVs.C', 'suspended ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-12-10 16:12:31', '2020-12-12 17:08:39', '422cc2dd-861e-4ec5-9e4b-412ca033c8fe', 'riscan-admin', 'Chemical', 'Chemical Pathology Analysis', NULL),
(692, 'Microbiology', 'Scientist', 4, 'Lab Scientist', '', 'Laboratory', NULL, 'microbiology01', '', NULL, NULL, NULL, NULL, NULL, '$2a$10$sWu2dPgYHMQZ1dOo2PmvrOJHK1/7ySKSP/mZprqqUpDrTX33qTAH.', 'suspended ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-12-10 16:14:05', '2020-12-12 17:08:41', '422cc2dd-861e-4ec5-9e4b-412ca033c8fe', 'riscan-admin', 'Microbiology', 'Microbiology Analysis,Antibiotics Form', NULL),
(693, 'Lab', 'Doctor', 4, 'Doctor', '', 'Laboratory', NULL, 'doctor01', '', NULL, NULL, NULL, NULL, NULL, '$2a$10$kVE2LFr0W2PpiUEcC7y/XeMYBfJ0aXs2Bh1fYdfDoH6DWIXUz6tKO', 'suspended ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-12-10 17:56:43', '2020-12-12 17:08:44', '422cc2dd-861e-4ec5-9e4b-412ca033c8fe', 'riscan-admin', 'Microbiology', 'Doctor Comment', NULL),
(694, 'Bashir', 'Garba Ahmad', 4, 'Doctor', '', 'Laboratory', NULL, 'bashir02', 'bashirgrb@yahoo.com', NULL, NULL, NULL, NULL, NULL, '$2a$10$ZGf6j8SExq.Ay6sfYkAqeePpOToShDrGe4d9o154d5a1OvyoWu2H6', 'approved ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-12-14 18:41:21', '2020-12-14 18:48:41', '966a89f6-05d8-4564-b319-2f8863821e75', 'musty1', 'Radiology', 'Doctor Comment,Radiology Analysis,Report Form', NULL),
(695, 'Kabiru', 'Abdulsalam', 4, 'Doctor', '', 'Laboratory', NULL, 'kabiru02', 'kabirabdulsalam2004@gmail.com', NULL, NULL, NULL, NULL, NULL, '$2a$10$e5kNMJDH.iTAkwoHJbBPAOXp0neEq6i9o4xE9hpm/j1TLoD7LlmFu', 'approved ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-12-16 10:08:28', '2020-12-16 10:08:40', '966a89f6-05d8-4564-b319-2f8863821e75', 'musty1', 'Chemical', 'Chemical Pathology Analysis,Doctor Comment,Antibiotics Form,Sample Analysis,Report Form', NULL),
(696, 'Awwal', 'Barodo', 4, 'Doctor', '', 'Laboratory', NULL, 'auwal02', 'musa_auwal@yahoo.com', NULL, NULL, NULL, NULL, NULL, '$2a$10$zhNLxKJLGnapv50YNQ60NO2xWzX9TRleIBOAP9nf0nkETb0gGWacO', 'approved ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-12-16 10:12:05', '2020-12-16 10:12:19', '966a89f6-05d8-4564-b319-2f8863821e75', 'musty1', 'Hamotology', 'Doctor Comment,Antibiotics Form,Hematology Analysis,Sample Analysis,Report Form', NULL),
(697, 'Dalhatu', 'Gwarzo', 4, 'Doctor', '', 'Laboratory', NULL, 'gwarzo', 'dalhatugwarzo@yahoo.com', NULL, NULL, NULL, NULL, NULL, '$2a$10$K5kmlriswDyKEC3RYWNALOPpGFBRiobRYgo1AVO0o1/FMZNMguJIu', 'approved ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2020-12-16 10:17:07', '2020-12-16 10:17:21', '966a89f6-05d8-4564-b319-2f8863821e75', 'musty1', 'Hamotology', 'Doctor Comment,Antibiotics Form,Hematology Analysis,Report Form', NULL),
(698, 'Bash', '01', 4, 'Doctor', 'General', 'Doctors', NULL, 'bash01', 'issa.emaitee@gmail.com', NULL, NULL, NULL, NULL, NULL, '$2a$10$YGSHaHmHU716sMl.OckTh.TTLYla5buqaxnFKtccasJcrc3y91izO', 'approved ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1612796826/mylikita/profile_images/bash.png.png', '2021-02-08 10:38:00', '2021-02-08 15:07:08', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman', '', 'Patient List,Appointments,Consultations,Lab Results,Video Chat', NULL),
(699, 'Amina', 'Aminu Chubado', 4, 'Technician', '', 'Laboratory', NULL, 'amina06', '', NULL, NULL, NULL, NULL, NULL, '$2a$10$Ub0HS/57uWRa2tZ.K6rnseEf34BwHybqgudLsjvn3ZEh7iFF1iqtq', 'approved ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2021-03-21 13:33:14', '2021-03-21 13:37:24', '966a89f6-05d8-4564-b319-2f8863821e75', 'musty1', 'Microbiology', 'Microbiology Analysis', NULL),
(700, 'Dr.', 'Hamisu', 4, 'Doctor', 'ENT', 'Doctors', NULL, 'hamisu', '', NULL, NULL, NULL, NULL, NULL, '$2a$10$D6ImHyy7PurgdJPnB6AauO6XAXMeNWErlpC4KBRCq3ZHOrK2HOCWu', 'approved ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2021-03-31 15:25:26', '2021-03-31 17:04:01', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'emaitee', '', 'Patient List,Consultations,Appointments,Lab Results,Video Chat', NULL),
(701, 'DR', 'Hussaini', 4, 'Doctor', 'Endocrinology', 'Doctors', NULL, 'Hussaini', '', NULL, NULL, NULL, NULL, NULL, '$2a$10$qJkFhmFJRO9eVRX.JNp8OuAKPE9Np4YfP9nuA/q5z6OQVXxd7tAKm', 'approved ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2021-03-31 15:43:35', '2021-03-31 17:04:15', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'emaitee', '', 'Video Chat,Lab Results,Consultations,Appointments,Patient List', NULL),
(702, 'Dr', 'Musa', 4, 'Doctor', 'Neurosurgeon', 'Doctors', NULL, 'musa01', '', NULL, NULL, NULL, NULL, NULL, '$2a$10$EYD8d2urit50RPZPTjlvjOnmtv1GGNfa7KkpFHlBo3UPmoiMLompC', 'approved ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2021-03-31 15:44:39', '2021-03-31 17:04:27', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'emaitee', '', 'Patient List,Appointments,Consultations,Lab Results,Video Chat', NULL),
(703, 'Dr', 'Ramalan', 4, 'Doctor', 'Endocrinology', 'Doctors', NULL, 'Ramalan', '', NULL, NULL, NULL, NULL, NULL, '$2a$10$6RMBeN0VSeSsZ4gEvrelTe96L3uvMKofCnrI/7QSx/ZpBAne3cdDa', 'approved ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2021-03-31 15:44:48', '2021-03-31 17:04:27', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'emaitee', '', 'Appointments,Patient List,Consultations,Lab Results,Video Chat', NULL),
(704, 'DR', 'Ibrahim', 4, 'Doctor', 'Gastrology', 'Doctors', NULL, 'ibrahim', '', NULL, NULL, NULL, NULL, NULL, '$2a$10$DRN2DPYOXC3EagKoVezRpOwA4uXc8ssLyq/w.ChVQp7Pp6M0D.LkK', 'approved ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2021-03-31 15:45:56', '2021-03-31 17:06:16', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'emaitee', '', 'Video Chat,Lab Results,Consultations,Appointments,Patient List', NULL),
(705, 'Dr', 'Hassan', 4, 'Doctor', 'Neurosurgeon', 'Doctors', NULL, 'Hassan01', '', NULL, NULL, NULL, NULL, NULL, '$2a$10$mCVIx/IK9s1sbTRgDB1bAet3k4e1O2UA5psl2MRfjDS9ebDViF80C', 'approved ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2021-03-31 15:46:35', '2021-03-31 17:06:29', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'emaitee', '', 'Patient List,Appointments,Consultations,Lab Results,Video Chat', NULL),
(706, 'Dr', 'Patrick', 4, 'Doctor', 'General', 'Doctors', NULL, 'patrick', '', NULL, NULL, NULL, NULL, NULL, '$2a$10$yO9Lyc/cStLwlbV.XNWMHeLw3f3X7moM9uPgq6lGAt1YHpQYZqlxS', 'approved ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2021-03-31 15:47:13', '2021-03-31 17:04:31', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'emaitee', '', 'Patient List,Appointments,Lab Results,Consultations,Video Chat', NULL),
(707, 'DR', 'Ademola', 4, 'Doctor', 'Nephrology', 'Doctors', NULL, 'Ademola', '', NULL, NULL, NULL, NULL, NULL, '$2a$10$EwzahSbVBofejGenIb2/auTGa4PDXasz86g5I3PJ0vPZ/DRY0muEC', 'approved ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2021-03-31 15:47:18', '2021-03-31 17:04:31', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'emaitee', '', 'Patient List,Lab Results,Consultations,Appointments,Video Chat', NULL),
(708, 'Dr', 'Misbahu', 4, 'Doctor', 'Neurosurgeon', 'Doctors', NULL, 'Misbahu', '', NULL, NULL, NULL, NULL, NULL, '$2a$10$jbUhGPT/52lMfYdrjT83uO54J/xA7FdrhIORKKJR9ZWL7QmOWcTb.', 'approved ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2021-03-31 15:47:49', '2021-03-31 17:06:03', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'emaitee', '', 'Patient List,Appointments,Consultations,Lab Results,Video Chat', NULL),
(709, 'DR', 'Sanusi', 4, 'Doctor', 'Nephrology', 'Doctors', NULL, 'Sanusi', '', NULL, NULL, NULL, NULL, NULL, '$2a$10$yb9cgze63yLw6I.tLGzuN.YI91SwtI57BS02HJINowmC4uR1p5hVq', 'approved ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2021-03-31 15:48:25', '2021-03-31 17:06:29', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'emaitee', '', 'Video Chat,Lab Results,Appointments,Consultations,Patient List', NULL),
(710, 'Dr', 'sharif', 4, 'Doctor', '', 'Doctors', NULL, 'sharif', '', NULL, NULL, NULL, NULL, NULL, '$2a$10$egDrtlteg/vvk.9Ovon7Je0V3wJ2k8OHUSXK3MxQ1jfbgMWmv/5My', 'approved ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2021-03-31 15:48:27', '2021-03-31 17:06:32', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'emaitee', '', 'Patient List,Appointments,Consultations,Lab Results,Video Chat', NULL),
(711, 'Dr', 'Karofi', 4, 'Neurosurgeon', '', 'Doctors', NULL, 'karofi', '', NULL, NULL, NULL, NULL, NULL, '$2a$10$f1pPmSrDktqcyZIgG5RKIO93lqfILIJyWDTbOM.qWU0zFG53Q16EW', 'approved ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2021-03-31 15:49:08', '2021-03-31 17:06:32', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'emaitee', '', 'Patient List,Appointments,Consultations,Lab Results,Video Chat', NULL),
(712, 'DR MK', 'Abubakar', 4, 'Doctor', 'Ortopedic', 'Doctors', NULL, 'mk', '', NULL, NULL, NULL, NULL, NULL, '$2a$10$w6fPy3xbXNfDM2DYfkyNTeTJaDc7QpUDiA2uswboT75QhvreCbvTW', 'approved ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2021-03-31 15:49:47', '2021-04-01 17:00:22', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'emaitee', '', 'Video Chat,Lab Results,Consultations,Patient List,Appointments', NULL),
(713, 'Dr', 'Jinjiri', 4, 'Doctor', 'Neurosurgeon', 'Doctors', NULL, 'jinjiri', '', NULL, NULL, NULL, NULL, NULL, '$2a$10$QeOrGk9MrGbzQmmriWSJ0eLfJIOqxBTIe2AgCml.CP0Qq9ZCHwHC.', 'approved ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2021-03-31 15:50:19', '2021-04-01 17:02:28', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'emaitee', '', 'Patient List,Appointments,Consultations,Lab Results,Video Chat', NULL),
(714, 'Dr', 'Aliyu', 4, 'Doctor', 'General', 'Doctors', NULL, 'Aliyu', '', NULL, NULL, NULL, NULL, NULL, '$2a$10$EMiur4LefQRdxVTizFi9WOVJPh3sH6MTj1vKrsISYnFjRbq5GF5re', 'approved ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2021-03-31 15:50:21', '2021-04-01 17:02:28', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'emaitee', '', 'Appointments,Patient List,Consultations,Lab Results,Video Chat', NULL),
(715, 'Dr', 'Musbahu', 4, 'Doctor', 'Neurosurgeon', 'Doctors', NULL, 'musbahu', '', NULL, NULL, NULL, NULL, NULL, '$2a$10$uL.nGzspQbeEBb9MzhTuO.i1JcojSHfoV1tIcFakw2H4tc3ffzTve', 'approved ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2021-03-31 15:51:25', '2021-04-01 16:54:19', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'emaitee', '', 'Patient List,Appointments,Consultations,Lab Results,Video Chat', NULL),
(717, 'Dr', 'king', 4, 'Doctor', '', 'Doctors', NULL, 'king', '', NULL, NULL, NULL, NULL, NULL, '$2a$10$BVeJFOVYyzMolC1zpCJngOTORroYiDqpbcgU3/lqrimsxoDgbOHBm', 'approved ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2021-03-31 15:52:36', '2021-04-01 16:58:21', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'emaitee', '', 'Patient List,Appointments,Consultations,Video Chat,Lab Results', NULL),
(718, 'Dr', 'Lukman', 4, 'Doctor', '', 'Doctors', NULL, 'lukman', '', NULL, NULL, NULL, NULL, NULL, '$2a$10$93NurZh.MLK/xbHKIstaBuBuYlgjqxVhUFPRRqeoU8vikeJmAjGM2', 'approved ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2021-03-31 15:53:41', '2021-04-01 17:02:28', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'emaitee', '', 'Patient List,Appointments,Consultations,Lab Results,Video Chat', NULL),
(719, 'DR Musa', 'Tauhid', 4, 'Doctor', 'Orthopedic', 'Doctors', NULL, 'Musa1', '', NULL, NULL, NULL, NULL, NULL, '$2a$10$Y1ue/BP70iURzkt0oUVVtuCJ4g7QdI93vAgTKRCDqi0Q1AsdAzBuC', 'approved ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2021-03-31 15:57:48', '2021-04-01 16:51:17', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'emaitee', '', 'Appointments,Patient List,Consultations,Lab Results,Video Chat', NULL),
(720, 'DR', 'Ajia', 4, 'Doctor', 'ENT', 'Doctors', NULL, 'Ajia', '', NULL, NULL, NULL, NULL, NULL, '$2a$10$NWFv.1SvKlXlMN8dlUSgruMvY97zYz8I5GnzqLpUUeszSfqK3xrP.', 'approved ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2021-03-31 15:58:40', '2021-04-01 16:56:21', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'emaitee', '', 'Video Chat,Lab Results,Appointments,Consultations,Patient List', NULL),
(721, 'DR', 'JAMIU', 4, 'Doctor', 'ENT', 'Doctors', NULL, 'JAMIU', '', NULL, NULL, NULL, NULL, NULL, '$2a$10$LRj1G5GHaE4NXXn.YT3MpefHTygAL0aNwXDrBiG9oSUcKQqCurSoG', 'approved ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2021-03-31 15:59:32', '2021-04-01 16:58:21', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'emaitee', '', 'Patient List,Appointments,Consultations,Lab Results,Video Chat', NULL),
(722, 'dr', 'hUSSAINI gANIAT', 4, 'Doctor', 'plastic surgeon', 'Doctors', NULL, 'HussainiG', '', NULL, NULL, NULL, NULL, NULL, '$2a$10$3QMUetHoRO9MGojIaZzyL.YaeWmTxu9cRJkCR9KuhBNQxALdderVi', 'approved ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2021-03-31 16:00:44', '2021-04-01 16:56:22', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'emaitee', '', 'Patient List,Appointments,Consultations,Lab Results,Video Chat', NULL),
(723, 'Muhammad', 'saidu', 4, 'Doctor', 'Surgery', 'Doctors', NULL, 'Mssaid', 'muhammadsaidu92@gmail.com', 'MS', NULL, NULL, '12346799', NULL, '$2a$10$9g7o6fa0oK3oB.5QbMAaweeztCI./kUuBBrkWawy9tLsHflcuVzci', 'pending', NULL, NULL, NULL, NULL, NULL, '09035674843', NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2021-04-27 13:44:54', '2021-04-27 13:44:54', 'doctors', 'Nill', NULL, NULL, NULL),
(724, 'Abdulsalaam', NULL, 4, 'Doctor', 'General', 'Doctors', NULL, 'abdulsalam', 'abdulsalamabubakar2023@gmail.com', 'JOHNY', NULL, NULL, '099090', NULL, '$2a$10$PlQDdkYqVI/jrlb9ZN9taukB/3CS.pYnHw4sG7w5..yegdVOEyUJO', 'pending', NULL, NULL, NULL, NULL, NULL, 'abdulsalamabubakar2023@gmail.com', NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2021-05-26 18:19:09', '2021-05-26 18:19:09', 'doctors', 'ref3000ff', NULL, NULL, NULL),
(728, 'doctor', 'me', 4, 'Doctor', '', 'Doctors', NULL, 'doctorme', '', NULL, NULL, NULL, NULL, NULL, '$2a$10$gEeWX9r0DVSTCH3NgJmqPuTrtWWt9Clp9EsDeZVcJhgv4cB7YC8w6', 'approved ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'https://res.cloudinary.com/emaitee/image/upload/v1593618169/mylikita/profile_images/docAvater.png', '2021-09-28 11:15:24', '2021-09-28 11:15:34', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a', 'abdurrahman', '', 'Patient List,Consultations,Lab Results,Video Chat,Appointments', NULL);

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

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

CREATE TABLE `vital_signs` (
  `id` int(11) NOT NULL,
  `patient_id` varchar(50) NOT NULL,
  `body_temp` varchar(5) DEFAULT NULL,
  `pulse_rate` varchar(10) DEFAULT NULL,
  `blood_pressure` varchar(10) DEFAULT NULL,
  `respiratory_rate` varchar(10) DEFAULT NULL,
  `fasting_blood_sugar` varchar(10) DEFAULT NULL,
  `random_blood_sugar` varchar(10) DEFAULT NULL,
  `created_by` varchar(50) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `facilityId` varchar(50) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

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

INSERT INTO `vital_signs` (`id`, `patient_id`, `body_temp`, `pulse_rate`, `blood_pressure`, `respiratory_rate`, `fasting_blood_sugar`, `random_blood_sugar`, `created_by`, `created_at`, `facilityId`) VALUES
(1, '1-1', '23', '33', '54', '54', '44', '34', 'abdurrahman', '2021-10-02 07:15:20', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a'),
(2, '1-1', '100', '010', '100', '100', '200', '100', 'abdurrahman', '2021-10-03 03:19:23', '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a');

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

--
-- 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 `bedlist_view`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `bedlist_view`  AS  select `bedlist`.`id` AS `id`,`bedlist`.`sort_index` AS `sort_index`,`bedlist`.`class_type` AS `class_type`,`bedlist`.`price` AS `price`,`bedlist`.`name` AS `name`,`bedlist`.`no_of_beds` AS `no_of_beds`,ifnull((select count(`bed_allocation`.`bed_id`) from `bed_allocation` where `bed_allocation`.`bed_id` = `bedlist`.`id` and `bed_allocation`.`facilityId` = `bedlist`.`facilityId` and `bed_allocation`.`ended` is null group by `bed_allocation`.`bed_id`),0) AS `occupied`,`bedlist`.`facilityId` AS `facilityId` from `bedlist` ;

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

--
-- Structure for view `drug_schedule_view`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `drug_schedule_view`  AS  select `a`.`drug` AS `drug`,`a`.`dosage` AS `dosage`,`a`.`patient_id` AS `patient_id`,`a`.`created_at` AS `created_at`,`a`.`id` AS `prescription_id`,`b`.`id` AS `id`,`a`.`prescribed_by` AS `prescribed_by`,`b`.`administered_by` AS `administered_by`,`b`.`stopped_by` AS `stopped_by`,`b`.`reason` AS `reason`,`a`.`duration` AS `duration`,`a`.`period` AS `period`,`a`.`frequency` AS `frequency`,`a`.`route` AS `route`,`b`.`time_stamp` AS `time_stamp`,`b`.`status` AS `status`,`a`.`facilityId` AS `facilityId` from (`dispensary` `a` join `drug_schedule` `b` on(`a`.`id` = `b`.`prescription_id`)) ;

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

--
-- 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 `in_patient_list`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `in_patient_list`  AS  select `b`.`sort_index` AS `sort_index`,`a`.`bed_id` AS `bed_id`,`a`.`allocation_id` AS `allocation_id`,`a`.`allocation_status` AS `allocation_status`,`a`.`allocated` AS `allocated`,`a`.`allocated_by` AS `allocated_by`,`a`.`patient_name` AS `patient_name`,`a`.`patient_id` AS `patient_id`,`a`.`accountNo` AS `accountNo`,`b`.`name` AS `name`,`b`.`class_type` AS `class_type`,`b`.`account` AS `account`,`b`.`price` AS `price`,`a`.`facilityId` AS `facilityId` from (`patient_bed` `a` join `bedlist` `b` on(`a`.`bed_id` = `b`.`id`)) where `a`.`facilityId` = `b`.`facilityId` ;

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

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

CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `lab_info`  AS  select `b`.`sort_index` AS `sn`,`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`.`request_id` AS `request_id`,`a`.`patient_id` AS `patient_id`,`b`.`qms_dept_id` AS `qms_dept_id`,`b`.`head` AS `head`,`b`.`subhead` AS `subhead`,`b`.`unit` AS `unit`,`b`.`range_from` AS `range_from`,`b`.`range_to` AS `range_to`,`b`.`price` AS `price`,`b`.`old_price` AS `old_price`,`b`.`commission_type` AS `commission_type`,`b`.`percentage` AS `percentage`,`b`.`description` AS `description`,`b`.`specimen` AS `specimen`,`a`.`noOfLabels` AS `noOfLabels`,`a`.`label_type` AS `label_type`,`b`.`label_name` AS `label_name`,`a`.`department` AS `department`,`a`.`result` AS `result`,`a`.`h_value` AS `h_value`,`a`.`o_value` AS `o_value`,`a`.`appearance` AS `appearance`,`a`.`serology` AS `serology`,`a`.`culture_yielded` AS `culture_yielded`,`a`.`sensitivity` AS `sensitivity`,`a`.`resistivity` AS `resistivity`,`a`.`intermediaryTo` AS `intermediaryTo`,`b`.`lab_code` AS `lab_code`,`b`.`selectable` AS `selectable`,`a`.`status` AS `status`,`a`.`print_type` AS `print_type`,`b`.`report_type` AS `report_type`,`b`.`collect_sample` AS `collect_sample`,`b`.`to_be_reported` AS `to_be_reported`,`b`.`to_be_analyzed` AS `to_be_analyzed`,`a`.`created_by` AS `created_by`,`a`.`sample_collected_by` AS `sample_collected_by`,`a`.`sample_collected_at` AS `sample_collected_at`,`a`.`analyzed_by` AS `analyzed_by`,`a`.`analyzed_at` AS `analyzed_at`,`a`.`result_by` AS `result_by`,`a`.`result_at` AS `result_at`,`a`.`reviewed_by` AS `reviewed_by`,`a`.`reviewed_at` AS `reviewed_at`,`a`.`printed_by` AS `printed_by`,`a`.`printed_at` AS `printed_at`,`a`.`unit` AS `n_unit`,`a`.`range_from` AS `n_range_from`,`a`.`range_to` AS `n_range_to`,`a`.`receiptNo` AS `receiptNo`,`a`.`sop_instance_id` AS `sop_instance_id`,`a`.`uploaded_at` AS `uploaded_at`,`a`.`uploaded_by` AS `uploaded_by`,`a`.`payment_status` AS `payment_status`,`a`.`approval_status` AS `approval_status` from (`lab_setup` `b` join `lab_requisition` `a` on(`b`.`subhead` = `a`.`test`)) where `a`.`facilityId` = `b`.`facilityId` ;

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

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

CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `lab_process`  AS  select `a`.`sn` AS `sn`,`a`.`created_at` AS `created_at`,`a`.`facilityId` AS `facilityId`,`a`.`id` AS `id`,`a`.`qms_dept_id` AS `qms_dept_id`,`a`.`code` AS `code`,`a`.`booking_no` AS `booking_no`,`a`.`request_id` AS `request_id`,`a`.`patient_id` AS `patient_id`,concat(`c`.`firstname`,' ',`c`.`surname`) AS `name`,`c`.`DOB` AS `DOB`,`c`.`Gender` AS `Gender`,`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`.`old_price` AS `old_price`,`a`.`commission_type` AS `commission_type`,`a`.`percentage` AS `percentage`,`a`.`description` AS `description`,`a`.`specimen` AS `specimen`,`a`.`noOfLabels` AS `noOfLabels`,`a`.`label_type` AS `label_type`,`a`.`label_name` AS `label_name`,`a`.`group_head` AS `group_head`,`a`.`department` AS `department`,`b`.`description` AS `department_head`,`a`.`result` AS `result`,`a`.`h_value` AS `h_value`,`a`.`o_value` AS `o_value`,`a`.`appearance` AS `appearance`,`a`.`serology` AS `serology`,`a`.`culture_yielded` AS `culture_yielded`,`a`.`sensitivity` AS `sensitivity`,`a`.`resistivity` AS `resistivity`,`a`.`intermediaryTo` AS `intermediaryTo`,`a`.`lab_code` AS `lab_code`,`a`.`selectable` AS `selectable`,`a`.`status` AS `status`,`a`.`print_type` AS `print_type`,`a`.`report_type` AS `report_type`,`a`.`collect_sample` AS `collect_sample`,`a`.`to_be_reported` AS `to_be_reported`,`a`.`to_be_analyzed` AS `to_be_analyzed`,`a`.`created_by` AS `created_by`,`a`.`sample_collected_by` AS `sample_collected_by`,`a`.`sample_collected_at` AS `sample_collected_at`,`a`.`analyzed_by` AS `analyzed_by`,`a`.`analyzed_at` AS `analyzed_at`,`a`.`result_by` AS `result_by`,`a`.`result_at` AS `result_at`,`a`.`reviewed_by` AS `reviewed_by`,`a`.`reviewed_at` AS `reviewed_at`,`a`.`printed_by` AS `printed_by`,`a`.`printed_at` AS `printed_at`,`a`.`n_unit` AS `n_unit`,`a`.`n_range_from` AS `n_range_from`,`a`.`n_range_to` AS `n_range_to`,`a`.`receiptNo` AS `receiptNo`,`a`.`sop_instance_id` AS `sop_instance_id`,`a`.`uploaded_at` AS `uploaded_at`,`a`.`uploaded_by` AS `uploaded_by`,`a`.`payment_status` AS `payment_status`,`a`.`approval_status` AS `approval_status` from ((`lab_request2` `a` join `lab_setup` `b`) join `patientrecords` `c`) where `a`.`department` = `b`.`subhead` and `a`.`patient_id` = `c`.`id` and `a`.`facilityId` = `b`.`facilityId` ;

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

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

CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `lab_request2`  AS  select `a`.`sn` AS `sn`,`a`.`created_at` AS `created_at`,`a`.`facilityId` AS `facilityId`,`a`.`id` AS `id`,`a`.`qms_dept_id` AS `qms_dept_id`,`a`.`code` AS `code`,`a`.`booking_no` AS `booking_no`,`a`.`request_id` AS `request_id`,`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`.`old_price` AS `old_price`,`a`.`commission_type` AS `commission_type`,`a`.`percentage` AS `percentage`,`a`.`description` AS `description`,`a`.`specimen` AS `specimen`,`a`.`noOfLabels` AS `noOfLabels`,`a`.`label_type` AS `label_type`,`a`.`label_name` AS `label_name`,`b`.`description` AS `group_head`,`a`.`department` AS `department`,`a`.`result` AS `result`,`a`.`h_value` AS `h_value`,`a`.`o_value` AS `o_value`,`a`.`appearance` AS `appearance`,`a`.`serology` AS `serology`,`a`.`culture_yielded` AS `culture_yielded`,`a`.`sensitivity` AS `sensitivity`,`a`.`resistivity` AS `resistivity`,`a`.`intermediaryTo` AS `intermediaryTo`,`a`.`lab_code` AS `lab_code`,`a`.`selectable` AS `selectable`,`a`.`status` AS `status`,`a`.`print_type` AS `print_type`,`a`.`report_type` AS `report_type`,`b`.`collect_sample` AS `collect_sample`,`b`.`to_be_reported` AS `to_be_reported`,`b`.`to_be_analyzed` AS `to_be_analyzed`,`a`.`created_by` AS `created_by`,`a`.`sample_collected_by` AS `sample_collected_by`,`a`.`sample_collected_at` AS `sample_collected_at`,`a`.`analyzed_by` AS `analyzed_by`,`a`.`analyzed_at` AS `analyzed_at`,`a`.`result_by` AS `result_by`,`a`.`result_at` AS `result_at`,`a`.`reviewed_by` AS `reviewed_by`,`a`.`reviewed_at` AS `reviewed_at`,`a`.`printed_by` AS `printed_by`,`a`.`printed_at` AS `printed_at`,`a`.`n_unit` AS `n_unit`,`a`.`n_range_from` AS `n_range_from`,`a`.`n_range_to` AS `n_range_to`,`a`.`receiptNo` AS `receiptNo`,`a`.`sop_instance_id` AS `sop_instance_id`,`a`.`uploaded_at` AS `uploaded_at`,`a`.`uploaded_by` AS `uploaded_by`,`a`.`payment_status` AS `payment_status`,`a`.`approval_status` AS `approval_status` from (`lab_info` `a` join `lab_setup` `b` on(`b`.`subhead` = `a`.`head`)) where `a`.`facilityId` = `b`.`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 `patientfileno_full`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `patientfileno_full`  AS  select `patientfileno`.`id` AS `id`,count(`patientfileno`.`accountNo`) AS `acc_count`,`patientfileno`.`accountNo` AS `accountNo`,`patientfileno`.`beneficiaries` AS `beneficiaries`,`patientfileno`.`firstname` AS `firstname`,`patientfileno`.`surname` AS `surname`,`patientfileno`.`status` AS `status`,`patientfileno`.`createdAt` AS `createdAt`,`patientfileno`.`accName` AS `accName`,`patientfileno`.`description` AS `description`,`patientfileno`.`accountType` AS `accountType`,`patientfileno`.`contactName` AS `contactName`,`patientfileno`.`contactAddress` AS `contactAddress`,`patientfileno`.`contactPhone` AS `contactPhone`,`patientfileno`.`contactEmail` AS `contactEmail`,`patientfileno`.`contactWebsite` AS `contactWebsite`,`patientfileno`.`balance` AS `balance`,`patientfileno`.`guarantor_name` AS `guarantor_name`,`patientfileno`.`guarantor_address` AS `guarantor_address`,`patientfileno`.`guarantor_phone` AS `guarantor_phone`,`patientfileno`.`created_by` AS `created_by`,`patientfileno`.`approved_by` AS `approved_by`,`patientfileno`.`approved_at` AS `approved_at` from `patientfileno` group by `patientfileno`.`accountNo`,`patientfileno`.`firstname`,`patientfileno`.`surname`,`patientfileno`.`beneficiaries` order by `patientfileno`.`accountNo` ;

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

--
-- Structure for view `patient_bed`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `patient_bed`  AS  select `a`.`id` AS `allocation_id`,`a`.`bed_id` AS `bed_id`,`a`.`allocated` AS `allocated`,`a`.`allocated_by` AS `allocated_by`,`a`.`allocation_status` AS `allocation_status`,concat(`b`.`surname`,' ',`b`.`firstname`) AS `patient_name`,`a`.`patient_id` AS `patient_id`,`b`.`accountNo` AS `accountNo`,`a`.`facilityId` AS `facilityId` from (`bed_allocation` `a` join `patientrecords` `b` on(`a`.`patient_id` = `b`.`id`)) where `a`.`facilityId` = `b`.`facilityId` and `a`.`ended` is null ;

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

--
-- Structure for view `saved_pending_request`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `saved_pending_request`  AS  (select distinct `a`.`booking_no` AS `labno`,`a`.`booking_no` AS `booking_no`,concat(`b`.`surname`,' ',`b`.`firstname`) AS `name`,`a`.`code` AS `code`,`a`.`patient_id` AS `patient_id`,`a`.`status` AS `status`,`a`.`department_head` AS `department`,`a`.`head` AS `head`,`a`.`group_head` AS `test_group`,`a`.`description` AS `description`,`a`.`subhead` AS `subhead` from (`lab_process` `a` join `patientrecords` `b` on(`a`.`patient_id` = `b`.`id`)) where `a`.`status` in ('Sample Collected','saved') and `a`.`facilityId` = '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a' and `b`.`facilityId` = '1be0a9da-bff9-4ab6-a36c-edfd8ca88f1a') ;

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

--
-- 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`.`transaction_date` AS `createdAt`,`b`.`transaction_date` AS `transaction_date`,`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`)) where `b`.`status` = 'pending' ;

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

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

CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `transaction_view`  AS  select `transactions`.`facilityId` AS `facilityId`,`transactions`.`transaction_date` 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`.`credit`) - sum(`a`.`debit`) AS `credit`,cast(`a`.`transaction_date` as date) AS `createdAt`,cast(`a`.`transaction_date` 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 ;

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

--
-- 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`,`b`.`facilityId` AS `facilityId`,`a`.`transaction_date` AS `createdAt`,`a`.`transaction_date` AS `created_at`,`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 `a`.`status` = 'pending' ;

--
-- Indexes for dumped tables
--

--
-- 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 `account_ubec`
--
ALTER TABLE `account_ubec`
  ADD PRIMARY KEY (`head`,`facilityId`);

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

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

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

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

--
-- Indexes for table `consultations`
--
ALTER TABLE `consultations`
  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 `drug_frequency`
--
ALTER TABLE `drug_frequency`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `drug_schedule`
--
ALTER TABLE `drug_schedule`
  ADD PRIMARY KEY (`id`),
  ADD KEY `prescription_id` (`prescription_id`);

--
-- 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`),
  ADD KEY `test` (`test`),
  ADD KEY `patient_id` (`patient_id`);

--
-- Indexes for table `lab_setup`
--
ALTER TABLE `lab_setup`
  ADD PRIMARY KEY (`subhead`);

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

--
-- Indexes for table `lab_setup4`
--
ALTER TABLE `lab_setup4`
  ADD PRIMARY KEY (`subhead`,`facilityId`);

--
-- Indexes for table `nursing_report`
--
ALTER TABLE `nursing_report`
  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`);

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

--
-- 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 `sensitivity_results`
--
ALTER TABLE `sensitivity_results`
  ADD PRIMARY KEY (`antibiotic`,`labno`);

--
-- 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 `surgeons_list`
--
ALTER TABLE `surgeons_list`
  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`,`facilityId`);

--
-- Indexes for table `vital_signs`
--
ALTER TABLE `vital_signs`
  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 `bedlist`
--
ALTER TABLE `bedlist`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=19;

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

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

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

--
-- 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 `druglist`
--
ALTER TABLE `druglist`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

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

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

--
-- 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 for table `lab_requisition`
--
ALTER TABLE `lab_requisition`
  MODIFY `id` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=19;

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

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

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

--
-- 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=10;

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

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

--
-- 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=72;

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

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

--
-- 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=729;

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

