Feature #288
openCanteen: D26 — doctor-task + intake-chart write contracts (IPD)
100%
Description
Week 6 D26 (per clinq-docs/modules/canteen-management/plans/2026-10-07-canteen-v1-week-6-tdd-plan.md).
Draft the two remaining IPD write-contracts per consumes.md's gap table, same pattern as D21
(shape on nuvita-shared-kernel, real implementation on nuvita-ipd, branch off
integration/canteen-v1 in each repo, no PR -- team's standing no-PR branch process):
Task 1 -- Doctor-task write contract
DietitianAssessment.Outcome = ChangeRecommended (built D23) currently just records a row.
ADR-0001's own rule is "a recommendation creates a task in IPD" -- no contract exists yet to
call. Check first whether IPD already has a generic task/reminder entity before adding a new
one (platform ownership rule: a second "task" concept is a bug, not a feature).
Task 2 -- Intake-%-to-nursing-chart write contract
Tray.CollectAsync (built D24) records IntakePercent locally; nothing propagates it to IPD's own
nursing chart yet, which is where a ward nurse actually looks for it during rounds. Find out
what IPD's nursing chart actually is (check modules/ipd/data-model.md) before designing the
write -- append to an existing chart entity rather than inventing a parallel intake log.
Depends on: ADR-0001 (accepted 2026-10-07, see #253).
NP Updated by Navya P. about 1 month ago
Task 1 done -- doctor-task write contract.
- nuvita-shared-kernel branch feat/canteen-doctor-task-contract: IDoctorTaskWriteContract
(shape only), Nuvita.Contracts/IPD/IDoctorTaskWriteContract.cs. - nuvita-ipd branch feat/canteen-doctor-task-contract: real DoctorTask entity + DoctorTaskService
- POST api/ipd/internal/doctor-tasks/diet-recommendation. 4/4 new tests green.
Confirmed no generic task/reminder entity already existed in IPD -- checked EscalationEvent
(EWS-deterioration specific) and MdtAction (requires a parent MdtSession) before building a new
one. DietaryOrder.OrderedBy is free text, not a resolvable doctor UserId, so the task is assigned
by name, not a looked-up user id -- that lookup doesn't exist anywhere on this platform today.
Both branches pushed, no PR, per team's standing process. Hit and resolved the known
integration/canteen-v1-is-stale-vs-dev issue (both nuvita-shared-kernel and nuvita-ipd) the same
way D21's ADR note describes: merged dev in locally to build/verify, then reset back to a clean,
scoped diff before pushing -- confirmed the migration/model-snapshot diff only ever touched
DoctorTask, nothing from dev leaked into the pushed commit.
Starting Task 2 next -- intake-%-to-nursing-chart write contract.
NP Updated by Navya P. about 1 month ago
Task 2 done -- intake-chart write contract. D26 is now fully complete.
- nuvita-shared-kernel branch feat/canteen-intake-chart-contract: IIntakeChartWriteContract
(shape only), Nuvita.Contracts/IPD/IIntakeChartWriteContract.cs. - nuvita-ipd branch feat/canteen-intake-chart-contract: real MealIntakeEntry entity +
MealIntakeService + POST api/ipd/internal/meal-intake/{admissionId}. 5/5 new tests green
(8/8 incl. the pre-existing DietaryOrder suite, unaffected).
Confirmed IoEntry (IoChart/) is the wrong home for this -- it is strictly fluid balance
(Input/Output in ml); a tray's intake is a 0-100% figure. Built MealIntakeEntry as its own
parallel entity rather than force-fitting the two, same reasoning as Task 1's DoctorTask vs
EscalationEvent/MdtAction.
Both branches pushed, no PR. Hit the same stale-integration/canteen-v1-vs-dev issue as Task 1,
resolved the same documented way (temporary local dev-merge to build/verify, reset to a clean
scoped commit before pushing) -- confirmed the migration/model-snapshot diff only ever touched
MealIntakeEntry.
D26 complete: both write-contracts drafted + implemented
(feat/canteen-doctor-task-contract, feat/canteen-intake-chart-contract, each in both
nuvita-shared-kernel and nuvita-ipd). Next: D27, wiring the diet-order inbox list page.
NP Updated by Navya P. about 1 month ago
- Status changed from New to Resolved
- % Done changed from 0 to 100
- Resolved By set to Navya P.