# Path: followup/models.py
# class ContactResult(models.Model):
#     '''Abstract base model for representing the resolution to a followup
#     attempt with a patient (e.g. no answer w/ voicemail).'''
# 
#     name = models.CharField(max_length=100, primary_key=True)
#     attempt_again = models.BooleanField(
#         default=False,
#         help_text="True if outcome means the pt should be contacted again.")
#     patient_reached = models.BooleanField(
#         default=True,
#         help_text="True if outcome means they reached the patient")
# 
#     def __str__(self):
#         return self.name
# 
# class NoAptReason(models.Model):
#     '''Simple text-contiaining class for storing the different kinds of
#     clinics a patient can be referred to (e.g. PCP, ortho, etc.)'''
# 
#     name = models.CharField(max_length=100, primary_key=True)
# 
#     def __str__(self):
#         return self.name
# 
# class NoShowReason(models.Model):
#     '''Simple text-contiaining class for storing the different reasons a
#     patient might not have gone to a scheduled appointment.'''
# 
#     name = models.CharField(max_length=100, primary_key=True)
# 
#     def __str__(self):
#         return self.name


from builtins import map
from django.db import models
from django.core.urlresolvers import reverse
from pttrack.models import (ReferralType, ReferralLocation, Note,
                            ContactMethod, CompletableMixin,)
from followup.models import ContactResult, NoAptReason, NoShowReason
        return reverse(self.MARK_DONE_URL_NAME,
                       args=(self.referral.patient.id,
                             self.referral.id,
                             self.id))

    def admin_url(self):
        return reverse(
            'admin:referral_followuprequest_change',
            args=(self.id,)
        )

    def __str__(self):
        formatted_date = self.due_date.strftime("%D")
        return 'Followup with %s on %s about %s' % (self.patient,
                                                    formatted_date,
                                                    self.referral)


class PatientContact(Note):

    followup_request = models.ForeignKey(FollowupRequest)
    referral = models.ForeignKey(Referral)

    contact_method = models.ForeignKey(
        ContactMethod,
        null=False,
        blank=False,
        help_text="What was the method of contact?")

    contact_status = models.ForeignKey(

# Path: followup/models.py
# class ContactResult(models.Model):
#     '''Abstract base model for representing the resolution to a followup
#     attempt with a patient (e.g. no answer w/ voicemail).'''
# 
#     name = models.CharField(max_length=100, primary_key=True)
#     attempt_again = models.BooleanField(
#         default=False,
#         help_text="True if outcome means the pt should be contacted again.")
#     patient_reached = models.BooleanField(
#         default=True,
#         help_text="True if outcome means they reached the patient")
# 
#     def __str__(self):
#         return self.name
# 
# class NoAptReason(models.Model):
#     '''Simple text-contiaining class for storing the different kinds of
#     clinics a patient can be referred to (e.g. PCP, ortho, etc.)'''
# 
#     name = models.CharField(max_length=100, primary_key=True)
# 
#     def __str__(self):
#         return self.name
# 
# class NoShowReason(models.Model):
#     '''Simple text-contiaining class for storing the different reasons a
#     patient might not have gone to a scheduled appointment.'''
# 
#     name = models.CharField(max_length=100, primary_key=True)
# 
#     def __str__(self):
#         return self.name


# Path: referral/models.py
from builtins import map
from django.db import models
from django.core.urlresolvers import reverse
from pttrack.models import (ReferralType, ReferralLocation, Note,
                            ContactMethod, CompletableMixin,)
from followup.models import ContactResult, NoAptReason, NoShowReason

        return reverse(self.MARK_DONE_URL_NAME,
                       args=(self.referral.patient.id,
                             self.referral.id,
                             self.id))

    def admin_url(self):
        return reverse(
            'admin:referral_followuprequest_change',
            args=(self.id,)
        )

    def __str__(self):
        formatted_date = self.due_date.strftime("%D")
        return 'Followup with %s on %s about %s' % (self.patient,
                                                    formatted_date,
                                                    self.referral)


class PatientContact(Note):

    followup_request = models.ForeignKey(FollowupRequest)
    referral = models.ForeignKey(Referral)

    contact_method = models.ForeignKey(
        ContactMethod,
        null=False,
        blank=False,
        help_text="What was the method of contact?")

    contact_status = models.ForeignKey(

        ContactResult,