fix: Missing input validators + No patient update endpoint + Pagination inconsistencies + Missing list/get endpoints
This commit is contained in:
@@ -122,6 +122,29 @@ public class SepsisBundleService : ISepsisBundleService
|
||||
return bundle;
|
||||
}
|
||||
|
||||
public async Task<PagedResult<SepsisBundle>> ListAsync(
|
||||
SepsisBundleComplianceStatus? status, int page, int pageSize)
|
||||
{
|
||||
pageSize = Math.Clamp(pageSize, 1, 100);
|
||||
|
||||
var query = _db.SepsisBundles
|
||||
.AsNoTracking()
|
||||
.Include(b => b.Elements)
|
||||
.AsQueryable();
|
||||
|
||||
if (status.HasValue)
|
||||
query = query.Where(b => b.ComplianceStatus == status.Value);
|
||||
|
||||
var total = await query.CountAsync();
|
||||
var items = await query
|
||||
.OrderByDescending(b => b.RecognizedAt)
|
||||
.Skip((page - 1) * pageSize)
|
||||
.Take(pageSize)
|
||||
.ToListAsync();
|
||||
|
||||
return new PagedResult<SepsisBundle>(items, page, pageSize, total);
|
||||
}
|
||||
|
||||
public async Task OnOrderResultedAsync(Guid orderId, CancellationToken ct = default)
|
||||
{
|
||||
var element = await _db.SepsisBundleElements
|
||||
|
||||
Reference in New Issue
Block a user