Skip to content

Bruce0C/nexus_carehomes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

105 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Developer: Bruce Chibisa (Bruce0C)

GitHub commit activity GitHub last commit GitHub repo size badge

screenshot

source: nexus_carehomes amiresponsive

UX

The 5 Planes of UX

1. Strategy

Purpose

  • Provide care givers simple and effective way to log service user activities and help with documentation.
  • Help users optimize working day by reducing the amount of physical paperwork by using their devices to quiclkly take notes.
  • Display information a care giver may find helpful about their working day.
  • Add any input to a spreadsheet, this would aid manager and users of the google sheet to gain insite on the care givers and service users.

Primary User Needs

  • Log in/out.
  • Choose assigned care home.
  • View notes regarding service user.
  • Input notes regarding service user
  • Store notes in a worksheetsheet.
  • Exit programme gracefully.

Business Goals

  • Offer a reliable tool for care givers to optmise their knowladge of their service users.
  • Help businesses reduce amount time needed to carry out a handover process.
  • Reduce the amount of time it takes to write notes.
  • Improve the legibility of notes.
  • Centralized data management
  • Enhance record keeping
  • Simplify decision making
  • Scalability by supporting multiple care homes by storing data using goolge sheets.

2. Scope

Features

Features

Features Notes Screenshots
User Login Users can log in by entering their name, which is stored in the user worksheet. screenshot
Care Home Management View a list of care homes and their addresses. screenshot
Service User Management: View a list of service users in a selected care home. screenshot
Select a service user to view their information. screenshot
Add notes for a service user. screenshot
Administer medication to a service user with daily limits. screenshot
View the daily schedule for a service user. screenshot
Interactive Menus: Navigate through the application using numbered options. screenshot
Error Handling: Handles invalid inputs and provides user-friendly error messages. screenshot
Data Storage: Uses Google Sheets as the backend for storing and retrieving data. screenshot

Future Features

  • User Authentication: Add a login system with usernames and passwords for caregivers to ensure secure access to the application.
  • Role-Based Access Control: Implement different user roles (e.g., caregiver, manager, admin) with varying levels of access.
  • Reporting and Analytics: Generate reports and analytics for managers, such as:
    • Total notes added per caregiver.
    • Medication logs for each service user.
    • Summary of daily activities.
  • Notifications and Reminders: Add notifications and reminders for caregivers about upcoming tasks, medication schedules, or important notes.
  • Search and Filter Functionality: Allow users to search for specific service users, notes, or care homes and filter data based on criteria (e.g., age, room number, or activity type).
  • Export Data: Allow users to export data (e.g., notes, schedules, or reports) to CSV or PDF files for offline use or sharing.
  • Customizable Schedules: Allow caregivers or managers to customize the daily schedules for service users.
  • Service User Alerts: Description: Add alerts for critical service user conditions (e.g., missed medication, overdue tasks).

3. Structure

Interaction Design

  • The application follows a linear flow:
    • Username logged to sheet.
    • User selects a care home.
    • User selects a service user.
    • User performs actions (e.g., input notes, administer medication, view schedule).
    • User exits the program.

Information Architecture

  • The application is structured around the following key components:
    • Care Homes: Displays a list of care homes and allows the user to select one.
    • Service Users: Displays a list of service users for the selected care home.
    • Service User Information: Displays detailed information about the selected service user and provides options for further actions.
    • Notes and Medication: Allows users to input notes and administer medication.
    • Schedules: Displays the daily schedule for the selected service user.
  1. Skeleton Wireframe The application is a command-line interface (CLI), so the wireframe is represented by the flow of text-based menus and tables. Below is an example of the structure:...

Login Screen: Care Home Selection: Service User Selection: Service User Information: Daily Schedule:

