.
This commit is contained in:
@@ -228,6 +228,7 @@ class CaseForm(ModelForm):
|
|||||||
"subspecialty",
|
"subspecialty",
|
||||||
"description",
|
"description",
|
||||||
"history",
|
"history",
|
||||||
|
"presentation",
|
||||||
"condition",
|
"condition",
|
||||||
# "differential",
|
# "differential",
|
||||||
# "sign",
|
# "sign",
|
||||||
@@ -245,6 +246,9 @@ class CaseForm(ModelForm):
|
|||||||
"condition": autocomplete.ModelSelect2Multiple(
|
"condition": autocomplete.ModelSelect2Multiple(
|
||||||
url="atlas:condition-autocomplete"
|
url="atlas:condition-autocomplete"
|
||||||
),
|
),
|
||||||
|
"presentation": autocomplete.ModelSelect2Multiple(
|
||||||
|
url="atlas:presentation-autocomplete"
|
||||||
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
def save(self, commit=True):
|
def save(self, commit=True):
|
||||||
|
|||||||
@@ -136,6 +136,8 @@ class Presentation(SynMixin, models.Model):
|
|||||||
subspecialty = models.ManyToManyField("subspecialty", blank=True)
|
subspecialty = models.ManyToManyField("subspecialty", blank=True)
|
||||||
|
|
||||||
def __str__(self) -> str:
|
def __str__(self) -> str:
|
||||||
|
if self.subspecialty:
|
||||||
|
return f"{self.name} ({', '.join([i for i in self.subspecialty.all()]})"
|
||||||
return self.name
|
return self.name
|
||||||
|
|
||||||
def get_absolute_url(self):
|
def get_absolute_url(self):
|
||||||
@@ -211,6 +213,8 @@ class Case(models.Model):
|
|||||||
|
|
||||||
condition = models.ManyToManyField(Condition, blank=True)
|
condition = models.ManyToManyField(Condition, blank=True)
|
||||||
|
|
||||||
|
presentation = models.ManyToManyField(Presentation, blank=True)
|
||||||
|
|
||||||
pathalogical_process = models.ManyToManyField(PathalogicalProcess, blank=True)
|
pathalogical_process = models.ManyToManyField(PathalogicalProcess, blank=True)
|
||||||
|
|
||||||
differential = models.ManyToManyField(
|
differential = models.ManyToManyField(
|
||||||
|
|||||||
Reference in New Issue
Block a user