The OpenMRS to DHIS2 Synchronization Tool (openmrs-dhis2-sync
) is designed to facilitate the seamless transfer and synchronization of patient data and health observations from OpenMRS to DHIS2. This tool ensures data consistency, integrity, and reliability across both health information systems.
- Synchronization of patient data from OpenMRS to DHIS2.
- Mapping of OpenMRS concepts to DHIS2 data elements.
- Location-based data processing for manageable and organized data handling.
- Robust error handling and logging for reliable operation.
- Progress tracking to resume operation in case of interruption.
- Python 3.x
- Git
- Access to OpenMRS and DHIS2 instances with necessary permissions.
- Clone the repository:
git clone https://github.com/rubailly/openmrs-dhis2-sync.git
- Navigate to the project directory:
cd openmrs-dhis2-sync
- Set up a virtual environment (optional but recommended):
python -m venv venv source venv/bin/activate # On Unix or MacOS venv\Scripts\activate # On Windows
- Install the dependencies:
pip install -r requirements.txt
Before running the tool, configure the following:
.env
: Set the environment variables for API keys, database URLs, etc.mappings/
: Update the JSON mapping files to align OpenMRS concepts with DHIS2 data elements.
To run the synchronization process:
python src/main.py
The repository is structured as follows:
src/
: Contains the source code with various subdirectories for different modules.tests/
: Includes test suites for the application.mappings/
: Stores JSON or YAML files for data mappings.logs/
: Contains log files for the synchronization process.requirements.txt
: Lists all the Python dependencies.README.md
: Provides documentation for the repository.
Contributions to improve openmrs-dhis2-sync
are welcome. Please follow these steps to contribute:
- Fork the repository.
- Create a new branch for your feature or fix.
- Commit your changes with clear, descriptive messages.
- Push the branch and create a pull request.
Specify the license under which this project is released.
Include any acknowledgements, credits, or references used in the development of this tool.
For more detailed information about each component and its functionality, refer to the documentation within each module's directory.