Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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.

    Code Block
      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).

    Code Block
      exchange: reval.exchange.gmcsync
      queue: reval.queue.gmcsync.recommendation
      routingKey: reval.gmcsync
  6. 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 aliasthis point, the GMC (DocumentDB) Change Data Capture process copies the data from MongoDB/DocumentDB over to elasticsearch

How to Trigger GMC Sync Manually?

...