5. Surface Visual Design

  • Colour Scheme:

    • Green: Success messages (e.g., successful login, successful note addition).
    • Yellow: Prompts (e.g., menu options, input prompts).
    • Red: Error messages (e.g., invalid input, worksheet not found).
  • Typography:

    • The application uses the default terminal font.
    • Text is formatted with colorama for color and Tabular for table formatting.
  • User Feedback

    • The application provides immediate feedback for every action:
    • Success messages for completed actions.
    • Error messages for invalid inputs or issues.
    • Clear instructions for navigating menus and performing actions.
    • Interaction Flow
  • The user interacts with the application by entering numeric inputs to navigate menus and perform actions.

  • The application uses a loop to ensure the user can retry if they make an invalid input.

Target Expectation Outcome
As a caregiver I want to log in to the system so that my activities can be tracked and recorded..
As a caregiver I want to view a list of care homes so that I can select the care home I am assigned to.
As a caregiver I want to select my assigned care home so that I can view the service users in that care home.
As a caregiver I want to view a list of service users in my assigned care home So that I can choose the service user I am responsible for.
As a caregiver I want to select a specific service user so that I can view their details and manage their information.
As a caregiver I want to view detailed information about a service user so that I can better understand their needs and provide appropriate care.
As a caregiver I want to input notes about a service user so that I can document important information about their care.
As a caregiver I want to log the medication I administer to a service user so that I can track the medication history and ensure compliance with dosage limits.
As a caregiver I want to view the daily schedule for a service user so that I can plan my day and ensure all activities are completed on time.
As a caregiver I want to exit the program gracefully so that I can end my session without losing any data.
As a caregiver I want the program to handle invalid inputs so that I can correct my mistakes without the program crashing.
As a manager I want all data to be stored in a centralized Google Sheet so that I can monitor and analyze the activities of caregivers and service users.
As a business owner I want the system to support multiple care homes and service users so that it can scale as my business grows.
As a caregiver I want the application to be simple and easy to use so that I can quickly navigate and perform my tasks without confusion.

Tools & Technologies

Tool / Tech Use
Markdown Builder Generate README and TESTING templates.
Git Version control. (git add, git commit, git push)
Github Secure online code storage.
Python Back-end programming language.
Heroku Hosting the deployed back-end site.
Lucidchart Flow diagrams for mapping the app's logic.
Google Sheets API Used for data storage and retrieval.
Colorama For adding colors to the terminal output.
Tabulate For displaying data in a tabular format in the terminal.

Database Design

Data Model

Flowcharts

Lucidchart Flowchart

To follow best practice, a basic flowchart was created for the app's logic, and mapped out using a free version of Lucidchart.

The flowchart below represents the basic process of this Python program. It shows the entire cycle of the application.

screenshot

Mermaid flowchart

The flowchart below represents the detailed main process of this Python program. It shows the entire cycle of the application.

screenshot

flowchart TD
    A[Start] --> B[Log User Login]
    B -->|Valid Name| C[Display Care Homes]
    B -->|Invalid Name| B

    C --> D[Select Care Home]
    D -->|Valid Input| E[Display Service Users]
    D -->|Exit| Z[Exit Program]
    D -->|Invalid Input| D

    E --> F[Select Service User]
    F -->|Valid Input| G[Display Service User Information]
    F -->|Return to Care Homes| C
    F -->|Invalid Input| F

    G -->|Data Available| H[Display Options]
    G -->|No Data Available| H

    H -->|Input Notes| I[Input Notes]
    H -->|Administer Medication| J[Administer Medication]
    H -->|View Daily Schedule| K[View Daily Schedule]
    H -->|Exit| Z

    I -->|Note Added Successfully| H
    I -->|Error Adding Note| I

    J -->|Valid Input| J1[Check Daily Limit]
    J -->|Invalid Input| J
    J1 -->|Limit Reached| H
    J1 -->|Medication Administered| H

    K -->|Data Available| H
    K -->|No Data Available| H

    Z[Exit Program]
Loading

Source: Mermaid Flowchart for Nexus care homes

