Wiki Spaces

Documentation
Projects
Resources

Get Help from Others

Q&A: Ask OpenMRS
Discussion: OpenMRS Talk
Real-Time: IRC Chat | Slack

Documentation

Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This tutorial will introduce you to OpenMRS SDK (Software Development Kit). It assumes that you have basic understanding of OpenMRS modular architecture (you can learn about it by reading Technical Overview).

...

  1. Create server
  2. Add developed project to watched projects on server
  3. Create debugging configuration in IDE
  4. Run server

We will walk through these steps and create environment to develop and debug REST module on top of OpenMRS 2.0.0 platform.

...

Which database would you like to use?:
1) H2
2) MySQL 5.6 7 (requires pre-installed MySQL 5.67)
3) MySQL 5.6 7 in SDK docker container (requires pre-installed Docker)
4) Existing docker container (requires pre-installed Docker)

...

Code Block
mvn openmrs-sdk:run -DserverId=webservices.-dev -Dfork=false

Steps to create debugging configuration depend on IDE you are using, but it should be quite easy to find.

...

This way you can set up development environment for any module and openmrs-core. Remember that you have to provide all required modules by currently developed module.

Developing with the Reference Application

You can easily develop/ debug modules with the Reference Application just like with the platform. The steps are as follows.

  1. Create a distribution server.
  2. Select Reference Application version.
  3. Set debug port.
  4. Connect with database.
  5. Add a module as watched in the selected server.

As before, create a server by running 

Code Block
languagebash
mvn openmrs-sdk:setup

This will start the SDK in the wizard mode. When prompted, give a name to the server you're creating.

Next, you will be prompted to select server type.

Code Block
languagebash
You can setup the following servers:
1) Distribution
2) Platform
Which one do you choose? [1/2]:

Make a Distribution server by entering 1. Next you'll be prompted to select the distribution version.

Code Block
languagebash
You can deploy the following versions of distribution:
1) Reference Application 2.6-SNAPSHOT
2) Reference Application 2.5
3) Reference Application 2.4
4) Reference Application 2.3.1
5) Reference Application 2.2
6) Other...
Which one do you choose? [1/2/3/4/5/6]:

Select the latest Reference Application version by entering 1. The rest of the steps are the same as explained under Setting up dev environment. The watched modules will be built from source and deployed to the selected server every time you run that server.

Creating new distribution

...

 


Page properties
hiddentrue


 
Related issues