# Path: pttrack/views.py
# class NoteUpdate(UpdateView):
#     note_type = None
# 
#     def get_context_data(self, **kwargs):
#         '''Inject self.note_type as the note type.'''
# 
#         if self.note_type is None:
#             raise ImproperlyConfigured("NoteUpdate view must have" +
#                                        "'note_type' variable set.")
# 
#         context = super(NoteUpdate, self).get_context_data(**kwargs)
#         context['note_type'] = self.note_type
# 
#         return context
# 
#     # TODO: add shared form_valid code here from all subclasses.
# 
# class NoteFormView(FormView):
#     note_type = None
# 
#     def get_context_data(self, **kwargs):
#         '''Inject self.note_type and patient into the context.'''
# 
#         if self.note_type is None:
#             raise ImproperlyConfigured("NoteCreate view must have" +
#                                        "'note_type' variable set.")
# 
#         context = super(NoteFormView, self).get_context_data(**kwargs)
#         context['note_type'] = self.note_type
# 
#         if 'pt_id' in self.kwargs:
#             context['patient'] = mymodels.Patient.objects. \
#                 get(pk=self.kwargs['pt_id'])
# 
#         return context
# 
# def get_current_provider_type(request):
#     '''
#     Given the request, produce the ProviderType of the logged in user. This is
#     done using session data.
#     '''
#     return get_object_or_404(mymodels.ProviderType,
#                              pk=request.session['clintype_pk'])


from django.shortcuts import get_object_or_404, render
from django.core.urlresolvers import reverse
from django.http import HttpResponseRedirect
from pttrack.models import Patient
from pttrack.views import NoteUpdate, NoteFormView, get_current_provider_type
from . import forms
from . import models
from __future__ import unicode_literals




def followup_choice(request, pt_id):
    '''Prompt the user to choose a follow up type.'''
    pt = get_object_or_404(Patient, pk=pt_id)
    return render(request, 'pttrack/followup-choice.html', {'patient': pt})



# Path: pttrack/views.py
# class NoteUpdate(UpdateView):
#     note_type = None
# 
#     def get_context_data(self, **kwargs):
#         '''Inject self.note_type as the note type.'''
# 
#         if self.note_type is None:
#             raise ImproperlyConfigured("NoteUpdate view must have" +
#                                        "'note_type' variable set.")
# 
#         context = super(NoteUpdate, self).get_context_data(**kwargs)
#         context['note_type'] = self.note_type
# 
#         return context
# 
#     # TODO: add shared form_valid code here from all subclasses.
# 
# class NoteFormView(FormView):
#     note_type = None
# 
#     def get_context_data(self, **kwargs):
#         '''Inject self.note_type and patient into the context.'''
# 
#         if self.note_type is None:
#             raise ImproperlyConfigured("NoteCreate view must have" +
#                                        "'note_type' variable set.")
# 
#         context = super(NoteFormView, self).get_context_data(**kwargs)
#         context['note_type'] = self.note_type
# 
#         if 'pt_id' in self.kwargs:
#             context['patient'] = mymodels.Patient.objects. \
#                 get(pk=self.kwargs['pt_id'])
# 
#         return context
# 
# def get_current_provider_type(request):
#     '''
#     Given the request, produce the ProviderType of the logged in user. This is
#     done using session data.
#     '''
#     return get_object_or_404(mymodels.ProviderType,
#                              pk=request.session['clintype_pk'])


# Path: followup/views.py
from django.shortcuts import get_object_or_404, render
from django.core.urlresolvers import reverse
from django.http import HttpResponseRedirect
from pttrack.models import Patient
from pttrack.views import NoteUpdate, NoteFormView, get_current_provider_type
from . import forms
from . import models

from __future__ import unicode_literals




def followup_choice(request, pt_id):
    '''Prompt the user to choose a follow up type.'''
    pt = get_object_or_404(Patient, pk=pt_id)
    return render(request, 'pttrack/followup-choice.html', {'patient': pt})



class FollowupUpdate(NoteUpdate):