Project

General

Profile

Actions

Feature #345

open
NP NP

Canteen: Patient charges Task 2 -- ListForDateAsync read path + ChargesController

Feature #345: Canteen: Patient charges Task 2 -- ListForDateAsync read path + ChargesController

Added by Navya P. about 1 month ago. Updated about 1 month ago.

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

0%

Estimated time:
Resolved By:

Description

New IDietChargeAccrualService.ListForDateAsync(DateOnly serviceDate, ct): queries existing DietChargeAccrual rows for CurrentHospitalId + date (no synthesizing rows that do not exist yet, same posture as MealSheet.GetAsync), enriched with patient name (IPatientServiceContract.GetPatientNamesByIdsAsync, batched) and admission number (IAdmissionServiceContract.GetAdmissionNumberAsync). New DietChargeLineDto carries PatientName/AdmissionNumber/DietTypeCode alongside the existing charge fields; DietChargeAccrualDto (PostAsync return type) stays untouched so its tests keep passing.

ChargesController at api/canteen/dietary/charges, RequireCapability(CanteenCapabilities.Dietary) -- permission-keys.json already covers patient charges under canteen.dietary:

  • GET (canteen.charges.read) -> ListForDateAsync
  • POST /post-pending (canteen.charges.post) -> AccrueActiveOrdersAsync (task 1), returns a count. Catches up orders with no row yet today; does not retry rows already Pending-with-no-patient (PostAsyncs existing short-circuit).

Auth matrix tests mirroring MealSheetAuthorizationMatrixTests.cs.

Actions

Also available in: PDF Atom