.
This commit is contained in:
@@ -9,6 +9,7 @@ from .models import (
|
|||||||
Finding,
|
Finding,
|
||||||
SeriesFinding,
|
SeriesFinding,
|
||||||
Structure,
|
Structure,
|
||||||
|
PathalogicalProcess,
|
||||||
)
|
)
|
||||||
|
|
||||||
import tagulous.admin
|
import tagulous.admin
|
||||||
@@ -33,6 +34,7 @@ admin.site.register(Finding)
|
|||||||
admin.site.register(Structure)
|
admin.site.register(Structure)
|
||||||
admin.site.register(SeriesFinding)
|
admin.site.register(SeriesFinding)
|
||||||
admin.site.register(Differential)
|
admin.site.register(Differential)
|
||||||
|
admin.site.register(PathalogicalProcess)
|
||||||
|
|
||||||
|
|
||||||
class DifferentialInline(admin.TabularInline):
|
class DifferentialInline(admin.TabularInline):
|
||||||
|
|||||||
@@ -0,0 +1,25 @@
|
|||||||
|
# Generated by Django 3.2.8 on 2021-12-06 22:24
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('atlas', '0015_condition_parent'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='PathalogicalProcess',
|
||||||
|
fields=[
|
||||||
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||||
|
('name', models.CharField(max_length=255)),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='case',
|
||||||
|
name='pathalogical_process',
|
||||||
|
field=models.ManyToManyField(blank=True, to='atlas.PathalogicalProcess'),
|
||||||
|
),
|
||||||
|
]
|
||||||
@@ -140,6 +140,14 @@ class Subspecialty(models.Model):
|
|||||||
def get_absolute_url(self):
|
def get_absolute_url(self):
|
||||||
return reverse("atlas:subspecialty_detail", kwargs={"pk": self.pk})
|
return reverse("atlas:subspecialty_detail", kwargs={"pk": self.pk})
|
||||||
|
|
||||||
|
class PathalogicalProcess(models.Model):
|
||||||
|
name = models.CharField(max_length=255)
|
||||||
|
|
||||||
|
def __str__(self) -> str:
|
||||||
|
return self.name
|
||||||
|
|
||||||
|
def get_absolute_url(self):
|
||||||
|
return reverse("atlas:pathalogical_process_detail", kwargs={"pk": self.pk})
|
||||||
|
|
||||||
class Differential(models.Model):
|
class Differential(models.Model):
|
||||||
condition = models.ForeignKey(Condition, on_delete=models.CASCADE)
|
condition = models.ForeignKey(Condition, on_delete=models.CASCADE)
|
||||||
@@ -193,6 +201,8 @@ class Case(models.Model):
|
|||||||
|
|
||||||
condition = models.ManyToManyField(Condition, blank=True)
|
condition = models.ManyToManyField(Condition, blank=True)
|
||||||
|
|
||||||
|
pathalogical_process = models.ManyToManyField(PathalogicalProcess, blank=True)
|
||||||
|
|
||||||
differential = models.ManyToManyField(
|
differential = models.ManyToManyField(
|
||||||
Condition, through=Differential, related_name="casedifferential"
|
Condition, through=Differential, related_name="casedifferential"
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user