Project

General

Profile

Actions

Feature #398

open
NP NP

IPD: DietaryOrder reads Admins diet-type catalog instead of a fixed enum (Part 3 of 4)

Feature #398: IPD: DietaryOrder reads Admins diet-type catalog instead of a fixed enum (Part 3 of 4)

Added by Navya P. 29 days ago. Updated 15 days ago.

Status:
Resolved
Priority:
Normal
Assignee:
Target version:
-
Start date:
10/15/2026
Due date:
% Done:

0%

Estimated time:
Resolved By:

Description

Part 3 of the Dietetics/Nutrition workflow (Part 1: Admin, #388; Part 2: HR, #390). Safe, purely-additive expand step per ADR-0002: added a nullable DietTypeCode string column to DietaryOrder alongside the existing (untouched) DietType enum column -- zero risk to existing admission records. When a caller supplies DietTypeCode, DietaryOrderService validates it against Admins active diet-type catalog for the hospital (case-insensitive) and rejects an unknown code at the source instead of letting it silently accrue Rs0 downstream -- the exact failure mode already found and fixed twice this session. An unreachable Admin degrades to the legacy enum path rather than blocking order placement. Old callers that only send DietType keep working unchanged, and now also get DietTypeCode populated going forward. DietaryOrderLookupService (feeds Canteen/Billing) prefers DietTypeCode when present. New GET /api/ipd/dietary-orders/diet-types endpoint exposes Admins live catalog for the order form. Also brought the branch current with devs 26 commits and fixed two unrelated pre-existing kernel gaps from the already-merged doctor-module work that blocked the build (Redmine #397, separate commit). Full suite 1751/1751 green, including the new Testcontainers-backed migration.

NP Updated by Navya P. 29 days ago Actions #1

  • Assignee set to Navya P.

NP Updated by Navya P. 27 days ago Actions #2

  • Status changed from New to Resolved
  • Resolved By set to Navya P.

Both parts of ADR-0002's full fix are done. Part 3 (IPD, this issue's own description): DietaryOrder.DietTypeCode added additively alongside the legacy enum, validated against Admin's live catalog, fails open to the enum path if Admin is unreachable. Part 4 (Canteen, commit 211f252, same Redmine trailer): DietTypeCatalog swapped from the local diet_types table to IAdminServiceContract; demo seeder now writes through Admin too; the now-unread local table is left in place deliberately as a lower-risk follow-up (expand-then-contract). IPD's side is on feat/canteen-admission-lookup, now in open PR github.com/nuvita-expericia/nuvita-ipd/pull/4 awaiting review. Canteen's side is already pushed to integration/canteen-v1 (no PR needed, per that repo's convention). Full suites green on both sides. Nothing left open on this issue.

NP Updated by Navya P. 15 days ago Actions #3

Several commits on integration/canteen-v1 were pushed with a "Redmine: Feature #398" trailer in error, carrying this issue's number over from the last commit made before that work started. They are unrelated to this issue (the IPD DietaryOrder diet-type catalog work) and have now been given their own issues instead:

  • #659 Production: diet-type recipe assignment -- the cook sheet had no way to be filled in (commits 0d5dec8, 786edbd)
  • #660 POS: post sale consumption to the cook sheet's Served-so-far, live (commit dc892a0)
  • #661 POS: search an employee by name, not just their card number (commit 8bf97e9)
  • #662 Canteen: prototype-matching batch -- Reports, Tray rounds, Diet orders, Hygiene, Recipes, Settings, Meal sheet, Diet charges, Production (commits 5cf45af, 05aa727, 88e89a4, 3dcd44e, f276c56, d07cd21, b9c2194, 04f27df, 11967be, b52f2f1, 9472821, c06d530, 8fd92e9)

Not fixing the trailers themselves -- integration/canteen-v1 is shared and already pushed, so git history stays as-is; this note is the correction.

Actions

Also available in: PDF Atom