Commit d896ca33 authored by Marc Duez's avatar Marc Duez

patient.py : fix compare patient (don't need scheduler table anymore)

parent 6abe633e
......@@ -115,16 +115,19 @@ def custom():
request.vars["custom_list"] = [request.vars["custom_list"]]
q = ((auth.accessible_query('read', db.patient) | auth.accessible_query('admin', db.patient) )
& (auth.accessible_query('read', db.config) | auth.accessible_query('admin', db.config) )
q = ((auth.accessible_query('read', db.patient))
& (auth.accessible_query('read', db.config))
& (db.sequence_file.patient_id==db.patient.id)
& (db.results_file.sequence_file_id==db.sequence_file.id)
& (db.results_file.scheduler_task_id==db.scheduler_task.id)
& (db.scheduler_task.status=='COMPLETED')
& (db.results_file.data_file != '')
& (db.config.id==db.results_file.config_id)
)
query = db(q).select(
db.patient.id, db.results_file.id, db.results_file.config_id, db.sequence_file.sampling_date,
db.sequence_file.pcr, db.config.name, db.results_file.run_date, db.sequence_file.filename,
db.sequence_file.patient_id, db.sequence_file.data_file, db.sequence_file.id, db.sequence_file.info,
db.sequence_file.size_file,
orderby = ~db.sequence_file.patient_id|db.sequence_file.id|db.results_file.run_date,
groupby = db.sequence_file.id|db.results_file.config_id,
)
......
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