This projet aims to handle patients stored in the lab sync queue. It takes the patients from the queue one at a time and sends an api request to another service that fetches their lab results Its only task is to pick patients from the queue, and sync them at predefined intervals specified in the configuratio file
- Fork the project
- Clone the project
- Create a conf folder in the root directory with config.mjs file with the following configuration
'use strict'
const db = {
mysql:{
"connectionLimit": 2,
"host": "hostip",
"port": "port",
"user": "username",
"password": "password"
}
};
const server = {
etl: {
'lab1': 'lab1url',
'lab2': 'lab2url'
},
amrs:{
'auth': 'authtoken'
}
}
const queueTables = {
ampath: 'queue_table_1',
alupe: 'queue_table_2'
}
const syncIntervalSettings = {
ampath:{
peakHrSyncInterval: 10000,
offpeakHrSyncInterval: 5000
},
alupe:{
peakHrSyncInterval: 30000,
offpeakHrSyncInterval: 5000
}
}
export { db, server, queueTables, syncIntervalSettings}
- Node Version 16
- Docker
npm install
npm start
docker build -f Dockerfile -t <account>/<repo>:<version> .
docker run -d -it --name <name> <account>/<repo>:<version>