{XRPT_AUTH_MASTER_VW.AUTH_STATUS} = "DN" and
{XRPT_AUTH_MASTER_VW.MEH_LINE_OF_BUSINESS} like {?Line of Business} and
{XRPT_AUTH_MASTER_VW.HEALTH_PLAN_NAME} like {?Health Plan} and
{XRPT_AUTH_MASTER_VW.DENIED_DATE} >= {@Beg date} and
{XRPT_AUTH_MASTER_VW.DENIED_DATE} <= {@End date} and
not({XRPT_AUTH_MASTER_VW.AUTH_TYPE} in ['DIS','CCM','CMG','CVG','DUP','TRK'])
|
{XRPT_AUTH_MASTER_VW.AUTH_STATUS} = "DN" and
{XRPT_AUTH_MASTER_VW.MEH_LINE_OF_BUSINESS} like {?Line of Business} and
{XRPT_AUTH_MASTER_VW.HEALTH_PLAN_NAME} like {?Health Plan} and
(not({XRPT_AUTH_MASTER_VW.AUTH_TYPE} in ['DIS','CCM','CMG','CVG','DUP','TRK']))
AND
(
({?Denied Date From}= DATE(1800,1,1) and {XRPT_AUTH_MASTER_VW.DENIED_DATE} in LastFullMonth)
OR
({?Denied Date From}= DATE(1850,1,1) and {XRPT_AUTH_MASTER_VW.DENIED_DATE} in LastFullWeek)
OR
({?Denied Date From}= DATE(1900,1,1) and {XRPT_AUTH_MASTER_VW.DENIED_DATE}=DATEADD('d',-1,today))
OR
({?Denied Date From}= DATE(1925,1,1) and {XRPT_AUTH_MASTER_VW.DENIED_DATE} in dateadd('q',DATEDIFF('q',DATE(1900,1,1),today)-1,DATE(1900,1,1)) to DATEADD('d',-1,dateadd('q',DATEDIFF('q',DATE(1900,1,1),today),DATE(1900,1,1))))
OR
({?Denied Date From}> DATE(1925,1,1) and {XRPT_AUTH_MASTER_VW.DENIED_DATE} in {?Denied Date From} to {?Denied Date To})
)
Edited by DBlank - 16 Apr 2018 at 10:38am
|