-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
152 create admin dashboard #166
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The hospital and provider id were not referencing the provider and hospital but instead the user of a provider and hospital. This was problematic when trying to pull the actual name of the hospital or provider to show in the studies tables.
Also fetches the name of the provider associated with the study
Also fixed spacing and indentation
I don't think we properly set these tables up. We an actual model (class) for the join tables to user them
…dded Hospitals and Providers now have studies. A hospital user can see all studies for their hospital and a provider user can see all studies for their provider. Study configurations are now mapped to a provider and not a user
…study provider/study Also our truncate fixture was not actually truncating tables before each test, it now is.
Closed
Jest CoverageSummary
Junit Summary
Coverage Report (72%)
|
Quality Gate passedIssues Measures |
zmorris248
approved these changes
Apr 9, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks tubular
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
This PR updates the Studies page. It is now dynamic based on your user role.
This PR also refactors the relationships between studies and users.
Old implementation:
A study is connected to a hospital USER through hospital_id and a provider USER through api_key
A study configuration is connected to a provider USER through api_key
New implmentation:
A study is connected to a HOSPITAL through hospital_id and a PROVIDER
A study configuration is connected to a PROVIDER
To make the PROVIDER connections we grab the provider user and get the provider through the join table.
These relationship changes align more closely with the goal of our system. That is, hospitals send studies which are processed by our providers. Not the users themselves.
This is a fairly large PR but most of the changes are in the test suite.
Implementation
You can now search by Hospital Name and Provider Name in the studies table. Previously we showed the ids of the hospital user and provider user in these columns and were unable to search.
The backend test suite now ACTUALLY clears the database before every test run. This slightly increases the time for the suite to run but removes any dependencies.
New migrations were created to update the foreign key relationships between hospital/provider and studies
Testing
This feature was tested by spinning up the docker compose (backend, db, frontend).
I logged in as each user and saw the corresponding studies.
The entire backend test suite was updated to reflect the new relationship changes
Problems Faced
Notes
The scope for this issue was to update the studies page AND api key page but I will make a new issue for the api key page.