.
This commit is contained in:
@@ -0,0 +1,23 @@
|
|||||||
|
# Generated by Django 3.1.3 on 2021-02-25 18:08
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('generic', '0007_site'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='Plane',
|
||||||
|
fields=[
|
||||||
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||||
|
('plane', models.CharField(max_length=200)),
|
||||||
|
],
|
||||||
|
options={
|
||||||
|
'ordering': ('plane',),
|
||||||
|
},
|
||||||
|
),
|
||||||
|
]
|
||||||
@@ -7,6 +7,14 @@ import tagulous.models
|
|||||||
|
|
||||||
from sortedm2m.fields import SortedManyToManyField
|
from sortedm2m.fields import SortedManyToManyField
|
||||||
|
|
||||||
|
class Plane(models.Model):
|
||||||
|
plane = models.CharField(max_length=200)
|
||||||
|
|
||||||
|
def __str__(self):
|
||||||
|
return self.plane
|
||||||
|
|
||||||
|
class Meta:
|
||||||
|
ordering = ('plane', )
|
||||||
|
|
||||||
class Examination(models.Model):
|
class Examination(models.Model):
|
||||||
examination = models.CharField(max_length=200)
|
examination = models.CharField(max_length=200)
|
||||||
|
|||||||
@@ -0,0 +1,20 @@
|
|||||||
|
# Generated by Django 3.1.3 on 2021-02-25 18:08
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
import django.db.models.deletion
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('generic', '0008_plane'),
|
||||||
|
('longs', '0026_long_description'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='longseries',
|
||||||
|
name='plane',
|
||||||
|
field=models.ForeignKey(help_text='Plane of the examination', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='series_plane', to='generic.plane'),
|
||||||
|
),
|
||||||
|
]
|
||||||
+8
-1
@@ -25,7 +25,7 @@ from helpers.images import image_as_base64
|
|||||||
|
|
||||||
from anatomy.models import Modality
|
from anatomy.models import Modality
|
||||||
|
|
||||||
from generic.models import Examination, Condition, Sign, ExamBase
|
from generic.models import Examination, Condition, Sign, ExamBase, Plane
|
||||||
|
|
||||||
# from generic.models import Examination, Site, Condition, Sign
|
# from generic.models import Examination, Site, Condition, Sign
|
||||||
|
|
||||||
@@ -187,6 +187,13 @@ class LongSeries(models.Model):
|
|||||||
on_delete=models.SET_NULL,
|
on_delete=models.SET_NULL,
|
||||||
null=True,
|
null=True,
|
||||||
)
|
)
|
||||||
|
plane = models.ForeignKey(
|
||||||
|
Plane,
|
||||||
|
help_text="Plane of the examination",
|
||||||
|
related_name="series_plane",
|
||||||
|
on_delete=models.SET_NULL,
|
||||||
|
null=True,
|
||||||
|
)
|
||||||
long = models.ManyToManyField(
|
long = models.ManyToManyField(
|
||||||
"Long",
|
"Long",
|
||||||
help_text="The question(s) this series should be associated with",
|
help_text="The question(s) this series should be associated with",
|
||||||
|
|||||||
Reference in New Issue
Block a user