Пример #1
0
        public void OnGet()
        {
            Deaths    = diagnosisService.Deaths();
            Recovered = diagnosisService.Recovered();
            Diagnoses = diagnosisService.GetDiagnosesWithCorona();
            var Ddiagnoses = Diagnoses.GroupBy(x => 10 * ((DateTime.Now.Year - x.Patient.BirthDate.Year) / 10));

            foreach (var item in Ddiagnoses.OrderBy(i => i.Key))
            {
                AgeGroup.Add(new StatisticsCore
                {
                    Age           = item.Key.ToString() + "-" + $"{item.Key + 9}",
                    TotalPatients = item.GroupBy(x => x.Patient.Name).Count()
                });;
            }
            var patientDeath = Deaths.GroupBy(x => 10 * ((DateTime.Now.Year - x.Patient.BirthDate.Year) / 10));

            foreach (var item in patientDeath)
            {
                PatientDeath.Add(new StatisticsCore
                {
                    Age           = item.Key.ToString() + "-" + $"{item.Key + 9}",
                    TotalPatients = item.GroupBy(x => x.Patient.Name).Count()
                });
            }
        }
Пример #2
0
        public void OnGet()
        {
            Deaths    = diagnosisService.Deaths();
            Recovered = diagnosisService.Recovered();
            Diagnoses = diagnosisService.GetDiagnosesWithCorona();
            var newDiagnosis = Diagnoses.GroupBy(d => d.Patient.Hospital.Name);

            foreach (var item in newDiagnosis)
            {
                HospitalPatients.Add(new StatisticsCore
                {
                    Hospital      = item.Key,
                    TotalPatients = item.GroupBy(x => x.Patient.Name).Count()
                });
            }
            var patientDeath = Deaths.GroupBy(d => d.Patient.Hospital.Name);

            foreach (var item in patientDeath)
            {
                PatientDeath.Add(new StatisticsCore
                {
                    Hospital      = item.Key,
                    TotalPatients = item.GroupBy(x => x.Patient.Name).Count()
                });
            }
        }
Пример #3
0
        public void OnGet()
        {
            Deaths    = diagnosisService.Deaths();
            Recovered = diagnosisService.Recovered();
            Diagnoses = diagnosisService.GetDiagnosesWithCorona();
            var Ddiagnoses = Diagnoses.GroupBy(x => x.Patient.City);

            foreach (var item in Ddiagnoses)
            {
                RegionPatients.Add(new StatisticsCore
                {
                    Region        = item.Key,
                    TotalPatients = item.GroupBy(x => x.Patient.Name).Count()
                });
            }
            var patientDeath = Deaths.GroupBy(x => x.Patient.City);

            foreach (var item in patientDeath)
            {
                PatientDeath.Add(new StatisticsCore
                {
                    Region        = item.Key,
                    TotalPatients = item.GroupBy(x => x.Patient.Name).Count()
                });
            }
        }