Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow RestrictedDiet to be a property of Person #1996

Open
edent opened this issue Jul 5, 2018 · 7 comments

Comments

@edent
Copy link

@edent edent commented Jul 5, 2018

As a vegetarian, I want to be able to record my dietary preferences in a semantic way.

According to https://schema.org/RestrictedDiet, it is only valid on MenuItems
& Recipes:

Indicates a dietary restriction or guideline for which this recipe or menu item is suitable, e.g. diabetic, halal etc.

I'd like to say that I am a vegetarian. Something like:

<div itemscope itemtype="http://schema.org/Person">
   My name is <span itemprop="name" >Terence Eden</span>, 
   I was born on <span itemprop="birthDate">1901-02-29z</span>, 
   I live in <span itemprop="address" itemscope itemtype="http://schema.org/PostalAddress"><span itemprop="addressLocality">Oxford</span></span>
   and I am a <span itemprop="RestrictedDiet" itemtype="https://schema.org/VegetarianDiet">vegetarian</span>.
<div>
@edent

This comment has been minimized.

Copy link
Author

@edent edent commented Jul 1, 2019

How can I help add a new property to Person? In this case dietaryPreference with allowed values of RestrictedDiet

@edent

This comment has been minimized.

Copy link
Author

@edent edent commented Dec 2, 2019

As discussed, some use-cases:

  • On a social network, it might be nice to have an (optional) feature where people give their dietary preferences.
  • A social network could filter out pork casserole recipe posts for people with Kosher / Halal diets.
  • On a personal website, I want to inform other people that I have a dietary restriction.
  • My address book might suggest a restaurant which caters for my guests' preferences.
  • An encyclopædia can show dietary restrictions of famous people.
  • An airline could - with permission - read your social profile to select your meal for a flight.

Essentially, this allows for the matching of a MenuItem and Recipe to a Person.

@rbairwell

This comment has been minimized.

Copy link

@rbairwell rbairwell commented Dec 2, 2019

It'll need to allow for multiple entries such as glutenIntolerant,vegetarian,nutAllergy,pork.

I think it'll probably be better to explicit list of items - possibly with classifications "must avoid" (i.e. life threatening allergies such as nuts and people who are actually celiac) and "strong preference to avoid" (i.e. "meat", gluten) and "would prefer to avoid" (I personally don't like tuna and would prefer a meal without it, but would eat it if it was one of the few things on offer).

@emirpprime

This comment has been minimized.

Copy link

@emirpprime emirpprime commented Dec 2, 2019

As @rbairwell touches on - I think it's worth remembering this is essentially part of a spectrum that starts with likes/dislikes (preference) and ends with life threatening allergies (medical). That's not to say they have to be solved simultaneously - but that they could be, and or could overlap.

Saying that I don't have a solution to offer, but do agree that the proposal here from @edent seems like a good start that will cover a large number of uses.

Musing only on allergies, especially as it's off topic for the ticket, perhaps medicalExclusion and medicalRequirement with values from recipeIngredient and ?substance? (the range involved is significant..)

@pigsonthewing

This comment has been minimized.

Copy link

@pigsonthewing pigsonthewing commented Dec 2, 2019

+1 to the general idea.

Dietary issues can also be transient (e.g. no alcohol while I'm on these antibiotics/ until I reach my target weight) - so an "end date" attribute might be useful.

@benjystanton

This comment has been minimized.

Copy link

@benjystanton benjystanton commented Dec 3, 2019

Use case: As a meet-up organiser I want to know the dietary preferences of the people who are attending, so that I can serve vegetarian options, or provide alcoholic drinks.

@rbairwell

This comment has been minimized.

Copy link

@rbairwell rbairwell commented Dec 3, 2019

Use case: When looking for recipe ideas, I would want to filter possible recipes to exclude "must avoid" items for myself/family members, demote recipes which match peoples "preferences" and ideally promote recipes which match peoples preferences.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.