I am using Cyrstal Reports 10.0 to connect to our electronic medical record with an ODBC connection. I am trying to get patients that come for appointments during a certain timeframe and who may have one of three diagnosis. My formula includes some OR statements.
{RPTAPPT.APPTDATE} >=Date(DateAdd("d",+1,(CurrentDate))) and
{RPTAPPT.APPTDATE} < Date(DateAdd("d",+3,(CurrentDate))) and
{RPTAPPT.APPTSTATUS} = 0.00 and
({HTN_EXTRACT.HOMELOCATION} = 1270480543003540 or {CAD_EXTRACT.HOMELOCATION} = 1270480543003540 or
{DIABETES_EXTRACT.HOMELOCATION} = 1270480543003540)
The problem is that I never get patients who have just the second or third Homelocation, I only get patients who have the first homelocation and may or maynot have the second or third.
Is there a way for me to get what I really want, patients who are at any of these three homelocations?
Thanks in advance for your help.
{RPTAPPT.APPTDATE} >=Date(DateAdd("d",+1,(CurrentDate))) and
{RPTAPPT.APPTDATE} < Date(DateAdd("d",+3,(CurrentDate))) and
{RPTAPPT.APPTSTATUS} = 0.00 and
({HTN_EXTRACT.HOMELOCATION} = 1270480543003540 or {CAD_EXTRACT.HOMELOCATION} = 1270480543003540 or
{DIABETES_EXTRACT.HOMELOCATION} = 1270480543003540)
The problem is that I never get patients who have just the second or third Homelocation, I only get patients who have the first homelocation and may or maynot have the second or third.
Is there a way for me to get what I really want, patients who are at any of these three homelocations?
Thanks in advance for your help.