# 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
    PTSHOW_OPTS = [(PTSHOW_YES, "Yes"),
                   (PTSHOW_NO, "No")]

    has_appointment = models.CharField(
        choices=PTSHOW_OPTS,
        blank=True, max_length=1,
        verbose_name="Appointment scheduled?",
        help_text="Did the patient make an appointment?")

    no_apt_reason = models.ForeignKey(
        NoAptReason,
        blank=True,
        null=True,
        verbose_name="No appointment reason",
        help_text="If the patient didn't make an appointment, why not?")

    appointment_location = models.ManyToManyField(
        ReferralLocation,
        blank=True,
        help_text="Where did the patient make an appointment?")

    pt_showed = models.CharField(
        max_length=1,
        choices=PTSHOW_OPTS,
        blank=True,
        null=True,
        verbose_name="Appointment attended?",
        help_text="Did the patient show up to the appointment?")

    no_show_reason = 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

    PTSHOW_OPTS = [(PTSHOW_YES, "Yes"),
                   (PTSHOW_NO, "No")]

    has_appointment = models.CharField(
        choices=PTSHOW_OPTS,
        blank=True, max_length=1,
        verbose_name="Appointment scheduled?",
        help_text="Did the patient make an appointment?")

    no_apt_reason = models.ForeignKey(
        NoAptReason,
        blank=True,
        null=True,
        verbose_name="No appointment reason",
        help_text="If the patient didn't make an appointment, why not?")

    appointment_location = models.ManyToManyField(
        ReferralLocation,
        blank=True,
        help_text="Where did the patient make an appointment?")

    pt_showed = models.CharField(
        max_length=1,
        choices=PTSHOW_OPTS,
        blank=True,
        null=True,
        verbose_name="Appointment attended?",
        help_text="Did the patient show up to the appointment?")

    no_show_reason = models.ForeignKey(

        NoShowReason,