Functions

  • log_user_login()

    • Purpose: Logs the caregiver's name and stores it in the user worksheet.
  • update_user_worksheet(name_str)

    • Purpose: Updates the user worksheet with the caregiver's name.
  • get_care_homes()

    • Purpose: Fetches and displays a list of care homes and their addresses.
  • select_home()

    • Purpose: Allows the user to select a care home from the displayed list.
  • select_service_user(selected_home)

    • Purpose: Displays service users for the selected care home and allows the user to select one.
  • service_user_information(selected_user)

    • Purpose: Fetches and displays data for the selected service user and provides options for further actions.
  • view_daily_schedule(schedule_worksheet, selected_user)

    • Purpose: Fetches and displays the daily schedule for the selected service user.
  • administer_medication(selected_user)

    • Purpose: Allows the caregiver to administer medication to the selected service user.
  • main()

    • Purpose: Orchestrates the execution of all program functions.

Imports

I've used the following Python packages and external imports.

  • gspread: used with the Google Sheets API
  • google.oauth2.service_account: used for the Google Sheets API credentials
  • time: used for adding time delays
  • os: used for adding a clear() function
  • colorama: used for including color in the terminal
  • tabulate: used to display table in terminal

Agile Development Process

GitHub Projects

GitHub Projects served as an Agile tool for this project. Through it, EPICs, User Stories, issues/bugs, and Milestone tasks were planned, then subsequently tracked on a regular basis using the Kanban project board.

screenshot

MoSCoW Prioritization

I've decomposed my Epics into User Stories for prioritizing and implementing them. Using this approach, I was able to apply "MoSCoW" prioritization and labels to my User Stories within the Issues tab.

  • Must Have: guaranteed to be delivered - required to Pass the project (max ~60% of stories)
  • Should Have: adds significant value, but not vital (~20% of stories)
  • Could Have: has small impact if left out (the rest ~20% of stories)
  • Won't Have: not a priority for this iteration - future features

Testing

Note

For all testing, please refer to the TESTING.md file.

Deployment

Code Institute has provided a template to display the terminal view of this backend application in a modern web browser. This is to improve the accessibility of the project to others.

The live deployed application can be found deployed on Heroku.

Heroku Deployment

This project uses Heroku, a platform as a service (PaaS) that enables developers to build, run, and operate applications entirely in the cloud.

Deployment steps are as follows, after account setup:

  • Select New in the top-right corner of your Heroku Dashboard, and select Create new app from the dropdown menu.
  • Your app name must be unique, and then choose a region closest to you (EU or USA), then finally, click Create App.
  • From the new app Settings, click Reveal Config Vars, and set the value of KEY to PORT, and the VALUE to 8000 then select ADD.
  • If using any confidential credentials, such as CREDS.JSON, then these should be pasted in the Config Variables as well.
  • Further down, to support dependencies, select Add Buildpack.
  • The order of the buildpacks is important; select Python first, then Node.js second. (if they are not in this order, you can drag them to rearrange them)

Heroku needs some additional files in order to deploy properly.

You can install this project's requirements.txt (where applicable) using:

  • pip3 install -r requirements.txt

If you have your own packages that have been installed, then the requirements file needs updated using:

  • pip3 freeze --local > requirements.txt

The Procfile can be created with the following command:

  • echo web: node index.js > Procfile

The .python-version file tells Heroku the specific version of Python to use when running your application.

  • 3.12 (or similar)

For Heroku deployment, follow these steps to connect your own GitHub repository to the newly created app:

Either (recommended):

  • Select Automatic Deployment from the Heroku app.

Or:

  • In the Terminal/CLI, connect to Heroku using this command: heroku login -i
  • Set the remote for Heroku: heroku git:remote -a app_name (replace app_name with your app name)
  • After performing the standard Git add, commit, and push to GitHub, you can now type:
    • git push heroku main

The Python terminal window should now be connected and deployed to Heroku!

Google Sheets API

This application uses Google Sheets to handle a "makeshift" database on the live site.

To run your own version of this application, you will need to create your own Google Sheet with the following worksheets names:

  • Caregiver: user
  • Homes: home
  • Home details: farhaven, tenville, brookway
  • Service users: mike, donald, tom, ed, alice, kyle, lisa, gen and alice
  • Schedules: mike_schedule, donald_schedule, tom_schedule, ed_schedule, alice_schedule, kyle_schedule, lisa_schedule, gen_schedule and alice_schedule

