feature:
Full SOFA Score: Data Layer + Scoring Engine Glasgow Coma Scale: Data Layer + Scoring Engine
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user