2009 Implementers Group Meeting Program Importing External Observations
Importing External Observations to OpenMRS
In the room
Carl
Win
Ben
Paolo
Pinkie
Burke
Russell
Nicholas
Wayne
Claudio
James
Roger
Ignatio
Chris
Saira
Ideas
Migration: legacy systems to OpenMRS
Other systems (lab system) that output a certain type of data to OpenMRS
Carl thinks that the second one is more of a interoperability
This is not synch topics
There is an hl7 example on the wiki on how to import obs
There is an hl7 processor in OpenMRS to do export / import data from and to OpenMRS
XAware system to create a set of xml format that might be able to be used as a data import tool
Another alternative is the mapforce from xml spy
How would you map legacy data:
Build concept dictionary based on the legacy system
Get the concept and the structure in the legacy system
The import is not general enough. The import will be specific to the legacy system
Carl proposed to create a module to do the import
Burke (as always) proposed Groovy module to solve the import, he loves Groovy. See his archive:groovy example below.
Burke showed some examples on how to import data using Groovy. The Groovy module is out there in the modules repos http://modules.openmrs.org
import the legacy system database to flat file and use Groovy to load it to the OpenMRS database
Mirth server is another option to go. Check the interoperability notes on the wiki and there will be a topic slot on Mirth
eKapa system:
Take the front end the system and put OpenMRS as the backend of the eKapa
Another topic is how to sync several remote site
Another issue is eKapa datamodel is slightly different with OpenMRS datamodel
Mirth as an option to perform the backend migration and perform the datamodel translation using Mirth
Using XStream serialize your data from legacy database to xml format
Groovy Example
import org.openmrs.*
def createPatient(identifier, givenName, middleName, familyName, gender, birthdate) {
p = new Patient()
type = new PatientIdentifierType(1)
location = new Location(1)
pid = new PatientIdentifier(identifier, type, location)
p.addIdentifier(pid)
name = new PersonName()
name.familyName = familyName
name.givenName = givenName
name.middleName = middleName
p.addName(name)
p.gender = gender
p.birthdate = Date.parse('yyyy-MMM-dd', birthdate)
patient.savePatient(p)
}
def data = """4-2,Susan,D.,Schnoggenlocher,F,1994-Jul-04
5-0,James,Knox,Polk,M,1795-Nov-02"""
def patients = data.split("\n").collect{ it.split(",") }
patients.each { p ->
}