diff --git a/desgin/database.sql b/desgin/db/database.sql similarity index 100% rename from desgin/database.sql rename to desgin/db/database.sql diff --git a/desgin/visit/sequence.pu b/desgin/visit/sequence.pu new file mode 100644 index 0000000..09a3217 --- /dev/null +++ b/desgin/visit/sequence.pu @@ -0,0 +1,15 @@ +@startuml visit + +participant Admin +participant System +participant Visit + +Admin -> System : "set visit" + + + +Admin -> System : "get visit" +System -> Admin : "split visit to missed and current and upcoming" + +Admin -> System : "update visit to finished" +@enduml \ No newline at end of file diff --git a/desgin/visit/usecase.pu b/desgin/visit/usecase.pu new file mode 100644 index 0000000..42a24bc --- /dev/null +++ b/desgin/visit/usecase.pu @@ -0,0 +1,15 @@ +@startuml OnlineShoppingSystem + +left to right direction +actor Admin as "Admin" +actor System as "System" +actor Patient as "Patient" + +rectangle "Use Cases" { + Admin --> (Manage patients) + Admin --> (Manage visits) + System --> (Split visits to missed and current and upcoming) + Patient --> (Get his data) +} + +@enduml diff --git a/desgin/visit/visit.md b/desgin/visit/visit.md new file mode 100644 index 0000000..21c28cb --- /dev/null +++ b/desgin/visit/visit.md @@ -0,0 +1,12 @@ +```mermaid +graph TD; + A[Visit] -->|1| B[Unfinished Visit] + A -->|2| C[Finished Visit] + B -->|edit| D[Admin set Finished] + B -->|get| E[System] + E -->|date < today| F[Missed Visit] + E -->|date > today| G[ Upcoming Visit] + E -->|date = today| H[Current Visit] + + +``` \ No newline at end of file diff --git a/project/accounts/filters/__init__.py b/project/accounts/filters/__init__.py index 0dca486..c0732ce 100644 --- a/project/accounts/filters/__init__.py +++ b/project/accounts/filters/__init__.py @@ -31,7 +31,7 @@ class Meta: 'national_id': ['exact'], 'full_name': ['exact'], 'created_at': ['year', 'month', 'day'], - 'experience': ['exact'], + 'experience_years': ['exact'], 'work_days': ['exact'], 'license_number': ['exact'], } \ No newline at end of file diff --git a/project/accounts/migrations/0004_alter_doctor_marital_status_and_more.py b/project/accounts/migrations/0004_alter_doctor_marital_status_and_more.py new file mode 100644 index 0000000..30b43da --- /dev/null +++ b/project/accounts/migrations/0004_alter_doctor_marital_status_and_more.py @@ -0,0 +1,28 @@ +# Generated by Django 5.0.3 on 2024-05-02 04:51 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ("accounts", "0003_alter_address_user_alter_phone_user_and_more"), + ] + + operations = [ + migrations.AlterField( + model_name="doctor", + name="marital_status", + field=models.CharField(blank=True, max_length=255, null=True), + ), + migrations.AlterField( + model_name="employee", + name="marital_status", + field=models.CharField(blank=True, max_length=255, null=True), + ), + migrations.AlterField( + model_name="patient", + name="marital_status", + field=models.CharField(blank=True, max_length=255, null=True), + ), + ] diff --git a/project/project/media/user_images/example_3LXLiLE.jpg b/project/project/media/user_images/example_B7DUFHc.jpg similarity index 100% rename from project/project/media/user_images/example_3LXLiLE.jpg rename to project/project/media/user_images/example_B7DUFHc.jpg diff --git a/project/project/media/user_images/example_DhsRdWI.jpg b/project/project/media/user_images/example_BPSSWvZ.jpg similarity index 100% rename from project/project/media/user_images/example_DhsRdWI.jpg rename to project/project/media/user_images/example_BPSSWvZ.jpg diff --git a/project/project/media/user_images/example_NhnPU17.jpg b/project/project/media/user_images/example_EiPkSgj.jpg similarity index 100% rename from project/project/media/user_images/example_NhnPU17.jpg rename to project/project/media/user_images/example_EiPkSgj.jpg diff --git a/project/project/media/user_images/example_V4cIqzy.jpg b/project/project/media/user_images/example_KiB9VWI.jpg similarity index 100% rename from project/project/media/user_images/example_V4cIqzy.jpg rename to project/project/media/user_images/example_KiB9VWI.jpg diff --git a/project/project/media/user_images/example_VwHcJWd.jpg b/project/project/media/user_images/example_V7tBFdE.jpg similarity index 100% rename from project/project/media/user_images/example_VwHcJWd.jpg rename to project/project/media/user_images/example_V7tBFdE.jpg diff --git a/project/project/media/user_images/example_YjFvqYO.jpg b/project/project/media/user_images/example_Yup6Xje.jpg similarity index 100% rename from project/project/media/user_images/example_YjFvqYO.jpg rename to project/project/media/user_images/example_Yup6Xje.jpg diff --git a/project/project/media/user_images/example_fgo15kh.jpg b/project/project/media/user_images/example_afvsRsx.jpg similarity index 100% rename from project/project/media/user_images/example_fgo15kh.jpg rename to project/project/media/user_images/example_afvsRsx.jpg diff --git a/project/project/media/user_images/example_icvPwan.jpg b/project/project/media/user_images/example_awpCuxp.jpg similarity index 100% rename from project/project/media/user_images/example_icvPwan.jpg rename to project/project/media/user_images/example_awpCuxp.jpg diff --git a/project/project/media/user_images/example_kOe1UL0.jpg b/project/project/media/user_images/example_cIkBNRq.jpg similarity index 100% rename from project/project/media/user_images/example_kOe1UL0.jpg rename to project/project/media/user_images/example_cIkBNRq.jpg diff --git a/project/project/media/user_images/example_npx8snv.jpg b/project/project/media/user_images/example_xMb9ehF.jpg similarity index 100% rename from project/project/media/user_images/example_npx8snv.jpg rename to project/project/media/user_images/example_xMb9ehF.jpg diff --git a/project/project/media/user_images/example_zXMv1nd.jpg b/project/project/media/user_images/example_zXMv1nd.jpg new file mode 100644 index 0000000..e7203c6 Binary files /dev/null and b/project/project/media/user_images/example_zXMv1nd.jpg differ diff --git a/project/requirements.txt b/project/requirements.txt index 35f4189..49d6ffd 100644 --- a/project/requirements.txt +++ b/project/requirements.txt @@ -4,6 +4,7 @@ distlib==0.3.8 Django==5.0.3 django-cors-headers==4.3.1 django-database-url==1.0.3 +django-filter==24.2 django-shortuuidfield==0.1.3 djangorestframework==3.15.1 djangorestframework-simplejwt==5.3.1 diff --git a/project/visit/migrations/0002_remove_visit_enddatetime_alter_visit_doctors.py b/project/visit/migrations/0002_remove_visit_enddatetime_alter_visit_doctors.py new file mode 100644 index 0000000..621a2d5 --- /dev/null +++ b/project/visit/migrations/0002_remove_visit_enddatetime_alter_visit_doctors.py @@ -0,0 +1,25 @@ +# Generated by Django 5.0.3 on 2024-05-02 04:51 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ("accounts", "0004_alter_doctor_marital_status_and_more"), + ("visit", "0001_initial"), + ] + + operations = [ + migrations.RemoveField( + model_name="visit", + name="enddatetime", + ), + migrations.AlterField( + model_name="visit", + name="doctors", + field=models.ManyToManyField( + blank=True, null=True, related_name="visits", to="accounts.doctor" + ), + ), + ] diff --git a/requirements.txt b/requirements.txt index 63dde74..49d6ffd 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,10 +4,13 @@ distlib==0.3.8 Django==5.0.3 django-cors-headers==4.3.1 django-database-url==1.0.3 +django-filter==24.2 django-shortuuidfield==0.1.3 djangorestframework==3.15.1 djangorestframework-simplejwt==5.3.1 drf-yasg==1.21.7 +factory-boy==3.3.0 +Faker==25.0.0 filelock==3.13.3 identify==2.5.35 inflection==0.5.1 @@ -18,6 +21,7 @@ platformdirs==4.2.0 pre-commit==3.7.0 psycopg2-binary==2.9.9 PyJWT==2.8.0 +python-dateutil==2.9.0.post0 python-decouple==3.8 pytz==2024.1 PyYAML==6.0.1