Sunday, November 9, 2014

How to install OpenMRS 2.x (Reference Application)

As everyone know, OpenMRS created OpenMRS 2.0 to provide much more friendly UX for users by navigating from the legeacy interface. So now it's time release the 2.2 version of the OpenMRS. During this blogpost, I will guide you on how to setup OpenMRS 2.2 in your local environment. There are two ways which you can setup OpenMRS 2.x in your  local machine. I will guide through the both the ways.

First I will add a description on the core modules of the OpenMRS 2.x.

There are several module that are included in  the openmrs reference application and the following might be the major modules of the reference application. 
  • uicommons - Contains the general CSS and Javascript files that are used in the reference application
  • referencemetadata - Adds required metadata, sets required global properties and any necessary configurations that are required for the application to be functional.
  • referencedemodata - Adds demodata that is uses in the dev and test environments.
  • referenceapplication - This is the one that glues everything together to form the reference application.
And the reference application distro is a utility module that contains the scripts that build and packages the archive that contains all the modules, it also contains the UI tests for the reference application.
Below modules also subjected to extensive development. 
App framework module
This module provide the functionality of set of lightweight guidelines that help us build different parts of the OpenMRS system in a decoupled way, avoiding a monolithic design that become unwieldy as it grows. The App Framework is agnostic to how you actually implement functionality, and very intentionally allows you to write "server-side apps" using the UI Framework, or "client-side apps" using HTML5 + JavaScript + REST.
UI framework module

The UI Framework module introduces a custom user interface framework built on top of Spring MVC that will be the basis of the OpenMRS 2.x web application.
Distro reference application.

This module will assemble required modules in one places. OpenMRS 2.x use set of code modules to built applications on top of it. If  you build the distro application you will see set of modules which needs to be there in the OpenMRS 2.x to function. Inside the package folder, required modules are listed as follow screenshot. But always you can download latest version of modules from the build in [4] and [5]
where [4] gives the openmrs war distribution and [5] gives the set of modules. 



Using tomcat distribution

One way of intalling OpenMRS reference application is in the pure tomcat servelet container.

Please follow installation guide in [6]. You can use  [4] war distribution to install OpenMRS. After or before completing installation setup, OpenMRS 2.x needs some more heap spaces to run. So you will needs to add CATALINA_OPTS and JAVA_OPTS in catalina.sh startup script.

export CATALINA_OPTS="-Xms4096M -Xmx5120M"

export JAVA_OPTS="-Dfile.encoding=UTF-8 -XX:PermSize=64m -XX:MaxPermSize=256m"
Note that you will needs to set appropriate memory depend on your memory availability. Then download the modules available in the [5] to start with reference application. Copy the all the modules in the downloaded archive to (.omod files) to applcation data directory. You can install them where the place which locate the openmrs-runtime.properties file location. There you will see a .OpenMRS/modules folder which you can drop the module files and restart the tomcat. Details on application data directory can be found in [7].

That's it you now log into openmrs(localhost:8080/openmrs or localhost:8080/{webappname})  to experience with OpenMRS 2.x.

Using OpenMRS standalone version

It's very easy to install the OpenMRS 2.x with standalone version where you can download latest release which is OpenMRS 2.1 in standalone in [8]. See instructions to run OpenMRS standalone version in [9]. If you already running standalone version 2.0, please see [10] for upgrade it to the OpenMRS 2.1.

Hope you will enjoy with the OpenMRS 2.x.

Also you can find live server in here.

[1] -https://wiki.openmrs.org/display/projects/Epic+-+Reference+Application
[2] - https://wiki.openmrs.org/display/docs/App+Framework+Developer+Documentation
[3] - https://wiki.openmrs.org/display/docs/UI+Framework+Step+By+Step+Tutorial
[4]-http://sourceforge.net/projects/openmrs/files/releases/OpenMRS_Platform_1.10.0/openmrs.war/download
[5]-https://ci.openmrs.org/browse/REFAPP-OMODDISTRO/latestSuccessful
[6]-https://wiki.openmrs.org/display/docs/Installing+OpenMRS
[7]-https://wiki.openmrs.org/display/docs/Application+Data+Directory
[8]-http://openmrs.org/download/
[9]-https://wiki.openmrs.org/display/docs/OpenMRS+Standalone
[10]-https://wiki.openmrs.org/display/docs/Upgrade+Standalone+OpenMRS+2.0+to+OpenMRS+2.1?flashId=1231697239

No comments:

Post a Comment