Ok, that's what I am currently doing. But I don't understand why the filters wouldn't work in the original report so I wont have to recreate the report from scratch everytime??
There may be invalid dates like 11/11/20113, for eg. if someone tried to manually enter (today's) date and pressed 1 twice by mistake.
You can make use of the isdate function to check for invalid dates.
After recreating the report from scratch, the report was running fine until I had to put the ClinicalDate formula field into the report. Getting the same error as I did to start with???
Says "The ) is missing" ????
{DOCUMENT.DOCTYPE} = 5.00 and
{DOCUMENT.SUMMARY} = "Handout Printed" and
{DOCDATA.DATA} like "*PATIENT INSTRUCTIONS*" and
not(isdate({@ClinicalDate})
sorry, you have to add a ) at the very end. I had edited the post already when I realized it.
{DOCUMENT.DOCTYPE} = 5.00 and
{DOCUMENT.SUMMARY} = "Handout Printed" and
{DOCDATA.DATA} like "*PATIENT INSTRUCTIONS*" and
not(isdate({@ClinicalDate}))
Need one more ) at end of final line.
Says "A string is required here" ????
{DOCUMENT.DOCTYPE} = 5.00 and
{DOCUMENT.SUMMARY} = "Handout Printed" and
{DOCDATA.DATA} like "*PATIENT INSTRUCTIONS*" and
not(isdate({@ClinicalDate}))
OK, so don't have it in selection logic.
Create a detail report where you print:
{DOCUMENT.DOCTYPE} {DOCUMENT.SUMMARY} {@ClinicalDate}
export it to Excel, if easier for you.
Then review through the data to find the line in error.
Note: DO NOT FORMAT THE @ClinicalDate field - you want to look at the individual items to see what data is bad.
baj, still getting error" The Number of Days is out of Range"
joeg1962, do you prefer to email? for the @ClinicalDate do you mean to use the DOCUMENT.Clinical Date field instead that's not formatted?
Feel free to email.
I am suggesting to create a separate report to simply look at the data. I, and I think others, suspect that there is something bad in the date field.
I now think that, even the conversion formula may give an error if there are invalid dates. Are you able to run the report with @Clinicaldate in the Details section?
Here is example of the data for DOCUMENT.ClinicalDate field
1,665,308,499,000,000.00
I have no idea what that means which is why I had to do the date conversion formula. How can I find out if there is invalid date data? I skimmed through the pages of the report and I don't see anything abnormal.
baj, I am able to run the report with the date conversion, but it freezes in the middle and shows the formula error so therefore it doesn't finish pulling all of the data.
I am out of ideas. But I checked what happens when we enter invalid date in EMR. Currently, it is auto-correcting to a valid date. I am not sure, if this was done for earlier dates.
You probably can try to run different date ranges and see if you can find out in which range you are getting the error.