Downloads Documentation Community Contribute Demo



The forums are read only! All new discussions will happen at http://answers.openmrs.org. These forums will remain available as a read only resource.

Data Migration into OpenMRS

General discussion about OpenMRS that may not apply to any of the specific forums

Data Migration into OpenMRS

Postby arbaughj on Nov Thu 30, 2006 6:07 pm

I saw in one of the conference presentations that one of the tasks of implementing OpenMRS is to migrate data from old systems. We currently have a list of patients in a Microsoft Access database.

What tools are available to migrate data into OpenMRS?

Thanks,
James
arbaughj
OpenMRS Forum Member
 
Posts: 59
Joined: Nov Wed 08, 2006 5:30 pm
Location: Deschapelles, Haiti

Postby darius on Dec Tue 05, 2006 3:20 pm

I've written some Java classes that can help you do this.

What we did is make a jdbc connection to our old database, and transformed that data into OpenMRS-style Patient, Encounter, and Obs objects. (The data transformation is specific to your existing data model, but you'd want to use my Patient, Encounter, and Obs classes.)
Then we converted those into HL7 messages that OpenMRS can interpret. (You can use my code for this.)

There are several wrinkles to this, because OpenMRS currently only handles HL7 messages for an encounters and obs. So we had to export the following via an annoying manual process:
* patients, names, and identifiers (my tool exports these as a text file of sql statements)
* orders
* relationships
I dumped our order and relationship data to a text file, and built a tool in openmrs where you can upload that text file.

All in all it's quite a complicated process, which I'm happy to help guide you through. But I'm in Haiti at the moment, and pretty busy. Let me know.
darius
OpenMRS Forum Member
 
Posts: 51
Joined: Dec Tue 21, 2004 12:16 am

Flat file import

Postby simon on May Thu 17, 2007 3:08 am

We have a 'tool' (some code) that imports a flat file structure into openmrs. If you wanted to use it I'd be happy to make it available, it would take a bit of customization tho.

Taking this further, is anybody interested in working on a flat file data import module? Something like the reverse interface of the data export tool already in openmrs.

Users upload a file (or just the headers) and then define how the columns get mapped to concepts, db columns, etc. It would be no simple task but definitely do-able, especialy for simpler data sets like a list of CD4 counts with dates and patient id's (which is what our implementation gets on a regular basis from their lab).
simon
OpenMRS Forum Member
 
Posts: 14
Joined: May Wed 02, 2007 4:39 am

Postby darius on May Thu 17, 2007 4:58 am

Someone could even write a module that takes a csv, prompts the user about concept mapping (or reads that from a previously generated config file), and then converts each row in the csv into an HL7 R01 message...

Actually, if implemented as a standalone java class, this could make it easier for other applications to export their data to OpenMRS.

(I recently created a page that an external app can post hl7 messages to via http, if anyone wants to take this further.)
darius
OpenMRS Forum Member
 
Posts: 51
Joined: Dec Tue 21, 2004 12:16 am

Re: Data Migration into OpenMRS

Postby GaryAtMirthProj on Jan Thu 03, 2008 9:47 pm

If the effort I'm working on currently works out, then Mirth would become a sort of ETL tool for OpenMRS, so to speak. You'd write a Mirth 'channel' that reads your input data (via hl7, csv, SOAP, whatever), map it to the appropriate OpenMRS data object and then execute the appropriate OpenMRS API call (whihc in turn makes the appropriate REST call). This way, the Mirth channel contains the appropriate filtering, mapping and transformation code that's user specific and these channels could be shared amoung the community. Well, that's the plan anyways, and I'm only at the beginnings of the effort... :wink:
GaryAtMirthProj
OpenMRS Forum Member
 
Posts: 38
Joined: Jan Thu 03, 2008 1:57 pm
Location: Irvine, CA USA

Re: Data Migration into OpenMRS

Postby schimel on Oct Mon 20, 2008 5:09 am

Hi there ,
i got a problem to do my migration data.
my old data are contain in a mysql database(HCC) in on table(HAS_PED_outpatients)
that contains:
1)datedevisit that represents visit date
2)nrducahier that represents visit number
3)nom that represent patient's name
4)prenom that represent patient's middle name
5)sex that represents gender
6)drepanocytose that represents a drepanocytose concept that i've added in openmrs
7)quartier that represents adress
8)datedenaissance that represents brithdate of the patient
9)Typedeconsultation that represents encounter type

