Skip to content

PIH/hivmigration

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

575 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hivmigration

This project represents the code necessary to export HIV data into a format suitable for import into another system, including a Java API that can be embedded in the target system to facilitate the import.

Prerequisites

These steps will setup HIV EMR1, Oracle, Pentaho, and this code:

  1. Install HIV EMR system (both application and Oracle db) running locally using Docker, following these instructions: https://bitbucket.org/partnersinhealth/hivemr/src/master/docker/

  2. Install OpenMRS SDK with a clean database (ie. openmrs_hiv) for Haiti HIV:

  3. Get the hivmigration project cloned and available to use locally: https://github.com/PIH/hivmigration

Migrating data

Instructions for executing commands from this java project

  1. Create file migration.properties from etl/src/main/resources/sample-migration.properties. Check that the values are correct for your databases.
  2. Set MIGRATION_PROPERTIES_FILE environment variable to point to that file, ie: MIGRATION_PROPERTIES_FILE=/home/mgoodrich/pih/hivmigration/migration.properties
  3. Two ways to run the migration:
    • IntelliJ: Run org.pih.hivmigration.etl.sql.Migrator.java with a config like this one Image of IntelliJ config Run with the program argument --help to see the available options.
    • Command-line. Something like:
      export MIGRATION_PROPERTIES_FILE=/home/mseaton/environments/hivmigration/migration.properties
      export MIGRATION_JAR_PATH=/home/mseaton/code/github/pih/hivmigration/etl/target/hivmigration-etl-1.0-SNAPSHOT-jar-with-dependencies.jar
      java -cp $MIGRATION_JAR_PATH org.pih.hivmigration.etl.sql.Migrator -r -d

Pentaho

Previously, we were writing the migration using Pentaho. We have switched to Java/SQL approach, but you'll need Pentaho to properly view the existing Pentaho code:

Get Pentaho Data Integration installed locally (mainly so that you can use Spoon - now called "PDI client" to author jobs). There should no difficulty with any version (Versions 6, 7, or 8 appear to work). Download from SourceForge: https://sourceforge.net/projects/pentaho/

The ansible deployment playbook may also be a useful reference.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors