Skip to content

Instantly share code, notes, and snippets.

@BrianZanti
Created March 8, 2021 15:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BrianZanti/d74b200c7982fdef34dc8eeb023c7dea to your computer and use it in GitHub Desktop.
Save BrianZanti/d74b200c7982fdef34dc8eeb023c7dea to your computer and use it in GitHub Desktop.

Seattle Grace

Description

Seattle Grace is based off of Grey's Anatomy, but you need NO knowledge of Grey's Anatomy to complete this final. Make sure to read all instructions, tasks, and user stories before getting started.

Database Information

  • Doctors have many surgeries
  • Surgeries can have many doctors.
  • Doctors have a name, number of years they have practiced, and university that they attended
    • Ex. name: 'Meredith Grey', years_practiced: 11, university: 'Dartmouth'
  • Surgeries have a title, day of the week ("Monday", "Tuesday", "Friday", etc...), and operating_room_number
    • Ex. title: 'Tonsillectomy', day_of_week: 'Monday', operating_room_number: '113'

User Stories

User Story 1, Doctor Index

As a visitor 
When I visit the Doctor index
Then I see the all Doctors including their name, years practiced, and university
And I see that the doctors are listed in order of years practiced from most to least
User Story 2, Surgery Show Page

As a visitor
When I visit a surgery's show page
Then I see the surgery's title, day of the week, and operating room number
And I see the names and years practiced of all doctors performing this surgery
And I see two sections, one for 'Most experienced doctor' and one for 'Least experienced doctor'
And in those two sections I see the two doctors who are performing this surgery with the most and least years practiced 
in the appropriate section including thier name and their years practiced.
User Story 3, Add a Doctor to a Surgery

As a visitor
When I visit a surgery's show page
I see a field with instructions to "Add A Doctor To This Surgery"
When I input the name of an existing Doctor into that field
And I click submit
I'm taken back to that surgery's show page
And I see the name of that doctor listed on the page

(Note: you do not need to handle any sad paths)
(Note: you should not create a new doctor)

Extensions

Extension, Surgery Index

As a visitor
When I visit the surgery index
I see each surgery including its title, day of week, and operating room number
And next to each surgery I see the average years practiced of doctors performing that surgery
And I see that the surgeries on this page are ordered by average years practiced from greatest to least

(Note: you should not make a separate query for each surgery to calculate the average doctor years practiced)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment