.
This commit is contained in:
+4
-2
@@ -1,7 +1,7 @@
|
|||||||
from django.contrib import admin
|
from django.contrib import admin
|
||||||
from .models import (
|
from .models import (
|
||||||
AnatomyQuestion,
|
AnatomyQuestion,
|
||||||
Examination,
|
#Examination,
|
||||||
QuestionType,
|
QuestionType,
|
||||||
Answer,
|
Answer,
|
||||||
CidUserAnswer,
|
CidUserAnswer,
|
||||||
@@ -12,6 +12,8 @@ from .models import (
|
|||||||
Structure,
|
Structure,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
from generic.models import Examination
|
||||||
|
|
||||||
from reversion.admin import VersionAdmin
|
from reversion.admin import VersionAdmin
|
||||||
|
|
||||||
# Register your models here.
|
# Register your models here.
|
||||||
@@ -47,7 +49,7 @@ class AnatomyAdmin(VersionAdmin):
|
|||||||
|
|
||||||
|
|
||||||
admin.site.register(AnatomyQuestion, AnatomyAdmin)
|
admin.site.register(AnatomyQuestion, AnatomyAdmin)
|
||||||
admin.site.register(Examination)
|
#admin.site.register(Examination)
|
||||||
admin.site.register(QuestionType)
|
admin.site.register(QuestionType)
|
||||||
admin.site.register(CidUserAnswer)
|
admin.site.register(CidUserAnswer)
|
||||||
admin.site.register(Exam)
|
admin.site.register(Exam)
|
||||||
|
|||||||
+3
-1
@@ -6,5 +6,7 @@ from .models import AnatomyQuestion
|
|||||||
class AnatomyQuestionFilter(django_filters.FilterSet):
|
class AnatomyQuestionFilter(django_filters.FilterSet):
|
||||||
class Meta:
|
class Meta:
|
||||||
model = AnatomyQuestion
|
model = AnatomyQuestion
|
||||||
fields = ("question_type", "exams", "examination", "modality", "region",
|
fields = ("question_type", "exams",
|
||||||
|
"examination",
|
||||||
|
"modality", "region",
|
||||||
"body_part", "created_date", "open_access", "author")
|
"body_part", "created_date", "open_access", "author")
|
||||||
|
|||||||
+2
-1
@@ -12,7 +12,7 @@ from .models import (
|
|||||||
Answer,
|
Answer,
|
||||||
CidUserAnswer,
|
CidUserAnswer,
|
||||||
AnatomyQuestion,
|
AnatomyQuestion,
|
||||||
Examination,
|
#Examination,
|
||||||
BodyPart,
|
BodyPart,
|
||||||
Structure,
|
Structure,
|
||||||
Region,
|
Region,
|
||||||
@@ -20,6 +20,7 @@ from .models import (
|
|||||||
QuestionType,
|
QuestionType,
|
||||||
Exam,
|
Exam,
|
||||||
)
|
)
|
||||||
|
from generic.models import Examination
|
||||||
|
|
||||||
from django.contrib.admin.widgets import FilteredSelectMultiple
|
from django.contrib.admin.widgets import FilteredSelectMultiple
|
||||||
from django.forms.widgets import RadioSelect, TextInput, Textarea
|
from django.forms.widgets import RadioSelect, TextInput, Textarea
|
||||||
|
|||||||
@@ -0,0 +1,23 @@
|
|||||||
|
# Generated by Django 3.1.3 on 2021-02-05 11:06
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
import django.db.models.deletion
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('generic', '0007_site'),
|
||||||
|
('anatomy', '0024_auto_20210130_1515'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='anatomyquestion',
|
||||||
|
name='examination',
|
||||||
|
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='generic.examination'),
|
||||||
|
),
|
||||||
|
migrations.DeleteModel(
|
||||||
|
name='Examination',
|
||||||
|
),
|
||||||
|
]
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
# Generated by Django 3.1.3 on 2021-02-05 11:09
|
||||||
|
|
||||||
|
from django.db import migrations
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('anatomy', '0025_auto_20210205_1106'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.RemoveField(
|
||||||
|
model_name='anatomyquestion',
|
||||||
|
name='examination',
|
||||||
|
),
|
||||||
|
]
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
# Generated by Django 3.1.3 on 2021-02-05 11:10
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
import django.db.models.deletion
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('generic', '0007_site'),
|
||||||
|
('anatomy', '0026_remove_anatomyquestion_examination'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='anatomyquestion',
|
||||||
|
name='examination',
|
||||||
|
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='generic.examination'),
|
||||||
|
),
|
||||||
|
]
|
||||||
+2
-7
@@ -13,6 +13,8 @@ from sortedm2m.fields import SortedManyToManyField
|
|||||||
|
|
||||||
import string
|
import string
|
||||||
|
|
||||||
|
from generic.models import Examination
|
||||||
|
|
||||||
image_storage = FileSystemStorage(
|
image_storage = FileSystemStorage(
|
||||||
# Physical file location ROOT
|
# Physical file location ROOT
|
||||||
location=u"{0}/anatomy/".format(settings.MEDIA_ROOT),
|
location=u"{0}/anatomy/".format(settings.MEDIA_ROOT),
|
||||||
@@ -26,13 +28,6 @@ def image_directory_path(instance, filename):
|
|||||||
return u"picture/{0}".format(filename)
|
return u"picture/{0}".format(filename)
|
||||||
|
|
||||||
|
|
||||||
class Examination(models.Model):
|
|
||||||
examination = models.CharField(max_length=200)
|
|
||||||
|
|
||||||
def __str__(self):
|
|
||||||
return self.examination
|
|
||||||
|
|
||||||
|
|
||||||
class BodyPart(models.Model):
|
class BodyPart(models.Model):
|
||||||
bodypart = models.CharField(max_length=200)
|
bodypart = models.CharField(max_length=200)
|
||||||
|
|
||||||
|
|||||||
+2
-1
@@ -36,13 +36,14 @@ from .models import (
|
|||||||
AnatomyQuestion,
|
AnatomyQuestion,
|
||||||
BodyPart,
|
BodyPart,
|
||||||
CidUserAnswer,
|
CidUserAnswer,
|
||||||
Examination,
|
#Examination,
|
||||||
Structure,
|
Structure,
|
||||||
Exam,
|
Exam,
|
||||||
Answer,
|
Answer,
|
||||||
# HalfMarkAnswers,
|
# HalfMarkAnswers,
|
||||||
# IncorrectAnswers,
|
# IncorrectAnswers,
|
||||||
)
|
)
|
||||||
|
from generic.models import Examination
|
||||||
|
|
||||||
from .tables import AnatomyQuestionTable
|
from .tables import AnatomyQuestionTable
|
||||||
from .filters import AnatomyQuestionFilter
|
from .filters import AnatomyQuestionFilter
|
||||||
|
|||||||
@@ -50,7 +50,6 @@ class Long(models.Model):
|
|||||||
"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 = 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')
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,19 @@
|
|||||||
|
# Generated by Django 3.1.3 on 2021-02-05 10:51
|
||||||
|
|
||||||
|
from django.db import migrations
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('rapids', '0009_auto_20210205_1046'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.DeleteModel(
|
||||||
|
name='Condition',
|
||||||
|
),
|
||||||
|
migrations.DeleteModel(
|
||||||
|
name='Sign',
|
||||||
|
),
|
||||||
|
]
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
# Generated by Django 3.1.3 on 2021-02-05 10:56
|
||||||
|
|
||||||
|
from django.db import migrations
|
||||||
|
import tagulous.models.fields
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('generic', '0007_site'),
|
||||||
|
('rapids', '0010_auto_20210205_1051'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.RemoveField(
|
||||||
|
model_name='rapid',
|
||||||
|
name='condition',
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='rapid',
|
||||||
|
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'),
|
||||||
|
),
|
||||||
|
migrations.RemoveField(
|
||||||
|
model_name='rapid',
|
||||||
|
name='sign',
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='rapid',
|
||||||
|
name='sign',
|
||||||
|
field=tagulous.models.fields.TagField(_set_tag_meta=True, blank=True, help_text='Radiological signs in the question', to='generic.Sign'),
|
||||||
|
),
|
||||||
|
]
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
# Generated by Django 3.1.3 on 2021-02-05 10:42
|
|
||||||
|
|
||||||
from django.db import migrations
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
('rapids', '0012_auto_20210205_1040'),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
#migrations.RemoveField(
|
|
||||||
# model_name='rapid',
|
|
||||||
# name='site',
|
|
||||||
#),
|
|
||||||
#migrations.RemoveField(
|
|
||||||
# model_name='rapidcreationdefault',
|
|
||||||
# name='site',
|
|
||||||
#),
|
|
||||||
]
|
|
||||||
+9
-18
@@ -18,7 +18,7 @@ from sortedm2m.fields import SortedManyToManyField
|
|||||||
import string
|
import string
|
||||||
|
|
||||||
|
|
||||||
from generic.models import Examination, Site, Condition, Sign
|
from generic.models import Site, Condition, Sign
|
||||||
|
|
||||||
image_storage = FileSystemStorage(
|
image_storage = FileSystemStorage(
|
||||||
# Physical file location ROOT
|
# Physical file location ROOT
|
||||||
@@ -68,12 +68,6 @@ class Examination(models.Model):
|
|||||||
class Meta:
|
class Meta:
|
||||||
ordering = ('examination', )
|
ordering = ('examination', )
|
||||||
|
|
||||||
class Condition(tagulous.models.TagModel):
|
|
||||||
pass
|
|
||||||
|
|
||||||
class Sign(tagulous.models.TagModel):
|
|
||||||
pass
|
|
||||||
|
|
||||||
class Answer(models.Model):
|
class Answer(models.Model):
|
||||||
question = models.ForeignKey(
|
question = models.ForeignKey(
|
||||||
"Rapid", related_name="answers", on_delete=models.CASCADE
|
"Rapid", related_name="answers", on_delete=models.CASCADE
|
||||||
@@ -144,17 +138,14 @@ class Rapid(models.Model):
|
|||||||
choices=LATERALITY_CHOICES,
|
choices=LATERALITY_CHOICES,
|
||||||
default=NONE,
|
default=NONE,
|
||||||
help_text="Applies to the answer, not the examination")
|
help_text="Applies to the answer, not the examination")
|
||||||
condition = models.CharField(max_length=255, 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 = tagulous.models.TagField(
|
||||||
|
to=Sign, blank=True, help_text='Radiological signs in the question')
|
||||||
sign = models.CharField(max_length=255, blank=True)
|
|
||||||
#sign = tagulous.models.TagField(
|
|
||||||
# to=Sign, blank=True, help_text='Radiological signs in the question')
|
|
||||||
|
|
||||||
DEFAULT_SITE_ID = 1
|
DEFAULT_SITE_ID = 1
|
||||||
#site = models.ManyToManyField(
|
#site = models.ManyToManyField(
|
||||||
|
|||||||
Reference in New Issue
Block a user