Skip to content

LIVD device sync

Merethe Hansen edited this page Jun 6, 2024 · 4 revisions

Running the LIVD device sync

Intro

This page provides a walkthrough and tips on how to run a LIVD device sync in production.

Tips

  • Go through the steps below in a lower environment to confirm it works before trying on prod
  • (Highly recommended) Pair with other developers to ensure things look good before performing the sync in prod
  • (Highly recommended) Start a Slack thread in the engineering Slack when running a device sync for record keeping
    • other helpful information to post in a thread: # of devices added, # of devices changed/updated

Steps

  1. Hit the following API endpoint .../api/devices/sync?dryRun=true
    • As a curl command for prod, it would look like:
       curl --location 'https://www.simplereport.gov/api/devices/sync?dryRun=true' \
       --header 'Authorization: Bearer yourToken'
      
    • Or use an API testing tool of your choice
  2. Go to Azure with your su account and go to Application Insights for the environment you ran the dry run on
    • Go to "Logs"

      Screenshot 2023-10-05 at 16 01 08
    • Run a new query

       traces
       | where message has "device created" or message has "updating device"
      
Screenshot 2023-12-19 at 12 36 26
  1. Check some of the devices being updated and created to make sure they look correct. Things to check:

    • cross-reference the LIVD API
    • check metabase for the environment you ran the sync in to ensure devices being created don't already exist
    • check the blocklist to ensure no devices here are being created
    • a device that is created can be updated in the same sync if they have multiple entries in the LIVD table (i.e. for multiplex devices, or if it has different equipment uids)
  2. If the above looks, good hit the following API endpoint .../api/devices/sync?dryRun=false

    • As a curl command for prod, it would look like:
       curl --location 'https://www.simplereport.gov/api/devices/sync?dryRun=false' \
       --header 'Authorization: Bearer yourToken'
      
    • Or use an API testing tool of your choice
  3. If a new specimen type was created during the sync (tip: check the table in Metabase for any newly created specimen types), notify the ReportStream team in the #shared-simple-report-universal-pipeline channel, providing them the name and code of the new specimen type.

    • Example message: "Hello ReportStream folks! SimpleReport is now supporting a new specimen type Plasma specimen with type code 119361006 for our results."

Local development

Setup

How to

Development process and standards

Oncall

Technical resources

How-to guides

Environments/Azure

Misc

?

Clone this wiki locally