CoVital-Project / pulse-ox-data-collection-web-service

HTTPS API for receiving pulse oximetry from mobile clients
https://covital.org
GNU General Public License v3.0
5 stars 4 forks source link

Move data between buckets #74

Open YoniSchirris opened 4 years ago

YoniSchirris commented 4 years ago

Problem summary

Due to some confusiong during app distribution and updates to the application, some data files should be moved from the community bucket to the clinical bucket.

Current result

iPhone measurements on 2020-04-21 and 2020-04-20 were actually clinical, yet are currently in the community bucket.

Expected result

@MalcolmMielle Let me know if this describes the problem/solution correctly:

Surveys on 2020-04-21 and 2020-04-20 with

userProfile: {licensed_medical_professional: True}, phoneBrand: iPhone

should be in the clinical bucket.

i.e. the following survey ids

04-20
"0bc48438-cdfb-4da6-911e-7124fb0eca49"
"bf58ce56-f571-477f-9117-8916c89d1f5f"
"ca276de2-0669-43f3-954d-19aa7a51e5ce"
04-21
"33a4e462-b8de-4150-bd6f-fd00a45c8e3a"
"5ee690a6-0d41-46d2-87fb-41388ef8d97d"
"9badcf4e-47ab-4304-b42d-1b8a257c6e4d"
"e1eef258-641a-4635-a3a2-8672f50d9110"

Proposed solution

Set up a python/bash script that loops over all files, checks certain conditions (names / data.json field), and moves these files from 1 bucket to the other.

As we might have this issue more often (e.g. possibly the MDs are still using the wrong application and are still uploading to the community bucket), it would be good to have a script that adjusts this according to some conditions.

@haggy Since we have read access, I think we can't do this. Hoping you are more experienced with this and have a quick solution for this.

MalcolmMielle commented 4 years ago

Hey, it's a bit more complex than that. Those appear to be done by MDs who forgot/couldn't be bothered to enter the registration code (I won't say that was to be expected and that's why we used to have two apps but it is what it is). We are more or less sure of that because it's iOS and we only accept/share the link with MDs.

I think that because it's iOS and its a controlled link shared with MD, we could move those ones to clinical datatset for now but not in the future if more people use iOS