So I'm doing this report for patients on a certain type of medication but whenever I run the report with the following formula their names are still coming up even if the medication had a stop date. Can someone please tell me what the table/formula is to only see the current meds they are on and not pull in the medication if they are no longer on.
({MEDICATE.DESCRIPTION} startswith "DURAGESIC" or {MEDINFO.GENERICNAME} = "FENTANYL") and
{MEDICATE.STOPDATE} >= Date (4700, 12, 31)and
{LOCREG.ABBREVNAME} = "xxxxxxx" and
{LOCREGprovider.ABBREVNAME} = "xxxxxxx" and
{PERSON.PSTATUS} = "A"
I include the following two lines, when trying to determine current medications:
cstr({MEDICATE.XID}) = "1.00e+035" and
{MEDICATE.STOPDATE} = Date (4700, 12, 31) and
~Joe
You are awesome!! That worked!
Thanks so much.
You can also check the XID against the number 1*10^18.