Skip to content

Overview

Overview

AMRIT is primarily built around the Java Spring Boot framework and as outlined in earlier sections provides multiple services oriented around the community health records ecosystem. AMRIT is deployed in multiple states on non-profit model. Patients, HWCs and PHCs are the key stakeholders. AMRIT can be accessible from various channels like web portal, API access, Mobile app and Tele- medicine.

Technology Elements

  • Java 8, SpringBoot 1.5.3
  • Angular 4 and 5
  • Wildfly 11 Final
  • MySQL 5.7
  • Redis (SSO)
  • MongoDB - FHIR Resource
  • OpenKM on Tomcat
  • Git
  • Project EKA - HIP Service
  • PostgreSQL

Technical Architecture

amrit-image

Build and run maven code

Creating a build configuration in STS / Eclipse

  • In your editor, click on Run -> Run configuration.
  • Double click on Maven build and give a suitable name for the new configuration.
  • Populate the base directory by clicking on workspace and selecting HWC-API module.
  • Set goals to clean install -DENV_VAR=example(your choice of desired environment) and click on Apply.
  • It is advisable have a personal environment properties file under src/main/environment filling out all the placeholders to avoid repetitive manual work each time you run locally.
  • Click Run to run the build configuration.

Creating a run configuration in STS / Eclipse

  • In your editor, click on Run -> Run configuration.
  • Double click on Spring Boot App(in STS) / Java Application(in Eclipse) and give a suitable name for the new configuration.
  • Select the project and main class and click on Apply.
  • Click Run to run the configuration. Keep the Redis server open during this run.
  • Once the run is complete, load http://localhost:8080/swagger-ui.html#!/

How to Import, Build, and Run Maven Code in Visual Studio Code

  1. Install Visual Studio Code: Download and install Visual Studio Code from the official website.

  2. Install Java: Ensure you have the Java Development Kit (JDK 1.8) installed on your computer. You can download it from the Oracle website or use an open-source JDK like OpenJDK.

  3. Install Maven: Make sure you have Apache Maven installed on your system. Download it from the Apache Maven website.

  4. Install Visual Studio Code Extensions:

  5. Java Extension Pack: Open Visual Studio Code, go to the Extensions view by clicking on the Extensions icon in the Activity Bar, and search for "Java Extension Pack." Install it to get Java support and Maven integration.

  6. Open the Project in Visual Studio Code:

  7. Launch Visual Studio Code.
  8. Use the File > Open Folder option to open your Maven project folder.

  9. Configure Java and Maven:

  10. If not already configured, set up your Java Home and Maven Home in Visual Studio Code.
  11. Go to File > Preferences > Settings, search for "Java Home" and "Maven Home," and specify the paths to your JDK and Maven installations.

  12. Build and Run:

  13. To build and run your Maven project, open the integrated terminal in Visual Studio Code (Terminal > New Terminal).
  14. Navigate to your project directory using the cd command.
  15. Use Maven commands like mvn clean install to build your project.
  16. To run your Java application, use mvn spring-boot:run. Ensure the redis server is open during run.

AMRIT DB restoration

Please find below the zip file of AMRIT blank db with dummy data and global masters.

blank_db_zip

MYSQL Installation

MySQL is a relational database management system based on SQL – Structured Query Language. The application is used for a wide range of purposes, including data warehousing, e-commerce, and logging applications. The most common use for MySQL, however is for the purpose of a web database.

https://dev.mysql.com/downloads/installer/

https://software.grok.lsu.edu/Article.aspx?articleid=18737

DB Restoration using Workbench:

https://www.greengeeks.com/tutorials/restore-a-mysql-database-from-a-backup-with-mysql-workbench/

DB Restoration using Commands:

https://blog.devart.com/how-to-restore-mysql-database-from-backup.html

Required Amrit Schema and Database User Creation:

amrit-image

Create database db_identity; Create database db_iemr; Create database db_reporting;

At the time of MYSQL Installation ,please notedown “root” user password for reference as it will have full privilege.

Run below commands to add users & assign permissions before importing database files

CREATE USER 'testuser'@'%' IDENTIFIED BY 'Test@123';
GRANT ALL PRIVILEGES ON db_iemr. TO 'testuser'@'%';
GRANT ALL PRIVILEGES ON db_identity.
TO 'testuser'@'%'; GRANT ALL PRIVILEGES ON db_reporting.* TO 'testuser'@'%';

The user and password can be changed in each API for running the Spring application.

Importing db_iemr schema from workbench

amrit-image

amrit-image

Importing global master data & dummy login info

amrit-image

amrit-image

Importing db_identity schema

amrit-image

amrit-image

Importing db_reporting schema

amrit-image

amrit-image