Add CCS study tools and case reporting

This commit is contained in:
hz
2026-07-15 10:43:03 -05:00
parent 7256f93002
commit 9f379cda5c
13 changed files with 542 additions and 56 deletions
+63
View File
@@ -0,0 +1,63 @@
using MongoDB.Bson;
using MongoDB.Bson.Serialization.Attributes;
namespace QuestionsApi.Models;
public static class CcsCaseReportCategory
{
public const string Clarity = "clarity";
public const string MedicalAccuracy = "medical_accuracy";
public const string CaseProgressionScoring = "case_progression_scoring";
public const string FormattingMedia = "formatting_media";
public const string TechnicalIssue = "technical_issue";
public const string Other = "other";
public static readonly HashSet<string> All = [Clarity, MedicalAccuracy, CaseProgressionScoring, FormattingMedia, TechnicalIssue, Other];
}
public sealed class CcsCaseReport
{
[BsonId, BsonRepresentation(BsonType.ObjectId)] public string? Id { get; set; }
public string CaseExternalId { get; set; } = "";
[BsonRepresentation(BsonType.ObjectId)] public string CaseRevisionId { get; set; } = "";
public int CaseVersion { get; set; }
[BsonRepresentation(BsonType.ObjectId)] public string AttemptId { get; set; } = "";
public string UserId { get; set; } = "";
public string Category { get; set; } = "";
public string Details { get; set; } = "";
public string Status { get; set; } = QuestionReportStatus.Open;
public CcsCaseRevision CaseSnapshot { get; set; } = new();
public CcsAttempt AttemptSnapshot { get; set; } = new();
public string ReviewedByUserId { get; set; } = "";
public string ReviewerNote { get; set; } = "";
public DateTime? ReviewedUtc { get; set; }
public DateTime CreatedUtc { get; set; } = DateTime.UtcNow;
public DateTime UpdatedUtc { get; set; } = DateTime.UtcNow;
}
public sealed class CreateCcsCaseReportRequest
{
public string AttemptId { get; set; } = "";
public string Category { get; set; } = "";
public string Details { get; set; } = "";
}
public sealed class CcsCaseReportListResponse
{
public List<CcsCaseReportSummary> Items { get; set; } = [];
public long Total { get; set; }
public int Skip { get; set; }
public int Limit { get; set; }
}
public sealed class CcsCaseReportSummary
{
public string Id { get; set; } = "";
public string CaseExternalId { get; set; } = "";
public int CaseVersion { get; set; }
public string AttemptId { get; set; } = "";
public string UserId { get; set; } = "";
public string Category { get; set; } = "";
public string Details { get; set; } = "";
public string Status { get; set; } = "";
public DateTime CreatedUtc { get; set; }
}