OpenMRS SDK 1.x

OpenMRS SDK 1.x

Important!

This version is outdated. Please use latest SDK version: OpenMRS SDK

Overview

OpenMRS SDK allows for rapid development of modules and the OpenMRS core code. It is an ever expanding project with a rich feature-set, outlined below. Operating System compatibility was also taken into account, allowing users to install the SDK and be up and running within a few minutes on Windows, Linux and Mac OS X.

The SDK was proposed as a GSoC 2013 Project, which was then developed by @Chris Niesel and @Rafal Korytkowski (Mentor) throughout the length of GSoC 2013.

Download 

Screencast

To be added.

Feedback 

Please help us improve SDK. We kindly ask you to report any problems in JIRA or in notes. Please include the output of omrs-version in your problem description. In order to test SDK on your computer please go through the Step By Step instructions that you find below.

Step By Step

Describe the basics here. Download and install instructions, module creation and running openmrs with an embedded h2 (for OpenMRS 1.9.4+) and an external mysql db. 

Step 1. Development Environment Check

Before we get started with the installation of the OpenMRS SDK you have to make sure that if you are planning on working in conjunction with GitHub, that you have
Git installed. For a howto on how to do that see here.

Once Git is installed, you have to make sure that you have the Java Development Kit(JDK) installed. To see if you do, open up a console/terminal and enter

javac -version

You should see output like this:

SDK requires Java 1.7+. You must have the JAVA_HOME environment variable set. See here.

If you do not have similar output, you are missing the JDK, please go ahead and install it.
Here are tutorials for Windows, Mac OSX, Ubuntu.
Once completed this, lets move onto installing the sdk.

Step 2. Installing OpenMRS SDK

Now go ahead and download your operating system's compatible version of the OpenMRS SDK installer.

You will require Administrative privileges to install the SDK, thus make sure that you have those privileges associated with your user account.


The installation is fairly straightforward.

On Windows and Mac OS X you just need to double click on the downloaded installer. On Linux you need to do:

chmod +x omrsdk-... sudo ./omrssdk-...

Once it is finished, you can make sure the SDK works. To do so, open up a terminal/console and issue the following:

omrs-version

The output it gives, should be similar of that below:

If that is the case, you have successfully installed the SDK.

How to create a Basic Module

The SDK allow you, the user to create a basic module, with little effort! All that you have to do is, make sure you have a console/terminal window open and make sure you are
in a directory that you have write access to.  If that is the case, you just issue the following:

omrs-create-module

This will now prompt you for various inputs, the default value/name is already assigned, which you can change if you input your own.
Once the creation process is finished, you can now start working on your module. Be sure that you initialize a git project and push it to 
your Github account for easy development access.  

Running OpenMRS with an embedded Database

Notice: This only works with OpenMRS version 1.9.4+


Within the module that you just created, you can choose to run OpenMRS with an Embedded Database to test the module you are working on.
To do so, be sure you are in the module directory. Once there you can either issue in the console:

omrs-run

or

omrs-create-project

next issue