String `IntendedFor` Fields
This release adds the ability for `d2b` to handle and resolve `IntendedFor` fields which are of type: `int | str | (int | str)[]`. I.e. `IntendedFor` can be either an integer (as before), string (new), or a list of int or string (mixing is allowed!)
Strings entries are treated as references to `description.id` fields.
The example below shows how we could reference the first description (the one with `"id": "my-dwi"`) as the acquisition for which the last acquisition is intended for:
diff
{
"descriptions": [
{
+ "id": "my-dwi",
"dataType": "dwi",
"modalityLabel": "dwi",
"criteria": {
"SeriesDescription": "*DWI*"
}
},
{
"dataType": "anat",
"modalityLabel": "SWI",
"criteria": {
"SeriesDescription": "*SWI*"
}
},
{
"dataType": "func",
"modalityLabel": "bold",
"customLabels": "task-rest",
"criteria": {
"SeriesDescription": "rs_fMRI"
},
"sidecarChanges": {
"SeriesDescription": "rsfMRI"
}
},
{
"dataType": "fmap",
"modalityLabel": "fmap",
"criteria": {
"SidecarFilename": "*echo-3*"
},
"IntendedFor": [
- 0,
+ "my-dwi",
2
]
}
]
}