mirror of
https://github.com/temetro/temetro.git
synced 2026-08-06 17:07:40 +00:00
feat: org-scoped prescriptions backend, wire prescriptions page
Add the prescriptions table, validation, service and CRUD routes (/api/prescriptions, RBAC-gated; prescriber defaults to the signed-in clinician, prescribedAt to today) and the frontend data module. The page now loads/persists real data and computes its status KPIs. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
// The canonical Prescription shape returned by the API. Mirrors the frontend
|
||||
// `lib/prescriptions.ts` Prescription type. Scoped to the active clinic; patient
|
||||
// fields are denormalized for display and `fileNumber` links to a patient.
|
||||
export type PrescriptionStatus = "active" | "completed" | "expired";
|
||||
|
||||
export type Prescription = {
|
||||
id: string;
|
||||
fileNumber: string;
|
||||
name: string;
|
||||
initials: string;
|
||||
medication: string;
|
||||
dose: string;
|
||||
frequency: string;
|
||||
prescriber: string;
|
||||
prescribedAt: string; // YYYY-MM-DD
|
||||
status: PrescriptionStatus;
|
||||
duration: string | null;
|
||||
notes: string | null;
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
};
|
||||
Reference in New Issue
Block a user