d select COUNT(*) from "LabSampleCollection" LS
 join "NewLabBookingDetail" LD on LD."NewLabBookingDetailId"=LS."NewLabBookingDetailId"
 join "Account" A on A."AccountId"=LS."SampleCollectedBy"
 where LS."CollectionDate"::date="fromDate"
 and case when "locationId" is null then 1=1 else LS."LocationId"= "locationId" end for sample collection
============================================================================================
d select COUNT(*) from "LabTransferHeader" LT
	join "LabTransferDetail" LD on LD."LabTransferHeaderId"=LT."LabTransferHeaderId"
	join "Account" A on A."AccountId" = LT."TransferedBy"
	where LT."TransferedDate"::date='2023-06-20':: date for transfer--done
================================================================================================
select COUNT(*) from "NewLabBookingHeader" LH
 join "NewLabBookingDetail" LD on LD."NewLabBookingHeaderId"=LH."NewLabBookingHeaderId"
	--join "Provider" pr on pr."ProviderId"= LH."DoctorId"
	where LH."CreatedDate"::date='26-05-2023' and LH."Active" is true and LD."LabBookingStatusId"=2 for cancel
============================================================================================================
     d	select count(*) from "LabBookingTimeLine" lbt
	join "LabBookingStatus" lbs on lbs."LabBookingStatusId" = lbt."LabBookingStatusId" where lbs."Status" = 'Verified'
	and lbt."CreatedDate" :: date ='2023-04-24':: date for verifying reports-done
======================================================================================================================
	d select count(*) from "LabBookingTimeLine" lbt
	join "LabBookingStatus" lbs on lbs."LabBookingStatusId" = lbt."LabBookingStatusId" where lbs."Status" = 'SampleRecieved'
	and lbt."CreatedDate" :: date ='2023-04-24':: date date for recieving -done
====================================================================================================================================
widget_GetSampleCount("fromDate" date, "referenceId" int4, "locationId" int4)