Rebuild CCS case workflow
This commit is contained in:
@@ -17,6 +17,26 @@ public static class CcsAttemptModes
|
||||
public const string Timed = "timed";
|
||||
}
|
||||
|
||||
public static class CcsChartCategories
|
||||
{
|
||||
public const string Orders = "orders";
|
||||
public const string Progress = "progress";
|
||||
public const string Vitals = "vitals";
|
||||
public const string Lab = "lab";
|
||||
public const string Imaging = "imaging";
|
||||
public const string OtherTest = "other_test";
|
||||
public const string Treatment = "treatment";
|
||||
|
||||
public static readonly IReadOnlySet<string> All = new HashSet<string>(StringComparer.OrdinalIgnoreCase)
|
||||
{
|
||||
Orders, Progress, Vitals, Lab, Imaging, OtherTest, Treatment
|
||||
};
|
||||
public static readonly IReadOnlySet<string> ResultSections = new HashSet<string>(StringComparer.OrdinalIgnoreCase)
|
||||
{
|
||||
Lab, Imaging, OtherTest, Treatment
|
||||
};
|
||||
}
|
||||
|
||||
public class CcsOrderDefinition
|
||||
{
|
||||
[BsonId] public string Code { get; set; } = "";
|
||||
@@ -25,6 +45,9 @@ public class CcsOrderDefinition
|
||||
public List<string> Aliases { get; set; } = [];
|
||||
public int DefaultTurnaroundMinutes { get; set; }
|
||||
public List<string> AvailableLocations { get; set; } = [];
|
||||
public string DisplayRoute { get; set; } = "";
|
||||
public string DisplayFrequency { get; set; } = "";
|
||||
public string ResultSection { get; set; } = "";
|
||||
public DateTime UpdatedUtc { get; set; } = DateTime.UtcNow;
|
||||
}
|
||||
|
||||
@@ -57,11 +80,19 @@ public class CcsInitialChart
|
||||
public string ReasonForEncounter { get; set; } = "";
|
||||
public string Appearance { get; set; } = "";
|
||||
public string History { get; set; } = "";
|
||||
public List<CcsNarrativeSection> HistorySections { get; set; } = [];
|
||||
public Dictionary<string, string> Vitals { get; set; } = [];
|
||||
public DateTime SimulatedStartUtc { get; set; } = DateTime.UtcNow;
|
||||
public List<string> InitialOrderCodes { get; set; } = [];
|
||||
}
|
||||
|
||||
public class CcsNarrativeSection
|
||||
{
|
||||
public string Code { get; set; } = "";
|
||||
public string Title { get; set; } = "";
|
||||
public string Text { get; set; } = "";
|
||||
}
|
||||
|
||||
public class CcsExamDefinition
|
||||
{
|
||||
public string Code { get; set; } = "";
|
||||
@@ -75,6 +106,7 @@ public class CcsCaseOrderDefinition
|
||||
public string OrderCode { get; set; } = "";
|
||||
public int? TurnaroundMinutes { get; set; }
|
||||
public string Result { get; set; } = "";
|
||||
public string ResultSection { get; set; } = "";
|
||||
public Dictionary<string, string> VitalPatches { get; set; } = [];
|
||||
}
|
||||
|
||||
@@ -111,19 +143,22 @@ public class CcsAttempt
|
||||
public string CaseExternalId { get; set; } = "";
|
||||
[BsonRepresentation(BsonType.ObjectId)] public string CaseRevisionId { get; set; } = "";
|
||||
public int CaseVersion { get; set; }
|
||||
public string Mode { get; set; } = CcsAttemptModes.Practice;
|
||||
public string Mode { get; set; } = CcsAttemptModes.Timed;
|
||||
public string State { get; set; } = CcsAttemptStates.Active;
|
||||
public int Revision { get; set; }
|
||||
public int SimulatedMinute { get; set; }
|
||||
[BsonIgnoreIfNull] public bool? OpeningCompleted { get; set; }
|
||||
public string Location { get; set; } = "";
|
||||
public Dictionary<string, string> CurrentVitals { get; set; } = [];
|
||||
public List<CcsAttemptAction> Actions { get; set; } = [];
|
||||
public List<CcsPendingResult> PendingResults { get; set; } = [];
|
||||
public List<CcsChartEntry> Chart { get; set; } = [];
|
||||
public List<CcsVitalSnapshot> VitalHistory { get; set; } = [];
|
||||
public List<string> ActiveOrderCodes { get; set; } = [];
|
||||
public List<string> ProcessedEventIds { get; set; } = [];
|
||||
public List<string> ProcessedCommandIds { get; set; } = [];
|
||||
public DateTime? DeadlineUtc { get; set; }
|
||||
public DateTime? HardDeadlineUtc { get; set; }
|
||||
public DateTime? FinalOrdersDeadlineUtc { get; set; }
|
||||
public DateTime CreatedUtc { get; set; } = DateTime.UtcNow;
|
||||
public DateTime UpdatedUtc { get; set; } = DateTime.UtcNow;
|
||||
@@ -144,6 +179,8 @@ public class CcsAttemptAction
|
||||
public class CcsPendingResult
|
||||
{
|
||||
public string OrderCode { get; set; } = "";
|
||||
public string Category { get; set; } = "";
|
||||
public string Title { get; set; } = "";
|
||||
public int DueMinute { get; set; }
|
||||
public string Result { get; set; } = "";
|
||||
public Dictionary<string, string> VitalPatches { get; set; } = [];
|
||||
@@ -153,9 +190,30 @@ public class CcsChartEntry
|
||||
{
|
||||
public string Category { get; set; } = "progress";
|
||||
public int SimulatedMinute { get; set; }
|
||||
public string Code { get; set; } = "";
|
||||
public string Title { get; set; } = "";
|
||||
public string Text { get; set; } = "";
|
||||
}
|
||||
|
||||
public class CcsVitalSnapshot
|
||||
{
|
||||
public int SimulatedMinute { get; set; }
|
||||
public Dictionary<string, string> Values { get; set; } = [];
|
||||
}
|
||||
|
||||
public class CcsActiveOrder
|
||||
{
|
||||
public string Code { get; set; } = "";
|
||||
public string Name { get; set; } = "";
|
||||
public string Category { get; set; } = "";
|
||||
public string Route { get; set; } = "";
|
||||
public string Frequency { get; set; } = "";
|
||||
public int OrderedMinute { get; set; }
|
||||
public int? ReportMinute { get; set; }
|
||||
public bool IsPending { get; set; }
|
||||
public bool HasResult { get; set; }
|
||||
}
|
||||
|
||||
public class CcsCaseScore
|
||||
{
|
||||
public double Percent { get; set; }
|
||||
@@ -194,7 +252,7 @@ public class CcsImportResponse
|
||||
public class CreateCcsAttemptRequest
|
||||
{
|
||||
public string CaseExternalId { get; set; } = "";
|
||||
public string Mode { get; set; } = CcsAttemptModes.Practice;
|
||||
public string Mode { get; set; } = CcsAttemptModes.Timed;
|
||||
}
|
||||
|
||||
public class CcsCommandRequest
|
||||
@@ -206,6 +264,20 @@ public class CcsCommandRequest
|
||||
public int Minutes { get; set; }
|
||||
}
|
||||
|
||||
public class CcsBatchCommandRequest
|
||||
{
|
||||
public string CommandId { get; set; } = "";
|
||||
public int ExpectedRevision { get; set; }
|
||||
public List<CcsBatchCommandItem> Commands { get; set; } = [];
|
||||
}
|
||||
|
||||
public class CcsBatchCommandItem
|
||||
{
|
||||
public string Type { get; set; } = "";
|
||||
public string Code { get; set; } = "";
|
||||
public int Minutes { get; set; }
|
||||
}
|
||||
|
||||
public class CcsCaseSummary
|
||||
{
|
||||
public string ExternalId { get; set; } = "";
|
||||
@@ -226,8 +298,11 @@ public class CcsAttemptResponse
|
||||
public string State { get; set; } = "";
|
||||
public int Revision { get; set; }
|
||||
public int SimulatedMinute { get; set; }
|
||||
public DateTime SimulatedStartUtc { get; set; }
|
||||
public bool OpeningCompleted { get; set; }
|
||||
public string Location { get; set; } = "";
|
||||
public DateTime? DeadlineUtc { get; set; }
|
||||
public DateTime? HardDeadlineUtc { get; set; }
|
||||
public DateTime? FinalOrdersDeadlineUtc { get; set; }
|
||||
public DateTime CreatedUtc { get; set; }
|
||||
public int RealTimeMinutes { get; set; }
|
||||
@@ -236,9 +311,12 @@ public class CcsAttemptResponse
|
||||
public string ReasonForEncounter { get; set; } = "";
|
||||
public string Appearance { get; set; } = "";
|
||||
public string History { get; set; } = "";
|
||||
public List<CcsNarrativeSection> HistorySections { get; set; } = [];
|
||||
public Dictionary<string, string> Vitals { get; set; } = [];
|
||||
public List<CcsChartEntry> Chart { get; set; } = [];
|
||||
public List<string> ActiveOrderCodes { get; set; } = [];
|
||||
public List<CcsActiveOrder> ActiveOrders { get; set; } = [];
|
||||
public List<CcsVitalSnapshot> VitalHistory { get; set; } = [];
|
||||
public List<CcsPendingResult> PendingResults { get; set; } = [];
|
||||
public List<CcsExamDefinition> AvailableExams { get; set; } = [];
|
||||
public List<string> AllowedLocations { get; set; } = [];
|
||||
|
||||
Reference in New Issue
Block a user