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:
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
The POC systems runs on top of eSaude EMR Platform. The install instructions can be found here.
You should have Google Chrome or Chromium browser installed in order to run unit tests.
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
.
Run the development server as follows:
grunt serve
Access the server by navigating to http://localhost:9000/home in your browser.
Running grunt test
will run the unit tests with karma.
npm install
npm run wd:start
- starts Seliniumnpm run e2e
- runs tests and generates a report- open
/e2eTests/reports/pocE2E.html
to view a report
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.
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.