# Path: pttrack/urls.py
# def wrap_url(url, no_wrap=[], login_only=[], provider_only=[],
#              updated_provider_only=[]):
#     '''
#     Wrap URL in decorators as appropriate.
#     '''
#     if url.name in no_wrap:
#         # do not wrap at all, fully public
#         pass
# 
#     elif url.name in login_only:
#         url.callback = login_required(url.callback)
# 
#     elif url.name in provider_only:
#         url.callback = provider_required(url.callback)
#         url.callback = login_required(url.callback)
# 
#     elif url.name in updated_provider_only:
#         url.callback = provider_update_required(url.callback)
#         url.callback = provider_required(url.callback)
#         url.callback = login_required(url.callback)
# 
#     else:  # wrap in everything
#         url.callback = clintype_required(url.callback)
#         url.callback = provider_update_required(url.callback)
#         url.callback = provider_required(url.callback)
#         url.callback = login_required(url.callback)
# 
#     return url


from django.conf.urls import url
from pttrack.urls import wrap_url
from . import views
from __future__ import unicode_literals


unwrapped_urlconf = [  # pylint: disable=invalid-name
    url(r'^(?P<pt_id>[0-9]+)/referral/$',
        views.ReferralFollowupCreate.as_view(),
        name='new-referral-followup'),
    url(r'^(?P<pt_id>[0-9]+)/(?P<ftype>[\w]+)/$',
        views.FollowupCreate.as_view(),
        name='new-followup'),
    url(r'^(?P<pt_id>[0-9]+)/$',
        views.followup_choice,
        name='followup-choice'),
    url(r'^referral/(?P<pk>[0-9]+)/$',
        views.ReferralFollowupUpdate.as_view(),
        {"model": "Referral"},
        name="followup"),  # parameter 'model' to identify from others w/ name
    url(r'^lab/(?P<pk>[0-9]+)/$',
        views.LabFollowupUpdate.as_view(),
        {"model": "Lab"},
        name="followup"),
    url(r'^vaccine/(?P<pk>[0-9]+)/$',
        views.VaccineFollowupUpdate.as_view(),
        {"model": "Vaccine"},

# Path: pttrack/urls.py
# def wrap_url(url, no_wrap=[], login_only=[], provider_only=[],
#              updated_provider_only=[]):
#     '''
#     Wrap URL in decorators as appropriate.
#     '''
#     if url.name in no_wrap:
#         # do not wrap at all, fully public
#         pass
# 
#     elif url.name in login_only:
#         url.callback = login_required(url.callback)
# 
#     elif url.name in provider_only:
#         url.callback = provider_required(url.callback)
#         url.callback = login_required(url.callback)
# 
#     elif url.name in updated_provider_only:
#         url.callback = provider_update_required(url.callback)
#         url.callback = provider_required(url.callback)
#         url.callback = login_required(url.callback)
# 
#     else:  # wrap in everything
#         url.callback = clintype_required(url.callback)
#         url.callback = provider_update_required(url.callback)
#         url.callback = provider_required(url.callback)
#         url.callback = login_required(url.callback)
# 
#     return url


# Path: followup/urls.py
from django.conf.urls import url
from pttrack.urls import wrap_url
from . import views

from __future__ import unicode_literals


unwrapped_urlconf = [  # pylint: disable=invalid-name
    url(r'^(?P<pt_id>[0-9]+)/referral/$',
        views.ReferralFollowupCreate.as_view(),
        name='new-referral-followup'),
    url(r'^(?P<pt_id>[0-9]+)/(?P<ftype>[\w]+)/$',
        views.FollowupCreate.as_view(),
        name='new-followup'),
    url(r'^(?P<pt_id>[0-9]+)/$',
        views.followup_choice,
        name='followup-choice'),
    url(r'^referral/(?P<pk>[0-9]+)/$',
        views.ReferralFollowupUpdate.as_view(),
        {"model": "Referral"},
        name="followup"),  # parameter 'model' to identify from others w/ name
    url(r'^lab/(?P<pk>[0-9]+)/$',
        views.LabFollowupUpdate.as_view(),
        {"model": "Lab"},
        name="followup"),
    url(r'^vaccine/(?P<pk>[0-9]+)/$',
        views.VaccineFollowupUpdate.as_view(),
        {"model": "Vaccine"},

        name="followup"),