SELECT si.*, p.last_name_m0040 as lastname, p.first_name_m0040 as firstname, t.call_date, Lower(t.call_type) as call_type, t.call_telephonyid FROM #Request.prefix_db_agency#.telephony_input t LEFT JOIN #Request.prefix_db_agency#.ScheduleItems si ON si.Telephony_ID = t.call_telephonyid LEFT JOIN #Request.prefix_db_agency#.patient p ON p.Patient_id = si.Patient_id WHERE t.agency_id = #session.AgencyID# AND t.call_telephonyid = ORDER BY call_type MyHomecareBiz.com

#lastname#, #firstname# - #DateFormat(Visit_Date, "long")#

Visit Type #Visit_Type#
Visit Notes #Visit_Notes#
Bill Type #Bill_Type#
Output Type #Output_Type#
Total E-Claim #DollarFormat(Total_EClaim)#
Total QB #DollarFormat(Total_QB)#
Actual StartEnd #call_date#

Could not find record.