This Life Prognosis Management System is designed to handle patient registrations, profile updates, and calculate survival rates based on various health parameters. The system also includes administrative functions for managing patient information, downloading relevant data, and onboarding new administrators.
-
Java 11 or Above: Make sure you have Java 11 or a newer version installed on your machine. ```java -version```
-
Bash Shell: Ensure that you have a Bash shell environment available, as the application relies on Bash scripts for certain operations.
Test AdminUser Credentials
email: admin@example.com
password: admin123
Test Patient Credentials
email: patient@example.com
password: patient123
- Configure the Scripts:
cd project_directory sudo chmod 755 setup.sh ./setup.sh
Possible error fix
If you get this error,
setup.sh: bad interpreter: /bin/bash^M: no such file or directory
then you need to remove the carriage return at the end of the line. You can do this by running the following command
`sed -i 's/\r$//' ./setup.sh`
After the application executes, it will guide you through various operations, including patient registration, profile updates, and survival rate calculations.
.
├── README.md
├── credentials.txt
├── downloads
│ └── patient_data.csv
├── resources
│ ├── data
│ │ ├── life-expectancy.csv
│ │ └── user-store.txt
│ └── scripts
│ ├── auth.sh
│ ├── register.sh
│ ├── search_country.sh
│ ├── survival_rate.sh
│ └── user_manager.sh
├── setup.sh
└── src
├── Main.java
├── accounts
│ ├── controllers
│ │ ├── AuthController.java
│ │ ├── PatientRegistrationController.java
│ │ ├── ProfileController.java
│ │ └── RegistrationController.java
│ ├── models
│ │ ├── Admin.java
│ │ ├── Patient.java
│ │ └── User.java
│ └── services
│ ├── AuthService.java
│ ├── RegistrationService.java
│ └── UserManagementService.java
├── core
│ ├── AppConfig.java
│ ├── BashConnect.java
│ └── Docs.java
├── dashboard
│ ├── controllers
│ │ ├── AdminDashboardController.java
│ │ └── PatientDashboardController.java
│ └── services
├── datacompute
│ ├── models
│ │ ├── Country.java
│ │ └── PatientStatistics.java
│ └── services
│ ├── CountryService.java
│ ├── StatServices.java
│ └── SurvivalRate.java
└── utils
├── enums
│ ├── ExportType.java
│ └── UserRole.java
├── interractions
│ └── Reset.java
├── user
│ ├── DataExport.java
│ ├── PatientDetailsUpdater.java
│ ├── RegistrationUtils.java
│ └── SessionUtils.java
└── validators
├── BinaryDecisionValidator.java
├── DateValidator.java
├── EmailValidator.java
├── InputValidator.java
├── PasswordValidator.java
└── Validator.java
-
Patients can complete their registration by providing essential details like name, date of birth, HIV status, and country of residence.
-
UUID validation ensures that only pre-registered patients can complete the registration process.
-
Admins can initialize a patient's registration by generating a unique UUID.
-
This UUID is then used by the patient to complete the registration process.
-
Patients can update their profile information, including their name, HIV status, diagnosis date, and ART start date.
-
The system allows selective updates, meaning patients can choose specific fields to update without needing to provide all information again.
-
The system calculates the survival rate based on the patient's age, diagnosis date, and ART start date.
-
Different scenarios are handled, including patients who are not on ART, those who started ART immediately, and those who delayed starting ART.
- Patients can download an ICS file with their calculated survival rate, which can be imported into calendar applications.
- Admins can download detailed patient information in CSV format for analysis or record-keeping purposes.
- Admins have the ability to onboard new administrators, allowing them to manage the system.
-
Compile the Java Classes: Ensure all Java classes are compiled.
-
Execute the Main Class: Run the Main class to interact with the system.
-
Register a New Patient: Follow the on-screen prompts to register a new patient.
-
Update Patient Profile: Follow the prompt, Provide the new values and update
- Calculates the survival rate based on life expectancy data and patient information.
- interacts with the user-store.txt file.
-
Java 11 or higher
-
Bash (for executing the scripts)
-
CSV file for life expectancy data
-
Implement additional validation for other fields.
-
Add encryption for stored data, especially for sensitive information like Passwords.
-
Improve user experience
-
Lots more..