06 — Shopping & Coordination Module
Complete Product Specification
Section titled “Complete Product Specification”Version: 1.20
Last Updated: 2026-08-06 13:58:52
Status: Implemented in this repository (API +
/shoppingUI + SSE sync + super-admin catalog). Treat this document as the behavioural and UX spec; where the app differs, 02-REQUIREMENTS.md §3.8, §7.9 and the code win.Master requirements: 02-REQUIREMENTS.md · Tier: Complete only (
backend/billing/tiers.json) · Phase: 04-ROADMAP.md Phase 7 (delivered)
Supersedes: 06-SHOPPING-ESSENTIALS-MODULE.md (retired)
Module slug: shopping
Implementation notes (code vs original spec)
Section titled “Implementation notes (code vs original spec)”| Topic | In code |
|---|---|
| Core lists + catalog + SSE | Done — routers/shopping.py, services/shopping_service.py, frontend/src/pages/Shopping.tsx |
| Recurring reset | Done — APScheduler 06:00 per tenant timezone |
| Super-admin catalog | Done — routers/admin_shopping.py, /admin/shopping-catalog |
| Dashboard / shift widgets | Done — ShoppingDashboardWidget wired in Dashboard.tsx (self-gates on shopping module). ShoppingShiftWidget remains optional on shift detail. |
Calm Care UI (/shopping) | Done (2026-05-30) — Calm Care migration per 03-DESIGN-SYSTEM.md §8. Active list: horizontal ShoppingListRow inside cc-card. Desktop: inline ± quantity, sage purchase check, remove. Mobile (≤639px): single-line row — swipe right → Purchased, swipe left → Remove (SwipeActionRow); tap qty pill for ± sheet. Catalog browse + search: AddItemsSheet bottom sheet (mobile FAB + desktop dashed “Add items”). List tabs: cc-chip row. Purchased before: collapsed by default (PurchasedSection); expanded strip uses PurchasedTile (same proportions as CatalogItemTile). Legacy ShoppingItemCard tile grid retained for unit tests only. List tab state (2026-05-31): Shopping.tsx reconciles activeListId after every list fetch and resets on patient change — prevents 404 item fetches when a list was deleted elsewhere. Catalog icon rendering (2026-06-01): IconResolver treats browser-cached raster assets as ready when img.complete && naturalWidth > 0 (cached images may not fire onLoad). Catalog picker surfaces pass loadPriority="eager" (CatalogItemTile, PurchasedTile, CategoryBrowser) — prevents blank gray pulse placeholders on product tiles in AddItemsSheet. |
| Custom product photos | Done — POST/GET/DELETE …/items/{id}/image; catalog/suggestion photo routes; files in UPLOADS_DIR/<tenant_id>/ via services/images.py (save_shopping_item_image(..., tenant_id)). Served only through authenticated routes — not static /uploads. Stale reference self-heal: if GET …/image finds photo_url set but the file is missing on disk, repositories/shopping.clear_stale_photo_url clears that filename for the tenant and returns 404; list rows and tiles fall back to the catalog icon and drop the stale URL from local state. |
Table of Contents
Section titled “Table of Contents”- Vision & Purpose
- Deployment Modes
- Subscription & Monetisation
- List Types & Category Architecture
- The Three-Tier Catalog
- User Roles & Permissions
- Item Lifecycle
- UX & Interaction Model
- Real-Time Sync
- Community Contribution & Catalog Moderation
- Database Schema
- API Design
- Backend Architecture
- Integration with LynCareOS Modules
- Implementation Task Breakdown
- Localisation & Internationalisation
- Expanded Catalog — Full Item Reference
1. Vision & Purpose
Section titled “1. Vision & Purpose”The Shopping & Coordination module is a shared, real-time, needs-coordination tool for everyone supporting a care recipient. It answers one operational question at any moment:
“What does our person need, who is getting it, and has it been sorted?”
Unlike a grocery app, this module coordinates across multiple shoppers acting simultaneously at different locations. If ten items need buying, five people can each grab two from wherever they happen to be. Every purchase is visible to everyone else the moment it happens.
The module is not a pharmacy system. Prescriptions and medication restocking are a separate list context from groceries. Services (cleaning, physio) are a separate context from physical products. Lists are purposefully separated by context so no one is looking at milk and morphine in the same view.
Core principles
Section titled “Core principles”- One click to add. If an item has been bought before, it appears in “Used Before” — one tap re-adds it with the same quantity and unit as last time.
- One action to purchase. Desktop: visible sage tick on every active item. Mobile: swipe right to reveal Purchased and commit (item leaves the active list).
- One click to remove. A visible remove icon on every active item. Separate from purchased.
- Real-time for everyone. When any user purchases or adds an item, every other connected user’s list updates within seconds.
- Lists are separate contexts. Grocery, pharmacy, and services lists do not share items or views.
2. Deployment Modes
Section titled “2. Deployment Modes”The module runs in two distinct tenanting modes depending on deployment context.
Mode A — Integrated (LynCareOS)
Section titled “Mode A — Integrated (LynCareOS)”Lists are patient-scoped. Each list belongs to a specific patient being cared for. A user who supports two patients manages separate list sets for each.
Tenant (care organisation / family) └── Patient: Mrs Thompson ├── List: Weekly Groceries ├── List: Chemist Run └── List: Home ServicesAccess to a patient’s lists is controlled by patient_access — the same row that governs who can view that patient’s medications and shifts. All existing LynCareOS auth and isolation patterns apply without modification.
Mode B — Standalone
Section titled “Mode B — Standalone”Lists are tenant-scoped (household-level). There is no patient record — the tenant itself is the owner.
Tenant (household) ├── List: Weekly Groceries ├── List: Chemist Run └── List: Cleaning SuppliesIn standalone mode, all tenant members have access to all lists. The patient_id column on every shopping table is NULL. The API URL structure changes from /api/patients/{id}/shopping/... to /api/shopping/... at the tenant level. No other code changes are required.
How the codebase handles both modes
Section titled “How the codebase handles both modes”shopping_lists.patient_id is nullable. A DB check constraint enforces that in Mode A it is set and in Mode B it is null. The application layer detects mode from the subscription context flag standalone_mode on the tenant record. API handlers branch on this flag to determine whether to enforce patient_access checks or tenant-level membership checks.
Mode B status: not built in this repository. The separate product GetQwikShop (www.getqwik.shop) is being built at D:\Projects\GetQwikShop — see debt D4. Canonical design/plan live in that repo’s docs/superpowers/. LynCareOS historical note only. Building Mode B inside LynCareOS is not part of that effort.
3. Subscription & Monetisation
Section titled “3. Subscription & Monetisation”Subscription slug: shopping
Section titled “Subscription slug: shopping”The shopping module slug already exists in subscriptions and the MODULES tuple in database.py. No schema migration is needed for the subscription gate itself.
Subscription states
Section titled “Subscription states”| State | Behaviour |
|---|---|
Active (includes shopping) | Full access to all lists, catalog, and real-time sync |
Active (without shopping) | Shopping nav item visible with lock overlay; tapping shows upgrade prompt |
| Trial | Full access; trial countdown banner shown at top of shopping screens |
| Expired | All lists read-only; no add/purchase/remove; expired banner shown |
| Standalone subscription | Tenant subscribes to shopping only; no clinical modules required |
Pricing model note
Section titled “Pricing model note”The shopping module is independently purchasable without any clinical modules. A household with no care needs can subscribe to shopping-only. This is enforced at the subscription level — require_module('shopping') has no dependency check on medication_dispensing or care_calendar.
4. List Types & Category Architecture
Section titled “4. List Types & Category Architecture”4.0 Visual icon system
Section titled “4.0 Visual icon system”Every catalog item, subcategory, and category carries an emoji as its primary visual identifier. Emoji are device-rendered, require no download, work on every platform, and are universally understood regardless of the user’s reading language. They are the first-phase icon strategy.
Each item tile in the Add panel displays:
┌────────────┐│ 🥑 │ ← large emoji (32–40px)│ Avocado │ ← localised display name└────────────┘The icon field on catalog_items stores the emoji character directly (e.g. 🥑). If an item has no emoji of its own, it inherits its subcategory’s emoji; if the subcategory has none, it inherits the category’s emoji. This three-level fallback ensures every item always has a visual identifier.
Phase 8 enhancement: The icon_type field ('emoji' | 'svg' | 'url') allows a future migration from emoji to custom SVG illustrations without changing the data model or API contract. The frontend renders based on icon_type: emoji renders as a Unicode character; SVG loads from /icons/catalog/; URL fetches from a CDN. The Phase 7 build uses emoji exclusively.
Subcategory substitute rasters (visual families): When an item does not yet have its own dedicated raster asset (or the file is missing), the UI falls back to the subcategory’s icon_type / icon_value — a single shared illustration for the whole subcategory. Treat this as a visual family, not a literal picture of every SKU. Example: every milk type listed under Milk & Alternatives (full cream milk, skim milk, almond milk, oat milk, soy milk, etc.) can share one milk bottle 3D asset on the subcategory row until per-item art exists. The same pattern applies elsewhere (e.g. one generic bread icon for all bread SKUs in Bread). Item-level icons still override when set.
4.1 List types
Section titled “4.1 List types”Each list has a list_type that determines its default category set and visual identity.
| List type slug | Display name | Default categories shown | Item types |
|---|---|---|---|
grocery | Groceries | Fruit & Veg, Meat & Seafood, Dairy & Eggs, Bakery, Pantry, Frozen, Drinks, Snacks | Products |
pharmacy | Pharmacy & Medical | Medications, Medical Supplies, Wound Care, Equipment & Aids | Products |
personal_care | Personal Care | Body Care, Hair Care, Oral Care, Clothing, Grooming | Products |
household | Household | Cleaning, Laundry, Paper Goods, Kitchen Supplies | Products |
services | Services | Home Care, Allied Health, Personal Services, Trades | Services |
equipment | Equipment | Mobility Aids, Bathroom Aids, Pressure Care, Communication Aids | Products |
general | General | All categories | Both |
A tenant can have multiple active lists of any type. A patient might have a “Weekly Groceries” list and a separate “Coles Run This Weekend” list — both of type grocery.
4.2 Base catalog category taxonomy
Section titled “4.2 Base catalog category taxonomy”The catalog is three levels deep: Category → Subcategory → Item. See Part 17 for the complete reference list. The tables below show the canonical structure with emoji icons and representative items.
Groceries 🛒
Section titled “Groceries 🛒”| Subcategory | 🏷 | Representative items |
|---|---|---|
| Fresh Fruit | 🍎 | Apple 🍎, Banana 🍌, Orange 🍊, Pear 🍐, Grapes 🍇, Strawberries 🍓, Blueberries 🫐, Raspberries, Blackberries, Watermelon 🍉, Rockmelon, Honeydew, Mango 🥭, Avocado 🥑, Lemon 🍋, Lime, Mandarin, Kiwifruit 🥝, Pineapple 🍍, Nectarines 🍑, Peaches, Plums, Cherries 🍒, Figs, Pomegranate, Dragon fruit, Lychee, Papaya |
| Fresh Vegetables | 🥦 | Potato 🥔, Sweet potato, Carrot 🥕, Onion 🧅, Red onion, Shallots, Spring onion, Leek, Garlic 🧄, Ginger, Broccoli 🥦, Cauliflower, Cabbage, Brussels sprouts, Zucchini, Eggplant 🍆, Capsicum 🫑, Chilli 🌶️, Corn 🌽, Asparagus, Green beans, Snow peas, Bok choy, Spinach, Kale, Silverbeet, Lettuce, Rocket, Beetroot, Pumpkin, Butternut pumpkin, Mushrooms 🍄, Celery, Fennel, Cucumber 🥒, Tomato 🍅, Cherry tomatoes, Radish, Parsnip |
| Salad & Herbs | 🌿 | Mixed salad leaves, Rocket, Coleslaw mix, Parsley 🌿, Coriander, Basil, Mint, Thyme, Rosemary, Dill, Chives, Lemongrass, Kaffir lime leaves |
| Pre-cut & Packaged Produce | 🥗 | Stir fry mix, Soup vegetables, Washed salad, Pre-cut fruit, Vegetable tray, Coleslaw pack |
| Deli & Charcuterie | 🧆 | Prosciutto, Pancetta, Mortadella, Pastrami, Smoked salmon slices, Roast chicken, Stuffed olives, Antipasto mix, Hummus tub, Tzatziki, Baba ghanoush |
| World Foods | 🌏 | Basmati rice, Jasmine rice, Sushi rice, Rice noodles, Udon noodles, Soba noodles, Ramen noodles, Coconut milk, Fish sauce, Oyster sauce, Hoisin sauce, Miso paste, Tahini, Harissa, Curry paste, Sambal, Sriracha, Nori sheets, Tofu, Tempeh, Edamame, Lemongrass, Kafir lime leaves, Garam masala, Sumac, Za’atar, Cardamom |
| Health & Organic | 🌱 | Chia seeds, Flaxseeds, Hemp seeds, Sunflower seeds, Pumpkin seeds, Activated nuts, Acai powder, Spirulina, Collagen powder, Protein powder, Nutritional yeast, Almond flour, Coconut flour, Oat milk, Almond milk, Coconut yogurt, Kefir, Kombucha, Apple cider vinegar, Coconut aminos, Organic honey |
| Specialty Dietary | 🔆 | Gluten free pasta, Gluten free bread, Gluten free flour, Gluten free oats, Dairy free cheese, Dairy free butter, Lactose free milk, Vegan sausages, Vegan mince, Vegan chicken, Plant-based burger patties, Tofu, Tempeh, Seitan, Chickpea pasta, Lentil pasta |
| Meat — Poultry | 🍗 | Chicken breast 🍗, Chicken thighs, Chicken wings, Chicken drumsticks, Whole chicken, Chicken mince, Turkey breast, Turkey mince, Duck breast, Quail |
| Meat — Beef | 🥩 | Beef mince 🥩, Beef steak, Eye fillet, Sirloin, Rump steak, Beef stir fry strips, Roast beef, Corned beef, Veal cutlets, Osso bucco |
| Meat — Pork & Lamb | 🥓 | Pork chops 🥓, Pork mince, Pork belly, Pork roast, Bacon, Pancetta, Ham, Prosciutto, Lamb chops, Lamb mince, Lamb roast, Lamb shanks, Rack of lamb |
| Processed Meats | 🌭 | Sausages 🌭, Chorizo, Salami, Pepperoni, Deli meats, Hot dogs, Kransky, Cabanossi |
| Seafood | 🐟 | Salmon 🐟, Tuna fillet, White fish fillets, Barramundi, Snapper, Flathead, Bream, Prawns 🦐, Shrimp, Crab 🦀, Mussels, Oysters 🦪, Scallops, Calamari, Octopus, Fish cakes, Fish fingers |
| Milk & Alternatives | 🥛 | Full cream milk 🥛, Skim milk, Reduced fat milk, Lactose free milk, A2 milk, Almond milk, Oat milk, Soy milk, Coconut milk, Rice milk, Macadamia milk, Hemp milk |
| Cheese | 🧀 | Cheddar 🧀, Mozzarella, Parmesan, Tasty cheese, Feta, Goat cheese, Brie, Camembert, Cream cheese, Ricotta, Cottage cheese, Haloumi, Colby, Edam, Gruyère, Swiss cheese, Blue cheese, Sliced cheese |
| Eggs | 🥚 | Free range eggs 🥚, Cage free eggs, Organic eggs, Barn laid eggs, Duck eggs |
| Butter & Spreads | 🧈 | Butter 🧈, Salted butter, Unsalted butter, Margarine, Spreadable butter, Ghee, Coconut oil spread |
| Yogurt & Dairy Desserts | 🫙 | Greek yogurt, Natural yogurt, Flavoured yogurt, Coconut yogurt, Dairy free yogurt, Custard, Rice pudding, Sour cream, Crème fraîche |
| Cream & Milk Products | 🍶 | Thickened cream, Light cream, Sour cream, Double cream, Condensed milk, Evaporated milk, Coconut cream, Buttermilk |
| Bread | 🍞 | White bread 🍞, Wholemeal bread, Multigrain bread, Sourdough, Gluten free bread, Rye bread, Spelt bread, Low-GI bread, Seeded bread |
| Bread Rolls & Buns | 🥖 | Bread rolls, Burger buns, Hot dog rolls, Bagels 🥯, Brioche rolls, Slider buns |
| Pastries & Sweet Bakery | 🥐 | Croissants 🥐, Danishes, Pain au chocolat, Scrolls, Donuts, Cinnamon rolls, Kouign-amann |
| Flatbreads | 🫓 | Wraps 🫓, Tortillas, Naan, Pita bread, Mountain bread, Lavash, Chapati, Roti |
| Cakes & Slices | 🧁 | Muffins 🧁, Cupcakes, Cake, Banana bread, Lamingtons, Brownies, Bliss balls, Protein balls |
| Rice, Pasta & Grains | 🍝 | White rice, Brown rice, Basmati rice 🍝, Jasmine rice, Sushi rice, Pasta, Spaghetti, Penne, Fusilli, Rigatoni, Fettuccine, Lasagne sheets, Orzo, Gnocchi, Noodles, Quinoa, Couscous, Bulgur wheat, Polenta, Rolled oats, Steel cut oats, Barley, Freekeh |
| Canned & Jarred Goods | 🥫 | Canned tomatoes 🥫, Tomato paste, Diced tomatoes, Crushed tomatoes, Canned beans, Chickpeas, Lentils, Black beans, Kidney beans, Canned corn, Canned tuna, Canned salmon, Canned sardines, Canned soup, Baked beans, Coconut cream, Passata, Capers, Artichoke hearts |
| Baking | 🫙 | Flour, Self raising flour, Wholemeal flour, Almond flour, Coconut flour, Sugar, Brown sugar, Icing sugar, Caster sugar, Raw sugar, Baking powder, Bicarb soda, Yeast, Vanilla essence, Vanilla bean paste, Cocoa powder, Chocolate chips, Desiccated coconut, Shredded coconut, Dried cranberries, Dried apricots |
| Oils, Sauces & Condiments | 🫒 | Olive oil 🫒, Extra virgin olive oil, Vegetable oil, Canola oil, Coconut oil, Sesame oil, White vinegar, Balsamic vinegar, Apple cider vinegar, Rice wine vinegar, Soy sauce, Tamari, Fish sauce, Oyster sauce, Hoisin sauce, Ketchup, Mustard, Dijion mustard, Mayonnaise, Chilli sauce, Sriracha, Worcestershire sauce, Tabasco, Sweet chilli sauce, Teriyaki sauce, Salad dressing, Caesar dressing |
| Spreads & Breakfast | 🍯 | Peanut butter 🍯, Almond butter, Cashew butter, Jam, Strawberry jam, Honey, Vegemite, Marmite, Nutella, Maple syrup, Marmalade, Tahini, Lemon curd, Cream cheese spread |
| Breakfast Cereal | 🥣 | Weetbix 🥣, Cornflakes, Muesli, Bircher muesli, Porridge oats, Granola, Bran flakes, Puffed rice, Cheerios, Coco Pops style, Bran buds |
| Spices & Herbs (dried) | 🧂 | Salt 🧂, Sea salt, Himalayan salt, Pepper, Black pepper, White pepper, Paprika, Smoked paprika, Cumin, Turmeric, Coriander powder, Garlic powder, Onion powder, Cinnamon, Nutmeg, Cloves, Cardamom, Star anise, Bay leaves, Oregano, Thyme, Rosemary, Basil, Mixed herbs, Curry powder, Garam masala, Chilli flakes, Cayenne pepper, Chinese five spice, Za’atar, Sumac, Saffron |
| Frozen Vegetables | ❄️ | Frozen peas ❄️, Frozen corn, Mixed vegetables, Frozen spinach, Frozen broccoli, Frozen edamame, Stir fry vegetables, Frozen chips, Frozen sweet potato fries |
| Frozen Fruit | 🧊 | Frozen berries 🧊, Frozen mango, Frozen tropical mix, Frozen raspberries, Frozen blueberries, Frozen dragon fruit |
| Frozen Meals | 🍕 | Frozen pizza 🍕, Ready meals, Frozen pasta, Frozen curry, Frozen stir fry, Frozen dumplings, Frozen spring rolls, Frozen pies, Frozen burritos |
| Frozen Protein | 🐓 | Chicken nuggets 🐓, Fish fingers, Frozen seafood, Frozen dim sims, Frozen schnitzel, Frozen fish fillets |
| Frozen Desserts | 🍦 | Ice cream 🍦, Gelato, Frozen yogurt, Ice blocks, Frozen waffles, Frozen cheesecake |
| Water | 💧 | Still water 💧, Sparkling water, Mineral water, Flavoured water, Coconut water |
| Juice | 🧃 | Orange juice 🧃, Apple juice, Pineapple juice, Mango juice, Cranberry juice, Tomato juice, Mixed juice, Vegetable juice, Cold pressed juice |
| Soft Drinks | 🥤 | Cola 🥤, Diet cola, Lemonade, Ginger beer, Ginger ale, Tonic water, Soda water, Kombucha, Sparkling water with flavour |
| Hot Drinks | ☕ | Instant coffee ☕, Ground coffee, Coffee beans, Coffee pods, Espresso pods, Decaf coffee, Black tea, English breakfast tea, Earl Grey, Green tea, Herbal tea, Chamomile tea, Peppermint tea, Hot chocolate, Chai, Milo |
| Energy & Sports Drinks | ⚡ | Sports drink ⚡, Energy drink, Electrolyte drink, Electrolyte powder, Protein shake, Hydration tablets |
| Alcohol | 🍺 | Beer 🍺, Craft beer, Lager, Stout, Wine 🍷, Red wine, White wine, Sparkling wine, Champagne, Rosé, Spirits 🥃, Whisky, Gin, Vodka, Rum, Tequila, Cider, Pre-mixed drinks |
| Chips & Savoury Snacks | 🍟 | Potato chips 🍟, Corn chips, Pretzels, Rice crackers, Popcorn 🍿, Vegetable crisps, Rice cakes, Puffed corn, Twisties style, Crackers |
| Biscuits & Sweet Snacks | 🍪 | Biscuits 🍪, Cookies, Crackers, Muesli bars, Fruit bars, Bliss balls, Protein bars, Rice cakes, Wafers, Shortbread |
| Chocolate & Confectionery | 🍫 | Chocolate block 🍫, Chocolate bar, Dark chocolate, Milk chocolate, White chocolate, Lollies, Gummies, Jelly beans, Candy canes, Hard candy, Toffee, Marshmallows, Turkish delight |
| Nuts & Dried Fruit | 🥜 | Mixed nuts 🥜, Almonds, Cashews, Walnuts, Pecans, Macadamias, Pistachios, Peanuts, Brazil nuts, Hazelnuts, Trail mix, Dried apricots, Raisins, Sultanas, Dried mango, Dried cranberries, Medjool dates |
| Dips & Antipasto | 🫙 | Hummus 🫙, Tzatziki, Guacamole, Baba ghanoush, Taramasalata, Olives, Sundried tomatoes, Marinated capsicum, Artichoke hearts, Caponata |
Pharmacy & Medical 💊
Section titled “Pharmacy & Medical 💊”| Subcategory | 🏷 | Representative items |
|---|---|---|
| Prescription Medications | 💊 | (free-text only — no pre-populated items for prescription privacy) |
| Over-the-Counter Medications | 💊 | Paracetamol 💊, Ibuprofen, Aspirin, Antihistamine, Antacid, Laxative, Antidiarrheal, Cough syrup, Cough lozenges, Throat lozenges, Nasal spray, Saline nasal rinse, Eye drops, Lubricating eye drops, Ear drops, Motion sickness tablets, Sleep aid tablets, Anti-nausea tablets |
| Pain Management | 🩺 | Paracetamol 500mg, Ibuprofen gel, Topical pain relief, Heat patches, Cold packs, TENS machine pads, Voltaren gel |
| Vitamins & Supplements | 💊 | Vitamin C, Vitamin D3, Vitamin B12, Vitamin E, Multivitamin, Fish oil, Omega-3, Iron supplement, Magnesium, Calcium, Zinc, Probiotics, CoQ10, Folic acid, Melatonin, Glucosamine, Collagen, Evening primrose oil |
| Diabetes Management | 🩸 | Blood glucose strips, Lancets, Insulin syringes, Insulin pen needles, CGM sensors, Alcohol wipes, Glucose tablets, Glucose gel |
| Cardiovascular Health | ❤️ | Blood pressure monitor batteries, Cholesterol supplements, Fish oil, Garlic supplement, CoQ10 |
| Respiratory Health | 😤 | Spacer device, Peak flow meter, Nebuliser mask, Saline solution, Steam inhaler, Ventolin (generic), Nasal strips |
| Eye & Ear Care | 👁️ | Lubricating eye drops 👁️, Antibiotic eye drops, Eye wash, Ear drops, Ear wax removal drops, Hearing aid batteries |
| Sleep & Mental Wellbeing | 😴 | Melatonin, Magnesium glycinate, Lavender oil, Sleep mask, Ear plugs, White noise machine |
| Wound Care | 🩹 | Adhesive bandages 🩹, Gauze dressings, Non-adhesive dressings, Wound closure strips, Hydrocolloid dressings, Foam dressings, Waterproof dressings, Antiseptic cream, Antiseptic solution, Saline wound wash, Compression bandage, Cohesive bandage, Surgical tape, Wound drainage bags |
| Continence Products | 🩱 | Disposable pads, Light pads, Heavy pads, Absorbent underwear, Pull-up pants, Tab-style briefs, Bed underpads, Waterproof mattress protector, Catheter leg bags, Catheter night bags, Catheter straps, Urinary drainage bags |
| Medical Consumables | 🧤 | Nitrile gloves 🧤, Latex gloves, Vinyl gloves, Disposable aprons, Syringes, Needles, Alcohol wipes, Sterile swabs, Cotton balls, Blood glucose strips, Lancets, Urine test strips, Stool collection kits, Pill organiser, Pill crusher, Medication cups |
| First Aid | 🚑 | First aid kit refill 🚑, Instant ice pack, Elastic bandage, Triangular bandage, Tweezers, Thermometer strips, Digital thermometer, CPR face shield, Trauma dressings, Burn gel, Blister plasters |
| Mobility Aids — Consumables | 🦯 | Walking frame tennis balls 🦯, Non-slip socks, Crutch tips, Crutch handles, Wheelchair cushion cover, Wheelchair arm pad, Rollator hand grips, Walking stick rubber tip |
Personal Care 🧴
Section titled “Personal Care 🧴”| Subcategory | 🏷 | Representative items |
|---|---|---|
| Body Wash & Soap | 🧴 | Body wash 🧴, Soap bar, Sensitive skin body wash, Moisturising body wash, Hand wash, Antibacterial hand wash, Bath salts, Bath oil, Shower gel |
| Hair Care | 💆 | Shampoo 💆, Conditioner, 2-in-1 shampoo, Anti-dandruff shampoo, Dry shampoo, Hair treatment, Hair mask, Leave-in conditioner, Hair colour, Hair ties, Bobby pins, Comb, Hair brush, Detangling spray |
| Oral Care | 🦷 | Toothpaste 🦷, Toothbrush, Soft toothbrush, Children’s toothbrush, Electric toothbrush heads, Dental floss, Interdental brushes, Mouthwash, Fluoride rinse, Denture adhesive, Denture cleaner, Denture tablets, Tongue scraper, Teeth whitening strips |
| Skin Care | 🌸 | Moisturiser 🌸, Face wash, Face cleanser, Toner, Serum, Eye cream, Sunscreen SPF50+, Sunscreen SPF30, Lip balm, Hand cream, Body lotion, After sun, Eczema cream, Sorbolene, QV cream, Cetaphil, Nappy rash cream |
| Sun Care | ☀️ | Sunscreen SPF50+ ☀️, Sunscreen SPF30, Kids sunscreen, Zinc sunscreen, Sunscreen spray, Lip balm SPF, After sun gel, After sun lotion |
| Grooming | 🪒 | Deodorant 🪒, Antiperspirant, Roll-on deodorant, Razors, Disposable razors, Razor blades, Shaving cream, Shaving gel, Shaving foam, Aftershave, Pre-shave oil, Tweezers, Nail clippers, Nail file, Emery boards |
| Men’s Grooming | 🧔 | Beard oil 🧔, Beard balm, Beard wash, Men’s moisturiser, Men’s face wash, Cologne, Men’s deodorant, Men’s razor, Shaving brush, Men’s hair gel, Men’s hair wax, Men’s hair clay |
| Feminine Hygiene | 🌺 | Pads 🌺, Night pads, Tampons, Panty liners, Menstrual cup, Period underwear, Feminine wash, Intimate wipes, Vaginal moisturiser |
| Baby & Infant | 👶 | Baby shampoo 👶, Baby body wash, Nappy rash cream, Baby wipes, Baby lotion, Baby oil, Baby powder, Nappies, Pull-up nappies, Baby face washer, Baby bath, Infant formula |
| Clothing | 👕 | Socks 👕, Non-slip socks, Compression stockings, Support stockings, Underwear, T-shirt, Singlet, Pyjamas, Hospital gown, Slippers, Non-slip slippers, Ugg boots, Cardigan, Zip-up hoodie, Tracksuit pants, Elasticated waist pants, Adaptive clothing |
| Incontinence Underwear | 🩲 | Incontinence briefs 🩲, Washable incontinence underwear, Waterproof briefs, Absorbent underwear, Swim nappies |
Household 🏠
Section titled “Household 🏠”| Subcategory | 🏷 | Representative items |
|---|---|---|
| General Cleaning | 🧹 | Multi-purpose cleaner 🧹, Disinfectant spray, Disinfectant wipes, Bathroom cleaner, Toilet cleaner, Toilet duck, Floor cleaner, Mop bucket, Glass cleaner, Mould remover, Bleach, Ammonia, Bicarb soda, White vinegar |
| Kitchen Cleaning | 🍽️ | Dishwashing liquid 🍽️, Dishwasher tablets, Dishwasher powder, Dishwasher rinse aid, Oven cleaner, Kitchen degreaser, Sponges, Scourers, Steel wool, Dish cloths, Dish brush, Bottle brush |
| Laundry | 🧺 | Laundry detergent 🧺, Liquid laundry detergent, Laundry pods, Fabric softener, Stain remover, Laundry soaker, Bleach, Colour catcher, Dryer sheets, Laundry bags, Mesh laundry bags, Ironing spray |
| Paper Goods | 🧻 | Toilet paper 🧻, 3-ply toilet paper, Paper towels, Facial tissues, Box tissues, Paper napkins, Disposable cloths |
| Waste & Storage | 🗑️ | Bin liners 🗑️, Small bin liners, Large bin liners, Recycling bags, Compost bags, Freezer bags, Zip lock bags, Cling wrap, Beeswax wraps, Aluminium foil, Baking paper, Parchment paper, Rubber gloves, Disposable gloves |
| Kitchen Supplies | 🥄 | Aluminium foil 🥄, Baking paper, Cling wrap, Toothpicks, Skewers, Baking cups, Candles, Matches, Lighter, Batteries (AA), Batteries (AAA), Light bulbs, Glad wrap |
| Pest Control | 🪲 | Fly spray 🪲, Ant bait, Ant spray, Mouse traps, Rat bait, Cockroach bait, Fly strips, Bug zapper, Mosquito coils, Insect repellent |
| Garden & Outdoor | 🌻 | Potting mix 🌻, Fertiliser, Plant food, Garden hose, Watering can, Garden gloves, Snail bait, Weed killer, Lawn seed, Bird seed, Pet water bowl |
Services 🛠️
Section titled “Services 🛠️”| Subcategory | 🏷 | Representative items |
|---|---|---|
| Home Care Services | 🧹 | House cleaning 🧹, Deep clean, End of lease clean, Vacuuming, Mopping, Bathroom clean, Kitchen clean, Oven clean, Window cleaning, Ironing, Laundry service, Bed making, Grocery run |
| Garden & Outdoor | 🌱 | Lawn mowing 🌱, Garden maintenance, Hedge trimming, Gutter cleaning, Pressure washing, Leaf blowing, Garden rubbish removal |
| Allied Health | 🏥 | Physiotherapy session 🏥, Occupational therapy, Podiatry, Speech therapy, Dietitian consultation, Massage therapy, Hydrotherapy, Chiropractic, Osteopathy, Exercise physiology, Neuropsychology assessment |
| Mental Health | 🧠 | Psychology session 🧠, Counselling session, Psychiatry review, Art therapy, Music therapy, Pet therapy session, Social engagement activity |
| Personal Services | ✂️ | Hairdresser ✂️, Barber, Mobile hairdresser, Nail care, Manicure, Pedicure, Waxing, Eyebrow threading, Makeup application |
| Medical Transport | 🚑 | Medical transport booking 🚑, Non-emergency medical transport, Taxi to appointment, Ride share to appointment, NDIS transport, Wheelchair-accessible taxi, Community transport |
| Social & Recreational | 🎭 | Social outing 🎭, Day program, Respite activity, Library visit, Cinema visit, Community group, Volunteer visitor, Friendship program |
| Trades & Maintenance | 🔧 | Plumber 🔧, Electrician, Handyman, Locksmith, Grab rail installation, Ramp installation, Bathroom modification, Stair lift service, Home modification assessment |
| Pharmacy & Delivery | 📦 | Medication delivery 📦, Chemist delivery, Grocery delivery, Meal kit delivery, Meals on Wheels, Meal delivery service |
| Respite & Care | 🤝 | Respite care 🤝, In-home respite, Day respite, Emergency respite, Overnight respite, Carer relief service |
Equipment & Aids ♿
Section titled “Equipment & Aids ♿”| Subcategory | 🏷 | Representative items |
|---|---|---|
| Mobility Aids | 🦯 | Walking stick 🦯, Quad cane, Walking frame, Wheeled walking frame, Rollator, Manual wheelchair, Transport wheelchair, Power wheelchair, Scooter, Crutches, Forearm crutches |
| Bathroom & Toilet Aids | 🚿 | Shower chair 🚿, Shower stool, Bath board, Bath seat, Transfer bench, Raised toilet seat, Toilet frame, Grab rail, Suction grab rail, Non-slip bath mat, Commode chair, Portable commode, Bedpan, Urinal bottle |
| Pressure Care | 🛏️ | Pressure cushion 🛏️, Gel cushion, Air cushion, Pressure mattress overlay, Foam mattress topper, Air mattress, Heel protectors, Heel wedge, Elbow protectors, Seat wedge |
| Bed Aids | 🛏️ | Bed rail 🛏️, Half bed rail, Bed grab handle, Bed rope ladder, Bed wedge pillow, Leg rest pillow, Bed table, Overbed table, Monkey pole, Slide sheet, Transfer belt |
| Communication & Vision | 👁️ | Large print calendar 👁️, Large print phone, Magnifying glass, Handheld magnifier, Talking clock, Alarm clock with vibration, Hearing aid batteries, Hearing aid cleaning kit, Amplified telephone, Visual door bell, Dementia clock |
| Daily Living Aids | 🍴 | Non-slip mat 🍴, Jar opener, Long handled reacher, Grabber tool, Dressing aids, Sock aid, Elastic shoelaces, Button hook, Zipper pull, Adapted cutlery, Non-slip plate, Plate guard, Cup with two handles, Angled spoon, Rocker knife, Cutting board with spikes |
| Continence Equipment | 🚰 | Commode chair 🚰, Portable commode, Bedside commode, Urinal bottle, Female urinal, Bedpan, Catheter stand, Catheter bag holder, Penile sheath, Continence pad holder |
4.3 Grouping modes
Section titled “4.3 Grouping modes”A list’s grouping mode is set per-list by the admin. It controls how items are displayed when viewing the active list.
| Mode | Display behaviour |
|---|---|
by_category | Items grouped under category headings, subcategory subheadings. Sort within group: added order. Default. |
flat | Single undifferentiated list. Sort: added order. No headers. |
custom | User-defined drag-and-drop sort order. Items display in the user-set order with no automatic grouping. |
“Used Before” always pins to the top of the add panel regardless of grouping mode. It does not appear within the active list itself — it is only shown when browsing to add new items.
5. The Three-Tier Catalog
Section titled “5. The Three-Tier Catalog”The catalog has three distinct tiers with different ownership, visibility, and governance.
Tier 1: Platform Catalog (system-level) Maintained by the platform owner. Available read-only to all tenants. Items have icons, aliases, default units, categories. ↕ moderationTier 2: Community Suggestions (pending review) Free-text items added by users that are not in Tier 1. Automatically deduplicated by normalised name. Ranked by frequency (how many distinct tenants have added the same item). Platform owner reviews and either promotes to Tier 1 or rejects. ↕ tenant boundaryTier 3: Tenant Custom Items Items specific to one tenant that are not suitable for the platform catalog. Never promoted. Visible only to that tenant. E.g. "Nan's special bread from the Ukrainian bakery on Smith St"Catalog search behaviour
Section titled “Catalog search behaviour”When a user types into the add-item field:
- Search the Tier 1 platform catalog for items matching the input (fuzzy name + alias match).
- Search the tenant’s Tier 3 custom items and append any matches.
- If the typed text does not match any catalog item with sufficient confidence, display a “Add ‘[text]’ as a new item” option at the bottom of the results.
- Selecting “Add as new item” creates a free-text list item and simultaneously creates or increments a Tier 2
catalog_suggestionsrow withnormalized_name= lowercase trimmed input.
Alias matching
Section titled “Alias matching”The catalog stores regional synonyms so users find items regardless of which term they use:
| Canonical name | Aliases |
|---|---|
| Capsicum | Bell pepper, Pepper |
| Beef mince | Ground beef, Minced beef, Mince |
| Zucchini | Courgette |
| Prawns | Shrimp |
| Soft drink | Soda, Cola, Fizzy drink |
| Paracetamol | Acetaminophen, Panadol (generic alias) |
| Continence pads | Incontinence pads, Pads (in pharmacy context) |
Aliases are locale-tagged (en-AU, en-US, en-GB) so future internationalisation is straightforward.
Catalog product-name localisation (jurisdiction-aware, not literal)
Section titled “Catalog product-name localisation (jurisdiction-aware, not literal)”Product decision (2026-08-06): catalog_items / catalog_item_aliases display names are localised per market, never translated word-for-word from the en-AU source. Word-for-word translation produces names a shopper in that market would not recognise or would find legally wrong.
Research the target jurisdiction’s own retail, legal, and cultural conventions for every locale — this applies to every future language, not just French:
- Legal: EU Regulation 1308/2013 reserves lait (“milk”) for dairy — plant-based drinks are boisson à l’avoine / à l’amande / au soja in
fr-FR, never lait de. A literal translator misses this; a market-aware one does not. - Sector terminology: French aged-care uses aides techniques (not a literal “equipment and aids”) and téléassistance for personal alarm devices — the terms carers and admin bodies (CNSA, APF) actually use.
- Allergen/regulatory labelling: fruits à coque is the correct EU allergen-labelling term for tree nuts, not the colloquial noix (walnuts).
- Non-Latin / other-jurisdiction locales (e.g. Hindi, Arabic) require the same discipline: consult that market’s retail and regulatory norms, not a dictionary. Do not assume Latin-script localisation patterns transfer.
Brand names are an acceptable localised display name, not a translation defect. When a well-known local retail brand is what shoppers actually ask for (e.g. fr-FR Weet-Bix → Weetabix, Corn Flakes, Bimi for broccolini, Vegemite kept as-is), use it. Do not flag brand retention as “untranslated” or block on it.
No static per-item confidence field is maintained. Each AI or human reviewer applies independent judgement per item on every pass; there is no shared “certainty” score carried between reviewers. Ongoing correctness comes from the same refinement loop already described above: admin catalog edits (ShoppingCatalogAdmin) and catalog_suggestions frequency ranking surface what real users in a market actually call an item, and that feeds back into catalog_item_aliases per locale over time — translation quality improves from production usage signal, not a one-time review score.
Review payload and pipeline
Section titled “Review payload and pipeline”Localisation review runs on a per-locale payload in findings/, never by hand-editing a bundle. The tooling is language-agnostic — the locale is an argument and market metadata comes from locales.config.json, so adding a market is data, not a new script.
| Artefact | Contents |
|---|---|
findings/i18n-<locale>-shopping-catalog.header.json | Policy, review protocol, the shared unit map, category/subcategory names, counts, append-only review log |
findings/i18n-<locale>-shopping-catalog.items.jsonl | One JSON object per catalog item — JSONL so large sets split into batches and re-stitch without a reviewer reformatting the file |
# Build or refresh the payload (accepted names carry forward; new seed items are reported)python backend/scripts/catalog_localisation_export.py --locale fr-FR --batch-size 60
# Merge a reviewer's returned file — validated before anything is writtenpython backend/scripts/catalog_localisation_merge.py --locale fr-FR --reviewed <file.jsonl> --reviewer <model-or-person>An item row carries normalized_name, category_slug, subcategory_slug, en_name, en_unit, and emoji as immutable join keys, plus three reviewer-editable fields:
local_name— the display name a shopper in that market would use.local_aliases— the other names they might type (regional variants, the brand name when the canonical entry is generic). These load intocatalog_item_aliases, so a wider alias list directly improves search recall.market_rationale— why this name, in market terms (retail convention, labelling law, regional usage) — not a restatement of the translation.
Units are localised once in the header, not per item. A reviewer looking at one row cannot see that bunch became botte on one item and bouquet on another; that is the same consistency defect class the UI-bundle gate exists to catch. Items reference en_unit and the header resolves it.
catalog_localisation_merge.py rejects the whole file if a reviewer changes a join key, returns an unknown normalized_name, duplicates a row, or invents a field (for example re-adding a confidence score). The failure mode with model reviewers is a silently reshaped payload, not a bad translation — that breaks the join back to catalog_items long after the review looks finished.
Pass numbering is retired in favour of the header’s append-only reviews log (reviewer, timestamp, rows reviewed, changes applied). Superseded artefacts findings/i18n-fr-FR-shopping-catalog-pass1.json / -pass3.json are kept only as history. These are all drafting/QA artefacts, not the runtime source — accepted names load into catalog_item_aliases / catalog_category_translations before they affect the product.
Agent-facing rules: .cursor/rules/i18n-catalog-localisation.mdc.
6. User Roles & Permissions
Section titled “6. User Roles & Permissions”Permissions depend on deployment mode.
Mode A — LynCareOS (patient-scoped)
Section titled “Mode A — LynCareOS (patient-scoped)”| Action | Patient | Carer | Admin | Observer |
|---|---|---|---|---|
| View any list | Yes | Yes | Yes | Yes |
| View Used Before panel | Yes | Yes | Yes | Yes |
| Add item to list | Yes | Yes | Yes | No |
| Remove item from list | Yes | Yes | Yes | No |
| Mark item purchased | Yes | Yes | Yes | Yes |
| Undo purchase | Yes | Yes | Yes | No |
| Edit item (qty, notes, unit) | Yes | Yes | Yes | No |
| Create a new list | No | Yes | Yes | No |
| Rename / delete a list | No | No | Yes | No |
| Change list grouping mode | No | Yes | Yes | No |
| Submit catalog suggestion | Yes | Yes | Yes | No |
| Manage tenant custom items | No | No | Yes | No |
Observer rationale: Observers often participate in care practically — a family member who is an observer may be doing the actual shopping run. Denying them the purchase action would break real-world workflows. They cannot modify the list composition (add/remove) but they can record that they bought something.
Mode B — Standalone (household-scoped)
Section titled “Mode B — Standalone (household-scoped)”All household members (any tenant membership role) have full add/remove/purchase rights. There is no observer role in standalone mode — a viewer membership role maps to the observer column above.
7. Item Lifecycle
Section titled “7. Item Lifecycle”States
Section titled “States” User adds item │ ▼ [ ACTIVE ] ──── user taps [✕] ──────► [ REMOVED ] │ (deleted from list; │ not in Used Before) user taps [✓] │ ▼ [ PURCHASED ] ──────────────────────────► Used Before pool │ (available for quick re-add) │ (if recurring) after recurrence_interval_days │ ▼ [ ACTIVE ] (automatically re-added to list)State transition rules
Section titled “State transition rules”Active → Purchased
- Triggered by any eligible user tapping the [✓] purchase icon.
- Records
purchased_by(user id) andpurchased_at(UTC timestamp). - Item immediately disappears from the active list view for all connected clients (real-time via SSE).
- Item enters the “Purchased” collapsible section at the bottom of the list (collapsed by default, shows count “Purchased (3)”).
- Item is added or updated in the Used Before pool for this patient/tenant.
Active → Removed
- Triggered by any eligible user tapping the [✕] remove icon.
- Item is soft-deleted (
status = 'removed'). - Item does NOT enter Used Before.
- Item disappears from the active list immediately for all connected clients.
- No confirmation dialog required for remove (low-friction UX). Undo available via toast for 5 seconds (“Item removed · Undo”).
Purchased → Active (recurring items only)
- If
is_recurring = true, a background scheduled task runs daily at 06:00 local time. - It finds purchased items where
purchased_at < (now - recurrence_interval_days). - It resets them to
status = 'active', clearspurchased_byandpurchased_at, updatesupdated_at. - The item reappears on the active list for all connected clients.
- A consolidated care alert is refreshed for the care team (when the shopping channel is enabled) — same single row per patient, count incremented.
Care alerts (when shopping channel enabled)
Section titled “Care alerts (when shopping channel enabled)”Shopping list mutations sync one consolidated in-app care alert per patient — not one alert per item.
| Trigger | Alert behaviour |
|---|---|
| Item added | Upsert open alert shopping:{patient_id}; body shows active-item count (e.g. “4 items on the shopping list.”) |
| Item purchased | Count decrements; alert auto-resolves when no active items remain |
| Purchase undone | Count increments; alert re-opens or updates if channel enabled |
| Item removed (active) | Count decrements; auto-resolve when empty |
| Recurring item reset | Count increments when item returns to active |
Implementation: alert_shopping_sync.sync_shopping_alert_for_patient (via shopping_service._schedule_shopping_alert_sync after HTTP commit). Legacy per-item open rows are superseded on next sync. Deep link: /shopping?patientId={id}.
Used Before pool
Section titled “Used Before pool”The Used Before pool is a virtual category derived from purchase history. It is not a separate table — it is a query over shopping_list_items where status = 'purchased'.
Query logic:
SELECT DISTINCT ON (COALESCE(catalog_item_id::text, LOWER(name))) catalog_item_id, name, category_id, subcategory_id, quantity, unit, MAX(purchased_at) AS last_purchased_at, COUNT(*) AS purchase_countFROM shopping_list_itemsWHERE (patient_id = $1 OR list_id IN (SELECT id FROM shopping_lists WHERE tenant_id = $2)) AND status = 'purchased'GROUP BY COALESCE(catalog_item_id::text, LOWER(name)), catalog_item_id, name, category_id, subcategory_id, quantity, unitORDER BY last_purchased_at DESCLIMIT 30;Ranking: Most recently purchased first. Items not purchased in the last 90 days are excluded unless the pool would be fewer than 10 items.
Re-adding from Used Before:
One tap re-adds the item to the current active list with the same name, category_id, subcategory_id, quantity, and unit as the last purchase. No form required. The item appears in the active list immediately.
8. UX & Interaction Model
Section titled “8. UX & Interaction Model”8.1 The active list view
Section titled “8.1 The active list view”┌──────────────────────────────────────────────────────┐│ Mrs Thompson — Groceries [+ New] │ ← list name + create list btn│ Weekly Groceries ▾ Chemist Run │ ← list selector tabs│ ││ 12 items to get │ ← item count│ ││ FRUIT & VEGETABLES │ ← category header (grouped mode)│ ┌────────────────────────────────────────────────┐ ││ │ 🍎 Apple 1 kg [✓] [✕] │ ││ │ Added by Sarah · 2h ago │ ││ └────────────────────────────────────────────────┘ ││ ┌────────────────────────────────────────────────┐ ││ │ 🥛 Oat milk 2 × 1L [✓] [✕] │ ││ │ Added by Admin · yesterday │ ││ └────────────────────────────────────────────────┘ ││ ││ BAKERY ││ ┌────────────────────────────────────────────────┐ ││ │ 🍞 Multigrain bread 1 loaf [✓] [✕] │ ││ └────────────────────────────────────────────────┘ ││ ││ ─────── Purchased (3) ▸ ────────────────────────── │ ← collapsed, tap to expand│ ││ [+ Add item]│ ← FAB on mobile└──────────────────────────────────────────────────────┘8.2 Item row anatomy (ShoppingListRow)
Section titled “8.2 Item row anatomy (ShoppingListRow)”Desktop / tablet (sm+) — single horizontal row:
[Icon] [Item name + priority badge] [− qty +] [✓ purchase] [✕ remove]Tapping the icon opens the photo picker. Quantity is adjusted via inline ± stepper.
Mobile (≤639px) — compact single line inside SwipeActionRow:
[Icon] [Item name + badge …truncate] [qty pill] ← swipe left: Remove (coral) | swipe right: Purchased (sage) →- Swipe right past threshold → Purchased — marks purchased; item leaves the active list (same API as desktop ✓).
- Swipe left past threshold → Remove — removes from list (carer/admin when
canEdit). - Tap qty pill → bottom sheet with ± stepper (keeps the row one line tall).
- Vertical list scroll is preserved (horizontal axis lock in
SwipeActionRow).
Both purchase and remove remain one gesture on mobile; desktop keeps always-visible controls for mouse users.
Detail expansion (notes, supplier notes, full edit sheet on row tap) from the original spec is not yet implemented — photo capture and quantity edit cover the primary carer flows.
8.3 The add panel (Add Item flow)
Section titled “8.3 The add panel (Add Item flow)”Triggered by [+ Add items] (desktop, dashed button) or apricot FAB (mobile). Opens AddItemsSheet — a bottom sheet on all viewports (desktop renders as a right-side panel per shared BottomSheet).
Catalog items render as a 3-column tile grid inside the sheet (not inline on the main page). Category picker uses compact cc-card tiles (rounded-2xl, rounded-xl icon well); subcategories use a compact horizontal cc-chip filter row (text-xs, 30px min-height, 14px icons). Every product tile uses the same cell size (6rem row height on mobile).CATALOG_TILE_GRID exported from CatalogItemTile.tsx): 34×34px icon/photo in a rounded-xl well, 10px two-line label, white shadow-soft card surface (
Icon / photo priority on each tile: patient photo (authenticated blob via useAuthenticatedImage) when present; else catalog raster via IconResolver (svg under /catalog-icons/items/… or 3D png under /assets/catalog-3d/…); else subcategory substitute; else emoji; else cart fallback. Do not rely on onLoad alone for raster readiness — see IconResolver.tsx.
┌──────────────────────────────────────────────────────┐│ Add to Weekly Groceries [Close]││ ││ [Search or type an item... ] │ ← search input, autofocus│ ││ ★ USED BEFORE │ ← pinned at top│ ┌──────────┐ ┌──────────┐ ┌──────────┐ ││ │ 🍎 Apple │ │ 🥛 Oat │ │ 🍞 Bread │ ··· │ ← tap to add instantly│ │ │ │ milk │ │ │ ││ └──────────┘ └──────────┘ └──────────┘ ││ ││ FRUIT & VEGETABLES ││ ┌──────────┐ ┌──────────┐ ┌──────────┐ ││ │ 🍎 Apple │ │ 🍌 Banana│ │ 🍊 Orange│ ··· ││ └──────────┘ └──────────┘ └──────────┘ ││ ││ DAIRY & EGGS ││ ┌──────────┐ ┌──────────┐ ┌──────────┐ ││ │ 🥛 Milk │ │ 🧀 Cheese│ │ 🥚 Eggs │ ··· ││ └──────────┘ └──────────┘ └──────────┘ ││ │└──────────────────────────────────────────────────────┘Tap a catalog item → instantly added to list with default quantity/unit. Panel stays open for rapid multi-add.
Typing in search → filters catalog items by name and alias match. Free-text result appears at bottom: Add "Fancy truffle oil" as new item.
Selecting free-text → opens a minimal detail form:
Name: [Fancy truffle oil ] Category: [Pantry ▾] Subcategory: [Oils ▾] Qty: [1] Unit: [bottle ▾] Note: [ ] [Add to list]Tap a Used Before item → instantly added with same qty/unit as last purchase. Zero friction.
8.4 Purchased before (collapsed)
Section titled “8.4 Purchased before (collapsed)”When one or more items have been purchased on the current list, a collapsed Purchased before (N) section appears below the active list (PurchasedSection, collapsed by default).
Tapping the header expands a horizontal scroll strip of PurchasedTile cards — same Calm Care proportions as the add-items catalog picker (rounded-2xl white card, 34×34px icon/photo in a rounded-xl well, 10px two-line label). Tap a tile to re-add that item to the active list (sage flash + “Added!” feedback, same as catalog add).
- Remove (×) on a tile — removes that entry from purchase history on the list (carer/admin when permitted).
- ⋯ Clear all purchase history — admin overflow menu; two-step confirm before clearing the whole pool on this list.
8.5 List navigation
Section titled “8.5 List navigation”Lists for the current patient are displayed as a horizontally scrollable cc-chip tab row inside a soft card (ShoppingListTabs). The active list uses cc-chip-active. A [+ New list] chip at the end creates a list (carer/admin only). Delete is a two-step confirm on the active tab.
8.6 Priority badge (pharmacy/medical lists)
Section titled “8.6 Priority badge (pharmacy/medical lists)”For items on pharmacy or equipment lists, an optional priority badge appears:
| Priority | Badge | Colour |
|---|---|---|
critical | Urgent | Coral (cc-status-overdue) |
high | High | Amber (cc-status-due) |
normal | (no badge) | — |
low | (no badge, grey text) | — |
On pharmacy lists, the active list sorts: critical first → high → normal → low. Within each priority band, items sort in added order.
9. Real-Time Sync
Section titled “9. Real-Time Sync”SSE event: shopping_list_updated
Section titled “SSE event: shopping_list_updated”The shopping module emits server-sent events on every mutation. All clients connected to the same patient’s context receive the event and invalidate their local list state, triggering a silent background re-fetch.
{ "event": "shopping_list_updated", "payload": { "list_id": 42, "patient_id": 7, "tenant_id": 3, "action": "purchase", "item_id": 188, "item_name": "Oat milk", "performed_by_name": "Sarah" }}Events emitted
Section titled “Events emitted”| Action | SSE event | Additional effect |
|---|---|---|
| Item added | shopping_list_updated | Consolidated care alert sync (count upsert) when shopping channel enabled |
| Item purchased | shopping_list_updated | Consolidated care alert sync (count decrement or auto-resolve) |
| Purchase undone | shopping_list_updated | Consolidated care alert sync (count increment) |
| Item removed | shopping_list_updated | Consolidated care alert sync (count decrement or auto-resolve) |
| Items cleared | shopping_list_updated | — |
| Recurring item reset | shopping_list_updated | Consolidated care alert sync when item returns to active |
Client handling
Section titled “Client handling”The frontend listens for shopping_list_updated events via the existing SSE infrastructure in lib/api.ts. On receipt, the shopping list state is re-fetched silently (no spinner, no page reload). The active list view updates in place — new items appear, purchased items disappear, all without user action.
List tab reconciliation: After every fetchLists, Shopping.tsx checks that activeListId still exists in the returned array; if not, it selects the first list or clears selection. Changing the care recipient resets list/item state before fetching — avoids GET …/lists/{id}/items 404 when a list was deleted on another device or the stored tab id is stale.
Mobile purchase/remove: On viewports ≤639px, ShoppingListRow uses SwipeActionRow — swipe right Purchased, swipe left Remove (when editable). Desktop keeps inline ✓ / ✕ controls.
Distributed pickup — concurrent purchase behaviour
Section titled “Distributed pickup — concurrent purchase behaviour”When multiple users are simultaneously shopping and marking items purchased:
- First user to mark an item purchased wins (desktop ✓ or mobile swipe right → Purchased). The purchase is written immediately to the DB.
- The SSE event removes the item from all other connected clients’ active lists within ~1 second.
- The tiny race-condition window (network RTT) is accepted for Phase 7. If two users simultaneously purchase the same item, the second write is a no-op at the DB level (idempotent — item status is already
purchased). No error is shown; the second user simply sees the item was already bought. - A Phase 8 enhancement will add a soft “I’m getting this” claimed state as an optional list-level setting.
10. Community Contribution & Catalog Moderation
Section titled “10. Community Contribution & Catalog Moderation”How suggestions are created
Section titled “How suggestions are created”When a user adds a free-text item (not matched from the catalog), the backend:
- Normalises the input: lowercase, trim whitespace, collapse multiple spaces.
- Checks
catalog_suggestionsfor an existing row with the samenormalized_name. - If found: increments
frequency_countand updateslast_submitted_at. Updatessubmitted_by_tenant_ids(array of distinct tenants who have submitted this term). - If not found: creates a new row with
status = 'pending',frequency_count = 1.
The user’s list item is created regardless — the suggestion is a background background action that never blocks the UX.
Platform admin review queue
Section titled “Platform admin review queue”Accessible to super-admins only at:
GET /api/admin/shopping/catalog/suggestions ?status=pending &sort=frequency_desc (default) &category=groceryThe review queue shows suggestions ordered by frequency_count DESC — items added independently by many different tenants surface first. This is the primary signal for what belongs in the platform catalog.
Review screen layout:
┌──────────────────────────────────────────────────────────────┐│ Catalog Suggestions — Pending (47) ││ ││ ┌──────────────────────────────────────────────────────┐ ││ │ "Incontinence briefs" 🔥 23 tenants │ ││ │ Suggested category: Pharmacy → Continence Products │ ││ │ [Approve & add to catalog] [Reject] [Merge with…] │ ││ └──────────────────────────────────────────────────────┘ ││ ┌──────────────────────────────────────────────────────┐ ││ │ "Oat bran" 🔥 18 tenants │ ││ │ Suggested category: Grocery → Breakfast Cereal │ ││ │ [Approve & add to catalog] [Reject] [Merge with…] │ ││ └──────────────────────────────────────────────────────┘ ││ ┌──────────────────────────────────────────────────────┐ ││ │ "Fancy truffle oil" 1 tenant │ ││ │ Suggested category: Grocery → Oils │ ││ │ [Approve & add to catalog] [Reject] [Merge with…] │ ││ └──────────────────────────────────────────────────────┘ │└──────────────────────────────────────────────────────────────┘Approval flow
Section titled “Approval flow”Approve:
- Platform admin sets the canonical name, selects category/subcategory, sets default unit, optionally adds aliases.
- A new
catalog_itemsrow is created. - The
catalog_suggestionsrow is markedapproved,merged_into_catalog_item_idset. - All existing free-text list items matching this normalised name are retroactively linked to the new
catalog_item_id(background job).
Reject:
catalog_suggestionsrow markedrejectedwith optionalreview_notes.- No effect on existing list items — they remain as free-text items.
- The suggestion will not re-surface unless a different normalised name creates a new row.
Merge:
- The suggestion is an alias of an existing catalog item (e.g. “Incontinence pads” merges into “Continence pads”).
- The alias is added to
catalog_item_aliasesfor the target item. - Existing free-text list items are retroactively linked.
Tenant custom items (Tier 3)
Section titled “Tenant custom items (Tier 3)”If a tenant creates a custom item that is clearly not suitable for the platform catalog, an admin can mark it tenant_only = true. This prevents it from ever appearing in the community suggestions queue. Tenant custom items are visible only to that tenant.
11. Database Schema
Section titled “11. Database Schema”All tables use PostgreSQL types consistent with schema.sql. No SQLite syntax.
System/platform tables (no tenant isolation)
Section titled “System/platform tables (no tenant isolation)”-- Top-level categories (e.g. Groceries, Pharmacy, Personal Care)CREATE TABLE catalog_categories ( id SERIAL PRIMARY KEY, name TEXT NOT NULL, -- canonical English name slug TEXT NOT NULL UNIQUE, icon_emoji TEXT, -- e.g. '🛒' icon_type TEXT NOT NULL DEFAULT 'emoji' CHECK (icon_type IN ('emoji', 'svg', 'url')), icon_value TEXT, item_type TEXT NOT NULL DEFAULT 'product' CHECK (item_type IN ('product', 'service', 'both')), sort_order INTEGER NOT NULL DEFAULT 0, active BOOLEAN NOT NULL DEFAULT true, created_at TIMESTAMPTZ NOT NULL DEFAULT now());
-- Subcategories (e.g. Fresh Fruit, Dairy & Eggs)CREATE TABLE catalog_subcategories ( id SERIAL PRIMARY KEY, category_id INTEGER NOT NULL REFERENCES catalog_categories(id), name TEXT NOT NULL, -- canonical English name icon_emoji TEXT, -- fallback for items without their own emoji icon_type TEXT NOT NULL DEFAULT 'emoji' CHECK (icon_type IN ('emoji', 'svg', 'url')), icon_value TEXT, sort_order INTEGER NOT NULL DEFAULT 0, active BOOLEAN NOT NULL DEFAULT true, created_at TIMESTAMPTZ NOT NULL DEFAULT now());
-- Individual catalog items (e.g. Apple, Oat milk, Physiotherapy session)CREATE TABLE catalog_items ( id SERIAL PRIMARY KEY, category_id INTEGER NOT NULL REFERENCES catalog_categories(id), subcategory_id INTEGER REFERENCES catalog_subcategories(id), name TEXT NOT NULL, -- canonical English name (en-AU) normalized_name TEXT NOT NULL, -- lowercase, trimmed — for dedup/search item_type TEXT NOT NULL DEFAULT 'product' CHECK (item_type IN ('product', 'service')), default_unit TEXT, -- 'each', 'kg', 'litre', 'pack', 'session' default_quantity REAL NOT NULL DEFAULT 1, icon_emoji TEXT, -- Unicode emoji e.g. '🍎' icon_type TEXT NOT NULL DEFAULT 'emoji' CHECK (icon_type IN ('emoji', 'svg', 'url')), icon_value TEXT, -- Phase 8+: SVG filename or CDN URL search_weight INTEGER NOT NULL DEFAULT 5, active BOOLEAN NOT NULL DEFAULT true, created_at TIMESTAMPTZ NOT NULL DEFAULT now(), updated_at TIMESTAMPTZ NOT NULL DEFAULT now());
CREATE INDEX idx_catalog_items_normalized ON catalog_items(normalized_name);CREATE INDEX idx_catalog_items_category ON catalog_items(category_id);CREATE INDEX idx_catalog_items_subcat ON catalog_items(subcategory_id);
-- Aliases / synonyms (regional and common alternate names)-- Also used as the primary localisation lookup for names (e.g. 'Bell pepper' for 'Capsicum' in en-US)CREATE TABLE catalog_item_aliases ( id SERIAL PRIMARY KEY, catalog_item_id INTEGER NOT NULL REFERENCES catalog_items(id) ON DELETE CASCADE, alias TEXT NOT NULL, normalized_alias TEXT NOT NULL, locale TEXT NOT NULL DEFAULT 'en-AU', -- BCP-47 locale tag is_primary_for_locale BOOLEAN NOT NULL DEFAULT false, -- if true, this is the display name for that locale UNIQUE (normalized_alias, locale));
CREATE INDEX idx_catalog_aliases_item ON catalog_item_aliases(catalog_item_id);CREATE INDEX idx_catalog_aliases_locale ON catalog_item_aliases(locale, is_primary_for_locale) WHERE is_primary_for_locale = true;
-- Localised display names for categories (shown in the Add panel headers)CREATE TABLE catalog_category_translations ( id SERIAL PRIMARY KEY, category_id INTEGER NOT NULL REFERENCES catalog_categories(id) ON DELETE CASCADE, locale TEXT NOT NULL, display_name TEXT NOT NULL, UNIQUE (category_id, locale));
-- Localised display names for subcategoriesCREATE TABLE catalog_subcategory_translations ( id SERIAL PRIMARY KEY, subcategory_id INTEGER NOT NULL REFERENCES catalog_subcategories(id) ON DELETE CASCADE, locale TEXT NOT NULL, display_name TEXT NOT NULL, UNIQUE (subcategory_id, locale));
-- Tenant preferred locale (overrides device locale when set)-- Stored on tenant_shopping_settings (see below)
-- Community suggestions (free-text items users add that are not in catalog)CREATE TABLE catalog_suggestions ( id SERIAL PRIMARY KEY, suggested_name TEXT NOT NULL, normalized_name TEXT NOT NULL UNIQUE, -- dedup key suggested_category_id INTEGER REFERENCES catalog_categories(id), suggested_subcategory_id INTEGER REFERENCES catalog_subcategories(id), item_type TEXT NOT NULL DEFAULT 'product', submitted_by_tenant_ids INTEGER[] NOT NULL DEFAULT '{}', -- distinct tenants frequency_count INTEGER NOT NULL DEFAULT 1, status TEXT NOT NULL DEFAULT 'pending' CHECK (status IN ('pending', 'approved', 'rejected', 'merged')), merged_into_catalog_item_id INTEGER REFERENCES catalog_items(id), review_notes TEXT, reviewed_by INTEGER REFERENCES users(id), reviewed_at TIMESTAMPTZ, created_at TIMESTAMPTZ NOT NULL DEFAULT now(), updated_at TIMESTAMPTZ NOT NULL DEFAULT now());
CREATE INDEX idx_catalog_suggestions_status ON catalog_suggestions(status);CREATE INDEX idx_catalog_suggestions_frequency ON catalog_suggestions(frequency_count DESC);Tenant/patient tables
Section titled “Tenant/patient tables”-- Shopping lists (patient-scoped in LynCareOS; tenant-scoped in standalone)CREATE TABLE shopping_lists ( id SERIAL PRIMARY KEY, tenant_id INTEGER NOT NULL REFERENCES tenants(id), patient_id INTEGER REFERENCES patients(id), -- NULL in standalone mode name TEXT NOT NULL, list_type TEXT NOT NULL DEFAULT 'general' CHECK (list_type IN ( 'grocery','pharmacy','personal_care', 'household','services','equipment','general' )), grouping_mode TEXT NOT NULL DEFAULT 'by_category' CHECK (grouping_mode IN ('by_category','flat','custom')), sort_order INTEGER NOT NULL DEFAULT 0, is_active BOOLEAN NOT NULL DEFAULT true, created_by INTEGER NOT NULL REFERENCES users(id), created_at TIMESTAMPTZ NOT NULL DEFAULT now(), updated_at TIMESTAMPTZ NOT NULL DEFAULT now(),
-- Exactly one of patient_id or standalone mode must be set CONSTRAINT chk_shopping_list_owner CHECK ( patient_id IS NOT NULL OR tenant_id IS NOT NULL ));
CREATE INDEX idx_shopping_lists_tenant ON shopping_lists(tenant_id);CREATE INDEX idx_shopping_lists_patient ON shopping_lists(patient_id) WHERE patient_id IS NOT NULL;
-- Individual items within a listCREATE TABLE shopping_list_items ( id SERIAL PRIMARY KEY, list_id INTEGER NOT NULL REFERENCES shopping_lists(id) ON DELETE CASCADE, tenant_id INTEGER NOT NULL REFERENCES tenants(id), patient_id INTEGER REFERENCES patients(id), catalog_item_id INTEGER REFERENCES catalog_items(id), -- NULL for free-text name TEXT NOT NULL, category_id INTEGER REFERENCES catalog_categories(id), subcategory_id INTEGER REFERENCES catalog_subcategories(id), item_type TEXT NOT NULL DEFAULT 'product', quantity REAL NOT NULL DEFAULT 1, unit TEXT, notes TEXT, priority TEXT NOT NULL DEFAULT 'normal' CHECK (priority IN ('critical','high','normal','low')), supplier_notes TEXT, is_recurring BOOLEAN NOT NULL DEFAULT false, recurrence_interval_days INTEGER, sort_order INTEGER NOT NULL DEFAULT 0, status TEXT NOT NULL DEFAULT 'active' CHECK (status IN ('active','purchased','removed')), added_by INTEGER NOT NULL REFERENCES users(id), purchased_by INTEGER REFERENCES users(id), purchased_at TIMESTAMPTZ, removed_by INTEGER REFERENCES users(id), removed_at TIMESTAMPTZ, created_at TIMESTAMPTZ NOT NULL DEFAULT now(), updated_at TIMESTAMPTZ NOT NULL DEFAULT now());
CREATE INDEX idx_shopping_items_list_status ON shopping_list_items(list_id, status);CREATE INDEX idx_shopping_items_tenant ON shopping_list_items(tenant_id);CREATE INDEX idx_shopping_items_patient ON shopping_list_items(patient_id) WHERE patient_id IS NOT NULL;CREATE INDEX idx_shopping_items_purchased ON shopping_list_items(patient_id, purchased_at DESC) WHERE status = 'purchased';
-- Per-tenant shopping configurationCREATE TABLE tenant_shopping_settings ( tenant_id INTEGER PRIMARY KEY REFERENCES tenants(id), default_grouping_mode TEXT NOT NULL DEFAULT 'by_category', show_category_icons BOOLEAN NOT NULL DEFAULT true, show_used_before BOOLEAN NOT NULL DEFAULT true, used_before_limit INTEGER NOT NULL DEFAULT 30, used_before_days_window INTEGER NOT NULL DEFAULT 90, notify_critical_add BOOLEAN NOT NULL DEFAULT true, standalone_mode BOOLEAN NOT NULL DEFAULT false, preferred_locale TEXT, -- BCP-47 e.g. 'en-AU', 'en-US', 'fr-FR'. NULL = use device locale. updated_at TIMESTAMPTZ NOT NULL DEFAULT now());Migration file
Section titled “Migration file”This schema is delivered as a single migration file:
backend/migrations/V008__shopping_module.sql12. API Design
Section titled “12. API Design”All endpoints require a valid JWT. Module gate: require_module('shopping').
Patient-scoped endpoints enforce patient_access membership. Catalog endpoints are read-only for all authenticated users. Admin catalog management endpoints require is_super_admin.
Base URL conventions
Section titled “Base URL conventions”| Mode | Base path |
|---|---|
| LynCareOS integrated | /api/patients/{patient_id}/shopping/ |
| Standalone | /api/shopping/ |
Both modes share the same router code; the handler detects mode from tenant_shopping_settings.standalone_mode.
Shopping lists
Section titled “Shopping lists”GET /api/patients/{patient_id}/shopping/lists Response: ShoppingList[] Auth: any patient_access role
POST /api/patients/{patient_id}/shopping/lists Body: { name, list_type, grouping_mode? } Response: ShoppingList Auth: carer or admin
PATCH /api/patients/{patient_id}/shopping/lists/{list_id} Body: { name?, grouping_mode?, sort_order?, is_active? } Response: ShoppingList Auth: admin only
DELETE /api/patients/{patient_id}/shopping/lists/{list_id} Response: 204 Auth: admin onlyList items
Section titled “List items”GET /api/patients/{patient_id}/shopping/lists/{list_id}/items Query: status=active|purchased|removed|all (default: active) Response: ShoppingListItem[] Auth: any patient_access role
POST /api/patients/{patient_id}/shopping/lists/{list_id}/items Body: { catalog_item_id?, name, category_id?, subcategory_id?, quantity, unit?, notes?, priority?, supplier_notes?, is_recurring?, recurrence_interval_days? } Response: ShoppingListItem Auth: patient, carer, or admin
PATCH /api/patients/{patient_id}/shopping/lists/{list_id}/items/{item_id} Body: Partial<editable fields> Response: ShoppingListItem Auth: patient, carer, or admin
POST /api/patients/{patient_id}/shopping/lists/{list_id}/items/{item_id}/purchase Body: {} Response: ShoppingListItem Auth: patient, carer, admin, or observer
POST /api/patients/{patient_id}/shopping/lists/{list_id}/items/{item_id}/unpurchase Body: {} Response: ShoppingListItem Auth: patient, carer, or admin
DELETE /api/patients/{patient_id}/shopping/lists/{list_id}/items/{item_id} Response: 204 Auth: patient, carer, or admin
POST /api/patients/{patient_id}/shopping/lists/{list_id}/clear-purchased Body: {} Response: { archived_count: number } Auth: admin onlyUsed Before
Section titled “Used Before”GET /api/patients/{patient_id}/shopping/used-before Query: limit=30 (default) Response: UsedBeforeItem[] Auth: any patient_access roleCatalog (read — all authenticated users)
Section titled “Catalog (read — all authenticated users)”GET /api/shopping/catalog/categories Query: locale=BCP47 (optional — falls back to Accept-Language header, then en-AU) Response: CatalogCategory[] (with subcategories nested, names localised) Auth: any authenticated user
GET /api/shopping/catalog/search Query: q=string (min 2 chars), list_type?, limit=20, locale=BCP47 (optional — same fallback as above) Response: CatalogSearchResult[] (display_name localised; canonical_name always en-AU) Auth: any authenticated user Note: search matches against canonical name, all aliases across all locales, and the locale-specific primary display name
POST /api/shopping/catalog/suggest Body: { suggested_name, suggested_category_id?, item_type?, locale? } Response: 204 Auth: any authenticated userPlatform admin catalog management (super-admin only)
Section titled “Platform admin catalog management (super-admin only)”GET /api/admin/shopping/catalog/suggestions Query: status=pending|approved|rejected (default: pending), sort=frequency_desc Response: CatalogSuggestion[]
POST /api/admin/shopping/catalog/suggestions/{id}/approve Body: { canonical_name, category_id, subcategory_id, default_unit?, aliases?: string[] } Response: CatalogItem
POST /api/admin/shopping/catalog/suggestions/{id}/reject Body: { review_notes? } Response: 204
POST /api/admin/shopping/catalog/suggestions/{id}/merge Body: { target_catalog_item_id, add_as_alias: boolean } Response: 204
POST /api/admin/shopping/catalog/items Body: { name, category_id, subcategory_id?, item_type, default_unit?, default_quantity?, aliases?: string[] } Response: CatalogItem
PATCH /api/admin/shopping/catalog/items/{id} Body: Partial<CatalogItem fields> Response: CatalogItem
DELETE /api/admin/shopping/catalog/items/{id} Response: 204 (soft delete — sets active=false)TypeScript types
Section titled “TypeScript types”// frontend/src/lib/api.ts additions
export type ListType = | 'grocery' | 'pharmacy' | 'personal_care' | 'household' | 'services' | 'equipment' | 'general';
export type GroupingMode = 'by_category' | 'flat' | 'custom';
export type ItemStatus = 'active' | 'purchased' | 'removed';
export type ItemPriority = 'critical' | 'high' | 'normal' | 'low';
export interface ShoppingList { id: number; tenant_id: number; patient_id: number | null; name: string; list_type: ListType; grouping_mode: GroupingMode; sort_order: number; is_active: boolean; created_by: number; created_at: string; updated_at: string;}
export interface ShoppingListItem { id: number; list_id: number; tenant_id: number; patient_id: number | null; catalog_item_id: number | null; name: string; category_id: number | null; category_name: string | null; // joined subcategory_id: number | null; subcategory_name: string | null; // joined item_type: 'product' | 'service'; quantity: number; unit: string | null; notes: string | null; priority: ItemPriority; supplier_notes: string | null; is_recurring: boolean; recurrence_interval_days: number | null; sort_order: number; status: ItemStatus; added_by: number; added_by_name: string; // joined purchased_by: number | null; purchased_by_name: string | null; // joined purchased_at: string | null; removed_by: number | null; removed_at: string | null; created_at: string; updated_at: string;}
export interface UsedBeforeItem { catalog_item_id: number | null; name: string; category_id: number | null; category_name: string | null; subcategory_id: number | null; icon: string | null; quantity: number; unit: string | null; last_purchased_at: string; purchase_count: number;}
export interface CatalogCategory { id: number; name: string; slug: string; icon: string | null; item_type: 'product' | 'service' | 'both'; sort_order: number; subcategories: CatalogSubcategory[];}
export interface CatalogSubcategory { id: number; category_id: number; name: string; icon: string | null; sort_order: number;}
export interface CatalogSearchResult { catalog_item_id: number; canonical_name: string; // always en-AU, for DB storage display_name: string; // localised for the requested locale category_id: number; category_name: string; // localised subcategory_id: number | null; subcategory_name: string | null; // localised item_type: 'product' | 'service'; default_unit: string | null; default_quantity: number; icon_emoji: string | null; // Unicode emoji e.g. '🍎' icon_type: 'emoji' | 'svg' | 'url'; icon_value: string | null; // Phase 8+: SVG path or URL matched_via: 'name' | 'alias' | 'translation'; // for UX locale_used: string; // which locale was resolved}13. Backend Architecture
Section titled “13. Backend Architecture”The shopping module follows the mandatory three-layer pattern: Router → Service → Repository. No SQL in routers.
backend/routers/shopping.py HTTP layer: parse requests, call service, emit SSE, return responses. Item/catalog photo upload and serve call services/images.py with tenant_id.
backend/services/shopping_service.py Business logic: access control, Used Before logic, recurring reset, SSE emission, suggestion dedup, audit writes
backend/repositories/shopping.py All SQL: queries against shopping_lists, shopping_list_items, catalog_*, tenant_shopping_settings. clear_stale_photo_url() — removes orphaned photo_url values when upload files are missing (dev resets, volume loss).
backend/services/images.py Shared WebP pipeline for shopping item photos (and prescriptions/dispensing proof). Persists under UPLOADS_DIR/<tenant_id>/; DB stores filename only.Key service methods
Section titled “Key service methods”| Method | Responsibility |
|---|---|
get_lists(patient_id, user_id) | Returns all active lists for patient; enforces patient_access |
create_list(patient_id, user_id, data) | Creates list; applies tenant default settings |
get_items(list_id, patient_id, user_id, status) | Returns items with joined names; enforces patient_access |
add_item(list_id, patient_id, user_id, data) | Creates item; submits catalog suggestion if free-text; emits SSE; syncs consolidated care alert |
purchase_item(list_id, item_id, patient_id, user_id) | Sets purchased fields; emits SSE; syncs consolidated care alert |
unpurchase_item(...) | Reverts purchased state; emits SSE; syncs consolidated care alert |
remove_item(...) | Soft deletes; emits SSE; syncs consolidated care alert |
clear_purchased(list_id, patient_id, user_id) | Archives purchased items; emits SSE |
get_used_before(patient_id, limit) | Queries purchase history for quick-add candidates |
search_catalog(query, list_type, limit) | Full-text + alias search across catalog |
submit_suggestion(name, category_id, tenant_id, user_id) | Dedup and upsert catalog_suggestions |
reset_recurring_items() | Scheduler job — daily at 06:00; resets eligible recurring items; syncs consolidated care alert per affected patient |
Scheduler job
Section titled “Scheduler job”APScheduler job added to main.py lifespan:
scheduler.add_job( shopping_service.reset_recurring_items, trigger='cron', hour=6, minute=0, id='reset_recurring_shopping_items')14. Integration with LynCareOS Modules
Section titled “14. Integration with LynCareOS Modules”Medication restocking (optional, when medication_dispensing active)
Section titled “Medication restocking (optional, when medication_dispensing active)”When both shopping and medication_dispensing modules are active, the pharmacy list surface a “Suggested restocks” section. This reads dispensing analytics (unchanged from REQ-SHOP-04 in the retired spec) and surfaces medicines where recent consumption has accelerated. The suggestion is shown within the pharmacy list’s UI only — it does not appear in grocery or other list types.
This integration is optional: the shopping module has no hard import dependency on the dispensing module. The service checks at runtime whether medication_dispensing is active for the tenant before calling the analytics repository.
Shift integration (when care_calendar active)
Section titled “Shift integration (when care_calendar active)”When a carer is viewing a shift detail screen, a compact shopping widget shows:
- Count of active items on the patient’s lists: “12 items across 2 lists”
- Quick-add input to add an item directly from the shift view (auto-assigns
added_from_shift_idon the item) - Link to open the full shopping screen for the patient
Dashboard widget
Section titled “Dashboard widget”A shopping summary card on the dashboard shows:
- Total active items across all lists
- Count of critical/high priority items (pharmacy list)
- Link to the shopping screen
15. Implementation Task Breakdown
Section titled “15. Implementation Task Breakdown”Migration
Section titled “Migration”- Write
backend/migrations/V008__shopping_module.sql— Creates:catalog_categories,catalog_subcategories,catalog_items,catalog_item_aliases,catalog_suggestions,shopping_lists,shopping_list_items,tenant_shopping_settings— Creates all indexes
Catalog seed data
Section titled “Catalog seed data”- Write
backend/scripts/seed_shopping_catalog.py— Seeds all categories, subcategories, and items from this specification — Seeds aliases (regional synonyms) — Idempotent: usesON CONFLICT DO NOTHING— Runnable standalone or as part ofinit_db()
Backend — Repository
Section titled “Backend — Repository”-
backend/repositories/shopping.py—list_lists(),create_list(),update_list(),delete_list()—list_items(),get_item(),create_item(),update_item(),remove_item()—purchase_item(),unpurchase_item(),clear_purchased()—get_used_before()—search_catalog(),get_categories()—upsert_suggestion(),list_suggestions(),approve_suggestion(),reject_suggestion(),merge_suggestion()
Backend — Service
Section titled “Backend — Service”-
backend/services/shopping.py— All business logic methods listed in §13 — Access control enforcement (patient_access checks) — SSE emission on all mutations — Catalog suggestion dedup logic — Recurring item reset scheduler job
Backend — Router
Section titled “Backend — Router”-
backend/routers/shopping.py— All endpoints listed in §12 — Registered inmain.pyunder/api— Module gate:require_module('shopping')
Backend — Admin Router
Section titled “Backend — Admin Router”-
backend/routers/admin_shopping.py— Suggestion review queue endpoints — Catalog CRUD endpoints — Super-admin only (require_super_admin)
Backend — Pydantic models
Section titled “Backend — Pydantic models”- Add to
backend/models.py:ShoppingListCreate,ShoppingListUpdate,ShoppingItemCreate,ShoppingItemUpdate,CatalogSearchResult,CatalogSuggestionCreate,CatalogItemCreate,CatalogItemUpdate,SuggestionApprove,SuggestionMerge
Frontend — Pages
Section titled “Frontend — Pages”-
frontend/src/pages/Shopping.tsx— List selector tabs, active/purchased tabs, shopping screen shell
Frontend — Components
Section titled “Frontend — Components”-
frontend/src/components/shopping/ShoppingListTabs.tsx— Horizontal scrollable list selector with [+ New] button -
frontend/src/components/shopping/ActiveItemList.tsx— Grouped or flat item display; purchased collapsed section -
frontend/src/components/shopping/ShoppingItemCard.tsx— Item row: icon, name, qty/unit, [✓] purchase, [✕] remove — Inline expand for notes, edit, priority badge -
frontend/src/components/shopping/AddItemPanel.tsx— Bottom sheet / inline panel — Search input, Used Before section, category browser — Free-text new item mini-form -
frontend/src/components/shopping/UsedBeforeGrid.tsx— Horizontal pill/card grid of recent purchases at top of add panel -
frontend/src/components/shopping/NewListModal.tsx— Create list dialog: name, list_type, grouping_mode -
frontend/src/components/shopping/ShoppingDashboardWidget.tsx— Dashboard summary card -
frontend/src/components/shopping/ShoppingShiftWidget.tsx— Compact widget within shift detail panel
Frontend — State & API calls
Section titled “Frontend — State & API calls”- Add shopping API functions to
frontend/src/lib/api.ts—fetchShoppingLists(),createShoppingList(),updateShoppingList()—fetchShoppingItems(),addShoppingItem(),updateShoppingItem()—purchaseItem(),unpurchaseItem(),removeItem(),clearPurchased()—fetchUsedBefore(),searchCatalog(),fetchCatalogCategories()—submitCatalogSuggestion() - Add Shopping tab to
Layout.tsxnav items (gated byshoppingmodule) - Add Shopping widget to
Dashboard.tsx - Add Shopping widget to shift detail component
- SSE handler:
shopping_list_updated→ invalidate and re-fetch list items
Frontend — Admin
Section titled “Frontend — Admin”-
frontend/src/pages/admin/ShoppingCatalogAdmin.tsx— Suggestion review queue: pending suggestions, frequency ranking, approve/reject/merge — Catalog item CRUD: add item, edit item, manage aliases — Accessible to super-admins only
Navigation
Section titled “Navigation”- Add Shopping to
navItemsinLayout.tsx— Icon:ShoppingCart(Lucide) — Route:/shopping— Module gate:shopping— Mobile bottom tab: between Calendar and More
Testing
Section titled “Testing”-
backend/tests/test_shopping.py— Add item, purchase, unpurchase, remove, clear — Patient isolation (user cannot access another patient’s lists) — Observer can purchase but cannot add — Module gate returns 402 without subscription — Recurring item reset logic — Catalog search returns aliases -
backend/tests/test_catalog_admin.py— Suggestion dedup (same name, different tenants increments count) — Approve suggestion creates catalog item — Merge adds alias
Open items for future phases
Section titled “Open items for future phases”| Item | Phase |
|---|---|
| Soft “claiming” state (I’m getting this) | Phase 8 |
| Store layout profiles (aisle order per supermarket) | Phase 8 |
| Phase 8 icon upgrade: SVG illustration set replacing emoji | Phase 8 |
| Machine-translated category/subcategory names (non-English locales) | Phase 8 |
| Apple Watch / voice input | Phase 9 |
| Standalone deployment packaging (separate Docker image) | Phase 9 |
| List sharing across tenants (e.g. two families sharing care) | Phase 10 |
| Barcode scan to add item (maps barcode → catalog_item_id) | Phase 10 |
| Integration with external pharmacy delivery APIs | Phase 10 |
| RTL layout support (Arabic, Hebrew) | Phase 10 |
16. Localisation & Internationalisation
Section titled “16. Localisation & Internationalisation”16.1 The problem
Section titled “16.1 The problem”The same item has many names depending on where the user is. This is not merely a translation problem — it is a synonym problem that exists within a single language. An Australian user types “capsicum”; an American user types “bell pepper”; a British user types “pepper”. All refer to the same catalog item. The system must resolve all three to the canonical record and display the item back in the user’s own terminology.
en-AU (canonical) en-US en-GB fr-FR───────────────── ────────────────── ────────────────── ──────────────Capsicum ──► Bell pepper Pepper PoivronZucchini ──► Zucchini Courgette CourgetteBeef mince ──► Ground beef Beef mince Bœuf hachéPrawns ──► Shrimp Prawns CrevettesCoriander ──► Cilantro Coriander CoriandreBiscuits ──► Cookies Biscuits BiscuitsParacetamol ──► Acetaminophen Paracetamol ParacétamolNappy ──► Diaper Nappy CouchePram ──► Stroller Pram Poussette16.2 Locale resolution chain
Section titled “16.2 Locale resolution chain”When returning item names to the client, the backend resolves display names in this order:
1. Tenant preferred_locale (set in tenant_shopping_settings) │ if null ↓2. Request Accept-Language header (or ?locale= query param) │ if no match ↓3. Language-family match (e.g. 'fr-CA' → try 'fr-FR' translations) │ if no match ↓4. Canonical name (en-AU — always present, never null)The resolved locale is returned as locale_used in every CatalogSearchResult so the frontend can display a subtle indicator when a fallback was used (e.g. showing the canonical name in brackets for items without a translation in the user’s locale).
16.3 How locale data is stored
Section titled “16.3 How locale data is stored”Item-level localisation uses catalog_item_aliases with is_primary_for_locale = true. This means the alias table serves two purposes:
- Synonym matching (searching “capsicum” also finds “bell pepper” regardless of locale)
- Locale display name (for
en-US, the primary display name of that item is “Bell pepper”)
This design avoids a separate translations table for items while still supporting arbitrary locales. The canonical_name in catalog_items.name is always en-AU.
Category and subcategory localisation uses dedicated translation tables (catalog_category_translations, catalog_subcategory_translations) since categories have no synonyms — they have one correct name per locale.
16.4 Locale tags in use (Phase 7)
Section titled “16.4 Locale tags in use (Phase 7)”Phase 7 seeds the following locales for English-speaking markets. Non-English locales are stored in the schema but machine-translated content is a Phase 8 concern.
| Locale | Region | Notable differences from en-AU |
|---|---|---|
en-AU | Australia | Canonical. Capsicum, Zucchini, Prawns, Paracetamol, Nappy, Bin liner |
en-US | United States | Bell pepper, Zucchini, Shrimp, Acetaminophen/Tylenol (generic), Diaper, Trash bag |
en-GB | United Kingdom | Pepper, Courgette, Prawns, Paracetamol, Nappy, Bin bag |
en-NZ | New Zealand | Very close to en-AU; Capsicum, Courgette (NZ uses UK term), Prawns |
en-CA | Canada | Bell pepper, Zucchini, Shrimp, Acetaminophen, Diaper, Garbage bag |
16.5 Locale detection on the frontend
Section titled “16.5 Locale detection on the frontend”The client determines the user’s locale at startup:
export function resolveLocale(tenantPreferredLocale: string | null): string { // 1. Tenant admin has set a preferred locale if (tenantPreferredLocale) return tenantPreferredLocale;
// 2. Browser / OS locale const browserLocale = navigator.language; // e.g. 'en-US', 'fr-FR', 'en-AU' if (browserLocale) return browserLocale;
// 3. Default return 'en-AU';}The resolved locale is sent with every catalog API request:
- As the
Accept-LanguageHTTP header (standard, handled automatically by browserfetch) - Optionally as
?locale=en-USquery parameter for explicit overrides
16.6 Alias seeding — Phase 7 priority list
Section titled “16.6 Alias seeding — Phase 7 priority list”The seed script seeds these aliases as is_primary_for_locale = true for the relevant locale, making them the display name in that region. The same records also function as search synonyms for all locales.
| Canonical (en-AU) | en-US | en-GB | en-NZ | en-CA |
|---|---|---|---|---|
| Capsicum | Bell pepper | Pepper | Capsicum | Bell pepper |
| Zucchini | Zucchini | Courgette | Courgette | Zucchini |
| Beef mince | Ground beef | Beef mince | Beef mince | Ground beef |
| Prawns | Shrimp | Prawns | Prawns | Shrimp |
| Coriander | Cilantro | Coriander | Coriander | Cilantro |
| Rocket (salad) | Arugula | Rocket | Rocket | Arugula |
| Spring onion | Scallion | Spring onion | Spring onion | Green onion |
| Eggplant | Eggplant | Aubergine | Eggplant | Eggplant |
| Biscuits | Cookies | Biscuits | Biscuits | Cookies |
| Chips (savoury) | Chips / Crisps | Crisps | Chips | Chips |
| Chips (frozen) | French fries | Chips | Chips | French fries |
| Paracetamol | Acetaminophen | Paracetamol | Paracetamol | Acetaminophen |
| Nappy | Diaper | Nappy | Nappy | Diaper |
| Bin liner | Trash bag | Bin bag | Bin liner | Garbage bag |
| Tomato sauce | Ketchup | Tomato ketchup | Tomato sauce | Ketchup |
| Caster sugar | Superfine sugar | Caster sugar | Caster sugar | Fruit sugar |
| Bicarbonate of soda | Baking soda | Bicarbonate of soda | Baking soda | Baking soda |
| Fairy floss | Cotton candy | Candyfloss | Fairy floss | Cotton candy |
| Sultanas | Raisins/Sultanas | Sultanas | Sultanas | Raisins |
| Icing sugar | Powdered sugar | Icing sugar | Icing sugar | Icing sugar |
| Thickened cream | Heavy cream | Double cream | Thickened cream | Heavy cream |
| Sour cream | Sour cream | Soured cream | Sour cream | Sour cream |
| Continence pads | Incontinence pads | Incontinence pads | Continence pads | Incontinence pads |
| Absorbent underwear | Adult diapers | Incontinence pants | Absorbent underwear | Incontinence briefs |
| Walking frame | Walker | Zimmer frame | Walking frame | Walker |
| Walking stick | Cane | Walking stick | Walking stick | Cane |
| Pressure mattress | Pressure relief mattress | Pressure mattress | Pressure mattress | Pressure redistribution mattress |
16.7 Future non-English locales (Phase 8)
Section titled “16.7 Future non-English locales (Phase 8)”The schema and API are fully prepared for non-English translations. Phase 8 will:
- Run machine translation (DeepL or Google Translate API) over all canonical names and category names to generate seed translations for
fr-FR,de-DE,es-ES,it-IT,zh-CN,vi,ar. - Platform admin reviews and corrects machine-translated catalog names via the super-admin Catalog Admin UI.
- RTL layout adjustments (
dir="rtl"on the shopping screen shell) for Arabic and Hebrew. - Locale picker in user profile settings (overrides device locale).
17. Expanded Catalog — Full Item Reference
Section titled “17. Expanded Catalog — Full Item Reference”This section is the master reference for the Phase 7 catalog seed. It maps directly to backend/scripts/seed_shopping_catalog.py. Items are listed with their canonical en-AU name, emoji icon, default unit, and default quantity.
Aliases (regional synonyms) are seeded from §16.6 above. Every item without a personal emoji inherits its subcategory emoji at render time.
17.1 Groceries — complete item list
Section titled “17.1 Groceries — complete item list”Fresh Fruit
Section titled “Fresh Fruit”| Item | Emoji | Default unit | Default qty |
|---|---|---|---|
| Apple | 🍎 | each | 6 |
| Banana | 🍌 | bunch | 1 |
| Orange | 🍊 | each | 4 |
| Pear | 🍐 | each | 4 |
| Grapes | 🍇 | bunch | 1 |
| Strawberries | 🍓 | punnet | 1 |
| Blueberries | 🫐 | punnet | 1 |
| Raspberries | 🫐 | punnet | 1 |
| Blackberries | 🫐 | punnet | 1 |
| Watermelon | 🍉 | each | 1 |
| Rockmelon | 🍈 | each | 1 |
| Honeydew melon | 🍈 | each | 1 |
| Mango | 🥭 | each | 2 |
| Avocado | 🥑 | each | 2 |
| Lemon | 🍋 | each | 4 |
| Lime | 🍋 | each | 4 |
| Mandarin | 🍊 | bag | 1 |
| Kiwifruit | 🥝 | each | 4 |
| Pineapple | 🍍 | each | 1 |
| Passionfruit | 🍊 | each | 4 |
| Nectarines | 🍑 | each | 4 |
| Peaches | 🍑 | each | 4 |
| Plums | 🍑 | each | 4 |
| Apricots | 🍑 | each | 4 |
| Cherries | 🍒 | bag | 1 |
| Figs | 🍊 | each | 4 |
| Pomegranate | 🍊 | each | 1 |
| Dragon fruit | 🍊 | each | 1 |
| Lychee | 🍊 | bag | 1 |
| Papaya | 🍈 | each | 1 |
| Grapefruit | 🍊 | each | 2 |
Fresh Vegetables
Section titled “Fresh Vegetables”| Item | Emoji | Default unit | Default qty |
|---|---|---|---|
| Potato | 🥔 | kg | 1 |
| Sweet potato | 🥔 | each | 2 |
| Carrot | 🥕 | bunch | 1 |
| Onion | 🧅 | each | 3 |
| Red onion | 🧅 | each | 2 |
| Shallots | 🧅 | bunch | 1 |
| Spring onion | 🧅 | bunch | 1 |
| Leek | 🧅 | each | 1 |
| Garlic | 🧄 | bulb | 1 |
| Ginger | 🧄 | piece | 1 |
| Broccoli | 🥦 | head | 1 |
| Cauliflower | 🥦 | head | 1 |
| Cabbage | 🥬 | head | 1 |
| Red cabbage | 🥬 | head | 1 |
| Brussels sprouts | 🥦 | bag | 1 |
| Zucchini | 🥒 | each | 2 |
| Eggplant | 🍆 | each | 1 |
| Capsicum | 🫑 | each | 2 |
| Chilli | 🌶️ | each | 4 |
| Corn | 🌽 | each | 2 |
| Asparagus | 🌿 | bunch | 1 |
| Green beans | 🌿 | bag | 1 |
| Snow peas | 🌿 | bag | 1 |
| Sugar snap peas | 🌿 | bag | 1 |
| Bok choy | 🥬 | bunch | 1 |
| Spinach | 🥬 | bag | 1 |
| Baby spinach | 🥬 | bag | 1 |
| Kale | 🥬 | bunch | 1 |
| Silverbeet | 🥬 | bunch | 1 |
| Lettuce | 🥬 | head | 1 |
| Rocket | 🥬 | bag | 1 |
| Wombok | 🥬 | head | 1 |
| Beetroot | 🟤 | bunch | 1 |
| Pumpkin | 🎃 | kg | 0.5 |
| Butternut pumpkin | 🎃 | each | 1 |
| Mushrooms | 🍄 | punnet | 1 |
| Swiss brown mushrooms | 🍄 | punnet | 1 |
| Portobello mushrooms | 🍄 | each | 4 |
| Celery | 🌿 | bunch | 1 |
| Fennel | 🌿 | each | 1 |
| Cucumber | 🥒 | each | 1 |
| Tomato | 🍅 | each | 4 |
| Cherry tomatoes | 🍅 | punnet | 1 |
| Roma tomatoes | 🍅 | each | 4 |
| Radish | 🌿 | bunch | 1 |
| Parsnip | 🥕 | each | 2 |
| Turnip | 🥔 | each | 2 |
| Celeriac | 🥔 | each | 1 |
| Artichoke | 🌿 | each | 2 |
Salad & Herbs
Section titled “Salad & Herbs”| Item | Emoji | Default unit | Default qty |
|---|---|---|---|
| Mixed salad leaves | 🥗 | bag | 1 |
| Rocket | 🥬 | bag | 1 |
| Coleslaw mix | 🥗 | bag | 1 |
| Parsley | 🌿 | bunch | 1 |
| Coriander | 🌿 | bunch | 1 |
| Basil | 🌿 | bunch | 1 |
| Mint | 🌿 | bunch | 1 |
| Thyme | 🌿 | bunch | 1 |
| Rosemary | 🌿 | bunch | 1 |
| Dill | 🌿 | bunch | 1 |
| Chives | 🌿 | bunch | 1 |
| Lemongrass | 🌿 | stalk | 2 |
| Kaffir lime leaves | 🌿 | pack | 1 |
| Tarragon | 🌿 | bunch | 1 |
| Sage | 🌿 | bunch | 1 |
| Bay leaves (fresh) | 🌿 | bunch | 1 |
Meat — Poultry
Section titled “Meat — Poultry”| Item | Emoji | Default unit | Default qty |
|---|---|---|---|
| Chicken breast | 🍗 | kg | 0.5 |
| Chicken thighs | 🍗 | kg | 0.5 |
| Chicken wings | 🍗 | kg | 0.5 |
| Chicken drumsticks | 🍗 | pack | 1 |
| Whole chicken | 🍗 | each | 1 |
| Chicken mince | 🍗 | kg | 0.5 |
| Turkey breast | 🍗 | kg | 0.5 |
| Turkey mince | 🍗 | kg | 0.5 |
| Duck breast | 🦆 | each | 2 |
| Quail | 🦆 | each | 2 |
Meat — Beef
Section titled “Meat — Beef”| Item | Emoji | Default unit | Default qty |
|---|---|---|---|
| Beef mince | 🥩 | kg | 0.5 |
| Beef steak | 🥩 | each | 2 |
| Eye fillet | 🥩 | each | 2 |
| Sirloin | 🥩 | each | 2 |
| Rump steak | 🥩 | each | 2 |
| Beef stir fry strips | 🥩 | kg | 0.3 |
| Roast beef | 🥩 | kg | 1 |
| Corned beef | 🥩 | kg | 1 |
| Veal cutlets | 🥩 | each | 2 |
| Osso bucco | 🥩 | each | 2 |
| Beef short ribs | 🥩 | pack | 1 |
Meat — Pork & Lamb
Section titled “Meat — Pork & Lamb”| Item | Emoji | Default unit | Default qty |
|---|---|---|---|
| Pork chops | 🥓 | pack | 1 |
| Pork mince | 🥓 | kg | 0.5 |
| Pork belly | 🥓 | kg | 0.5 |
| Pork roast | 🥓 | kg | 1 |
| Bacon | 🥓 | pack | 1 |
| Pancetta | 🥓 | pack | 1 |
| Ham | 🥓 | pack | 1 |
| Prosciutto | 🥩 | pack | 1 |
| Lamb chops | 🥩 | pack | 1 |
| Lamb mince | 🥩 | kg | 0.5 |
| Lamb roast | 🥩 | kg | 1 |
| Lamb shanks | 🥩 | each | 2 |
| Rack of lamb | 🥩 | each | 1 |
Processed Meats
Section titled “Processed Meats”| Item | Emoji | Default unit | Default qty |
|---|---|---|---|
| Sausages | 🌭 | pack | 1 |
| Chorizo | 🌭 | each | 2 |
| Salami | 🌭 | pack | 1 |
| Pepperoni | 🌭 | pack | 1 |
| Deli meats | 🌭 | pack | 1 |
| Hot dogs | 🌭 | pack | 1 |
| Kransky | 🌭 | pack | 1 |
| Cabanossi | 🌭 | pack | 1 |
Seafood
Section titled “Seafood”| Item | Emoji | Default unit | Default qty |
|---|---|---|---|
| Salmon | 🐟 | fillet | 2 |
| Tuna fillet | 🐟 | fillet | 2 |
| White fish fillets | 🐟 | fillet | 2 |
| Barramundi | 🐟 | fillet | 2 |
| Snapper | 🐟 | fillet | 2 |
| Flathead | 🐟 | fillet | 2 |
| Bream | 🐟 | each | 1 |
| Prawns | 🦐 | kg | 0.5 |
| Crab | 🦀 | each | 1 |
| Mussels | 🦪 | bag | 1 |
| Oysters | 🦪 | dozen | 1 |
| Scallops | 🦪 | pack | 1 |
| Calamari | 🦑 | pack | 1 |
| Octopus | 🐙 | pack | 1 |
| Fish cakes | 🐟 | pack | 1 |
Milk & Alternatives
Section titled “Milk & Alternatives”| Item | Emoji | Default unit | Default qty |
|---|---|---|---|
| Full cream milk | 🥛 | litre | 2 |
| Skim milk | 🥛 | litre | 2 |
| Reduced fat milk | 🥛 | litre | 2 |
| Lactose free milk | 🥛 | litre | 1 |
| A2 milk | 🥛 | litre | 1 |
| Almond milk | 🥛 | litre | 1 |
| Oat milk | 🥛 | litre | 1 |
| Soy milk | 🥛 | litre | 1 |
| Coconut milk (drinking) | 🥛 | litre | 1 |
| Rice milk | 🥛 | litre | 1 |
| Macadamia milk | 🥛 | litre | 1 |
| Hemp milk | 🥛 | litre | 1 |
Cheese
Section titled “Cheese”| Item | Emoji | Default unit | Default qty |
|---|---|---|---|
| Cheddar | 🧀 | block | 1 |
| Mozzarella | 🧀 | ball | 1 |
| Parmesan | 🧀 | block | 1 |
| Tasty cheese | 🧀 | block | 1 |
| Feta | 🧀 | block | 1 |
| Goat cheese | 🧀 | log | 1 |
| Brie | 🧀 | wheel | 1 |
| Camembert | 🧀 | wheel | 1 |
| Cream cheese | 🧀 | tub | 1 |
| Ricotta | 🧀 | tub | 1 |
| Cottage cheese | 🧀 | tub | 1 |
| Haloumi | 🧀 | pack | 1 |
| Colby | 🧀 | block | 1 |
| Gruyère | 🧀 | block | 1 |
| Blue cheese | 🧀 | wedge | 1 |
| Sliced cheese | 🧀 | pack | 1 |
| Item | Emoji | Default unit | Default qty |
|---|---|---|---|
| Free range eggs | 🥚 | dozen | 1 |
| Cage free eggs | 🥚 | dozen | 1 |
| Organic eggs | 🥚 | dozen | 1 |
| Barn laid eggs | 🥚 | dozen | 1 |
| Duck eggs | 🥚 | half dozen | 1 |
Butter & Spreads
Section titled “Butter & Spreads”| Item | Emoji | Default unit | Default qty |
|---|---|---|---|
| Butter | 🧈 | block | 1 |
| Salted butter | 🧈 | block | 1 |
| Unsalted butter | 🧈 | block | 1 |
| Margarine | 🧈 | tub | 1 |
| Spreadable butter | 🧈 | tub | 1 |
| Ghee | 🧈 | jar | 1 |
| Item | Emoji | Default unit | Default qty |
|---|---|---|---|
| White bread | 🍞 | loaf | 1 |
| Wholemeal bread | 🍞 | loaf | 1 |
| Multigrain bread | 🍞 | loaf | 1 |
| Sourdough | 🍞 | loaf | 1 |
| Gluten free bread | 🍞 | loaf | 1 |
| Rye bread | 🍞 | loaf | 1 |
| Spelt bread | 🍞 | loaf | 1 |
| Low-GI bread | 🍞 | loaf | 1 |
| Seeded bread | 🍞 | loaf | 1 |
| Bread rolls | 🥖 | pack | 1 |
| Bagels | 🥯 | pack | 1 |
| Burger buns | 🥖 | pack | 1 |
| Hot dog rolls | 🥖 | pack | 1 |
| Croissants | 🥐 | pack | 1 |
| Wraps | 🫓 | pack | 1 |
| Tortillas | 🫓 | pack | 1 |
| Naan | 🫓 | pack | 1 |
| Pita bread | 🫓 | pack | 1 |
| Mountain bread | 🫓 | pack | 1 |
| Muffins | 🧁 | pack | 1 |
| Cake | 🎂 | each | 1 |
17.2 Pharmacy & Medical — complete item list
Section titled “17.2 Pharmacy & Medical — complete item list”(Selected key items; full list in seed script)
| Item | Emoji | Default unit | Default qty |
|---|---|---|---|
| Prescription medication | 💊 | (free text) | 1 |
| Paracetamol tablets | 💊 | pack | 1 |
| Ibuprofen tablets | 💊 | pack | 1 |
| Aspirin tablets | 💊 | pack | 1 |
| Antihistamine tablets | 💊 | pack | 1 |
| Antacid | 💊 | pack | 1 |
| Laxative | 💊 | pack | 1 |
| Cough syrup | 🍶 | bottle | 1 |
| Throat lozenges | 💊 | pack | 1 |
| Nasal spray | 💉 | each | 1 |
| Saline nasal rinse | 💉 | pack | 1 |
| Eye drops | 👁️ | bottle | 1 |
| Ear drops | 👂 | bottle | 1 |
| Vitamin C | 💊 | pack | 1 |
| Vitamin D3 | 💊 | pack | 1 |
| Multivitamin | 💊 | pack | 1 |
| Fish oil | 💊 | pack | 1 |
| Magnesium | 💊 | pack | 1 |
| Probiotics | 💊 | pack | 1 |
| Blood glucose strips | 🩸 | pack | 1 |
| Lancets | 🩸 | pack | 1 |
| Insulin pen needles | 💉 | box | 1 |
| Adhesive bandages | 🩹 | pack | 1 |
| Gauze dressings | 🩹 | pack | 1 |
| Antiseptic cream | 🩹 | tube | 1 |
| Disposable pads (continence) | 🩱 | pack | 1 |
| Absorbent underwear | 🩱 | pack | 1 |
| Pull-up pants | 🩱 | pack | 1 |
| Bed underpads | 🩱 | pack | 1 |
| Nitrile gloves | 🧤 | box | 1 |
| Alcohol wipes | 🧤 | pack | 1 |
| Pill organiser | 💊 | each | 1 |
| Digital thermometer | 🌡️ | each | 1 |
| Walking frame tennis balls | 🦯 | pack | 1 |
| Non-slip socks (medical) | 🧦 | pair | 2 |
17.3 Personal Care — complete item list
Section titled “17.3 Personal Care — complete item list”(Selected key items)
| Item | Emoji | Default unit | Default qty |
|---|---|---|---|
| Body wash | 🧴 | bottle | 1 |
| Soap bar | 🧼 | each | 2 |
| Hand wash | 🧴 | bottle | 1 |
| Shampoo | 🧴 | bottle | 1 |
| Conditioner | 🧴 | bottle | 1 |
| Dry shampoo | 🧴 | can | 1 |
| Toothpaste | 🦷 | tube | 1 |
| Toothbrush | 🪥 | each | 1 |
| Electric toothbrush heads | 🪥 | pack | 1 |
| Dental floss | 🦷 | pack | 1 |
| Mouthwash | 🦷 | bottle | 1 |
| Denture adhesive | 🦷 | tube | 1 |
| Denture cleaner | 🦷 | pack | 1 |
| Moisturiser | 🌸 | tub | 1 |
| Sunscreen SPF50+ | ☀️ | bottle | 1 |
| Deodorant | 🪒 | each | 1 |
| Razors | 🪒 | pack | 1 |
| Pads | 🌺 | pack | 1 |
| Tampons | 🌺 | pack | 1 |
| Baby wipes | 👶 | pack | 2 |
| Nappies | 👶 | pack | 1 |
| Socks | 👕 | pair | 3 |
| Non-slip socks | 🧦 | pair | 2 |
| Compression stockings | 🧦 | pair | 1 |
| Pyjamas | 👕 | set | 1 |
| Slippers | 👟 | pair | 1 |
| Incontinence briefs | 🩲 | pack | 1 |
17.4 Services — complete item list
Section titled “17.4 Services — complete item list”| Item | Emoji | Item type | Default unit | Default qty |
|---|---|---|---|---|
| House cleaning | 🧹 | service | session | 1 |
| Deep clean | 🧹 | service | session | 1 |
| Window cleaning | 🧹 | service | session | 1 |
| Lawn mowing | 🌱 | service | session | 1 |
| Garden maintenance | 🌱 | service | session | 1 |
| Physiotherapy session | 🏥 | service | session | 1 |
| Occupational therapy | 🏥 | service | session | 1 |
| Podiatry | 🏥 | service | session | 1 |
| Speech therapy | 🏥 | service | session | 1 |
| Dietitian consultation | 🏥 | service | session | 1 |
| Massage therapy | 🏥 | service | session | 1 |
| Psychology session | 🧠 | service | session | 1 |
| Counselling session | 🧠 | service | session | 1 |
| Hairdresser | ✂️ | service | session | 1 |
| Mobile hairdresser | ✂️ | service | session | 1 |
| Barber | ✂️ | service | session | 1 |
| Nail care | 💅 | service | session | 1 |
| Medical transport | 🚑 | service | booking | 1 |
| NDIS transport | 🚑 | service | booking | 1 |
| Wheelchair-accessible taxi | 🚑 | service | booking | 1 |
| Medication delivery | 📦 | service | delivery | 1 |
| Meals on Wheels | 📦 | service | delivery | 1 |
| Meal delivery service | 📦 | service | delivery | 1 |
| Respite care | 🤝 | service | session | 1 |
| Plumber | 🔧 | service | visit | 1 |
| Electrician | 🔧 | service | visit | 1 |
| Handyman | 🔧 | service | visit | 1 |
| Grab rail installation | 🔧 | service | job | 1 |
| Ramp installation | 🔧 | service | job | 1 |
17.5 Equipment & Aids — complete item list
Section titled “17.5 Equipment & Aids — complete item list”| Item | Emoji | Default unit | Default qty |
|---|---|---|---|
| Walking stick | 🦯 | each | 1 |
| Quad cane | 🦯 | each | 1 |
| Walking frame | 🦯 | each | 1 |
| Rollator | 🦯 | each | 1 |
| Manual wheelchair | ♿ | each | 1 |
| Transport wheelchair | ♿ | each | 1 |
| Power wheelchair | ♿ | each | 1 |
| Crutches | 🦯 | pair | 1 |
| Shower chair | 🚿 | each | 1 |
| Shower stool | 🚿 | each | 1 |
| Bath board | 🚿 | each | 1 |
| Raised toilet seat | 🚿 | each | 1 |
| Toilet frame | 🚿 | each | 1 |
| Grab rail | 🚿 | each | 1 |
| Non-slip bath mat | 🚿 | each | 1 |
| Commode chair | 🚿 | each | 1 |
| Pressure cushion | 🛏️ | each | 1 |
| Gel cushion | 🛏️ | each | 1 |
| Pressure mattress overlay | 🛏️ | each | 1 |
| Heel protectors | 🛏️ | pair | 1 |
| Bed rail | 🛏️ | each | 1 |
| Bed wedge pillow | 🛏️ | each | 1 |
| Overbed table | 🛏️ | each | 1 |
| Monkey pole | 🛏️ | each | 1 |
| Slide sheet | 🛏️ | each | 1 |
| Large print calendar | 👁️ | each | 1 |
| Magnifying glass | 👁️ | each | 1 |
| Talking clock | 👁️ | each | 1 |
| Hearing aid batteries | 👂 | pack | 1 |
| Non-slip mat | 🏠 | each | 1 |
| Jar opener | 🍴 | each | 1 |
| Long handled reacher | 🍴 | each | 1 |
| Adapted cutlery | 🍴 | set | 1 |
| Non-slip plate | 🍴 | each | 1 |
| Cup with two handles | 🍴 | each | 1 |
| Sock aid | 🧦 | each | 1 |
| Urinal bottle | 🚰 | each | 1 |
| Bedpan | 🚰 | each | 1 |
| Catheter leg bag | 🚰 | each | 1 |
| Catheter night bag | 🚰 | each | 1 |