These sheets should be in the following format:

Caregiver:

username
Sample data

Homes:

Care home Address
Sample data Sample data

Homes details:

Name Age Room
Sample data Sample data Sample data

Service users:

Name Age Room Hand over notes notes Medication
Sample data Sample data Sample data Sample data Sample data

Schedule:

Time Activity
Sample data Sample data

A credentials file in .JSON format from the Google Cloud Platform is also mandatory:

Google Cloud Platform

  1. From the dashboard click on "Select a project", and then the NEW PROJECT button.
  2. Give the project a name, and then click CREATE.
  3. Click SELECT PROJECT to get to the project page.
  4. From the side-menu, select "APIs & Services", then select "Library".
  5. Search for the "Google Drive API", select it, and then click on ENABLE.
  6. Click on the CREATE CREDENTIALS button.
  7. From the "Which API are you using?" dropdown menu, choose Google Drive API.
  8. For the "What data will you be accessing?" question, select Application Data.
  9. Click Next.
  10. Enter a "Service Account" name, then click Create.
  11. In the "Role" dropdown box, choose "Basic" > "Editor", then press Continue.
  12. "Grant users access to this service account" can be left blank. Click DONE.
  13. On the next page, click on the "Service Account" that has been created.
  14. On the next page, click on the "Keys" tab.
  15. Click on the "Add Key" dropdown, and select "Create New Key".
  16. Select JSON, and then click Create. This will trigger the .json file with your API credentials in it to download to your machine locally.
  17. For local deployment, this needs to be renamed to creds.json.
  18. Repeat steps 4 & 5 above to add the "Google Sheets API".
  19. Copy the client_email that is in the creds.json file.
  20. Share your Google Sheet to the client_email, ensuring "Editing" is enabled.
  21. Add the creds.json file to your .gitignore file, so as not to push your credentials to GitHub publicly.

Local Development

This project can be cloned or forked in order to make a local copy on your own system.

For either method, you will need to install any applicable packages found within the requirements.txt file.

  • pip3 install -r requirements.txt.

If using any confidential credentials, such as CREDS.json or env.py data, these will need to be manually added to your own newly created project as well.

Cloning

You can clone the repository by following these steps:

  1. Go to the GitHub repository.
  2. Locate and click on the green "Code" button at the very top, above the commits and files.
  3. Select whether you prefer to clone using "HTTPS", "SSH", or "GitHub CLI", and click the "copy" button to copy the URL to your clipboard.
  4. Open "Git Bash" or "Terminal".
  5. Change the current working directory to the location where you want the cloned directory.
  6. In your IDE Terminal, type the following command to clone the repository:
    • git clone https://www.github.com/Bruce0C/nexus_carehomes.git
  7. Press "Enter" to create your local clone.

Alternatively, if using Ona (formerly Gitpod), you can click below to create your own workspace using this repository.

Open in Ona-Gitpod

Please Note: in order to directly open the project in Ona (Gitpod), you should have the browser extension installed. A tutorial on how to do that can be found here.

Forking

By forking the GitHub Repository, you make a copy of the original repository on our GitHub account to view and/or make changes without affecting the original owner's repository. You can fork this repository by using the following steps:

  1. Log in to GitHub and locate the GitHub Repository.
  2. At the top of the Repository, just below the "Settings" button on the menu, locate and click the "Fork" Button.
  3. Once clicked, you should now have a copy of the original repository in your own GitHub account!

Credits

Content

Source Notes
Markdown Builder Help generating Markdown files
Chris Beams "How to Write a Git Commit Message"
Python Tutor Additional Python help
Colorama Adding color in Python
Tabulate Adding tables in terminal
Log my care Help with deciding core functionality and used as an example of a fully formed and funtional care home application
ChatGPT Help with generating random names and fictional addresses and scenarios for the service users schedule and notes in work sheet.

Acknowledgements

  • I would like to thank my Code Institute mentor, Tim Nelson for the support throughout the development of this project.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published