Files
vigilcare-clinical/VigilCareClinicalAPI/Services/GcsService.cs
T
voltsrage 93ea473d2b feature:
Full SOFA Score: Data Layer + Scoring Engine

Glasgow Coma Scale: Data Layer + Scoring Engine
2026-06-21 01:09:50 +08:00

17 lines
456 B
C#

using Microsoft.EntityFrameworkCore;
public class GcsService : IGcsService
{
private readonly AppDbContext _db;
public GcsService(AppDbContext db) => _db = db;
public async Task<GcsScore?> GetCurrentAsync(Guid encounterId)
{
return await _db.GcsScores
.AsNoTracking()
.Where(s => s.EncounterId == encounterId)
.OrderByDescending(s => s.CalculatedAt)
.FirstOrDefaultAsync();
}
}