OpenMRS

Table of Contents

Introduction

Architecture

Setup

How to start the "Standalone Edition" of the Reference Application

VERSION_NUMBER=2.0.5

apt update
apt install unzip -y
apt install openjdk-8-jdk -y
apt install mysql-server -y

useradd openmrs
mkdir /home/openmrs
chown -R /home/openmrs openmrs:openmrs
su openmrs
cd ~

wget https://downloads.sourceforge.net/project/openmrs/releases/OpenMRS_Platform_${VERSION_NUMBER}/openmrs-standalone-${VERSION_NUMBER}.zip
unzip openmrs-standalone-${VERSION_NUMBER}.zip
cd openmrs-standalone-${VERSION_NUMBER}

java -jar openmrs-standalone.jar -commandline

Test the connection

curl -u admin:test "http://${SERVER_IP}:${SERVER_PORT}/openmrs-standalone/ws/rest/v1/patient?identifier=John" | jq

Development

How to start an OpenMRS dev server?

sudo apt update
sudo apt install openjdk-8-jdk
sudo apt install maven
sudo apt install mysql-server

mysql -p # create database
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64

mvn org.openmrs.maven.plugins:openmrs-sdk-maven-plugin:setup-sdk

mvn openmrs-sdk:create-project
cd basicexample/
mvn clean install openmrs-sdk:run

See

Modules

How to compile OMOD files?

git clone git@github.com:Bahmni/bahmni-core.git
cd bahmni-core/bahmnicore-omod
mvn package
find . -name *.omod

Rest API

Example requests

How to query the details of an existing patient?

curl -u admin:Admin123 "http://165.227.147.18:8080/openmrs/ws/rest/v1/patient/07d93059-9957-44d9-bdc9-829232377d60" | jq

How to find a patient by identifier?

curl -u admin:Admin123 "http://165.227.147.18:8080/openmrs/ws/rest/v1/patient?identifier=John" | jq
curl -u admin:test "http://${SERVER_IP}:${SERVER_PORT}/openmrs-standalone/ws/rest/v1/patient?identifier=John" | jq

Community

Bahmni

Maintenance

Unsorted

GitHubImpressum