Giter VIP home page Giter VIP logo

assessment-week-14-redo's Introduction

Rails Practice

Setup

  • Fork and clone the repository
  • Install gems - bundle
  • Set up the databases - rake db:create db:migrate db:seed
  • Start the server - rails s

You can run specs with:

rspec

Note: email/password combinations for existing users populated by rake db:seed can be found in the db/seeds.rb file.

Stories

Users can see a patient's list of prescriptions

Given that I am on the index page
When I click on a patient's name
Then I see the patient page with an empty table of prescriptions

Users can add prescriptions

Given I am on the patient's show page
When I click on "Add prescription"
And I fill in the fields from the comp
Then a prescription is created with a flash message "Your prescription has been created" 
And you see the new prescription in the prescription table

All fields for a prescription are required

When I try to create a prescription
Then the system validates that all fields are required
And displays error messages as in the comp if they are missing

Users can see prescriptions from the medications show page

Given I am on the index page
And I click on the name of a medication
Then I see a list of people that have a prescription for that medication

Dosage field must start with a number

When I try to create a prescription
And I try to add a dosage without a number as the only characters before the first space
Then an error message is displayed

End date cannot be before start date on prescriptions

When the user enters an end date that is before the start date
Then the system displays a validation error that says
"End date must be after the start date"

Wireframes

Index page

Patient show page

New prescription page

New prescription page w/ errors

Medication show page

assessment-week-14-redo's People

Contributors

cpbuckingham avatar mikegehard avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.