After doing some trial and error with the {DOCDATA.DATA} like "*PATIENT INSTRUCTIONS*" I keep getting same date error when I use the following filters:
*PATIENT*
*INSTRUCTIONS*
*PATIENT INS*
But for {DOCDATA.DATA} = "PATIENT INSTRUCTIONS" filter (I find this interesting, the report runs with no error, but blank data which is correct cause there isn't DOCDATA.DATA that only contains "PATIENT INSTRUCTIONS". It seems like to me that the * multiple char is messing up the Patient Instructions filter where as the filter for *VIS* works fine.
baj, I tried running the report with just one day date range, still getting same error. The report runs fine with DOCUMENT.ClinicalDate, but getting error if use the Date Conversion.
baj said:
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.
Start with a brand new report. You simply want to print detail lines, and then as you review through the output data the 'error' should be evident.
The layout might be as simple as:
{PERSON.SEARCHNAME} {DOCUMENT.DOCTYPE} {DOCUMENT.SUMMARY} {DOCUMENT.CLINICALDATE} {DOCDATA.DATA} {@ClinicalDate}
You can experiment with different filters (selects) until you get an error.
By the way, I had to follow a similar route once before as 'some' entries in the OBS table did not have a valid OBSDATE. Once I found them and realized they were old, I added an extra filter for OBS.DBCREATE > date(2007,1,1)
And, if you want to take off-line, feel free to directly email me.
Thanks to Joseph, I ended up having to sort the DOCUMENT.CLINICALDATE which will either show the "bad" data at the beginning or end of the report. Once the bad data was fixed, the date conversion formula works & report is able to run through the whole process.