Migrating from previous emr to OpenEMR (MEDIOS emr)

Hi to all.
First a brief background, I am an MD, ENT Specialist, who happens to administer his own Linux Network and have some experience with MySQL and database management. I received a database dump from my previous vendor, Medios, a company based in Miami, Fl. which is no longer going to provide services as of September this year, so I decided to migrate to OpenEMR.

So far, I have been able to successfully migrate the Demographic data, and it is working well on OpenEMR. The company provided me with .xlsx files and a ccda zip file. One of the files contains all the .pdf files which are the ones which are of interest to me. The structure includes the “id” which could imported into the “pubpid” field, fname , lname , DOB, a text description of the .pdf file and the pdf files themselves.
Here is a sample. The demographic is in another .xlxs file.

id lname fname DOB description file
2222 Doe John 2021-01-01 office visit 0001.pdf

in this case “id” would be the “pubpid”, I think.

Is it possible to incorporate this data? and if so, ideas?

My data consists of some 34000 plus records, so manual entry
would of out the question.

I noticed the the Documents table has a field named “url” which points to the location for the pdf files so I would think the actual files go into that directory and the other data into the base table.
It also seems that when you upload a pdf file into the system, it gets encrypted and placed in that directory.

Many thanks in advance.

Joaquin.

hi @jfuenmayor, sure, rough outline:

  1. add the pubpid to the patient_data table, might have to redo your demo import
  2. extract the documents into the /tmp directory and make sure webserver can read from there
  3. create a script that reads the provided document file
  4. while reading each line in the csv grab the pubpid and filename, modified to point to /tmp
  5. grab the pid from the pubpid in the patient_data table to be used next
  6. use the document class or document service to add the file to the pt’s chart

Thanks for your response.
Step 1 was accomplished.
where I am not sure is how to go about extracting the .pdf files from the excel documents which holds the pid and the the .pdf files.

What I have done so far was to simplify the data by cutting and pasting only the pid and the .pdf records into a new excel sheet, preserving row integrity so it only holds two fields, the pid and the pdf files in its original form. The question is, if I export this newly created excel file to a .csv, a text file, will it preserve the integrity of the said .pdf files ? I always have multiple backups of the files, just in case something goes wrong.

hi @jfuenmayor, guessing the pdfs are zipped up separately and the spreadsheet references the name of the pdf that will be extracted.

Hi Stephen, yes indeed, that is the case. They are actually separated into directories numbered from 10 to 99. Each .pdf file name has a prefix which consists the the directory number followed by a "/"number of the directory and corresponds to each id number (pubpid).

Hi. I’m an ENT as well. I migrated several years ago and have been very happy with OpenEMR. As far as I can tell every migration has its own quirks and it’s been quite a few years since I migrated so I really can’t help you much there. I do have several custom forms of use to an ENT that you might find of use. If and when you need an audiogram form, procedure note, etc. let me know through the forum and I’ll try to send you them. I don’t necessarily frequent the forums on a daily basis, however, so be a little patient.

Thank you for your kind gesture Mouse55. We are busy people and sometimes it is hard to
have time to visit forums. I would love to see what you have done. My main concern is migrating my .pdf documents, since basically, all the information concerning the patients in the previous EHR is there. Migrating the other data into tables besides demographics, which I have done, is secondary, and I intend to do it in a test database and not the production one. So far, the database backup in version 6.0 works without a hitch so I am able to restore the full program and the mariadb tables without problems. I am still struggling a bit since my main programming experience is in C, ,SQL and JPL. I do not have enough background in PHP. I guess I will have to learn.

If you can send me a message with your email in it through the forum I’ll email the form folders as attachments. I’ve got H&P forms, drawing/sketchpad forms, audiogram forms and a few others that you might be able to use either out of the box or with minor modifications.

Sure, jfuenmayor@comcast.net

Thanks.

Good morning to all.

Stephen, I am almost ready to transfer those documents.
So far we have structured the source CSV files and determined the mapping of the categories to match from the source to OpenEMR and we are almost ready to start the transfer. I have setup a mirror testing system for that purpose. I have a friend who is giving me a hand on this (god bless him). We were able to locate ./src/Services/DocumentService.php and ./library/classes/Document.class.php. The question is, how do we go about executing the code after after making the necessary adjustments. Is this done through OpenEMR itself or simply just copy the file and execute it directly within the Browser?

Many thanks.

Well, I am happy to report that finally we were able to successfully
connect via API. We are not sure what the issue was, but I updated the system, which I do frequently and then we obtained a response from the server. We will test our script to upload the documents.to their respective categories and cross our fingers :}/

1 Like

Documents successfully migrated.

2 Likes