SELECT a.agency_id,e.employee_id FROM #Request.prefix_db_lookup#.Agency a left outer join #Request.prefix_db_lookup#.Employee e on a.Agency_ID = e.Agency_ID WHERE a.telephony_agencynumber = #agencynumber# AND e.telephony_employeenumber = #employeenumber# SELECT * from #Request.prefix_db_agency#.telephony_input WHERE respondentid = #respondentid# Record #recnum# DUPLICATE, skipped: #ind#
INSERT INTO #Request.prefix_db_agency#.telephony_input (agency_number,employee_number,month_number,visit_number,call_date,call_type,call_telephonyid,call_servicecodes,call_callerid,status,call_original,respondentid,agency_id,employee_id) VALUES(#agencynumber#,#employeenumber#,#monthnumber#,#itemnumber#,#parsedatetime(datefield)#,'#recordtype#','#telephonyid#','#servicecodes#','#callerid#','#thestatus#','#therec#','#respondentid#',#agencyid#,#employeeid#)
Record #recnum# NOT COMPLETED, skipped: #ind#


SELECT Agency.Agency_Name,Employee.Last_Name, Employee.First_Name, Agency.agency_id as aid, Employee.Home_phone as tel1, Employee.Cell_Phone as tel2, Employee.Employee_id as eid,telephony_input.* FROM #Request.prefix_db_agency#.telephony_input left outer join #Request.prefix_db_lookup#.Agency on telephony_input.agency_id = Agency.agency_id left outer join #Request.prefix_db_lookup#.Employee on (telephony_input.employee_id = Employee.employee_id and Employee.agency_id = Agency.agency_id) Where 1 AND telephony_input.status = '#url.view#' AND Agency.agency_id = #url.id# ORDER BY telephony_input.agency_id,telephony_input.employee_id, telephony_input.call_telephonyid,telephony_input.call_date,telephony_input.month_number,telephony_input.visit_number HHA System Administration Superadmin Home

Telephony Input Log

View New    View Deleted    View Invalid    View All   
SELECT si.*,p.last_name_m0040 as lastname, p.telephone, p.first_name_m0040 as firstname FROM #Request.prefix_db_agency#.ScheduleItems si left outer join #Request.prefix_db_agency#.patient p on si.Patient_id = p.Patient_id WHERE si.telephony_id = '#call_telephonyid#' SELECT * from #Request.prefix_db_agency#.telephony_input where call_telephonyid = '#call_telephonyid#' and call_type = 'no' and call_date > '#call_date#'
TelephonyID Type DateTime Duration ServiceCodes Status RespondentID CallerID Month Visit
(#aid#-#agency_number#) #Agency_Name# (#eid#-#employee_number#) #Last_Name#, #First_Name#
#call_telephonyid#
Session
#DATEFORMAT(call_date,"mmm dd, yyyy")# #TIMEFORMAT(call_date,"hh:mm:ss tt")#
#DATEFORMAT(GetMatch.call_date,"mmm dd, yyyy")# #TIMEFORMAT(GetMatch.call_date,"hh:mm:ss tt")#
#numberformat(t1,"09")#:#numberformat(t2,"09")#:#numberformat(t3,"09")#
#GetMatch.call_servicecodes#
#status#
#respondentid#
style="color:red;">#call_callerid#
Emp:#tel1# #tel2#
#monthasstring(month_number)##month_number#
#visit_number#
  #dateformat(GetVisit.visit_date,"mmm dd, yyyy")# #getvisit.starttime#
#dateformat(GetVisit.visit_date,"mmm dd, yyyy")# #getvisit.endtime#
#numberformat(t1,"09")#:#numberformat(t2,"09")#:#numberformat(t3,"09")#
#GetVisit.lastname#, #GetVisit.firstname# style="color:red;">Pat:#GetVisit.telephone#
 No Matching Visit Record for #call_telephonyid#
Login
#DATEFORMAT(call_date,"mmm dd, yyyy")# #TIMEFORMAT(call_date,"hh:mm:ss tt")#
 
#call_servicecodes#
orphan
#respondentid#
style="color:red;">#call_callerid#
Emp:#tel1# #tel2#
#monthasstring(month_number)##month_number#
#visit_number#
Logout
#DATEFORMAT(call_date,"mmm dd, yyyy")# #TIMEFORMAT(call_date,"hh:mm:ss tt")#
 
#call_servicecodes#
orphan
#respondentid#
#call_callerid#
#monthasstring(month_number)##month_number#
#visit_number#
#call_original#