pm = CreateObject("Component", "Menu"); myArgument = 'unstable_symptoms'; pm.MenuFunction(myArgument,#getP.Patient_Id#,'','','',''); request.pat = CreateObject("component","components.general.patients").init(); getadmit = request.pat.get_admissions(#session.cs.patientid#); SELECT pPatients.Patient_ID, pPatients.Pt_Last AS PatientLast, pPatients.Pt_First AS PatientFirst, pSchedules.Schedule_ID, pSchedules.Visit_Date, pSchedules.Skill AS Type, pSchedules.Missed, pSchedules.Progress_Note, pSchedules.Pay_ID, 0 AS No_Days_Progress, "" AS Note_QA , pEmployee.Emp_ID, pEmployee.Emp_Last, pEmployee.Emp_First, pAssessments.Assmt_ID,pAssessments.F26 , pProgress. *,IFNULL(Left(pProblem.Answer,1),2) AS probSeverity FROM #Request.prefix_db_agency#.pProgress JOIN #Request.prefix_db_agency#.pSchedules ON pSchedules.Schedule_ID = pProgress.Schedule_ID JOIN #Request.prefix_db_agency#.pAssessments ON pSchedules.Assmt_ID = pAssessments.Assmt_ID JOIN #Request.prefix_db_agency#.pPatients ON pPatients.Patient_ID = pSchedules.Patient_ID JOIN #Request.prefix_db_lookup#.pEmployee ON pSchedules.Emp_ID = pEmployee.Emp_ID LEFT OUTER JOIN #Request.prefix_db_agency#.pProblem ON pProblem.Problem_ID = pProgress.Careplan_ID WHERE pAssessments.status = 0 AND pPatients.Status < 1 AND pSchedules.status= 0 AND pSchedules.Emp_ID != 0 AND pSchedules.Missed = '0' AND pPatients.Patient_ID = '#session.cs.patientid#' AND pSchedules.Skill = 'SN' AND DATE_FORMAT(pProgress.Date_Create, "%Y%m%d") != DATE_FORMAT(pSchedules.Visit_Date, "%Y%m%d") AND pProgress.Type = 'problem' GROUP BY pProgress.Progress_ID ORDER BY pPatients.Pt_Last ASC, pPatients.Pt_First ASC, pEmployee.Emp_Last ASC, pEmployee.Emp_First ASC, pSchedules.Skill ASC, pSchedules.Visit_Date ASC
Procedures Not Scheduled
style="/*background-color:pink;*/height:30px;" style="height:30px;" class="list-hdr" id="tr#Schedule_ID#">
Patient Assessments Progress Note Date Unstable Symptoms Days Elapsed
#PatientLast# #PatientFirst# #F26# #DateFormat(Date_Create,"mm/dd/yyyy")# #Description# #diffdays#