Requirements - MCEMS/dispatch GitHub Wiki

  1. User goes to https://dispatch.bergems.org/
  • If their login is good from a previous visit, they are presented with the New Alert page
  • If not, they are presented with the Login page
  1. Creating Alerts
  • Alerts will be created from the New Alert page
  • The New Alert page has a "Log Out" button that calls client.logout()
  • A form allows the following information to be entered:
    • Chief Complaint (text box)
    • Location (text box)
    • Address (text box)
    • Patient Age (text box, number)
    • Patient Sex (selection: "Male", "Female", "Other", "Unknown" -- default is Unknown)
    • Patient is breathing normally (checkbox, default to checked)
    • Patient is responding normally / acting appropriately (checkbox, default to checked)
    • Notes (long text area)
  • The form has a submit button labelled "Send Alert"
  • After the location field is updated, if the address field is empty, set the address field to "2400 Chew St"
  • When the submit button is pressed, the form data will be submitted via the API client. The "info" field in the API request will be generated from the form data. The generated message should look like this: "[age] year old [sex], [alert|not alert], [breathing normally|not breathing normally]. [notes]"
  • The tab key must work as expected to tab between fields in the form.
  • When the alert is submitted:
    • If the submission is successful, the message "Alert successfully sent" is displayed and the form is cleared out.
    • If the submission is not successful, the message "There was a problem sending the alert. Please dispatch via radio." is displayed. The form is not cleared.
  1. Logging In
  • The login page allows the user to enter their username and password
  • The login page has a "Log In" button that calls the client.login() method with the username and password from the form.
  • If the login is successful, the New Alert page is shown.
  • If the login is unsuccessful, the message "Invalid credentials. Please try again." is displayed on the page.