Added function `get_all_required_documents` to return master list of required_documents
Deleted static master list of required_documents from RequiredDocument class
Replaced static master list with call to new method
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.
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
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
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
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
- 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
Created a new route /user_studies in __init__.py that takes a uva_id.
Pulled out some dupllcate code into a new method; render_study_template
In index.html, added a pulldown to select the user. I pull the list of users from the studies so we only show users that have studies.
Added a script to process the selection.
Most of my changes are in ldap_service. I added users_as_json method, commented out an unused method, and created my own search string.
The model in ldap.py is unchanged.
In ldap_response, I added a fake entry to test multiple returned values.