usdigitalresponse / univaf

An API hosted by USDR for recording and querying vaccine appointment availability.
https://getmyvax.org/
Apache License 2.0
7 stars 2 forks source link

Mark locations as private if they disappear from source data #449

Closed Mr0grog closed 1 year ago

Mr0grog commented 3 years ago

We sometimes have locations that were once available for vaccination, but no longer are. It’s hard to know when a place disappears in any automatic way, but if we know a source has complete coverage (e.g. CVS’s SMART SL API should reliably list every CVS location that is doing vaccinations), we could determine this by comparing what the source sends with locations we already have in the database.

For example, the CVS SMART source might:

  1. Request https://getmyvax.org/api/edge/locations?provider=cvs and save that list in memory.
  2. Do its work as normal, but for each location it finds in the source data, remove it from the list created in step 1.
  3. Output an update for every location still remaining in the list from step 1, but with the is_public property set to false.

Right now, this is most needed for Prepmod — in Alaska, there have been several locations accidentally published publicly and then later made private, but we still show it because we picked it up when it was briefly public. However, it’s still relevant to any other source that is canonical in some way (e.g. Walgreens/CVS/Kroger SMART, Albertsons).

brendanbabb commented 3 years ago

There was a clinic that was public for our mass shelter that was supposed to be private, named Visit Health Mobile Clinics (Address: Sullivan Arena 1600 Gambell St.) We contacted the Anchorage health dept. to change the PrepMod clinic from a public to private clinic. We still see the clinic in the univaf API but not in the PrepMod API. We have seen a similar bug twice before.

We just had the clinic changes from Public to Private around 12:30pm, 11/10/2021

The clinic is for Sullivan Arena and here is the PrepMod link: https://myhealth.alaska.gov/appointment/en/client/registration?clinic_id=5068

univaf_url <- "https://getmyvax.org/api/edge/locations.ndjson?source=univaf-prepmod&state=AK" (Showing up in this URL) univaf_url_2 <- "https://getmyvax.org/api/edge/locations.ndjson?source=univaf-prepmod&state=Alaska"

The clinic is now private but is showing up in the Univaf API under id: 76b6d85e-dc2b-413e-9b9f-3ea4f02f2072

It is not showing up in the PrepMod API: locations_url <- "https://myhealth.alaska.gov/api/smart-scheduling-links/locations.ndjson"

People can't sign up for clinic through PrepMod, but the challenge we are trying to solve is to not display private clinics and their addresses.

Please let us know if you need additional info.

Mr0grog commented 3 years ago

@brendanbabb This should be fixed for PrepMod once #460 lands.

Mr0grog commented 3 years ago

These locations should now all be hidden, and continue to get hidden or shown automatically based on their current status in the PrepMod API.

Mr0grog commented 1 year ago

Closing this as no longer relevant for the remaining sources.