# Data Migration from EMRs to OpenMRS

**URL:** <https://talk.openmrs.org/t/data-migration-from-emrs-to-openmrs/24685>\
**Category:** Development\
**Created:** [September 12, 2019, 8:23am UTC](https://talk.openmrs.org/t/data-migration-from-emrs-to-openmrs/24685 "2019-09-12T08:23:51Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![johnbosco](https://talk.openmrs.org/letter_avatar/johnbosco/32/5_5575768a8748004e209b776fc1b2916d.png) [@johnbosco](https://talk.openmrs.org/u/johnbosco)\
**Post date:** [September 12, 2019, 8:23am UTC](https://talk.openmrs.org/t/data-migration-from-emrs-to-openmrs/24685/1 "2019-09-12T08:23:51Z")

</div>

We have more that 7 EMRs that we wish to migrate data from them to our instance of OpenMRS, We need suggestions on the best way to go about this.

We have tried some steps but had a blockage. Below is what we have done so far

We intend to use an API for this data migration We created a json structure that is like a standard we want to use for data migration, We implemented rest API on our instance of OpenMRS to accept the json And We used OpenMRS API to create patients and other patient’s data in our instance

Our Blockage. We are not able to return a specific response from the API to the user migrating the data

Is there a better way to migrate data from different EMRs to OpenMRS. Any suggestion will be greatly appreciated

---

<div class="post-metadata">

**Author:** ![tendomart](https://talk.openmrs.org/user_avatar/talk.openmrs.org/tendomart/32/6753_2.png) [@tendomart](https://talk.openmrs.org/u/tendomart)\
**Post date:** [September 12, 2019, 12:16pm UTC](https://talk.openmrs.org/t/data-migration-from-emrs-to-openmrs/24685/2 "2019-09-12T12:16:28Z")

</div>

@johnboscoDo you find these resources helpful [https://wiki.openmrs.org/display/docs/Data+Import+Tool+Module](https://wiki.openmrs.org/display/docs/Data+Import+Tool+Module)

[https://wiki.openmrs.org/display/docs/Migrating+Data+to+OpenMRS](https://wiki.openmrs.org/display/docs/Migrating+Data+to+OpenMRS)

---

<div class="post-metadata">

**Author:** ![johnbosco](https://talk.openmrs.org/letter_avatar/johnbosco/32/5_5575768a8748004e209b776fc1b2916d.png) [@johnbosco](https://talk.openmrs.org/u/johnbosco)\
**Post date:** [September 12, 2019, 10:49pm UTC](https://talk.openmrs.org/t/data-migration-from-emrs-to-openmrs/24685/3 "2019-09-12T22:49:12Z")

</div>

I will go through the document and see if it will fit into our implementation. But like I said we have at least 7 EMRs to migrate data from. Also the DMT doc says openmrs version 1.11.3. I don’t yet know if this is supported in newer versions. But other suggestions are still welcome

---

<div class="post-metadata">

**Author:** ![tendomart](https://talk.openmrs.org/user_avatar/talk.openmrs.org/tendomart/32/6753_2.png) [@tendomart](https://talk.openmrs.org/u/tendomart)\
**Post date:** [September 13, 2019, 9:39am UTC](https://talk.openmrs.org/t/data-migration-from-emrs-to-openmrs/24685/4 "2019-09-13T09:39:11Z")

</div>

> [@johnbosco](#):
>
> I will go through the document and see if it will fit into our implementation.

like you said "Your Implementation " , it implements OpenMRS , the methodology should not divert so much from the Ideal.

---

<div class="post-metadata">

**Author:** ![jaghatise](https://talk.openmrs.org/user_avatar/talk.openmrs.org/jaghatise/32/15220_2.png) [@jaghatise](https://talk.openmrs.org/u/jaghatise)\
**Post date:** [September 13, 2019, 10:39am UTC](https://talk.openmrs.org/t/data-migration-from-emrs-to-openmrs/24685/5 "2019-09-13T10:39:04Z")

</div>

We have migrated data from other platforms to OpenMRS. We are open for consultation and based in Abuja. #[Reverton.Net](http://Reverton.Net)

---

<div class="post-metadata">

**Author:** ![c.antwi](https://talk.openmrs.org/user_avatar/talk.openmrs.org/c.antwi/32/7911_2.png) [@c.antwi](https://talk.openmrs.org/u/c.antwi)\
**Post date:** [September 13, 2019, 11:26am UTC](https://talk.openmrs.org/t/data-migration-from-emrs-to-openmrs/24685/6 "2019-09-13T11:26:03Z")

</div>

@johnbosco & @jaghatise Can we schedule a call asap to discuss ?

---

<div class="post-metadata">

**Author:** ![jennifer](https://talk.openmrs.org/user_avatar/talk.openmrs.org/jennifer/32/8531_2.png) [@jennifer](https://talk.openmrs.org/u/jennifer)\
**Post date:** [September 13, 2019, 11:36am UTC](https://talk.openmrs.org/t/data-migration-from-emrs-to-openmrs/24685/7 "2019-09-13T11:36:44Z")

</div>

There is a lot of experience in our community around migration. @aojwang and @wanyee come to mind. 🙂

Let’s keep the discussion open and going on Talk so that others can both contribute and gain.

---

<div class="post-metadata">

**Author:** ![johnbosco](https://talk.openmrs.org/letter_avatar/johnbosco/32/5_5575768a8748004e209b776fc1b2916d.png) [@johnbosco](https://talk.openmrs.org/u/johnbosco)\
**Post date:** [September 13, 2019, 11:38am UTC](https://talk.openmrs.org/t/data-migration-from-emrs-to-openmrs/24685/8 "2019-09-13T11:38:57Z")

</div>

Am open to discussions, about migration, I also want to be sure we have gone the right path. So let me know of a time

---

<div class="post-metadata">

**Author:** ![ggomez](https://talk.openmrs.org/user_avatar/talk.openmrs.org/ggomez/32/19309_2.png) [@ggomez](https://talk.openmrs.org/u/ggomez)\
**Post date:** [September 13, 2019, 12:27pm UTC](https://talk.openmrs.org/t/data-migration-from-emrs-to-openmrs/24685/9 "2019-09-13T12:27:20Z")

</div>

I literally agree with @jennifer this might be useful to other members of the community. I will appreciate if we can schedule a call for discussion soon. @c.antwi let me know time and date.

---

<div class="post-metadata">

**Author:** ![c.antwi](https://talk.openmrs.org/user_avatar/talk.openmrs.org/c.antwi/32/7911_2.png) [@c.antwi](https://talk.openmrs.org/u/c.antwi)\
**Post date:** [September 13, 2019, 7:37pm UTC](https://talk.openmrs.org/t/data-migration-from-emrs-to-openmrs/24685/10 "2019-09-13T19:37:54Z")

</div>

Would this help ? [https://flywaydb.org/documentation/](https://flywaydb.org/documentation/)

---

<div class="post-metadata">

**Author:** ![jaghatise](https://talk.openmrs.org/user_avatar/talk.openmrs.org/jaghatise/32/15220_2.png) [@jaghatise](https://talk.openmrs.org/u/jaghatise)\
**Post date:** [September 14, 2019, 1:05pm UTC](https://talk.openmrs.org/t/data-migration-from-emrs-to-openmrs/24685/11 "2019-09-14T13:05:02Z")

</div>

Thanks @c.antwi, I will also try out the tool but Moet of these tools won’t work with Openmrs data structure. Once the source database tables and elements are correctly mapped to openmrs(destination), simple sql scripts can move the data in minutes.

What is required is diligent mapping of source to destination databases.

---

<div class="post-metadata">

**Author:** ![tendomart](https://talk.openmrs.org/user_avatar/talk.openmrs.org/tendomart/32/6753_2.png) [@tendomart](https://talk.openmrs.org/u/tendomart)\
**Post date:** [September 16, 2019, 6:34am UTC](https://talk.openmrs.org/t/data-migration-from-emrs-to-openmrs/24685/12 "2019-09-16T06:34:50Z")

</div>

@ssmusoke@slubwama any experiences /practices to share from UgandaEMR ?

> [@c.antwi](#):
>
> Would this help ? [https://flywaydb.org/documentation/](https://flywaydb.org/documentation/)

@c.antwi thanks for sharing the link.

---

<div class="post-metadata">

**Author:** ![aojwang](https://talk.openmrs.org/letter_avatar/aojwang/32/5_5575768a8748004e209b776fc1b2916d.png) [@aojwang](https://talk.openmrs.org/u/aojwang)\
**Post date:** [September 16, 2019, 6:54am UTC](https://talk.openmrs.org/t/data-migration-from-emrs-to-openmrs/24685/13 "2019-09-16T06:54:18Z")

</div>

Thanks for keeping me in the loop. I would love to also join the call on migration since we have a current task to migrate data from a SQL server based system to OpenMRS. Our previous work on migration was somehow not documented for sharing.

---

<div class="post-metadata">

**Author:** ![dkayiwa](https://talk.openmrs.org/user_avatar/talk.openmrs.org/dkayiwa/32/179_2.png) [@dkayiwa](https://talk.openmrs.org/u/dkayiwa)\
**Post date:** [September 23, 2019, 12:33am UTC](https://talk.openmrs.org/t/data-migration-from-emrs-to-openmrs/24685/14 "2019-09-23T00:33:36Z")

</div>

@aojwang even without the documentation, is the code available for us to take a look?

---

<div class="post-metadata">

**Author:** ![c.antwi](https://talk.openmrs.org/user_avatar/talk.openmrs.org/c.antwi/32/7911_2.png) [@c.antwi](https://talk.openmrs.org/u/c.antwi)\
**Post date:** [September 25, 2019, 6:07pm UTC](https://talk.openmrs.org/t/data-migration-from-emrs-to-openmrs/24685/15 "2019-09-25T18:07:40Z")

</div>

Hey Everyone

It would be great to get an opportunity to share different approaches on how data migration from other EMR’s into OpenMRS have been done, what lessons have been learnt and which modules are currently available to help facilitate this.

Could we choose a design forum slot from the option provided below:

> **[Doodle: Design Forum : Data Migration Approaches](https://doodle.com/poll/kxsdzxn8msgiwz36)**
>
> Doodle is the simplest way to schedule meetings with clients, colleagues, or friends. Find the best time for one-to-ones and team meetings with our user-friendly calendar tool. Get started today!

cc: @johnbosco @aojwang @wanyee @ggomez @dkayiwa @valvijo@ssmusoke

---

<div class="post-metadata">

**Author:** ![dkayiwa](https://talk.openmrs.org/user_avatar/talk.openmrs.org/dkayiwa/32/179_2.png) [@dkayiwa](https://talk.openmrs.org/u/dkayiwa)\
**Post date:** [September 25, 2019, 10:11pm UTC](https://talk.openmrs.org/t/data-migration-from-emrs-to-openmrs/24685/16 "2019-09-25T22:11:40Z")

</div>

@johnbosco do you mind giving us an update on how far you have gone with the json approach? Have you had a chance to try it out with any implementing partner? Or did you go with the [spreadsheet import module](https://wiki.openmrs.org/display/docs/Spreadsheet+Import+Module) as mentioned in the [migrating data to openmrs](https://wiki.openmrs.org/display/docs/Migrating+Data+to+OpenMRS) link?

I find it easier for implementing partners to create spreadsheets or xls files rather than json files. The second advantage of this approach is that the code already exists in the [spreadsheet import module](https://github.com/openmrs/openmrs-module-spreadsheetimport).

---

<div class="post-metadata">

**Author:** ![johnbosco](https://talk.openmrs.org/letter_avatar/johnbosco/32/5_5575768a8748004e209b776fc1b2916d.png) [@johnbosco](https://talk.openmrs.org/u/johnbosco)\
**Post date:** [September 26, 2019, 7:37am UTC](https://talk.openmrs.org/t/data-migration-from-emrs-to-openmrs/24685/17 "2019-09-26T07:37:35Z")

</div>

@dkayiwa we are at the testing phase and am still making updates to the code, so far we have tested with one implementing partner and am working on the feedback we received. Also the issue I disccussed with you about returning response from the restAPI is still pending if I must use the restAPI

---

<div class="post-metadata">

**Author:** ![dkayiwa](https://talk.openmrs.org/user_avatar/talk.openmrs.org/dkayiwa/32/179_2.png) [@dkayiwa](https://talk.openmrs.org/u/dkayiwa)\
**Post date:** [September 26, 2019, 10:37am UTC](https://talk.openmrs.org/t/data-migration-from-emrs-to-openmrs/24685/18 "2019-09-26T10:37:10Z")

</div>

Since you are in the testing phase, does this mean you used an alternative to the REST API?

---

<div class="post-metadata">

**Author:** ![johnbosco](https://talk.openmrs.org/letter_avatar/johnbosco/32/5_5575768a8748004e209b776fc1b2916d.png) [@johnbosco](https://talk.openmrs.org/u/johnbosco)\
**Post date:** [September 26, 2019, 1:21pm UTC](https://talk.openmrs.org/t/data-migration-from-emrs-to-openmrs/24685/19 "2019-09-26T13:21:42Z")

</div>

Am considering using an alternative, but for now it is still the REST API

---

<div class="post-metadata">

**Author:** ![dkayiwa](https://talk.openmrs.org/user_avatar/talk.openmrs.org/dkayiwa/32/179_2.png) [@dkayiwa](https://talk.openmrs.org/u/dkayiwa)\
**Post date:** [September 26, 2019, 2:00pm UTC](https://talk.openmrs.org/t/data-migration-from-emrs-to-openmrs/24685/20 "2019-09-26T14:00:48Z")

</div>

How were you able to use the REST API and have something that is ready to test?

[Next page](https://talk.openmrs.org/t/data-migration-from-emrs-to-openmrs/24685.md?page=2)
