File size: 9,505 Bytes
8074b31 b976a3c 8074b31 b976a3c 8074b31 b976a3c 8074b31 b976a3c 8074b31 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 | using System;
using System.Collections.Generic;
namespace SCMS.Domain.Features.Documents.Models
{
/// <summary>Request parameters for generating an appointment summary report.</summary>
public sealed record AppointmentReportRequest
{
public string ReportType { get; init; } = "daily"; // "daily", "weekly", "monthly", or "custom"
public DateTime? Date { get; init; }
public DateTime? StartDate { get; init; }
public DateTime? EndDate { get; init; }
public int? Month { get; init; }
public int? Year { get; init; }
}
/// <summary>Report response containing appointment statistics and line items.</summary>
public sealed record AppointmentReportResponse
{
public string ReportTitle { get; init; } = null!;
public string ReportType { get; init; } = null!;
public DateTime PeriodStart { get; init; }
public DateTime PeriodEnd { get; init; }
public DateTime GeneratedAt { get; init; }
public int TotalAppointments { get; init; }
public int PendingCount { get; init; }
public int ConfirmedCount { get; init; }
public int CompletedCount { get; init; }
public int CancelledCount { get; init; }
public List<AppointmentReportItemDto> Items { get; init; } = new();
}
public sealed record AppointmentReportItemDto
{
public int AppointmentId { get; init; }
public string AppointmentCode { get; init; } = null!;
public string PatientName { get; init; } = null!;
public DateTime Datetime { get; init; }
public string Status { get; init; } = null!;
public int TokenNumber { get; init; }
public string? Notes { get; init; }
}
/// <summary>Request parameters for generating a revenue summary report.</summary>
public sealed record RevenueReportRequest
{
public string ReportType { get; init; } = "daily"; // "daily", "weekly", "monthly", or "custom"
public DateTime? Date { get; init; }
public DateTime? StartDate { get; init; }
public DateTime? EndDate { get; init; }
public int? Month { get; init; }
public int? Year { get; init; }
}
/// <summary>Report response containing clinic revenue analytics and breakdown.</summary>
public sealed record RevenueReportResponse
{
public string ReportTitle { get; init; } = null!;
public string ReportType { get; init; } = null!;
public DateTime PeriodStart { get; init; }
public DateTime PeriodEnd { get; init; }
public DateTime GeneratedAt { get; init; }
public int TotalTransactions { get; init; }
public decimal TotalAmount { get; init; }
public decimal TotalTax { get; init; }
public decimal TotalCharges { get; init; }
public decimal GrandTotal { get; init; }
public List<RevenueByMethodDto> ByMethod { get; init; } = new();
public List<RevenueLineItemDto> Items { get; init; } = new();
}
public sealed record RevenueByMethodDto
{
public string PaymentMethod { get; init; } = null!;
public int Count { get; init; }
public decimal Amount { get; init; }
public decimal Tax { get; init; }
public decimal Charges { get; init; }
public decimal Total { get; init; }
}
public sealed record RevenueLineItemDto
{
public int PaymentId { get; init; }
public string AppointmentCode { get; init; } = null!;
public string PatientName { get; init; } = null!;
public string PaymentMethod { get; init; } = null!;
public string PaymentStatus { get; init; } = null!;
public decimal Amount { get; init; }
public decimal Tax { get; init; }
public decimal Charges { get; init; }
public decimal Total { get; init; }
public DateTime? PaidAt { get; init; }
}
/// <summary>Report response listing all registered patients with demographic breakdown.</summary>
public sealed record PatientListReportResponse
{
public string ReportTitle { get; init; } = null!;
public DateTime GeneratedAt { get; init; }
public int TotalPatients { get; init; }
public int MaleCount { get; init; }
public int FemaleCount { get; init; }
public int OtherGenderCount { get; init; }
public List<PatientListItemDto> Items { get; init; } = new();
}
public sealed record PatientListItemDto
{
public int PatientId { get; init; }
public string Name { get; init; } = null!;
public int? Age { get; init; }
public string Gender { get; init; } = null!;
public string BloodType { get; init; } = null!;
public string? MobileNo { get; init; }
public string? Email { get; init; }
public DateTime RegisteredAt { get; init; }
}
/// <summary>Report response containing medicine stock inventory and batch statuses.</summary>
public sealed record MedicineStockReportResponse
{
public string ReportTitle { get; init; } = null!;
public DateTime GeneratedAt { get; init; }
public int TotalMedicines { get; init; }
public int TotalBatches { get; init; }
public int LowStockCount { get; init; }
public int ExpiredCount { get; init; }
public List<MedicineStockItemDto> Items { get; init; } = new();
}
public sealed record MedicineStockItemDto
{
public int MedicineId { get; init; }
public string Name { get; init; } = null!;
public string Category { get; init; } = null!;
public int TotalQuantity { get; init; }
public List<MedicineBatchStockDto> Batches { get; init; } = new();
}
public sealed record MedicineBatchStockDto
{
public int BatchId { get; init; }
public string BatchNo { get; init; } = null!;
public int Quantity { get; init; }
public DateOnly ExpiryDate { get; init; }
public string Status { get; init; } = null!;
public bool IsExpired { get; init; }
public bool IsLowStock { get; init; }
}
/// <summary>Request parameters for filtering follow-up reports.</summary>
public sealed record FollowUpReportRequest
{
public DateTime? StartDate { get; init; }
public DateTime? EndDate { get; init; }
public string Status { get; init; } = "all";
}
/// <summary>Report response listing scheduled follow-ups and completion metrics.</summary>
public sealed record FollowUpReportResponse
{
public string ReportTitle { get; init; } = null!;
public DateTime PeriodStart { get; init; }
public DateTime? PeriodEnd { get; init; }
public DateTime GeneratedAt { get; init; }
public int TotalFollowUps { get; init; }
public int PendingCount { get; init; }
public int CompletedCount { get; init; }
public int OverdueCount { get; init; }
public List<FollowUpItemDto> Items { get; init; } = new();
}
public sealed record FollowUpItemDto
{
public int FollowUpId { get; init; }
public int PatientId { get; init; }
public string PatientName { get; init; } = null!;
public string? MobileNo { get; init; }
public DateTime DueAt { get; init; }
public string Recommendation { get; init; } = null!;
public string Status { get; init; } = null!;
public bool IsOverdue { get; init; }
public DateTime? CompletedAt { get; init; }
}
/// <summary>Report response summarizing prescription activity and medication volume.</summary>
public sealed record PrescriptionReportResponse
{
public string ReportTitle { get; init; } = null!;
public DateTime GeneratedAt { get; init; }
public int TotalPrescriptions { get; init; }
public int TotalMedicines { get; init; }
public int DistinctPatients { get; init; }
public List<PrescriptionReportItemDto> Items { get; init; } = new();
}
public sealed record PrescriptionReportItemDto
{
public int Id { get; init; }
public string PatientName { get; init; } = null!;
public string AppointmentCode { get; init; } = null!;
public string? DiseaseName { get; init; }
public DateTime CreatedAt { get; init; }
public int MedicineCount { get; init; }
public int TotalQuantity { get; init; }
}
/// <summary>Request parameters for monthly business summary report.</summary>
public sealed record BusinessSummaryReportRequest
{
public int? Month { get; init; }
public int? Year { get; init; }
}
/// <summary>Report response summarizing high-level monthly operational and financial performance.</summary>
public sealed record BusinessSummaryReportResponse
{
public string ReportTitle { get; init; } = null!;
public DateTime PeriodStart { get; init; }
public DateTime PeriodEnd { get; init; }
public DateTime GeneratedAt { get; init; }
public int NewPatients { get; init; }
public int TotalPatients { get; init; }
public int TotalAppointments { get; init; }
public int TotalPrescriptions { get; init; }
public decimal TotalIncome { get; init; }
public decimal TotalTax { get; init; }
public decimal TotalCharges { get; init; }
}
}
|