\d+)/update/$',
- views.GroupUpdate.as_view(),
- name='g_update'),
-
-]
diff --git a/project/epi2/views.py b/project/epi2/views.py
deleted file mode 100644
index 1cceb598..00000000
--- a/project/epi2/views.py
+++ /dev/null
@@ -1,349 +0,0 @@
-from utils.views import (BaseDetail, BaseDelete,
- BaseVersion, BaseUpdate, BaseCreate,
- BaseCreateWithFormset, BaseUpdateWithFormset,
- CloseIfSuccessMixin, BaseList, GenerateReport)
-
-from assessment.models import Assessment
-from study.models import Study
-from study.views import StudyRead
-
-from . import forms, exports, models
-
-
-# Study criteria
-class StudyCriteriaCreate(CloseIfSuccessMixin, BaseCreate):
- success_message = 'Criteria created.'
- parent_model = Assessment
- parent_template_name = 'assessment'
- model = models.Criteria
- form_class = forms.CriteriaForm
-
-
-# Study population
-class StudyPopulationCreate(BaseCreate):
- success_message = 'Study-population created.'
- parent_model = Study
- parent_template_name = 'study'
- model = models.StudyPopulation
- form_class = forms.StudyPopulationForm
-
-
-class StudyPopulationCopyAsNewSelector(StudyRead):
- template_name = 'epi2/studypopulation_copy_selector.html'
-
- def get_context_data(self, **kwargs):
- context = super(StudyPopulationCopyAsNewSelector, self).get_context_data(**kwargs)
- context['form'] = forms.StudyPopulationSelectorForm(parent_id=self.object.id)
- return context
-
-
-class StudyPopulationDetail(BaseDetail):
- model = models.StudyPopulation
-
-
-class StudyPopulationUpdate(BaseUpdate):
- success_message = "Study Population updated."
- model = models.StudyPopulation
- form_class = forms.StudyPopulationForm
-
-
-class StudyPopulationDelete(BaseDelete):
- success_message = "Study Population deleted."
- model = models.StudyPopulation
-
- def get_success_url(self):
- return self.object.study.get_absolute_url()
-
-
-# Factors
-class AdjustmentFactorCreate(CloseIfSuccessMixin, BaseCreate):
- success_message = 'Adjustment factor created.'
- parent_model = Assessment
- parent_template_name = 'assessment'
- model = models.AdjustmentFactor
- form_class = forms.AdjustmentFactorForm
-
-
-# Exposure
-class ExposureCreate(BaseCreate):
- success_message = 'Exposure created.'
- parent_model = models.StudyPopulation
- parent_template_name = 'study_population'
- model = models.Exposure2
- form_class = forms.ExposureForm
-
-
-class ExposureCopyAsNewSelector(StudyPopulationDetail):
- template_name = 'epi2/exposure_copy_selector.html'
-
- def get_context_data(self, **kwargs):
- context = super(ExposureCopyAsNewSelector, self).get_context_data(**kwargs)
- context['form'] = forms.ExposureSelectorForm(parent_id=self.object.id)
- return context
-
-
-class ExposureDetail(BaseDetail):
- model = models.Exposure2
-
-
-class ExposureUpdate(BaseUpdate):
- success_message = "Study Population updated."
- model = models.Exposure2
- form_class = forms.ExposureForm
-
-
-class ExposureDelete(BaseDelete):
- success_message = "Study Population deleted."
- model = models.Exposure2
-
- def get_success_url(self):
- return self.object.study_population.get_absolute_url()
-
-
-# Outcome
-class OutcomeList(BaseList):
- parent_model = Assessment
- model = models.Outcome
-
- def get_paginate_by(self, qs):
- val = 25
- try:
- val = int(self.request.GET.get('paginate_by', val))
- except ValueError:
- pass
- return val
-
- def get_queryset(self):
- filters = {"assessment": self.assessment}
- perms = self.get_obj_perms()
- if not perms['edit']:
- filters["study_population__study__published"] = True
- return self.model.objects.filter(**filters).order_by('name')
-
-
-class OutcomeExport(OutcomeList):
- """
- Full XLS data export for the epidemiology outcome.
- """
- def get(self, request, *args, **kwargs):
- self.object_list = self.get_queryset()
- exporter = exports.OutcomeComplete(
- self.object_list,
- export_format="excel",
- filename='{}-epi'.format(self.assessment),
- sheet_name='epi')
- return exporter.build_response()
-
-
-class OutcomeCreate(BaseCreate):
- success_message = 'Outcome created.'
- parent_model = models.StudyPopulation
- parent_template_name = 'study_population'
- model = models.Outcome
- form_class = forms.OutcomeForm
-
- def get_form_kwargs(self):
- kwargs = super(OutcomeCreate, self).get_form_kwargs()
- kwargs['assessment'] = self.assessment
- return kwargs
-
-
-class OutcomeCopyAsNewSelector(StudyPopulationDetail):
- template_name = 'epi2/outcome_copy_selector.html'
-
- def get_context_data(self, **kwargs):
- context = super(OutcomeCopyAsNewSelector, self).get_context_data(**kwargs)
- context['form'] = forms.OutcomeSelectorForm(parent_id=self.object.id)
- return context
-
-
-class OutcomeDetail(BaseDetail):
- model = models.Outcome
-
-
-class OutcomeUpdate(BaseUpdate):
- success_message = "Outcome updated."
- model = models.Outcome
- form_class = forms.OutcomeForm
-
-
-class OutcomeDelete(BaseDelete):
- success_message = "Outcome deleted."
- model = models.Outcome
-
- def get_success_url(self):
- return self.object.study_population.get_absolute_url()
-
-
-# Result
-class ResultCreate(BaseCreateWithFormset):
- success_message = 'Result created.'
- parent_model = models.Outcome
- parent_template_name = 'outcome'
- model = models.Result
- form_class = forms.ResultForm
- formset_factory = forms.GroupResultFormset
-
- def post_object_save(self, form, formset):
- for form in formset.forms:
- form.instance.result = self.object
-
- def get_formset_kwargs(self):
- return {
- "outcome": self.parent,
- "study_population": self.parent.study_population
- }
-
- def build_initial_formset_factory(self):
- return forms.BlankGroupResultFormset(
- queryset=models.GroupResult.objects.none(),
- **self.get_formset_kwargs())
-
-
-class ResultCopyAsNewSelector(OutcomeDetail):
- template_name = 'epi2/result_copy_selector.html'
-
- def get_context_data(self, **kwargs):
- context = super(ResultCopyAsNewSelector, self).get_context_data(**kwargs)
- context['form'] = forms.ResultSelectorForm(parent_id=self.object.id)
- return context
-
-
-class ResultDetail(BaseDetail):
- model = models.Result
-
-
-class ResultUpdate(BaseUpdateWithFormset):
- success_message = "Result updated."
- model = models.Result
- form_class = forms.ResultUpdateForm
- formset_factory = forms.GroupResultFormset
-
- def build_initial_formset_factory(self):
- return forms.GroupResultFormset(
- queryset=self.object.results.all(),
- **self.get_formset_kwargs())
-
- def get_formset_kwargs(self):
- return {
- "study_population": self.object.outcome.study_population,
- "outcome": self.object.outcome,
- "result": self.object
- }
-
- def post_object_save(self, form, formset):
- # delete other results not associated with the selected collection
- models.GroupResult.objects\
- .filter(result=self.object)\
- .exclude(group__comparison_set=self.object.comparison_set)\
- .delete()
-
-
-class ResultDelete(BaseDelete):
- success_message = "Result deleted."
- model = models.Result
-
- def get_success_url(self):
- return self.object.outcome.get_absolute_url()
-
-
-# Comparison set + group
-class ComparisonSetCreate(BaseCreateWithFormset):
- success_message = 'Groups created.'
- parent_model = models.StudyPopulation
- parent_template_name = 'study_population'
- model = models.ComparisonSet
- form_class = forms.ComparisonSet
- formset_factory = forms.GroupFormset
-
- def post_object_save(self, form, formset):
- group_id = 0
- for form in formset.forms:
- form.instance.comparison_set = self.object
- if form.is_valid() and form not in formset.deleted_forms:
- form.instance.group_id = group_id
- if form.has_changed() is False:
- form.instance.save() # ensure new group_id saved to db
- group_id += 1
-
- def build_initial_formset_factory(self):
- return forms.BlankGroupFormset(
- queryset=models.Group.objects.none())
-
-
-class ComparisonSetOutcomeCreate(ComparisonSetCreate):
- parent_model = models.Outcome
- parent_template_name = 'outcome'
-
-
-class ComparisonSetStudyPopCopySelector(StudyPopulationDetail):
- template_name = 'epi2/comparisonset_sp_copy_selector.html'
-
- def get_context_data(self, **kwargs):
- context = super(ComparisonSetStudyPopCopySelector, self).get_context_data(**kwargs)
- context['form'] = forms.ComparisonSetByStudyPopulationSelectorForm(parent_id=self.object.id)
- return context
-
-
-class ComparisonSetOutcomeCopySelector(OutcomeDetail):
- template_name = 'epi2/comparisonset_outcome_copy_selector.html'
-
- def get_context_data(self, **kwargs):
- context = super(ComparisonSetOutcomeCopySelector, self).get_context_data(**kwargs)
- context['form'] = forms.ComparisonSetByOutcomeSelectorForm(parent_id=self.object.id)
- return context
-
-
-class ComparisonSetDetail(BaseDetail):
- model = models.ComparisonSet
-
-
-class ComparisonSetUpdate(BaseUpdateWithFormset):
- success_message = "Comparison set updated."
- model = models.ComparisonSet
- form_class = forms.ComparisonSet
- formset_factory = forms.GroupFormset
-
- def build_initial_formset_factory(self):
- return forms.GroupFormset(queryset=self.object.groups.all()
- .order_by('group_id'))
-
- def post_object_save(self, form, formset):
- group_id = 0
- for form in formset.forms:
- form.instance.comparison_set = self.object
- if form.is_valid() and form not in formset.deleted_forms:
- form.instance.group_id = group_id
- if form.has_changed() is False:
- form.instance.save() # ensure new group_id saved to db
- group_id += 1
-
-
-class ComparisonSetDelete(BaseDelete):
- success_message = "Comparison set deleted."
- model = models.ComparisonSet
-
- def get_success_url(self):
- if self.object.study_population:
- return self.object.study_population.get_absolute_url()
- else:
- return self.object.outcome.get_absolute_url()
-
-
-class GroupDetail(BaseDetail):
- model = models.Group
-
-
-class GroupUpdate(BaseUpdateWithFormset):
- success_message = "Groups updated."
- model = models.Group
- form_class = forms.SingleGroupForm
- formset_factory = forms.GroupNumericalDescriptionsFormset
-
- def build_initial_formset_factory(self):
- return forms.GroupNumericalDescriptionsFormset(
- queryset=self.object.descriptions.all())
-
- def post_object_save(self, form, formset):
- for form in formset:
- form.instance.group = self.object
diff --git a/project/epimeta/exports.py b/project/epimeta/exports.py
index 90affb93..02c01385 100644
--- a/project/epimeta/exports.py
+++ b/project/epimeta/exports.py
@@ -27,12 +27,12 @@ def _get_data_rows(self):
row.extend(models.MetaProtocol.flat_complete_data_row(ser['protocol']))
row.extend(models.MetaResult.flat_complete_data_row(ser))
- if len(ser['single_results2']) == 0:
+ if len(ser['single_results']) == 0:
# print one-row with no single-results
rows.append(row)
else:
# print each single-result as a new row
- for sr in ser['single_results2']:
+ for sr in ser['single_results']:
row_copy = list(row) # clone
row_copy.extend(models.SingleResult.flat_complete_data_row(sr))
rows.append(row_copy)
@@ -47,33 +47,30 @@ class MetaResultFlatDataPivot(FlatFileExporter):
def _get_header_row(self):
return [
- 'Study',
- 'Study URL',
- 'Study HAWC ID',
- 'Study Published?',
+ 'study id',
+ 'study name',
+ 'study published',
- 'Protocol Primary Key',
- 'Protocol URL',
- 'Protocol Name',
- 'Protocol Type',
- 'Total References',
- 'Identified References',
+ 'protocol id',
+ 'protocol name',
+ 'protocol type',
+ 'total references',
+ 'identified references',
- 'Row Key',
- 'Result Primary Key',
- 'Result URL',
- 'Result Label',
- 'Health Outcome',
- 'Exposure',
- 'Result References',
- 'Statistical Metric',
- 'Statistical Metric Abbreviation',
+ 'key',
+ 'meta result id',
+ 'meta result label',
+ 'health outcome',
+ 'exposure',
+ 'result references',
+ 'statistical metric',
+ 'statistical metric abbreviation',
'N',
- 'Estimate',
- 'Lower CI',
- 'Upper CI',
+ 'estimate',
+ 'lower CI',
+ 'upper CI',
'CI units',
- 'Heterogeneity'
+ 'heterogeneity'
]
def _get_data_rows(self):
@@ -81,13 +78,11 @@ def _get_data_rows(self):
for obj in self.queryset:
ser = obj.get_json(json_encode=False)
row = [
- ser['protocol']['study']['short_citation'],
- ser['protocol']['study']['url'],
ser['protocol']['study']['id'],
+ ser['protocol']['study']['short_citation'],
ser['protocol']['study']['published'],
ser['protocol']['id'],
- ser['protocol']['url'],
ser['protocol']['name'],
ser['protocol']['protocol_type'],
ser['protocol']['total_references'],
@@ -95,7 +90,6 @@ def _get_data_rows(self):
ser['id'], # repeat for data-pivot key
ser['id'],
- ser['url'],
ser['label'],
ser['health_outcome'],
ser['exposure_name'],
diff --git a/project/epimeta/forms.py b/project/epimeta/forms.py
index 60fbfe5e..34190ce9 100644
--- a/project/epimeta/forms.py
+++ b/project/epimeta/forms.py
@@ -6,7 +6,7 @@
from selectable import forms as selectable
from utils.forms import BaseFormHelper
-from epi2.lookups import AdjustmentFactorLookup, CriteriaLookup
+from epi.lookups import AdjustmentFactorLookup, CriteriaLookup
from . import models, lookups
@@ -84,7 +84,7 @@ def setHelper(self):
helper.add_fluid_row('lit_search_start_date', 3, "span4")
helper.add_fluid_row('inclusion_criteria', 2, "span6")
- url = reverse('epi2:studycriteria_create',
+ url = reverse('epi:studycriteria_create',
kwargs={'pk': self.instance.study.assessment.pk})
helper.addBtnLayout(helper.layout[5], 0, url, "Create criteria", "span6")
helper.addBtnLayout(helper.layout[5], 1, url, "Create criteria", "span6")
@@ -172,7 +172,7 @@ def setHelper(self):
helper.add_fluid_row('adjustment_factors', 2, "span6")
url = reverse(
- 'epi2:adjustmentfactor_create',
+ 'epi:adjustmentfactor_create',
kwargs={'pk': self.instance.protocol.study.assessment.pk}
)
helper.addBtnLayout(helper.layout[8], 0, url, "Create criteria", "span6")
diff --git a/project/epimeta/migrations/0001_initial.py b/project/epimeta/migrations/0001_initial.py
index d16262bf..98112463 100644
--- a/project/epimeta/migrations/0001_initial.py
+++ b/project/epimeta/migrations/0001_initial.py
@@ -9,7 +9,7 @@ class Migration(migrations.Migration):
dependencies = [
('study', '0001_initial'),
- ('epi2', '0001_initial'),
+ ('epi', '0001_initial'),
]
operations = [
@@ -26,9 +26,9 @@ class Migration(migrations.Migration):
('total_references', models.PositiveIntegerField(help_text=b'References identified through initial literature-search before application of inclusion/exclusion criteria', null=True, verbose_name=b'Total number of references found', blank=True)),
('total_studies_identified', models.PositiveIntegerField(help_text=b'Total references identified for inclusion after application of literature review and screening criteria', verbose_name=b'Total number of studies identified')),
('notes', models.TextField(blank=True)),
- ('exclusion_criteria', models.ManyToManyField(related_name='meta_exclusion_criteria', to='epi2.Criteria', blank=True)),
- ('inclusion_criteria', models.ManyToManyField(related_name='meta_inclusion_criteria', to='epi2.Criteria', blank=True)),
- ('study', models.ForeignKey(related_name='meta_protocols2', to='study.Study')),
+ ('exclusion_criteria', models.ManyToManyField(related_name='meta_exclusion_criteria', to='epi.Criteria', blank=True)),
+ ('inclusion_criteria', models.ManyToManyField(related_name='meta_inclusion_criteria', to='epi.Criteria', blank=True)),
+ ('study', models.ForeignKey(related_name='meta_protocols', to='study.Study')),
],
options={
'ordering': ('name',),
@@ -53,9 +53,9 @@ class Migration(migrations.Migration):
('upper_ci', models.FloatField(help_text=b'Numerical value for upper-confidence interval', verbose_name=b'Upper CI')),
('ci_units', models.FloatField(default=0.95, help_text=b'A 95% CI is written as 0.95.', null=True, verbose_name=b'Confidence Interval (CI)', blank=True)),
('notes', models.TextField(blank=True)),
- ('adjustment_factors', models.ManyToManyField(help_text=b'All factors which were included in final model', related_name='meta_adjustments', to='epi2.AdjustmentFactor', blank=True)),
- ('metric', models.ForeignKey(to='epi2.ResultMetric')),
- ('protocol', models.ForeignKey(related_name='results2', to='epimeta.MetaProtocol')),
+ ('adjustment_factors', models.ManyToManyField(help_text=b'All factors which were included in final model', related_name='meta_adjustments', to='epi.AdjustmentFactor', blank=True)),
+ ('metric', models.ForeignKey(to='epi.ResultMetric')),
+ ('protocol', models.ForeignKey(related_name='results', to='epimeta.MetaProtocol')),
],
options={
'ordering': ('label',),
@@ -73,8 +73,8 @@ class Migration(migrations.Migration):
('upper_ci', models.FloatField(help_text=b'Numerical value for upper-confidence interval', null=True, verbose_name=b'Upper CI', blank=True)),
('ci_units', models.FloatField(default=0.95, help_text=b'A 95% CI is written as 0.95.', null=True, verbose_name=b'Confidence Interval (CI)', blank=True)),
('notes', models.TextField(blank=True)),
- ('meta_result', models.ForeignKey(related_name='single_results2', to='epimeta.MetaResult')),
- ('study', models.ForeignKey(related_name='single_results2', blank=True, to='study.Study', null=True)),
+ ('meta_result', models.ForeignKey(related_name='single_results', to='epimeta.MetaResult')),
+ ('study', models.ForeignKey(related_name='single_results', blank=True, to='study.Study', null=True)),
],
),
]
diff --git a/project/epimeta/models.py b/project/epimeta/models.py
index c39d440f..93fa9f38 100644
--- a/project/epimeta/models.py
+++ b/project/epimeta/models.py
@@ -10,7 +10,7 @@
import reversion
from assessment.serializers import AssessmentSerializer
-from epi2.models import Criteria, ResultMetric, AdjustmentFactor
+from epi.models import Criteria, ResultMetric, AdjustmentFactor
from utils.helper import SerializerHelper
from utils.models import get_crumbs
@@ -26,7 +26,7 @@ class MetaProtocol(models.Model):
(1, "Other"))
study = models.ForeignKey('study.Study',
- related_name="meta_protocols2")
+ related_name="meta_protocols")
name = models.CharField(
verbose_name="Protocol name",
max_length=128)
@@ -126,7 +126,7 @@ def flat_complete_data_row(ser):
class MetaResult(models.Model):
protocol = models.ForeignKey(
MetaProtocol,
- related_name="results2")
+ related_name="results")
label = models.CharField(
max_length=128)
data_location = models.CharField(
@@ -337,10 +337,10 @@ def getStatMethods(mr):
class SingleResult(models.Model):
meta_result = models.ForeignKey(
MetaResult,
- related_name="single_results2")
+ related_name="single_results")
study = models.ForeignKey(
'study.Study',
- related_name="single_results2",
+ related_name="single_results",
blank=True,
null=True)
exposure_name = models.CharField(
@@ -458,7 +458,7 @@ def invalidate_meta_result_cache(sender, instance, **kwargs):
)
reversion.register(
MetaResult,
- follow=('adjustment_factors', 'single_results2')
+ follow=('adjustment_factors', 'single_results')
)
reversion.register(
SingleResult
diff --git a/project/epimeta/serializers.py b/project/epimeta/serializers.py
index a26e14a8..f4900f1d 100644
--- a/project/epimeta/serializers.py
+++ b/project/epimeta/serializers.py
@@ -1,6 +1,6 @@
from rest_framework import serializers
-from epi2.serializers import ResultMetricSerializer
+from epi.serializers import ResultMetricSerializer
from study.serializers import StudySerializer
from utils.helper import SerializerHelper
@@ -35,7 +35,7 @@ class MetaProtocolSerializer(serializers.ModelSerializer):
url = serializers.ReadOnlyField(source="get_absolute_url")
protocol_type = serializers.ReadOnlyField(source="get_protocol_type_display")
lit_search_strategy = serializers.ReadOnlyField(source="get_lit_search_strategy_display")
- results2 = MetaResultLinkSerializer(many=True)
+ results = MetaResultLinkSerializer(many=True)
class Meta:
model = models.MetaProtocol
@@ -46,7 +46,7 @@ class MetaResultSerializer(serializers.ModelSerializer):
url = serializers.ReadOnlyField(source="get_absolute_url")
metric = ResultMetricSerializer()
adjustment_factors = serializers.StringRelatedField(many=True)
- single_results2 = SingleResultSerializer(many=True)
+ single_results = SingleResultSerializer(many=True)
def to_representation(self, instance):
ret = super(MetaResultSerializer, self).to_representation(instance)
diff --git a/project/epimeta/views.py b/project/epimeta/views.py
index 8c1ae76c..eae9bbee 100644
--- a/project/epimeta/views.py
+++ b/project/epimeta/views.py
@@ -88,7 +88,7 @@ def get_formset_kwargs(self):
def build_initial_formset_factory(self):
return forms.SingleResultFormset(
- queryset=self.object.single_results2.all().order_by('pk'),
+ queryset=self.object.single_results.all().order_by('pk'),
**self.get_formset_kwargs())
def get_form_kwargs(self):
diff --git a/project/hawc/settings/base.py b/project/hawc/settings/base.py
index dbcf8e7d..7e19a848 100644
--- a/project/hawc/settings/base.py
+++ b/project/hawc/settings/base.py
@@ -99,7 +99,6 @@
'study',
'animal',
'epi',
- 'epi2',
'epimeta',
'invitro',
'bmd',
diff --git a/project/hawc/urls.py b/project/hawc/urls.py
index 6dd01cca..be218ab0 100644
--- a/project/hawc/urls.py
+++ b/project/hawc/urls.py
@@ -31,8 +31,6 @@
include('animal.urls', namespace='animal')),
url(r'^epi/',
include('epi.urls', namespace='epi')),
- url(r'^epi2/',
- include('epi2.urls', namespace='epi2')),
url(r'^epi-meta/',
include('epimeta.urls', namespace='meta')),
url(r'^in-vitro/',
diff --git a/project/invitro/exports.py b/project/invitro/exports.py
index acfb9359..ac43aa91 100644
--- a/project/invitro/exports.py
+++ b/project/invitro/exports.py
@@ -7,45 +7,43 @@ class IVEndpointFlatDataPivot(FlatFileExporter):
def _get_header_row(self):
header = [
- 'Study',
- 'Study HAWC ID',
- 'Study identifier',
- 'Study URL',
- 'Study Published',
-
- 'Chemical name',
- 'Chemical HAWC ID',
- 'Chemical CAS',
- 'Chemical purity',
-
- 'IVExperiment HAWC ID',
- 'IVExperiment URL',
- 'Cell species',
- 'Cell sex',
- 'Cell type',
- 'Cell tissue',
+ 'study id',
+ 'study name',
+ 'study identifier',
+ 'study published',
+
+ 'chemical id',
+ 'chemical name',
+ 'chemical CAS',
+ 'chemical purity',
+
+ 'IVExperiment id',
+ 'cell species',
+ 'cell sex',
+ 'cell type',
+ 'cell tissue',
'Dose units',
'Metabolic activation',
'Transfection',
+ 'key',
+ 'IVEndpoint id',
'IVEndpoint name',
- 'IVEndpoint HAWC ID',
- 'IVEndpoint URL',
'IVEndpoint description tags',
- 'Assay type',
- 'Endpoint description',
- 'Endpoint response units',
- 'Observation time',
- 'Observation time units',
+ 'assay type',
+ 'endpoint description',
+ 'endpoint response units',
+ 'observation time',
+ 'observation time units',
'NOEL',
'LOEL',
- 'Monotonicity',
- 'Overall pattern',
- 'Trend test result',
- 'Minimum dose',
- 'Maximum dose',
- 'Number of doses'
+ 'monotonicity',
+ 'overall pattern',
+ 'trend test result',
+ 'minimum dose',
+ 'maximum dose',
+ 'number of doses',
]
num_cats = 0
@@ -107,19 +105,17 @@ def getDose(ser, tag):
bm_values = [bm["value"] for bm in ser["benchmarks"]]
row = [
- ser['experiment']['study']['short_citation'],
ser['experiment']['study']['id'],
+ ser['experiment']['study']['short_citation'],
ser['experiment']['study']['study_identifier'],
- ser['experiment']['study']['url'],
ser['experiment']['study']['published'],
- ser['chemical']['name'],
ser['chemical']['id'],
+ ser['chemical']['name'],
ser['chemical']['cas'],
ser['chemical']['purity'],
ser['experiment']['id'],
- ser['experiment']['url'],
ser['experiment']['cell_type']['species'],
ser['experiment']['cell_type']['sex'],
ser['experiment']['cell_type']['cell_type'],
@@ -129,9 +125,9 @@ def getDose(ser, tag):
ser['experiment']['metabolic_activation'],
ser['experiment']['transfection'],
- ser['name'],
+ ser['id'], # repeat for data-pivot key
ser['id'],
- ser['url'],
+ ser['name'],
'|'.join([d['name'] for d in ser['effects']]),
ser['assay_type'],
ser['short_description'],
diff --git a/project/static/epi/js/models2.js b/project/static/epi/js/models.js
similarity index 98%
rename from project/static/epi/js/models2.js
rename to project/static/epi/js/models.js
index 46eda9ec..620fc998 100644
--- a/project/static/epi/js/models2.js
+++ b/project/static/epi/js/models.js
@@ -6,7 +6,7 @@ var StudyPopulation = function(data){
};
_.extend(StudyPopulation, {
get_object: function(id, cb){
- $.get('/epi2/api/study-population/{0}/'.printf(id), function(d){
+ $.get('/epi/api/study-population/{0}/'.printf(id), function(d){
cb(new StudyPopulation(d));
});
},
@@ -98,7 +98,7 @@ var Exposure = function(data){
};
_.extend(Exposure, {
get_object: function(id, cb){
- $.get('/epi2/api/exposure/{0}/'.printf(id), function(d){
+ $.get('/epi/api/exposure/{0}/'.printf(id), function(d){
cb(new Exposure(d));
});
},
@@ -187,7 +187,7 @@ var ComparisonSet = function(data){
};
_.extend(ComparisonSet, {
get_object: function(id, cb){
- $.get('/epi2/api/comparison-set/{0}/'.printf(id), function(d){
+ $.get('/epi/api/comparison-set/{0}/'.printf(id), function(d){
cb(new ComparisonSet(d));
});
},
@@ -293,7 +293,7 @@ var Group = function(data){
};
_.extend(Group, {
get_object: function(id, cb){
- $.get('/epi2/api/group/{0}/'.printf(id), function(d){
+ $.get('/epi/api/group/{0}/'.printf(id), function(d){
cb(new Group(d));
});
},
@@ -510,7 +510,7 @@ var Outcome = function(data){
};
_.extend(Outcome, {
get_object: function(id, cb){
- $.get('/epi2/api/outcome/{0}/'.printf(id), function(d){
+ $.get('/epi/api/outcome/{0}/'.printf(id), function(d){
cb(new Outcome(d));
});
},
@@ -635,7 +635,7 @@ var Result = function(data){
};
_.extend(Result, {
get_object: function(id, cb){
- $.get('/epi2/api/result/{0}/'.printf(id), function(d){
+ $.get('/epi/api/result/{0}/'.printf(id), function(d){
cb(new Result(d));
});
},
diff --git a/project/static/epimeta/js/models.js b/project/static/epimeta/js/models.js
index 28f86952..13aa446b 100644
--- a/project/static/epimeta/js/models.js
+++ b/project/static/epimeta/js/models.js
@@ -62,8 +62,8 @@ MetaProtocol.prototype = {
};
$el.append("Results ");
- if (this.data.results2.length>0){
- $el.append(HAWCUtils.buildUL(this.data.results2, liFunc));
+ if (this.data.results.length>0){
+ $el.append(HAWCUtils.buildUL(this.data.results, liFunc));
} else {
$el.append("No results are available for this protocol.
");
}
@@ -94,7 +94,7 @@ _.extend(MetaResult, {
MetaResult.prototype = {
_unpack_single_results: function(){
var single_results = this.single_results;
- this.data.single_results2.forEach(function(v,i){
+ this.data.single_results.forEach(function(v,i){
single_results.push(new SingleStudyResult(v));
});
this.data.single_results = [];
diff --git a/project/static/summary/js/data_pivot.js b/project/static/summary/js/data_pivot.js
index e31d5b8b..5e788754 100644
--- a/project/static/summary/js/data_pivot.js
+++ b/project/static/summary/js/data_pivot.js
@@ -179,7 +179,7 @@ _.extend(DataPivot, {
// add data-pivot row-level key and index
row._dp_y = i;
- row._dp_pk = row['Row Key'] || i;
+ row._dp_pk = row['key'] || i;
return row;
},
@@ -303,7 +303,7 @@ DataPivot.prototype = {
this.data_headers = data_headers;
},
build_settings: function(){
-
+ this.dpe_options = DataPivotExtension.get_options(this);
var self = this,
build_description_tab = function(){
var tab = $('
'),
@@ -1348,7 +1348,7 @@ var _DataPivot_settings_description = function(data_pivot, values){
"header_style": this.data_pivot.style_manager.add_select("texts", values.header_style),
"text_style": this.data_pivot.style_manager.add_select("texts", values.text_style),
"max_width": $(' '),
- "dpe": $(' ').html(DataPivotExtension.get_options(data_pivot))
+ "dpe": $(' ').html(this.data_pivot.dpe_options)
};
// set default values
@@ -1416,7 +1416,7 @@ var _DataPivot_settings_pointdata = function(data_pivot, values){
"header_name": $(' '),
"marker_style": this.data_pivot.style_manager.add_select(style_type, values.marker_style),
"conditional_formatting": this.conditional_formatter.data,
- "dpe": $(' ').html(DataPivotExtension.get_options(data_pivot))
+ "dpe": $(' ').html(this.data_pivot.dpe_options)
};
// set default values
@@ -2641,8 +2641,8 @@ _.extend(DataPivot_visualization.prototype, D3Plot.prototype, {
obj.style(property, d._styles['points_' + i][property]);
}
})
- .style('cursor', function(d){return(datum._dpe_datatype)?'pointer':'auto';})
- .on("click", function(d){if(datum._dpe_datatype){self.dpe.render_plottip(datum, d);}});
+ .style('cursor', function(d){return(datum._dpe_key)?'pointer':'auto';})
+ .on("click", function(d){if(datum._dpe_key){self.dpe.render_plottip(datum, d);}});
});
this.g_labels = this.vis.append("g");
@@ -2714,9 +2714,9 @@ _.extend(DataPivot_visualization.prototype, D3Plot.prototype, {
"col": j,
"text": txt.toLocaleString(),
"style": v._styles['text_' + j],
- "cursor": (desc._dpe_datatype)?'pointer':'auto',
+ "cursor": (desc._dpe_key)?'pointer':'auto',
"onclick": function(){
- if(desc._dpe_datatype)self.dpe.render_plottip(desc, v);
+ if(desc._dpe_key)self.dpe.render_plottip(desc, v);
}
})
});
@@ -2880,126 +2880,140 @@ _.extend(DataPivot_visualization.prototype, D3Plot.prototype, {
DataPivotExtension = function(){};
_.extend(DataPivotExtension, {
+ values: [
+ {
+ _dpe_name: "study",
+ _dpe_key: "study id",
+ _dpe_cls: Study,
+ _dpe_option_txt: "Show study",
+ },
+ {
+ _dpe_name: "experiment",
+ _dpe_key: "experiment id",
+ _dpe_cls: Experiment,
+ _dpe_option_txt: "Show experiment",
+ },
+ {
+ _dpe_name: "animal_group",
+ _dpe_key: "animal group id",
+ _dpe_cls: AnimalGroup,
+ _dpe_option_txt: "Show animal group",
+ },
+ {
+ _dpe_name: "endpoint",
+ _dpe_key: "endpoint id",
+ _dpe_cls: Endpoint,
+ _dpe_option_txt: "Show endpoint (basic)",
+ _dpe_options: {
+ complete: false
+ },
+ },
+ {
+ _dpe_name: "endpoint_complete",
+ _dpe_key: "endpoint id",
+ _dpe_cls: Endpoint,
+ _dpe_option_txt: "Show endpoint (complete)",
+ _dpe_options: {
+ complete: true
+ },
+ },
+ {
+ _dpe_name: "study_population",
+ _dpe_key: "study population id",
+ _dpe_cls: StudyPopulation,
+ _dpe_option_txt: "Show study population",
+ },
+ {
+ _dpe_name: "comparison_set",
+ _dpe_key: "comparison set id",
+ _dpe_cls: ComparisonSet,
+ _dpe_option_txt: "Show comparison set",
+ },
+ {
+ _dpe_name: "exposure",
+ _dpe_key: "exposure id",
+ _dpe_cls: Exposure,
+ _dpe_option_txt: "Show exposure",
+ },
+ {
+ _dpe_name: "outcome",
+ _dpe_key: "outcome id",
+ _dpe_cls: Outcome,
+ _dpe_option_txt: "Show outcome",
+ },
+ {
+ _dpe_name: "result",
+ _dpe_key: "result id",
+ _dpe_cls: Result,
+ _dpe_option_txt: "Show result",
+ },
+ {
+ _dpe_name: "meta_protocol",
+ _dpe_key: "protocol id",
+ _dpe_cls: MetaProtocol,
+ _dpe_option_txt: "Show protocol",
+ },
+ {
+ _dpe_name: "meta_result",
+ _dpe_key: "meta result id",
+ _dpe_cls: MetaResult,
+ _dpe_option_txt: "Show meta result",
+ },
+ {
+ _dpe_name: "iv_chemical",
+ _dpe_key: "chemical id",
+ _dpe_cls: IVChemical,
+ _dpe_option_txt: "Show chemical",
+ },
+ {
+ _dpe_name: "iv_experiment",
+ _dpe_key: "IVExperiment id",
+ _dpe_cls: IVExperiment,
+ _dpe_option_txt: "Show experiment",
+ },
+ {
+ _dpe_name: "iv_endpoint",
+ _dpe_key: "IVEndpoint id",
+ _dpe_cls: IVEndpoint,
+ _dpe_option_txt: "Show endpoint",
+ }
+ ],
+ extByName: function(){
+ return _.indexBy(DataPivotExtension.values, '_dpe_name');
+ },
+ extByColumnKey: function(){
+ return _.groupBy(DataPivotExtension.values, '_dpe_key');
+ },
update_extensions: function(obj, key){
- var map = d3.map({
- "study": {
- _dpe_key: "Study HAWC ID",
- _dpe_datatype: "study",
- _dpe_cls: Study
- },
- "experiment": {
- _dpe_key: "Experiment ID",
- _dpe_datatype: "experiment",
- _dpe_cls: Experiment
- },
- "animal_group": {
- _dpe_key: "Animal Group ID",
- _dpe_datatype: "animal_group",
- _dpe_cls: AnimalGroup
- },
- "endpoint": {
- _dpe_key: "Endpoint Key",
- _dpe_datatype: "endpoint",
- _dpe_cls: Endpoint,
- options: {
- complete: false
- }
- },
- "endpoint_complete": {
- _dpe_key: "Endpoint Key",
- _dpe_datatype: "endpoint",
- _dpe_cls: Endpoint,
- options: {
- complete: true
- }
- },
- "study_population": {
- _dpe_key: "Study Population Key",
- _dpe_datatype: "study_population",
- _dpe_cls: StudyPopulation
- },
- "comparison_set": {
- _dpe_key: "Comparison Set ID",
- _dpe_datatype: "comparison_set",
- _dpe_cls: ComparisonSet
- },
- "exposure": {
- _dpe_key: "Exposure Key",
- _dpe_datatype: "exposure",
- _dpe_cls: Exposure
- },
- "assessed_outcome": {
- _dpe_key: "Assessed Outcome Key",
- _dpe_datatype: "assessed_outcome",
- _dpe_cls: Outcome
- },
- "result": {
- _dpe_key: "Result ID",
- _dpe_datatype: "result",
- _dpe_cls: Result
- },
- "meta_protocol": {
- _dpe_key: "Protocol Primary Key",
- _dpe_datatype: "meta_protocol",
- _dpe_cls: MetaProtocol
- },
- "meta_result": {
- _dpe_key: "Result Primary Key",
- _dpe_datatype: "meta_result",
- _dpe_cls: MetaResult
- },
- "iv_chemical": {
- _dpe_key: "Chemical HAWC ID",
- _dpe_datatype: "iv_chemical",
- _dpe_cls: IVChemical
- },
- "iv_experiment": {
- _dpe_key: "IVExperiment HAWC ID",
- _dpe_datatype: "iv_experiment",
- _dpe_cls: IVExperiment
- },
- "iv_endpoint": {
- _dpe_key: "IVEndpoint HAWC ID",
- _dpe_datatype: "iv_endpoint",
- _dpe_cls: IVEndpoint
- }
- }),
- match = map.get(key);
-
+ var dpe_keys = DataPivotExtension.extByName(),
+ match = dpe_keys[key];
if (match){
- $.extend(obj, match);
+ _.extend(obj, match);
} else {
console.log("Unrecognized DPE key: {0}".printf(key));
}
},
get_options: function(dp){
// extension options dependent on available data-columns
- var opts = ['{0} '.printf(DataPivot.NULL_CASE)];
+ var build_opt = function(val, txt){
+ return '{1} '.printf(val, txt)
+ },
+ opts = [
+ build_opt(DataPivot.NULL_CASE, DataPivot.NULL_CASE)
+ ],
+ headers;
if (dp.data.length>0){
- var headers = d3.set(d3.map(dp.data[0]).keys()),
- options = d3.map({
- "Study HAWC ID": ['Show Study '],
- "Study Population Key": ['Show Study Population '],
- "Exposure Key": ['Show Exposure '],
- "Comparison Set ID": ['Show comparison set '],
- "Protocol Primary Key": ['Show Epidemiology Meta-Protocol '],
- "Result Primary Key": ['Show Epidemiology Meta-Result '],
- "Experiment ID": ['Show Experiment '],
- "Animal Group ID": ['Show Animal Group '],
- "Endpoint Key": [
- 'Show Endpoint ',
- 'Show Endpoint Complete Summary '
- ],
- "Assessed Outcome Key": ['Show Assessed Outcome '],
- "Result ID": ['Show Result '],
- "Chemical HAWC ID": ['Show In Vitro Chemical '],
- "IVExperiment HAWC ID": ['Show In Vitro Experiment '],
- "IVEndpoint HAWC ID": ['Show In Vitro Endpoint '],
- });
-
- options.entries().forEach(function(v){
- if(headers.has(v.key)) opts.push.apply(opts, v.value);
+ headers = d3.set(d3.map(dp.data[0]).keys());
+ _.each(DataPivotExtension.extByColumnKey(), function(vals, key){
+ if(headers.has(key)){
+ opts.push.apply(
+ opts,
+ vals.map(function(d){
+ return build_opt(d._dpe_name, d._dpe_option_txt);
+ })
+ );
+ }
});
}
return opts;
@@ -3007,10 +3021,10 @@ _.extend(DataPivotExtension, {
});
DataPivotExtension.prototype = {
render_plottip: function(settings, datarow){
- var Cls = settings._dpe_cls,
- key = settings._dpe_key,
- options = settings.options
- Cls.displayAsModal(datarow[key], options);
+ settings._dpe_cls.displayAsModal(
+ datarow[settings._dpe_key],
+ settings._dpe_options
+ );
}
};
diff --git a/project/study/models.py b/project/study/models.py
index 475c00ae..9add0211 100644
--- a/project/study/models.py
+++ b/project/study/models.py
@@ -434,10 +434,10 @@ def invalidate_caches_study(sender, instance, **kwargs):
Model = get_model('animal', 'Endpoint')
filters["animal_group__experiment__study"] = instance.id
elif instance.study_type == 1:
- Model = get_model('epi', 'AssessedOutcome')
- filters["exposure__study_population__study"] = instance.id
+ Model = get_model('epi', 'Outcome')
+ filters["study_population__study"] = instance.id
elif instance.study_type == 4:
- Model = get_model('epi', 'MetaResult')
+ Model = get_model('epimeta', 'MetaResult')
filters["protocol__study"] = instance.id
Study.delete_caches([instance.id])
diff --git a/project/summary/forms.py b/project/summary/forms.py
index 0f43bfc3..b11c90c0 100644
--- a/project/summary/forms.py
+++ b/project/summary/forms.py
@@ -159,8 +159,10 @@ def setInitialValues(self):
if k in [
"animal_group__experiment__study__in",
- "exposure__study_population__study__in",
- "experiment__study__in"]:
+ "study_population__study__in",
+ "experiment__study__in",
+ "protocol__study__in",
+ ]:
self.fields["prefilter_study"].initial = True
self.fields["studies"].initial = v
@@ -210,12 +212,17 @@ def setPrefilters(self, data):
if data.get('prefilter_study') is True:
studies = data.get("studies", [])
- if data.get('evidence_type') == 1: # Epi
- prefilters["exposure__study_population__study__in"] = studies
- elif data.get('evidence_type') == 2: # in-vitro
- prefilters["experiment__study__in"] = studies
- else: # assume bioassay
+ evidence_type = data.get('evidence_type', None)
+ if evidence_type == 0: # Bioassay
prefilters["animal_group__experiment__study__in"] = studies
+ if evidence_type == 1: # Epi
+ prefilters["study_population__study__in"] = studies
+ elif evidence_type == 2: # in-vitro
+ prefilters["experiment__study__in"] = studies
+ elif evidence_type == 4: # meta
+ prefilters["protocol__study__in"] = studies
+ else:
+ raise ValueError("Unknown evidence type")
if data.get('prefilter_system') is True:
prefilters["system__in"] = data.get("systems", [])
diff --git a/project/summary/models.py b/project/summary/models.py
index 2e439cb0..0ec86226 100644
--- a/project/summary/models.py
+++ b/project/summary/models.py
@@ -8,13 +8,13 @@
from study.models import Study
from animal.models import Endpoint
-from epi2.models import Outcome
+from epi.models import Outcome
from epimeta.models import MetaResult
from invitro.models import IVEndpoint
from comments.models import Comment
from animal.exports import EndpointFlatDataPivot
-from epi2.exports import OutcomeDataPivot
+from epi.exports import OutcomeDataPivot
from epimeta.exports import MetaResultFlatDataPivot
from invitro.exports import IVEndpointFlatDataPivot
@@ -560,6 +560,7 @@ class Prefilter(object):
"""
@classmethod
def setFiltersFromForm(cls, filters, d):
+ evidence_type = d.get('evidence_type')
if d.get('prefilter_system'):
filters["system__in"] = d.getlist('systems')
@@ -574,15 +575,28 @@ def setFiltersFromForm(cls, filters, d):
if d.get('prefilter_study'):
studies = d.get("studies", [])
- if d.get('evidence_type') == 1: # Epi
- filters["exposure__study_population__study__in"] = studies
- elif d.get('evidence_type') == 2: # in-vitro
- filters["experiment__study__in"] = studies
- else: # assume bioassay
+ if evidence_type == 0: # Bioassay
filters["animal_group__experiment__study__in"] = studies
+ if evidence_type == 1: # Epi
+ filters["study_population__study__in"] = studies
+ elif evidence_type == 2: # in-vitro
+ filters["experiment__study__in"] = studies
+ elif evidence_type == 4: # meta
+ filters["protocol__study__in"] = studies
+ else:
+ raise ValueError("Unknown evidence type")
if d.get("published_only"):
- filters["animal_group__experiment__study__published"] = True
+ if evidence_type == 0: # Bioassay
+ filters["animal_group__experiment__study__published"] = True
+ if evidence_type == 1: # Epi
+ filters["study_population__study__published"] = True
+ elif evidence_type == 2: # in-vitro
+ filters["experiment__study__published"] = True
+ elif evidence_type == 4: # meta
+ filters["protocol__study__published"] = True
+ else:
+ raise ValueError("Unknown evidence type")
@classmethod
def setFiltersFromObj(cls, filters, prefilters):
diff --git a/project/templates/assessment/assessment_downloads.html b/project/templates/assessment/assessment_downloads.html
index 28f54152..bd12742a 100644
--- a/project/templates/assessment/assessment_downloads.html
+++ b/project/templates/assessment/assessment_downloads.html
@@ -43,7 +43,7 @@
Epidemiology data
- Download
+ Download
Microsoft Excel spreadsheet
diff --git a/project/templates/assessment/baseendpoint_list.html b/project/templates/assessment/baseendpoint_list.html
index fff20fe5..e85c24fd 100644
--- a/project/templates/assessment/baseendpoint_list.html
+++ b/project/templates/assessment/baseendpoint_list.html
@@ -23,7 +23,7 @@
{% endif %}
{% if outcomes > 0 %}
-
+
{{outcomes}} epidemiological outcomes assessed
{% endif %}
diff --git a/project/templates/base.html b/project/templates/base.html
index ac0fcdf7..2c902007 100644
--- a/project/templates/base.html
+++ b/project/templates/base.html
@@ -130,7 +130,7 @@
-
+
diff --git a/project/templates/epi/_epistudy_list.html b/project/templates/epi/_epistudy_list.html
deleted file mode 100644
index 632f92b6..00000000
--- a/project/templates/epi/_epistudy_list.html
+++ /dev/null
@@ -1,21 +0,0 @@
-{% if object_list %}
-
-
-
-
-
-
- Short Citation
-
-
-
- {% for object in object_list %}
-
- {{object}}
-
- {% endfor %}
-
-
-{% else %}
- No epidemiology studies are available.
-{% endif %}
diff --git a/project/templates/epi/_study_population_list.html b/project/templates/epi/_study_population_list.html
deleted file mode 100644
index b27eec80..00000000
--- a/project/templates/epi/_study_population_list.html
+++ /dev/null
@@ -1,40 +0,0 @@
-{% if object_list %}
-
-
- {%if with_study %}
-
-
-
-
- {% else %}
-
-
-
- {% endif %}
-
-
-
- {%if with_study %}
- Study
- {% endif %}
- Name
- Design
- Location
-
-
-
- {% for object in object_list %}
-
- {%if with_study %}
- {{object.study}}
- {% endif %}
- {{object}}
- {{object.get_design_display}}
- {{object.get_location}}
-
- {% endfor %}
-
-
-{% else %}
- No study-populations are available.
-{% endif %}
diff --git a/project/templates/epi2/adjustmentfactor_form.html b/project/templates/epi/adjustmentfactor_form.html
similarity index 100%
rename from project/templates/epi2/adjustmentfactor_form.html
rename to project/templates/epi/adjustmentfactor_form.html
diff --git a/project/templates/epi/assessedoutcome_confirm_delete.html b/project/templates/epi/assessedoutcome_confirm_delete.html
deleted file mode 100644
index 553d1413..00000000
--- a/project/templates/epi/assessedoutcome_confirm_delete.html
+++ /dev/null
@@ -1,15 +0,0 @@
-{% extends 'epi/assessedoutcome_detail.html' %}
-
-{% block title %}
- {{ block.super }} | Delete
-{% endblock title %}
-
-{% block breadcrumbs_self %}
- {{object}} /
- Delete/
-{% endblock breadcrumbs_self %}
-
-{% block content %}
- {{ block.super }}
- {% include "hawc/_delete_block.html" with name="assessed outcome" notes="" %}
-{% endblock content %}
diff --git a/project/templates/epi/assessedoutcome_copy_selector.html b/project/templates/epi/assessedoutcome_copy_selector.html
deleted file mode 100644
index 52405388..00000000
--- a/project/templates/epi/assessedoutcome_copy_selector.html
+++ /dev/null
@@ -1,39 +0,0 @@
-{% extends 'epi/exposure_detail.html' %}
-
-
-{% load add_class %}
-{% load selectable_tags %}
-
-{% block title %}
- {{block.super}} | Copy Assessed Outcome
-{% endblock title %}
-
-{% block extrastyle %}
- {% include_ui_theme %}
-{% endblock %}
-
-{% block breadcrumbs_self %}
- {{object}} /
- Copy outcome/
-{% endblock breadcrumbs_self %}
-
-{% block content %}
-
- {% include "hawc/_copy_as_new.html" with name="assessed outcome" notes="Select an existing assessed outcome as a template to create a new one." %}
-
-{% endblock content %}
-
-{% block extrajs %}
- {{ form.media }}
-
-{% endblock extrajs %}
-
diff --git a/project/templates/epi/assessedoutcome_detail.html b/project/templates/epi/assessedoutcome_detail.html
deleted file mode 100644
index be6a7013..00000000
--- a/project/templates/epi/assessedoutcome_detail.html
+++ /dev/null
@@ -1,56 +0,0 @@
-{% extends 'portal.html' %}
-
-
-{% block title %}{{assessment}} | {{object.exposure.study_population.study}} | {{object.exposure.study_population}} | {{object.exposure}} | {{object}} {% endblock title %}
-
-{% block breadcrumbs %}
- {{assessment}} /
- {{object.exposure.study_population.study}} /
- {{object.exposure.study_population|truncatechars:40}} /
- {{object.exposure}} /
- {% block breadcrumbs_self %}
- {{object}}/
- {% endblock breadcrumbs_self %}
-{% endblock %}
-
-{% block content %}
-
- {{object}}
- {% if obj_perms.edit and crud == "Read" %}
-
- {% endif %}
-
-
- Assessed outcome description
-
-
- {% if object.groups.count > 0 %}
- Results by exposure-group
-
-
-
- {% endif %}
-{% endblock %}
-
-{% block extrajs %}
-
-{% endblock %}
diff --git a/project/templates/epi/assessedoutcome_form.html b/project/templates/epi/assessedoutcome_form.html
deleted file mode 100644
index ff0ef048..00000000
--- a/project/templates/epi/assessedoutcome_form.html
+++ /dev/null
@@ -1,89 +0,0 @@
-{% extends 'portal.html' %}
-
-{% load selectable_tags %}
-{% load crispy_forms_tags %}
-
-{% block title %}
- {{assessment}} |
- {% if crud == "Create" %}
- {{object.study_population.study}} | {{object.study_population}} | {{object}} | Create Assessed Outcome
- {% elif crud == "Update" %}
- {{object.exposure.study_population.study}} | {{object.exposure.study_population}} | {{object.exposure}} | Update {{object}}
- {% endif %}
-{% endblock title %}
-
-{% block extrastyle %}
- {% include_ui_theme %}
-{% endblock %}
-
-{% block breadcrumbs %}
- {{assessment}} /
- {% if crud == "Create" %}
- {{object.study_population.study}} /
- {{object.study_population|truncatechars:40}} /
- {{object}} /
- Create Asessed Outcome
- {% elif crud == "Update" %}
- {{object.exposure.study_population.study}} /
- {{object.exposure.study_population|truncatechars:40}} /
- {{object.exposure}} /
- {{object}} /
- Update
- {% endif %}
-{% endblock %}
-
-{% block content %}
-
-
- {% crispy form %}
-
-
-
-
-{% endblock %}
-
-{% block extrajs %}
- {{ form.media }}
-
-{% endblock extrajs %}
diff --git a/project/templates/epi/assessedoutcome_list.html b/project/templates/epi/assessedoutcome_list.html
deleted file mode 100644
index 946c4253..00000000
--- a/project/templates/epi/assessedoutcome_list.html
+++ /dev/null
@@ -1,47 +0,0 @@
-{% extends 'portal.html' %}
-{% load add_class %}
-
-{% block title %}{{assessment}} | Assessed outcomes | HAWC {% endblock title %}
-
-{% block breadcrumbs %}
- {{ assessment }} /
- Endpoints /
- Epidemiological outcomes/
-{% endblock %}
-
-{% block content %}
-
- Assessed outcomes ({{page_obj.paginator.count}} found)
-
-
-
- {% for object in object_list %}
- {{object}}
- {% empty %}
- No assessed outcomes are available.
- {% endfor %}
-
-
-
- {% if is_paginated %}
-
- {% endif %}
-
-{% endblock content %}
diff --git a/project/templates/epi/assessedoutcome_versions.html b/project/templates/epi/assessedoutcome_versions.html
deleted file mode 100644
index 06301106..00000000
--- a/project/templates/epi/assessedoutcome_versions.html
+++ /dev/null
@@ -1,76 +0,0 @@
-{% extends 'portal.html' %}
-
-{% block title %}{{assessment}} | {{object.exposure.study_population.study}} | {{object.exposure.study_population}} | {{object.exposure}} | {{object}} | Versions {% endblock title %}
-
-{% block breadcrumbs %}
- {{assessment}} /
- {{object.exposure.study_population.study}} /
- {{object.exposure.study_population|truncatechars:40}} /
- {{object.exposure}} /
- {{object}} /
- Versions/
-{% endblock %}
-
-
-{% block content %}
- Prior Versions of {{object}}
-
- AJS to revise here. First, get just print raw table. Then, get confounder m2m values and add. Finally, get aop values and build table.
-
-
-
-
Comparison
-
-
-
-
-
-
- Field Current
-
-
- Additions to the primary version shown in green .
- Deletions to primary version shown in red .
-
-
- Assessed Outcome Name
- Main Findings
- Statistical Metric
- Outcome N
- Diagnostic Description
- Prevalence Incidence
- Date Created
- Last Updated
-
-
-
-
-
Version List
-
-
- {{object}} versions
- (hover for instructions)
-
-
-
- Primary version highlighted in blue.
- Secondary version highlighted in red.
-
-
-
-
-
-
-
-{% endblock content %}
-
-{% block extrajs %}
-
-{% endblock extrajs %}
diff --git a/project/templates/epi2/comparisonset_confirm_delete.html b/project/templates/epi/comparisonset_confirm_delete.html
similarity index 90%
rename from project/templates/epi2/comparisonset_confirm_delete.html
rename to project/templates/epi/comparisonset_confirm_delete.html
index 073b750d..3c9fe15c 100644
--- a/project/templates/epi2/comparisonset_confirm_delete.html
+++ b/project/templates/epi/comparisonset_confirm_delete.html
@@ -1,4 +1,4 @@
-{% extends 'epi2/comparisonset_detail.html' %}
+{% extends 'epi/comparisonset_detail.html' %}
{% block title %}
{% include "hawc/siteTitle.html" with crumbs=object.get_crumbs crud=crud %}
diff --git a/project/templates/epi2/comparisonset_detail.html b/project/templates/epi/comparisonset_detail.html
similarity index 85%
rename from project/templates/epi2/comparisonset_detail.html
rename to project/templates/epi/comparisonset_detail.html
index 3faaee73..ba2de7bb 100644
--- a/project/templates/epi2/comparisonset_detail.html
+++ b/project/templates/epi/comparisonset_detail.html
@@ -18,8 +18,8 @@
{% endif %}
diff --git a/project/templates/epi2/comparisonset_form.html b/project/templates/epi/comparisonset_form.html
similarity index 100%
rename from project/templates/epi2/comparisonset_form.html
rename to project/templates/epi/comparisonset_form.html
diff --git a/project/templates/epi2/comparisonset_outcome_copy_selector.html b/project/templates/epi/comparisonset_outcome_copy_selector.html
similarity index 84%
rename from project/templates/epi2/comparisonset_outcome_copy_selector.html
rename to project/templates/epi/comparisonset_outcome_copy_selector.html
index cdd8b552..e6149a61 100644
--- a/project/templates/epi2/comparisonset_outcome_copy_selector.html
+++ b/project/templates/epi/comparisonset_outcome_copy_selector.html
@@ -1,4 +1,4 @@
-{% extends 'epi2/outcome_detail.html' %}
+{% extends 'epi/outcome_detail.html' %}
{% load add_class %}
@@ -25,7 +25,7 @@
new HAWCUtils.InitialForm({
"form": $('form'),
- "base_url": "{% url 'epi2:cs_outcome_create' object.pk %}"
+ "base_url": "{% url 'epi:cs_outcome_create' object.pk %}"
});
});
diff --git a/project/templates/epi2/comparisonset_sp_copy_selector.html b/project/templates/epi/comparisonset_sp_copy_selector.html
similarity index 84%
rename from project/templates/epi2/comparisonset_sp_copy_selector.html
rename to project/templates/epi/comparisonset_sp_copy_selector.html
index 83a6c9fd..a72870db 100644
--- a/project/templates/epi2/comparisonset_sp_copy_selector.html
+++ b/project/templates/epi/comparisonset_sp_copy_selector.html
@@ -1,4 +1,4 @@
-{% extends 'epi2/studypopulation_detail.html' %}
+{% extends 'epi/studypopulation_detail.html' %}
{% load add_class %}
@@ -25,7 +25,7 @@
new HAWCUtils.InitialForm({
"form": $('form'),
- "base_url": "{% url 'epi2:cs_create' object.pk %}"
+ "base_url": "{% url 'epi:cs_create' object.pk %}"
});
});
diff --git a/project/templates/epi2/criteria_form.html b/project/templates/epi/criteria_form.html
similarity index 100%
rename from project/templates/epi2/criteria_form.html
rename to project/templates/epi/criteria_form.html
diff --git a/project/templates/epi/exposure_confirm_delete.html b/project/templates/epi/exposure_confirm_delete.html
index 53147bef..ddeb80ca 100644
--- a/project/templates/epi/exposure_confirm_delete.html
+++ b/project/templates/epi/exposure_confirm_delete.html
@@ -1,15 +1,14 @@
{% extends 'epi/exposure_detail.html' %}
{% block title %}
- {{ block.super }} | Delete
+ {% include "hawc/siteTitle.html" with crumbs=object.get_crumbs crud=crud %}
{% endblock title %}
-{% block breadcrumbs_self %}
- {{object}} /
- Delete/
-{% endblock breadcrumbs_self %}
+{% block breadcrumbs %}
+ {% include "hawc/breadcrumbs.html" with crumbs=object.get_crumbs crud=crud %}
+{% endblock %}
{% block content %}
{{ block.super }}
- {% include "hawc/_delete_block.html" with name="exposure" notes="This will remove individual exposure-groups and assessed outcomes related to this exposure." %}
+ {% include "hawc/_delete_block.html" with name="exposure" notes="" %}
{% endblock content %}
diff --git a/project/templates/epi/exposure_copy_selector.html b/project/templates/epi/exposure_copy_selector.html
index 1b8d1870..8981ba95 100644
--- a/project/templates/epi/exposure_copy_selector.html
+++ b/project/templates/epi/exposure_copy_selector.html
@@ -1,6 +1,5 @@
{% extends 'epi/studypopulation_detail.html' %}
-
{% load add_class %}
{% load selectable_tags %}
@@ -12,11 +11,6 @@
{% include_ui_theme %}
{% endblock %}
-{% block breadcrumbs_self %}
- {{object}} /
- Copy outcome/
-{% endblock breadcrumbs_self %}
-
{% block content %}
{% include "hawc/_copy_as_new.html" with name="exposure" notes="Select an existing exposure as a template to create a new one." %}
@@ -30,7 +24,7 @@
new HAWCUtils.InitialForm({
"form": $('form'),
- "base_url": "{% url 'epi:exposure_create' object.pk %}"
+ "base_url": "{% url 'epi:exp_create' object.pk %}"
});
});
diff --git a/project/templates/epi/exposure_detail.html b/project/templates/epi/exposure_detail.html
index c9d2957c..c4c604b1 100644
--- a/project/templates/epi/exposure_detail.html
+++ b/project/templates/epi/exposure_detail.html
@@ -1,63 +1,36 @@
{% extends 'portal.html' %}
-
-{% block title %}{{assessment}} | {{object.study_population.study}} | {{object.study_population}} | {{object}} {% endblock title %}
+{% block title %}
+ {% include "hawc/siteTitle.html" with crumbs=object.get_crumbs crud=crud %}
+{% endblock title %}
{% block breadcrumbs %}
- {{assessment}} /
- {{object.study_population.study}} /
- {{object.study_population|truncatechars:40}} /
- {% block breadcrumbs_self %}
- {{object}}/
- {% endblock breadcrumbs_self %}
+ {% include "hawc/breadcrumbs.html" with crumbs=object.get_crumbs crud=crud %}
{% endblock %}
{% block content %}
-
- {{object}}
- {% if obj_perms.edit and crud == "Read" %}
-
- {% endif %}
-
-
- {% if crud == "Read" %}
- Assessed Outcomes
-
- {% for ao in object.outcomes.all %}
- {{ao}}
- {% empty %}
- No assessed-outcomes are available for this exposure.
- {% endfor %}
-
- {% endif %}
-
+ {{object.name}}
+ {% if obj_perms.edit and crud == "Read" %}
+
+ {% endif %}
+
+
{% endblock %}
{% block extrajs %}
{% endblock %}
diff --git a/project/templates/epi/exposure_form.html b/project/templates/epi/exposure_form.html
index 5587c0f1..aa82e257 100644
--- a/project/templates/epi/exposure_form.html
+++ b/project/templates/epi/exposure_form.html
@@ -1,61 +1,20 @@
{% extends 'portal.html' %}
+{% load selectable_tags %}
{% load crispy_forms_tags %}
-{% load add_class %}
{% block title %}
- {{assessment}} |
- {% if crud == "Create" %}
- {{study_population.study}} | {{study_population}} | Create Exposure
- {% elif crud == "Update" %}
- {{object.study_population.study}} | {{object.study_population}} | Update {{object}}
- {% endif %}
+ {% include "hawc/siteTitle.html" with crumbs=form.instance.get_crumbs crud=crud %}
{% endblock title %}
+{% block extrastyle %}
+ {% include_ui_theme %}
+{% endblock %}
+
{% block breadcrumbs %}
- {{assessment}} /
- {% if crud == "Create" %}
- {{study_population.study}} /
- {{study_population|truncatechars:40}} /
- Create Exposure
- {% elif crud == "Update" %}
- {{object.study_population.study}} /
- {{object.study_population|truncatechars:40}} /
- {{object}} /
- Update
- {% endif %}
+ {% include "hawc/breadcrumbs.html" with crumbs=form.instance.get_crumbs crud=crud %}
{% endblock %}
{% block content %}
-
-
{% crispy form %}
-
-
-
- {# Exposure Group formset #}
- Exposure Groups
- +
-
- {% if crud == "Create" %}
- Exposure-groups are associated with each exposure, and each is a subset of the exposure population. The total number of individuals in all exposure groups should equal the total number of individuals in the exposure-population. For example, exposure-group descriptions may be "quartile 1 (≤1.0)", "quartile 2 (1.0-2.5)", etc.
- Once created, additional exposure groups cannot be added. It is assumed that the first exposure-group has the lowest exposure, with each subsequent group having a greater exposure. Up to a maximum of eight exposure-groups can be added.
- {% endif %}
- {% include "hawc/_formset_table_template.html" with showDeleteRow=True %}
-
-
{% endblock %}
-
-{% block extrajs %}
-
-{% endblock extrajs %}
diff --git a/project/templates/epi/factor_form.html b/project/templates/epi/factor_form.html
deleted file mode 100644
index ffce549d..00000000
--- a/project/templates/epi/factor_form.html
+++ /dev/null
@@ -1,48 +0,0 @@
-{% extends 'base.html' %}
-
-{% load add_class %}
-{% load selectable_tags %}
-
-{% block title %}{{assessment}} | Create Factor {% endblock title %}
-
-{% block extrastyle %}
- {% include_ui_theme %}
-{% endblock %}
-
-{% block main_content %}
-
-
-
-{% endblock main_content %}
-
-{% block extrajs %}
- {{ form.media }}
-{% endblock extrajs %}
diff --git a/project/templates/epi2/group_detail.html b/project/templates/epi/group_detail.html
similarity index 92%
rename from project/templates/epi2/group_detail.html
rename to project/templates/epi/group_detail.html
index 02425484..a3b54cf4 100644
--- a/project/templates/epi2/group_detail.html
+++ b/project/templates/epi/group_detail.html
@@ -17,7 +17,7 @@
{% endif %}
diff --git a/project/templates/epi2/group_form.html b/project/templates/epi/group_form.html
similarity index 100%
rename from project/templates/epi2/group_form.html
rename to project/templates/epi/group_form.html
diff --git a/project/templates/epi2/outcome_confirm_delete.html b/project/templates/epi/outcome_confirm_delete.html
similarity index 90%
rename from project/templates/epi2/outcome_confirm_delete.html
rename to project/templates/epi/outcome_confirm_delete.html
index 42a1161b..1096e243 100644
--- a/project/templates/epi2/outcome_confirm_delete.html
+++ b/project/templates/epi/outcome_confirm_delete.html
@@ -1,4 +1,4 @@
-{% extends 'epi2/outcome_detail.html' %}
+{% extends 'epi/outcome_detail.html' %}
{% block title %}
{% include "hawc/siteTitle.html" with crumbs=object.get_crumbs crud=crud %}
diff --git a/project/templates/epi2/outcome_copy_selector.html b/project/templates/epi/outcome_copy_selector.html
similarity index 83%
rename from project/templates/epi2/outcome_copy_selector.html
rename to project/templates/epi/outcome_copy_selector.html
index ab978ce6..701d15db 100644
--- a/project/templates/epi2/outcome_copy_selector.html
+++ b/project/templates/epi/outcome_copy_selector.html
@@ -1,4 +1,4 @@
-{% extends 'epi2/studypopulation_detail.html' %}
+{% extends 'epi/studypopulation_detail.html' %}
{% load add_class %}
@@ -25,7 +25,7 @@
new HAWCUtils.InitialForm({
"form": $('form'),
- "base_url": "{% url 'epi2:outcome_create' object.pk %}"
+ "base_url": "{% url 'epi:outcome_create' object.pk %}"
});
});
diff --git a/project/templates/epi2/outcome_detail.html b/project/templates/epi/outcome_detail.html
similarity index 68%
rename from project/templates/epi2/outcome_detail.html
rename to project/templates/epi/outcome_detail.html
index ddd3b073..dba8b7c4 100644
--- a/project/templates/epi2/outcome_detail.html
+++ b/project/templates/epi/outcome_detail.html
@@ -18,15 +18,15 @@
diff --git a/project/templates/epi2/outcome_form.html b/project/templates/epi/outcome_form.html
similarity index 100%
rename from project/templates/epi2/outcome_form.html
rename to project/templates/epi/outcome_form.html
diff --git a/project/templates/epi2/outcome_list.html b/project/templates/epi/outcome_list.html
similarity index 100%
rename from project/templates/epi2/outcome_list.html
rename to project/templates/epi/outcome_list.html
diff --git a/project/templates/epi2/result_confirm_delete.html b/project/templates/epi/result_confirm_delete.html
similarity index 91%
rename from project/templates/epi2/result_confirm_delete.html
rename to project/templates/epi/result_confirm_delete.html
index 612015b6..e051486c 100644
--- a/project/templates/epi2/result_confirm_delete.html
+++ b/project/templates/epi/result_confirm_delete.html
@@ -1,4 +1,4 @@
-{% extends 'epi2/result_detail.html' %}
+{% extends 'epi/result_detail.html' %}
{% block title %}
{% include "hawc/siteTitle.html" with crumbs=object.get_crumbs crud=crud %}
diff --git a/project/templates/epi2/result_copy_selector.html b/project/templates/epi/result_copy_selector.html
similarity index 83%
rename from project/templates/epi2/result_copy_selector.html
rename to project/templates/epi/result_copy_selector.html
index 5b12a60a..47ea03a7 100644
--- a/project/templates/epi2/result_copy_selector.html
+++ b/project/templates/epi/result_copy_selector.html
@@ -1,4 +1,4 @@
-{% extends 'epi2/studypopulation_detail.html' %}
+{% extends 'epi/studypopulation_detail.html' %}
{% load add_class %}
@@ -25,7 +25,7 @@
new HAWCUtils.InitialForm({
"form": $('form'),
- "base_url": "{% url 'epi2:result_create' object.pk %}"
+ "base_url": "{% url 'epi:result_create' object.pk %}"
});
});
diff --git a/project/templates/epi2/result_detail.html b/project/templates/epi/result_detail.html
similarity index 84%
rename from project/templates/epi2/result_detail.html
rename to project/templates/epi/result_detail.html
index df861ba1..47b6d141 100644
--- a/project/templates/epi2/result_detail.html
+++ b/project/templates/epi/result_detail.html
@@ -18,8 +18,8 @@
{% endif %}
diff --git a/project/templates/epi2/result_form.html b/project/templates/epi/result_form.html
similarity index 98%
rename from project/templates/epi2/result_form.html
rename to project/templates/epi/result_form.html
index b91e384a..22a356fc 100644
--- a/project/templates/epi2/result_form.html
+++ b/project/templates/epi/result_form.html
@@ -83,7 +83,7 @@
// bind formset change to group-change
$('#id_comparison_set').change(function(){
var val = parseInt(this.value),
- url = "/epi2/api/comparison-set/{0}/".printf(val);
+ url = "/epi/api/comparison-set/{0}/".printf(val);
if (_.isNaN(val)){
updateFormset();
} else if (val !== comparison_set_id || isNew){
diff --git a/project/templates/epi/studycriteria_form.html b/project/templates/epi/studycriteria_form.html
deleted file mode 100644
index 1c91cae1..00000000
--- a/project/templates/epi/studycriteria_form.html
+++ /dev/null
@@ -1,48 +0,0 @@
-{% extends 'base.html' %}
-
-{% load add_class %}
-{% load selectable_tags %}
-
-{% block title %}{{assessment}} | {{ crud }} Study Criteria {% endblock title %}
-
-{% block extrastyle %}
- {% include_ui_theme %}
-{% endblock %}
-
-{% block main_content %}
-
-
-
-{% endblock main_content %}
-
-{% block extrajs %}
- {{ form.media }}
-{% endblock extrajs %}
diff --git a/project/templates/epi/studypopulation_confirm_delete.html b/project/templates/epi/studypopulation_confirm_delete.html
index 477d1040..d69ff8d1 100644
--- a/project/templates/epi/studypopulation_confirm_delete.html
+++ b/project/templates/epi/studypopulation_confirm_delete.html
@@ -1,15 +1,14 @@
{% extends 'epi/studypopulation_detail.html' %}
{% block title %}
- {{ block.super }} | Delete
+ {% include "hawc/siteTitle.html" with crumbs=object.get_crumbs crud=crud %}
{% endblock title %}
-{% block breadcrumbs_self %}
- {{object|truncatechars:40}} /
- Delete/
-{% endblock breadcrumbs_self %}
+{% block breadcrumbs %}
+ {% include "hawc/breadcrumbs.html" with crumbs=object.get_crumbs crud=crud %}
+{% endblock %}
{% block content %}
{{ block.super }}
- {% include "hawc/_delete_block.html" with name="study population" notes="This will remove all exposures and assessed outcomes related to this population." %}
+ {% include "hawc/_delete_block.html" with name="study population" notes="This will remove all content associated with this population." %}
{% endblock content %}
diff --git a/project/templates/epi/studypopulation_detail.html b/project/templates/epi/studypopulation_detail.html
index 2ad008cf..ba0c534f 100644
--- a/project/templates/epi/studypopulation_detail.html
+++ b/project/templates/epi/studypopulation_detail.html
@@ -1,59 +1,47 @@
{% extends 'portal.html' %}
-{% block title %}{{assessment}} | {{object.study}} | Study Population {% endblock title %}
+{% block title %}
+ {% include "hawc/siteTitle.html" with crumbs=object.get_crumbs crud=crud %}
+{% endblock title %}
{% block breadcrumbs %}
- {{assessment}} /
- {{object.study}} /
- {% block breadcrumbs_self %}
- {{object|truncatechars:40}}/
- {% endblock breadcrumbs_self %}
+ {% include "hawc/breadcrumbs.html" with crumbs=object.get_crumbs crud=crud %}
{% endblock %}
{% block content %}
-
- {{object}}
- {% if obj_perms.edit and crud == "Read" %}
-
- {% endif %}
-
-
-
-
- {% if crud == "Read" %}
- Available exposures
-
- {% for exposure in object.exposures.all %}
- {{exposure}}
- {% empty %}
- No exposures are available for this study population.
- {% endfor %}
-
- {% endif %}
-
+ {{object.name}}
+ {% if obj_perms.edit and crud == "Read" %}
+
+ {% endif %}
+
+
{% endblock %}
{% block extrajs %}
{% endblock %}
diff --git a/project/templates/epi/studypopulation_form.html b/project/templates/epi/studypopulation_form.html
index dc850345..cf46668b 100644
--- a/project/templates/epi/studypopulation_form.html
+++ b/project/templates/epi/studypopulation_form.html
@@ -3,13 +3,9 @@
{% load selectable_tags %}
{% load crispy_forms_tags %}
+
{% block title %}
- {{assessment}} |
- {% if crud == "Create" %}
- {{study}} | Create Study Population
- {% elif crud == "Update" %}
- {{object.study}} | Update {{object}}
- {% endif %}
+ {% include "hawc/siteTitle.html" with crumbs=form.instance.get_crumbs crud=crud %}
{% endblock title %}
{% block extrastyle %}
@@ -17,15 +13,7 @@
{% endblock %}
{% block breadcrumbs %}
- {{assessment}} /
- {% if crud == "Create" %}
- {{study}} /
- Create Study Population
- {% elif crud == "Update" %}
- {{object.study}} /
- {{object}} /
- Update
- {% endif %}
+ {% include "hawc/breadcrumbs.html" with crumbs=form.instance.get_crumbs crud=crud %}
{% endblock %}
{% block content %}
@@ -34,4 +22,19 @@
{% block extrajs %}
{{ form.media }}
+
{% endblock extrajs %}
diff --git a/project/templates/epi2/exposure2_confirm_delete.html b/project/templates/epi2/exposure2_confirm_delete.html
deleted file mode 100644
index 5386d473..00000000
--- a/project/templates/epi2/exposure2_confirm_delete.html
+++ /dev/null
@@ -1,14 +0,0 @@
-{% extends 'epi2/exposure2_detail.html' %}
-
-{% block title %}
- {% include "hawc/siteTitle.html" with crumbs=object.get_crumbs crud=crud %}
-{% endblock title %}
-
-{% block breadcrumbs %}
- {% include "hawc/breadcrumbs.html" with crumbs=object.get_crumbs crud=crud %}
-{% endblock %}
-
-{% block content %}
- {{ block.super }}
- {% include "hawc/_delete_block.html" with name="exposure" notes="" %}
-{% endblock content %}
diff --git a/project/templates/epi2/exposure2_detail.html b/project/templates/epi2/exposure2_detail.html
deleted file mode 100644
index 6c7805f9..00000000
--- a/project/templates/epi2/exposure2_detail.html
+++ /dev/null
@@ -1,36 +0,0 @@
-{% extends 'portal.html' %}
-
-{% block title %}
- {% include "hawc/siteTitle.html" with crumbs=object.get_crumbs crud=crud %}
-{% endblock title %}
-
-{% block breadcrumbs %}
- {% include "hawc/breadcrumbs.html" with crumbs=object.get_crumbs crud=crud %}
-{% endblock %}
-
-{% block content %}
- {{object.name}}
- {% if obj_perms.edit and crud == "Read" %}
-
- {% endif %}
-
-
-{% endblock %}
-
-
-{% block extrajs %}
-
-{% endblock %}
diff --git a/project/templates/epi2/exposure2_form.html b/project/templates/epi2/exposure2_form.html
deleted file mode 100644
index aa82e257..00000000
--- a/project/templates/epi2/exposure2_form.html
+++ /dev/null
@@ -1,20 +0,0 @@
-{% extends 'portal.html' %}
-
-{% load selectable_tags %}
-{% load crispy_forms_tags %}
-
-{% block title %}
- {% include "hawc/siteTitle.html" with crumbs=form.instance.get_crumbs crud=crud %}
-{% endblock title %}
-
-{% block extrastyle %}
- {% include_ui_theme %}
-{% endblock %}
-
-{% block breadcrumbs %}
- {% include "hawc/breadcrumbs.html" with crumbs=form.instance.get_crumbs crud=crud %}
-{% endblock %}
-
-{% block content %}
- {% crispy form %}
-{% endblock %}
diff --git a/project/templates/epi2/exposure_copy_selector.html b/project/templates/epi2/exposure_copy_selector.html
deleted file mode 100644
index 444dec4d..00000000
--- a/project/templates/epi2/exposure_copy_selector.html
+++ /dev/null
@@ -1,33 +0,0 @@
-{% extends 'epi2/studypopulation_detail.html' %}
-
-{% load add_class %}
-{% load selectable_tags %}
-
-{% block title %}
- {{block.super}} | Copy Exposure
-{% endblock title %}
-
-{% block extrastyle %}
- {% include_ui_theme %}
-{% endblock %}
-
-{% block content %}
-
- {% include "hawc/_copy_as_new.html" with name="exposure" notes="Select an existing exposure as a template to create a new one." %}
-
-{% endblock content %}
-
-{% block extrajs %}
- {{ form.media }}
-
-{% endblock extrajs %}
-
diff --git a/project/templates/epi2/studypopulation_confirm_delete.html b/project/templates/epi2/studypopulation_confirm_delete.html
deleted file mode 100644
index 9b2e3468..00000000
--- a/project/templates/epi2/studypopulation_confirm_delete.html
+++ /dev/null
@@ -1,14 +0,0 @@
-{% extends 'epi2/studypopulation_detail.html' %}
-
-{% block title %}
- {% include "hawc/siteTitle.html" with crumbs=object.get_crumbs crud=crud %}
-{% endblock title %}
-
-{% block breadcrumbs %}
- {% include "hawc/breadcrumbs.html" with crumbs=object.get_crumbs crud=crud %}
-{% endblock %}
-
-{% block content %}
- {{ block.super }}
- {% include "hawc/_delete_block.html" with name="study population" notes="This will remove all content associated with this population." %}
-{% endblock content %}
diff --git a/project/templates/epi2/studypopulation_copy_selector.html b/project/templates/epi2/studypopulation_copy_selector.html
deleted file mode 100644
index a57e5c0d..00000000
--- a/project/templates/epi2/studypopulation_copy_selector.html
+++ /dev/null
@@ -1,39 +0,0 @@
-{% extends 'study/study_detail.html' %}
-
-
-{% load add_class %}
-{% load selectable_tags %}
-
-{% block title %}
- {{block.super}} | Copy Study Population
-{% endblock title %}
-
-{% block extrastyle %}
- {% include_ui_theme %}
-{% endblock %}
-
-{% block breadcrumbs_self %}
- {{object}} /
- Copy study population/
-{% endblock breadcrumbs_self %}
-
-{% block content %}
-
- {% include "hawc/_copy_as_new.html" with name="study population" notes="Select an existing study population as a template to create a new one." %}
-
-{% endblock content %}
-
-{% block extrajs %}
- {{ form.media }}
-
-{% endblock extrajs %}
-
diff --git a/project/templates/epi2/studypopulation_detail.html b/project/templates/epi2/studypopulation_detail.html
deleted file mode 100644
index 88ecc084..00000000
--- a/project/templates/epi2/studypopulation_detail.html
+++ /dev/null
@@ -1,47 +0,0 @@
-{% extends 'portal.html' %}
-
-{% block title %}
- {% include "hawc/siteTitle.html" with crumbs=object.get_crumbs crud=crud %}
-{% endblock title %}
-
-{% block breadcrumbs %}
- {% include "hawc/breadcrumbs.html" with crumbs=object.get_crumbs crud=crud %}
-{% endblock %}
-
-{% block content %}
- {{object.name}}
- {% if obj_perms.edit and crud == "Read" %}
-
- {% endif %}
-
-
-{% endblock %}
-
-
-{% block extrajs %}
-
-{% endblock %}
diff --git a/project/templates/epi2/studypopulation_form.html b/project/templates/epi2/studypopulation_form.html
deleted file mode 100644
index cf46668b..00000000
--- a/project/templates/epi2/studypopulation_form.html
+++ /dev/null
@@ -1,40 +0,0 @@
-{% extends 'portal.html' %}
-
-{% load selectable_tags %}
-{% load crispy_forms_tags %}
-
-
-{% block title %}
- {% include "hawc/siteTitle.html" with crumbs=form.instance.get_crumbs crud=crud %}
-{% endblock title %}
-
-{% block extrastyle %}
- {% include_ui_theme %}
-{% endblock %}
-
-{% block breadcrumbs %}
- {% include "hawc/breadcrumbs.html" with crumbs=form.instance.get_crumbs crud=crud %}
-{% endblock %}
-
-{% block content %}
- {% crispy form %}
-{% endblock %}
-
-{% block extrajs %}
- {{ form.media }}
-
-{% endblock extrajs %}
diff --git a/project/templates/study/study_detail.html b/project/templates/study/study_detail.html
index 32b4d29f..4d6f80a4 100644
--- a/project/templates/study/study_detail.html
+++ b/project/templates/study/study_detail.html
@@ -44,8 +44,8 @@
Create new
{% elif object.study_type == 1 %}
Study Population
- Create new
- Copy from existing
+ Create new
+ Copy from existing
{% elif object.study_type == 4 %}
Meta-analysis
Create new
@@ -76,7 +76,7 @@
{% elif study.study_type == 1 %}
Available study populations
- {% for obj in object.study_populations2.all %}
+ {% for obj in object.study_populations.all %}
{{obj}}
{% endfor %}
@@ -85,7 +85,7 @@
{% include "invitro/_experiment_list.html" with object_list=object.ivexperiments.all %}
{% elif study.study_type == 4 %}
Available epidemiological meta-analyses
- {% include "epimeta/_metaprotocol_list.html" with object_list=object.meta_protocols2.all %}
+ {% include "epimeta/_metaprotocol_list.html" with object_list=object.meta_protocols.all %}
{% endif %}