-
Notifications
You must be signed in to change notification settings - Fork 45
Normalized Location Schema
If you are writing the normalize stage in python then you can use the Pydantic schema objects specified in vaccine_feed_ingest_schema.location
.
Schema is intended to encode the aspects of a location that are stable at at least a daily level. It is not intended to record anything that changes more frequent than daily like appointment slots available.
{
id: str as required unique stable id formatted as <source>:<id> e.g. vaccinespotter:7382088
name: str as display name of location providing vaccine,
address: { # all fields are optional
street1: str as required street address e.g. 111 First Ave.,
street2: str e.g. Apt #1,
city: str as required city e.g. Oakland,
state: str as required capital state initials e.g. CA,
zip: str as required 5 digit zip-code e.g. 94607,
},
location: {
latitude: float,
longitude: float,
},
contact: [
{
contact_type: str as contact type enum e.g. booking
phone: str as phone number with area code in format (###) ###-###,
website: str as website with https prefix e.g. https://facility.com/clinic,
email: str as email address e.g. [email protected],
other: str as free form text e.g. instructions to sign-up in person,
},
...
],
languages: [
str as ISO 639-1 code for languages spoken e.g. en,
...
],
opening_dates: [
{
opens: str as date that facility opens in iso8601 format e.g. 2021-04-15,
closes: str as date that facility closes in iso8601 format e.g. 2021-06-15,
},
...
],
opening_hours: [
{
day: str as lowercase day of week e.g. monday,
opens: str as time with facility opens on this day in format hh:mm,
closes: str as time with facility closes on this day in format hh:mm,
},
...
],
availability: {
drop_in: bool as flag indicating patients can arrive without an appointment,
appointments: bool as flag indicating patients can schedule an appointment,
},
inventory: [
{
vaccine: str as vaccine type e.g. pfizer,
supply_level: str as supply level enum e.g. more_than_48h,
},
...
],
access: {
walk: bool as flag indicating if patients can arrive by walking,
drive: bool as flag indicating if patients can arrive by driving,
wheelchair: str enum of yes, full, partial, no indicating level of service for patients arriving by wheelchair,
},
parent_organization: {
id: str as parent organization enum running facility e.g. rite_aid,
name: str as display name of parent organization running location e.g. Rite Aid,
},
links: [
{
authority: str as authority enum e.g. rite_aid or google_places,
id: str as id used by authority to reference this location e.g. 4096
uri: str as uri used by authority to reference this location
},
...
],
notes: [
str as free form text with information about location,
...
],
active: bool as flag indicating if this location is currently active or is historical,
source: {
source: str as source type enum e.g. vaccinespotter,
id: str as source defined id e.g. 7382088, # Note that this is _different_ from the overall id on the record
fetched_from_uri: str as uri where data was fetched from,
fetched_at: str as iso8601 datetime (when scraper ran),
published_at: str as iso8601 datetime (when source claims it updated),
data: {...parsed source data in source schema...},
},
}
Used in contact.contact_type
- booking: For contact information used to book an appointment
- general: For contact information used to learn general information about facility
Used in opening_hours.days
- monday
- tuesday
- wednesday
- thursday
- friday
- saturday
- sunday
- public_holidays
Used in inventory.vaccine
- pfizer_biontech
- moderna
- johnson_johnson_janssen
- oxford_astrazeneca
Used in inventory.supply_level
- out_of_stock
- in_stock
Used in access.wheelchair
- yes - feed indicates there is wheelchair access not sure about level of service
- full - feed indicates there is full wheelchair access
- partial - feed indicates there is partial wheelchair access
- no - feed indicates there is no wheelchair access
Used in parent_organization.id
Organizations that have multiple sites that are grouped under the same parent organization. Also called providers in some feeds.
If there is not an existing enum value for an organization then create one as a lowercase name with non-alphanumeric characters replaced with underscores. If provider also has an authoritative id for this location then use the same enum value for both here and in links
field.
- rite_aid
- walgreens
- walmart
Used in links.authority
Organizations, products, websites, etc. that provide an identifier for this specific facility. This is used to match facilities between multiple feeds.
If there is not an existing enum value for an authority then create one as a lowercase name with non-alphanumeric characters replaced with underscores.
- rite_aid
- walgreens
- google_places
- vaccinespotter
- vaccinefinder
{
"id": "45748",
"name": "Rite Aid #05952",
"address": {
"street1": "1991 Mountain Boulevard",
"city": "Oakland",
"state": "CA",
"zip": "94611",
},
}
{
"id": "45748",
"name": "Rite Aid #05952",
"address": {
"street1": "1991 Mountain Boulevard",
"city": "Oakland",
"state": "CA",
"zip": "94611",
},
"location": {
"latitude": 37.8273167,
"longitude": -122.2105179,
},
"contact": [
{
"contact_type": "booking",
"website": "https://www.riteaid.com/pharmacy/covid-qualifier",
},
{
"contact_type": "general",
"phone": "(510) 339-2215",
"website": "https://www.riteaid.com/locations/ca/oakland/1991-mountain-boulevard.html",
},
],
"availability": {
"appointments": true,
"drop_in": false,
},
}
- Find an issue you'd like to help out with
- Set up a development environment
- Read up on how our pipeline works
- Run the pipeline locally
Some pre-built tools to help fetch or parse common data types