cr-connect-workflow/crc
Dan Funk cd7f67ab48 A major refactor of how we search and store files, as there was a lot of confusing bits in here.
From an API point of view you can do the following (and only the following)

/files?workflow_spec_id=x
* You can find all files associated with a workflow_spec_id, and add a file with a workflow_spec_id
/files?workflow_id=x
* You can find all files associated with a workflow_id, and add a file that is directly associated with the workflow
/files?workflow_id=x&form_field_key=y
* You can find all files associated with a form element on a running workflow, and add a new file.
   Note: you can add multiple files to the same form_field_key, IF they have different file names. If the same name, the original file is archived,
   and the new file takes its place.

The study endpoints always return a list of the file metadata associated with the study.  Removed /studies-files, but there is an
endpoint called

/studies/all  - that returns all the studies in the system, and does include their files.

On a deeper level:
 The File model no longer contains:
  - study_id,
  - task_id,
  - form_field_key

Instead, if the file is associated with workflow - then that is the one way it is connected to the study, and we use this relationship to find files for a study.
A file is never associated with a task_id, as these change when the workflow is reloaded.
The form_field_key must match the irb_doc_code, so when requesting files for a form field, we just look up the irb_doc_code.
2020-05-28 08:27:26 -04:00
..
api A major refactor of how we search and store files, as there was a lot of confusing bits in here. 2020-05-28 08:27:26 -04:00
models A major refactor of how we search and store files, as there was a lot of confusing bits in here. 2020-05-28 08:27:26 -04:00
scripts A major refactor of how we search and store files, as there was a lot of confusing bits in here. 2020-05-28 08:27:26 -04:00
services A major refactor of how we search and store files, as there was a lot of confusing bits in here. 2020-05-28 08:27:26 -04:00
static Adding an "UpdateStudy" task that is able to update the data on the study model, useful for setting core data points on the model, such as setting the Primary Investigator, or altering the Study Title. 2020-05-25 15:30:06 -04:00
__init__.py Protocol Builder isn't disabled on the dcos servers, trying to figure out why, and assure it isn't some sort of weird race condition. 2020-05-26 22:42:49 -04:00
api.yml A major refactor of how we search and store files, as there was a lot of confusing bits in here. 2020-05-28 08:27:26 -04:00