Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Open Hospital App (MVP)

AppHeader layout

OpenHospital logo

Facility’s Name

Breadcrumb

navigation menu

Activity layout

First Tab

Activity

Components

  • AppHeader

  • PatientDataForm

  • PatientSearchItem

  • First Tab

Activities

  • LoginActivity

  • DashboardActivity

  • NewPatientActivity

  • SearchPatientActivity

  • PatientDetailsActivity

  • EditPatientActivity

1. LoginActivity

  • It should NOT show AppHeader

  • It should NOT show FirstTab

  • It should validate the username input;

    • username input is REQUIRED;

  • It should validate the password input;

    • password input is REQUIRED;

  • It should toggle the password visibility;

  • It should have a login and resetPassword mode;

    • login mode should have username and password input fields, and a "submit" button;

    • resetPassword mode should have an username input field and a "submit" button;

  • It should have a link that toggles the central panel to the resetPassword mode;

  • It should have a "back" button that toggles the central panel to the login mode;

  • It should reset the activity state to login mode after submitting the resetPassword's username input;

2. AppHeader

  • It should contain the OpenHospital logo on the left;

  • It should contain the Facility’s name;

  • It should contain the Breadcrumb navigator;

  • It should be child of a component with access to the user credentials;

  • It should have a navigation menu at the bottom-right corner;

    • It should have one button for each <enabled actions> expected for the user credentials;

3. DashboardActivity

  • It should NOT show FirstTab

  • It should have the AppHeader;

  • It should have access to the user credentials;

  • It should present the <enabled actions> expected for the user credentials;

    • MPV (New Patient and Search Patient credentials only)

      • It should have an action button that takes to NewPatientActivity;

      • It should have an action button that takes to SearchPatientActivity;

    • Future

      • it should be a composition of the <enabled actions>

4. PatientDataForm

  • It should check if there is incoming data in the props for populating the fields' values and the patient's profilePicture;

  • It should set the "submit" button behavior with the callback passed as prop;

  • It should handle the patient's profilePicture;

    • It should allow the patient's profilePicture upload;

      • It should present a dialog for choosing the way of gathering the patient's profilePicture;

      • It should be able to get the picture from local device storage;

      • It should be able to open the integrated hardware to take the picture instantly;

    • It should be able to remove the current patient's profilePicture;

  • It should NOT validate the previousCode input;

  • It should validate the name input;

    • firstname input is REQUIRED;

    • firstname input should contain only alphabetic characters;

  • It should validate surname input;

    • secondname input is REQUIRED;

    • secondname input should contain only alphabetic characters;

  • It should NOT validate the taxNumber input;

  • It should validate the gender input;

    • gender input is REQUIRED;

    • gender input should have the options "man", "woman" and "not declared";

  • It should validate the age input;

    • age input is REQUIRED;

    • age input is made by three validated inputs

      • years input

      • months input

      • days input

    • when birthday input is set, age is automatically calculated

    • when data is saved and birthday is not set, birthday is automatically calculated and saved

  • It should validate the birthday input;

    • birthday input should be in the format YYYYMMDD;

    • birthday input should rendered with a mask (MM/DD/YYYYY);

  • It should NOT validate the town input;

  • It should NOT validate the area input;

  • It should NOT validate the telephone input;

  • It should NOT validate the nextOfKin input;

  • It should validate the email input;

    • email input is NOT required;

    • email input has to be a valid email address;

  • It should NOT validate the Note input;

  • it should have a collapsable “more” section with further fields NOT required:

    • It should validate the profession input from list and default "unknown";;

    • It should validate the maritalStatus input from list and default "unknown";;

    • It should validate the bloodType input from list and default "unknown";;

    • It should NOT validate the fatherName input;

    • It should validate the fatherAlive input options "yes", "no" and default "unknown";

    • It should NOT validate the motherName input;

    • It should NOT validate the motherAlive input options "yes", "no" and default "unknown";

    • It should NOT validate the parentsTogether input options "yes", "no" and default "unknown";It

    • It should NOT validate the insurance input;

  • It should have a "submit" button;

    • It should set the "submit" button's text using the props;

  • It should have a "reset" button;

5. NewPatientActivity

  • It should NOT show FirstTab

  • It should have the AppHeader;

  • It should have access to the user credentials;

  • It should have a PatientDataForm as a child component;

    • It should NOT populate the props' data field;

    • It should pass the "submit" button wording;

    • It should pass the callback function for performing the API call;

6. PatientSearchItem

  • It should receive a patient object as prop;

  • It should show id, previousCode, name, profilePicture, age, lastUpdateDate, lastVisitDate

  • It should receive the routePrefix as prop, add the id and use it to redirect;

7. SearchPatientActivity

  • It should NOT show FirstTab

  • It should present patient's id and previousCode as main search params;

  • It should present name and taxNumber as secondary search params;

    • It should validate the name input;

      • name input is NOT required;

      • name input should contain only alphabetic characters;

    • It should validate surname input;

      • taxNumber input is NOT required;

  • It should toogle the results display between grid and table;

  • It should display the results in a grid or table according to the toggle;

    • Each grid item should contain a PatientSearchItem;

    • It should pass the patient object to the PatientSearchItem or to table;

8. PatientDetailsActivity

  • It should show FirstTab

  • It should have the AppHeader;

  • It should have access to the user credentials;

  • It should display the patient's information;

    • It should use the id from the URL's queryParams as key for retrieving the patient data;

    • It should prioritize getting data from the Redux store;

    • It should perform an API call as an alternative for retrieving the patient's data

  • It should display the patient's summary information as the first tab;

  • It should provide Edit button and pass the patient object for EditPatientActivity

9. EditPatientActivity

  • It should NOT show FirstTab

  • It should have the AppHeader;

  • It should have access to the user credentials;

  • It should have a PatientDataForm as a child component;

    • It should populate the props' data field;

    • It should pass the "submit" button wording;

    • It should pass the callback function for performing the API call;