i have tried to add data on openmrs via a sql query for just a test ,data are added but when i tried to look for a patient on UI,
there is no result.
is there a module that i can use to perform this task.
Best Regards.
schimel
schimel
OpenMRS Forum Member
 
Posts: 13
Joined: Sep Tue 02, 2008 10:58 am

Re: Data Migration into OpenMRS

Postby ben on Oct Mon 20, 2008 7:19 am

I believe Justin is working on a module for that right now. Give him a few days and he should have something to post.
ben
OpenMRS Team Member
 
Posts: 768
Joined: Aug Mon 28, 2006 8:54 am
Location: Indianapolis

Re: Data Migration into OpenMRS

Postby jmiranda on Oct Sun 26, 2008 10:13 pm

The data import module that I just built can't quite handle the type of data you'd like to import. The current tool handles an encounter-per-row, column-per-observation Excel file. It will create a new encounter for each row and an observation for each column -- there are a few "encounter info" columns as well. The column headers contain a concept ID, so we can link observations to specific concepts.

We'll be making some changes to the import tool over the next week weeks -- and I will keep your requirements in mind. Please feel free to send emails to me (justin@openmrs.org) if you have questions, comments, or would like to get progress updates.

Justin
jmiranda
OpenMRS Forum Member
 
Posts: 21
Joined: Jan Tue 02, 2007 4:07 pm
Location: Cambridge, MA

Re: Data Migration into OpenMRS

Postby schimel on Oct Tue 28, 2008 4:09 pm

Acually , we are trying to do something much simpler, as for the moment we’re not importing encounters, just patient information. I’ve imported the data into the tables patient, patient_identifier and person_name and person.
I did this with INSERT INTO statements, keeping the demo data in the tables. The MySQL tables look fine, but when I try to search for a patient in the application , the new patients are not found, only the demo patients.
Is there any other table we need to populate in order to be able to search for them ?
Thanks,
Zoman
Bertrand
schimel
OpenMRS Forum Member
 
Posts: 13
Joined: Sep Tue 02, 2008 10:58 am

Re: Data Migration into OpenMRS

Postby ben on Oct Wed 29, 2008 12:06 pm

Make sure the person, patient, and patient_identifier tables don't have voided set to '1".
ben
OpenMRS Team Member
 
Posts: 768
Joined: Aug Mon 28, 2006 8:54 am
Location: Indianapolis

Re: Data Migration into OpenMRS

Postby schimel on Oct Thu 30, 2008 3:30 am

the person, patient, and patient_identifier tables don't have voided set to '1",
it was a bunch of metadata fields set to '0000-00-00' that has caused the trouble.
so i have updated fields (date_created,date_changed) for every table with valid dates.
Great thanks.
schimel
schimel
OpenMRS Forum Member
 
Posts: 13
Joined: Sep Tue 02, 2008 10:58 am

Re: Data Migration into OpenMRS

Postby petcy on Sep Wed 15, 2010 1:02 am

hi simon ,,

i want to import a flat file structure into openmrs.Pls send me the tool if u have
petcy
OpenMRS Forum Member
 
Posts: 17
Joined: Sep Fri 03, 2010 7:28 am

Re: Data Migration into OpenMRS

Postby ben on Sep Wed 15, 2010 5:00 am

There is a Spreadsheetimport module that is almost done that you could try out:
http://tickets.openmrs.org/browse/TRUNK-1650
ben
OpenMRS Team Member
 
Posts: 768
Joined: Aug Mon 28, 2006 8:54 am
Location: Indianapolis

Re: Data Migration into OpenMRS

Postby petcy on Sep Wed 15, 2010 6:24 am

is it possible to get a xml file from Mirth???
petcy
OpenMRS Forum Member
 
Posts: 17
Joined: Sep Fri 03, 2010 7:28 am

Re: Data Migration into OpenMRS

Postby ben on Sep Wed 15, 2010 6:35 am

I am not that familiar with mirth. And that question should be in its own topic and not in this forum topic because it does not match.
ben
OpenMRS Team Member
 
Posts: 768
Joined: Aug Mon 28, 2006 8:54 am
Location: Indianapolis


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest

cron