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:
@@ -1,4 +1,5 @@
|
||||
public interface IDigitizationHistoryService
|
||||
{
|
||||
Task<PatientDigitizationHistoryResponse> GetPatientHistoryAsync(Guid patientId);
|
||||
}
|
||||
Task<PatientDigitizationHistoryResponse> GetPatientHistoryAsync(
|
||||
Guid patientId, int page = 1, int pageSize = 20);
|
||||
}
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
public interface IDocumentStorageService
|
||||
{
|
||||
Task<(string objectKey, string sha256, long fileSize)> UploadAsync(Stream fileStream, string contentType, Guid batchId);
|
||||
Task<string> GetPresignedUrlAsync(string objectKey);
|
||||
Task<Stream> DownloadAsync(string objectKey);
|
||||
Task<(string objectKey, string sha256, long fileSize)> UploadAsync(
|
||||
Stream fileStream, string contentType, Guid batchId, CancellationToken ct = default);
|
||||
Task<string> GetPresignedUrlAsync(string objectKey, CancellationToken ct = default);
|
||||
Task<Stream> DownloadAsync(string objectKey, CancellationToken ct = default);
|
||||
/// <summary>Returns false when the object is missing from the bucket.</summary>
|
||||
Task<bool> ObjectExistsAsync(string objectKey);
|
||||
Task<bool> ObjectExistsAsync(string objectKey, CancellationToken ct = default);
|
||||
/// <summary>Uploads bytes only when the object key is not already present.</summary>
|
||||
Task EnsureObjectAsync(string objectKey, byte[] content, string contentType);
|
||||
}
|
||||
Task EnsureObjectAsync(string objectKey, byte[] content, string contentType, CancellationToken ct = default);
|
||||
/// <summary>Ensures the configured bucket exists. Safe to call repeatedly; caches success in-process.</summary>
|
||||
Task EnsureBucketAsync(CancellationToken ct = default);
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ public interface IFhirService
|
||||
string? patient, string? code, string? date,
|
||||
string? category, string? encounter, int count, int offset);
|
||||
|
||||
Task<Bundle?> GetPatientEverythingAsync(Guid patientId);
|
||||
Task<Bundle?> GetPatientEverythingAsync(Guid patientId, int count = 100, int offset = 0);
|
||||
|
||||
CapabilityStatement GetCapabilityStatement();
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
public interface IOcrService
|
||||
{
|
||||
Task<OcrExtractionResult> ExtractAsync(Stream documentStream, string contentType);
|
||||
}
|
||||
Task<OcrExtractionResult> ExtractAsync(
|
||||
Stream documentStream, string contentType, CancellationToken ct = default);
|
||||
}
|
||||
|
||||
@@ -21,5 +21,6 @@ public interface IPromotionService
|
||||
/// </summary>
|
||||
Task<PromotionResultResponse> GetPromotionResultAsync(Guid batchId);
|
||||
|
||||
Task<PromotionResult> PromoteAsync(Guid batchId, Guid actorUserId);
|
||||
Task<PromotionResult> PromoteAsync(
|
||||
Guid batchId, Guid actorUserId, CancellationToken ct = default);
|
||||
}
|
||||
Reference in New Issue
Block a user