|
|
@ -717,6 +717,10 @@ namespace Shentun.Peis.CustomerReports |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (input.CompleteFlags.Any()) |
|
|
|
|
|
{ |
|
|
|
|
|
sumquery_count = sumquery_count.Where(m => input.CompleteFlags.Contains(m.a.CompleteFlag)); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
sumCount = sumquery_count.Count(); |
|
|
sumCount = sumquery_count.Count(); |
|
|
|
|
|
|
|
|
@ -816,7 +820,10 @@ namespace Shentun.Peis.CustomerReports |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (input.CompleteFlags.Any()) |
|
|
|
|
|
{ |
|
|
|
|
|
sumquery = sumquery.Where(m => input.CompleteFlags.Contains(m.a.CompleteFlag)); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
if (input.DiagnosisIds.Any()) |
|
|
if (input.DiagnosisIds.Any()) |
|
|
{ |
|
|
{ |
|
|
@ -824,13 +831,13 @@ namespace Shentun.Peis.CustomerReports |
|
|
} |
|
|
} |
|
|
#endregion
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
var entlist = sumquery.GroupBy(g => g.c.DiagnosisId).Select(s => new GetDiseaseCountStatisticsReportDto |
|
|
|
|
|
|
|
|
var entlist = sumquery.ToList().GroupBy(g => g.c.DiagnosisId).Select(s => new GetDiseaseCountStatisticsReportDto |
|
|
{ |
|
|
{ |
|
|
DiagnosisName = s.FirstOrDefault().ad != null ? s.FirstOrDefault().ad.DisplayName : "", |
|
|
DiagnosisName = s.FirstOrDefault().ad != null ? s.FirstOrDefault().ad.DisplayName : "", |
|
|
PatientCount = s.Count(), |
|
|
PatientCount = s.Count(), |
|
|
PatientNames = string.Join(",", s.Where(m => m.a != null).Select(sa => sa.a.PatientName)), |
|
|
PatientNames = string.Join(",", s.Where(m => m.a != null).Select(sa => sa.a.PatientName)), |
|
|
Percentage = Math.Round(Convert.ToDecimal(s.Count() * 100) / sumCount, 2).ToString() |
|
|
Percentage = Math.Round(Convert.ToDecimal(s.Count() * 100) / sumCount, 2).ToString() |
|
|
}).ToList(); |
|
|
|
|
|
|
|
|
}).OrderByDescending(o => o.PatientCount).ToList(); |
|
|
|
|
|
|
|
|
return entlist; |
|
|
return entlist; |
|
|
} |
|
|
} |
|
|
|