diff --git a/FusionIIIT/applications/academic_procedures/migrations/0002_auto_20240218_0103.py b/FusionIIIT/applications/academic_procedures/migrations/0002_auto_20240218_0103.py new file mode 100644 index 000000000..abbc372f3 --- /dev/null +++ b/FusionIIIT/applications/academic_procedures/migrations/0002_auto_20240218_0103.py @@ -0,0 +1,38 @@ +# Generated by Django 3.1.5 on 2024-02-18 01:03 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('academic_procedures', '0001_initial'), + ] + + operations = [ + migrations.AlterField( + model_name='assistantshipclaim', + name='year', + field=models.IntegerField(choices=[(2024, 2024), (2023, 2023)]), + ), + migrations.AlterField( + model_name='course_registration', + name='working_year', + field=models.IntegerField(blank=True, choices=[(2024, 2024), (2023, 2023)], null=True), + ), + migrations.AlterField( + model_name='finalregistrations', + name='batch', + field=models.IntegerField(default=2024), + ), + migrations.AlterField( + model_name='messdue', + name='year', + field=models.IntegerField(choices=[(2024, 2024), (2023, 2023)]), + ), + migrations.AlterField( + model_name='register', + name='year', + field=models.IntegerField(default=2024), + ), + ] diff --git a/FusionIIIT/applications/eis/migrations/0002_auto_20240218_0103.py b/FusionIIIT/applications/eis/migrations/0002_auto_20240218_0103.py new file mode 100644 index 000000000..4554044d0 --- /dev/null +++ b/FusionIIIT/applications/eis/migrations/0002_auto_20240218_0103.py @@ -0,0 +1,53 @@ +# Generated by Django 3.1.5 on 2024-02-18 01:03 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('eis', '0001_initial'), + ] + + operations = [ + migrations.AlterField( + model_name='emp_achievement', + name='a_year', + field=models.IntegerField(blank=True, choices=[(1995, 1995), (1996, 1996), (1997, 1997), (1998, 1998), (1999, 1999), (2000, 2000), (2001, 2001), (2002, 2002), (2003, 2003), (2004, 2004), (2005, 2005), (2006, 2006), (2007, 2007), (2008, 2008), (2009, 2009), (2010, 2010), (2011, 2011), (2012, 2012), (2013, 2013), (2014, 2014), (2015, 2015), (2016, 2016), (2017, 2017), (2018, 2018), (2019, 2019), (2020, 2020), (2021, 2021), (2022, 2022), (2023, 2023), (2024, 2024)], null=True, verbose_name='year'), + ), + migrations.AlterField( + model_name='emp_confrence_organised', + name='k_year', + field=models.IntegerField(blank=True, choices=[(1995, 1995), (1996, 1996), (1997, 1997), (1998, 1998), (1999, 1999), (2000, 2000), (2001, 2001), (2002, 2002), (2003, 2003), (2004, 2004), (2005, 2005), (2006, 2006), (2007, 2007), (2008, 2008), (2009, 2009), (2010, 2010), (2011, 2011), (2012, 2012), (2013, 2013), (2014, 2014), (2015, 2015), (2016, 2016), (2017, 2017), (2018, 2018), (2019, 2019), (2020, 2020), (2021, 2021), (2022, 2022), (2023, 2023), (2024, 2024)], null=True, verbose_name='year'), + ), + migrations.AlterField( + model_name='emp_expert_lectures', + name='l_year', + field=models.IntegerField(blank=True, choices=[(1995, 1995), (1996, 1996), (1997, 1997), (1998, 1998), (1999, 1999), (2000, 2000), (2001, 2001), (2002, 2002), (2003, 2003), (2004, 2004), (2005, 2005), (2006, 2006), (2007, 2007), (2008, 2008), (2009, 2009), (2010, 2010), (2011, 2011), (2012, 2012), (2013, 2013), (2014, 2014), (2015, 2015), (2016, 2016), (2017, 2017), (2018, 2018), (2019, 2019), (2020, 2020), (2021, 2021), (2022, 2022), (2023, 2023), (2024, 2024)], null=True, verbose_name='year'), + ), + migrations.AlterField( + model_name='emp_keynote_address', + name='k_year', + field=models.IntegerField(blank=True, choices=[(1995, 1995), (1996, 1996), (1997, 1997), (1998, 1998), (1999, 1999), (2000, 2000), (2001, 2001), (2002, 2002), (2003, 2003), (2004, 2004), (2005, 2005), (2006, 2006), (2007, 2007), (2008, 2008), (2009, 2009), (2010, 2010), (2011, 2011), (2012, 2012), (2013, 2013), (2014, 2014), (2015, 2015), (2016, 2016), (2017, 2017), (2018, 2018), (2019, 2019), (2020, 2020), (2021, 2021), (2022, 2022), (2023, 2023), (2024, 2024)], null=True, verbose_name='year'), + ), + migrations.AlterField( + model_name='emp_mtechphd_thesis', + name='s_year', + field=models.IntegerField(blank=True, choices=[(1995, 1995), (1996, 1996), (1997, 1997), (1998, 1998), (1999, 1999), (2000, 2000), (2001, 2001), (2002, 2002), (2003, 2003), (2004, 2004), (2005, 2005), (2006, 2006), (2007, 2007), (2008, 2008), (2009, 2009), (2010, 2010), (2011, 2011), (2012, 2012), (2013, 2013), (2014, 2014), (2015, 2015), (2016, 2016), (2017, 2017), (2018, 2018), (2019, 2019), (2020, 2020), (2021, 2021), (2022, 2022), (2023, 2023), (2024, 2024)], null=True, verbose_name='year'), + ), + migrations.AlterField( + model_name='emp_patents', + name='p_year', + field=models.IntegerField(blank=True, choices=[(1995, 1995), (1996, 1996), (1997, 1997), (1998, 1998), (1999, 1999), (2000, 2000), (2001, 2001), (2002, 2002), (2003, 2003), (2004, 2004), (2005, 2005), (2006, 2006), (2007, 2007), (2008, 2008), (2009, 2009), (2010, 2010), (2011, 2011), (2012, 2012), (2013, 2013), (2014, 2014), (2015, 2015), (2016, 2016), (2017, 2017), (2018, 2018), (2019, 2019), (2020, 2020), (2021, 2021), (2022, 2022), (2023, 2023), (2024, 2024)], null=True, verbose_name='year'), + ), + migrations.AlterField( + model_name='emp_published_books', + name='pyear', + field=models.IntegerField(blank=True, choices=[(1995, 1995), (1996, 1996), (1997, 1997), (1998, 1998), (1999, 1999), (2000, 2000), (2001, 2001), (2002, 2002), (2003, 2003), (2004, 2004), (2005, 2005), (2006, 2006), (2007, 2007), (2008, 2008), (2009, 2009), (2010, 2010), (2011, 2011), (2012, 2012), (2013, 2013), (2014, 2014), (2015, 2015), (2016, 2016), (2017, 2017), (2018, 2018), (2019, 2019), (2020, 2020), (2021, 2021), (2022, 2022), (2023, 2023), (2024, 2024)], null=True, verbose_name='year'), + ), + migrations.AlterField( + model_name='emp_research_papers', + name='year', + field=models.CharField(blank=True, choices=[(1995, 1995), (1996, 1996), (1997, 1997), (1998, 1998), (1999, 1999), (2000, 2000), (2001, 2001), (2002, 2002), (2003, 2003), (2004, 2004), (2005, 2005), (2006, 2006), (2007, 2007), (2008, 2008), (2009, 2009), (2010, 2010), (2011, 2011), (2012, 2012), (2013, 2013), (2014, 2014), (2015, 2015), (2016, 2016), (2017, 2017), (2018, 2018), (2019, 2019), (2020, 2020), (2021, 2021), (2022, 2022), (2023, 2023), (2024, 2024)], max_length=10, null=True), + ), + ] diff --git a/FusionIIIT/applications/globals/migrations/0002_auto_20240218_0103.py b/FusionIIIT/applications/globals/migrations/0002_auto_20240218_0103.py new file mode 100644 index 000000000..fb9f3245d --- /dev/null +++ b/FusionIIIT/applications/globals/migrations/0002_auto_20240218_0103.py @@ -0,0 +1,18 @@ +# Generated by Django 3.1.5 on 2024-02-18 01:03 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('globals', '0001_initial'), + ] + + operations = [ + migrations.AlterField( + model_name='extrainfo', + name='user_status', + field=models.CharField(choices=[('NEW', 'NEW'), ('PRESENT', 'PRESENT')], default='PRESENT', max_length=50), + ), + ] diff --git a/FusionIIIT/applications/globals/migrations/0003_auto_20240218_0457.py b/FusionIIIT/applications/globals/migrations/0003_auto_20240218_0457.py new file mode 100644 index 000000000..7e858abed --- /dev/null +++ b/FusionIIIT/applications/globals/migrations/0003_auto_20240218_0457.py @@ -0,0 +1,18 @@ +# Generated by Django 3.1.5 on 2024-02-18 04:57 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('globals', '0002_auto_20240218_0103'), + ] + + operations = [ + migrations.AlterField( + model_name='extrainfo', + name='user_status', + field=models.CharField(choices=[('PRESENT', 'PRESENT'), ('NEW', 'NEW')], default='PRESENT', max_length=50), + ), + ] diff --git a/FusionIIIT/applications/globals/migrations/0004_auto_20240218_0531.py b/FusionIIIT/applications/globals/migrations/0004_auto_20240218_0531.py new file mode 100644 index 000000000..141eb6786 --- /dev/null +++ b/FusionIIIT/applications/globals/migrations/0004_auto_20240218_0531.py @@ -0,0 +1,18 @@ +# Generated by Django 3.1.5 on 2024-02-18 05:31 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('globals', '0003_auto_20240218_0457'), + ] + + operations = [ + migrations.AlterField( + model_name='extrainfo', + name='user_status', + field=models.CharField(choices=[('NEW', 'NEW'), ('PRESENT', 'PRESENT')], default='PRESENT', max_length=50), + ), + ] diff --git a/FusionIIIT/applications/globals/migrations/0005_auto_20240219_1603.py b/FusionIIIT/applications/globals/migrations/0005_auto_20240219_1603.py new file mode 100644 index 000000000..c4810e562 --- /dev/null +++ b/FusionIIIT/applications/globals/migrations/0005_auto_20240219_1603.py @@ -0,0 +1,18 @@ +# Generated by Django 3.1.5 on 2024-02-19 16:03 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('globals', '0004_auto_20240218_0531'), + ] + + operations = [ + migrations.AlterField( + model_name='extrainfo', + name='user_status', + field=models.CharField(choices=[('PRESENT', 'PRESENT'), ('NEW', 'NEW')], default='PRESENT', max_length=50), + ), + ] diff --git a/FusionIIIT/applications/globals/migrations/0006_auto_20240221_1511.py b/FusionIIIT/applications/globals/migrations/0006_auto_20240221_1511.py new file mode 100644 index 000000000..5244bbf49 --- /dev/null +++ b/FusionIIIT/applications/globals/migrations/0006_auto_20240221_1511.py @@ -0,0 +1,18 @@ +# Generated by Django 3.1.5 on 2024-02-21 15:11 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('globals', '0005_auto_20240219_1603'), + ] + + operations = [ + migrations.AlterField( + model_name='extrainfo', + name='user_status', + field=models.CharField(choices=[('NEW', 'NEW'), ('PRESENT', 'PRESENT')], default='PRESENT', max_length=50), + ), + ] diff --git a/FusionIIIT/applications/globals/migrations/0007_auto_20240221_1900.py b/FusionIIIT/applications/globals/migrations/0007_auto_20240221_1900.py new file mode 100644 index 000000000..9a1002c06 --- /dev/null +++ b/FusionIIIT/applications/globals/migrations/0007_auto_20240221_1900.py @@ -0,0 +1,18 @@ +# Generated by Django 3.1.5 on 2024-02-21 19:00 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('globals', '0006_auto_20240221_1511'), + ] + + operations = [ + migrations.AlterField( + model_name='extrainfo', + name='user_status', + field=models.CharField(choices=[('PRESENT', 'PRESENT'), ('NEW', 'NEW')], default='PRESENT', max_length=50), + ), + ] diff --git a/FusionIIIT/applications/health_center/admin.py b/FusionIIIT/applications/health_center/admin.py index 0116b8a3e..4615621c4 100644 --- a/FusionIIIT/applications/health_center/admin.py +++ b/FusionIIIT/applications/health_center/admin.py @@ -2,7 +2,7 @@ from .models import (Ambulance_request, Appointment, Complaint, Counter, Doctor, Expiry, Hospital, Hospital_admit, Medicine, - Prescribed_medicine, Prescription, Schedule, Stock) + Prescribed_medicine, Prescription, Schedule, Stock,Announcements,SpecialRequest) admin.site.register(Doctor) admin.site.register(Appointment) @@ -17,3 +17,5 @@ admin.site.register(Medicine) admin.site.register(Prescribed_medicine) admin.site.register(Schedule) +admin.site.register(Announcements) +admin.site.register(SpecialRequest) diff --git a/FusionIIIT/applications/health_center/api/serializers.py b/FusionIIIT/applications/health_center/api/serializers.py index dfb72d68a..11dda4d87 100644 --- a/FusionIIIT/applications/health_center/api/serializers.py +++ b/FusionIIIT/applications/health_center/api/serializers.py @@ -46,6 +46,12 @@ class ScheduleSerializer(serializers.ModelSerializer): class Meta: model=Schedule fields=('__all__') + +class AnnouncementSerializer(serializers.ModelSerializer): + + class Meta: + model=Announcements + fields=('__all__') class CounterSerializer(serializers.ModelSerializer): diff --git a/FusionIIIT/applications/health_center/api/views.py b/FusionIIIT/applications/health_center/api/views.py index 41912ed50..78d89e6b1 100644 --- a/FusionIIIT/applications/health_center/api/views.py +++ b/FusionIIIT/applications/health_center/api/views.py @@ -5,7 +5,6 @@ from datetime import datetime, timedelta, time,date from django.db import transaction from notification.views import healthcare_center_notif - from rest_framework.permissions import IsAuthenticated from rest_framework.authentication import TokenAuthentication from rest_framework import status diff --git a/FusionIIIT/applications/health_center/migrations/0002_auto_20240218_0110.py b/FusionIIIT/applications/health_center/migrations/0002_auto_20240218_0110.py new file mode 100644 index 000000000..813d30439 --- /dev/null +++ b/FusionIIIT/applications/health_center/migrations/0002_auto_20240218_0110.py @@ -0,0 +1,23 @@ +# Generated by Django 3.1.5 on 2024-02-18 01:10 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('health_center', '0001_initial'), + ] + + operations = [ + migrations.AlterField( + model_name='doctor', + name='doctor_name', + field=models.CharField(choices=[(0, 'Dr.Sharma'), (1, 'Dr.Vinay')], max_length=100), + ), + migrations.AlterField( + model_name='doctor', + name='doctor_phone', + field=models.IntegerField(max_length=10), + ), + ] diff --git a/FusionIIIT/applications/health_center/migrations/0003_auto_20240218_0427.py b/FusionIIIT/applications/health_center/migrations/0003_auto_20240218_0427.py new file mode 100644 index 000000000..38169e5e0 --- /dev/null +++ b/FusionIIIT/applications/health_center/migrations/0003_auto_20240218_0427.py @@ -0,0 +1,39 @@ +# Generated by Django 3.1.5 on 2024-02-18 04:27 + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('health_center', '0002_auto_20240218_0110'), + ] + + operations = [ + migrations.CreateModel( + name='Pathologist', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('pathologist_name', models.CharField(choices=[(0, 'Dr.Ajay'), (1, 'Dr.Rahul')], max_length=50)), + ('pathologist_phone', models.IntegerField(max_length=10)), + ('specialization', models.CharField(max_length=100)), + ('active', models.BooleanField(default=True)), + ], + ), + migrations.AlterField( + model_name='doctor', + name='doctor_name', + field=models.CharField(choices=[(0, 'Dr.Sharma'), (1, 'Dr.Vinay')], max_length=50), + ), + migrations.AlterField( + model_name='schedule', + name='day', + field=models.CharField(choices=[(0, 'Monday'), (1, 'Tuesday'), (2, 'Wednesday'), (3, 'Thursday'), (4, 'Friday'), (5, 'Saturday'), (6, 'Sunday')], max_length=10), + ), + migrations.AddField( + model_name='schedule', + name='pathologist_id', + field=models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, to='health_center.pathologist'), + ), + ] diff --git a/FusionIIIT/applications/health_center/migrations/0004_auto_20240218_0457.py b/FusionIIIT/applications/health_center/migrations/0004_auto_20240218_0457.py new file mode 100644 index 000000000..a094622f8 --- /dev/null +++ b/FusionIIIT/applications/health_center/migrations/0004_auto_20240218_0457.py @@ -0,0 +1,40 @@ +# Generated by Django 3.1.5 on 2024-02-18 04:57 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('health_center', '0003_auto_20240218_0427'), + ] + + operations = [ + migrations.RemoveField( + model_name='doctor', + name='id', + ), + migrations.RemoveField( + model_name='pathologist', + name='id', + ), + migrations.RemoveField( + model_name='schedule', + name='id', + ), + migrations.AddField( + model_name='doctor', + name='doctor_id', + field=models.CharField(default=1, max_length=100, primary_key=True, serialize=False), + ), + migrations.AddField( + model_name='pathologist', + name='pathologist_id', + field=models.CharField(default=1, max_length=100, primary_key=True, serialize=False), + ), + migrations.AddField( + model_name='schedule', + name='schedule_id', + field=models.CharField(default=1, max_length=100, primary_key=True, serialize=False), + ), + ] diff --git a/FusionIIIT/applications/health_center/migrations/0005_auto_20240218_0531.py b/FusionIIIT/applications/health_center/migrations/0005_auto_20240218_0531.py new file mode 100644 index 000000000..ebc73516f --- /dev/null +++ b/FusionIIIT/applications/health_center/migrations/0005_auto_20240218_0531.py @@ -0,0 +1,33 @@ +# Generated by Django 3.1.5 on 2024-02-18 05:31 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('health_center', '0004_auto_20240218_0457'), + ] + + operations = [ + migrations.RemoveField( + model_name='doctor', + name='doctor_id', + ), + migrations.RemoveField( + model_name='pathologist', + name='pathologist_id', + ), + migrations.AddField( + model_name='doctor', + name='id', + field=models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'), + preserve_default=False, + ), + migrations.AddField( + model_name='pathologist', + name='id', + field=models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'), + preserve_default=False, + ), + ] diff --git a/FusionIIIT/applications/health_center/migrations/0006_auto_20240218_0540.py b/FusionIIIT/applications/health_center/migrations/0006_auto_20240218_0540.py new file mode 100644 index 000000000..8663aca65 --- /dev/null +++ b/FusionIIIT/applications/health_center/migrations/0006_auto_20240218_0540.py @@ -0,0 +1,23 @@ +# Generated by Django 3.1.5 on 2024-02-18 05:40 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('health_center', '0005_auto_20240218_0531'), + ] + + operations = [ + migrations.RemoveField( + model_name='schedule', + name='schedule_id', + ), + migrations.AddField( + model_name='schedule', + name='id', + field=models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'), + preserve_default=False, + ), + ] diff --git a/FusionIIIT/applications/health_center/migrations/0007_announcement.py b/FusionIIIT/applications/health_center/migrations/0007_announcement.py new file mode 100644 index 000000000..96e12810c --- /dev/null +++ b/FusionIIIT/applications/health_center/migrations/0007_announcement.py @@ -0,0 +1,24 @@ +# Generated by Django 3.1.5 on 2024-02-18 16:49 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('health_center', '0006_auto_20240218_0540'), + ] + + operations = [ + migrations.CreateModel( + name='Announcement', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('title', models.CharField(max_length=200)), + ('date', models.DateField(auto_now=True)), + ('from_time', models.TimeField(blank=True, null=True)), + ('to_time', models.TimeField(blank=True, null=True)), + ('venue', models.CharField(max_length=200)), + ], + ), + ] diff --git a/FusionIIIT/applications/health_center/migrations/0008_auto_20240218_2015.py b/FusionIIIT/applications/health_center/migrations/0008_auto_20240218_2015.py new file mode 100644 index 000000000..a15a672ec --- /dev/null +++ b/FusionIIIT/applications/health_center/migrations/0008_auto_20240218_2015.py @@ -0,0 +1,29 @@ +# Generated by Django 3.1.5 on 2024-02-18 20:15 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('health_center', '0007_announcement'), + ] + + operations = [ + migrations.RemoveField( + model_name='announcement', + name='date', + ), + migrations.RemoveField( + model_name='announcement', + name='from_time', + ), + migrations.RemoveField( + model_name='announcement', + name='title', + ), + migrations.RemoveField( + model_name='announcement', + name='to_time', + ), + ] diff --git a/FusionIIIT/applications/health_center/migrations/0009_announcement_announcement.py b/FusionIIIT/applications/health_center/migrations/0009_announcement_announcement.py new file mode 100644 index 000000000..a5ba897f0 --- /dev/null +++ b/FusionIIIT/applications/health_center/migrations/0009_announcement_announcement.py @@ -0,0 +1,18 @@ +# Generated by Django 3.1.5 on 2024-02-19 00:00 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('health_center', '0008_auto_20240218_2015'), + ] + + operations = [ + migrations.AddField( + model_name='announcement', + name='announcement', + field=models.CharField(default='None', max_length=250), + ), + ] diff --git a/FusionIIIT/applications/health_center/migrations/0010_auto_20240219_1538.py b/FusionIIIT/applications/health_center/migrations/0010_auto_20240219_1538.py new file mode 100644 index 000000000..fa1e88e1f --- /dev/null +++ b/FusionIIIT/applications/health_center/migrations/0010_auto_20240219_1538.py @@ -0,0 +1,18 @@ +# Generated by Django 3.1.5 on 2024-02-19 15:38 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('health_center', '0009_announcement_announcement'), + ] + + operations = [ + migrations.RenameField( + model_name='announcement', + old_name='venue', + new_name='title', + ), + ] diff --git a/FusionIIIT/applications/health_center/migrations/0011_auto_20240221_0951.py b/FusionIIIT/applications/health_center/migrations/0011_auto_20240221_0951.py new file mode 100644 index 000000000..ab543175b --- /dev/null +++ b/FusionIIIT/applications/health_center/migrations/0011_auto_20240221_0951.py @@ -0,0 +1,46 @@ +# Generated by Django 3.1.5 on 2024-02-21 09:51 + +import datetime +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('globals', '0005_auto_20240219_1603'), + ('health_center', '0010_auto_20240219_1538'), + ] + + operations = [ + migrations.CreateModel( + name='Announcements', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('ann_date', models.DateTimeField(default='04-04-2021')), + ('message', models.CharField(max_length=200)), + ('batch', models.CharField(default='Year-1', max_length=40)), + ('department', models.CharField(default='ALL', max_length=40)), + ('programme', models.CharField(max_length=10)), + ('upload_announcement', models.FileField(default=' ', null=True, upload_to='health_center/upload_announcement')), + ('anno_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='announcements_made', to='globals.extrainfo')), + ], + ), + migrations.CreateModel( + name='SpecialRequest', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('request_date', models.DateTimeField(default=datetime.date.today)), + ('brief', models.CharField(default='--', max_length=20)), + ('request_details', models.CharField(max_length=200)), + ('upload_request', models.FileField(blank=True, upload_to='')), + ('status', models.CharField(default='Pending', max_length=50)), + ('remarks', models.CharField(default='--', max_length=300)), + ('request_receiver', models.CharField(default='--', max_length=30)), + ('request_ann_maker', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='special_requests_made', to='globals.extrainfo')), + ], + ), + migrations.DeleteModel( + name='Announcement', + ), + ] diff --git a/FusionIIIT/applications/health_center/migrations/0012_counter_patho_count.py b/FusionIIIT/applications/health_center/migrations/0012_counter_patho_count.py new file mode 100644 index 000000000..e13c6cd85 --- /dev/null +++ b/FusionIIIT/applications/health_center/migrations/0012_counter_patho_count.py @@ -0,0 +1,18 @@ +# Generated by Django 3.1.5 on 2024-02-21 15:11 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('health_center', '0011_auto_20240221_0951'), + ] + + operations = [ + migrations.AddField( + model_name='counter', + name='patho_count', + field=models.IntegerField(default=0), + ), + ] diff --git a/FusionIIIT/applications/health_center/migrations/0013_auto_20240221_1900.py b/FusionIIIT/applications/health_center/migrations/0013_auto_20240221_1900.py new file mode 100644 index 000000000..dec3436ad --- /dev/null +++ b/FusionIIIT/applications/health_center/migrations/0013_auto_20240221_1900.py @@ -0,0 +1,19 @@ +# Generated by Django 3.1.5 on 2024-02-21 19:00 + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('health_center', '0012_counter_patho_count'), + ] + + operations = [ + migrations.AlterField( + model_name='schedule', + name='pathologist_id', + field=models.ForeignKey(default=0, on_delete=django.db.models.deletion.CASCADE, to='health_center.pathologist'), + ), + ] diff --git a/FusionIIIT/applications/health_center/migrations/0014_auto_20240221_1915.py b/FusionIIIT/applications/health_center/migrations/0014_auto_20240221_1915.py new file mode 100644 index 000000000..16990c601 --- /dev/null +++ b/FusionIIIT/applications/health_center/migrations/0014_auto_20240221_1915.py @@ -0,0 +1,19 @@ +# Generated by Django 3.1.5 on 2024-02-21 19:15 + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('health_center', '0013_auto_20240221_1900'), + ] + + operations = [ + migrations.AlterField( + model_name='schedule', + name='doctor_id', + field=models.ForeignKey(default=0, on_delete=django.db.models.deletion.CASCADE, to='health_center.doctor'), + ), + ] diff --git a/FusionIIIT/applications/health_center/migrations/0015_auto_20240222_0238.py b/FusionIIIT/applications/health_center/migrations/0015_auto_20240222_0238.py new file mode 100644 index 000000000..36dca37d8 --- /dev/null +++ b/FusionIIIT/applications/health_center/migrations/0015_auto_20240222_0238.py @@ -0,0 +1,19 @@ +# Generated by Django 3.1.5 on 2024-02-22 02:38 + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('health_center', '0014_auto_20240221_1915'), + ] + + operations = [ + migrations.AlterField( + model_name='schedule', + name='pathologist_id', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='health_center.pathologist'), + ), + ] diff --git a/FusionIIIT/applications/health_center/models.py b/FusionIIIT/applications/health_center/models.py index 4daaae0de..446e00e5f 100644 --- a/FusionIIIT/applications/health_center/models.py +++ b/FusionIIIT/applications/health_center/models.py @@ -1,4 +1,5 @@ from django.db import models +from datetime import date from applications.globals.models import ExtraInfo @@ -21,16 +22,32 @@ class Constants: (1, 'Dr.Vinay'), ) + + NAME_OF_PATHOLOGIST = ( + (0, 'Dr.Ajay'), + (1, 'Dr.Rahul'), + + ) class Doctor(models.Model): - doctor_name = models.IntegerField(choices=Constants.NAME_OF_DOCTOR) - doctor_phone = models.CharField(max_length=10) + doctor_name = models.CharField(choices=Constants.NAME_OF_DOCTOR, max_length=50) + doctor_phone = models.IntegerField(max_length=10) specialization = models.CharField(max_length=100) active = models.BooleanField(default=True) def __str__(self): return self.doctor_name +class Pathologist(models.Model): + pathologist_name = models.CharField(choices=Constants.NAME_OF_PATHOLOGIST, max_length=50) + pathologist_phone = models.IntegerField(max_length=10) + specialization = models.CharField(max_length=100) + active = models.BooleanField(default=True) + + def __str__(self): + return self.pathologist_name + + class Complaint(models.Model): user_id = models.ForeignKey(ExtraInfo,on_delete=models.CASCADE) feedback = models.CharField(max_length=100, null=True, blank=False) #This is the feedback given by the compounder @@ -65,7 +82,7 @@ class Hospital(models.Model): def __str__(self): return self.hospital_name - + class Expiry(models.Model): medicine_id=models.ForeignKey(Stock,on_delete=models.CASCADE) quantity = models.IntegerField(default=0) @@ -78,22 +95,28 @@ def __str__(self): return self.medicine_id.medicine_name class Schedule(models.Model): - doctor_id = models.ForeignKey(Doctor,on_delete=models.CASCADE) - day = models.IntegerField(choices=Constants.DAYS_OF_WEEK) + doctor_id = models.ForeignKey(Doctor,on_delete=models.CASCADE, default=0) + pathologist_id = models.ForeignKey(Pathologist,on_delete=models.CASCADE) + day = models.CharField(choices=Constants.DAYS_OF_WEEK, max_length=10) from_time = models.TimeField(null=True,blank=True) to_time = models.TimeField(null=True,blank=True) room = models.IntegerField() date = models.DateField(auto_now=True) + class Counter(models.Model): count=models.IntegerField(default=0) fine=models.IntegerField(default=0) doc_count=models.IntegerField(default=0) + patho_count=models.IntegerField(default=0) def doctor_count(self): self.doc_count+=1 return "" + def pathologist_count(self): + self.doc_count+=1 + return "" def increment(self): self.count+=1 return "" @@ -105,8 +128,12 @@ def range_count(self): dif=0 elif self.count<=4: dif=self.doc_count-self.count - else: + elif self.count<=4: dif=self.count-self.doc_count + elif self.count<=4: + dif=self.patho_count-self.count + else: + dif=self.count-self.patho_count return range(dif) def empty_fine(self): self.count=0 @@ -165,3 +192,28 @@ class Hospital_admit(models.Model): admission_date = models.DateField() discharge_date = models.DateField(null=True, blank=True) reason = models.CharField(max_length=50) + +class Announcements(models.Model): + anno_id = models.ForeignKey(ExtraInfo, on_delete=models.CASCADE, related_name='announcements_made') + ann_date = models.DateTimeField(default="04-04-2021") + message = models.CharField(max_length=200) + batch = models.CharField(max_length=40,default="Year-1") + department = models.CharField(max_length=40,default="ALL") + programme = models.CharField(max_length=10) + upload_announcement = models.FileField(upload_to='health_center/upload_announcement', null=True, default=" ") + def __str__(self): + return str(self.anno_id.user.username) + + +class SpecialRequest(models.Model): + request_ann_maker = models.ForeignKey(ExtraInfo, on_delete=models.CASCADE, related_name='special_requests_made') + request_date = models.DateTimeField(default=date.today) + brief = models.CharField(max_length=20, default='--') + request_details = models.CharField(max_length=200) + upload_request = models.FileField(blank=True) + status = models.CharField(max_length=50,default='Pending') + remarks = models.CharField(max_length=300, default="--") + request_receiver = models.CharField(max_length=30, default="--") + + def __str__(self): + return str(self.request_ann_maker.user.username) diff --git a/FusionIIIT/applications/health_center/urls.py b/FusionIIIT/applications/health_center/urls.py index b599cdd44..5892eb287 100644 --- a/FusionIIIT/applications/health_center/urls.py +++ b/FusionIIIT/applications/health_center/urls.py @@ -1,6 +1,7 @@ +from django import views from django.conf.urls import url,include -from .views import compounder_view, healthcenter, student_view, schedule_entry,doctor_entry,compounder_entry +from .views import compounder_view, healthcenter, student_view, schedule_entry,doctor_entry,compounder_entry,announcement app_name = 'healthcenter' @@ -12,6 +13,7 @@ #views url(r'^compounder/$', compounder_view, name='compounder_view'), url(r'^student/$', student_view, name='student_view'), + url(r'announcement/', announcement, name='announcement'), #database entry url(r'^schedule_entry', schedule_entry, name='schedule_entry'), diff --git a/FusionIIIT/applications/health_center/utils.py b/FusionIIIT/applications/health_center/utils.py index f965c5f60..84d77da1c 100644 --- a/FusionIIIT/applications/health_center/utils.py +++ b/FusionIIIT/applications/health_center/utils.py @@ -7,7 +7,7 @@ from .models import (Ambulance_request, Appointment, Complaint, Doctor, Expiry, Hospital, Hospital_admit, Medicine, Prescribed_medicine, Prescription, Schedule, - Stock) + Stock, Announcements, SpecialRequest, Pathologist) def datetime_handler(date): ''' @@ -65,6 +65,31 @@ def compounder_view_handler(request): ) data={'status':1, 'doctor':doctor, 'specialization':specialization, 'phone':phone} return JsonResponse(data) + + # updating new pathologist info in db + elif 'add_pathologist' in request.POST: + doctor=request.POST.get('new_pathologist') + specialization=request.POST.get('specialization') + phone=request.POST.get('phone') + Pathologist.objects.create( + pathologist_name=doctor, + pathologist_phone=phone, + specialization=specialization, + active=True + ) + data={'status':1, 'pathologist_name':doctor, 'specialization':specialization, 'pathologist_phone':phone} + return JsonResponse(data) + + # making announcements from compounder + # elif 'add' in request.POST: + # ven=request.POST.get('venue') + # announcement=request.POST.get('announcement') + # Announcement.objects.create( + # venue=ven, + # announcement=announcement, + # ) + # data={ 'venue':ven, 'announcement':announcement } + # return JsonResponse(data) # remove doctor by changing active status elif 'remove_doctor' in request.POST: @@ -73,6 +98,14 @@ def compounder_view_handler(request): doc=Doctor.objects.get(id=doctor).doctor_name data={'status':1, 'id':doctor, 'doc':doc} return JsonResponse(data) + + # remove pathologist by changing active status + elif 'remove_pathologist' in request.POST: + doctor=request.POST.get('pathologist_active') + Pathologist.objects.filter(id=doctor).update(active=False) + doc=Pathologist.objects.get(id=doctor).pathologist_name + data={'status':1, 'id':doctor, 'doc':doc} + return JsonResponse(data) # discharge patients elif 'discharge' in request.POST: @@ -106,7 +139,7 @@ def compounder_view_handler(request): return JsonResponse(data) # edit schedule for doctors - elif 'edit' in request.POST: + elif 'edit_1' in request.POST: doctor = request.POST.get('doctor') day = request.POST.get('day') time_in = request.POST.get('time_in') @@ -124,13 +157,46 @@ def compounder_view_handler(request): data={'status':1} return JsonResponse(data) + # remove schedule for a doctor elif 'rmv' in request.POST: doctor = request.POST.get('doctor') + day = request.POST.get('day') Schedule.objects.select_related('doctor_id').filter(doctor_id=doctor, day=day).delete() data = {'status': 1} return JsonResponse(data) + + + # edit schedule for pathologists + elif 'edit12' in request.POST: + doctor = request.POST.get('pathologist') + day = request.POST.get('day') + time_in = request.POST.get('time_in') + time_out = request.POST.get('time_out') + room = request.POST.get('room') + pathologist_id = Pathologist.objects.get(id=doctor) + schedule = Schedule.objects.select_related('pathologist_id').filter(pathologist_id=doctor, day=day) + if schedule.count() == 0: + Schedule.objects.create(pathologist_id=pathologist_id, day=day, room=room, + from_time=time_in, to_time=time_out) + else: + Schedule.objects.select_related('pathologist_id').filter(pathologist_id=pathologist_id, day=day).update(room=room) + Schedule.objects.select_related('pathologist_id').filter(pathologist_id=pathologist_id, day=day).update(from_time=time_in) + Schedule.objects.select_related('pathologist_id').filter(pathologist_id=pathologist_id, day=day).update(to_time=time_out) + data={'status':1} + return JsonResponse(data) + + + # remove schedule for a doctor + elif 'rmv1' in request.POST: + doctor = request.POST.get('pathologist') + + day = request.POST.get('day') + Schedule.objects.select_related('pathologist_id').filter(pathologist_id=doctor, day=day).delete() + data = {'status': 1} + return JsonResponse(data) + elif 'add_medicine' in request.POST: medicine = request.POST.get('new_medicine') @@ -422,6 +488,8 @@ def student_view_handler(request): healthcare_center_notif(request.user, cmp.user, 'appoint_req') return JsonResponse(data) + + elif 'doctor' in request.POST: doctor_id = request.POST.get('doctor') days = Schedule.objects.select_related('doctor_id').filter(doctor_id=doctor_id).values('day') @@ -442,6 +510,8 @@ def student_view_handler(request): schedule = sch.filter(doctor_id=doctor_id).order_by('date') schedules = serializers.serialize('json', schedule) return HttpResponse(schedules, content_type='json') + + elif 'feed_submit' in request.POST: user_id = ExtraInfo.objects.select_related('user','department').get(user=request.user) feedback = request.POST.get('feedback') diff --git a/FusionIIIT/applications/health_center/views.py b/FusionIIIT/applications/health_center/views.py index cd2bba84f..9aa29ae25 100644 --- a/FusionIIIT/applications/health_center/views.py +++ b/FusionIIIT/applications/health_center/views.py @@ -1,18 +1,19 @@ import json -from datetime import datetime, timedelta, time +from datetime import date, datetime, timedelta, time import xlrd import os from applications.globals.models import ExtraInfo, HoldsDesignation, Designation, DepartmentInfo +from django.views.decorators.csrf import csrf_exempt from django.contrib.auth.decorators import login_required from django.contrib.auth.models import User from django.core import serializers from django.http import HttpResponse, HttpResponseRedirect, JsonResponse -from django.shortcuts import render +from django.shortcuts import get_object_or_404, render, redirect from notification.views import healthcare_center_notif from .models import (Ambulance_request, Appointment, Complaint, Constants, - Counter, Doctor, Expiry, Hospital, Hospital_admit, + Counter, Doctor,Pathologist, Expiry, Hospital, Hospital_admit, Medicine, Prescribed_medicine, Prescription, Schedule, - Stock) + Stock,SpecialRequest,Announcements) from .utils import datetime_handler, compounder_view_handler, student_view_handler @@ -40,7 +41,7 @@ def healthcenter(request): def compounder_view(request): ''' - This function handles post reques for compounder and render pages accordingly + This function handles post requests for compounder and render pages accordingly @param: request - contains metadata about the requested page @@ -80,6 +81,7 @@ def compounder_view(request): stocks = Stock.objects.all() days = Constants.DAYS_OF_WEEK schedule=Schedule.objects.select_related('doctor_id').all().order_by('doctor_id') + schedule=Schedule.objects.select_related('pathologist_id').all().order_by('pathologist_id') expired=Expiry.objects.select_related('medicine_id').filter(expiry_date__lt=datetime.now(),returned=False).order_by('expiry_date') live_meds=Expiry.objects.select_related('medicine_id').filter(returned=False).order_by('quantity') count=Counter.objects.all() @@ -92,6 +94,7 @@ def compounder_view(request): hospitals=Hospital.objects.all() schedule=Schedule.objects.select_related('doctor_id').all().order_by('day','doctor_id') doctors=Doctor.objects.filter(active=True).order_by('id') + pathologists=Pathologist.objects.filter(active=True).order_by('id') doct= ["Dr. G S Sandhu", "Dr. Jyoti Garg", "Dr. Arvind Nath Gupta"] @@ -100,7 +103,7 @@ def compounder_view(request): {'days': days, 'users': users, 'count': count,'expired':expired, 'stocks': stocks, 'all_complaints': all_complaints, 'all_hospitals': all_hospitals, 'hospitals':hospitals, 'all_ambulances': all_ambulances, - 'appointments_today': appointments_today, 'doctors': doctors, 'doct': doct, + 'appointments_today': appointments_today, 'doctors': doctors, 'pathologists':pathologists, 'doct': doct, 'appointments_future': appointments_future, 'schedule': schedule, 'live_meds': live_meds, 'presc_hist': presc_hist, 'medicines_presc': medicines_presc, 'hospitals_list': hospitals_list}) elif usertype == 'student': return HttpResponseRedirect("/healthcenter/student") # compounder view ends @@ -143,6 +146,7 @@ def student_view(request): days = Constants.DAYS_OF_WEEK schedule=Schedule.objects.select_related('doctor_id').all().order_by('doctor_id') doctors=Doctor.objects.filter(active=True) + pathologists=Pathologist.objects.filter(active=True) count=Counter.objects.all() if count: @@ -155,7 +159,7 @@ def student_view(request): return render(request, 'phcModule/phc_student.html', {'complaints': complaints, 'medicines': medicines, - 'ambulances': ambulances, 'doctors': doctors, 'days': days,'count':count, + 'ambulances': ambulances, 'doctors': doctors, 'pathologists':pathologists, 'days': days,'count':count, 'hospitals': hospitals, 'appointments': appointments, 'prescription': prescription, 'schedule': schedule, 'users': users,'doct': doct, 'curr_date': datetime.now().date()}) elif usertype == 'compounder': @@ -238,6 +242,36 @@ def doctor_entry(request): pass return HttpResponse("Hello") +def pathologist_entry(request): + ''' + This function inputs new pathologist' details into Doctor class in database + @param: + request - contains metadata about the requested page + + ''' + excel = xlrd.open_workbook(os.path.join(os.getcwd(), 'dbinsertscripts/healthcenter/Pathologist-List.xlsx')) + z = excel.sheet_by_index(0) + + for i in range(1, 5): + try: + name = str(z.cell(i,0).value) + print(name) + phone = str(int(z.cell(i,1).value)) + print(phone) + spl = str(z.cell(i,2).value) + u = Pathologist.objects.create( + pathologist_name = name, + pathologist_phone = phone, + specialization=spl + ) + print("Pathologist done -> ") + except Exception as e: + print(e) + print(i) + pass + return HttpResponse("Hello") + + def compounder_entry(request): ''' This function inputs new compounder details into Doctor class in database @@ -310,4 +344,115 @@ def compounder_entry(request): print(e) print(i) pass - return HttpResponse("Hello") \ No newline at end of file + return HttpResponse("Hello") + +@login_required(login_url='/accounts/login') +def publish(request): + return render(request,'../templates/health_center/publish.html' ,{}) + + +def browse_announcements(): + """ + This function is used to browse Announcements Department-Wise + made by different faculties and admin. + + @variables: + cse_ann - Stores CSE Department Announcements + ece_ann - Stores ECE Department Announcements + me_ann - Stores ME Department Announcements + sm_ann - Stores SM Department Announcements + all_ann - Stores Announcements intended for all Departments + context - Dictionary for storing all above data + + """ + cse_ann = Announcements.objects.filter(department="CSE") + ece_ann = Announcements.objects.filter(department="ECE") + me_ann = Announcements.objects.filter(department="ME") + sm_ann = Announcements.objects.filter(department="SM") + all_ann = Announcements.objects.filter(department="ALL") + + context = { + "cse" : cse_ann, + "ece" : ece_ann, + "me" : me_ann, + "sm" : sm_ann, + "all" : all_ann + } + + return context + +def get_to_request(username): + """ + This function is used to get requests for the receiver + + @variables: + req - Contains request queryset + + """ + req = SpecialRequest.objects.filter(request_receiver=username) + return req + + + +@login_required(login_url='/accounts/login') +def announcement(request): + """ + This function is contains data for Requests and Announcement Related methods. + Data is added to Announcement Table using this function. + + @param: + request - contains metadata about the requested page + + @variables: + usrnm, user_info, ann_anno_id - Stores data needed for maker + batch, programme, message, upload_announcement, + department, ann_date, user_info - Gets and store data from FORM used for Announcements for Students. + + """ + usrnm = get_object_or_404(User, username=request.user.username) + user_info = ExtraInfo.objects.all().select_related('user','department').filter(user=usrnm).first() + num = 1 + ann_anno_id = user_info.id + requests_received = get_to_request(usrnm) + if request.method == 'POST': + formObject = Announcements() + # formObject.key = Projects.objects.get(id=request.session['projectId']) + user_info = ExtraInfo.objects.all().select_related('user','department').get(id=ann_anno_id) + getstudents = ExtraInfo.objects.select_related('user') + recipients = User.objects.filter(extrainfo__in=getstudents) + # formObject.anno_id=1 + formObject.anno_id=user_info + formObject.batch = request.POST['batch'] + formObject.programme = request.POST['programme'] + formObject.message = request.POST['announcement'] + formObject. upload_announcement = request.FILES.get('upload_announcement') + formObject.department = request.POST['department'] + formObject.ann_date = date.today() + #formObject.amount = request.POST['amount'] + formObject.save() + return redirect('../../compounder/') + + # batch = request.POST.get('batch', '') + # programme = request.POST.get('programme', '') + # message = request.POST.get('announcement', '') + # upload_announcement = request.FILES.get('upload_announcement') + # department = request.POST.get('department') + # ann_date = date.today() + # user_info = ExtraInfo.objects.all().select_related('user','department').get(id=ann_anno_id) + # getstudents = ExtraInfo.objects.select_related('user') + # recipients = User.objects.filter(extrainfo__in=getstudents) + + # obj1, created = Announcements.objects.get_or_create(anno_id=user_info, + # batch=batch, + # programme=programme, + # message=message, + # upload_announcement=upload_announcement, + # department = department, + # ann_date=ann_date) + # # department_notif(usrnm, recipients , message) + + context = browse_announcements() + return render(request, 'health_center/make_announce_comp.html', {"user_designation":user_info.user_type, + "announcements":context, + "request_to":requests_received + }) \ No newline at end of file diff --git a/FusionIIIT/applications/programme_curriculum/migrations/0002_auto_20240218_0103.py b/FusionIIIT/applications/programme_curriculum/migrations/0002_auto_20240218_0103.py new file mode 100644 index 000000000..54fe62adc --- /dev/null +++ b/FusionIIIT/applications/programme_curriculum/migrations/0002_auto_20240218_0103.py @@ -0,0 +1,23 @@ +# Generated by Django 3.1.5 on 2024-02-18 01:03 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('programme_curriculum', '0001_initial'), + ] + + operations = [ + migrations.AlterField( + model_name='batch', + name='year', + field=models.PositiveIntegerField(default=2024), + ), + migrations.AlterField( + model_name='programme', + name='programme_begin_year', + field=models.PositiveIntegerField(default=2024), + ), + ] diff --git a/FusionIIIT/applications/scholarships/migrations/0002_auto_20240218_0103.py b/FusionIIIT/applications/scholarships/migrations/0002_auto_20240218_0103.py new file mode 100644 index 000000000..840892400 --- /dev/null +++ b/FusionIIIT/applications/scholarships/migrations/0002_auto_20240218_0103.py @@ -0,0 +1,18 @@ +# Generated by Django 3.1.5 on 2024-02-18 01:03 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('scholarships', '0001_initial'), + ] + + operations = [ + migrations.AlterField( + model_name='previous_winner', + name='year', + field=models.IntegerField(default=2024), + ), + ] diff --git a/FusionIIIT/templates/phcModule/doctors.html b/FusionIIIT/templates/phcModule/doctors.html index 3c852475a..fc3bff5e6 100644 --- a/FusionIIIT/templates/phcModule/doctors.html +++ b/FusionIIIT/templates/phcModule/doctors.html @@ -11,14 +11,23 @@ Remove Doctor + + Pathologists + + + Add Pathologists + + + Remove Pathologists + {% comment %}the view doctor tab starts here {% endcomment %}
- + + + +
+
+
+ + + + + + {% for p in pathologists %} + {{count.pathologist_count}} + + {% endfor %} + + + + {% for p in pathologists %} + {{count.pathologist_count}} + + {% endfor %} + + + + + {% for p in pathologists %} + {{count.pathologist_count}} + + {% endfor %} + + +
Pathologist{{p.pathologist_name}}
Specialization{{p.specialization}}
Phone Number{{p.pathologist_phone}}
+ + +
+
+{% comment %}the view pathologist tab ends here {% endcomment %} + +{% comment %}the add pathologist tab starts here {% endcomment %} +
+

