Safe2COVIDApp / bct-server

Bluetooth Contact Tracing for Covid19 - server
5 stars 1 forks source link

Test result if healthy #152

Closed mitra42 closed 4 years ago

mitra42 commented 4 years ago

If the Tester delivers a result of STATUS_HEALTHY @jmday says

if test neg on day x then eliminate any notifications or local symptoms prior to x-1

I think this has to happen client-side, but need to think through potential for spoofing.

mitra42 commented 4 years ago

If Terry the Tester thinks Alice is infected he sends /result which causes Alice to receive response to poll result:

{ contact_id: [ id: Alice EphId generated from (Provider,TestID,PIN), status: 0, message: "Call Tracey" ] } 

Causing Alice to go to status 1 = INFECTED

Alice should update her status doing a /update status=4 HEALTHY which Bob gets and can drop the notification Alice was PUI

jmday commented 4 years ago

For discussion: I sense there is may be value to sharing UNKNOWN statuses. Also, I'd like to question the assumption that having a "test-pending" equates to PUI/At-Risk. Note: There are many people being tested that are not at-risk and this may grow as tests become more available/common.

mitra42 commented 4 years ago

@jmday regarding what you saud ....

if test neg on day x then eliminate any notifications or local symptoms prior to x-1

A couple of issues here,

Lets say that we decide to add a timestamp to contacts - probably course (at the day level) - then this means the following scenario breaks. ....

Note - so far, all this is client side, the server isn't doing anything with the data except passing it on.

Thoughts ....

jmday commented 4 years ago

I sense there may be a conflation between what I've suggested we do with scoring vs. what we should do with status exposures (what you guys are calling "alerts" on the server, which is not quite the same since clients are really in charge of sending out in-app notifications/alerts). The server really can't "alert" (verb) as it doesn't know who to send things to.

When there is a negative test, can we allow the server to eliminate the whole string of exposures (visits & contacts) including the day before and of the test (and beyond)? If the client sees symptoms again (potentially, even before results are available), it will need to initiate a new string of exposures that it can include everything from 1 day before the test into.

Perhaps we should have a deeper discussion around this, but I'm headed to bed soon tonight.

mitra42 commented 4 years ago

Its an "alert" when it gets to Bob's client (Bob's client may choose when to "alert" Bob)

We can't have the server eliminate things, for two reasons a) we don't know what the clients have already seen (or what has sync-ed to other servers) so we can only update something> b) the server can't update these alerts since it doesn't have a key c) the server can't find the alerts since they are not in any way tied to the test result (the only place they can be tied together is at Bob - and that is intentional for privacy).

We could have a rule (in the client) about which to eliminate. That rule could be based on when Bob or server sees them (which will be sometime after Alice sent them) or we could add a date field (and its resolution affects privacy)> Or we could have a rule that ignores the timing - e.g. erasing all local status prior to the test result being received, which risks some infection between being tested and getting results being ignored. Or we could have a rule eliminating all status prior to taking the test (which just risks infections events that haven't yet progressed in Bob long enough to make Bob infections). Or .... we could combined this, for example when Bob gets tested, we flag anything that Bob received up to xx-hours prior to taking the test, and then eliminate when the test result comes in.

As you say needs longer discussion, and there may be combinations I've missed.

jmday commented 4 years ago

Ah, "alert" as noun. Okay. I'll keep translating in my head, but marketing has been using "alert" as verb for some comms (FYI).

Apologies: When I said "eliminate" I was keying off your verbiage above... I really just meant "update as healthy" (after negative test as I sense you meant too). :) I realize entries are important for eventual consistency and won't be "deleted" off the server until they time-out for permanent removal.

Correct me if wrong, but... Can't the server can use replacement tokens from the seed (generated from ProvID, TestID, PIN... shared by Bob and Tester... used to generate update tokens in post-test /update by bob... sent in /result by tester), to "update as healthy" the entire sequence of "alerts" Bob has generated?

If this is the case and IF Bob has reported symptoms later than 1day prior to testing, his client would need to send out any alerts for at-risk/pui under a NEW series of "alerts"... this would allow for another test to take those alerts into account as well.

Let's discuss when you're up, though.

mitra42 commented 4 years ago

Not quite - we can update the alerts Bob posted about other people - e.g. Bob posts an alert about seeing Carol, Bob gets tested, the shared key between Bob&Tester means Tester can update the alert that Carol received.

BUT We can't update/eliminate the alert from Alice to Bob as the Replacement token for that can only come from Alice.

We can ignore it on Bob's client. (Bob knows they got a test result, and that a negative test result overrides any prior alerts).

We still have the date issues and need to add that to the protocol if we want Bob to consider anything other than the order that their client received alerts. AND we still have the issue of overlapping alerts to deal with, which is tricky as the user is going to notice this.

jmday commented 4 years ago

Ah, yes. This was the "scoring data" vs. "exposure/alert data". I'm on board that Bob will not be able to invalidate the alert that Alice initiated for him. He will still get all his alerts for visits/contacts but the client will need to filter out all items before time of his negative test datetime - 1d. He CAN know the time of proximity contact from Alice as the local device can store time his own EphIDs were used. Prefer we not store (even locally) the time that other EphIDs were seen and it's important that we not have the times be part of the protocol for contact data sent with /send or /update.

mitra42 commented 4 years ago

Conclusion from call - eliminate any entries for EphIds used more than a day earlier.