This repository contains a simulated medical data management CLI application.
The project includes a traceability matrix mapping requirements (REQ) to corresponding tests.
- Store patient data in a
.csv
file - Add, view, edit, delete patient records via command line
- Includes unit, integration, system, and regression tests
- Behavior-Driven Development (BDD)
- CI pipeline using PowerShell and tasks in VS Code
src/
— main application source codetests/
— unit and integration testsdata/
— stored.csv
patient datatests-report/
— tests report result available in XMLci-pipeline.ps1
— CI build & run script
The system is designed to meet the following requirements:
ID | Description |
---|---|
REQ-001 | The system must allow creation of Patient objects with correct field initialization. |
REQ-002 | The system must validate PESEL numbers according to Polish rules (11 digits and correct checksum). |
REQ-003 | The system must allow capturing patient data from user input (stdin). |
REQ-004 | The system must allow displaying a list of patients to the user (stdout). |
REQ-005 | The system must save patient data to a CSV file in the correct format. |
REQ-006 | The system must load patient data from a CSV file. |
REQ-007 | The system must allow deleting patient data by PESEL and update the CSV file. |
REQ-008 | The system must allow editing patient data and saving updates to the CSV file. |
REQ-009 | The system must offer a CLI menu with CRUD operations and exit functionality. |
Each test in the project covers specific requirements:
Test Name | Covers Requirements |
---|---|
PatientTest |
REQ-001 |
ValidatorTest |
REQ-002 |
PatientInputCollectorTest |
REQ-003 |
PatientPrinterTest |
REQ-004 |
SavePatientDataToCsvFile |
REQ-005 |
ReadPatientDataFromCsvFile |
REQ-006 |
DeletePatientDataFromCsvFile |
REQ-007 |
EditPatientDataInCsvFile |
REQ-008 |
RunMenu |
REQ-009, REQ-003 |
CheckIfCsvFileCanBeRead |
REQ-006 |
Detailed structure and description: tests/README.md
- Tested on Windows 11
- Visual Studio Code + CMake toolchain
- C++
- CMake
- GoogleTest
- PowerShell (CI pipeline)
- JSON (only for vscode tasks)
- Patient data stored in
.csv
file - CLI-based interactions (add/view/edit/delete)
- Clone the repository:
git clone https://github.com/Susannnnnna/Cpp_PatientDatabaseCLI
cd Cpp_PatientDatabaseCLI
- Open in VS Code and install recommended extensions
- GitHub Pull Requests and Issues
- CMake Tools
- CMake
- PowerShell
- Build and run
Press Ctrl + Shift + B
in VS Code
Or use terminal:
mkdir build
cd build
cmake ..
cmake --build . --config Debug
- Run main application
./src/Debug/PatientDatabaseCLIApp.exe