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
- Fork the project
- Clone the project
- 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.
- Node Version 16+
- Docker
npm install
npm start
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>