A simple service that allows the clinic administrator to make an appointment with a doctor for a patient
- The administrator has all permissions: can create, update, delete visits, doctors and patients
- The doctors do not have permissions to creating, updating, or deleting doctors
- 1️⃣ The clinic administrator creates a patient if he is not in the clinic database
- 2️⃣ Creates a visit, indicating the direction of treatment (for example surgery, therapy, rehabilitation, etc.), time and date of the visit, type of visit (initial or repeat)
- date of birth of the patient (an appointment with a doctor is possible from 6 months of age)
- expiration date of the medical certificate
- date of registration for the visit (cannot be less than the current date)
- the process of removing records so that they are still present in the database but are not accessible to the user
- Backend: Python 3.12.1, Django 4.2.7, SQLite
- Frontend: HTML/CSS, Bootstrap 4.2.6
- Virtual Environment: venv
- Environment Variables: .env
- Database Migrations: Django Migrations
- Dependency Management: pip
- Authorization: takes place using a token
- Collaboration and Version Control: Git, GitHub
- Testing: Unittest
- the app is available at: http://localhost:8000
- GET
/admin/
-- login Django admin panel - POST
/accounts/login/
-- login - POST
/accounts/logout/
-- logout - GET
/visits/
-- get visits list (only authorized users) - POST
/visits/create/
-- create visit (only authorized users) - GET
/users/doctors/
-- current list of doctors of the medical institution - GET
/users/doctors/1/
-- doctor with id 1 - GET
/users/patients/
-- current list of patients of the medical institution
- Install Python
- Clone the repo
git clone https://github.com/OleksiiKiva/to-the-doctor.git
- Open the project folder in your IDE
- Open the project terminal folder. Create & activate venv
python -m venv venv venv\Scripts\activate (on Windows) source venv/bin/activate (on Linux/MacOS)
- Install all requirements
pip install -r requirements.txt
- Rename
.env.sample
file as.env
. Add the environment variables to.env
file asKEY=VALUE
pairSECRET_KEY=<your secret key>
- generate
SECRET_KEY
- copy paste
SECRET_KEY
value to.env
file
- generate
- Apply migrations & update the database schema
python manage.py migrate
- Start development server
python manage.py runserver
- Use the following command to load prepared data from fixture for a quick test
python manage.py loaddata to_the_doctor_db_data.json
- credentials for this fixture:
- Admin login:
[email protected]
, Admin password:Admin-12345
- Doctors password:
Doctor12345
- Admin login:
- credentials for this fixture:
- Or create a superuser and populate the db yourself
Please send bug reports and suggestions by email: [email protected]