Manage subjects, cases, and administrative lab tasks.
Use this skill to perform CRUD operations on Subjects and Cases, archive closed cases, and generate lab performance reports.
DentalID.Core.Interfaces.ISubjectRepositoryDentalID.Core.Interfaces.ICaseRepositoryDentalID.Core.Entities.SubjectDentalID.Core.Entities.CaseOnboard New Subject:
Subject entity.FullName (or "Unknown-{Date}" for John Does), Gender (if known).SUB-{YYYY}-{SEQ}.Create Case:
Subject to a .CaseOpen.Investigator (currrent user).Archive Case:
ClosedSolved or ClosedUnsolved.Advanced: Bulk Import:
manifest.json or folder structure (SubjectName/Image.jpg).Subject.DentalImage, Calculate Hash, Move to Storage.Lab Reporting:
OpenCases, AverageTurnaroundTime, and MatchSuccessRate.public async Task<Case> CreateNewInvestigation(string subjectName, ISubjectRepository subRepo, ICaseRepository caseRepo)
{
// 1. Create Subject
var subject = new Subject
{
FullName = subjectName,
SubjectId = $"SUB-{DateTime.Now.Year}-{Guid.NewGuid().ToString().Substring(0, 4)}"
};
await subRepo.AddAsync(subject);
// 2. Open Case
var newCase = new Case
{
SubjectId = subject.Id,
Status = CaseStatus.Open,
OpenedAt = DateTime.UtcNow,
Description = "New forensic intake"
};
await caseRepo.AddAsync(newCase);
return newCase;
}