Stages

Between collating the files from a source and depositing them in a data store, these stages work the same way whatever the source and store. Each reads the staging directory written by the stage before it and writes its own (see Accession flows):

Attach files without relevant metadata

Links in files that don't carry the metadata to collate them by, e.g. raw PET list-mode files, using a naming convention they share with the files that do.

Label

Labels each accession with where it belongs in the data store. Each store provides its own label subcommand, e.g. label xnat or label folder, but they all work the same way.

Deidentify

Strips patient-identifying information, with recipes chosen per project and file format, and optionally keeps a mapping to reverse it.

Package

Converts resources into the forms the data store needs, e.g. a zip archive and a sample file, after de-identification has worked on the unpacked files.

Annotate

Copies metadata fields into the accession's fields, which the data store records alongside it, e.g. as XNAT custom variables.

Only label is needed in every accession flow. A typical order is:

collate → [attach] → label → [annotate] → [deidentify] → [package] → store

attach can run at any point after collate, but before deidentify if its pattern relies on identifying metadata (see Attach files without relevant metadata). annotate usually runs before deidentify, which drops most of the metadata it reads. But deidentify doesn't de-identify the fields, so only extract fields that can't identify the subject, or coarser values derived from them (see Annotate).

What each stage does to an accession, from unsorted input files to the repository
What each stage does to an accession, from unsorted input files to the repository