Skip to content
This repository has been archived by the owner on Apr 12, 2023. It is now read-only.

Commit

Permalink
Merge pull request #795 from keiji/cocoa2/transmission_risk_level_lowest
Browse files Browse the repository at this point in the history
Set transmission risk level LOWEST to outdated diagnosis-keys.
  • Loading branch information
keiji authored Jan 22, 2022
2 parents ee74a7e + f062e87 commit 34fbff0
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -426,8 +426,8 @@ private static ExposureConfiguration CreateDefaultConfiguration()
},
TransmissionRiskLevelValues = new int[]
{
1,
7,
0,
0,
7,
7,
7,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"DurationWeight": 50,
"DaysSinceLastExposureWeight": 50,
"TransmissionRiskScores": [
1,
7,
0,
0,
7,
7,
7,
Expand Down
4 changes: 2 additions & 2 deletions documents/static/exposure_configuration/configuration.json
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,8 @@
1
],
"transmission_risk_level_values": [
1,
7,
0,
0,
7,
7,
7,
Expand Down
4 changes: 2 additions & 2 deletions src/Covid19Radar.Api/V3DiagnosisApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ namespace Covid19Radar.Api
{
public class V3DiagnosisApi
{
private const int TRANSMISSION_RISK_LEVEL_INVALID = 0;
private const int TRANSMISSION_RISK_LEVEL_LOWEST = 1;
private const int TRANSMISSION_RISK_LEVEL_MEDIUM = 4;

private const string CHAFF_HEADER = "X-Chaff";
Expand Down Expand Up @@ -79,7 +79,7 @@ public async Task<IActionResult> RunAsync(
// Make compatible with Legacy-V1 mode.
foreach (var key in submissionParameter.Keys)
{
var transmissionRiskLevel = TRANSMISSION_RISK_LEVEL_INVALID;
var transmissionRiskLevel = TRANSMISSION_RISK_LEVEL_LOWEST;
if (key.DaysSinceOnsetOfSymptoms >= Constants.DaysHasInfectiousness)
{
transmissionRiskLevel = TRANSMISSION_RISK_LEVEL_MEDIUM;
Expand Down

0 comments on commit 34fbff0

Please sign in to comment.