Phase 5 cleanup
This commit is contained in:
parent
5536acd67d
commit
76a516a417
136 changed files with 6322 additions and 1985 deletions
|
|
@ -82,10 +82,7 @@ export class RegimensService {
|
|||
const regimens = await this.regimensRepository.findActiveByUser(householdId, userId);
|
||||
|
||||
// Sum daily consumption per medicine across all active regimens
|
||||
const consumptionMap = new Map<
|
||||
string,
|
||||
{ medicineName: string; dailyConsumption: number }
|
||||
>();
|
||||
const consumptionMap = new Map<string, { medicineName: string; dailyConsumption: number }>();
|
||||
|
||||
for (const regimen of regimens) {
|
||||
for (const med of regimen.medications) {
|
||||
|
|
@ -115,10 +112,7 @@ export class RegimensService {
|
|||
|
||||
// Get cabinet summary for all medicines in regimens
|
||||
const summaryResults = await this.cabinetRepository.getAggregateSummary(householdId);
|
||||
const stockMap = new Map<
|
||||
string,
|
||||
{ totalQuantity: number; earliestExpiry: Date | null }
|
||||
>();
|
||||
const stockMap = new Map<string, { totalQuantity: number; earliestExpiry: Date | null }>();
|
||||
for (const s of summaryResults) {
|
||||
stockMap.set(s._id as string, {
|
||||
totalQuantity: s.totalQuantity as number,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue