Skip to content
Snippets Groups Projects

Resolve "there should be a way to add an appointment with external person (neither a subject nor control)"

8 files
+ 111
98
Compare changes
  • Side-by-side
  • Inline
Files
8
@@ -47,6 +47,8 @@ class Appointment(models.Model):
visit = models.ForeignKey(Visit,
verbose_name='Visit ID',
editable=False,
null=True,
blank=True,
)
comment = models.TextField(max_length=1024,
verbose_name='Comment',
@@ -103,7 +105,7 @@ class Appointment(models.Model):
return result
def title(self):
if self.visit.subject.screening_number == "---":
if self.visit is None:
return self.comment.replace("\n", ";").replace("\r", ";")
else:
title = self.visit.subject.first_name + " " + self.visit.subject.last_name + " type: "
Loading