from django.urls import path
from django.views.generic import TemplateView

from . import views

app_name = "module_activity"

urlpatterns = [


    path('populate/food/dataset/', views.PopulateFoodIngredientView.as_view(), name='populate_food'),

    path('intolerance/<int:principal_id>/', views.IntoleranceView.as_view(), name='intolerance'),
    path('intolerance/<int:principal_id>/add/', views.CreateOrUpdateIntoleranceView.as_view(), name='intolerance_add'),
    path('intolerance/<int:principal_id>/edit/<int:pk>', views.CreateOrUpdateIntoleranceView.as_view(), name='intolerance_edit'),
    path('intolerance/list/<int:principal_id>/', views.IntoleranceListJson.as_view(), name='intolerance_list'),
    path('intolerance/action/', views.IntoleranceActionView.as_view(), name='intolerance_action'),
    path('intolerance/archive/list/<int:principal_id>/', views.IntoleranceArchiveView.as_view(), name='intolerance_archive'),


    path('symptoms/<int:principal_id>/', views.SymptomsView.as_view(), name='symptoms'),
    path('symptoms/<int:principal_id>/add/', views.CreateOrUpdateSymptomsView.as_view(), name='symptoms_add'),
    path('symptoms/<int:principal_id>/edit/<int:pk>', views.CreateOrUpdateSymptomsView.as_view(), name='symptoms_edit'),
    path('symptoms/list/<int:principal_id>/', views.SymptomsListJson.as_view(), name='symptoms_list'),
    path('symptoms/action/', views.SymptomsActionView.as_view(), name='symptoms_action'),
    path('symptoms/archive/list/<int:principal_id>/', views.SymptomsArchiveView.as_view(), name='symptoms_archive'),

    path('past_treatment/<int:principal_id>/', views.PastTreatmentView.as_view(), name='past_treatment'),
    path('past_treatment/<int:principal_id>/add/', views.CreateOrUpdatePastTreatmentView.as_view(), name='past_treatment_add'),
    path('past_treatment/<int:principal_id>/edit/<int:pk>', views.CreateOrUpdatePastTreatmentView.as_view(), name='past_treatment_edit'),
    path('past_treatment/list/<int:principal_id>/', views.PastTreatmentListJson.as_view(), name='past_treatment_list'),
    path('past_treatment/action/', views.PastTreatmentActionView.as_view(), name='past_treatment_action'),
    path('past_treatment/archive/list/<int:principal_id>/', views.PastTreatmentArchiveView.as_view(), name='past_treatment_archive'),

    path('chronic_condition/<int:principal_id>/', views.ChronicConditionView.as_view(), name='chronic_condition'),
    path('chronic_condition/<int:principal_id>/add/', views.CreateOrUpdateChronicConditionView.as_view(), name='chronic_condition_add'),
    path('chronic_condition/<int:principal_id>/edit/<int:pk>', views.CreateOrUpdateChronicConditionView.as_view(), name='chronic_condition_edit'),
    path('chronic_condition/list/<int:principal_id>/', views.ChronicConditionListJson.as_view(), name='chronic_condition_list'),
    path('chronic_condition/action/', views.ChronicConditionActionView.as_view(), name='chronic_condition_action'),
    path('chronic_condition/archive/list/<int:principal_id>/', views.ChronicConditionArchiveView.as_view(), name='chronic_condition_archive'),

    path('user/meal/<int:principal_id>/', views.MealView.as_view(), name='meal_view'),
    path('user/meal/list/<int:principal_id>/', views.MealListJsonView.as_view(), name='meal_list'),

    path('user/medication/<int:principal_id>/', views.MedicationView.as_view(), name='medication_view'),
    path('user/medication/list/<int:principal_id>/', views.MedicationListJsonView.as_view(), name='medication_list'),

    path('user/bowel/<int:principal_id>/', views.BowelView.as_view(), name='bowel_view'),
    path('user/bowel/list/<int:principal_id>/', views.BowelListJsonView.as_view(), name='bowel_list'),

    path('user/meal-symptoms/<int:principal_id>/', views.MealSymptomsView.as_view(), name='meal_symptoms_view'),
    path('user/meal-symptoms/list/<int:principal_id>/', views.MealSymptomsListJsonView.as_view(), name='meal_symptoms_list'),


    path('user_activity/<int:principal_id>/', views.UserActivityRecordView.as_view(), name='activity_list'),
    path('meal_detail/<int:pk>/', views.MealDetialView.as_view(), name='meal_detail'),
    path('medication_detail/<int:pk>/', views.MedicationDetailView.as_view(), name='medication_detail'),
    path('bowel_detail/<int:pk>/', views.BowelDetailView.as_view(), name='bowel_detail'),
    path('meal_symptom_detail/<int:pk>/', views.MealSymptomDetailView.as_view(), name='meal_symptom_detail'),


    path('daily_report/chart/count/', views.ReportChartView.as_view(), name='chart_data'),

    path('report/<int:principal_id>/', views.ReportDataView.as_view(), name='report_data'),


]
