You know what would be really cool?

For users or potential users.
Post Reply
msmfd
Posts: 21
Joined: Mon Feb 22, 2021 7:32 am

You know what would be really cool?

Post by msmfd » Wed Jul 28, 2021 8:26 am

And forgive me if this is already possible.....
I am working through flagging patients in the system who have analog panos on file that need to be destroyed once we have a digital pan for them. I am doing this aplhabetically. It'd be great if when you pull up the "selct patient" window, it would automatically open back up to where you left off.

Tom Zaccaria
Posts: 353
Joined: Mon Feb 25, 2008 3:09 am

Re: You know what would be really cool?

Post by Tom Zaccaria » Wed Jul 28, 2021 10:35 am

This will list all the pans you took depending on the date range you put in.

drtmz

/*264 List of procedures for a date range with patient name, service date, procedure code,
primary insurance carrier, fee, sum of ins est, sum ins paid*/

SET @FromDate='2021-1-01' , @ToDate=curdate(); /* change date here, change list of proc codes below*/
SELECT p.PatNum, pl.ProcDate, pl.ProvNum, pc.ProcCode,CarrierName AS 'PriInsName',pl.ProcFee,
(SELECT SUM(cp.InsPayEst) FROM claimproc cp WHERE cp.ProcNum=pl.ProcNum AND cp.Status IN (0,1,4)) AS '$InsPayEst',
(SELECT SUM(cp.InsPayAmt) FROM claimproc cp WHERE cp.ProcNum=pl.ProcNum AND cp.Status IN (1,4)) AS '$InsPaidAmt'
FROM procedurelog pl
INNER JOIN patient p ON p.PatNum=pl.PatNum /*just in case we need field from patient table*/
INNER JOIN procedurecode pc ON pl.CodeNum=pc.CodeNum
LEFT JOIN patplan pp ON pp.PatNum=p.PatNum AND ORDINAL=1/*by current primary insurance*/
LEFT JOIN inssub iss ON pp.InsSubNum=iss.InsSubNum
LEFT JOIN insplan ip ON ip.PlanNum=iss.PlanNum
LEFT JOIN carrier ON carrier.CarrierNum=ip.CarrierNum
WHERE pl.ProcDate BETWEEN @FromDate AND @ToDate
AND pl.ProcStatus=2 AND pc.ProcCode IN('D0330')
AND CarrierName not like '%DMO%'
AND CarrierName not like '%DHMO%'
AND CarrierName not like '%UCCI Plus%'
AND CarrierName not like '%Delta Care%'
AND CarrierName not like '%Dominion%'
AND CarrierName not like '%Aetna Medicare%'
AND CarrierName not like '%Value Plan%'
AND (SELECT SUM(cp.InsPayAmt) FROM claimproc cp WHERE cp.ProcNum=pl.ProcNum AND cp.Status IN (1,4)) > 0

GROUP BY pl.ProcNum
ORDER BY pl.ProcDate, p.LName,p.FName;

msmfd
Posts: 21
Joined: Mon Feb 22, 2021 7:32 am

Re: You know what would be really cool?

Post by msmfd » Wed Jul 28, 2021 11:04 am

Thanks for sharing!

Tom Zaccaria
Posts: 353
Joined: Mon Feb 25, 2008 3:09 am

Re: You know what would be really cool?

Post by Tom Zaccaria » Wed Jul 28, 2021 11:20 am

It was modified from the query examples list. Plus,I like to be in the 'Cool' category.

drtmz

Post Reply