pfwilliams wrote on Tuesday, December 11, 2012:
I’m hoping someone could pass over my plan of action below and either give me a thumbs-up, or prewarn me of impending disaster. During our long-term transition period, we are still maintaining concurrently running EMR systems.
Dictations entry is still being input (via Dragon Medical) directly into our old system. Providers and/or assistants have then been doing the redundant work of cutting-and-pasting each dictation into OpenEMR. This extra work has put them on the warpath, and ignited in me a strong desire to eliminate these extra steps they’ve been saddled with. We are not yet ready to dictate directly (and only) into OpenEMR.
So, I’ve begun digging into OpenEMR tables to determine what is required to use and external program to insert dictations.
I’ve had to make a couple assumptions, but have come up with what seems to be an appropriate method.
The assumptions I’ve come to are as follows:
1. The table heirarchy, as relates to my “project”, is as follows:
….FORM_ENCOUNTER table - (queried on PID and DATE, returns ENCOUNTER number)
………FORMS table - (queried on ENCOUNTER number, returns FORM_NAME’s and FORM_ID’s)
…………FORM_<FORM_NAME> tables (tables for the remaining FORM_NAME types from the REGISTRY table, keyed on FORM_ID)
I was a bit confused at first thinking that the FORMS table was really the master of all the other FORM_xxx tables, but I see that it is driven off of ENCOUNTER number, and I see no where else that that field can originate other than in the FORM_ENCOUNTER table. I decided to logicaly think of FORM_ENCOUNTER as the top-dog, and consider the rows in the FORMS table that reference back to the FORM_ENCOUNTER table as useless information.
2. The FORM_NAME “New Patient Encounter” can be easily misconstrued. It has nothing to do with a “New Patient” as every encounter generates such a form. I’ve decided to ignore that the word “New” exists in the FORM_NAME (I might have voted for placing the form ID from the REGISTRY table into the FORMS records rather than repeatedly duplicating long text strings like 'New Patient Encounter" or “Review of System Checks”)
Having made those assumptions, my plan is as follows:
1. Use our unique external CHART_NUMBER field to query the PUBPID column (which we’ve populated) of the PATIENT_DATA table returning a PID.
2. Use that PID and the service date of the dictation to query the FORM_ENCOUNTER table, returning an ENCOUNTER number.
3. If the OpenEMR ENCOUNTER exists, write a properly-populated row to the FORM_DICTATION table and retrieve the auto-incremented ID column.
4. Insert a new record into the FORMS table referencing the ENCOUNTER, FORM_NAME, and newly generated FORM_ID.
Am I in the ball park? Or off on another planet?
Thank you very much.