feature: RBAC + Clinical Audit Logging
This commit is contained in:
@@ -90,7 +90,8 @@ public static class ScenarioReplayHelper
|
||||
public static async Task<SofaScore> WaitForSofaScoreAsync(
|
||||
IServiceProvider services,
|
||||
Guid encounterId,
|
||||
TimeSpan timeout)
|
||||
TimeSpan timeout,
|
||||
Func<SofaScore, bool>? predicate = null)
|
||||
{
|
||||
var deadline = DateTime.UtcNow + timeout;
|
||||
while (DateTime.UtcNow < deadline)
|
||||
@@ -101,7 +102,7 @@ public static class ScenarioReplayHelper
|
||||
.Where(s => s.EncounterId == encounterId)
|
||||
.OrderByDescending(s => s.CalculatedAt)
|
||||
.FirstOrDefaultAsync();
|
||||
if (sofa is not null)
|
||||
if (sofa is not null && (predicate is null || predicate(sofa)))
|
||||
return sofa;
|
||||
await Task.Delay(500);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user