.
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
# Generated by Django 3.2.8 on 2021-11-30 20:50
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('atlas', '0011_auto_20211130_1807'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RenameField(
|
||||
model_name='condition',
|
||||
old_name='primary_name',
|
||||
new_name='primary',
|
||||
),
|
||||
migrations.RenameField(
|
||||
model_name='finding',
|
||||
old_name='primary_name',
|
||||
new_name='primary',
|
||||
),
|
||||
migrations.RenameField(
|
||||
model_name='structure',
|
||||
old_name='primary_name',
|
||||
new_name='primary',
|
||||
),
|
||||
]
|
||||
+4
-5
@@ -79,7 +79,7 @@ class SynMixin(object):
|
||||
# abstract = True
|
||||
|
||||
def __str__(self) -> str:
|
||||
if self.primary_name:
|
||||
if self.primary:
|
||||
if self.synonym.count() == 0:
|
||||
return self.name
|
||||
else:
|
||||
@@ -93,7 +93,7 @@ class Finding(SynMixin, models.Model):
|
||||
name = models.CharField(max_length=255, unique=True)
|
||||
synonym = models.ManyToManyField("self", blank=True)
|
||||
|
||||
primary_name = models.BooleanField(default="True")
|
||||
primary = models.BooleanField(default="True")
|
||||
|
||||
|
||||
class Condition(SynMixin, models.Model):
|
||||
@@ -101,7 +101,7 @@ class Condition(SynMixin, models.Model):
|
||||
|
||||
synonym = models.ManyToManyField("self", blank=True)
|
||||
|
||||
primary_name = models.BooleanField(default="True")
|
||||
primary = models.BooleanField(default="True")
|
||||
|
||||
subspecialty = models.ManyToManyField("subspecialty", blank=True)
|
||||
|
||||
@@ -126,8 +126,7 @@ class Structure(SynMixin, models.Model):
|
||||
|
||||
synonym = models.ManyToManyField("self", blank=True)
|
||||
|
||||
primary_name = models.BooleanField(default="True")
|
||||
|
||||
primary = models.BooleanField(default="True")
|
||||
|
||||
|
||||
@reversion.register
|
||||
|
||||
@@ -38,10 +38,18 @@
|
||||
<summary><b>Findings</b></summary>
|
||||
<pre>{{ case.findings | safe}}</pre>
|
||||
</details>
|
||||
<details>
|
||||
<summary><b>Differentials</b></summary>
|
||||
{% for diff in case.differential.all %}
|
||||
<ul>
|
||||
<li>{{diff.condition}} - {{diff.text}}</li>
|
||||
</ul>
|
||||
{% endfor %}
|
||||
</details>
|
||||
</p>
|
||||
</div>
|
||||
</p>
|
||||
<div>
|
||||
</p>
|
||||
<div>
|
||||
{% include 'question_notes.html' %}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
+2
-2
@@ -586,9 +586,9 @@ class ConditionAutocomplete(autocomplete.Select2QuerySetView):
|
||||
try:
|
||||
primary = qs.filter(name__icontains=self.q)
|
||||
|
||||
# synonyms = qs.filter(name__icontains=self.q, primary_name=False)
|
||||
# synonyms = qs.filter(name__icontains=self.q, primary=False)
|
||||
# for s in synonyms:
|
||||
# primary.extend(s.synonym.filter(primary_name=True))
|
||||
# primary.extend(s.synonym.filter(primary=True))
|
||||
|
||||
except FieldError:
|
||||
return Condition.objects.none()
|
||||
|
||||
Reference in New Issue
Block a user