-
Notifications
You must be signed in to change notification settings - Fork 1
Mechanism for populating new location vaccines_offered/accepts_appointments/accepts_walkins from VaccineFinder #504
Comments
I think the way I'm going to do this is to allow special cases for imported source locations: essentially a way to say "if a source location is imported or updated, AND the source is |
Why do we need to special-case this? I thought the goal for this design was to work no matter what the data source is -- will we need to build custom logic for each source? |
Yes, we'll need custom logic for each source because the way they present this data in their JSON is going to be different for each one. |
Hmm. That surprises me from what @rajbot / @bryanculbertson were saying on Monday; I had thought we had a standard way of storing the data that we could draw from, no matter the source. Or maybe it's one thing for VF data and another thing for everything else? |
Huh, my mistake! Looks like we do indeed have a standard mechanism defined in https://github.com/CAVaccineInventory/vaccine-feed-ingest-schema/blob/b342937b944ef477fee11512448be39181c1bfb5/vaccine_feed_ingest_schema/location.py#L402-L411 That's good, I shall implement code so that any source location that is imported which includes those fields is used to update the relevant fields on the |
|
|
Relevant schema snippets: class Availability(BaseModel):
"""
{
"drop_in": bool,
"appointments": bool,
},
"""
drop_in: Optional[bool]
appointments: Optional[bool]
class Vaccine(BaseModel):
"""
{
"vaccine": str as vaccine type enum,
"supply_level": str as supply level enum e.g. more_than_48hrs
}
"""
vaccine: VaccineType
supply_level: Optional[VaccineSupply] |
This work will now happen in #650. |
Follow-on from #494. We now have these new fields on
Location
:vial/vaccinate/core/models.py
Lines 223 to 234 in 2347336
We plan to initially populate these from VaccineFinder data, then later populate them from potentially other sources as well.
The text was updated successfully, but these errors were encountered: