diff --git a/backend/package-lock.json b/backend/package-lock.json index f6bcd9b..e8b53a7 100644 --- a/backend/package-lock.json +++ b/backend/package-lock.json @@ -1,12 +1,12 @@ { "name": "medassist-ng-backend", - "version": "1.0.1", + "version": "1.0.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "medassist-ng-backend", - "version": "1.0.1", + "version": "1.0.2", "dependencies": { "@fastify/cookie": "^10.0.1", "@fastify/cors": "^10.0.1", diff --git a/backend/src/routes/medications.ts b/backend/src/routes/medications.ts index 7aa2a41..8c65cc4 100644 --- a/backend/src/routes/medications.ts +++ b/backend/src/routes/medications.ts @@ -353,7 +353,7 @@ export async function medicationRoutes(app: FastifyInstance) { }); const currentPills = Math.max(0, originalTotalPills - consumedUntilNow); - const stripsNeeded = pillsPerBlister > 0 ? Math.ceil(usageTotal / pillsPerBlister) : 0; + const blistersNeeded = pillsPerBlister > 0 ? Math.ceil(usageTotal / pillsPerBlister) : 0; // Calculate current stock using realistic consumption order (loose first, then blisters) const consumed = originalTotalPills - currentPills; @@ -373,8 +373,8 @@ export async function medicationRoutes(app: FastifyInstance) { medicationName: row.name, totalPills: currentPills, plannerUsage: usageTotal, - stripSize: pillsPerBlister, - stripsNeeded, + blisterSize: pillsPerBlister, + blistersNeeded, fullBlisters, loosePills, enough, diff --git a/backend/src/routes/planner.ts b/backend/src/routes/planner.ts index df1270c..dbd64cc 100644 --- a/backend/src/routes/planner.ts +++ b/backend/src/routes/planner.ts @@ -12,9 +12,10 @@ type PlannerRow = { medicationName: string; totalPills: number; plannerUsage: number; - stripSize: number; - stripsNeeded: number; - stripsAvailable: number; + blisterSize: number; + blistersNeeded: number; + fullBlisters: number; + loosePills: number; enough: boolean; }; @@ -102,8 +103,8 @@ export async function plannerRoutes(app: FastifyInstance) {