Hello,
I'm looking for a report that gives all our Inactive/Non-pts. I want to make sure we don't have insurances attached to them. We are trying to figure out how many pts we have for each insurance carrier.
Thank you
Inactive Pt Report
-
- Posts: 356
- Joined: Mon Feb 25, 2008 3:09 am
Re: Inactive Pt Report
Try this,
drtmz
SELECT IFNULL(Left(c.CarrierName, 15), 'None') AS CarrierName, Left(GroupName, 15) AS GroupName,
PlanType, p.PatNum, CONCAT(p.LName,', ',p.FName,' ',p.MiddleI) AS PatName, ib.SubscriberId,p.Patstatus
FROM patient p
LEFT JOIN patplan pp ON pp.PatNum=p.PatNum
LEFT JOIN inssub ib ON ib.InsSubNum=pp.InsSubNum
LEFT JOIN insplan ip ON ip.PlanNum=ib.PlanNum
LEFT JOIN carrier c ON c.CarrierNum=ip.CarrierNum
WHERE p.PatStatus<>0 AND (pp.Ordinal=1 OR ISNULL(c.CarrierName))
ORDER BY c.CarrierName, GroupName, p.LName;
drtmz
SELECT IFNULL(Left(c.CarrierName, 15), 'None') AS CarrierName, Left(GroupName, 15) AS GroupName,
PlanType, p.PatNum, CONCAT(p.LName,', ',p.FName,' ',p.MiddleI) AS PatName, ib.SubscriberId,p.Patstatus
FROM patient p
LEFT JOIN patplan pp ON pp.PatNum=p.PatNum
LEFT JOIN inssub ib ON ib.InsSubNum=pp.InsSubNum
LEFT JOIN insplan ip ON ip.PlanNum=ib.PlanNum
LEFT JOIN carrier c ON c.CarrierNum=ip.CarrierNum
WHERE p.PatStatus<>0 AND (pp.Ordinal=1 OR ISNULL(c.CarrierName))
ORDER BY c.CarrierName, GroupName, p.LName;
Re: Inactive Pt Report
Thanks! I'll try it.