Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

How it works?

  1. 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

  2. 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

  3. GMC-Client would send SOAP requests GetDoctorsForDB to GMC for retrieving the list of doctors with their designated body.

  4. 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.

  5. Recommendation service would listen to the queue reval.queue.gmcsync.recommendation for updating the MongoDB DoctorsForDB 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 a existsInGmc 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 the same time, the Connection service would listen to the queue reval.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 Connections (outdated) for more information.

    At the time of writing, the connections application uses masterdoctorindex via an alias

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.

  1. Login to the AWS console

  2. Go to API Gateway

  3. Choose the API revalidation-preprod-gateway for Preprod or revalidation-prod-gateway for Prod

  4. Find the endpoint v1/admin/ under “Resources” and click on POST

  5. Click Test to run the endpoint, then the overnight sync job will start

  6. Logs can be checked from Recommendation service

Legacy Diagram for GMC sync

GMC Sync Walkthrough: https://web.microsoftstream.com/video/adefa444-30e5-4748-8e97-991d12caad16

  • No labels