openreferral / specification

The Human Services Data Specification - a data exchange format developed by the Open Referral Initiative
https://openreferral.org
Other
117 stars 50 forks source link

Multiple opens_at / closes_at times within schedule? #175

Closed greggish closed 11 months ago

greggish commented 7 years ago

via @derekfidler's comment on our ReadTheDocs:

We've found from working with shelters and other services for the homeless that many services have multiple opens_at and closes_at times within a single day. We've created multiple opens_at/closes_at for each schedule.

Not sure if this would be a schema change or if there can just be guidance in the definition.

rasmus-storjohann-PG commented 6 years ago

We will definitely need this once we expand to the middle east where my understanding is that businesses often close at lunch.

rasmus-storjohann-PG commented 6 years ago

I was doodling on what a wire representation might look like, supporting both the time range of applicability and multiple opening hours in the same day. Need better names for the two "hours" nodes. I also realize that using the wire format as part of the discussion of the storage spec is a little backwards, but I think this outlines what I think our use case will be.

Example:

schedule: [
    {
        applies_from_date: 2017-12-10,
        applies_until_date: 3000-12-31,
        hours: [
            {
                weekdays: ["Mo", "We", "Fr"],
                hours: [
                    {
                        open_from_time: 09:00,
                        open_until_time: 13:00
                    },
                    {
                        open_from_time: 16:00,
                        open_until_time: 21:00
                    }
                ]
            },
            {
                weekdays: ["Sa", "Su"],
                hours: [
                    {
                        open_from_time: 10:00,
                        open_until_time: 17:00
                    }
                ]
            }
        ]
    }
]
timgdavies commented 6 years ago

Schema.org has a good terse approach openingHours which we should explore.

From their docs:

This doesn't allow HSDS to handle the question of 'will the service be open on X day three weeks in the future' - but I'm not certain we should try and capture that - as that is something that systems will vary in their capacity to cope with. Instead, we might want to see a responsible system consuming data (a) checking back regularly with the authoritative source to see if the latest current opening hours have changed; (b) advising users on when it was last updated.

timgdavies commented 6 years ago

This is also related to #167

mrshll1001 commented 11 months ago

Closing, as I believe this has been addressed in #167 with the adoption of RRULE allowing for multiple different opening and closing times.