# TIL: PIH has an open tool for migrating patients between OpenMRS instances

**URL:** <https://talk.openmrs.org/t/til-pih-has-an-open-tool-for-migrating-patients-between-openmrs-instances/50663>\
**Category:** Implementing\
**Tags:** migration\
**Created:** [December 3, 2026, 6:05pm UTC](https://talk.openmrs.org/t/til-pih-has-an-open-tool-for-migrating-patients-between-openmrs-instances/50663 "2026-12-03T18:05:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jayasanka](https://talk.openmrs.org/user_avatar/talk.openmrs.org/jayasanka/32/22204_2.png) [@jayasanka](https://talk.openmrs.org/u/jayasanka)\
**Post date:** [December 3, 2026, 6:05pm UTC](https://talk.openmrs.org/t/til-pih-has-an-open-tool-for-migrating-patients-between-openmrs-instances/50663/1 "2026-12-03T18:05:12Z")

</div>

Today I learned on today’s O3 design call: PIH has a public tool for moving patient records from one OpenMRS server to another.

> **[GitHub - PIH/openmrs-tools-importer-exporter](https://github.com/PIH/openmrs-tools-importer-exporter)**
>
> Contribute to PIH/openmrs-tools-importer-exporter development by creating an account on GitHub.

It exports each patient’s full record as JSON through the REST API, then imports it into the target server. PIH used it to merge two instances in Malawi and is using it now to bring their Haiti servers into one.

Any implementer could run into a migration like this at some point, so I’m sharing it here in case it’s useful or gives you ideas for your own.

@cioan @fanderson, thanks for sharing this! Anything more you’d add?

---

<div class="post-metadata">

**Author:** ![ddesimone](https://talk.openmrs.org/user_avatar/talk.openmrs.org/ddesimone/32/2570_2.png) [@ddesimone](https://talk.openmrs.org/u/ddesimone)\
**Post date:** [December 4, 2026, 2:30pm UTC](https://talk.openmrs.org/t/til-pih-has-an-open-tool-for-migrating-patients-between-openmrs-instances/50663/2 "2026-12-04T14:30:01Z")

</div>

or @mogoodrich ^^

---

<div class="post-metadata">

**Author:** ![mogoodrich](https://talk.openmrs.org/user_avatar/talk.openmrs.org/mogoodrich/32/3324_2.png) [@mogoodrich](https://talk.openmrs.org/u/mogoodrich)\
**Post date:** [December 4, 2026, 6:38pm UTC](https://talk.openmrs.org/t/til-pih-has-an-open-tool-for-migrating-patients-between-openmrs-instances/50663/3 "2026-12-04T18:38:16Z")

</div>

Yes, feel free to take look. I’ll note that in the process of building it I have been focused on PIH use cases and not thought about general ones, but most of the code should be fairly generic.

Recently I had Claude develop a bunch of scripts (also included in the repo) to run through the entire process. The new scripts have only been tested once, but hopefully they will tested again and used for real next week.