+
+
{% csrf_token %} +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ + +
+ +
+ +
+
+ +
+
+
+
+
+
+ {% comment %}the add pathologist tab ends here {% endcomment %} + + {% comment %}the remove pathologist tab starts here {% endcomment %} +
+
+
{% csrf_token %} +
+ + +
+
+ + +
+ +
+ +
+
+ +
+
+
+
+
+
+ {% comment %}the remove pathologist tab ends here {% endcomment %} + + + {% endblock %} diff --git a/FusionIIIT/templates/phcModule/make_announce_comp.html b/FusionIIIT/templates/phcModule/make_announce_comp.html new file mode 100644 index 000000000..9a8055331 --- /dev/null +++ b/FusionIIIT/templates/phcModule/make_announce_comp.html @@ -0,0 +1,163 @@ +{% load static %} +{% block make_announcements %} + + {% comment %}The tab menu starts here!{% endcomment %} + + +
+
+ +
+ {% csrf_token %} +
+ Make a new Announcement: +
+ +
+ +
+ +
+ + +
+ +
+ + +
+
+ +
+ +
+ + +
+
+ +
+ + +
+ +
+ + +
+ + + +
+ + {% comment %} {% endcomment %} + + + +
+
+ +
+ +
+
+
+
+ + +{% endblock %} + +{% block javascript %} + + + + +{% endblock %} \ No newline at end of file diff --git a/FusionIIIT/templates/phcModule/phc_compounder.html b/FusionIIIT/templates/phcModule/phc_compounder.html index bb0bc3751..59c5cede9 100644 --- a/FusionIIIT/templates/phcModule/phc_compounder.html +++ b/FusionIIIT/templates/phcModule/phc_compounder.html @@ -63,6 +63,11 @@ Feedback/Response + + + Make Announcements + + {% comment %}The Tab-Menu ends here!{% endcomment %} @@ -110,17 +115,23 @@ {% comment %}The Schedule Form starts here!{% endcomment %}
{% block schedule %} - {% include 'phcModule/schedule.html' with days=days count=count doctors=doctors%} + {% include 'phcModule/schedule.html' with days=days count=count doctors=doctors pathologists=pathologists%} {% endblock %}
{% comment %}The Schedule Form ends here!{% endcomment %} - {% comment %}The Doctors starts here!{% endcomment %} + {% comment %}The Doctors and Pathologists starts here!{% endcomment %}
{% block doctors %} - {% include 'phcModule/doctors.html' with doctors=doctors%} + {% include 'phcModule/doctors.html' with doctors=doctors pathologists=pathologists %} + {% endblock %} +
+ +
+ {% block make_announce_comp %} + {% include 'phcModule/make_announce_comp.html' with all_complaints=all_complaints%} {% endblock %}
- {% comment %}The Doctors Form ends here!{% endcomment %} + {% comment %}The Doctors and Pathologists Form ends here!{% endcomment %} {% comment %}The central-rail segment ends here!{% endcomment %} diff --git a/FusionIIIT/templates/phcModule/publish.html b/FusionIIIT/templates/phcModule/publish.html new file mode 100644 index 000000000..988d82c4b --- /dev/null +++ b/FusionIIIT/templates/phcModule/publish.html @@ -0,0 +1,134 @@ +{% extends 'health_center/phc_compounder.html' %} +{% block sidetabmenu %} + +{% endblock %} + +{% block content %} + +

