Commit Graph

45 Commits

Author SHA1 Message Date
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
Kelly McDonald 0b08a95e25 Add test and make sure that the API endpoint does the right thing when we switch users - checks both associated with access and associated with no access 2021-02-25 12:20:43 -05:00
Kelly McDonald a1814a7727 Add some additional comments - just to be clear 2021-02-25 11:40:08 -05:00
Kelly McDonald 55f8825b3c Make sure we are testing both versions of the setting functions as well as the getting functions 2021-02-25 09:14:24 -05:00
Kelly McDonald f592a8a0b0 Added a few more tests - I think I need to test one more script endpoint 2021-02-25 09:07:46 -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 53fa49e668
Merge pull request #243 from sartography/183-remove-study-approval-code
Remove Approvals per ticket 183
2021-02-22 18:12:02 -05:00
Kelly McDonald 003bf2f9b9 Remove Approvals per ticket 183 2021-02-16 09:05:29 -05:00
mike cullerton 777cfbdecd We now test whether we have a valid StudyModel when getting a study by study model.
We raise an ApiError if the model is None or empty.
2021-02-09 17:37:55 -05:00
mike cullerton f9e4b6a972 Test and workflow for the new code. We test the correct cancel notify is called, and only when appropriate. 2021-01-29 14:09:42 -05:00
mike cullerton 80d2009573 Modified the test to cover hold, abandon, and open_enrollment. These are tickets 21 and 94 2020-12-31 10:40:27 -05:00
mike cullerton ede5df4df5 Studies can now be put on hold in the dashboard. We were overriding the status in StudyModel.update_from_protocol_builder. 2020-12-30 17:49:59 -05:00
Kelly McDonald 3a1160efac refactored calls into a service 2020-12-11 11:41:32 -05:00
Kelly McDonald 9a4d167dcd Add in api changes 2020-11-11 09:44:58 -05:00
Kelly McDonald 3ba11f5e6b add user_data_get/set and alter test so that it ensures that we don't grab study_data stuff from the user_data calls
change the test to mock up the user.
2020-11-10 10:32:37 -05:00
Kelly McDonald 245124779e 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:21:46 -05:00
Kelly McDonald e598994d34 Change the study_sponsors script so that we can actually call it :
var = study_info('sponsors')

to keep it more in line with other scripts that we have
2020-11-05 10:31:47 -05:00
Dan Funk 5be35e8bab Adding a study sponsors script to return details about study sponsors 2020-08-25 10:30:46 -04:00
Dan Funk d4c5e297cc Merge remote-tracking branch 'origin/dev' into fix/delete_workflow_endpoint 2020-08-17 15:09:11 -04:00
Dan Funk c09441d019 Merge branch 'dev' into fix/delete_workflow_endpoint 2020-08-17 15:07:58 -04:00
Dan Funk 85ad477b2b Some minor cleanup on the study status and automatic events. I wanted to avoid having one database model automatically generating other database models as a side effect. The study service now has full responsiblity to recording study events.
To help in running tests, adding __init__.py methods to all the test directories.
2020-08-17 14:56:00 -04:00
Carlos Lopez 369fe4bb35 Automatic events refactoring 2020-08-14 08:36:46 -06:00
Carlos Lopez aa010272cc Automatic event creation in study creation 2020-08-14 08:36:10 -06: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 79c14ad23c Unlinking file from workflow instead of trying to delete it 2020-08-10 22:23:20 -06:00
Carlos Lopez cef7c48be2 Adding tests 2020-08-10 21:18:41 -06:00
Carlos Lopez 4fcba113b8 Fixing tests 2020-07-31 11:49:04 -06:00
Carlos Lopez 5d23223e51 New study status update 2020-07-30 21:03:11 -06:00
Carlos Lopez de49397549 Adjustings tests for protocol builder status changes 2020-07-29 10:51:34 -06:00
Carlos Lopez 73a6b7adf1 Fixing tests 2020-07-29 10:25:57 -06: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
Dan Funk f15626033d Allow the workflow to be requested without making changes to the workflow - requires that you specify a read_only flag of true, otherwise it assumes that you want a fully prepared workflow with the next ready task set to run. 2020-07-28 13:33:38 -04:00
Dan Funk 300026cbc8 Expanding the task events endpoint to accept workflow and study ids as additional filters.
Removing events from the study endpoint, too noisy.
2020-07-28 10:16:48 -04:00
Dan Funk 0cb480801b Provide event data on the Study api endpoint.
Speed up the tests a little, because that got out of hand.  Need to dig into what is causing this problem.
2020-07-27 17:05:01 -04:00
Dan Funk 3d9eeab502 Add a few more details to the workflow metadata model. 2020-07-21 15:18: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
Dan Funk ff7c30b879
Merge pull request #138 from sartography/fix/cleanup_todos
Cleanup pending  TODOs
2020-07-10 08:26:47 -04:00
Dan Funk 6a79fb3581 There may be multiple investigators of the same type that come back from the protocol builder, adding some tests and additional code to handle this, but still keep the list flat, currently appends a number to the investigator type when there is more than one. 2020-07-07 17:16:33 -04:00
Carlos Lopez a302208890 Updating test for study with approvals 2020-07-07 08:32:41 -06:00
Dan Funk 419c05e46c
Merge branch 'dev' into fix/more-info-in-exceptions 2020-07-06 12:51:24 -04:00
Dan Funk a5cef8775e * Modifying the StudyInfo script to return both "investigators" and "roles", the investigators argument will return only the current active investigators according to the protocol builder. The "roles" argument returns all possible roles - it is what "investigators" use to be.
* The Task.title returned to the front end will now attempt to process the "display_name" property for dot-notation syntax, making it possible to use this for multi-instance tasks,
  but will work in all cases where we want he title to change based on values in the data model.
* Fixing a bug the test_study_api where it wasn't updated when we made recent changes to the different states of a study.
*
2020-07-06 12:09:21 -04:00
Carlos Lopez 817333f26e Adding proper exception information 2020-07-02 16:10:33 -06:00
Carlos Lopez e947f40ec7 Merge branch 'rrt/dev' into feature/emails-enhancement 2020-06-17 20:10:11 -06:00
Carlos Lopez ddf1f4640c Re-organizing tests file structure 2020-06-17 16:10:06 -06:00