# Path: followup/models.py
# class NoShowReason(models.Model):
# class NoAptReason(models.Model):
# class ContactResult(models.Model):
# class Followup(Note):
#     class Meta(object):
# class GeneralFollowup(Followup):
# class VaccineFollowup(Followup):
# class LabFollowup(Followup):
# class ReferralFollowup(Followup):
#     def __str__(self):
#     def __str__(self):
#     def __str__(self):
#     def type(self):
#     def short_text(self):
#     def attribution(self):
#     def written_date(self):
#     def __str__(self):
#     def type(self):
#     def short_text(self):
#     def type(self):
#     def short_text(self):
#     def type(self):
#     def short_text(self):
#     SUBSQ_DOSE_HELP = "Has the patient committed to coming back for another dose?"
#     DOSE_DATE_HELP = "When does the patient want to get their next dose (if applicable)?"
#     CS_HELP = "Were you able to communicate the results?"
#     REFTYPE_HELP = "What kind of provider was the patient referred to?"
#     APP_HELP = "Where is the appointment?"
#     PTSHOW_OPTS = [("Yes", "Yes"),
#                    ("No", "No"),
#                    ("Not yet", "Not yet")]
#     PTSHOW_HELP = "Did the patient show up to the appointment?"
#     NOAPT_HELP = "If the patient didn't make an appointment, why not?"
#     NOSHOW_HELP = "If the patient didn't go to appointment, why not?"


from builtins import zip
from django.test import TestCase
from itertools import *
from django.core.urlresolvers import reverse
from django.utils.timezone import now
from followup.models import (
    ContactMethod, NoAptReason, NoShowReason, ContactResult)
from pttrack.models import (
    Gender, Patient, Provider, ProviderType, ReferralType, ReferralLocation
)
from . import forms
from . import models
        from pttrack.test_views import log_in_provider, build_provider
        from pttrack.test_views import log_in_provider, build_provider
        from pttrack.test_views import log_in_provider, build_provider
        from pttrack.test_views import log_in_provider, build_provider
        from pttrack.test_views import log_in_provider, build_provider
import datetime
        # If contact was unsuccessful, all these fields should be blank
        form_data['has_appointment'] = models.PatientContact.PTSHOW_YES
        form = forms.PatientContactForm(data=form_data)
        self.assertEqual(len(form.errors), 1)

        form_data['pt_showed'] = models.PatientContact.PTSHOW_YES
        form = forms.PatientContactForm(data=form_data)
        self.assertEqual(len(form.errors), 2)

        form_data['appointment_location'] = [ReferralLocation.objects.first().pk]
        form = forms.PatientContactForm(data=form_data)
        self.assertEqual(len(form.errors), 3)

        form_data['no_apt_reason'] = self.noapt_reason
        form = forms.PatientContactForm(data=form_data)
        self.assertEqual(len(form.errors), 4)

        form_data['no_show_reason'] = self.noshow_reason
        form = forms.PatientContactForm(data=form_data)
        self.assertEqual(len(form.errors), 5)

class TestSelectReferralType(TestCase):
    """Tests the select referral type page
    """

    fixtures = ['pttrack']

    def setUp(self):
        log_in_provider(self.client, build_provider())


# Path: followup/models.py
# class NoShowReason(models.Model):
# class NoAptReason(models.Model):
# class ContactResult(models.Model):
# class Followup(Note):
#     class Meta(object):
# class GeneralFollowup(Followup):
# class VaccineFollowup(Followup):
# class LabFollowup(Followup):
# class ReferralFollowup(Followup):
#     def __str__(self):
#     def __str__(self):
#     def __str__(self):
#     def type(self):
#     def short_text(self):
#     def attribution(self):
#     def written_date(self):
#     def __str__(self):
#     def type(self):
#     def short_text(self):
#     def type(self):
#     def short_text(self):
#     def type(self):
#     def short_text(self):
#     SUBSQ_DOSE_HELP = "Has the patient committed to coming back for another dose?"
#     DOSE_DATE_HELP = "When does the patient want to get their next dose (if applicable)?"
#     CS_HELP = "Were you able to communicate the results?"
#     REFTYPE_HELP = "What kind of provider was the patient referred to?"
#     APP_HELP = "Where is the appointment?"
#     PTSHOW_OPTS = [("Yes", "Yes"),
#                    ("No", "No"),
#                    ("Not yet", "Not yet")]
#     PTSHOW_HELP = "Did the patient show up to the appointment?"
#     NOAPT_HELP = "If the patient didn't make an appointment, why not?"
#     NOSHOW_HELP = "If the patient didn't go to appointment, why not?"


# Path: referral/tests.py
from builtins import zip
from django.test import TestCase
from itertools import *
from django.core.urlresolvers import reverse
from django.utils.timezone import now
from followup.models import (
    ContactMethod, NoAptReason, NoShowReason, ContactResult)
from pttrack.models import (
    Gender, Patient, Provider, ProviderType, ReferralType, ReferralLocation
)
from . import forms
from . import models
        from pttrack.test_views import log_in_provider, build_provider
        from pttrack.test_views import log_in_provider, build_provider
        from pttrack.test_views import log_in_provider, build_provider
        from pttrack.test_views import log_in_provider, build_provider
        from pttrack.test_views import log_in_provider, build_provider
import datetime

        # If contact was unsuccessful, all these fields should be blank
        form_data['has_appointment'] = models.PatientContact.PTSHOW_YES
        form = forms.PatientContactForm(data=form_data)
        self.assertEqual(len(form.errors), 1)

        form_data['pt_showed'] = models.PatientContact.PTSHOW_YES
        form = forms.PatientContactForm(data=form_data)
        self.assertEqual(len(form.errors), 2)

        form_data['appointment_location'] = [ReferralLocation.objects.first().pk]
        form = forms.PatientContactForm(data=form_data)
        self.assertEqual(len(form.errors), 3)

        form_data['no_apt_reason'] = self.noapt_reason
        form = forms.PatientContactForm(data=form_data)
        self.assertEqual(len(form.errors), 4)

        form_data['no_show_reason'] = self.noshow_reason
        form = forms.PatientContactForm(data=form_data)
        self.assertEqual(len(form.errors), 5)

class TestSelectReferralType(TestCase):
    """Tests the select referral type page
    """

    fixtures = ['pttrack']

    def setUp(self):
        log_in_provider(self.client, build_provider())


        self.contact_method = ContactMethod.objects.create(