SELECT pPatients.Patient_ID, pPatients.Pt_Last AS PatientLast, pPatients.Pt_First AS PatientFirst, pSchedules.Skill AS Type, 0 AS No_Days_Progress, "" AS Note_QA , pEmployee.Emp_ID, pEmployee.Emp_Last, pEmployee.Emp_First, pAssessments.Assmt_ID, pSchedules.* FROM #Request.prefix_db_agency#.pAssessments, #Request.prefix_db_agency#.pPatients, #Request.prefix_db_agency#.pSchedules, #Request.prefix_db_lookup#.pEmployee WHERE pSchedules.Assmt_ID = pAssessments.Assmt_ID AND pAssessments.status = 0 AND pPatients.Patient_ID = pSchedules.Patient_ID AND pPatients.Status < 2 AND pSchedules.status= 0 AND pSchedules.Emp_ID != 0 AND pSchedules.pgnotesdraft > 0 AND pSchedules.Missed = '0' AND pSchedules.Emp_ID = pEmployee.Emp_ID GROUP BY pSchedules.Patient_ID,pSchedules.Skill ORDER BY pPatients.Pt_Last ASC, pPatients.Pt_First ASC, pEmployee.Emp_Last ASC, pEmployee.Emp_First ASC, pSchedules.Skill ASC, pSchedules.Visit_Date DESC SELECT p.Patient_ID, p.Pt_Last, p.Pt_First, p.Status FROM #Request.prefix_db_agency#.pPatients p WHERE p.Loc_ID = '#session.agencyid#' AND p.Status < 0 ORDER BY p.Pt_Last ASC, p.Pt_First ASC SELECT e.Emp_ID, e.Emp_Last, e.Emp_First, e.Status FROM #Request.prefix_db_lookup#.pEmployee e WHERE e.Loc_ID = '#session.agencyid#' AND e.Emp_Type = 'employee' ORDER BY e.Emp_Last ASC, e.Emp_First ASC
Patient Not On Track
Patient Clinciains Result
#PatientLast# #PatientFirst# #Emp_Last# #Emp_First# #display_value#