2025-10-21 10:42:59 +00:00
|
|
|
import { Injectable } from '@nestjs/common';
|
2025-11-06 10:07:08 +00:00
|
|
|
import { PrismaService } from './modules/prisma/prisma.service';
|
|
|
|
|
import { TindakanDokterService } from './modules/tindakandokter/tindakandokter.service';
|
|
|
|
|
import { RekammedisService } from './modules/rekammedis/rekammedis.service';
|
|
|
|
|
import { ObatService } from './modules/obat/obat.service';
|
|
|
|
|
import { LogService } from './modules/log/log.service';
|
2025-10-21 10:42:59 +00:00
|
|
|
|
|
|
|
|
@Injectable()
|
|
|
|
|
export class AppService {
|
2025-11-06 10:07:08 +00:00
|
|
|
constructor(
|
|
|
|
|
private prisma: PrismaService,
|
|
|
|
|
private rekamMedisService: RekammedisService,
|
|
|
|
|
private tindakanDokterService: TindakanDokterService,
|
|
|
|
|
private obatService: ObatService,
|
|
|
|
|
private logService: LogService,
|
|
|
|
|
) {}
|
|
|
|
|
|
2025-10-21 10:42:59 +00:00
|
|
|
getHello(): string {
|
|
|
|
|
return 'Hello World!';
|
|
|
|
|
}
|
2025-11-06 10:07:08 +00:00
|
|
|
|
|
|
|
|
async getDashboard() {
|
|
|
|
|
const countRekamMedis = await this.rekamMedisService.countRekamMedis();
|
|
|
|
|
const countTindakanDokter =
|
|
|
|
|
await this.tindakanDokterService.countTindakanDokter();
|
|
|
|
|
const countObat = await this.obatService.countObat();
|
|
|
|
|
return { countRekamMedis, countTindakanDokter, countObat };
|
|
|
|
|
}
|
2025-10-21 10:42:59 +00:00
|
|
|
}
|