An extensive search lasting several seconds turned up nothing that precisely matches this, so ...
Food containers for perishable items that have RFID tags that activate only when the packaging is opened.
Example: A carton of UHT milk.
The milk sits on a storage shelf at ambient temperature for
It is then opened (automatically activating the RFID tag), a portion is used, and the package closed and placed in the refrigerator.
The smart* refrigerator "sees" the tag and notes a new container of milk.
If after (for example - user configurable) three days the refrigerator is still "seeing" the milk, it warns "MILK - 3 DAYS" on its display (and reports via WiFi to the user's phone, pc, TV, and via the Internet to Big Brother).
After five days it starts to warn about "MILK GONE BAD".
The most important point is that the system is entirety automatic. The refrigerator does not need to be shown a barcode, or taught an expiry date. Just open the pack, and put it in the fridge; the system does everything else without user intervention.
*for a given value of "smart".