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 document will be cleaned up by adding a prefix
last-
in front of the designated body code. (This sets all doctors as “disconnected” and hides them from our system)
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 alast-
prefix for the designated body field inDoctorsForDB
, and their record will not be shown in recommendation summary page anymore.exchange: reval.exchange.gmcsync queue: reval.queue.gmcsync.recommendation routingKey: reval.gmcsync
At the same time, the Connection service would listen to the queuereval.queue.gmcsync.connection
for updating the Elastic Search Master index and the corresponding Connection indexes. Please find the document Elastic Search Index Update Event for more information.exchange: reval.exchange.gmcsync queue: reval.queue.gmcsync.connection routingKey: reval.gmcsync
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