Developer: Bruce Chibisa (Bruce0C)
source: nexus_carehomes amiresponsive
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
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.
- 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:
-
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. |
| Tool / Tech | Use |
|---|---|
| Generate README and TESTING templates. | |
Version control. (git add, git commit, git push) |
|
| Secure online code storage. | |
| Back-end programming language. | |
| Hosting the deployed back-end site. | |
| Flow diagrams for mapping the app's logic. | |
| 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. |
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.
Mermaid flowchart
The flowchart below represents the detailed main process of this Python program. It shows the entire cycle of the application.
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]
Source: Mermaid Flowchart for Nexus care homes
-
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.
I've used the following Python packages and external imports.
gspread: used with the Google Sheets APIgoogle.oauth2.service_account: used for the Google Sheets API credentialstime: used for adding time delaysos: used for adding aclear()functioncolorama: used for including color in the terminaltabulate: used to display table in terminal
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.
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
Note
For all testing, please refer to the TESTING.md file.
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.
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 to8000then 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
Pythonfirst, thenNode.jssecond. (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(replaceapp_namewith your app name) - After performing the standard Git
add,commit, andpushto GitHub, you can now type:git push heroku main
The Python terminal window should now be connected and deployed to Heroku!
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,genandalice - Schedules:
mike_schedule,donald_schedule,tom_schedule,ed_schedule,alice_schedule,kyle_schedule,lisa_schedule,gen_scheduleandalice_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:
- From the dashboard click on "Select a project", and then the NEW PROJECT button.
- Give the project a name, and then click CREATE.
- Click SELECT PROJECT to get to the project page.
- From the side-menu, select "APIs & Services", then select "Library".
- Search for the "Google Drive API", select it, and then click on ENABLE.
- Click on the CREATE CREDENTIALS button.
- From the "Which API are you using?" dropdown menu, choose Google Drive API.
- For the "What data will you be accessing?" question, select Application Data.
- Click Next.
- Enter a "Service Account" name, then click Create.
- In the "Role" dropdown box, choose "Basic" > "Editor", then press Continue.
- "Grant users access to this service account" can be left blank. Click DONE.
- On the next page, click on the "Service Account" that has been created.
- On the next page, click on the "Keys" tab.
- Click on the "Add Key" dropdown, and select "Create New Key".
- Select
JSON, and then click Create. This will trigger the.jsonfile with your API credentials in it to download to your machine locally. - For local deployment, this needs to be renamed to
creds.json. - Repeat steps 4 & 5 above to add the "Google Sheets API".
- Copy the
client_emailthat is in thecreds.jsonfile. - Share your Google Sheet to the
client_email, ensuring "Editing" is enabled. - Add the
creds.jsonfile to your.gitignorefile, so as not to push your credentials to GitHub publicly.
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.
You can clone the repository by following these steps:
- Go to the GitHub repository.
- Locate and click on the green "Code" button at the very top, above the commits and files.
- Select whether you prefer to clone using "HTTPS", "SSH", or "GitHub CLI", and click the "copy" button to copy the URL to your clipboard.
- Open "Git Bash" or "Terminal".
- Change the current working directory to the location where you want the cloned directory.
- In your IDE Terminal, type the following command to clone the repository:
git clone https://www.github.com/Bruce0C/nexus_carehomes.git
- 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.
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.
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:
- Log in to GitHub and locate the GitHub Repository.
- At the top of the Repository, just below the "Settings" button on the menu, locate and click the "Fork" Button.
- Once clicked, you should now have a copy of the original repository in your own GitHub account!
| 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. |
- I would like to thank my Code Institute mentor, Tim Nelson for the support throughout the development of this project.













