Harden API memory and CPU usage across Phases 19–22.
Bound list/PDF payloads, stream MinIO I/O with cancellation, paginate history and FHIR $everything, tighten OCR lifetimes/buffers, and add phase tracking docs.
This commit is contained in:
@@ -37,8 +37,12 @@ public class OcrDraftPreFiller
|
||||
}
|
||||
|
||||
public async Task PreFillAsync(
|
||||
Guid batchId, BatchType batchType, OcrExtractionResult extraction)
|
||||
Guid batchId,
|
||||
BatchType batchType,
|
||||
OcrExtractionResult extraction,
|
||||
CancellationToken ct = default)
|
||||
{
|
||||
ct.ThrowIfCancellationRequested();
|
||||
var requirements = BatchTypeFieldRequirements.ForBatchType(batchType);
|
||||
var confidentFields = extraction.Fields
|
||||
.Where(f => f.Confidence >= _options.ConfidenceThreshold)
|
||||
@@ -54,7 +58,7 @@ public class OcrDraftPreFiller
|
||||
if (requirements.ShowObservations)
|
||||
await PreFillObservationsAsync(batchId, confidentFields);
|
||||
|
||||
await _db.SaveChangesAsync();
|
||||
await _db.SaveChangesAsync(ct);
|
||||
}
|
||||
|
||||
private async Task PreFillPatientAsync(
|
||||
|
||||
Reference in New Issue
Block a user