using Application.Services.Database.PostgreSQL; using Domain.Entities; using Microsoft.EntityFrameworkCore; namespace Infrastructure.Services.PostgreSQL; public class MedicalHistoryRepository(HealthcareManagerDatabase context) : BasePostgreSqlRepository(context), IMedicalHistoryRepository { public async Task GetByPatientIdAsync(Guid patientId, CancellationToken token) { return await Context.MedicalHistories.FirstOrDefaultAsync(d => d.UserId == patientId, token); } }