Skip to content

Commit

Permalink
Summary: add daily new cases to CasesAvg7Days
Browse files Browse the repository at this point in the history
  • Loading branch information
lukarenko committed Feb 2, 2022
1 parent 0fdb279 commit b9a96f0
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ In case of failures a notification is set to slack channel #alert through Data A

## Changelog

## 1.17

* Summary: add daily new cases to CasesAvg7Days

## 1.16

* Add support for 0-11 age range in vaccinations
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,9 @@ internal static CasesAvg7Days GetCasesAvg7Days(DateTime? toDate, ImmutableArray<
: null;
return new CasesAvg7Days(
lastDayAvg,
Sublabel: true,
new CasesAvg7DaysSubValues(
lastStats.Value.Last.Cases?.ConfirmedToday
),
CalculateDifference(lastDayAvg, previousDayAvg),
lastStats.Value.Last.Year, lastStats.Value.Last.Month, lastStats.Value.Last.Day);
}
Expand Down
3 changes: 2 additions & 1 deletion sources/SloCovidServer/SloCovidServer/Models/Summary.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ public record CasesToDateSummary(int? Value, CasesToDateSummarySubValues SubValu
public record CasesActiveSubValues(int? In, int? Out);
public record CasesActive(int? Value, CasesActiveSubValues SubValues, float? DiffPercentage, int Year, int Month, int Day) : SummaryBase(DiffPercentage, Year, Month, Day);
public record CasesActive100k(float? Value, bool Sublabel, float? DiffPercentage, int Year, int Month, int Day) : SummaryBase(DiffPercentage, Year, Month, Day);
public record CasesAvg7Days(float? Value, bool Sublabel, float? DiffPercentage, int Year, int Month, int Day) : SummaryBase(DiffPercentage, Year, Month, Day);
public record CasesAvg7DaysSubValues(int? In);
public record CasesAvg7Days(float? Value, CasesAvg7DaysSubValues SubValues, float? DiffPercentage, int Year, int Month, int Day) : SummaryBase(DiffPercentage, Year, Month, Day);
public record HospitalizedCurrentSubValues(int? In, int? Out, int? Deceased);
public record HospitalizedCurrent(int? Value, HospitalizedCurrentSubValues SubValues, float? DiffPercentage, int Year, int Month, int Day) : SummaryBase(DiffPercentage, Year, Month, Day);
public record ICUCurrentSubValues(int? In, int? Out, int? Deceased);
Expand Down
2 changes: 1 addition & 1 deletion version.xml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<?xml version="1.0" encoding="utf-8"?>
<version>1.16</version>
<version>1.17</version>

0 comments on commit b9a96f0

Please sign in to comment.