ORGANized Records is a Java-based patient record management system developed as an ICS4U1 Computer Science CPT project.
The application demonstrates object-oriented programming, Java collections, file persistence, Maven project organization, JUnit 5 testing, and automated continuous integration with GitHub Actions.
It simulates a simple command-line record management system that allows users to create, search, update, delete, save, and load patient records.
- Create new patient records
- View all stored patient records
- Search for patients by ID
- Update existing patient information
- Delete patient records
- Add medical notes to patients
- Save patient information between program sessions
- Load saved patient records when the program starts
- Text-based command-line interface
- Automated testing with JUnit 5
- GitHub Actions CI on pushes and pull requests to
main
- Java 17+
- Maven
- JUnit 5
- GitHub Actions
- Object-Oriented Programming
- Java Collections Framework
- LinkedList
- ArrayList
- Java File I/O
The project separates responsibilities across several Java classes.
Represents an individual patient and stores:
- Patient ID
- Name
- Age
- Contact information
- Medical notes
Each Patient contains a collection of MedicalNote objects, demonstrating composition.
private List<MedicalNote> notes = new ArrayList<>();Represents a medical note associated with a patient.
Each note stores:
- Date
- Note contents
public class MedicalNote {
private String date;
private String note;
}Manages the collection of patient records and provides operations for:
- Adding patients
- Searching by patient ID
- Updating patient information
- Deleting patients
- Saving records
- Loading records
Patient records are maintained using a LinkedList:
private LinkedList<Patient> records = new LinkedList<>();Provides the command-line interface and handles user interaction with the record-management system.
Contains the application's entry point.
When the application starts, it creates a RecordManager, loads saved patient information, and launches the menu.
Defines the persistence operations implemented by RecordManager.
public interface Savable {
void save();
void load();
}ORGANized-Records/
├── .github/
│ └── workflows/
│ └── ci.yml
├── data/
│ └── patients.txt
├── src/
│ ├── main/
│ │ └── java/
│ │ └── com/
│ │ └── organizedrecords/
│ │ ├── Main.java
│ │ ├── MainMenu.java
│ │ ├── MedicalNote.java
│ │ ├── Patient.java
│ │ ├── RecordManager.java
│ │ └── Savable.java
│ └── test/
│ └── java/
│ └── com/
│ └── organizedrecords/
│ ├── PatientTest.java
│ └── RecordManagerTest.java
├── .gitignore
├── pom.xml
└── README.md
- Java 17 or newer
- Maven
Check Java:
java -versionCheck Maven:
mvn -versionOpen:
src/main/java/com/organizedrecords/Main.java
Then run the main method:
public static void main(String[] args)mvn clean testmvn package=== ORGANized Records ===
1. Add Patient
2. View Records
3. Search Patient
4. Update Patient
5. Delete Patient
6. Add Medical Note
0. Save and Exit
Patient information is stored in:
data/patients.txt
Records are saved using a pipe-separated format:
patientId|name|age|contact
Example:
1234567890|Sample Patient|25|4165551234
When the program starts, RecordManager.load() reads the file and reconstructs the patient records.
When the user selects Save and Exit, RecordManager.save() writes the current patient records back to the file.
The current version permanently stores:
- Patient ID
- Name
- Age
- Contact information
Medical notes are stored in memory while the application is running but are not currently written to patients.txt.
This means medical notes do not persist after the program is closed.
Persistent medical-note storage is a potential future improvement.
Patient records are stored using:
private LinkedList<Patient> records = new LinkedList<>();The linked list acts as the central collection managed by RecordManager.
Each patient maintains medical notes using:
private List<MedicalNote> notes = new ArrayList<>();This demonstrates a composition relationship between Patient and MedicalNote.
The project uses JUnit 5 to test core record-management functionality.
Tests are located in:
src/test/java/com/organizedrecords/
Current tests cover:
- Adding patient records
- Searching for patients by ID
- Updating patient information
- Deleting patient records
- Adding medical notes
- Record-management behavior
Run all tests with:
mvn testExample:
@Test
void testAddNote() {
Patient patient = new Patient(
"3544456222",
"Daniyal",
18,
"6479118713"
);
patient.addNote(
new MedicalNote(
"2024-05-12",
"Annual checkup"
)
);
assertEquals(1, patient.getNotes().size());
}The project uses GitHub Actions for automated continuous integration.
The workflow is located at:
.github/workflows/ci.yml
The CI workflow runs automatically on:
- Pushes to
main - Pull requests targeting
main
The workflow:
- Checks out the repository
- Sets up Temurin Java 17
- Runs Maven
- Compiles the project
- Executes all JUnit tests
- Fails if compilation or testing fails
The main CI command is:
mvn clean verifyThis ensures that every change pushed to the repository is automatically tested.
This project demonstrates:
- Object-oriented programming
- Classes and objects
- Encapsulation
- Composition
- Interfaces
- Java collections
- Linked lists
- Array lists
- CRUD operations
- Searching and record retrieval
- File persistence
- Maven project organization
- Unit testing with JUnit 5
- Continuous integration with GitHub Actions
Possible improvements include:
- Persist medical notes between program sessions
- Add stronger input validation
- Prevent duplicate patient IDs
- Add authentication and user accounts
- Encrypt stored records
- Replace text-file storage with a database
- Add a graphical user interface
- Improve exception handling
- Add additional automated tests
The goal of ORGANized Records is to apply fundamental Java and computer science concepts to a practical software problem.
The project demonstrates how information can be represented using objects, organized using data structures, retrieved through search operations, persisted using files, tested automatically, and managed through a command-line interface.
David Abraham
Daniyal Tauseef
ICS4U1 Computer Science CPT
June 2025