### Build and Run OpenMRS HIS Distribution Locally
Source: https://context7.com/openmrs/openmrs-distro-his/llms.txt
Instructions to clone the OpenMRS HIS repository, build the distribution using Maven, and start the services locally with Docker Compose. This process involves navigating to the target directory and executing Ozone scripts for service orchestration.
```bash
# Clone the repository
git clone https://github.com/openmrs/openmrs-distro-his
cd openmrs-distro-his
# Build the distribution with Maven
mvn clean package
# Navigate to the generated distribution
cd target/distro-his-1.0.0-SNAPSHOT/run/docker
# Start all services using Ozone scripts
# Follow instructions at: https://docs.ozone-his.com/implementers/start-stop/
# The following Docker Compose files are included:
# - docker-compose-common.yml
# - docker-compose-keycloak.yml
# - docker-compose-openmrs.yml
# - docker-compose-openmrs-sso.yml
# - docker-compose-odoo.yml
# - docker-compose-odoo-sso.yml
# - docker-compose-openelis.yml (optional, for lab integration)
```
--------------------------------
### Execute Maven Build Commands for OpenMRS Distribution
Source: https://context7.com/openmrs/openmrs-distro-his/llms.txt
Provides essential Maven commands for building the OpenMRS HIS distribution. Includes commands for a clean build, building with OpenMRS configuration validation, and building and installing the distribution locally.
```bash
# Build commands
mvn clean package # Build distribution
mvn clean package -Pvalidator # Build with OpenMRS config validation
mvn clean install # Build and install locally
```
--------------------------------
### Configure Maven Build for OpenELIS Deployment
Source: https://github.com/openmrs/openmrs-distro-his/blob/main/run-with-openelis-locally.md
This XML snippet is used within the project's pom.xml to manage the deployment of global properties. It allows developers to toggle between local and server-specific configurations by commenting or uncommenting the file deletion tasks during the package phase.
```xml
Delete labonfhir globalproperties depending on place of deployment
package
run
```
--------------------------------
### Configure Environment Variables
Source: https://context7.com/openmrs/openmrs-distro-his/llms.txt
Shell script snippet for defining environment variables used by the OpenMRS HIS distribution to manage frontend configurations and Odoo module installations.
```bash
SPA_CONFIG_URLS=/openmrs/spa/configs/referenceapplication/config.json,/openmrs/spa/configs/referenceapplication-demo/config.json,/openmrs/spa/configs/ozone-frontend-config.json,/openmrs/spa/configs/openmrs-his-frontend-config.json
ODOO_ADDONS=sale_management,stock,account_account,purchase,mrp,mrp_product_expiry,product_expiry,l10n_generic_coa,odoo_initializer,web_company_color
```
--------------------------------
### Configure OpenMRS HIS Distribution Build with Maven
Source: https://context7.com/openmrs/openmrs-distro-his/llms.txt
Defines the Maven project structure, parent POM, artifact details, and component versions for the OpenMRS HIS distribution. It includes dependencies for modules like labonfhir and referencedemodata, and configuration for Docker image pushing and SSO.
```xml
com.ozonehis
maven-parent
1.0.0-SNAPSHOT
org.openmrs
distro-his
1.0.0-SNAPSHOT
1.5.3
3.2.0.2
2.6.0
openmrs
true
org.openmrs.module
labonfhir-omod
${labonfhir.omod.version}
org.openmrs.module
referencedemodata-omod
${referencedemodata.omod.version}
```
--------------------------------
### Access OpenMRS HIS Demo Environment
Source: https://context7.com/openmrs/openmrs-distro-his/llms.txt
Provides the URL and login credentials for the public demo environment of the OpenMRS HIS. It also lists the default service endpoints when the system is running locally.
```bash
# Demo URL
https://dev-his.openmrs.org
# Login credentials
Username: jdoe
Password: password
# Default service endpoints (when running locally):
# OpenMRS: http://localhost:80/openmrs/spa
# Odoo ERP: http://localhost:8069
# OpenELIS: http://localhost:81
# Keycloak: http://localhost:8084
# Superset: Configured via SUPERSET_PUBLIC_URL environment variable
```
--------------------------------
### Enable OpenELIS Integration in OpenMRS HIS
Source: https://context7.com/openmrs/openmrs-distro-his/llms.txt
Steps to configure the OpenMRS HIS distribution to include OpenELIS Global for laboratory management. This involves modifying Docker Compose files, updating the Maven build configuration in `pom.xml`, and rebuilding the distribution.
```bash
# 1. Add OpenELIS to the docker-compose files list
echo "docker-compose-openelis.yml" >> scripts/docker-compose-files.txt
# 2. Update pom.xml to configure labonfhir for local development
# Uncomment this line in pom.xml:
#
# And comment this line:
#
# 3. Rebuild the distribution
mvn clean package
# 4. Start the services following Ozone documentation
```
--------------------------------
### Configure OpenMRS Frontend Navigation Links
Source: https://context7.com/openmrs/openmrs-distro-his/llms.txt
Defines external links for the OpenMRS navigation menu, allowing integration with other services like Pharmacy, Reporting, Account Management, Logs, and Laboratory. These links are configured using environment variables for dynamic URLs.
```json
{
"@openmrs/esm-primary-navigation-app": {
"externalRefLinks": [
{
"title": "Pharmacy, Billing & Inventory",
"redirect": "${ODOO_PUBLIC_URL}"
},
{
"title": "Reporting & Analytics",
"redirect": "${SUPERSET_PUBLIC_URL}"
},
{
"title": "Account Management",
"redirect": "${KEYCLOAK_URL}/realms/ozone/account/#/"
},
{
"title": "Logs Management",
"redirect": "https://grafana.openmrs-his.mekomsolutions.net"
},
{
"title": "Laboratory",
"redirect": "https://demo.openelis-global.org"
}
]
}
}
```
--------------------------------
### Configure OpenMRS HIS System Properties
Source: https://context7.com/openmrs/openmrs-distro-his/llms.txt
Properties file configuration for SSL, FHIR store connectivity, and system-wide paging settings. These settings are essential for establishing secure communication and data synchronization between OpenMRS and OpenELIS.
```properties
server.ssl.key-store = file:/etc/openelis-global/keystore
server.ssl.key-store-password = kspass
server.ssl.key-password = kspass
server.ssl.trust-store = file:/etc/openelis-global/truststore
server.ssl.trust-store-password = tspass
org.openelisglobal.fhirstore.uri=http://fhir.openelis.org:8080/fhir/
org.openelisglobal.fhirstore.username=admin
org.openelisglobal.fhirstore.password=adminADMIN!
org.openelisglobal.fhir.subscriber.allowHTTP=true
org.openelisglobal.remote.source.uri=http://fhir.openelis.org:8080/fhir/
org.openelisglobal.remote.source.updateStatus=true
org.openelisglobal.remote.source.identifier=Practitioner/*
org.openelisglobal.remote.poll.frequency=120000
org.openelisglobal.task.useBasedOn=true
org.openelisglobal.fhir.subscriber.resources=Task,Patient,ServiceRequest,DiagnosticReport,Observation,Specimen,Practitioner,Encounter
org.openelisglobal.providerlist.fhirstore=http://fhir.openelis.org:8080/fhir/
org.openelisglobal.requester.identifier=Practitioner/*
org.openelisglobal.providerlist.poll.frequency=120000
org.openelisglobal.paging.patients.pageSize=99
org.openelisglobal.paging.results.pageSize=99
org.openelisglobal.paging.validation.pageSize=99
```
--------------------------------
### Configure Odoo Company Branding with OpenMRS Details
Source: https://context7.com/openmrs/openmrs-distro-his/llms.txt
Sets company details for Odoo, including the company name, currency, email, and website, to reflect OpenMRS branding. This configuration is applied using a CSV initializer file.
```csv
# configs/odoo/initializer_config/company/res.company.csv
"id","name","currency_id/id","email","website",logo
"base.main_company","OpenMRS","base.USD","info@openmrs.org","https://openmrs.org",""
```
--------------------------------
### OpenELIS Docker Compose Configuration
Source: https://context7.com/openmrs/openmrs-distro-his/llms.txt
Defines the Docker Compose services required for integrating OpenELIS Global, including its PostgreSQL database, web application, FHIR API, frontend, and Nginx proxy. This configuration is used to set up the laboratory management system within the OpenMRS HIS.
```yaml
# scripts/docker-compose-openelis.yml
version: '3.6'
services:
# PostgreSQL database for OpenELIS
db.openelis.org:
container_name: openelisglobal-database
image: postgres:14.4
ports:
- "15432:5432"
env_file:
- ./volumes/database/database.env
volumes:
- ./volumes/database/data:/var/lib/postgresql/data
- ./volumes/database/dbInit:/docker-entrypoint-initdb.d
healthcheck:
test: ["CMD", "pg_isready", "-q", "-d", "clinlims", "-U", "clinlims"]
timeout: 45s
interval: 10s
retries: 10
# OpenELIS Global web application
oe.openelis.org:
container_name: openelisglobal-webapp
image: itechuw/openelis-global-2:develop
ports:
- "8085:8080"
- "8443:8443"
environment:
- DEFAULT_PW=adminADMIN!
- TZ=America/New_York
- CATALINA_OPTS=-Ddatasource.url=jdbc:postgresql://db.openelis.org:5432/clinlims -Ddatasource.username=clinlims
# FHIR API for external integrations
fhir.openelis.org:
container_name: external-fhir-api
image: itechuw/openelis-global-2-fhir:develop
ports:
- "8086:8080"
# Frontend application
frontend.openelis.org:
image: itechuw/openelis-global-2-frontend:develop
container_name: openelisglobal-front-end
# Nginx reverse proxy
openelis.proxy:
image: itechuw/openelis-global-2-proxy:develop
container_name: openelisglobal-proxy
ports:
- 81:80
- 443:443
```
--------------------------------
### Configure Keycloak SSO Realm
Source: https://context7.com/openmrs/openmrs-distro-his/llms.txt
JSON configuration for the Keycloak realm used for unified authentication across OpenMRS, Odoo, and Superset. Defines clients, secrets, and initial user roles.
```json
{
"id": "openmrs-his",
"realm": "ozone",
"displayName": "OpenMRS HIS",
"enabled": true,
"sslRequired": "external",
"loginWithEmailAllowed": true,
"clients": [
{
"clientId": "openmrs",
"rootUrl": "${OPENMRS_PUBLIC_URL}/openmrs",
"secret": "${OPENMRS_CLIENT_SECRET}",
"standardFlowEnabled": true,
"directAccessGrantsEnabled": true,
"frontchannelLogout": true,
"attributes": {
"frontchannel.logout.url": "${OPENMRS_PUBLIC_URL}/openmrs/oauth2logout"
}
},
{
"clientId": "odoo",
"rootUrl": "${ODOO_PUBLIC_URL}",
"secret": "${ODOO_CLIENT_SECRET}",
"standardFlowEnabled": true,
"implicitFlowEnabled": true,
"directAccessGrantsEnabled": true,
"attributes": {
"frontchannel.logout.url": "${ODOO_PUBLIC_URL}/web/session/logout"
}
},
{
"clientId": "superset",
"rootUrl": "${SUPERSET_PUBLIC_URL}",
"secret": "${SUPERSET_CLIENT_SECRET}",
"standardFlowEnabled": true,
"directAccessGrantsEnabled": true
}
],
"users": [
{
"username": "jdoe",
"firstName": "John",
"lastName": "Doe",
"email": "jdoe@example.com",
"enabled": true,
"clientRoles": {
"superset": ["Admin"],
"openmrs": ["System Developer"]
}
}
]
}
```
--------------------------------
### Configure Nginx Reverse Proxy for OpenMRS Services
Source: https://context7.com/openmrs/openmrs-distro-his/llms.txt
Sets up Nginx to proxy requests to different services including OpenMRS frontend and backend, Odoo ERP, and Keycloak identity provider. It defines upstream servers and location blocks to route traffic appropriately, ensuring proper handling of static assets and API requests.
```nginx
# bundled-docker/proxy/default.conf.template
# OpenMRS Frontend and Backend
upstream frontend {
server frontend max_fails=0;
}
upstream backend {
server openmrs:8080 max_fails=0;
}
server {
listen 80;
add_header X-XSS-Protection "1; mode=block";
add_header X-Content-Type-Options nosniff;
# SPA Frontend
location /openmrs/spa/ {
proxy_pass http://frontend/;
proxy_redirect http://$host/ /openmrs/spa/;
}
# OpenMRS Backend API
location /openmrs {
proxy_pass http://backend;
}
# Root redirect to SPA
location = / {
return 301 /openmrs/spa/;
}
}
# Odoo ERP Proxy
server {
listen 8069;
location ~* /web/static/ {
proxy_cache_valid 200 60m;
set $odoo odoo:8069;
proxy_pass http://$odoo;
}
location / {
set $odoo odoo:8069;
proxy_pass http://$odoo;
proxy_read_timeout 30000;
}
location /longpolling {
set $odoo odoo:8072;
proxy_pass http://$odoo;
}
}
# Keycloak Identity Provider
server {
listen 8084;
location / {
set $keycloak keycloak:8080;
proxy_pass http://$keycloak;
}
}
```
--------------------------------
### OpenELIS FHIR Configuration Properties
Source: https://context7.com/openmrs/openmrs-distro-his/llms.txt
Configuration properties for setting up OpenELIS to communicate with OpenMRS via FHIR. This file specifies the necessary settings for enabling interoperability between the laboratory management system and the EMR.
```properties
# configs/openelis/common.properties
```
=== COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.