Bahmni-Mart Configuration (docker)

 

Bahmni-mart is a Standalone Batch Application based on spring-batch. Bahmni-mart aims to simplify reporting for Bahmni by pulling data from OpenMRS and moving it into Mart DB (postgres). To Read more click here. You can use the packaged opensource metabase to connect to MartDB and create reports/visualisation.

Short Demo video on Youtube of Bahmni Metabase/Mart: https://www.youtube.com/watch?v=IHZR-W7EdNg

Environment Configurations:

Variable Name

Description

BAHMNI_MART_IMAGE_TAG

Image version to be used for Bahmni-mart. A list of tags can be found at bahmni/bahmni-mart image - Tags.

BAHMNI_MART_DB_IMAGE_TAG

Image version to be used for Postgres image. A list of tags can be found at postgres - Tags.

CRON_TIME

Scheduler frequency to run Bahmni-mart application

MART_DB_HOST

Host name of the Bahmni-mart Database server.

MART_DB_NAME

Database name for Bahmni-mart application

MART_DB_USERNAME

Username of the Bahmni-mart database.

MART_DB_PASSWORD

Password of the Bahmni-mart database.

OPENMRS_DB_HOST

Host name of the OpenMRS Database server.

OPENMRS_DB_NAME

Database name for OpenMRS application

OPENMRS_DB_USERNAME

Username of the OpenMRS Database

OPENMRS_DB_PASSWORD

Password of the OpenMRS Database.

Running Bahmni-Mart using Docker

Run the profile bahmni-mart using the command :-

docker compose --profile bahmni-mart up -d

To check the logs, follow the steps :-

# Get the container ID of the container docker ps # View logs of container docker logs -f <CONTAINER ID>

To stop running docker services

docker compose --profile bahmni-mart down

It can take about 15 mins for mart to fully initialise and create tables.

 

Caution

As openmrsdb version is different in both bahmni-standard and bahmni-lite docker configuration. Specific dependent services must be concurrently brought up with bahmni-mart, as these services have liquibase changes which update openmrsdb with different data sets essential for the seamless execution of bahmni-mart jobs.

  • With bahmni-standard docker: To run all jobs in bahmni-mart successfully, openmrs service should be up.

  • With bahmni-lite docker: openmrs and reports service is required. reports service creates concept_reference_term_map_view in openmrs db. This view is pivotal for numerous queries in bahmni-mart.

The Bahmni documentation is licensed under Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)