Project

General

Profile

Actions

Feature #385

open
NP NP

Diet charges accrue at the wrong (zero) amount: case mismatch + missing charge master

Feature #385: Diet charges accrue at the wrong (zero) amount: case mismatch + missing charge master

Added by Navya P. 30 days ago. Updated 30 days ago.

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

0%

Estimated time:
Resolved By:

Description

Live bug found while verifying the Diet Charges card (Redmine #383): a real diet order showed Rs0 in IPDs Bill Accrual tab. Root-caused to two independent gaps: (1) nuvita-canteen-management -- DietType.Code is force-uppercased at setup (DietType.GuardCode), but a synced IPD order DietTypeCode arrives exactly as IPDs enum serialises it (PascalCase, e.g. Soft) -- the accrual jobs case-sensitive dictionary lookup missed on every real synced order, silently defaulting to Rs0, and even on a match it reconstructed the billing code from the orders own casing instead of using the catalogs configured BillingCode field. Fixed: case-insensitive lookup (StringComparer.OrdinalIgnoreCase) + use the catalogs own BillingCode. Two new regression tests. (2) nuvita-billing -- Billings charge master had zero DIET-* charges configured for any hospital, so even a correct lookup would have thrown DietChargeNotConfigured. Added BillingCanteenChargeSeedService (hospital-scoped, demo-only, mirrors BillingDiagnosticsChargeSeedServices reasoning -- diet rates are per-hospital configured data, not a fixed platform code), wired into --seed-demo only (excluded from --seed-charges/--seed-profile=ksh-main, same real-tenant-pricing exclusion as Diagnostics). Seeded the 6 DIET-* charges for the Eleven Multispecialty demo hospital (hospital 9) in the local dev DB directly via the new seed service. Canteen unit suite 15/15 (2 new) for the affected tests; Billing unit suite 2061/2061 (4 new) green.

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

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

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

  • Assignee set to Navya P.
Actions

Also available in: PDF Atom