Skip to content
This repository has been archived by the owner on Jun 1, 2022. It is now read-only.

Initial attempt at a data model and API for capturing availability. #50

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

nschiefer
Copy link
Contributor

@nschiefer nschiefer commented Mar 5, 2021

This is a first attempt at representing appointment availability in our data model/API. It is meant to be half-prototype and half-discussion piece.

  • Models for representing availability reports and availability windows.
  • REST API endpoint for writing those availability reports.
  • Basic test that the API endpoint works.

To see an example of how this API interacts with a prototype scraper (for Curative), see https://github.com/CAVaccineInventory/vaccinebot/pull/74.

- Models for representing availability reports and availability windows.
- REST API endpoint for writing those availabiltiy reports.
- Basic test that the API endpoint works.
@nschiefer nschiefer force-pushed the availability-report branch from 78a4071 to 6b6ac30 Compare March 5, 2021 00:43
@nschiefer
Copy link
Contributor Author

Tests are failing because I'm not sure how to set environment variables in our CI system.

@obra
Copy link
Member

obra commented Mar 5, 2021

Are you thinking that we're going to want to show exact, specific appointment windows on the website in the near future? Or is the goal more of ">x appointments available in y timeframe, last verified 27 minutes ago"?

@nschiefer
Copy link
Contributor Author

For the website, I think that we should do something like the latter (probably binned by day or maybe even week?). But, I would like the data recorded in the highest fidelity that we can (for analysis, and so that we can change our minds, and to make the job of the scraper easier), and the binning to be done on the data-publication side.

@nschiefer
Copy link
Contributor Author

Or, put another way, I want x and y to be determined by the data-publication team, rather than the scraper team.

@obra
Copy link
Member

obra commented Mar 5, 2021

That is a very reasonable choice :)

Are you thinking that availability reports are the representation of availability or that we would eventually be creating our own representation of appointment availability and that the 'reports' would feed into that? (Does that question even make sense?)

@nschiefer
Copy link
Contributor Author

My plan was to use the availability reports as the representation of availability and then generate the relevant view with a query. I don't have any objection to materializing some objects for this (akin to PublishedReport) but I don't see a reason to do that so far.

@obra
Copy link
Member

obra commented Mar 5, 2021 via email

@obra obra marked this pull request as draft April 16, 2021 05:47
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants