Server for your App in 15 mins

You have an OpenSRP client App ready with forms and beautiful UI and worried about testing the scheduled tasks and end to end flow! Now no need to write a single line of code.. Adding simple schedules is easy, simple and just one row in xls file!  Get OpenSRP server ready for your client App in just few steps below:

Warning:

  • Don`t try installation on test or production server running any other instance of OpenMRS or OpenSRP
  • If you are working on older versions of OpenSRP, don`t try compiling or running newer versions unless you can afford clean installation from scratch
  • If your scheduling logic or form handling is complex and require custom code anyway feel free and confident to extend OpenSRP by just implementing handler and router classes as defined <<<here>>>>

Prerequisites:

Steps:

  • Get openmrs.sql and quartz.sql scripts here and run these scripts on MySQL using a root/privileged user. The scripts are for OpenMRS 1.9.7 and comes with MVP dictionary (v1.9.9).
  • Download OpenSRP web components from here and extract zip file into tomcat/webapps directory. OpenMRS version inside zip is 1.9.7 and OpenSRP version is 2.0.0. Now your tomcat webapps folder would have two folders 'openmrs' and 'opensrp'
  • Navigate to tomcat/webapps/opensrp/WEB-INF/classes and make following configuration changes
    • Change MySQL and CouchDB database credentials in opensrp.properties file
    • Change MySQL credentials in quartz.properties
    • Change ActiveMQ configuration in activemq.properties if applicable
    • Copy all your json schedules in schedules directory (subject to automation). For details on how to create schedules refer to documentation here. For OpenSRP scheduling details read  'Trackable schedule or Health schedule' section of tutorial here.
    • Once done with all your json schedule files, open schedules/schedule-config.xls and configure schedules, forms and alert as explained in documentation <<<<here>>>> (subject to enhancements)
    • Copy all form files and entity-relationship.json from client app`s form directory inside forms folder. Each of your form folder should have form.xml, model.xml, form.json and form_definition.json. Documentation on form files is here.
  • Start tomcat
  • Navigate to http://yourserver:port/openmrs and if you are navigated to initial setup, install OpenMRS by following installation instructions in webapp. Use advanced installation and provide database credentials where openmrs.sql was run
  • Once successfully installed, login with admin:Admin and create a user with all permissions and admin rights on OpenMRS from Administration > Create User
  • For Linux installations, you may encounter some errors of write permission in catalina.out of Tomcat that can block successful setup. Hence before start deployment make that Tomcat is owner of directory and has all permissions on all Tomcat related directories. See tutorial here.
  • Stop tomcat
  • Look for .OpenMRS/modules folder
    • For Linux folder location is /usr/share/tomcat
    • For Windows folder location is C:\Users\Maimoona\AppData\Roaming\OpenMRS or C:\ApplicationData\... Download modules from here and copy all .omod files in modules directory.
  • Navigate to tomcat/webapp/opensrp/WEB-INF/classes, open opensrp.properties and replace OpenMRS REST credentials by one your created from OpenMRS web.
  • Start ActiveMQ
  • Start Tomcat
  • Thats it! You are ready to play with your App. Follow Team Management, and Location modules tutorials here to start creating your own team hierarchy