Commit 46844ad2 authored by Marc Duez's avatar Marc Duez
Browse files

server: patient view, add files column

parent c7fa6186
...@@ -3,6 +3,20 @@ ...@@ -3,6 +3,20 @@
{{('message' in globals())}} {{('message' in globals())}}
{{if 'message' in globals():}} {{if 'message' in globals():}}
{{
count = db.patient.id.count()
query = db(
(auth.accessible_query('read', db.patient) | auth.accessible_query('admin', db.patient) ) &
(db.patient.id == db.sequence_file.patient_id)
).select(
db.patient.ALL,
count,
groupby=db.patient.id
)
}}
<div> <div>
<h3>{{=message}}</h3> <h3>{{=message}}</h3>
...@@ -12,24 +26,21 @@ ...@@ -12,24 +26,21 @@
<tr><td class="column1"> name </td> <tr><td class="column1"> name </td>
<td class="column2"> birth </td> <td class="column2"> birth </td>
<td> info </td> <td> info </td>
<td class="column2"> files </td>
<td class="column5"> </td> <td class="column5"> </td>
<td class="column5"> </td> <td class="column5"> </td>
<td class="column5"> </td> <td class="column5"> </td>
</tr> </tr>
</thead> </thead>
{{ {{for row in query :}}
query = db( <tr onclick="db.call('patient/info', {'id' :'{{=row.patient.id}}'} )" >
auth.accessible_query('read', db.patient) | <td> {{=row.patient.last_name + " " + row.patient.first_name }} </td>
auth.accessible_query('admin', db.patient) <td> {{=row.patient.birth }} </td>
).select() <td> {{=row.patient.info }} </td>
for row in query :}} <td> {{=row[count]}}</td>
<tr onclick="db.call('patient/info', {'id' :'{{=row.id}}'} )" > <td onclick="db.call('patient/permission', {'id' :'{{=row.patient.id}}'} )" > p </td>
<td> {{=row.last_name + " " + row.first_name }} </td> <td onclick="db.call('patient/edit', {'id' :'{{=row.patient.id}}'} )" > e </td>
<td> {{=row.birth }} </td> <td onclick="db.call('patient/confirm', {'id' :'{{=row.patient.id}}'} )" > X </td>
<td> {{=row.info }} </td>
<td onclick="db.call('patient/permission', {'id' :'{{=row.id}}'} )" > p </td>
<td onclick="db.call('patient/edit', {'id' :'{{=row.id}}'} )" > e </td>
<td onclick="db.call('patient/confirm', {'id' :'{{=row.id}}'} )" > X </td>
</tr> </tr>
{{pass}} {{pass}}
</table> </table>
......
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