Giter Site home page Giter Site logo

esaude-emr-poc's Introduction




OpenMRS


eSaude EMR Point of Care

Build Status Code Quality Test Coverage Dependency Status eSaude Version eSaude Slack

This project is an AngularJS application for point of care based on OpenMRS and using Bahmni code. The UI was designed for tablet-like interfaces with touch screen and virtual keyboard.

A demo of the system can be found here.

Setup (Development Environment)

The following instructions explain how to manually get eSaude EMR POC up and running natively in your local environment. If you would prefer to set up an environment automatically using Docker, see the esaude-poc-docker repository.

Prerequisites

Package Managers & Dependencies

In order to build and test the application, you need to have Node.js installed. Download or install it via a package manager. On Ubuntu/Debian the installation can be done like this:

curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -
sudo apt-get install -y nodejs

You will then have to install Bower and Grunt. This can be done as follows:

npm install -g bower
npm install -g grunt
npm install -g grunt-cli

Clone this repository and change to its directory:

git clone https://github.com/esaude/poc-ui-prototype.git
cd poc-ui-prototype

Finally, install the Node.js and Bower dependencies:

npm install
bower install

eSaude EMR Platform

The POC systems runs on top of eSaude EMR Platform. The install instructions can be found here.

Configuration

In order for Grunt to forward the REST calls made to the OpenMRS platform to the correct location, you will need to configure the proxies section of Gruntfile.js as follows:

proxies: [
    {
        context: '/openmrs',
        host: 'localhost',      // or your DOCKER_HOST if you're using Docker
        port: 8080,
        https: true,
        xforward: true
    }
]

If you are running the platform with Docker, you should replace localhost with the IP of your DOCKER_HOST.

Running

Run the development server as follows:

grunt serve

Access the server by navigating to http://localhost:9000/home in your browser.

Unit Testing

Running grunt test will run the unit tests with karma.

Setup (Staging & Production)

To deploy eSaude EMR POC to a staging or production, it is necessary deploy the distributable package to a web server such as Apache or Nginx.

The latest build from the master branch can be downloaded here.

To build the distributable package from source, follow the steps described in the Package Managers & Dependencies section above and then execute the following to build the package:

grunt build:package

This will create an archive called esaude-emr-poc-master.zip, which can be deployed to your web server.

Apache Configuration

Install Apache Web Server. On Ubuntu/Debian this can be done by executing the following command:

sudo apt-get install apache2

Make sure that the mod_proxy and mod_proxy_http modules are loaded. See here for detailed instructions.

Extract the contents of the distributable package to Apache's DocumentRoot. On Ubuntu this can be done as follows:

unzip /tmp/esaude-emr-poc-master.zip -d /var/www/html/

Finally, configure the required Alias and Proxy directives in Apache by using the following VirtualHost file (e.g. /etc/apache2/sites-enabled/000-default)

<VirtualHost *:80>
  DocumentRoot /var/www/html

  ProxyPass /openmrs http://YOUR_ESAUDE_PLATFORM_SERVER:8080/openmrs
  ProxyPassReverse /openmrs http://YOUR_ESAUDE_PLATFORM_SERVER:8080/openmrs

  Alias /poc /var/www/html/poc
  Alias /poc_config /var/www/html/poc_config
  Alias /images /var/www/html/poc/images

  Redirect permanent /home /poc/home/
  Redirect permanent /registration /poc/registration/
  Redirect permanent /vitals /poc/vitals/
  Redirect permanent /clinic /poc/clinic/
  Redirect permanent /common /poc/common/

  RedirectMatch ^/$ /home
</VirtualHost>

Make sure you replace YOUR_ESAUDE_PLATFORM_SERVER with the correct location of the eSaude EMR Platform instance you will be connecting to.

Restart Apache for the changes to take effect:

sudo service apache2 restart

Navigate to http://YOUR_SERVER/poc/home to access the POC system.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.