Feature #345
openCanteen: Patient charges Task 2 -- ListForDateAsync read path + ChargesController
0%
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.