Before installing NLIMS
, ensure that the following requirements are met:
- Ruby 2.5.3
- MySQL 5.6
- Rails 5
- Couchdb 3.2.1
Install by following this guide: Couchdb installation
-
Checkout to the
main
branchgit checkout main
OR
git checkout [tag]
-
Open the respective configuration files in the
config
folder: Copy the .example file to respective .yml file e.gcp database.yml.example database.yml
database.yml
: Configure your database settings.couchdb.yml
: Configure your CouchDB settings.results_channel_socket.yml
: Configure your results channel socket settings.application.yml
: Edit application-specific configurations as required.emr_connection
: Configure connection to emr for updating results and statuses.master_nlims.yml
: Configure your CouchDB settings.
-
Update the configuration settings in these files to match your environment.
-
Install project dependencies using Bundler. Run the following command in your project directory:
bundle install
If you are installing the app for the first time, follow these steps:
-
Create the database:
rails db:create
-
Run database migrations:
rails db:migrate
-
Seed the database with initial data:
rails db:seed
If you already had NLIMS running before and want to update it, follow these steps:
-
Checkout to intended tag.
git checkout [tag]
-
Run update metadata:
./bin/update_metadata.sh
-
NOTE: Check that the configurations in all
.yml
files in theconfig
folder are ok. This will not be necessary once everything is stable and consolidated.
Local NLIMS (National Laboratory Information Management System) is an integral part of the healthcare infrastructure in ART sites. It plays a crucial role in facilitating communication between the ART application and the central CHSU (Central Health Service Unit) NLIMS. This document provides an overview of how Local NLIMS operates and communicates with various components.
-
Running in ART Sites: Local NLIMS is deployed and operates within ART sites, specifically on the ART server.
-
Communication with ART: Every ART application at the site has an associated account with the Local NLIMS. This allows ART to push orders and pull statuses and results from the Local NLIMS.
-
Integration with CHSU NLIMS: Local NLIMS further communicates with the central CHSU NLIMS. It pushes orders to the CHSU NLIMS and pulls statuses and results from it.
-
Data Relay to ART: Once the Local NLIMS retrieves statuses and results from the CHSU NLIMS, it pushes this data to the ART application, ensuring seamless data transfer.
-
Access Control: Local NLIMS enforces access control by requiring accounts to permit transactions between it and other systems. This access is configured via usernames and passwords.
ART communicates with the Local NLIMS through its backend, which is the API module. To configure this communication, follow these steps:
-
Check
application.yml
: Within the API, locate theapplication.yml
file. -
Configuration Settings:
- Ensure that
lims_api
is not commented out, as this allows the API to interact with the Local NLIMS. - Verify that
lims_port
specifies the correct port number on which the Local NLIMS is running. - Set
lims_default_username
to "admini" for access during account creation. - Set
lims_default_password
to "knock_knock" for access during account creation. - Customize
lims_username
andlims_password
with your desired credentials for accounts created on the Local NLIMS.
- Ensure that
-
Create an Account: To create an account with the Local NLIMS at the facility, run the following command within the BHT-EMR-API application:
rake nlims:create_user
-
With these configurations in place, BHT-EMR-API can now interact with the Local NLIMS. Additionally, a job within the EMR-API allows transactions to and from the Local NLIMS. This job should be scheduled in the crontab to execute at specified intervals. The job is found under
bin/lab/sync_worker.rb
.
* * * * * /bin/bash -l -c 'cd /var/www/BHT-EMR-API && bin/rails runner -e development '\''bin/lab/sync_worker.rb'\'''
Local NLIMS communicates with the CHSU NLIMS and requires an account for proper setup. Follow these steps:
-
Edit
master_nlims.yml
:- Set the
protocol
to the IP address of the CHSU NLIMS (e.g., 10.44.0.46). - Set
port
to the port number on which the CHSU NLIMS is running (e.g., 3010). - Ensure that
default_username
anddefault_password
are set to "admin" and "knock_knock," respectively, to permit account creation at CHSU NLIMS. - Customize
password
andusername
with your desired credentials for the account created at CHSU NLIMS.
- Set the
-
Create an Account with CHSU NLIMS: Run the following command to create an account with the CHSU NLIMS:
rake master_nlims:create_account
-
Account Configuration with ART
- Edit the
emr_connection.yml
file to specify the IP address and port number where the ART application (BHT-EMR-API) is running. - Customize
username
andpassword
with your desired credentials, which will be used for the account created within the ART application. - Run the following command to create account with emr
rake emr:create_user
- Edit the
-
Data Retrieval from CHSU NLIMS and Sharing: Local NLIMS pulls statuses and results from the CHSU NLIMS and shares this data with the ART application. This is accomplished through the
master_nlims:sync_data
job. It can also send these statuses and results to the ART application proactively without waiting for a request. This job ensures that data is sent to the CHSU NLIMS.0 */2 * * * /bin/bash -l -c 'cd /var/www/nlims_controller && rvm use 2.5.3 && RAILS_ENV=development bundle exec rake master_nlims:sync_data --silent >> log/pull_from_master_nlims.log 2>&1'
-
Data Synchronization to CHSU NLIMS: 2. To Synchronization data orders between local NLIMS and CHSU NLIMS: Install
NLIMS DATA SYNCHRONISER
as guided through the following guide: NLIMS DATA SYNCRONISER
By following these steps, Local NLIMS establishes effective communication with both the ART application and the CHSU NLIMS, facilitating efficient data exchange within the healthcare system.