SELECT an.Assmt_ID, p.Patient_Id, p.Pt_Last, p.Pt_First, p.Pt_Middle,py.Pay_Name, pa.M0030_START_CARE_DT,d.Description,pa.Admit_ID FROM #Request.prefix_db_agency#.pAssessments an JOIN #Request.prefix_db_agency#.pPatients p on an.Patient_Id = p.Patient_Id JOIN #Request.prefix_db_agency#.pAdmit pa on an.Admit_ID = pa.Admit_ID AND pa.Status = 0 LEFT OUTER JOIN #Request.prefix_db_agency#.pPtPayer pt on p.Patient_Id = pt.Patient_ID AND pt.Status = 0 AND pt.Payer_Responsibility = 'P - Primary' LEFT OUTER JOIN #Request.prefix_db_agency#.pPayer py on py.Pay_ID = pt.Payer_ID AND py.Status = 0 RIGHT OUTER JOIN #Request.prefix_db_agency#.pProblem d on d.Assmt_ID = an.Assmt_ID AND d.M0_No like 'M102%' WHERE p.Status < 2 AND an.Status = 0 AND pa.Status = 0 AND an.F25 = 1 AND an.F26 NOT IN ('H&P Review') AND an.F176 >= #CreateODBCDate(Form.From_Date)# AND an.F176 <= #CreateODBCDate(Form.To_Date)# AND pa.Admit_Type = '#Form.Admit_Type#' AND an.F26 like '1%' AND an.F26 like '%Adult%' AND an.F26 like '%Hospice%' AND an.F26 like '%Pediatric%' AND an.F26 like '%Non-Medical%' AND py.Biller_Type IN ( ) GROUP BY an.Assmt_ID ORDER BY an.F26 ASC
UnDuplicated Census Report
UnDuplicated Census Report

Payer Type: #Replace(Form.PayerType, ",", ", ", "ALL")#

Payer Name: #Form.Pay_Name#

Patient Name Payer SOC Date Primary Diagnosis
#Pt_Last#, #Pt_First# #Pt_Middle# #Pay_Name# #DateFormat(M0030_START_CARE_DT,"mm/dd/yyyy")# #Description#
Total patients admitted: #Patient_Ctr# for the period of #Form.From_Date# to #Form.To_Date#