Allscripts Prescriptions Import

mdsupport wrote on Saturday, March 23, 2013:

If anyone is using Allscripts ePrescribe, revised batch import functionality is available to import detailed information in OpenEMR.

This will allow manual error resolution and AMC updates.  Original Medication update caused many issues when physicians changed linked medications.  So that option has been disabled in this version.

This works best if Allscripts export worksheets are imported without opening them with Excel or other programs.  You will need to change PHP settings for uploading large files.

Original installation instructions are still applicable.

xiaoanri wrote on Sunday, April 14, 2013:

@MD Support: i am trying to make this working and created the related files, also created the new “prescription import” table. when clicking on the button from left nav menu: reports->clients–>Rx Import, it only shows a blank white page on the top field. not sure what i am missing? thank you

xiaoanri wrote on Sunday, April 14, 2013:

i also tried to use Internet Explorer, it shows an HTTP 500 error:

“This error (HTTP 500 Internal Server Error) means that the website you are visiting had a server problem which prevented the webpage from displaying.”

mdsupport wrote on Monday, April 15, 2013:

Usually this would mean one of the include/required_once file could not be found. The two directories that can cause issue are :

  1. script directory : the code works with import script in /var/www/openemr/custom directory. If not, “…/interface/globals.php” will need to be changed so that globals can be loaded.

  2. phpExcel package : the code references the phpExcel package that you have installed in /var/www/openemr/interface/phpExcel directory so “…/interface/phpExcel/Classes/PHPExcel.php” can be accessed.

Can you confirm the script is able to locate these files? Easiest way to do that will be to run the report as a user without access to patient medications. That will result in a ‘Access Denied’ message which will confirm that control reached past the initial include/require statements.

xiaoanri wrote on Thursday, May 16, 2013:

@MD Support,

Thanks a lot for the note, I found out the original PHPExcel package was installed into /usr/share/php/PHPExel folder, after I made the new folder …interface/phpExcel/Classes, and followed the instruction to copy all files here, everything started to work!

The following may save other’s time who would like to give a try: the website i downloaded the phpExcel package is: http://phpexcel.codeplex.com/, after un-zip, just follow their install instruction to copy all the files in “Classes” folder to above folder.

cmswest wrote on Sunday, March 09, 2014:

thanks for this feature md support!

i would just like to note a few changes on the allscripts side:

have to choose the detailed report from allscripts which saves as PrescriptionDetailOAS.xls

there’s an extra column called Rx Date which makes 17, which must be removed

column names have spaces that have to be removed

Orginator(sp) by allscripts

after they’ve imported they’re showing up in the wrong columns under the view in prescriptions, probably because 4.1.2 has altered the sql table

mdsupport wrote on Monday, March 10, 2014:

Allscripts often makes subtle changes which are detected by code and the execution is stopped. The program uses $xlCols array at the beginning of the script to map “Excel Column Header” => “Database Field Name”. Whenever you notice any malfunction, rather than touching the excel file every day, match the actual column headers and the order in your downloaded detailed report to $xlCols structure.

cmswest wrote on Monday, March 10, 2014:

sure, thanks md support, i pushed up my changes in case anyone is interested

there’s one change to note that deals with the prescription view:

cmswest wrote on Thursday, September 11, 2014:

here’s a cleaned up version of the changes i made to mdsupport’s work to include the allscripts modifications to their prescription export