69 lines
4.7 KiB
Python
69 lines
4.7 KiB
Python
# Generated by Django 3.2.8 on 2021-11-23 19:28
|
|
|
|
import atlas.models
|
|
from django.conf import settings
|
|
from django.db import migrations, models
|
|
import django.db.models.deletion
|
|
import django.utils.timezone
|
|
import sortedm2m.fields
|
|
import tagulous.models.fields
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
initial = True
|
|
|
|
dependencies = [
|
|
('anatomy', '0053_anatomyquestion_structure'),
|
|
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
|
('generic', '0014_alter_questionnote_note'),
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name='Series',
|
|
fields=[
|
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('description', models.TextField(blank=True, help_text='Description of stack, for admin organisation, will not be visible when taking')),
|
|
('open_access', models.BooleanField(default=True, help_text='If a question should be freely available to browse')),
|
|
('author', models.ManyToManyField(blank=True, related_name='series', to=settings.AUTH_USER_MODEL)),
|
|
('contrast', models.ForeignKey(blank=True, help_text='MRI / CT contrast', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='atlas_series_contrast', to='generic.contrast')),
|
|
('examination', models.ForeignKey(help_text='Name of the examination', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='atlas_series_examination', to='generic.examination')),
|
|
('modality', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='atlas_series_modality', to='anatomy.modality')),
|
|
('plane', models.ForeignKey(blank=True, help_text='Plane of the examination', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='atlas_series_plane', to='generic.plane')),
|
|
],
|
|
),
|
|
migrations.CreateModel(
|
|
name='SeriesImage',
|
|
fields=[
|
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('image', models.FileField(upload_to=atlas.models.image_directory_path)),
|
|
('position', models.IntegerField(default=0)),
|
|
('upload_filename', models.CharField(blank=True, max_length=255)),
|
|
('series', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='images', to='atlas.series')),
|
|
],
|
|
options={
|
|
'ordering': ['position'],
|
|
},
|
|
),
|
|
migrations.CreateModel(
|
|
name='Case',
|
|
fields=[
|
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('description', models.TextField(blank=True, help_text='Description of the case, for admin organisation, will not be visible when taking')),
|
|
('history', models.TextField(blank=True, null=True)),
|
|
('findings', models.TextField(blank=True, null=True)),
|
|
('subpecialty', models.CharField(choices=[('BR', 'Breast'), ('CA', 'Cardiac'), ('GI', 'Gastrointestinal and hepatobiliary'), ('HN', 'Head and Neck'), ('MS', 'Musculoskeletal'), ('NE', 'Neuroradiology'), ('OG', 'Obstectric and Gynaecological'), ('PA', 'Paediatric'), ('UR', 'Uroradiology'), ('VA', 'Vascular'), ('HA', 'Haemotology and Oncology')], max_length=2)),
|
|
('verified', models.BooleanField(default=False)),
|
|
('created_date', models.DateTimeField(default=django.utils.timezone.now)),
|
|
('published_date', models.DateTimeField(blank=True, null=True)),
|
|
('scrapped', models.BooleanField(default=False, help_text='Question has been scrapped and will not be shown')),
|
|
('open_access', models.BooleanField(default=True, help_text='If a question should be freely available to browse')),
|
|
('author', models.ManyToManyField(blank=True, help_text='Author of question', related_name='atlas_authored_questions', to=settings.AUTH_USER_MODEL)),
|
|
('condition', tagulous.models.fields.TagField(_set_tag_meta=True, blank=True, help_text='Associated condition. Will allow searching / filtering and tips / hints to be displayed. Conditions with spaces must be enclosed in quotes "..."', to='generic.Condition')),
|
|
('series', sortedm2m.fields.SortedManyToManyField(help_text=None, related_name='atlas', to='atlas.Series')),
|
|
('sign', tagulous.models.fields.TagField(_set_tag_meta=True, blank=True, help_text='Radiological signs in the question', to='generic.Sign')),
|
|
],
|
|
),
|
|
]
|