HOME

 

PreAdmission Testing

SELECT DISTINCT CnlyClaimNum, BillProvName, SvcProvNum, LineBeginDOS, CnlySubscriberId, MedicaidInd, POS, PaidDT, ClaimBEGDOS, TOB, AdmitDX, ClmPaidAmt, ClaimEndDOS,

ProcCd, TaxonomyCd

FROM dbo.scrClaimsDetail

WHERE TOB LIKE '11%' AND ClmPaidAmt<>0.00 AND ProcCd<>'' AND PaidDt BETWEEN GETDATE()-720 and GETDATE()-30;

Inpatient Stay

SELECT DISTINCT CnlyClaimNum, AllFlags, BillProvName, SvcProvNum, LineBeginDOS, CnlySubscriberId, MedicaidInd, POS, SubST, PaidDT, RevCD, ClaimBEGDOS,

NoTouchFlag, ClientLOB, CLMPaidAMT, DxCd1, SvcProvSpecCd, LinePaidAmt, BillStExp

FROM dbo.scrClaimsDetail

WHERE POS in ('22','23') AND CLMPaidAMT>100.00 AND LinePaidAmt>100.00 AND PaidDt BETWEEN GETDATE()-720 AND GETDATE()-30;

PreAdmission Testing to Inpatient Stay

SELECT PreTesting1.*, IP.*

FROM PreTesting1 INNER JOIN IP ON (PreTesting1.SvcProvNum=IP.SvcProvNum) AND (PreTesting1.CnlySubscriberId = IP.CnlySubscriberId)

WHERE PreTesting1.ClaimBEGDOS =IP.AdmitDT OR PreTesting1.ClaimBEGDOS +1 =IP.AdmitDT OR PreTesting1.ClaimBEGDOS +2 =IP.AdmitDT OR PreTesting1.ClaimBEGDOS +3 =IP.AdmitDT

and PreTesting1.CnlyClaimNum<>IP.CnlyClaimNum

ORDER BY PreTesting1.CLMPaidAMT DESC;