from django.conf.urls import patterns, url

from calebasse.cbv import ListView, CreateView, DeleteView, UpdateView

from models import PatientRecord
from views import (patientrecord_home, patient_record, state_form,
        new_patient_record, patientrecord_delete, new_patient_contact,
        new_patient_address, delete_patient_contact, delete_patient_address,
        update_paper_id, update_patient_address, update_patient_contact,
        new_healthcare_treatment,
        update_healthcare_treatment,
        delete_healthcare_treatment,
        new_healthcare_diagnostic,
        update_healthcare_diagnostic,
        delete_healthcare_diagnostic,
        new_healthcare_notification,
        update_healthcare_notification,
        delete_healthcare_notification,
        new_socialisation_duration,
        update_socialisation_duration,
        delete_socialisation_duration,
        update_patient_state,
        delete_patient_state,
        new_mdph_request,
        update_mdph_request,
        delete_mdph_request,
        new_mdph_response,
        update_mdph_response,
        delete_mdph_response,
        generate_rtf_form,
        patientrecord_quotations,
        create_directory)
from forms import EditPatientRecordForm

urlpatterns = patterns('',
        url(r'^$', patientrecord_home),
        url(r'^quotations$', patientrecord_quotations),
        url(r'^new$', new_patient_record),
        url(r'^(?P<pk>\d+)/view$', patient_record),
        url(r'^(?P<pk>\d+)/delete$', patientrecord_delete),
        url(r'^(?P<pk>\d+)/update/paper_id$', update_paper_id),
        url(r'^(?P<patientrecord_id>\d+)/update-state$', state_form),
        url(r'^(?P<patientrecord_id>\d+)/address/new$', new_patient_address),
        url(r'^(?P<patientrecord_id>\d+)/address/(?P<pk>\d+)/update$', update_patient_address),
        url(r'^(?P<patientrecord_id>\d+)/address/(?P<pk>\d+)/del$', delete_patient_address),
        url(r'^(?P<patientrecord_id>\d+)/contact/new$', new_patient_contact),
        url(r'^(?P<patientrecord_id>\d+)/contact/(?P<pk>\d+)/update$', update_patient_contact),
        url(r'^(?P<patientrecord_id>\d+)/contact/(?P<pk>\d+)/del$', delete_patient_contact),
        url(r'^(?P<patientrecord_id>\d+)/healthcare_treatment/new$', new_healthcare_treatment),
        url(r'^(?P<patientrecord_id>\d+)/healthcare_treatment/(?P<pk>\d+)/update$', update_healthcare_treatment),
        url(r'^(?P<patientrecord_id>\d+)/healthcare_treatment/(?P<pk>\d+)/del$', delete_healthcare_treatment),
        url(r'^(?P<patientrecord_id>\d+)/healthcare_diagnostic/new$', new_healthcare_diagnostic),
        url(r'^(?P<patientrecord_id>\d+)/healthcare_diagnostic/(?P<pk>\d+)/update$', update_healthcare_diagnostic),
        url(r'^(?P<patientrecord_id>\d+)/healthcare_diagnostic/(?P<pk>\d+)/del$', delete_healthcare_diagnostic),
        url(r'^(?P<patientrecord_id>\d+)/healthcare_notification/new$', new_healthcare_notification),
        url(r'^(?P<patientrecord_id>\d+)/healthcare_notification/(?P<pk>\d+)/update$', update_healthcare_notification),
        url(r'^(?P<patientrecord_id>\d+)/healthcare_notification/(?P<pk>\d+)/del$', delete_healthcare_notification),
        url(r'^(?P<patientrecord_id>\d+)/socialisation/new$', new_socialisation_duration),
        url(r'^(?P<patientrecord_id>\d+)/socialisation/(?P<pk>\d+)/update$', update_socialisation_duration),
        url(r'^(?P<patientrecord_id>\d+)/socialisation/(?P<pk>\d+)/del$', delete_socialisation_duration),
        url(r'^(?P<patientrecord_id>\d+)/state/(?P<pk>\d+)/update$', update_patient_state),
        url(r'^(?P<patientrecord_id>\d+)/state/(?P<pk>\d+)/del$', delete_patient_state),
        url(r'^(?P<patientrecord_id>\d+)/mdph_request/new$', new_mdph_request),
        url(r'^(?P<patientrecord_id>\d+)/mdph_request/(?P<pk>\d+)/update$', update_mdph_request),
        url(r'^(?P<patientrecord_id>\d+)/mdph_request/(?P<pk>\d+)/del$', delete_mdph_request),
        url(r'^(?P<patientrecord_id>\d+)/mdph_response/new$', new_mdph_response),
        url(r'^(?P<patientrecord_id>\d+)/mdph_response/(?P<pk>\d+)/update$', update_mdph_response),
        url(r'^(?P<patientrecord_id>\d+)/mdph_response/(?P<pk>\d+)/del$', delete_mdph_response),
        url(r'^(?P<patientrecord_id>\d+)/generate$', generate_rtf_form),
        url(r'^(?P<patientrecord_id>\d+)/create-directory$', create_directory),
)
