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