Dear Stata experts,

I have recently finalized a data collection from an on-line platform with embedded Qualtrics survey. My issue pertains to a one particular matrix-type question with 10 sub-items as rows, which have been randomized and assigned a Y/N value by the respondents (column).

The randomization resulted in a different order of presentation of same single items to each respondent. Y/N values listed under the same column (such as one of ten column resulting from the split) pertain therefore to different items, The order of items displayed for each respondent is provided in a summary column (all items separated by vertical bars).
I attempt to illustrate the structure of the data below :

Respondents no Q1_1 Q1_2 Q1_3 .... Q3_DO (display order)
1 Yes Yes No I find it relaxing | I am too lazy to do it | other
2 Yes No Yes I am too lazy to do it | Other | I find it relaxing
....

My goal is to organize the respondents' answers so that the Y/N values are assigned to a column with the corresponding item in a consitent way across all observations. This would result in the use of the current sub-items (listed in the DO column) as independent column labels.
I do not know how to approach this issue and tried several approaches (first splitting the DO variable into multiple variables, concatenating the item to the related value by order of display, possibly reshaping the data based on such inputs..) but unfortunately failed.
I would be very grateful for your help.
With kind regards
Agnieszka
Post-Doc researcher
CBS, Denmark