Publish Result

+
+ +{% comment %} Combined {% endcomment %} +
+ +{% comment %} First Row {% endcomment %} +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+ + +{% comment %} Second Row {% endcomment %} + +
+ +
+
+ +
+ +
+ + + + + + + + + +
+ + + + + + + +
+ +{% endblock %} \ No newline at end of file diff --git a/FusionIIIT/templates/phcModule/schedule.html b/FusionIIIT/templates/phcModule/schedule.html index 35197ea1f..02370efa2 100644 --- a/FusionIIIT/templates/phcModule/schedule.html +++ b/FusionIIIT/templates/phcModule/schedule.html @@ -3,15 +3,22 @@ {% comment %}the main tab starts here {% endcomment %} - {% comment %}the doctor appointment tab starts here {% endcomment %} + {% comment %}the view doctor schedule tab starts here {% endcomment %}
- {% comment %}the view schedule tab ends here {% endcomment %} - {% comment %}the edit schedule tab starts here {% endcomment %} + {% comment %}the view doctor schedule tab ends here {% endcomment %} + + {% comment %}the edit doctor schedule tab starts here {% endcomment %}
{% csrf_token %} @@ -119,7 +128,7 @@
@@ -146,11 +155,247 @@


- + + +
+ +
+ + + + + + + + + + + + + + {% comment %}the edit doctor schedule tab ends here {% endcomment %} + + {% comment %}the view pathologist schedule tab starts here {% endcomment %} +
+
+ + + + + + +
+ +
+
+
+ + + + + {% for d in pathologists %} + {{count.pathologist_count}} + + {% endfor %} + + + + {% for d in pathologists %} + {{count.pathologist_count}} + + {% endfor %} + + + {% comment %} {% for s in schedule %} +

{{s.day}}

+ {% endfor %} {% endcomment %} + + {% for p,day in days %} + {{count.empty_fine}} + + + {% for d1 in pathologists %} + {{ count.empty_fine }} + {% for s1 in schedule %} + {% if s1.day == day %} + {% comment %} {{ s1.doctor_id.id }} {% endcomment %} + {{ s1.pathologist_id }} + {% if d1.id == s1.pathologist_id.id %} + + {{ count.increment }} + {% endif %} + {% endif %} + {% endfor %} + {% if count.count == 0 %} + + {% endif %} + {% endfor %} + + + {% endfor %} + +
Pathologist + + {{d.pathologist_name}}
Specialization{{d.specialization}}
{{day}}{{s1.from_time}}--{{s1.to_time}}
+
+
+
+ {% comment %}the view pathologist schedule tab ends here {% endcomment %} + + {% comment %}the edit pathologist schedule tab starts here {% endcomment %} +
+
+
{% csrf_token %} +

+

+
+ +
+
+ + + +
+
+
+ +
+ +
+
+
+ + + +
+
+ +
+
+ + + +
+

+ + +
+ +
@@ -158,82 +403,84 @@ + $('#edit12').click(function(e){ + var doc = document.getElementById('pathologist_a').value; + var day = document.getElementById('day_a1').value; + var time_in = document.getElementById('time_in1').value; + var time_out = document.getElementById('time_out1').value; + var room = document.getElementById('room1').value; + + + if(doc == "" || day == "" || time_in == ""|| room == "" || time_out == "") + { + $('#valid_patho1').html("Enter Valid Information"); + return false; + } + $.ajax({ + type:'post', + url:'/healthcenter/compounder/', + data: { + csrfmiddlewaretoken: '{{ csrf_token }}', + pathologist:doc, + day:day, + room:room, + time_in:time_in, + time_out:time_out, + edit12:$("#edit12").val() + }, + success: function(data){ + alert("edited schedule"); + document.getElementById("pathologist_a").value=""; + document.getElementById("day_a1").value=""; + document.getElementById("room1").value=""; + document.getElementById("time_in1").value=""; + document.getElementById("time_out1").value=""; + window.location.reload(); + $('#valid_patho1').html(""); + + + }, + }); + }); + + $('#rmv1').click(function(e){ + var doc = document.getElementById('pathologist_a').value; + var day = document.getElementById('day_a1').value; + + if(doc == "" || day == "" ) + { + $('#valid_patho2').html("Enter Valid Information"); + return false; + } + $.ajax({ + type:'post', + url:'/healthcenter/compounder/', + data: { + csrfmiddlewaretoken: '{{ csrf_token }}', + pathologist:$("#pathologist_a").val(), + day:$("#day_a1").val(), + rmv:$("#rmv1").val() + }, + success: function(data){ + alert("Removed schedule"); + document.getElementById("pathologist_a").value=""; + document.getElementById("day_a1").value=""; + document.getElementById("room1").value=""; + document.getElementById("time_in1").value=""; + document.getElementById("time_out1").value=""; + window.location.reload(); + $('#valid_patho2').html(""); + + }, + }); + }); +
- {% comment %}the ambulance appointment tab ends here {% endcomment %} + {% comment %}the edit pathologist schedule tab ends here {% endcomment %} + {% endblock %} diff --git a/FusionIIIT/templates/phcModule/schedule_student.html b/FusionIIIT/templates/phcModule/schedule_student.html index 305352fe4..69c1ea544 100644 --- a/FusionIIIT/templates/phcModule/schedule_student.html +++ b/FusionIIIT/templates/phcModule/schedule_student.html @@ -2,21 +2,27 @@ {% block schedule %} {% comment %}the main tab starts here {% endcomment %} {% comment %}the view doctor tab starts here {% endcomment %}
- + + + +
+ +


- + - - - - {% for d in doct %} - {{count.doctor_count}} - - {% endfor %} - - + + + {% for d in doctors %} + {{count.doctor_count}} + + {% endfor %} + + {% for d in doctors %} {{count.doctor_count}} {% endfor %} - {% for p,day in days %} - {{count.empty_fine}} - - - - {% for d in doctors %} - {{count.empty_fine}} - {% for s in schedule %} - {% if s.day == p %} - {% if d.id == s.doctor_id.id %} - - {{count.increment}} - {% else %} - {% endif %} - {% endif %} - {% endfor %} - {% if count.count == 0 %} - - {% endif %} - {% endfor %} - - {% endfor %} - -
Doctor{{d}}
Doctor {{d.doctor_name}}
Specialization{{d.specialization}}
{{day}}{{s.from_time}}--{{s.to_time}}
-
+ {% for p,day in days %} + {{count.empty_fine}} + + {{day}} + + {% for d in doctors %} + {{count.empty_fine}} + {% for s in schedule %} + {% if s.day == day %} + {% if d.id == s.doctor_id.id %} + {{s.from_time}}--{{s.to_time}} + {{count.increment}} + {% else %} + {% endif %} + {% endif %} + {% endfor %} + {% if count.count == 0 %} + + {% endif %} + {% endfor %} + + {% endfor %} + +
+
+ {% comment %}the view doctor schedule tab ends here {% endcomment %} + + {% comment %}the view pathologist tab starts here {% endcomment %} +
+
+ + + + + +
+
+
+ + + + + + {% for d in pathologists %} + {{count.pathologist_count}} + + {% endfor %} + + + + {% for d in pathologists %} + {{count.pathologist_count}} + + {% endfor %} + + + + + {% for d in pathologists %} + {{count.pathologist_count}} + + {% endfor %} + + +
Pathologist{{d.pathologist_name}}
Specialization{{d.specialization}}
Phone Number{{d.pathologist_phone}}
+ + + +
- {% comment %}the view schedule tab ends here {% endcomment %} +{% comment %}the view pathologist tab ends here {% endcomment %} + +{% comment %}the pathologist schedule tab starts here {% endcomment %} +
+
+ + + + + +
+ +
+
+
+ + + + + {% for d in pathologists %} + {{count.pathologist_count}} + + {% endfor %} + + + + {% for d in pathologists %} + {{count.pathologist_count}} + + {% endfor %} + + + {% for p,day in days %} + {{count.empty_fine}} + + + + {% for d in pathologists %} + {{count.empty_fine}} + {% for s in schedule %} + {% if s.day == day %} + {% if d.id == s.pathologist_id.id %} + + {{count.increment}} + {% else %} + {% endif %} + {% endif %} + {% endfor %} + {% if count.count == 0 %} + + {% endif %} + {% endfor %} + + + {% endfor %} + +
Pathologist {{d.pathologist_name}}
Specialization{{d.specialization}}
{{day}}{{s.from_time}}--{{s.to_time}}
+
+
+
+ {% comment %}the view pathologist schedule tab ends here {% endcomment %} + + {% endblock %} diff --git a/fusionlab_backup_New.sql b/fusionlab_backup_New.sql new file mode 100644 index 000000000..d50b32c16 Binary files /dev/null and b/fusionlab_backup_New.sql differ