Commit Graph

354 Commits

Author SHA1 Message Date
Dan 77adaffb58 fixing some merge conflicts. 2021-05-14 14:52:22 -04:00
Dan 295008304a Just a little prettier. 2021-05-14 14:44:48 -04:00
Dan Funk 2770125025
Merge pull request #55 from sartography/persist-selected-user-319
Persist selected user #319
2021-05-14 14:18:18 -04:00
mike cullerton 2ff6814bd4 __init__.py cleanup
- moved routes to new `routes.py` file
- moved helper functions to new `pb_mock.py` file
2021-05-12 11:54:46 -04:00
mike cullerton be9484760a Fixed test.
The /user_studies route now returns a 200
2021-05-11 17:00:43 -04:00
mike cullerton 6c11a04614 PB Mock now retains the selected_user filter when returning to the study listings page.
Modified the / and /user_studies routes
The / route now redirects to the /user_studies route
The /user_studies route updates the selected_user table.

Added methods `_is_production` and `_get_request_ids` to get uva uid from header on production.

Added `get_current_user`, `get_selected_user`, and `update_selected_user` to help the process.
2021-05-11 16:42:36 -04:00
mike cullerton f9b254c518 We now pass `all` in the user_studies url.
We use this to turn off selected_user
2021-05-11 16:34:49 -04:00
mike cullerton 688023a248 Added table selected_user for ticket 319.
We now store a user's selected_user so they see a filtered list of studies when returning to the PB Mock homepage
2021-05-11 16:33:44 -04:00
Dan Funk 5fa0ae8958
Merge pull request #53 from sartography/irb-pro-api-endpoints-275
Irb pro api endpoints #275
2021-04-16 17:34:17 -04:00
mike cullerton 650cd5c40a Changed column name in irb_info from `RB_OF_RECORD` to `IRB_OF_RECORD` 2021-04-16 16:39:36 -04:00
mike cullerton 584807bb43 Fixed issue with Study Sponsors.
Was using Sponsor IDs that were only available locally.
Now we load test sponsors, and use them.
2021-04-13 12:47:42 -04:00
mike cullerton d8552b4955 Turned off CSRF token for testing 2021-04-13 12:08:03 -04:00
mike cullerton feff3f4e6b Added a big test for deleting a study.
We add a study and then add all the different types of information to the study.
We then delete the study and make sure all the associated information is also deleted.
2021-04-13 12:07:34 -04:00
mike cullerton d7ca809968 Delete the IRB Info when deleting a study 2021-04-09 12:05:27 -04:00
mike cullerton d3818debb4 Added API endpoint for the new irb_info data 2021-04-09 12:04:46 -04:00
mike cullerton 4ddf47314d Merge branch 'dev' into irb-pro-api-endpoints-275 2021-04-09 10:16:29 -04:00
mike cullerton 84b3d455c1 Moved the API methods to a separate file.
Note that I had to move the `connexion_app.add_api()` call so that it happened *after* db.session was defined, so I could import the session into the api.py file
2021-04-09 10:00:24 -04:00
Dan fb99357431 don't depend on dockerhub for nothin, ever. 2021-04-09 09:53:56 -04:00
mike cullerton 40f45202df Ticket 275 - adding new API endpoint for IRB Study Info
models.py
 - Added new IRBInfo model
 - Added relationship to Study table

forms.py
 - Added form to edit the data
 - Added column in Study table for link to edit new info

__init__.py
 - Added route for new form page
 - Added method to update the db
2021-04-08 17:35:24 -04:00
Dan bd4bd3e49f Allow deletes even with new model. 2021-04-08 16:11:17 -04:00
Dan Funk 128945d0b3
Merge pull request #49 from sartography/irb-api-endpoints-273
Irb api endpoints #273
2021-04-08 12:44:48 -04:00
mike cullerton 2c780c9028 Q_COMPLETE is not a column in the study table anymore. Removed Q_COMPLETE from the API Study component schema 2021-04-06 12:25:21 -04:00
mike cullerton 4e2b79741f Tests were failing because forms were not sending Q_COMPLETE data.
Added mocked Q_COMPLETE data to `add_study` and `test_add_and_edit_study`.
2021-04-06 12:23:13 -04:00
Dan Funk 60da05df4e
Merge pull request #46 from sartography/update-study-details-fields-257
Update study details fields 257
2021-04-02 18:56:26 -04:00
Dan 3a8a0fba25 Merge remote-tracking branch 'origin/dev' into update-study-details-fields-257 2021-04-02 12:43:53 -04:00
Dan Funk 81b33ca6f5
Merge pull request #44 from sartography/dependabot/pip/urllib3-1.26.3
Bump urllib3 from 1.26.2 to 1.26.3
2021-04-02 12:43:06 -04:00
Dan Funk 4180fbd433
Merge branch 'dev' into dependabot/pip/urllib3-1.26.3 2021-04-02 12:42:59 -04:00
Dan Funk 23d4bf4457
Merge pull request #45 from sartography/dependabot/pip/jinja2-2.11.3
Bump jinja2 from 2.11.2 to 2.11.3
2021-04-02 12:36:41 -04:00
Dan c9ddfe6be4 Fixing an error in the API.yml file that started showing up with the pip update. 2021-04-02 12:32:23 -04:00
Dan Funk cc1b602e34
Merge pull request #43 from sartography/user-lookup-fix
Two bug fixes:
2021-04-02 12:20:11 -04:00
mike cullerton 15dc53f957 Removed Q_COMPLETE from the StudySchema fields, because it is no longer a column. It is a relationship now. 2021-04-02 11:48:09 -04:00
mike cullerton f23e4e307f removed commented line 2021-04-01 14:12:23 -04:00
mike cullerton 74b6dde9b2 Added component schema for IRBStatus
Modified Q_COMPLETE property definition for study schema
2021-04-01 14:11:59 -04:00
mike cullerton c9695cc867 Migration for current DB changes 2021-04-01 12:47:27 -04:00
mike cullerton b663a4ec38 Added new API endpoint to check IRB Status for study 2021-04-01 12:46:15 -04:00
mike cullerton 8d0382ab5a The Q_COMPLETE form field on the new/edit study page is changing from boolean to option select.
Also adding API endpoint to check the IRB status

