2017-12-18

Health

My son has this idea!

The ideas is that packaging for products should not just have the usual standardised set of nutritional contents, but a QR code* including them directly in an off-line machine readable format.

The concept is that third party apps or standard health apps in a phone can work with these for dieting and general health data. I am sure Slimming World, or Fat Fighters, would love this to include in their apps, for example.

The basic idea is a standard for the product name, the package size (g), the serving size (g), and nutritional information (per 100g) to be included in a simple format that can be easily scanned directly, probably a VCARD style to keep it compact.

Quote from my son... "Getting what you want from subway on MyFitnessPal is a fucking nightmare"... "because cheese"... So Subway receipts that know what you asked for could include the QR code!

But obviously the QR code could ideally include a set of standard allergens as well, or should I say ALLERGENS to fit with current labelling style. Even so, the app could know which you have an issue with and flag it up in nice red flashing text and a klaxon sound when scanned.

Now, if this was a QR code with a link that served a MIME type then it would make sense as a RFC under IETF, but it probably is far better for this to work off-line as well, and actually contain the data. To me that sounds like a European Standards thing or an International Standards thing.

I think we'd be happy to work on the formal definition, after all the list of allergens and standard nutritional information categories already exist - they just need encoding in some simple and well defined format.

The question is, how do we do this? What agency do we poke and how do we progress it?

* I say QR code, i.e. IEC18004 as that seems to have won the battle of 2D codes over IEC16022, which is a shame, but that is not really important here. Let's go for a QR code.

Update:

Someone suggested we propose a specification, so here is a start (here).


20 comments:

  1. I would find that immensely useful. I've been tracking food with MyFitnessPal this year and it's a pain to have to input everything manually. You can scan the item's UPC and get crowd-sourced data, but the quality of the crowd-sourced data is bad enough that I stopped using that almost immediately.

    I can see how the standardisation would be tricky, because food labelling is regulated, obviously, so the bodies that are involved are making regulations (you must do this) rather than standards of the IETF kind (here's a useful thing you can adopt if you want) and that process is presumably very political. So perhaps it'd be best to just ignore those bodies and follow the model of JSON, RSS, etc. and just publish an open spec and some simple tools and try to get apps and food producers to adopt it?

    Someone like MyFitnessPal would surely recognise the utility of the format, and it would be quite natural for them to add scanning ability to the barcode scanning part of their app, but to start with you could make an app that scans your code and uses the MyFitnessPal API to add the data to the user's food diary.

    ReplyDelete
  2. There's already a unique bar code on the package which is read by the till. Surely what is needed is a requirement for the manufacturers to be required to publish the data you've suggested to a database that can be accessed by an App reading that bar code.

    ReplyDelete
    Replies
    1. That is only useful on line and many apps have tried this and the data is incomplete and sometimes inaccurate.

      Delete
  3. It would be pretty handy if the expiry date/s were in a machine readable format too, though in practice that's a much bigger change than you're proposing.

    ReplyDelete
    Replies
    1. Indeed, may make sense to define a format for it, but it would mean custom barcode rather than just part of label design.

      Delete
  4. You're going to need a country identifier too. These labels have different definitions in different countries. For example in the UK we list carbohydrate and fibre separately under those labels. In the US carbohydrates includes both of those under that label because they define it differently. Without knowing the country of the product an application that reads a value for C, for example, cannot use the data reliably.

    ReplyDelete
    Replies
    1. Done. I am making an assumption that EU has consistent definitions at this point.

      Delete
    2. In the US they also have a label for added sugar and there are other differences. Look at some example images to get the idea of what needs including. There are plenty of reference pdfs for the labelling legislation and guidelines in the EU (and I think Canada) and the US.

      This is a nice idea, it would be worth approaching MyFitnessPal, WeightWatchers, perhaps diabetes orgs, explain the value and see if they can get behind the idea. And approach the relevant government body, since I've heard about plans to improve labelling further to highlight sugar and portion size, so perhaps if a change is coming it's a good time to take this on board.

      If James is using MFP to watch what he eats, don't obsess over every calorie or gram. Even when stuff isn't accurate it's usually good enough to work out an estimate and enter that. Also watch out for this very problem of people explaining how to calculate something from the label - often they're in the US and the calulations don't work here.

      Delete
  5. Oats are not, in themselves, gluten-containing. However, they're often contaminated by machinery which has been used to harvest other cereals. Gluten-free oats exist.

    Missing things from the spec, which are often found on allergy warning:

    "May also contain "
    "Produced in a factory that handles "

    If you're going to include Halal in the flags, you should probably also have:

    Kosher
    Kosher for Passover

    I wouldn't be calling this version 1.0 of the specification until you've talked to Allergy UK, Coeliac UK, and whole bunch of other organisations. 0.1, maybe.

    ReplyDelete
    Replies
    1. Not sure how far one goes with allergen detail to be honest - I picked the main categories of the food standards site. And yes, I had added Kosher already (apologies for missing that the first time), and had not realised Kosher for Passover was separate, I'll add that.

      Delete
  6. Oh, and you might want a flag to distinguish a product as Gluten Free (or similar), where the manufacturer asserts that it is, possibly with the support of an organisation such as Coeliac UK, as opposed to merely having no gluten-containing ingredients.

    ReplyDelete
    Replies
    1. Indeed, I am wondering if the flags and allergens would better being one thing with + or - asserting presence, or asserting absence, or not making any claim. If I did that, then $ (running our of characters here!) could be for "may contain / trace / same factory" perhaps.

      Delete
    2. OK some changes made... Leaving $ for allergen, but allowing +/- for trace/free.

      Delete
  7. I'm not sure you can say "trace", "may contain" and "same factory" (or kitchen, if it's a restaurant, or sandwich bar) are the same thing.

    You've already got . for trace (eg F. for trace fats).

    ReplyDelete
    Replies
    1. Well I am learning. I don’t have an allergy, but how does someone that has an allergy respond to each of those? Surely someone with a minor allergy (eg discomfort) would happily take a risk for any of those but someone with a severe allergy (drop dead) would avoid even trace / risk indications. Where are the differences for each of those - interested to know.

      Delete
    2. "It depends".

      I don't have an allergy myself; my knowledge of this comes from my wife, who has coeliac disease (apparently not an "allergy" but an "autoimmune disorder") and my son who has a mild egg allergy.

      For gluten, there are two standards - "gluten free" means less than 20ppm, and "very low gluten", less than 100ppm. There's no "trace amount" standard.

      There is also gluten-free wheat starch, which is wheat starch that has had the gluten removed. So it's possible for food to contain wheat but not gluten, though it tends to be in the "very low gluten" category. Some people are fine with it, others not.

      For foods, my wife buys "free from" substitutes for things which would normally contain gluten (bread, cake, biscuits, oats) but otherwise buys normal foods, checking the ingredients and rejecting anything which contains wheat, barley or rye. "May also contain" and "made in a factory" products generally indicate a risk of contamination from manufacturing processes (eg, some chocolate bars are apparently made in giant slabs and cut with blades which are lubricated with flour), because the same equipment is used to make multiple products, or because wheat is present somewhere in the building. For these products, Coeliac UK has a handbook and website which gives further information on whether or not the food is safe to eat (eg, because they've tested it or verified how it's made). She will tend to reject anything in the "may contain"/"made in a factory" category which has not been cleared by Coeliac UK.

      For eating out and takeaways, we use allergy information which restaurants are obliged to produce, and take a view on whether or not we think the staff appear to understand the problem, whether there are specific gluten-free options, and whether or not Coeliac UK have endorsed the restaurant. That's only backfired once. Of course, since the risk to her is severe gastrointensinal unpleasantness (both ends) followed by a few weeks of feeling unwell, as opposed to dropping down dead, the concerns are not the same as they are for someone with anaphalaxis.

      Conversely, if my son eats eggs, he goes red around the mouth, vomits until he's dry heaving, and is fine an hour later. He's been tested and has an egg allergy, but we've also been asked to give him factory produced cake (as there's less egg protein and it's better cooked), which he is fine with.

      So, the short answer is "it's very complicated", and that's only for the two non-life-threatening allergies I have indirect experience of. I think the realy long answer will have to come from specialist organisations who deal with this sort of thing.

      Delete
  8. There has been for some years now the devlopment of a centralised supply chain database for product information - everything from nutrutional information and dimentions to packaging waste etc.. I was orginaly involved in it when it was called OFSCI (Optimum food supply chain initiative). It's now essentialy run by GS1 - the organisaion that manages EAN barcodes - and is called Product DNA Hub https://www.gs1uk.org/productdnahub

    This database basicaly contains the information your trying to fit into your coding structure and is referenced via the EAN number of the product

    ReplyDelete
    Replies
    1. And knowing how GS1 work, I am sure it is free to access?!?!?

      Delete
  9. There's also Erudus (aimed more at foodservice than retail but there's a lot of crossover). Also very not free to access.

    I'd also reinforce the need for a 'may contain'.

    ReplyDelete
  10. The problem of course is that the "portion sizes" quoted on food labels are usually about half what I consider a portion...

    ReplyDelete

Comments are moderated purely to filter out obvious spam, but it means they may not show immediately.

Fun with... LED Strips

I am not late to the party here, honest. I have been playing with these for some time, and even design and make LED controllers. The ubiquit...