Create a virtual environment
python -m venv venv
Activate the virtual environment
source venv/bin/activate # For Linux
venv/Scripts/activate # For Windows
Install dependencies. If installation fails, please ensure you have Python 3.10.
pip install -r requirements.txt
Run a local instance of the backend server
cd technical_assessment
python manage.py runserver
There are currently two apps being used
appointments
- handles CRUD for actual appointmentspatients
- handles CRUD for patients (mostly just their names)
The Appointment object contains 4 fields:
start_time
- aDateTimeField()
for when the appointment will startend_time
- aDateTimeField()
for when the appointment will endpatients
- aManyToManyField()
linking to the patients included in the appointmentcomments
- aTextField()
containing comments for the appointment
GET /appointments/
- list out the appointments that currently exist- Query parameters:
start_date
- a date of the formatYYYY-MM-DD
. Only appointments on or later than this date will be includedend_date
- a date of the formatYYYY-MM-DD
. Only appointments on or earlier than this date will be included
- Query parameters:
POST /appointments/
- create a new appointmentGET /appointments/{id}/
- retrieve details for one specific appointmentPUT /appointments/{id}/
- update an existing appointment with new dataDELETE /appointments/{id}/
- delete an existing appointment
The Patient object contains 1 field:
name
- aCharField()
representing the patient's name
GET /patients/
- list out the patients that currently existPOST /patients/
- create a new patientGET /patients/{id}/
- retrieve details for one specific patientPUT /patients/{id}/
- update an existing patient with new dataDELETE /patients/{id}/
- delete an existing patient