Added check_study method for API endpoint
Added 'No Error' as default for new Q_COMPLETE select form field
Added code to seed the current status to the form
Added code to process the status information from the form and enter into irb_status table
2021-04-01 12:45:41 -04:00
mike cullerton 762c29f951 The Q_COMPLETE form field on the new/edit study page is changing from boolean to option select.
Import new IRBStatus model
Change Q_COMPLETE form field to SelectField
2021-04-01 12:40:59 -04:00
mike cullerton d9f46de161 The Q_COMPLETE form field on the new/edit study page is changing from boolean to option select.
Model Changes:
Delete Q_COMPLETE column from study table.
Add Q_COMPLETE to study table as relationship to new IRBStatus table
Add IRBStatus table.
Add IRBStatusSchema for API JSON
2021-04-01 12:39:09 -04:00
mike cullerton f4bd576a72 Sample csv file for testing the file upload feature
Attempt at testing the file upload feature.
Test fails because SQLite doesn't accept the date as a string. NEED TO FIND A SOLUTION FOR THIS
2021-03-30 11:00:40 -04:00
mike cullerton a2ddfaf03b Migration script for new db columns 2021-03-30 10:56:49 -04:00
mike cullerton c260e6a465 Added new fields for study_details
Changed some field types

Removed 2 unused documents from required documents list
Changed the name of required documents from Required to Documents
2021-03-30 10:56:23 -04:00
mike cullerton a1f2b98ecf Added code to process uploaded study_details csv file
Modified study_details method to accommodate the csv upload
Added imports for csv, TextIOWrapper
Removed unused imports for date, re
2021-03-30 10:53:56 -04:00
mike cullerton 4834c029d9 Added form to upload study_details csv file 2021-03-30 10:48:36 -04:00
mike cullerton 5371d204e5 Added db.drop_all() to the tearDownClass class.
Now we always start tests with a new DB

I tried to add some tests for form validation, but ran into a problem with the csrf_token.
The tests couldn't find it.
This is not a problem using the form for real.
It would be nice to figure this out.
2021-03-25 13:14:17 -04:00
mike cullerton ab776ea47d Migration for study_details db changes 2021-03-25 13:12:03 -04:00
mike cullerton 9d839bb85c Changed to match real Protocol Builder
- Removed `Scientific Contact` from Investigator types
- Changed study_details SPONSORS_PROTOCOL_REVISION_DATE data type from integer to date
- Added 8 new fields to study_details
2021-03-25 13:11:27 -04:00
mike cullerton eb4ca6fda4 Sorted the fields in the study_details form to match real Protocol Builder 2021-03-25 13:07:42 -04:00
mike cullerton 0ea0b0a233 added form validation for study_details 2021-03-25 13:06:52 -04:00
dependabot[bot] 5c4a8037d4
Bump jinja2 from 2.11.2 to 2.11.3
Bumps [jinja2](https://github.com/pallets/jinja) from 2.11.2 to 2.11.3.
- [Release notes](https://github.com/pallets/jinja/releases)
- [Changelog](https://github.com/pallets/jinja/blob/master/CHANGES.rst)
- [Commits](https://github.com/pallets/jinja/compare/2.11.2...2.11.3)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-20 02:41:59 +00:00
dependabot[bot] 5fc5a73957
Bump urllib3 from 1.26.2 to 1.26.3
Bumps [urllib3](https://github.com/urllib3/urllib3) from 1.26.2 to 1.26.3.
- [Release notes](https://github.com/urllib3/urllib3/releases)
- [Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst)
- [Commits](https://github.com/urllib3/urllib3/compare/1.26.2...1.26.3)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-19 20:04:15 +00:00