Commit b17c7998 authored by HERBERT Ryan's avatar HERBERT Ryan
Browse files

views/patient/confirm.html sequence and result count

The counting for sequence files and result files had not been updated
when switching to the sample_set format.
The correct values are now displayed when deleting a patient.
parent 6e90764f
......@@ -7,16 +7,20 @@
{{
data_count = 0
patient_name = vidjil_utils.anon_ids(request.vars["id"])
query = db( (db.sequence_file.patient_id==request.vars["id"])).select()
for row in query :}}
{{data_count += db(db.results_file.sequence_file_id == row.id).count()}}
{{pass}}
sequence_count = db( (db.sequence_file.id == db.sample_set_membership.sequence_file_id)
&(db.sample_set_membership.sample_set_id == db.patient.sample_set_id)
&(db.patient.id == request.vars["id"])).count()
data_count = db( (db.sequence_file.id == db.sample_set_membership.sequence_file_id)
&(db.sample_set_membership.sample_set_id == db.patient.sample_set_id)
&(db.patient.id == request.vars["id"])
&(db.results_file.sequence_file_id == db.sequence_file.id)).count()
}}
<div>
<h3>{{=message}}: {{=patient_name}}
</h3>
Are you sure you want to delete the patient {{=patient_name}} ?</br>
This will delete {{=db(db.sequence_file.patient_id==request.vars["id"]).count()}} sequence file(s) and {{=data_count}} result files.</br>
This will delete {{=sequence_count}} sequence file(s) and {{=data_count}} result files.</br>
This action cannot be undone.
<div class="center">
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment