rokwire / safer-illinois-app

Source code repository of "Safer Illinois" App - the official COVID-19 app of the University of Illinois.
https://safer.illinois.edu/
Apache License 2.0
33 stars 23 forks source link

[FEATURE] Add a new rule "do not process day" #678

Closed mihail-varbanov closed 3 years ago

mihail-varbanov commented 3 years ago

Re: University Monday 2021/07/26 / 2021-07-28

4.2 We are being asked for a new "override rule":

4.2.1 They want to switch users to say a 2 day test period before going from yellow to orange.

4.2.2 It is likely this will be for students not employees, but we should be able to say who this is for.

4.2.3 The rule will ignore turning someone orange if it is on a specified day(s)

Example using 2 days for Yellow to Orange: The user has a negative on a Friday and the rule says ignoring Saturday, Sunday and Monday would mean the user would not turn Orange until Tuesday.

Slack / Oilyrag / 2021-07-28

Our rules system is based on day based intervals. However, the University does not want to force certain groups (i.e. Staff) to have to test on weekends. They may go to an interval of 2 days for frequent tests. We would like an override that would not turn a user orange on certain days of the week for this group. i.e Saturday, Sunday, Monday.

Re: University Monday 2021/07/26 / 2021-07-29

MV: Regarding Safer Illinois rule, I would like to confirm my understanding:

  1. This override will apply to a given set of users identified by their role, id card, or whatever. They will not be identified per user level as we do with UIN override test periods.

  2. The rule would look like this: "Undergraduate Students are released from taking tests on Sat, Sun and Wed ", for example. This would mean:

2.1. If an undergraduate user has taken a test on Thu Aug 1 he is yellow up to Fri Aug 9 inclusive. We will not turn user status to orange on Sat Aug 10 and Sun Aug 11 because they are released weekdays. We will turn it orange on the next workday that is not released - Mon Aug 12.

2.2. The same user took a test on Mon Aug 5. He is yellow up to Tue Sep 13 inclusive. We will not turn user status to orange on Wed Aug 14 as this user is released from testing on Wed. We will turn it orange on Thu Aug 14.

2.3. The same user took a test on Wed Jul 31. He is yellow up to Tue Aug 8 inclusive. This user will turn orange on Fri Aug 9 as this is not a workday that is released from testing, i.e. we fall in the default/regular case.

Let me know please if this will do what they need.

Re: University Monday 2021/07/26 / 2021-07-30

4.2 Before I answer your points to 2, 2.1, 2.2 and 2.3 I want to give you a simplified way of looking at this:

Imagine the rule processing does not change from what you do now and what happens is when you go to change a user's status you look up in a day table "is this a day that we are ignoring a status change" and if so, you do nothing. This is a no process day.

The table below shows our simple approach. The 1st item with a * is what we actually need. The other 2 rows are just showing what we could do. (Ignore Red status change on a Thursday)

Status Group No Process Days *Orange Faculty/Staff. Sat, Sun, Mon Orange 1U Sun Red Other Thurs

Now to answer your points:

4.2.1 Point 2, based on the simplified approach above things like overrides would be taken care so no need to do something special

You used the term released from taking tests. I just want to be clear that they are not released from taking tests, they will still be taking tests. It is just on given days we will ignore the status change which is really just deferred until it becomes a process day

4.2.2 What you wrote for 2.1 is correct

4.2.3 What you wrote for 2.2 is correct.

4.2.4 What you wrote for 2.3 is correct