This repository was created to solve a challenge where you need to create a system that runs in terminal and register patients, schedule and cancel appointments.
Ensure that you have ruby installed (v3.3.15)
to run correctly. Run command ruby -v
to verify version.
clone the repository
git clone [email protected]:vinicius-f-pereira/appointment_book.git; cd appointment_book
git clone https://github.com/vinicius-f-pereira/appointment_book.git; cd appointment_book
gh repo clone vinicius-f-pereira/appointment_book; cd appointment_book
ruby main.c
- Cadastrar paciente
register patient
- Agendar consulta
schedule appointment
- Desmarcar consulta
cacel appointment
- Encerrar programa
finish program
This option ask for name and phone of patient.
Phone need to be in this pattern: Country code, area code and phone number.
At register a patienc for the first time, program will create a file '.db' to store this data.
If you close program and run again, you data will be read from this file and you keep data saved in past sessions.
To this option works, you need to have at least one patient registered.
When you choose this option, a prompt with registered patients will appear, so you choose patient and start the appointment.
Enter the consultation date and time. Date pattern: "dd/MM/yyyy" Time pattern: "HH:MM" (is not possible schedule in past dates)
Insert medical speciality.
To this option works, we need at least one appointment.
Will prompt existing appointments, choose one.
Finish program