Commit Graph

113 Commits

Author SHA1 Message Date
Dan Funk be057e8758 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.
Fixing a bug where the validation of forms did not correctly process auto-complete fields.
Fixing a bug where the approvals script and the update study script could not process dot notation correctly.

Moved populate_random_data into the WorkflowService where it makes more sense.
2020-05-25 15:30:06 -04:00
Dan Funk 6cd4ef64d1 Fixing add_study api endpoint, so you can actually add a new "Study" with just some basic information.
Using the LDAP service for checking user details in development mode - even if you are using the back door.
Added a new Flask fucntion load-example-rrt-data that loads the rrt workflow, and not the CRC wrokflows.
Modified the "load-example-data" in the tests to use some test data, rather than loading up all the workflows[
in CRC each time, with a parameter to load crc data if that is required - which is enabled for just a handful of tests.
(Tests run in 1/4 the time now)
2020-05-25 12:29:05 -04:00
Aaron Louie 481a9ed04c Gets image ids from task data and Injects images into jinja docx 2020-05-19 21:51:54 -04:00
Dan Funk 6d4348d644 Fixing some failing tests. Moved the task properties into a dictionary, but moving the form field properties to a dictionary will be a larger effort that we don't want to get into on either the back or front end right this moment. 2020-05-14 14:39:14 -04:00
Dan Funk b7c11fd893 Merge branch 'master' into feature/investigators_reference_file 2020-05-11 17:36:37 -04:00
Dan Funk 02f8764056 Updated to use the latest script engine / evaluation engine that creates a single location where all values used in BPMN/DMN are processed. Right now this is a python based interpreter, but we will eventually base this on FEEL expressions.
The validation process needs to take the api model into account so we catch errors with bad file names.
2020-05-11 17:04:05 -04:00
Dan Funk da7cae51b8 Adding a new reference file that provides greater details about the investigators related to a study.
Improving the study_info script documentation to provide detailed examples of values returned based on arguments.
Making the tests a little more targetted and less subject to breaking through better mocks.
Allow all tests to pass even when ther protocol builder mock isn't running locally.
Removing the duplication of reference files in tests and static, as this seems silly to me at the moment.
2020-05-07 13:57:24 -04:00
Dan Funk 8ded625c7d 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.
Fixing some failed tests.
2020-05-06 11:46:19 -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
Aaron Louie 6c36a32411 Adds DSP 2020-05-06 10:37:43 -04:00
Aaron Louie a8827d78c4 Fixes typo 2020-05-05 20:49:07 -04:00
Aaron Louie 4ecb0cb3a3 Updates BPMN files 2020-05-05 16:15:38 -04:00
Dan Funk ce76b0d3e8 Merge branch 'feature/protocol_status' into feature/previous_task 2020-05-04 11:12:12 -04:00
Dan Funk 714b5f3be0 Merge branch 'feature/protocol_status' into feature/previous_task
# Conflicts:
#	crc/services/study_service.py
2020-05-04 11:08:36 -04:00
Aaron Louie 098cf10926 Fixes Jinja code to match new structure of StudyInfo documents 2020-05-01 22:49:52 -04:00
Dan Funk f1f8b91c9c Refactor the document details scripts. Now there is one script, it returns data in a consistent format, and has all the details required. The script is located in StudyInfo, with the argument documents. Make note that it returns a dictionary of ALL the documents, with a field to mark which ones are required according to the protocol builder. Others may become required if a workflow determines such, in which case the workflow will enforce this, and the document will have a count > 0, and additional details in a list of files within the document. I modified the XLS file to use lower case variable names, because it disturbed me, and we have to reference them frequently. Removed devious "as_object" variable on get_required_docs, so it behaves like the other methods all the time, and returns a dictionary. All the core business logic for finding the documents list now resides in the StudyService.
Because this changes the endpoint for all existing document details, I've modified all the test and static bpmn files to use the new format.
Shorting up the SponsorsList.xls file makes for slightly faster tests. seems senseless to load 5000 everytime we reset the data.
Tried to test all of this carefully in the test_study_details_documents.py test.
2020-04-29 15:08:11 -04:00
Aaron Louie beb86f0453 Adds protocol script to study service 2020-04-29 10:21:24 -04:00
Aaron Louie 663a1a00a8 Fixes file name so it matches workflow spec ID 2020-04-28 11:50:10 -04:00
Aaron Louie 9311a2502a Fixes broken Formly expression 2020-04-28 09:25:44 -04:00
Aaron Louie 52fc3c2c2f Removes xlsx lock file. Adds LibreOffice lock files to gitignore 2020-04-27 22:58:12 -04:00
Aaron Louie 496e5b7719 Updates all workflow specs to match staging 2020-04-27 22:54:05 -04:00
Aaron Louie af1bb9f80d Adds more useful metadata to approvals and documents status scripts. Fleshes out and pretties up Documents & Approvals screen 2020-04-23 23:32:20 -04:00
Aaron Louie 47de010a88 Puts data from sequential calls to StudyInfo into the right place. Sets the required document flag correctly. 2020-04-23 21:02:08 -04:00
Aaron Louie d91f690388 Adds documents_status StudyInfo script. Adds Documents & Approvals workflow spec. 2020-04-23 19:25:01 -04:00
Aaron Louie 2e601719ad Fixes broken spec 2020-04-23 17:10:10 -04:00
Aaron Louie b10f72c085 Updates workflow spec. Removes old DMN files 2020-04-21 14:19:57 -04:00
Dan Funk ee999a0f15 fixing a bunch of stupid mistakes because I am tried. 2020-04-20 20:28:12 -04:00
Aaron Louie faf4c0df97 Updates BPMN and DMN files 2020-04-15 10:58:13 -04:00
Dan Funk 316b9e6e8d Fixing a stupid mistake - must have typed a ' mark during commit.
Script should inherit from object.
Updating the ids so I could more easily test and assure things were working correctly.
2020-04-08 13:39:42 -04:00
Dan Funk c79415a794 throw a sensible error when study is not found on get_study (don't 500)
some ugly fixes in the file_service for improving panda output from spreadsheet processing that I need to revist.
now that the spiff-workflow handles multi-instance, we can't have random multi-instance tasks around.
Improved tests around study deletion.
2020-04-08 13:28:43 -04:00
Dan Funk 697127660f Assure that all script tasks place data in a dictionary that is named exactly the same as the class - which is also the same as the Script tag. 2020-04-07 14:09:21 -04:00
Dan Funk c6b6ee5d70 Renamed the required_docs script to just "documents", and it returns all documented in the irb_documents look up table indexed on the "Code" - so details become available in the task data like "documents.IRB_INFOSEC_DOC.required".
Updated the irb_documents with shorter code names, thanks to Alex. Re-worked the DMN models so they can properly read from this new datastructure.
2020-04-06 16:56:00 -04:00
Aaron Louie e6550b7e39 Fixes Formly expression syntax error 2020-04-06 13:22:49 -04:00
Aaron Louie 419d619efa Updates BPMN & DMN files with latest from staging 2020-04-06 13:12:34 -04:00
Dan Funk 534e8493a4 Deleting was broken because statistics were causing an integrity constraint.
Updating IDS bpmn to the latest for testing.
Adding a TODO
2020-04-02 12:58:52 -04:00
Dan Funk 4a916c1ee3 Created a "StudyService" and moved all complex logic around study manipulation out of the study api, and this service, as things were getting complicated. The Workflow Processor no longer creates the WorkflowModel, the study object handles that, and only passes the model into the workflow processor when it is ready to start the workflow.
Created a Study object (seperate from the StudyModel) that can cronstructed on request, and contains a different data structure than we store in the DB. This allows us to return underlying Categories and Workflows in a clean way.

Added a new status to workflows called "not_started", meaning we have not yet instantiated a processor or created a BPMN, they have no version yet and no stored data, just the possiblity of being started.

The Top Level Workflow or "Master" workflow is now a part of the sample data, and loaded at all times.

Removed the ability to "add a workflow to a study" and "remove a workflow from a study", a study contains all possible workflows by definition.

Example data no longer creates users or studies, it just creates the specs.
2020-03-30 08:00:16 -04:00
Dan Funk c7d2c28178 Vastly more informative ApiError model that provides details on the underlying task where the error occured.
Added a validate_workflow_specification endpoint that allows you to check if the workflow will execute from beginning to end using random data.
Minor fixes to existing bpmns to allow them to pass.
All scripts must include a "do_task_validate_only" that restricts external calls and database modifications, but performs as much logic as possible.
2020-03-27 08:29:31 -04:00
Aaron Louie dd5971bea9 Updates workflow specs for data loader 2020-03-25 11:13:52 -04:00
Dan Funk e529e149f6 Assure that reference file exists on data-reload. 2020-03-20 07:41:21 -04:00
Aaron Louie e07ad8d21c Updates training session BPMN files. Fixes PB status enums. 2020-03-05 14:21:03 -05:00
Dan Funk 7194d7d374 Standardizing the script tasks that can be executed on the server, adding tons of error messages for when things go wrong. All scripts must exist in side of the crc/scripts directory.
Adding a new script that script tasks can use to add in data about the study.

Moving all the test workflow specifications out of the main load.

fixing a pile of tests so they can find workflow specs that are now moved into the test directory.
2020-03-03 13:52:45 -05:00
Aaron Louie a24b67d5db Updates DSP BPMN 2020-03-02 13:16:36 -05:00
Aaron Louie 5f944af0d7 Adds CR Connect training workflow specs 2020-02-28 15:39:44 -05:00
Dan Funk 1e8a095760 Fixing a rogue comma that made something a tuple and not a string, which drives me CRAZY. 2020-02-25 12:01:25 -05:00
Dan Funk af35f182f6 Random Fact updated with a markdown set of examples 2020-02-20 16:04:38 -05:00
Dan Funk a94596112d Fixing a rogue comma that made something a tuple and not a string, which drives me CRAZY. 2020-02-20 14:35:21 -05:00
Aaron Louie 6075a32d07 Edits default value 2020-02-18 10:17:14 -05:00
Aaron Louie 16db1e3504 Adds default_value to Task schema 2020-02-18 10:14:03 -05:00
Aaron Louie 0a3a932c50 Comments out study workflow for now. Fixes failing unit tests. 2020-02-11 13:40:14 -05:00
Aaron Louie 0ef1a178ed Merge branch 'master' into feature/crc_demo_workflows 2020-02-11 13:30:57 -05:00
Aaron Louie f58ed5b6ee Adds another user task at the end 2020-02-11 12:14:10 -05:00
Dan Funk 879a248002 Adding a test to assure the file creation occurs as expected via the API. 2020-02-10 20:54:22 -05:00
Aaron Louie 359fb4a2f3 Adds draft demo workflow specs 2020-02-10 17:19:11 -05:00
Dan Funk 1d24ebe382 Provide a script for generating word documents from template files. Refractored file managment into a service to make it easier to programatically add files. Modified the workflow_processor to inject the study_id and workflow_id into the running workflow so that this meta-information is avialable at the task level. 2020-02-10 16:19:23 -05:00
Aaron Louie 933a235471 Adds multiple and single file upload form controls 2020-02-05 14:55:52 -05:00
Dan Funk ec4df2b3fa Cleaning up the tests and making it easier to test workflows without adding them to the example data structure. 2020-02-04 16:49:28 -05:00
Aaron Louie 8d39a96606 Adds workflow spec & BPMN with parallel tasks 2020-01-31 12:01:41 -05:00
Dan Funk 95b75f864d You can now add multiple files to a workflow spec, and if properly linked, you can associate a DMN file with a BPMN to process decision tables. 2020-01-23 15:32:53 -05:00
Dan Funk e316d02f02 Adding a missing file. 2020-01-02 12:22:15 -05:00
Dan Funk c4cbaeb64e Refactor models into seperate directories 2019-12-31 16:32:47 -05:00
Dan Funk 9a195bedad Fixing some caching issues and places where the updates were not being processed completed. And updates to the docker file. 2019-12-31 11:31:30 -05:00
Aaron Louie ddd0422392 Adds some fields with some Formly-specific logic 2019-12-20 15:39:40 -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