mike cullerton
eb153c3ffc
Fixed column definition for standalone
2021-04-29 14:29:43 -04:00
Kelly McDonald
c029dad688
Convert some datetime columns to include timezone
2021-04-28 10:00:22 -04:00
Dan
4946f77f58
adding a missing migration
2021-04-26 15:11:17 -04:00
mike cullerton
1f50bdcb81
Migration script for database changes
2021-04-26 08:36:56 -04:00
Dan
bf8c0ba86f
fixing migration paths (I hope) and fixing a down migration that wasn't working as I attempted to debug.
2021-03-02 14:36:20 -05:00
Dan
9e758c57d3
Merge branch 'dev' into bug/225_enum_lookup_same_field_name
2021-03-02 14:15:58 -05:00
Kelly McDonald
06dedd8a32
Add short_title to study, change update_study task to use kw arguments and add the short_title to the update_study script
2021-03-02 10:03:53 -05:00
Dan
aac3d5c16e
Bug #255 , this requires the front end to pass in the name of the task, when doing a lookup. This will prevent a bug where we have multiple user tasks, with enum fields that set the same variable, but use different lookup tables to populate the dropbown or search feature.
2021-03-01 14:54:04 -05:00
Kelly McDonald
9bd3aa8dcb
service and scripts with working test - still needs a few more tests to try out, but should work to get Mike going
2021-02-24 12:55:23 -05:00
Dan Funk
349c3d657a
Merge branch 'dev' into 201-changes-to-in-progress
2021-02-22 18:17:59 -05:00
Kelly McDonald
97a3a3bf45
Make sure alembic version is added
2021-02-16 09:06:03 -05:00
Kelly McDonald
003bf2f9b9
Remove Approvals per ticket 183
2021-02-16 09:05:29 -05:00
Kelly McDonald
70425eee0d
Add last_updated field - change the api signature to be closer to what we need going forward, but retain the old methods for testing the script get/set through the API
2020-11-13 12:03:29 -05:00
Kelly McDonald
acaf633b45
Added ID as pk
2020-11-11 11:36:25 -05:00
Kelly McDonald
69fe55aa56
Add mostly-working elements of the data-store, compare with dev to see why db is not working after running tests
2020-11-10 08:24:17 -05:00
Aaron Louie
9a31d591ae
Adds user uid and cascades study event in study model. Fixes migration to properly downgrade enums.
2020-08-12 10:13:23 -04:00
Carlos Lopez
bf3dae1885
Collecting user generated study changes
2020-08-05 20:29:05 -06:00
Carlos Lopez
50b207307a
Merge branch 'dev' into feature/update_study_status_latest
2020-07-31 14:26:24 -06:00
Carlos Lopez
5d23223e51
New study status update
2020-07-30 21:03:11 -06:00
Aaron Louie
faba0f55ab
Adds AdminSession model and refactors impersonation methods to use it.
2020-07-30 12:40:53 -04:00
Carlos Lopez
6aa21638de
Updating properly study status & fixing tests
2020-07-29 10:25:57 -06:00
Dan Funk
0ea4c13d09
Convert protocol builder status to always be in lower case in order to better match the front end. And also fixing an issue with the multi_instance that is oddly broken suddenly, and I don't know why.
2020-07-28 17:16:48 -04:00
Aaron Louie
855f5544e5
Adds enrollment_date to study model
2020-07-22 09:35:08 -04:00
Dan Funk
d85ca1ce51
Whenever a workflow is loaded or updated, add events to the TaskEvent table with assignments for the next set of ready tasks, along with who should complete those tasks.
...
Add the lane information to the Task model.
Drop the foreign key constraint on the user_uid in the task log, as we might create tasks for users before they ever log into the system.
Add a new endpoint to the API called task events. It should be possible to query this and get a list of all tasks that need a users attention.
The task events returned include detailed information about the workflow and study as sub-models
Rename all the actions in event log to things that are easier to pass over the api as arguments, make this backwards compatible, updating existing names in the database via the migration.
Throughly test the navigation and task details as control of the workflow is passed between two lanes.
2020-07-14 22:16:44 -04:00
Carlos Lopez
a29b410484
Updating migrations
2020-06-24 21:47:15 -06:00
Carlos Lopez
5327b469f6
Merge branch 'rrt/dev' into feature/emails-enhancement
2020-06-24 21:46:53 -06:00
Dan Funk
6aec15cc7c
Shifting to a different model, where the TaskEvents store ONLY the form data submitted for that task.
...
In order to allow proper deletion of tasks, we no longer merge data returned from the front end, we set it directly as the task_data.
When returning data to the front end, we take any previous form submission and merge it into the current task data, allowing users to keep their previous submissions.
There is now an "extract_form_data" method that does it's best job to calculate what form data might have changed from the front end.
2020-06-19 08:22:53 -04:00
Carlos Lopez
896ba6b377
Email relies now on markdown content
2020-06-17 17:00:16 -06:00
Dan Funk
3b57adb84c
Continuing a major refactor. Some important points:
...
* TaskEvents now contain the data for each event as it was when the task was completed.
* When loading a task for the front end, if the task was completed previously, we take that data, and overwrite it with the lastest data, allowing users to see previously entered values.
* Pulling in the Admin branch, as there are changes in that branch that are critical to seeing what is happening when we do this thing.
* Moved code for converting a workflow to an API ready data stricture into the Workflow service where it belongs, and out of the API.
* Hard resets just convert to using the latest spec, they don't try to keep the data from the last task. There is a better way.
* Moving to a previous task does not attept to keep the data from the last completed task.
* Added a function that will fix all the existing RRT data by adding critical data into the TaskEvent model. This can be called with from the flask command line tool.
2020-06-17 17:11:15 -04:00
Dan Funk
c7d8eaff30
Merge branch 'dev' into feature/refactor_data_loading
2020-06-16 13:15:43 -04:00
Carlos Lopez
e9e805b2c9
Storing emails in database
2020-06-09 22:57:56 -06:00
Dan Funk
bbcbfef1ba
Fixing the migrations so I don't break the universe.
2020-06-04 10:09:36 -04:00
Dan Funk
2cd6311666
as always, forgot the migration.
2020-06-02 18:17:51 -04:00
Dan Funk
1db9401166
Don't put all the data into Spiff Tasks on a reload or backtrack, just store the data that gets submitted each time in the task log, and use that.
...
This should correct issues with parallel tasks and other complex areas - so we don't have tasks seeing data that isn't along their path.
2020-06-01 17:42:39 -04:00
Dan Funk
11413838a7
Faster lookup fields. We were parsing the spec each time to get details about how to search. We're just grabbing the workflow id and task id now and building that straight into the full text search index for faster lookups. Should be peppy.
...
Another speed improvement - data in the FileDataModel is deferred, and not queried until it is specifically used, as the new data structures need to use this model frequently.
2020-05-29 01:39:39 -04:00
Dan Funk
22bdb6c760
This migration will clear out any approvals in the database.
2020-05-28 20:13:33 -04:00
Dan Funk
8f41dfa95f
forgot the migration.
2020-05-28 10:31:20 -04:00
Dan Funk
eb92ee9fb6
Adding missing migration.
2020-05-25 23:47:40 -04:00
Aaron Louie
20bf01a888
Adds cascade to study relationship so data loader doesn't freak out.
2020-05-22 22:04:11 -04:00
Dan Funk
1eb52ed268
Removing duplicate migration.
2020-05-06 13:28:41 -04:00
Dan Funk
07e58e923d
Merge remote-tracking branch 'origin/chore/update_specs' into feature/previous_task
...
# Conflicts:
# Pipfile.lock
Assuring that all documents from the xls spreadsheet are loaded when doing validations.
2020-05-06 11:25:50 -04:00
Dan Funk
9629b36e92
Setting JSON_SORT_KEYS to false, assuring that Flask does not resort all data returned to the front end.
...
Updating Spiff Workflow which has some critical behavioral changes around MultiInstance.
2020-05-06 10:59:49 -04:00
Aaron Louie
4ecb0cb3a3
Updates BPMN files
2020-05-05 16:15:38 -04:00
Dan Funk
c140637dde
Adding Migration, and checking that everything till works the same as before, only a little better.
2020-04-22 15:45:58 -04:00
Dan Funk
c30e66d91d
Fixing migration.
2020-04-21 17:31:20 -04:00
Dan Funk
fd0adb1d43
Updated the study status to use a different enumeration. Migration correctly handles modifying the enum.
...
INCOMPLETE = 'Incomplete in Protocol Builder',
ACTIVE = 'Active / Ready to roll',
HOLD = 'On Hold',
OPEN = 'Open - this study is in progress',
ABANDONED = 'Abandoned, it got deleted in Protocol Builder'
2020-04-21 17:13:30 -04:00
Dan Funk
241980f98f
If you name add a file to a workflow that has the exact same name as a Task Spec's ID, and an extension of "md", it wll use that file as the markdown content, and ignore the markdown in the documentation on the task spec.
...
Moving the primary process id from the workflow model to the file model, and assuring it is updated properly. This was causing a bug that would "lose" the workflow.
2020-04-17 13:30:32 -04:00
Aaron Louie
9a9922c473
Adds display order to Workflow Spec
2020-04-09 14:25:14 -04:00
Dan Funk
2cd5d70a77
missing another migration. This should fix it.
2020-03-30 09:40:56 -04:00
Dan Funk
f8cca274d4
Adding a migration for the last commit.
2020-03-30 08:36:10 -04:00
Dan Funk
b5fca2f683
Forgot a migration
2020-03-27 12:19:32 -04:00
Aaron Louie
f77ebe3177
Adds display order to categories
2020-03-26 15:29:52 -04:00
Dan Funk
473c81ac8b
Allow migration even when data exists.
2020-03-23 13:39:54 -04:00
Dan Funk
ef0bb7aaaa
Allow migration even when data exists.
2020-03-23 13:22:09 -04:00
Dan Funk
f205fffc3c
Allow migration even when data exists.
2020-03-23 13:03:31 -04:00
Dan Funk
3ec8196979
Cleaning up migration hell.
2020-03-20 11:19:43 -04:00
Dan Funk
b35427523d
Merge remote-tracking branch 'origin/master' into feature/reference_files
...
# Conflicts:
# crc/models/file.py
# crc/services/file_service.py
# tests/data/reference/irb_documents.xlsx
# tests/test_files_api.py
2020-03-20 11:07:55 -04:00
Dan Funk
61a46a9c41
Fixing the primary flag on the file table - it should never be null, it shoud just default to false.
2020-03-20 08:36:50 -04:00
Dan Funk
6e3b6c2635
Assure that files uploaded through web forms and files generated from templates can be cross-referenced to known document requirements from the protocol builder. Configurators can control this by managing an XLS Spreadsheet called "irb_documents.xslx".
...
Required Documents is becoming complicated, so making this it's own script task, removing it from study_info.py
The file_service is now very aware of this irb_documents file, so it will always need to exist. We seed this file
during setup, but it can be overwritten by the configurator.
2020-03-19 17:14:20 -04:00
Dan Funk
83d859fd3a
Just merging stuff real quick.
2020-03-18 17:03:36 -04:00
Dan Funk
02be8ede75
Merge remote-tracking branch 'origin/master' into feature/reference_files
2020-03-18 15:16:34 -04:00
Aaron Louie
e4af6f77d0
Adds is_status flag to workflow_spec, status_spec_id & version to study, and is_active flag to WorkflowApi
2020-03-15 15:52:59 -04:00
Dan Funk
779674ab60
Add the ability to upload and request general reference files by name. These will be used across workflows and will frequently contain lookup tables that can be referenced by various script tasks.
2020-03-13 15:03:57 -04:00
Aaron Louie
902dba7191
Adds is_status flag to workflow specs
2020-03-13 14:56:46 -04:00
Aaron Louie
be17c2159c
Adds workflow stats and task events models and schemas. Updates workflow stats and logs task completion when task data is updated.
2020-03-10 21:29:57 -04:00
Aaron Louie
5bf0eb33d9
Fixes migrations. Will require full database reset.
2020-03-06 09:50:32 -05:00
Dan Funk
9fcd6f38f4
Merge remote-tracking branch 'origin/master' into feature/pb_services
2020-03-05 17:13:41 -05:00
Dan Funk
7b21b78987
Workflow Processor will deserialize workflows using the version of the BPMN files used during creation, but allows for both a soft and hard reset - soft resets will use the new workflow without a restart and will retain full history. A hard-reset will restart the workflow from scratch, but will retain the data from the last completed task. Workflows have a complex version number associated with them that is used during the deserialization to find the correct files.
2020-03-05 15:38:30 -05:00
Dan Funk
d0f0acc8cf
Missing migration.
2020-03-04 13:48:13 -05:00
Aaron Louie
01720a8bbf
Replaces migration and fixes broken tests
2020-03-03 16:02:01 -05:00
Aaron Louie
4534b0c2df
Updates study model to better match Protocol Builder. Deletes all migrations and starts over, since Alembic has problems migrating changes to existing column constraints.
2020-02-28 11:14:30 -05:00
Aaron Louie
0cc59d0974
Adds study inactive flag. Sets study to inactive if not found in Protocol Builder.
2020-02-27 11:17:58 -05:00
Aaron Louie
3ef4860391
Adds user_uid and investigator_ids fields to Study. Gets studies from protocol builder and adds them if they aren't already in the database
2020-02-26 18:06:51 -05:00
Aaron Louie
581434b453
Adds SSO header attributes
2020-02-20 15:43:29 -05:00
Dan Funk
705cfc0a35
forgot a critical migration in the last commit.
2020-02-19 12:00:14 -05:00
Aaron Louie
71dac70e1f
Updates list of allowed files. Removes unnecessary migrations. Note this will require a full wipe & reset of the database to work.
2020-02-05 17:23:37 -05:00
Aaron Louie
654f39e7fd
Adds form field key to file model.
2020-02-05 14:55:31 -05:00
Aaron Louie
3ee0426ba9
Adds workflow_id to file endpoints.
2020-02-04 14:26:53 -05:00
Aaron Louie
098ecb3e87
Wipes out old migrations, since changing foreign key constraints in SQLite requires a full database reset anyways.
2020-02-04 09:57:02 -05:00
Aaron Louie
0368657549
Adds ability to get FileModel records by study and task
2020-02-03 21:56:18 -05:00
Aaron Louie
7fc2e87b84
Adds primary process ID to workflow spec
2020-01-23 10:54:41 -05:00
Aaron Louie
c11bf3d286
Adds workflow spec name field
2020-01-21 15:22:44 -05:00
Dan Funk
782271885a
Fixing database migrations - will require a delete of the database.
2020-01-02 10:14:48 -05:00
Dan Funk
0685b282e8
Don't put foreign key constraints on primary keys.
2019-12-30 16:00:33 -05:00
Dan Funk
12953fc991
Adding database migration of file management.
2019-12-27 13:51:33 -05:00
Dan Funk
a734578327
re-building migrations.
2019-12-18 14:16:26 -05:00
Dan Funk
9861f6baf3
Lots and lots of random stuff as I organize code and get things to make sense.
2019-12-18 14:02:17 -05:00