Skip to content

docs: 🏗️ add a flow diagram and text about processing steps - #207

Open
lwjohnst86 wants to merge 8 commits into
mainfrom
docs/add-a-design-for-flow
Open

lwjohnst86 wants to merge 8 commits into
mainfrom
docs/add-a-design-for-flow

Conversation

@lwjohnst86

Copy link
Copy Markdown
Member

Description

This can help us keep an overview of what's going on within the data package, and what things we need to do to get them there.

Needs a thorough review.

Checklist

  • Ran just run-all

@lwjohnst86
lwjohnst86 requested a review from a team as a code owner August 26, 2026 08:20
@lwjohnst86 lwjohnst86 moved this from Todo to In Review in Data development Aug 26, 2026
@lwjohnst86
lwjohnst86 force-pushed the docs/add-a-design-for-flow branch from f4ae8ac to e511674 Compare September 8, 2026 13:17
Comment thread docs/design.qmd
Comment on lines +65 to +66
completely missing or not. This is to make sure that during joining with other
forms that no data is overwritten.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As you say, visit_id would be null for some resources. It's not immediately clear to me how including this column of nulls would prevent overwriting data. Maybe I don't understand what kind of overwriting or joining you mean here.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, I can't recall exactly why I put this. It might not be a problem, but there was something I noticed during reviewing the variables that made me think that we needed this. I should have put the reason here 😛 well, I'll remove for now and we can always fix later.

Comment thread docs/design.qmd
Comment on lines +63 to +64
- All staged resources will need a `participant_id`, `study_week_id`, and
`visit_id` during processing, regardless of if those columns will be

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The second point in this list makes a similar but less strict statement. Are they different points or is only one correct?

Comment thread docs/design.qmd Outdated
renaming process (after first applying the map between old and new column
names from the CSV file). Form prefixes or suffixes are indicated by name in
the column `form_abbrev` of the `raw-to-resource.csv` mapping file. If that
row is empty, than the name is kept in the `new_form_name` column.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
row is empty, than the name is kept in the `new_form_name` column.
column is empty, than the name is kept in the `new_field_name` column.

Does this simply mean if there is no abbreviation there is nothing to remove?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to be updated based on your comments from another PR.

Comment thread docs/design.qmd
tar["feasibility-data_VERSION.tar"]
md_json["datapackage.json"]
resources["resources/*.parquet"]
staging["staging/**/*.parquet"]

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we also add the raw-to-resource-map.csv file as input to the staging process? If understand correctly, we will split the raw data and make the resources based on this.

One extra piece of information we will need to know when creating the resources is which forms repeat. Those will need a submission_id column added. This could be added to raw-to-resource-map.csv as an extra row for the repeating resource with redcap_repeat_instance as the current_field_name and submission_id as the new_field_name.

Another question is what happens to checkbox fields. In the REDCap metadata, checkbox fields are given as one field with a series of options under select_choices_or_calculations. In the data, each option gets its own column (with a value of checked or not checked). (Same discussion #32 (comment).) Will raw-to-resource-map.csv match the data and list the expanded checkbox fields? See this comment for a concrete example.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, good idea about using the REDCap pulled dictionary rather than the original form creation CSV file. There are more columns created from the form than in the raw to resource mapping file (which is based on the REDCap form creator).

Comment thread docs/design.qmd
Comment thread docs/design.qmd Outdated
Comment thread docs/design.qmd
the participant within a form are included in all resources generated from
that form. They have the resource `*` in the mapping CSV.

<!-- TODO: Not sure if `*` is the right thing to use here...? -->

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this depends on how we want to use raw-to-resource-map.csv.

If, when splitting the forms, we want to say: for each resource, select all fields belonging to that resource, then it would be nice to have all fields listed for all resources in the CSV. That's why I suggested listing these date fields in separate rows for each resource.

Comment thread docs/design.qmd
which needs to be converted to `-10`.
- `medicine_changes` fields end in `_rep`, which need to be removed during
renaming.
- `gruppemde_*` (`group_meetings_*`) end in

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got cut off

@github-project-automation github-project-automation Bot moved this from In Review to In Progress in Data development Sep 10, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

2 participants