Skip to content

AMPATH/eid-sync-service

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EID Sync Service

EID Sync service fetches data from EID Labs API i.e AMPATH and Alupe at defined times and saves the person uuid's to the eid sync queue

Project set up

  1. Fork the project
  2. Clone the project
  3. Create a conf folder in the root directory with config.json file with the following configuration
{
  "hivLabSystem": {
    "ampath": {
      "serverUrl": "",
      "apiKey": ""
    },
    "alupe": {
      "serverUrl": "",
      "apiKey": ""
    }
  },
  "eidQueueTable": {
    "ampath": {
      "queueTable": ""
    },
    "alupe": {
      "queueTable": ""
    }
  },
  "mysql": {
    "connectionLimit": 5,
    "host": "",
    "port": "",
    "user": "",
    "password": "",
    "database": "",
    "multipleStatements": true
  },
  "syncSettings": {
    "eidSyncHr": 14,
    "syncInterval": 6000,
    "scheduledSyncHour": 22
  }
}

eidSyncHr is the time the service should fetch the patient labs from the Ampath and Alupe EID service. syncInterval is the interval between each sync attempt. Sync will only proceed if the current time matches the eidSyncHr scheduledSyncHour is the time patients with appointments the next day should be put inn the eid sync queue. HivLabSystem this contains the different Hiv Lab systems. ampath this contains the serverUrl and ApiKey for communicating with the Ampath lab system. alupe this contains the serverUrl and ApiKey for communicating with the Alupe lab system.

Requirements

  1. Node Version 16+
  2. Docker

Getting started

npm install npm start

Building and deployment

docker build -f Dockerfile -t ampathke/eid-sync-service:<tag> .

docker run --name eid-sync-service -p <port>:<port> -d --restart unless-stopped --mount type=bind,source="/opt/eid-sync-service",target="/usr/src/eid-sync/conf" ampathke/eid-sync-service:<tag>

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published