Powers patient-facing meal ordering in MyChart Bedside by filtering dining menus against live diet orders and documented allergies, so patients only see meals they are actually cleared to eat. API-led MuleSoft layer between foodservice systems and Epic.
Tags: healthcare, epic, fhir, us-core, hl7v2, api-led, patient-access, interoperability
Bedside Dining
Objective: Hospital dining must reconcile two systems that rarely talk: the foodservice menu catalog and the patient's chart. A patient on a renal, low-sodium, or NPO diet must never see a menu item that violates that order, and a documented shellfish allergy must silently remove every offending dish. Today this happens on paper or in a foodservice-only system blind to real-time diet changes, causing tray errors and delays. Done looks like MyChart Bedside showing each patient a personalized, pre-filtered menu reflecting the current NutritionOrder and AllergyIntolerance, with every selection written back as a fulfillable, auditable kitchen order. This accelerator packages the Bedside Dining Epic Data Sharing Playbook as a MuleSoft-anchored solution plan.
What's Getting Built
- Menu Catalog (System API) — normalizes the foodservice menu catalog into a canonical model with per-item allergen flags and nutrient facts ·
GET /menu, GET /menu/{mealPeriod}
- Diet Orders (System API) — ingests HL7v2 diet-order messages over the interface feed and reads FHIR NutritionOrder and AllergyIntolerance ·
MLLP LISTEN ORM/OMG, GET /NutritionOrder, GET /AllergyIntolerance
- Menu Filter (Process API) — joins cached catalog with the live diet order and allergy list to compose a personalized, filtered menu keyed on the encounter ·
POST /filter, GET /menu/{encounterId}
- Bedside Menu (Experience API) — serves the MyChart Bedside filtered menu and accepts patient meal selections with idempotent submit ·
GET /bedside/menu, POST /bedside/order
- Meal Order Writeback to Kitchen (target) — persists the accepted selection as a fulfillable kitchen order and emits a tray confirmation event ·
POST /kitchen/order
Prerequisites
- Epic MyChart Bedside licensed and deployed on inpatient tablets, with the dining feature enabled by Epic client systems
- Bridges interface engine configured to emit diet-order feeds, or FHIR R4 read access to NutritionOrder and AllergyIntolerance resources
- Foodservice menu system (for example CBORD or Vromba) exposing a menu catalog with itemized nutrient and allergen metadata
- Anypoint Platform environment with CloudHub or RTF, plus HTTP, HL7 (MLLP) and Anypoint MQ connectors licensed
- SMART on FHIR backend-services client registered with the Epic App Orchard or vendor services registry, scoped for patient nutrition data
- Diet-code to menu-restriction crosswalk agreed with clinical nutrition and foodservice teams
1. Epic interfaces and standards
This accelerator implements the Bedside Dining Epic Data Sharing Playbook. Register the connecting app on Epic on FHIR and confirm the customer has the relevant Epic modules licensed before building.
- MyChart Bedside (patient inpatient dining and meal ordering)
- FHIR R4 NutritionOrder resource for active diet orders
- FHIR R4 AllergyIntolerance resource for documented food allergies
- HL7v2 ORM/OMG diet-order messages via Bridges
- US Core Patient and Encounter for identity and admission context
- Cogito for tray-accuracy and meal-completion analytics
Architecture
2. Business requirements
- Show each patient only menu items permitted by their current diet order and free of any documented allergen.
- Reflect a diet-order change (NPO, advance diet, texture modification) in the patient's available menu within one meal cycle, not the next day.
- Block ordering entirely when the active order is NPO and display the reason rather than an empty menu.
- Write every meal selection back as a fulfillable kitchen order tied to the patient encounter and meal period.
- Fail closed: when diet or allergy data cannot be confirmed, restrict the menu rather than expose an unsafe item.
3. Ingesting diet orders and menus
- Consume HL7v2 ORM and OMG diet-order messages over MLLP in the Diet-Order System API, or poll FHIR NutritionOrder where the interface feed is unavailable.
- Normalize the foodservice menu catalog into a canonical model with per-item allergen flags and nutrient facts using DataWeave.
- Cache the menu catalog with a short TTL since menus rotate per meal period and per day, but never cache diet orders.
- Stamp every inbound diet message and menu pull with a correlation ID that follows the request through the filter to the writeback.
- Reject menu items lacking allergen metadata rather than assuming they are allergen-free.
4. Filtering against diet and allergy
- Resolve the diet code to a restriction set (sodium, potassium, carbohydrate, texture, fluid) via the agreed crosswalk before filtering.
- Remove any menu item whose allergen flags intersect the patient AllergyIntolerance list, matching on RxNorm and SNOMED substance codes not free-text names.
- Apply texture and consistency modifiers (mechanical soft, pureed, thickened liquids) as hard filters, not warnings.
- Treat an AllergyIntolerance with criticality high or verification status confirmed as an absolute exclusion.
- Return the filtered menu with a machine-readable reason code for each excluded category so the Experience API can explain omissions.
5. Orchestration and writeback
- Compose the personalized menu in the Process API by joining cached catalog, live diet order, and allergy list keyed on the encounter.
- Serve the Experience API response shaped for MyChart Bedside, including meal period, cutoff time, and remaining selections.
- On patient submit, validate the selection once more against the current diet order to catch orders that changed mid-session.
- Persist the accepted selection as a kitchen order and emit a confirmation event the tablet can display.
- Debounce rapid re-submissions with idempotency keys so a double-tap does not create duplicate trays.
6. Error handling and operations
- Route unparseable diet messages and menu records to a dead-letter queue with the original payload and correlation ID.
- Alert on the absence of an expected diet-order refresh for an admitted patient, which is the failure mode that silently serves a stale menu.
- Return a safe empty-menu-with-reason response when the diet order cannot be resolved, never an unfiltered menu.
- Track filter latency against the meal-period cutoff and alert before late filtering causes missed meal orders.
- Replay dead-lettered menu records after a catalog metadata fix without re-triggering patient notifications.
7. Security and compliance
- Encrypt PHI in transit and at rest.
- Audit-log every access to and modification of patient data, and carry a correlation ID end to end.
- Enforce minimum-necessary access for integration operators and support users.
- Scope the SMART backend-services token to nutrition and allergy read only; the dining app has no need for diagnoses or notes.
- Bind every menu response and meal order to a verified admission so a tablet cannot request another patient's diet-filtered menu.
- Never expose raw diet codes or allergy clinical detail in the Experience payload; return only menu items and neutral reason categories.
- Encrypt the cached menu catalog at rest and evict it on meal-period rollover to prevent serving expired offerings.
Sample payload — FHIR R4 NutritionOrder for an active renal, low-sodium diet
{
"resourceType": "NutritionOrder",
"id": "no-88213",
"status": "active",
"intent": "order",
"patient": { "reference": "Patient/Z-4471" },
"encounter": { "reference": "Encounter/E-99102" },
"dateTime": "2026-08-20T06:15:00Z",
"oralDiet": {
"type": [{
"coding": [{
"system": "http://snomed.info/sct",
"code": "307998001",
"display": "Renal diet"
}],
"text": "Renal, 2g sodium, texture regular"
}],
"nutrient": [
{ "modifier": { "text": "Sodium" }, "amount": { "value": 2000, "unit": "mg" } },
{ "modifier": { "text": "Potassium" }, "amount": { "value": 2000, "unit": "mg" } }
],
"texture": [{ "modifier": { "text": "Regular" } }]
}
}
Testing and validation
- Unit-test the diet-code crosswalk so every known diet code maps to a restriction set and unknown codes fail closed.
- Verify with MUnit that a confirmed high-criticality shellfish allergy removes every menu item flagged with that allergen.
- Test the NPO path returns an empty menu with a block reason and disables ordering, not a server error.
- Simulate a mid-session diet change to NPO and confirm the submit-time revalidation rejects the pending selection.
- Feed a menu record with missing allergen metadata and assert it is excluded, not passed through.
- Load-test the Process API filter against the pre-lunch ordering spike to confirm it clears the meal-period cutoff.
Phased rollout
Phase 1 — Connect
- Stand up the System APIs against the foodservice menu catalog and a non-production Epic diet feed or FHIR sandbox.
- Register and validate the SMART backend-services client and confirm NutritionOrder and AllergyIntolerance reads return for test patients.
Phase 2 — Map and test
- Build and clinically review the diet-code to restriction crosswalk and allergen-code matching with nutrition services.
- Run MUnit and end-to-end tests covering renal, diabetic, NPO, texture-modified, and multi-allergy patients.
Phase 3 — Production
- Pilot on one inpatient unit with foodservice staff watching every filtered menu against the paper diet sheet.
- Expand to all units after tray-error and stale-menu alert rates hold below the agreed threshold.
Success metrics
- Tray-error rate for diet or allergy violations reaching the patient (target near zero).
- Percent of diet-order changes reflected in the menu within the same meal cycle.
- Median filter latency from menu request to personalized response.
- Dead-letter volume for menu records missing allergen metadata.
- Meal orders submitted through Bedside versus captured by manual fallback.
Troubleshooting
- A patient sees a menu item that violates their documented allergy. — Likely cause: The menu item carried free-text allergen names that did not match the coded AllergyIntolerance substance. Fix: Switch allergen matching to coded substances (RxNorm/SNOMED) and exclude any item lacking coded allergen metadata.
- Menu still shows advanced-diet items hours after the patient was made NPO. — Likely cause: The diet order was cached alongside the menu catalog instead of read live per request. Fix: Remove diet orders from the cache and resolve NutritionOrder fresh on every menu request and at submit time.
- Duplicate meal trays arrive for one patient and meal period. — Likely cause: A double-tap on submit created two kitchen orders because requests were not idempotent. Fix: Attach an idempotency key per patient, meal period, and session, and debounce repeat submissions in the Experience API.
- Patients on a unit get an empty menu with no explanation. — Likely cause: The diet order could not be resolved and the app failed closed without a reason code. Fix: Return the safe empty-menu response with a neutral block reason and alert on the missing diet-order refresh.
Deliverable: A deployable Anypoint application set (Diet-Order System API, Menu-Filtering Process API, Bedside-Dining Experience API) with DataWeave diet/allergy filter rules, HL7v2 order feed listener, FHIR AllergyIntolerance and NutritionOrder ingestion, DLQ config, and MUnit suites.