Published Mar 08

My Journey with OpenMRS: Setting Up OpenMRS SDK on Windows

 

Introduction

As a passionate open-source enthusiast, I recently embarked on my journey with OpenMRS, a powerful open-source platform revolutionizing healthcare data management. My goal was to set up the OpenMRS SDK on Windows, understand its workings, and contribute to this amazing community. This guide shares my experience, step-by-step setup instructions, challenges faced, and how I resolved them—hoping to help others who are just getting started!

 

 

Prerequisites : Before setting up OpenMRS SDK, ensure you have the following installed :

 

  1. Java Development Kit (JDK) 8 or higherDownload JDK

Verify installation by running : java -version

If JDK is not recognized, set JAVA_HOME environment variable. Guide

  1. Apache MavenDownload Maven

Add Maven to the Windows PATH. Guide

Verify installation by running: mvn -version

  1. Docker (For MySQL setup using containers) – Download Docker

Ensure Docker is running before proceeding.

Run the following command to check Docker status: docker --versio

Docker setup guide: Docker Docs

  1. Git (Recommended for version control) – Download Git

Installation guide: Git Docs

Follow These Steps

Step 1: Installing OpenMRS SDK : The OpenMRS SDK simplifies development, allowing developers to create and manage OpenMRS servers locally. Here’s how I installed it on Windows

  1. Open Command Prompt (cmd) as Administrator.

  2. Run the following command to install OpenMRS SDK:

    mvn org.openmrs.maven.plugins:openmrs-sdk-maven-plugin:setup-sdk
  3. Verify the installation:

    mvn openmrs-sdk:help
  4. If successful, you should see output similar to:

    OpenMRS SDK 3.13.6

😟Possible Issues & Fixes:

  • Error: 'mvn' is not recognized as an internal or external command

    • Ensure Maven is added to system PATH.

    • Restart the terminal after installation.

    • Maven Setup Guide

  • Java version compatibility issue

Step 2: Setting Up an OpenMRS Server Now that the SDK was installed, I proceeded to set up my first OpenMRS server.

  1. Run the setup command:

    mvn openmrs-sdk:setup
  2. When prompted, enter a server ID (any unique name for your server, e.g., my_openmrs_server).

  3. Choose server type:

    • Enter 1 for OpenMRS distribution (recommended for beginners).

  4. Select the latest stable distribution version. Check Latest Version

  5. Set up ports:

    • Default web app port: 8080

    • Remote debug port: 1044

  6. Choose MySQL installation method:

    • Enter 2 to install MySQL 5.6 in a Docker container.

    • Ensure Docker is running. Docker MySQL Setup

  7. Wait for the setup to complete. A success message will appear:

    Server configured successfully...

Possible Issues & Fixes:

  • Docker is not running or not installed

  • Port 8080 is already in use

    • Use a different port when prompted during setup.


✅Step 3: Running the OpenMRS Server : Once the server was configured, I started it with:

mvn openmrs-sdk:run -DserverId=my_openmrs_server

(Replace my_openmrs_server with the server ID you chose.)

After some time, I saw the message:

OpenMRS is ready for you at http://localhost:8080/openmrs/

Possible Issues & Fixes:

  • Server startup takes too long

    • Ensure your system has at least 4GB RAM available.

    • Restart Docker if using MySQL container.

  • Port conflict error

    • Change the port number in the setup command.


✅Step 4: Logging into OpenMRS

  1. Open a web browser and go to:

    http://localhost:8080/openmrs/
  2. Wait for the initialization process to complete.

  3. Use the default credentials to log in:

    • Username: Admin

    • Password: Admin123

🎉 Success! I had my OpenMRS instance up and running! 🎉

Possible Issues & Fixes:

  • Login fails even with correct credentials

    • Try restarting the OpenMRS server.

    • Clear browser cache and try again.


Next Steps in My OpenMRS Journey Setting up OpenMRS SDK was just the beginning! My next steps include:

  • Exploring OpenMRS module developmentLearn More

  • Contributing to OpenMRS by fixing beginner-friendly issues – GitHub Issues

  • Engaging with the OpenMRS community via Talk Forum & GitHubJoin Here


Final Thoughts This journey has been exciting and rewarding! OpenMRS SDK makes it easier to work with the platform, and I encourage anyone interested in open-source healthcare tech to give it a try. If you're starting out, don’t hesitate to ask questions in the OpenMRS Talk Forum—the community is incredibly helpful!

🚀 Ready to get started? Install OpenMRS SDK and begin your own journey today! 🚀


Feel free to connect with me on GitHub: deepakjain06 or discuss this journey in the OpenMRS forum!

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Related content