We need to enter the medication data to a BIDS-compatible file in the phenotype directory. The original data are kept in json format for each subject. There is many aspects we save about a medication, including dose, unit, regimen, indication, BIDS sessions that overlap with it, etc. In putting all this information into a tsv file we thought to give columns for each individual medication, e.g.:
tylenol_duration | tyolenol_doseUnit | tylenol_doseValue | aspirin_duration | aspirin_doseUnit | aspirin_doseValue
This means that the number of columns is large, and if we wanted to put a dataset description file it would be large and repetitive, having for each medication in the example above: duration, doseUnit, doseValue. But the upside is that the whole dataset can be quickly filtered to analyze a single medication, that overlaps with specific sessions, etc. The long vertical format of data storage needs more transformations to use the data.
I wanted to ask the community here if there is a preferred way to include medication in BIDS, or how are you dealing with these problems. My dataset has 450 subjects with 1900 sessions in total. Lot’s of carefully reported medications.
Thank you.