mirror of
https://github.com/temetro/temetro.git
synced 2026-08-11 19:18:03 +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:
@@ -8,6 +8,7 @@ import { errorHandler, notFound } from "./middleware/error.js";
|
||||
import { appointmentsRouter } from "./routes/appointments.js";
|
||||
import { notesRouter } from "./routes/notes.js";
|
||||
import { patientsRouter } from "./routes/patients.js";
|
||||
import { prescriptionsRouter } from "./routes/prescriptions.js";
|
||||
|
||||
const app = express();
|
||||
|
||||
@@ -47,6 +48,7 @@ app.get("/health", (_req, res) => {
|
||||
app.use("/api/patients", patientsRouter);
|
||||
app.use("/api/notes", notesRouter);
|
||||
app.use("/api/appointments", appointmentsRouter);
|
||||
app.use("/api/prescriptions", prescriptionsRouter);
|
||||
|
||||
app.use(notFound);
|
||||
app.use(errorHandler);
|
||||
@@ -57,4 +59,5 @@ app.listen(env.PORT, () => {
|
||||
console.log(` • patients: /api/patients`);
|
||||
console.log(` • notes: /api/notes`);
|
||||
console.log(` • appts: /api/appointments`);
|
||||
console.log(` • rx: /api/prescriptions`);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user