Commit f8f54eb7 authored by Marc Duez's avatar Marc Duez
Browse files
parents b55fd180 02b4ac99
......@@ -46,6 +46,16 @@ def anon(patient_id, user_id):
first_name = db.patient[patient_id].first_name
if auth.has_permission("anon", "patient", patient_id, user_id):
return last_name + " " + first_name
name = last_name + " " + first_name
else:
return last_name[:3] + " " + first_name[:3]
try:
ln = unicode(last_name, 'utf-8')
except UnicodeDecodeError:
ln = last_name
name = ln[:3]
# Admins also see the patient id
if auth.has_membership("admin"):
name += ' (%s)' % patient_id
return name
{{extend 'db_layout.html'}}
{{import vidjil_utils}}
{{('message' in globals())}}
{{if 'message' in globals():}}
......@@ -10,9 +11,10 @@ for row in query :}}
{{data_count += db(db.results_file.sequence_file_id == row.id).count()}}
{{pass}}
<div>
<h3>{{=message}}</h3>
<h3>{{=message}}: {{=vidjil_utils.anon(request.vars["id"], auth.user.id)}}
</h3>
Are you sure you want to delete this patient ?</br>
Are you sure you want to delete the patient {{=vidjil_utils.anon(request.vars["id"], auth.user.id)}} ?</br>
This will delete {{=db(db.sequence_file.patient_id==request.vars["id"]).count()}} sequence file(s) and {{=data_count}} result files.</br>
This action cannot be undone.
......
......@@ -5,7 +5,7 @@
<div>
<h3>{{=patient.last_name + " " + patient.first_name }} ({{=patient.birth}})</h3>
<h3>{{=vidjil_utils.anon(request.vars['id'], auth.user.id)}}</h3>
<div class="db_block">
......
{{extend 'db_layout.html'}}
{{import vidjil_utils}}
<div>
<h3>
patient acces permission
Access to patient {{=vidjil_utils.anon(request.vars["id"], auth.user.id)}}
</h3>
<div id="db_table_container">
<table class="db_table" id="table">
<thead>
<tr><td class="column1"> group / user</td>
<tr><td class="column_200"> group / user</td>
<td> </td>
<td class="column1"> read</td>
<td class="column1"> admin</td>
......
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