How to start with a fresh / clean database for Bahmni?

Reiterating on this topic… We have improved the fresh installation of bahmni. Also we are now providing a script to delete all the patient or transactional data that is packaged with the default instance of bahmni.

Need Metadata from Demo Instance but not Patient Data During installation if the implementation_name is not overridden, it will be set to “default”. Which means default_config of bahmni and default demo database will be installed. this database will be a replica of demo database. So to delete the patient data and other related data like observations, orders etc… One can use the script mentioned in the documentation following the instructions pointed in the same page. This will keep the meta data and delete all the transactional data. Please refer the instructions mentioned in our documentation

To start fresh with clean database (without patients and metadata aswell),

  1. During installation, override the value of implementation_name with value other than default. Lets say xyz (in /etc/bahmni_installer/setup.yml)

  2. Put the xyz_config in /etc/bahmni_installer/deployment_artifacts/ (xyz_config is the config folder (name should match the implementation_name in step 1) with the structure similar to https://github.com/Bahmni/default-config )

  3. Run the installation command. (bahmni -i {inventory_file} install) Refer documentation for installation

This will install bahmni with fresh databases without any patient or meta data. You have to manually choose to import or add the data from scratch.

We are in the process of making this better and easier. We will update the documentation soon… :slight_smile: