-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Connected PostgresSQL with the app, created Patient entity, removed p…
…revious codes. #12
- Loading branch information
1 parent
1dfeae6
commit 3935af2
Showing
25 changed files
with
92 additions
and
134 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,5 +19,4 @@ | |
|
||
urlpatterns = [ | ||
path("admin/", admin.site.urls), | ||
path('appointments/', include('appointments.urls')), | ||
] |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
23 changes: 0 additions & 23 deletions
23
CMS/appointments/templates/appointments/appointment_detail.html
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
from django.contrib import admin | ||
from .models import Patient | ||
|
||
# Register your models here. | ||
admin.site.register(Patient) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
from django.apps import AppConfig | ||
|
||
|
||
class PatientConfig(AppConfig): | ||
default_auto_field = 'django.db.models.BigAutoField' | ||
name = 'patient' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Generated by Django 5.0.6 on 2024-06-14 16:25 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
initial = True | ||
|
||
dependencies = [ | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='Patient', | ||
fields=[ | ||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('first_name', models.CharField(max_length=100)), | ||
('last_name', models.CharField(max_length=100)), | ||
('birth_date', models.DateField()), | ||
('gender', models.CharField(choices=[('M', 'Male'), ('F', 'Female')], max_length=1)), | ||
('address', models.CharField(max_length=255)), | ||
('phone', models.CharField(max_length=20)), | ||
('email', models.EmailField(max_length=254)), | ||
('registration_date', models.DateTimeField()), | ||
('last_visit', models.DateTimeField()), | ||
('insurance', models.CharField(choices=[('YES', 'Yes'), ('NO', 'No')], max_length=3)), | ||
('created_at', models.DateTimeField(auto_now_add=True)), | ||
('updated_at', models.DateTimeField(auto_now=True)), | ||
], | ||
options={ | ||
'db_table': 'patient', | ||
}, | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Generated by Django 5.0.6 on 2024-06-14 16:41 | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('patient', '0001_initial'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterModelOptions( | ||
name='patient', | ||
options={'managed': False}, | ||
), | ||
] |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
from django.db import models | ||
|
||
|
||
class Patient(models.Model): | ||
patient_id = models.AutoField(primary_key=True) | ||
first_name = models.CharField(max_length=100) | ||
last_name = models.CharField(max_length=100) | ||
birth_date = models.DateField() | ||
gender = models.CharField(max_length=1, choices=[('M', 'Male'), ('F', 'Female')]) | ||
address = models.CharField(max_length=255) | ||
phone = models.CharField(max_length=20) | ||
email = models.EmailField() | ||
registration_date = models.DateTimeField() | ||
last_visit = models.DateTimeField() | ||
insurance = models.CharField(max_length=255) | ||
created_at = models.DateTimeField(auto_now_add=True) | ||
updated_at = models.DateTimeField(auto_now=True) | ||
|
||
class Meta: | ||
managed = False | ||
db_table = 'patient' | ||
|
||
def __str__(self): | ||
return f"{self.first_name} {self.last_name}" |
File renamed without changes.
File renamed without changes.
Large diffs are not rendered by default.
Oops, something went wrong.
Empty file.
This file was deleted.
Oops, something went wrong.
Empty file.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.