3.0 KiB
3.0 KiB
护理服务执行工作台
Goal
Replace the current 护理服务 placeholder with a real daily care execution workspace. The MVP unit is a persisted care task / service execution record, not a care-plan generation engine.
Confirmed Facts
/app/carecurrently rendersModulePageonly./app/{organizationSlug}/caredelegates to the unscoped care page.- Existing elder, bed, and admission data are persisted in Drizzle.
- Navigation already exposes
护理服务under the operation group. - Historical product direction includes care tasks, dispatch,巡检打卡, service records, and service evaluation.
Requirements
- Add Drizzle-backed care execution records scoped by organization.
- Care records should link to a real elder where applicable.
- Care records should support at least:
- title/name
- care type
- priority
- status
- scheduled time or due time
- assignee label or executor label
- execution notes
- completed time
- Replace
/app/careand/app/{organizationSlug}/carewith a real workspace. - The workspace should show summary metrics, filters, and a dense care task table/list.
- Operators must be able to filter by status, priority, care type, and elder/search terms.
- Authorized operators can mark care items as in progress and completed.
- Completion must persist notes and completion timestamp.
- Mutations must record audit logs.
- Default workspace seed data must include representative care examples covering multiple statuses and care types.
Permissions
- Prefer explicit care permissions if adding new permissions is practical:
care:readcare:manage
- If scope needs to stay smaller, reuse existing
elder:updatetemporarily only if documented in the design. - Server-side permissions are required for all mutation APIs.
Acceptance Criteria
/app/careno longer renders the generic placeholder./app/{organizationSlug}/carerenders the same real care workspace.- Care records are loaded from Drizzle and scoped to the active organization.
- Default seeded workspace includes care tasks tied to seeded elders.
- The UI shows pending, in-progress, completed, and overdue/high-priority examples.
- Authorized users can move a care item to in-progress and completed from the UI.
- Completed care items persist execution notes and completion time.
- Unauthorized mutation attempts return structured failures.
- Care mutations write audit log entries.
pnpm db:generateis run if schema changes are made.pnpm lintpasses.pnpm type-checkpasses.pnpm buildpasses.
Dependencies
- Can start after or parallel with health management because it primarily depends on existing elder/admission data.
- Dashboard integration should wait until this task is complete.
Out Of Scope
- Care plan template management.
- Automatic recurring task generation.
- Service billing or pricing.
- Family notifications.
- Mobile QR/NFC check-in.
- AI care recommendations.
Open Questions
- None currently blocking planning.