Archive for the ‘openmrs’ Category

OpenMRS Implementor Series 101 – Building a distribution package

I am not sure where this will end, however it is my way of giving back to the OpenMRS community that has provided an excellent learning platform and great support to me over the last 6 months, I have been using the software tools.

My intention is to share what I know, as a way of organising my thoughts and sharing ideas as I figure out where to add this to the OpenMRS community documentation, where it surely belongs. The flow of each of these posts will usually be to answer a very specific question that I have asked in the past, and where I think I have figured out an approach that seems to work.

UPDATE December 31, 2015: The new home for this blog post is  on the OpenMRS Wiki at https://wiki.openmrs.org/pages/viewpage.action?pageId=93358939 all further updates will be placed there

Problem Statement: How can I get an OpenMRS distribution that has all the modules that I need?

New to OpenMRS – What is Possible?

If you are new to OpenMRS and would like to see what is possible, then download the OpenMRS X.X Standalone Edition from http://openmrs.org/download/ which contains a pre-configured reference application with sample data that is ready to run in a single command.  This is note meant for production use as the embedded components are not robust enough for the growth in data collected.

Enterprise Installation like Reference Application

If the reference application provides all the modules that you need, the next step is to set-up n enterprise ready installation using a dedicated application server & database in which the Platform x.xx WAR (for Enterprise) can be installed. The modules for the reference application above can be downloaded as a zip file from the standalone edition above.

Full Control of Enterprise Installation

The last option is the most complex, and is for those implementors who want to install the enterprise edition but have control over what modules are installed or even what versions. In this case the OpenMRS distro platform is your best choice (https://github.com/openmrs/openmrs-distro-platform) which allows the building of a custom WAR file that includes the modules that you need.

The modules are defined in the pom.xml file and are accessed from the OpenMRS Maven Nexus repository (http://mavenrepo.openmrs.org/nexus/index.html#view-repositories;modules~browsestorage).

An addition to this project is for modules (pending review) but currently available at https://github.com/ssmusoke/openmrs-distro-platform is the ability to include custom modules (*.omod files) by dropping them in a folder called modules.

Please do share your comments on this style and let me know where it would fit best in the OpenMRS community documentation

 

Advertisements

OpenMRS Module Development Learnings – 102

My team mates and I are completing a number of OpenMRS workshops focused on improving our module development capability. This blog post captures the unwritten lessons that we have picked up as a way of giving back our lessons to help others in the community (and will be moved to the OpenMRS Wiki once the lessons have been internalized and consolidated, as that is its natural home).
The approach is based on the following OpenMRS community articles:
  1. Creating Modules – https://wiki.openmrs.org/display/docs/Creating+Modules
  2. Creating your First Module – https://wiki.openmrs.org/display/docs/Creating+Your+First+Module
As you develop the module it is important to keep testing and verifying whatever you do especially when the module involves user interface components, extending the OpenMRS UI. The process we ended up using was as follows:
  1. Setup a module using the module creation command line utility
  2. Downloaded Spring Loaded from its maven repository http://mvnrepository.com/artifact/org.springframework/springloaded
  3. Downloaded and setup OpenMRS standalone from http://openmrs.org/download/ picking a version greater than 1.11.x which supports debugging options
  4. Once the standalone version is installed, open the openmrs-standalone-runtime.properties and add the following variables to the vm_arguments: (should all be one line – separated here for clarity)
    • -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000
    • -Dmodule.development.directory={absolute path to root folder of the module}
    • -javaagent:{absolute path to spring loaded jar}
    • -noverify -Dspringloaded=inclusions=org.openmrs.module.modulepackage..* (note the two trailing dots before the *)
  5. Setup newly the module into an IDE (tested with IntelliJ & Eclipse)
  6. Installed a FileSync utility, RemoteSynchronizer for IntelliJ & FileSync (http://andrei.gmxhome.de/filesync/) for Eclipse
  7. Setup sync for the omod webapp folder into the standalone webapp folder located at WEB-INF/view/module/{modulename}
Our development workflow is smoothened out since any changes to Java classes & JSPs are automatically applied & reflected in the standalone app.
Additional Tips and Tricks
  1. Tomcat – Change the following init params in web.xml:
    • modificationTestInterval from 4 to 0, so that JSPs are automatically recompiled
    • development is true (this is the default)
  2. Intellij – the Java classes are not automatically recompiled on saving changes so there is need to run mvn package -DskipTests
  3. Follow the OpenMRS conventions as much as possible by cloning openmrs-core to see how the design of the interfaces, service layers is done. This will help get access to lots of the magic that happens behind the scenes.
  4. Java 8 will give you trouble, stick to 1. 7 as we did not try 1.6 anywhere.

Future of Software Development Industry In Uganda – 2015 Edition

These are my thoughts on the future of the software development industry in Uganda, after the official announcement of ThoughtWorks closure of the Kampala office (http://info.thoughtworks.com/Kampala-office.html).

I would like to approach this first of all by analyzing the contribution of ThoughtWorks to the Ugandan technology space, then what I see the future as.

ThoughtWorks contribution in two aspects – showing that its possible to run a pure-play software development business operation out of Kampala using Ugandan based talent, and the second providing an injection of new DNA into the local technology community. The exposure to international level processes, practices and projects have helped grow the experience of the local software development talent.

Local communities have been started & supported, included but not limited to Agile Uganda, Geek Night, Girl Geek Dinners (yay! Women in Tech), Rails Girls and Ruby Fridays. The OpenMRS community run a number of events to help grow its reach, while the Technology Radar discussions provided a continuous look into the present and future of computing. The contributions leave the local technology space different from three years ago.

What does the future look like? A tough question, and my answer is biased by over 15 years experience writing software in Uganda, my overbearing optimism, and my newly rekindled foray back into software development.

The future is bright, but can only be harnessed if the business and technology communities work hand in hand to grow the local technology capability. In this, a concerted effort to build a local technology practice with buyers pushing for a local component on all contracts leveraging open source. A good example is the Ministry of Health selection of OpenMRS (http://openmrs.org) as the EMR of choice for electronic medical records throughout the country with aggregate reporting done in DHIS2. There are lots of opportunities in leveraging technology in the agriculture and education sectors which remain new frontiers to be conquered.

I would further call upon the government entities and parastatals KCCA, URA, UMEME, NWSC to leverage OpenData approaches to provide the infrastructure for young innovators to build and monetize customer centric products and services.

Like Ghandi said, be the change you want to be in the world in this case “Coding in Uganda, for Ugandans, by Ugandans”.

Gakyali Mabaga (it is just the beginning)

%d bloggers like this: