I am looking for a query that pulls chart information in readable format. We currently use CEMR 9.8.11
Does docdata.data contain this information?
Yes, the docdata file contains the text of the encounter/document. And there can be more than one for an encounter.
I have done this before, with Crystal Reports, to read through say all office visits for a date, and then use an instr() type of function to see if I match on searched for text. Care must be given to the matching logic since certain words may appear for entirely different reasons.
Are you trying to search for a match, or just want to print out the entire note text?
I'm just trying to print out the document in the readable format.
The above is a Crystal Report that starts the process (it filters to look at yesterday and office visits for patients with last names beginning with A).
When I tested it, I realized (again) that the docdata table includes formatting instructions. To make nicer in printing, you would need to filter these commands out.
If you use Oracle SQL Developer, you can run a query that returns a single document. A very simplified version would look like this:
SELECT DOCDATA.DATA FROM DOCDATA WHERE SDID = 1234567890123456
Make sure you do not put a sort (order by) on the query and then highlight the data column (selecting all values) and copy the values to a notepad window. Save the notepad as FileName.rtf and you should be able to open it in Word/Wordpad.
Most (not all) data in the docdata table is in RTF format and a single document can (and will) get split into multiple rows in the docdata table based on the number of characters in the document. Also of note is the fact that the docdata table will not contain anything if it is OnHold/InProcess.
What is your end goal?