Name: esaude-emr-poc
Owner: eSaude
Description: null
Created: 2015-07-27 13:34:24.0
Updated: 2017-12-28 09:34:30.0
Pushed: 2018-01-12 09:37:18.0
Homepage: http://www.esaude.org/community-projects/point-of-care
Size: 3281
Language: JavaScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
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.
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.
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:
-sL https://deb.nodesource.com/setup_4.x | sudo -E bash -
apt-get install -y nodejs
You will then have to install Bower and Grunt. This can be done as follows:
install -g bower
install -g grunt
install -g grunt-cli
Clone this repository and change to its directory:
clone https://github.com/esaude/poc-ui-prototype.git
oc-ui-prototype
Finally, install the Node.js and Bower dependencies:
install
r install
The POC systems runs on top of eSaude EMR Platform. The install instructions can be found here.
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:
ies: [
{
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
.
Run the development server as follows:
t serve
Access the server by navigating to http://localhost:9000/home in your browser.
Running grunt test
will run the unit tests with karma.
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:
t build:package
This will create an archive called esaude-emr-poc-master.zip
, which can be deployed to your web server.
Install Apache Web Server. On Ubuntu/Debian this can be done by executing the following command:
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:
p /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
)
tualHost *:80>
cumentRoot /var/www/html
oxyPass /openmrs http://YOUR_ESAUDE_PLATFORM_SERVER:8080/openmrs
oxyPassReverse /openmrs http://YOUR_ESAUDE_PLATFORM_SERVER:8080/openmrs
ias /poc /var/www/html/poc
ias /poc_config /var/www/html/poc_config
ias /images /var/www/html/poc/images
direct permanent /home /poc/home/
direct permanent /registration /poc/registration/
direct permanent /vitals /poc/vitals/
direct permanent /clinic /poc/clinic/
direct permanent /common /poc/common/
directMatch ^/$ /home
rtualHost>
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:
service apache2 restart
Navigate to http://YOUR_SERVER/poc/home to access the POC system.