.
This commit is contained in:
@@ -0,0 +1,3 @@
|
|||||||
|
from django.contrib import admin
|
||||||
|
|
||||||
|
# Register your models here.
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
from django.apps import AppConfig
|
||||||
|
|
||||||
|
|
||||||
|
class GenericConfig(AppConfig):
|
||||||
|
name = 'generic'
|
||||||
@@ -0,0 +1,65 @@
|
|||||||
|
# Generated by Django 3.1.3 on 2021-02-04 22:27
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
import tagulous.models.models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
initial = True
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='Examination',
|
||||||
|
fields=[
|
||||||
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||||
|
('examination', models.CharField(max_length=200)),
|
||||||
|
],
|
||||||
|
options={
|
||||||
|
'ordering': ('examination',),
|
||||||
|
},
|
||||||
|
),
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='Site',
|
||||||
|
fields=[
|
||||||
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||||
|
('site', models.CharField(max_length=200)),
|
||||||
|
('initials', models.CharField(max_length=200)),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='Sign',
|
||||||
|
fields=[
|
||||||
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||||
|
('name', models.CharField(max_length=255, unique=True)),
|
||||||
|
('slug', models.SlugField()),
|
||||||
|
('count', models.IntegerField(default=0, help_text='Internal counter of how many times this tag is in use')),
|
||||||
|
('protected', models.BooleanField(default=False, help_text='Will not be deleted when the count reaches 0')),
|
||||||
|
],
|
||||||
|
options={
|
||||||
|
'ordering': ('name',),
|
||||||
|
'abstract': False,
|
||||||
|
'unique_together': {('slug',)},
|
||||||
|
},
|
||||||
|
bases=(tagulous.models.models.BaseTagModel, models.Model),
|
||||||
|
),
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='Condition',
|
||||||
|
fields=[
|
||||||
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||||
|
('name', models.CharField(max_length=255, unique=True)),
|
||||||
|
('slug', models.SlugField()),
|
||||||
|
('count', models.IntegerField(default=0, help_text='Internal counter of how many times this tag is in use')),
|
||||||
|
('protected', models.BooleanField(default=False, help_text='Will not be deleted when the count reaches 0')),
|
||||||
|
],
|
||||||
|
options={
|
||||||
|
'ordering': ('name',),
|
||||||
|
'abstract': False,
|
||||||
|
'unique_together': {('slug',)},
|
||||||
|
},
|
||||||
|
bases=(tagulous.models.models.BaseTagModel, models.Model),
|
||||||
|
),
|
||||||
|
]
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
from django.db import models
|
||||||
|
|
||||||
|
import tagulous
|
||||||
|
import tagulous.models
|
||||||
|
|
||||||
|
|
||||||
|
class Examination(models.Model):
|
||||||
|
examination = models.CharField(max_length=200)
|
||||||
|
|
||||||
|
def __str__(self):
|
||||||
|
return self.examination
|
||||||
|
|
||||||
|
class Meta:
|
||||||
|
ordering = ('examination', )
|
||||||
|
|
||||||
|
class Site(models.Model):
|
||||||
|
site = models.CharField(max_length=200)
|
||||||
|
initials = models.CharField(max_length=200)
|
||||||
|
|
||||||
|
def __str__(self):
|
||||||
|
return self.site
|
||||||
|
|
||||||
|
class Condition(tagulous.models.TagModel):
|
||||||
|
pass
|
||||||
|
|
||||||
|
class Sign(tagulous.models.TagModel):
|
||||||
|
pass
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
from django.test import TestCase
|
||||||
|
|
||||||
|
# Create your tests here.
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
from django.shortcuts import render
|
||||||
|
|
||||||
|
# Create your views here.
|
||||||
+2
-2
@@ -26,7 +26,7 @@ from django.forms.widgets import RadioSelect, TextInput, Textarea
|
|||||||
class LongAnswerForm(ModelForm):
|
class LongAnswerForm(ModelForm):
|
||||||
class Meta:
|
class Meta:
|
||||||
model = CidUserAnswer
|
model = CidUserAnswer
|
||||||
fields = ("answer_observations","answer_interpretation","answer_principle_diagnosis","answer_differential_diagnosis","answer_further_management",)
|
fields = ("answer_observations","answer_interpretation","answer_principle_diagnosis","answer_differential_diagnosis","answer_management",)
|
||||||
|
|
||||||
|
|
||||||
class MarkLongQuestionForm(Form):
|
class MarkLongQuestionForm(Form):
|
||||||
@@ -52,7 +52,7 @@ class NoteForm(ModelForm):
|
|||||||
class LongCreationDefaultForm(ModelForm):
|
class LongCreationDefaultForm(ModelForm):
|
||||||
class Meta:
|
class Meta:
|
||||||
model = LongCreationDefault
|
model = LongCreationDefault
|
||||||
fields = ["site"]
|
#fields = ["site"]
|
||||||
exclude = ["author"]
|
exclude = ["author"]
|
||||||
|
|
||||||
class LongSeriesForm(ModelForm):
|
class LongSeriesForm(ModelForm):
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Generated by Django 3.1.3 on 2021-02-02 19:46
|
# Generated by Django 3.1.3 on 2021-02-04 22:55
|
||||||
|
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
import django.core.files.storage
|
import django.core.files.storage
|
||||||
@@ -7,7 +7,6 @@ import django.db.models.deletion
|
|||||||
import django.utils.timezone
|
import django.utils.timezone
|
||||||
import longs.models
|
import longs.models
|
||||||
import sortedm2m.fields
|
import sortedm2m.fields
|
||||||
import tagulous.models.models
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
@@ -20,23 +19,18 @@ class Migration(migrations.Migration):
|
|||||||
]
|
]
|
||||||
|
|
||||||
operations = [
|
operations = [
|
||||||
migrations.CreateModel(
|
|
||||||
name='Examination',
|
|
||||||
fields=[
|
|
||||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
||||||
('examination', models.CharField(max_length=200)),
|
|
||||||
],
|
|
||||||
options={
|
|
||||||
'ordering': ('examination',),
|
|
||||||
},
|
|
||||||
),
|
|
||||||
migrations.CreateModel(
|
migrations.CreateModel(
|
||||||
name='Long',
|
name='Long',
|
||||||
fields=[
|
fields=[
|
||||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||||
('question', models.TextField(blank=True, null=True)),
|
('history', models.TextField(blank=True, null=True)),
|
||||||
('feedback', models.TextField(blank=True, null=True)),
|
('feedback', models.TextField(blank=True, null=True)),
|
||||||
('sign', models.CharField(blank=True, max_length=255)),
|
('sign', models.CharField(blank=True, max_length=255)),
|
||||||
|
('model_observations', models.TextField(blank=True, null=True)),
|
||||||
|
('model_interpretation', models.TextField(blank=True, null=True)),
|
||||||
|
('model_principle_diagnosis', models.TextField(blank=True, null=True)),
|
||||||
|
('model_differential_diagnosis', models.TextField(blank=True, null=True)),
|
||||||
|
('model_further_management', models.TextField(blank=True, null=True)),
|
||||||
('verified', models.BooleanField(default=False)),
|
('verified', models.BooleanField(default=False)),
|
||||||
('created_date', models.DateTimeField(default=django.utils.timezone.now)),
|
('created_date', models.DateTimeField(default=django.utils.timezone.now)),
|
||||||
('published_date', models.DateTimeField(blank=True, null=True)),
|
('published_date', models.DateTimeField(blank=True, null=True)),
|
||||||
@@ -49,35 +43,11 @@ class Migration(migrations.Migration):
|
|||||||
name='LongSeries',
|
name='LongSeries',
|
||||||
fields=[
|
fields=[
|
||||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||||
('examination', models.ForeignKey(help_text='Name of the examination', null=True, on_delete=django.db.models.deletion.SET_NULL, to='longs.examination')),
|
('description', models.TextField(blank=True, help_text='Description of stack, for admin organisation')),
|
||||||
('long', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='long', to='longs.long')),
|
('long', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='series', to='longs.long')),
|
||||||
('modality', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='series_modality', to='anatomy.modality')),
|
('modality', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='series_modality', to='anatomy.modality')),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
migrations.CreateModel(
|
|
||||||
name='Site',
|
|
||||||
fields=[
|
|
||||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
||||||
('site', models.CharField(max_length=200)),
|
|
||||||
('initials', models.CharField(max_length=200)),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
migrations.CreateModel(
|
|
||||||
name='Sign',
|
|
||||||
fields=[
|
|
||||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
||||||
('name', models.CharField(max_length=255, unique=True)),
|
|
||||||
('slug', models.SlugField()),
|
|
||||||
('count', models.IntegerField(default=0, help_text='Internal counter of how many times this tag is in use')),
|
|
||||||
('protected', models.BooleanField(default=False, help_text='Will not be deleted when the count reaches 0')),
|
|
||||||
],
|
|
||||||
options={
|
|
||||||
'ordering': ('name',),
|
|
||||||
'abstract': False,
|
|
||||||
'unique_together': {('slug',)},
|
|
||||||
},
|
|
||||||
bases=(tagulous.models.models.BaseTagModel, models.Model),
|
|
||||||
),
|
|
||||||
migrations.CreateModel(
|
migrations.CreateModel(
|
||||||
name='Note',
|
name='Note',
|
||||||
fields=[
|
fields=[
|
||||||
@@ -94,7 +64,7 @@ class Migration(migrations.Migration):
|
|||||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||||
('image', models.ImageField(storage=django.core.files.storage.FileSystemStorage(base_url='/media/longs/', location='/home/ross/scripts/sites/rad/media//longs/'), upload_to=longs.models.image_directory_path)),
|
('image', models.ImageField(storage=django.core.files.storage.FileSystemStorage(base_url='/media/longs/', location='/home/ross/scripts/sites/rad/media//longs/'), upload_to=longs.models.image_directory_path)),
|
||||||
('position', models.IntegerField(default=0)),
|
('position', models.IntegerField(default=0)),
|
||||||
('series', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='series', to='longs.longseries')),
|
('series', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='images', to='longs.longseries')),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
migrations.CreateModel(
|
migrations.CreateModel(
|
||||||
@@ -102,14 +72,8 @@ class Migration(migrations.Migration):
|
|||||||
fields=[
|
fields=[
|
||||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||||
('author', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='long_default', to=settings.AUTH_USER_MODEL)),
|
('author', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='long_default', to=settings.AUTH_USER_MODEL)),
|
||||||
('site', models.ManyToManyField(blank=True, default=1, help_text='Default site to use when creating a new long', to='longs.Site')),
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
migrations.AddField(
|
|
||||||
model_name='long',
|
|
||||||
name='site',
|
|
||||||
field=models.ManyToManyField(blank=True, default=1, help_text='If we know the source of the image', to='longs.Site'),
|
|
||||||
),
|
|
||||||
migrations.CreateModel(
|
migrations.CreateModel(
|
||||||
name='Exam',
|
name='Exam',
|
||||||
fields=[
|
fields=[
|
||||||
@@ -122,29 +86,15 @@ class Migration(migrations.Migration):
|
|||||||
('exam_questions', sortedm2m.fields.SortedManyToManyField(blank='true', help_text=None, related_name='exams', to='longs.Long')),
|
('exam_questions', sortedm2m.fields.SortedManyToManyField(blank='true', help_text=None, related_name='exams', to='longs.Long')),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
migrations.CreateModel(
|
|
||||||
name='Condition',
|
|
||||||
fields=[
|
|
||||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
||||||
('name', models.CharField(max_length=255, unique=True)),
|
|
||||||
('slug', models.SlugField()),
|
|
||||||
('count', models.IntegerField(default=0, help_text='Internal counter of how many times this tag is in use')),
|
|
||||||
('protected', models.BooleanField(default=False, help_text='Will not be deleted when the count reaches 0')),
|
|
||||||
],
|
|
||||||
options={
|
|
||||||
'ordering': ('name',),
|
|
||||||
'abstract': False,
|
|
||||||
'unique_together': {('slug',)},
|
|
||||||
},
|
|
||||||
bases=(tagulous.models.models.BaseTagModel, models.Model),
|
|
||||||
),
|
|
||||||
migrations.CreateModel(
|
migrations.CreateModel(
|
||||||
name='CidUserAnswer',
|
name='CidUserAnswer',
|
||||||
fields=[
|
fields=[
|
||||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||||
('normal', models.BooleanField(default=False)),
|
('answer_observations', models.TextField(blank=True, null=True)),
|
||||||
('answer', models.TextField(blank=True, max_length=500)),
|
('answer_interpretation', models.TextField(blank=True, null=True)),
|
||||||
('answer_compare', models.TextField(blank=True, max_length=500)),
|
('answer_principle_diagnosis', models.TextField(blank=True, null=True)),
|
||||||
|
('answer_differential_diagnosis', models.TextField(blank=True, null=True)),
|
||||||
|
('answer_further_management', models.TextField(blank=True, null=True)),
|
||||||
('cid', models.BigIntegerField(blank=True, help_text='Candidate ID (limitied by BigIntegerField size)', null=True)),
|
('cid', models.BigIntegerField(blank=True, help_text='Candidate ID (limitied by BigIntegerField size)', null=True)),
|
||||||
('created', models.DateTimeField(auto_now_add=True)),
|
('created', models.DateTimeField(auto_now_add=True)),
|
||||||
('updated', models.DateTimeField(auto_now=True)),
|
('updated', models.DateTimeField(auto_now=True)),
|
||||||
|
|||||||
@@ -1,75 +0,0 @@
|
|||||||
# Generated by Django 3.1.3 on 2021-02-04 10:32
|
|
||||||
|
|
||||||
from django.db import migrations, models
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
('longs', '0001_initial'),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.RemoveField(
|
|
||||||
model_name='ciduseranswer',
|
|
||||||
name='answer',
|
|
||||||
),
|
|
||||||
migrations.RemoveField(
|
|
||||||
model_name='ciduseranswer',
|
|
||||||
name='answer_compare',
|
|
||||||
),
|
|
||||||
migrations.RemoveField(
|
|
||||||
model_name='ciduseranswer',
|
|
||||||
name='normal',
|
|
||||||
),
|
|
||||||
migrations.AddField(
|
|
||||||
model_name='ciduseranswer',
|
|
||||||
name='answer_differential_diagnosis',
|
|
||||||
field=models.TextField(blank=True, null=True),
|
|
||||||
),
|
|
||||||
migrations.AddField(
|
|
||||||
model_name='ciduseranswer',
|
|
||||||
name='answer_further_management',
|
|
||||||
field=models.TextField(blank=True, null=True),
|
|
||||||
),
|
|
||||||
migrations.AddField(
|
|
||||||
model_name='ciduseranswer',
|
|
||||||
name='answer_interpretation',
|
|
||||||
field=models.TextField(blank=True, null=True),
|
|
||||||
),
|
|
||||||
migrations.AddField(
|
|
||||||
model_name='ciduseranswer',
|
|
||||||
name='answer_observations',
|
|
||||||
field=models.TextField(blank=True, null=True),
|
|
||||||
),
|
|
||||||
migrations.AddField(
|
|
||||||
model_name='ciduseranswer',
|
|
||||||
name='answer_principle_diagnosis',
|
|
||||||
field=models.TextField(blank=True, null=True),
|
|
||||||
),
|
|
||||||
migrations.AddField(
|
|
||||||
model_name='long',
|
|
||||||
name='model_differential_diagnosis',
|
|
||||||
field=models.TextField(blank=True, null=True),
|
|
||||||
),
|
|
||||||
migrations.AddField(
|
|
||||||
model_name='long',
|
|
||||||
name='model_further_management',
|
|
||||||
field=models.TextField(blank=True, null=True),
|
|
||||||
),
|
|
||||||
migrations.AddField(
|
|
||||||
model_name='long',
|
|
||||||
name='model_interpretation',
|
|
||||||
field=models.TextField(blank=True, null=True),
|
|
||||||
),
|
|
||||||
migrations.AddField(
|
|
||||||
model_name='long',
|
|
||||||
name='model_observations',
|
|
||||||
field=models.TextField(blank=True, null=True),
|
|
||||||
),
|
|
||||||
migrations.AddField(
|
|
||||||
model_name='long',
|
|
||||||
name='model_principle_diagnosis',
|
|
||||||
field=models.TextField(blank=True, null=True),
|
|
||||||
),
|
|
||||||
]
|
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
# Generated by Django 3.1.3 on 2021-02-04 22:58
|
||||||
|
|
||||||
|
from django.db import migrations
|
||||||
|
import tagulous.models.fields
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('generic', '0001_initial'),
|
||||||
|
('longs', '0001_initial'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.RemoveField(
|
||||||
|
model_name='long',
|
||||||
|
name='sign',
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='long',
|
||||||
|
name='sign',
|
||||||
|
field=tagulous.models.fields.TagField(_set_tag_meta=True, blank=True, help_text='Radiological signs in the question', to='generic.Sign'),
|
||||||
|
),
|
||||||
|
]
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
# Generated by Django 3.1.3 on 2021-02-04 21:05
|
|
||||||
|
|
||||||
from django.db import migrations, models
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
('longs', '0002_auto_20210204_1032'),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.RenameField(
|
|
||||||
model_name='long',
|
|
||||||
old_name='question',
|
|
||||||
new_name='history',
|
|
||||||
),
|
|
||||||
migrations.AddField(
|
|
||||||
model_name='longseries',
|
|
||||||
name='description',
|
|
||||||
field=models.TextField(blank=True, help_text='Description of stack, for admin organisation'),
|
|
||||||
),
|
|
||||||
]
|
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
# Generated by Django 3.1.3 on 2021-02-04 22:58
|
||||||
|
|
||||||
|
from django.db import migrations
|
||||||
|
import tagulous.models.fields
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('generic', '0001_initial'),
|
||||||
|
('longs', '0002_auto_20210204_2258'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='long',
|
||||||
|
name='condition',
|
||||||
|
field=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'),
|
||||||
|
),
|
||||||
|
]
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
# Generated by Django 3.1.3 on 2021-02-04 22:59
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('generic', '0001_initial'),
|
||||||
|
('longs', '0003_long_condition'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='long',
|
||||||
|
name='site',
|
||||||
|
field=models.ManyToManyField(blank=True, default=1, help_text='If we know the source of the image', to='generic.Site'),
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='longcreationdefault',
|
||||||
|
name='site',
|
||||||
|
field=models.ManyToManyField(blank=True, default=1, help_text='Default site to use when creating a new long', to='generic.Site'),
|
||||||
|
),
|
||||||
|
]
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
# Generated by Django 3.1.3 on 2021-02-05 09:55
|
||||||
|
|
||||||
|
from django.db import migrations
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('longs', '0004_auto_20210204_2259'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.RenameField(
|
||||||
|
model_name='long',
|
||||||
|
old_name='model_further_management',
|
||||||
|
new_name='model_management',
|
||||||
|
),
|
||||||
|
]
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
# Generated by Django 3.1.3 on 2021-02-05 09:58
|
||||||
|
|
||||||
|
from django.db import migrations
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('longs', '0005_auto_20210205_0955'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.RenameField(
|
||||||
|
model_name='ciduseranswer',
|
||||||
|
old_name='answer_further_management',
|
||||||
|
new_name='answer_management',
|
||||||
|
),
|
||||||
|
]
|
||||||
+17
-40
@@ -1,6 +1,5 @@
|
|||||||
from django.db.models.fields.files import ImageField
|
from django.db.models.fields.files import ImageField
|
||||||
from django.db.models.fields.related import ForeignKey
|
from django.db.models.fields.related import ForeignKey
|
||||||
from anatomy.models import Modality
|
|
||||||
from django.db import models
|
from django.db import models
|
||||||
from django.utils import timezone
|
from django.utils import timezone
|
||||||
import tagulous
|
import tagulous
|
||||||
@@ -20,6 +19,10 @@ from sortedm2m.fields import SortedManyToManyField
|
|||||||
|
|
||||||
import string
|
import string
|
||||||
|
|
||||||
|
from anatomy.models import Modality
|
||||||
|
|
||||||
|
from generic.models import Examination, Site, Condition, Sign
|
||||||
|
|
||||||
image_storage = FileSystemStorage(
|
image_storage = FileSystemStorage(
|
||||||
# Physical file location ROOT
|
# Physical file location ROOT
|
||||||
location=u"{0}/longs/".format(settings.MEDIA_ROOT),
|
location=u"{0}/longs/".format(settings.MEDIA_ROOT),
|
||||||
@@ -32,31 +35,6 @@ def image_directory_path(instance, filename):
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class Examination(models.Model):
|
|
||||||
examination = models.CharField(max_length=200)
|
|
||||||
|
|
||||||
def __str__(self):
|
|
||||||
return self.examination
|
|
||||||
|
|
||||||
class Meta:
|
|
||||||
ordering = ('examination', )
|
|
||||||
|
|
||||||
|
|
||||||
class Site(models.Model):
|
|
||||||
site = models.CharField(max_length=200)
|
|
||||||
initials = models.CharField(max_length=200)
|
|
||||||
|
|
||||||
def __str__(self):
|
|
||||||
return self.site
|
|
||||||
|
|
||||||
|
|
||||||
class Condition(tagulous.models.TagModel):
|
|
||||||
pass
|
|
||||||
|
|
||||||
class Sign(tagulous.models.TagModel):
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
class Long(models.Model):
|
class Long(models.Model):
|
||||||
#author = models.ForeignKey('auth.User', on_delete=models.CASCADE)
|
#author = models.ForeignKey('auth.User', on_delete=models.CASCADE)
|
||||||
#image = models.ImageField()
|
#image = models.ImageField()
|
||||||
@@ -64,23 +42,23 @@ class Long(models.Model):
|
|||||||
|
|
||||||
feedback = models.TextField(null=True, blank=True)
|
feedback = models.TextField(null=True, blank=True)
|
||||||
|
|
||||||
#condition = tagulous.models.TagField(
|
condition = tagulous.models.TagField(
|
||||||
# to=Condition,
|
to=Condition,
|
||||||
# blank=True,
|
blank=True,
|
||||||
# help_text=
|
help_text=
|
||||||
# "Associated condition. Will allow searching / filtering and tips / hints to be displayed. Conditions with spaces must be enclosed in quotes \"...\""
|
"Associated condition. Will allow searching / filtering and tips / hints to be displayed. Conditions with spaces must be enclosed in quotes \"...\""
|
||||||
#)
|
)
|
||||||
|
|
||||||
sign = models.CharField(max_length=255, blank=True)
|
#sign = models.CharField(max_length=255, blank=True)
|
||||||
#sign = tagulous.models.TagField(
|
sign = tagulous.models.TagField(
|
||||||
# to=Sign, blank=True, help_text='Radiological signs in the question')
|
to=Sign, blank=True, help_text='Radiological signs in the question')
|
||||||
|
|
||||||
# Model answers
|
# Model answers
|
||||||
model_observations = models.TextField(null=True, blank=True)
|
model_observations = models.TextField(null=True, blank=True)
|
||||||
model_interpretation = models.TextField(null=True, blank=True)
|
model_interpretation = models.TextField(null=True, blank=True)
|
||||||
model_principle_diagnosis = models.TextField(null=True, blank=True)
|
model_principle_diagnosis = models.TextField(null=True, blank=True)
|
||||||
model_differential_diagnosis = models.TextField(null=True, blank=True)
|
model_differential_diagnosis = models.TextField(null=True, blank=True)
|
||||||
model_further_management = models.TextField(null=True, blank=True)
|
model_management = models.TextField(null=True, blank=True)
|
||||||
|
|
||||||
|
|
||||||
DEFAULT_SITE_ID = 1
|
DEFAULT_SITE_ID = 1
|
||||||
@@ -147,8 +125,8 @@ class LongSeriesImage(models.Model):
|
|||||||
|
|
||||||
class LongSeries(models.Model):
|
class LongSeries(models.Model):
|
||||||
modality = models.ForeignKey(Modality, related_name="series_modality", on_delete=models.SET_NULL, null=True)
|
modality = models.ForeignKey(Modality, related_name="series_modality", on_delete=models.SET_NULL, null=True)
|
||||||
examination = models.ForeignKey(
|
#examination = models.ForeignKey(
|
||||||
Examination, help_text="Name of the examination", on_delete=models.SET_NULL, null=True)
|
# Examination, help_text="Name of the examination", related_name="series_examination", on_delete=models.SET_NULL, null=True)
|
||||||
long = models.ForeignKey("Long", related_name="series", on_delete=models.SET_NULL, null=True)
|
long = models.ForeignKey("Long", related_name="series", on_delete=models.SET_NULL, null=True)
|
||||||
description = models.TextField(blank=True, help_text="Description of stack, for admin organisation")
|
description = models.TextField(blank=True, help_text="Description of stack, for admin organisation")
|
||||||
|
|
||||||
@@ -263,8 +241,7 @@ class CidUserAnswer(models.Model):
|
|||||||
answer_interpretation = models.TextField(null=True, blank=True)
|
answer_interpretation = models.TextField(null=True, blank=True)
|
||||||
answer_principle_diagnosis = models.TextField(null=True, blank=True)
|
answer_principle_diagnosis = models.TextField(null=True, blank=True)
|
||||||
answer_differential_diagnosis = models.TextField(null=True, blank=True)
|
answer_differential_diagnosis = models.TextField(null=True, blank=True)
|
||||||
answer_further_management = models.TextField(null=True, blank=True)
|
answer_management = models.TextField(null=True, blank=True)
|
||||||
|
|
||||||
|
|
||||||
cid = models.BigIntegerField(blank=True, null=True, help_text="Candidate ID (limitied by BigIntegerField size)")
|
cid = models.BigIntegerField(blank=True, null=True, help_text="Candidate ID (limitied by BigIntegerField size)")
|
||||||
|
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ ALLOWED_HOSTS = ["localhost", "127.0.0.1", "161.35.163.87", "penracourses.org.uk
|
|||||||
# Application definition
|
# Application definition
|
||||||
|
|
||||||
INSTALLED_APPS = [
|
INSTALLED_APPS = [
|
||||||
|
'generic',
|
||||||
'anatomy',
|
'anatomy',
|
||||||
'physics',
|
'physics',
|
||||||
'rapids',
|
'rapids',
|
||||||
|
|||||||
Reference in New Issue
Block a user