episphere / connect

Connect API for DCEG's Cohort Study
10 stars 5 forks source link

NORC Survey Reset Tool #1130

Open sonyekere opened 1 week ago

sonyekere commented 1 week ago

DevOps will need to reset the correct survey variables and ensure that It is active and working as expected.

Placeholder for additional requirements. @mnataraj92 please add on to the requirements if needed.

mnataraj92 commented 1 week ago

Discussed this with @brotzmanmj yesterday. NORC is to send the tool to us for approval. We need to make sure that it doesn't mess up any dependencies, etc. It should wipe the survey data that we have for the particular survey, in addition to resetting the survey status flags and the time started/time completed flags.

Note that some of the survey status flags (like the Connect Experience Survey flag) may not default be variables, so the reset of the flag would set it to null instead of 'not started'.

Also @brotzmanmj would this also incorporate resetting the Github/Survey version variables?

For the SSN survey resets, there are a few additional variables to consider since we have flags & timestamps for both full and partial SSN in addition to deleting the actual full/partial SSN entered in the survey. There is also the Time Acct - SSN variable (d_463625040) which I don't think is being used.

We also want to decide on where on the dashboard this should reside.

We also need to take into account the rules around the variables that this impacts. For example, if there is data for Modules 2-4, then Module 1 data should not be deleted. The menstrual cycle survey is also dependent on the biospecimen surveys, so we have to be cautious about deleting menstrual cycle survey data if biospecimen survey data is filled out. We also need to think about derived variables that are dependent on the survey status flags. @JoeArmani when you get a chance, could you please provide the list of derived variables?

brotzmanmj commented 1 week ago

For this: "NORC is to send the tool to us for approval." What I mean is, Madhuri will reach out to NORC to let them know we're going to tackle this in October release and let us know where they would like to have this tool appear on the SMDB UI, and do they have any requests for how it functions. We will then draft the technical requirements, not NORC.

Thanks

mnataraj92 commented 1 week ago

Thanks Michelle! I'm planning on reaching out to them later today to go over the October release items they'll be involved with.

brotzmanmj commented 1 week ago

Thanks. Also Madhuri, please create a table on Box and link it here. List each module, what changes to each variable would need to be changed for each one, by Concept ID, just like you would do if you were making the request on the prod manual change log. And what additional rules there are for a specific module, if any. e.g. Module 1 cannot be reset if the participant has started modules, 2, 3, or 4.

Tony usually does the prod manual changes for survey resets, so perhaps he can check if anything is missing from your list to guide the programmer on this, and also answer questions about survey version and language flag.

Thanks

JoeArmani commented 1 week ago

@mnataraj92 Here's the Box doc with derived variables and survey-related variables https://app.box.com/s/kc8ugxvosd9h5z3glinufwr0thvwlpgi

mnataraj92 commented 1 week ago

Thank you @JoeArmani!

@anthonypetersen here is the spreadsheet that lists the variables typically impacted when a prod change is made to reset a survey and the concept IDs https://nih.app.box.com/file/1670572108080 (in the Vars to Reset Surveys tab). Please let me know if anything is missing or if any additional details are needed.

anthonypetersen commented 5 days ago

@mnataraj92 for all surveys, we don't need to delete GitHub versions or survey language. Those are captured within the survey document and will be deleted when the document is deleted

anthonypetersen commented 5 days ago

@mnataraj92 for the SSN Survey...

mnataraj92 commented 5 days ago

@anthonypetersen thank you!! i will make a note of these in the spreadsheet.

Does everything else look okay to you?

brotzmanmj commented 5 days ago

Amelia and I were just discussing and we're going to need some rules around survey deletion when there are dependencies involved... primarily: -Can't delete Module 1 if Module 2, 3 or 4 have been started or submitted (since they are dependent on data from Module 1) -Can't delete BUM or BU (biospecimen surveys) if person is eligible for Menstrual Cycle survey since the latter is dependent on data from BUM and BU

Are there any other dependencies that we should be concerned about?

anthonypetersen commented 5 days ago

@anthonypetersen thank you!! i will make a note of these in the spreadsheet.

Does everything else look okay to you?

yes

anthonypetersen commented 5 days ago

@brotzmanmj where my head starts to go is any derived variables that rely on survey completion - a few examples...

brotzmanmj commented 5 days ago

@anthonypetersen good point...

We would need to know more about when/how these and any others get derived and what the impact might be.

-'all baseline surveys complete' (100767870) - under what circumstances does this derive? If it was ever 'yes' would it change back to 'no' if the survey status for one or more of the four modules changed?

-menstrual cycle survey eligibility (289750687) - Did we stop using this variable and deprecate it in a recent release when we changed the way the MC Survey triggers?

anthonypetersen commented 4 days ago

@brotzmanmj

  1. If they were ever set to Incentive Eligible, the derivation code as it stands shouldn't revert them back to No for any reason
  2. All Baseline Surveys Complete derives at the same time other derived variables are calculated (survey submission, biospecimen submission, Update Participant Data API call, etc.) Once set to Yes, it would not get set to No in the current derivation code
  3. The variable is still used in code as it's part of the calculation for if someone should see the survey