Commit 1d2e42dc authored by Mathieu Giraud's avatar Mathieu Giraud Committed by Vidjil Team

patient/stats.html: init from patient/custom.html

parent c2af3eb3
{{extend 'db_layout.html'}}
{{import vidjil_utils}}
<div>
<h3>Compare samples from different patients</h3>
<p>Select up to 10 samples to be compared.</p>
<div class="db_block">
<div class="db_block_left">
search
<input id="db_filter_input" type="text" value="{{=request.vars["filter"]}}"
onchange="db.call('patient/custom', {'config_id' : '{{=request.vars["config_id"]}}',
'filter' : this.value,
'custom_list' : db.getListInput('custom_result[]')} )" >
</div>
<div class="db_block_right">
{{if auth.has_permission("run", "results_file") :}}
config
<span>
<select id="choose_config" name="config" onchange="db.call('patient/custom', {'config_id' : this.value,
'filter' : '{{=request.vars["filter"]}}',
'custom_list' : db.getListInput('custom_result[]') })">
<option value="-1" {{if not config :}}selected{{pass}}> --- </option>
{{for row in db((auth.accessible_query('read', db.config) | auth.accessible_query('admin', db.config) ) ).select(orderby=~db.config.name) :}}
<option value="{{=row.id }}" {{if row.id==config_id:}}selected{{pass}} >
{{=row.name}}
</option>
{{pass}}
</select>
</span>
{{pass}}
</div>
</div>
</div>
<div id="db_table_container">
<table class="db_table" id="table">
<thead>
<tr><td class="column1"> </td>
<td class="column_200"> patient </td>
<td class="column_200"> file name </td>
<td class="column2"> sampling date </td>
<td> info </td>
<td> pcr </td>
<td class="column1"> size </td>
<td class="column_200"> config </td>
<td class="column_sep"></td>
<td class="column2">last processing</td>
</tr>
</thead>
<tbody>
{{for row in query :}}
<tr>
<td> <input type="checkbox" name="custom_result[]" value="{{=row.results_file.id}}" {{if row.checked :}} checked {{pass}}> </td>
<td> {{=vidjil_utils.anon(row.sequence_file.patient_id, auth.user_id)}}</td>
<td {{if row.sequence_file.data_file == None :}} {{=XML("class='inactive' title='file is missing' ")}} {{pass}} id="sequence_file_{{=row.sequence_file.id}}">
{{=row.sequence_file.filename}}
</td>
<td> {{=row.sequence_file.sampling_date}} </td>
<td> {{=row.sequence_file.info}} </td>
<td> {{=row.sequence_file.pcr}} </td>
<td {{if row.sequence_file.data_file == None :}} {{=XML("class='inactive' title='file is missing' ")}} {{pass}} >
{{=vidjil_utils.format_size(row.sequence_file.size_file)}} </td>
<td> {{=row.config.name}}
<td class="column_sep"></td>
{{if row.results_file.run_date :}}
<td class="button" onclick="db.call('results_file/info', { 'results_file_id' : '{{=row.results_file.id}}' } )"> {{=row.results_file.run_date }}</td>
{{else:}}<td></td>{{pass}}
</tr>
{{pass}}
</tbody>
</table>
<table class="db_table" id="db_fixed_header"></table>
</div>
<div class="db_block">
<div class="db_block_left">
</div>
<div class="db_block_right">
<span class="button2" onclick="db.load_custom_data()" > see results </span>
</div>
</div>
</div>
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