Skip to content
Snippets Groups Projects
Commit f0dabbe5 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

filtering by serology added

parent 19c55285
No related branches found
No related tags found
1 merge request!253Resolve "import of serology data"
...@@ -109,12 +109,12 @@ def get_subject_columns(request, subject_list_type): ...@@ -109,12 +109,12 @@ def get_subject_columns(request, subject_list_type):
"Visit {} IgA Status".format(virus_visit_number), "Visit {} IgA Status".format(virus_visit_number),
"virus_test_{}_iga_status".format(one_based_idx), "virus_test_{}_iga_status".format(one_based_idx),
study_subject_columns, study_subject_columns,
None, study.columns) 'serology_filter', study.columns)
add_column(result, add_column(result,
"Visit {} IgG Status".format(virus_visit_number), "Visit {} IgG Status".format(virus_visit_number),
"virus_test_{}_igg_status".format(one_based_idx), "virus_test_{}_igg_status".format(one_based_idx),
study_subject_columns, study_subject_columns,
None, study.columns) 'serology_filter', study.columns)
add_column(result, "Type", "type", study_subject_columns, "type_filter", study.columns) add_column(result, "Type", "type", study_subject_columns, "type_filter", study.columns)
add_column(result, "Edit", "edit", None, None, sortable=False) add_column(result, "Edit", "edit", None, None, sortable=False)
...@@ -399,6 +399,26 @@ def get_subjects_filtered(subjects_to_be_filtered, filters): ...@@ -399,6 +399,26 @@ def get_subjects_filtered(subjects_to_be_filtered, filters):
result = result.filter(virus_test_5__isnull=True, virus_test_5_updated__isnull=False) result = result.filter(virus_test_5__isnull=True, virus_test_5_updated__isnull=False)
else: else:
result = result.filter(virus_test_5=(value == "true")) result = result.filter(virus_test_5=(value == "true"))
elif column == "virus_test_1_iga_status":
result = result.filter( virus_test_1_iga_status=value)
elif column == "virus_test_1_igg_status":
result = result.filter( virus_test_1_igg_status=value)
elif column == "virus_test_2_iga_status":
result = result.filter( virus_test_2_iga_status=value)
elif column == "virus_test_2_igg_status":
result = result.filter( virus_test_2_igg_status=value)
elif column == "virus_test_3_iga_status":
result = result.filter( virus_test_3_iga_status=value)
elif column == "virus_test_3_igg_status":
result = result.filter( virus_test_3_igg_status=value)
elif column == "virus_test_4_iga_status":
result = result.filter( virus_test_4_iga_status=value)
elif column == "virus_test_4_igg_status":
result = result.filter( virus_test_4_igg_status=value)
elif column == "virus_test_5_iga_status":
result = result.filter( virus_test_5_iga_status=value)
elif column == "virus_test_5_igg_status":
result = result.filter( virus_test_5_igg_status=value)
elif column == "brain_donation_agreement": elif column == "brain_donation_agreement":
result = result.filter(brain_donation_agreement=(value == "true")) result = result.filter(brain_donation_agreement=(value == "true"))
elif column == "postponed": elif column == "postponed":
......
...@@ -306,6 +306,9 @@ function createTable(params) { ...@@ -306,6 +306,9 @@ function createTable(params) {
$(tableElement).find('tfoot div[name="yes_no_null_inconclusive_filter"]').each(function () { $(tableElement).find('tfoot div[name="yes_no_null_inconclusive_filter"]').each(function () {
$(this).html('<select style="width:100px" ><option value selected="selected">---</option><option value="true">Positive</option><option value="false">Negative</option><option value="null">N/A</option><option value="inconclusive">Inconclusive</option></select>'); $(this).html('<select style="width:100px" ><option value selected="selected">---</option><option value="true">Positive</option><option value="false">Negative</option><option value="null">N/A</option><option value="inconclusive">Inconclusive</option></select>');
}); });
$(tableElement).find('tfoot div[name="serology_filter"]').each(function () {
$(this).html('<select style="width:100px" ><option value selected="selected">---</option><option value="Positive">Positive</option><option value="Negative">Negative</option><option value="Borderline">Borderline</option></select>');
});
//make columns of virus test date wider //make columns of virus test date wider
$(tableElement).find('tfoot div[name="virus_test_date"]').each(function () { $(tableElement).find('tfoot div[name="virus_test_date"]').each(function () {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment