SELECT patient.Patient_ID, patient.Status, patient.Last_Name_M0040 AS PatientLast, patient.First_Name_M0040 AS PatientFirst, patient.DOB_M0066 AS DOB, patient.Primary_ReferringPhys_ID_M0072,Physician.Physician_ID,Physician.Natl_Provider_ID as NPI,Employee.Last_Name as LastName, Employee.First_Name as FirstName, Agency.Agency_Name, Agency.Agency_Address1, Agency.Agency_City, Agency.Agency_State, Agency.Agency_Zip, Agency.Agency_Contact_Phone, Agency.RevCycle, Assessment_New.Start_of_Care_M0030, Assessment_New.Patient_ID, Assessment_New.Assessment_ID, Assessment_New.Start_of_Care_M0030, Assessment_New.MR_420, Assessment_New.MR_488, Assessment_New.MR_490, Assessment_New.MR_670, Assessment_New.MR_690, Assessment_New.MR_700, Assessment_New.MR_780, MID(Assessment_New.Freq_of_Pain_M0420,1,1) as Pain, MID(Assessment_New.Surgical_Wound_Status_M0488,1,1) as Surgical, MID(Assessment_New.Breathing_M0490,1,1) as Breath, MID(Assessment_New.Bathing_M0670,1,1) as Bath, MID(Assessment_New.Transferring_M0690,1,1) as Transfer, MID(Assessment_New.Ambulation_M0700,1,1) as Ambulation, MID(Assessment_New.Oral_Meds_M0780,1,1) as Oral FROM #Request.prefix_db_agency#.patient, #Request.prefix_db_agency#.Assessment_New, #Request.prefix_db_lookup#.Physician,Employee, #Request.prefix_db_lookup#.Agency WHERE patient.Patient_ID = Assessment_New.Patient_ID AND Agency.Agency_ID= Assessment_New.Agency_ID AND patient.Agency_ID = #session.AgencyID# AND Assessment_New.Assessment_ID=#url.assid# AND patient.Patient_ID=#url.id# AND Physician.Physician_ID = patient.Primary_ReferringPhys_ID_M0072 AND Employee.Employee_ID = Physician.Employee_ID AND patient.Status = 'active' AND Assessment_New.Deleted=0 ORDER BY Employee.Last_Name, patient.Last_Name_M0040 select count(*) as no, s.Patient_ID, s.Employee_ID, e.Employee_ID, s.Assessment_Tracker_ID, s.Assessment_ID, s.Visit_Type, e.Last_Name, e.First_Name from #Request.prefix_db_agency#.ScheduleItems s, #Request.prefix_db_lookup#.Employee e where Patient_ID=#Visits1.Patient_ID# and Assessment_ID=#Visits1.Assessment_ID# AND s.Employee_ID= e.Employee_ID Group by s.Employee_ID Order by no desc
#Visits1.Agency_Name#
#Visits1.Agency_Address1#
#Visits1.Agency_City# #Visits1.Agency_State# #Visits1.Agency_Zip#
#Visits1.Agency_Contact_Phone#
  
#Visits1.PatientFirst#  #Visits1.PatientLast# Clinical Outcomes Report
Today #DateFormat(Now(), "mmm-dd-yyyy")#
Compared to admission #DateFormat(Visits1.Start_of_Care_M0030, "mmm-dd-yyyy")#
Physician: #Trim(Visits1.FirstName)#  #Trim(Visits1.LastName)#
 
Clinician # visits for this certification
#First_Name# #Last_Name#
#no#  visits
Deficit since admission on #DateFormat(Visits1.Start_of_Care_M0030, "mmm-dd-yyyy")#
Pain no change Pain no changedecline by #Round(pan)#%improved by #Round(pan)#% Pain no changedecline by #Round(pan)#%improved by #Round(pan)#%
Surgical Wound no change Surgical Wound no changedecline by #Round(ypan)#%improved by #Round(ypan)#% Surgical Wound no changedecline by #Round(ypan)#%improved by #Round(ypan)#%
Shortness of Breath no change Shortness of Breath no changedecline by #Round(bran)#%improved by #Round(bran)#% Shortness of Breath no changedecline by #Round(bran)#%improved by #Round(bran)#%
Bathing ability no change Bathing ability no changedecline by #Round(ban)#%improved by #Round(ban)#% Bathing ability no changedecline by #Abs(ban)#%improved by #Abs(ban)#%
Transferring ability no change Transferring ability no changedecline by #Round(tanf)#%improved by #Round(tanf)#% Transferring ability no changedecline by #Round(tanf)#%improved by #Round(tanf)#%
Ambulation ability no change Ambulation ability no changedecline by #Round(amn)#%improved by #Round(amn)#% Ambulation ability no changedecline by #Round(amn)#%improved by #Round(amn)#%
Oral Medication Mgmt no change Oral Medication Mgmt no changedecline by #Round(yamn)#%improved by #Round(yamn)#% Oral Medication Mgmt no changedecline by #Round(yamn)#%improved by #Round(yamn)#%
OVERALL IMPROVEMENT #NumberFormat(roundval, "0.00")#% after #Differ# days of care
--->
Overall improvement:#Round(totalpercent)#%
---> Please call Technical Support (888) 710-6888 x0 to turn this feature ON.