feature: Barcode/QR Cover Sheet System

This commit is contained in:
voltsrage
2026-06-27 21:50:32 +08:00
parent 5db60f46eb
commit 756cff332c
43 changed files with 8203 additions and 21 deletions
@@ -5,8 +5,10 @@ public class CreateBatchForm
[Required]
public IFormFile File { get; set; } = null!;
[Required]
public string BatchType { get; set; } = null!;
/// <summary>
/// Required unless <see cref="CoverSheetCode"/> is provided; cover sheet values override when both are sent.
/// </summary>
public string? BatchType { get; set; }
public string? Track { get; set; }
@@ -15,5 +17,8 @@ public class CreateBatchForm
public Guid? SupersedesBatchId { get; set; }
public CreateBatchRequest ToMetadata() =>
new(BatchType, Track, PatientId, SupersedesBatchId);
new(BatchType ?? throw new InvalidOperationException("BatchType is required."),
Track, PatientId, SupersedesBatchId);
public string? CoverSheetCode { get; set; }
}
@@ -0,0 +1 @@
public record BatchPdfRequest(List<Guid> CoverSheetIds);
@@ -0,0 +1,15 @@
public record CoverSheetResponse(
Guid Id,
string Code,
string BatchType,
string Track,
Guid? PatientId,
string? PatientName,
string? PatientMrn,
Guid? AssignToUserId,
string? AssignToUserName,
bool IsUsed,
Guid? BatchId,
DateTimeOffset CreatedAt,
DateTimeOffset? UsedAt
);
@@ -0,0 +1,7 @@
public record GenerateCoverSheetsRequest(
int Count,
string BatchType,
string Track,
Guid? PatientId,
Guid? AssignToUserId
);