Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use earliest symptom onset to determine how many days of TCN to report symptoms to #350

Open
danamlewis opened this issue Aug 4, 2020 · 2 comments
Assignees
Milestone

Comments

@danamlewis
Copy link
Contributor

Idea is to use the earliest symptom onset + 2 days prior to send exposure alerts to the individuals seen in that time period.

Current implementation in 0.4 is for symptom reporting for day-of symptoms and after (?), but for 0.5 we'd like to implement to include the prior 2 days when someone was potentially infectious.

@danamlewis danamlewis added this to the 0.5 milestone Aug 4, 2020
@duskoo duskoo self-assigned this Aug 29, 2020
@duskoo
Copy link
Collaborator

duskoo commented Aug 30, 2020

@danamlewis Earliest symptom date screen was removed in #347 , so we are to use (day-of-reporting - 2 days)?

@duskoo
Copy link
Collaborator

duskoo commented Aug 30, 2020

Report object has start_index and end_index fields. These contain the TCK indices corresponding to start and end of the period in which the reporter was infectious. TCK index increments by 1 after each ratchet operation (ratchet operation generates new TCN).
Current logic for setting start_index and end_index is in https://github.com/Co-Epi/app-backend-rust/blob/master/src/tcn_ext/tcn_keys.rs#L49 .

fn create_report(&self, report: Vec<u8>) -> Result<SignedReport, Error> {
        let end_index = self.tck().index();
        let periods = 14 * 24 * (60 / 15);
        let mut start_index = 1;
        if end_index > periods {
            start_index = (end_index - periods) as u16
        }
        debug!("start_index={}, end_index={}", start_index, end_index);
        self.rak()
            .create_report(MemoType::CoEpiV1, report, start_index, end_index)
    }

Infectious period is set to 14 days prior to current time, or time of generation of the first TCN (if current value of the index is not large enough).
For reports sent on August 30, infectious period would be from August 17 until August 30, inclusive.

Open questions:

  1. Do we use earliest symptom onset (put back the corresponding screen in the symptom reporting flow)?
  2. Do we use time of reporting instead earliest symptom onset (current logic)?
  3. Do we continue to use -14 days as infectious period?
  4. Do we switch to -2 days as infectious period?
  5. Do we need to extend the infectious period "in to the future" (+x days)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants