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.

NP Updated by Navya P. about 1 month ago Actions #1

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

Done. ListForDateAsync + DietChargeLineDto + ChargesController (GET, POST post-pending). Added FakeExternalReads.cs to CanteenApiFixture for IAdmissionServiceContract/IPatientServiceContract, which this is the first endpoint to reach. 9 service tests + 6 auth matrix tests, all new. 563 unit + 826/828 integration (2 pre-existing unrelated Coupon_liability failures). nuvita-canteen-management@bd07811, pushed to integration/canteen-v1.

NP Updated by Navya P. about 1 month ago Actions #2

  • Assignee set to Navya P.
Actions

Also available in: PDF Atom