How it works?
A cron job is scheduled in the Recommendation service to run the GMC sync every night to update the list of doctors in doctorsForDB.
Cron expression is stored in Parameter Store for Stage and Prod
Stage:/tis/revalidation/preprod/recommendation/cron/nightlysync
Prod:/tis/revalidation/prod/recommendation/cron/nightlysync
The recommendation service would start preparing the data for the GMC sync job. The doctors in the DoctorsForDB database have the field “existsInGmc” set to false. (Effectively this marks all doctors as “disconnected” as GMC only sends us connected doctors)
After that, a message will be pushed to the Rabbit queue to notify the GMC-client service to start the overnight sync job.exchange: reval.exchange queue: reval.queue.gmcsync.requested.gmcclient routingKey: reval.gmcsync.requested
GMC-Client would send SOAP requests
GetDoctorsForDB
to GMC for retrieving the list of doctors with their designated body.GMC-Client would push GMC doctors' data to the RabbitMQ with routingKey
reval.gmcsync
which is binding to two queues, one for Recommendation and one for Connection service.Recommendation service would listen to the queue
reval.queue.gmcsync.recommendation
for updating the MongoDBDoctorsForDB
document.
Doctors' data will be updated with their updated designated body. Any doctors who are not sent back from the queue, means they are not connected to any office. This would leave the disconnected doctors with aexistsInGmc
set to false, and their record will not be shown in recommendation summary page anymore (but will still show up in connections discrepancies).exchange: reval.exchange.gmcsync queue: reval.queue.gmcsync.recommendation routingKey: reval.gmcsync
At this point, the GMC (DocumentDB) Change Data Capture process copies the data from MongoDB/DocumentDB over to elasticsearch
How to Trigger GMC Sync Manually?
In case of overnight GMC sync failure, that might lead missing of doctors from the recommendation summary page and may block the daily operation of the Reval users. Instead of waiting until the job re-run in the next mid-night, we can re-run the job manually to reduce the downtime.
Login to the AWS console
Go to
API Gateway
Choose the API
revalidation-preprod-gateway
for Preprod orrevalidation-prod-gateway
for ProdFind the endpoint
v1/admin/
under “Resources” and click onPOST
Click
Test
to run the endpoint, then the overnight sync job will startLogs can be checked from Recommendation service
Legacy Diagram for GMC sync
GMC Sync Walkthrough: https://web.microsoftstream.com/video/adefa444-30e5-4748-8e97-991d12caad16
Add Comment