Skip to content

Commit

Permalink
LIMS-139: link multiplex results to sample or sample group
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Williams committed Aug 16, 2024
1 parent c044628 commit 7749513
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions api/src/Page/Processing.php
Original file line number Diff line number Diff line change
Expand Up @@ -697,11 +697,17 @@ private function _autoprocessing_query_builder($where, $group, $order = '') {
ap.refinedcell_alpha as cell_al,
ap.refinedcell_beta as cell_be,
ap.refinedcell_gamma as cell_ga,
(SELECT COUNT(api1.autoprocintegrationid) FROM autoprocintegration api1 WHERE api1.autoprocprogramid = app.autoprocprogramid) as imagesweepcount,
(SELECT COUNT(api1.autoprocintegrationid) FROM autoprocintegration api1 WHERE api1.autoprocprogramid = app.autoprocprogramid) as imagesweepcount,
app.processingstatus,
app.processingmessage,
count(distinct pjis.datacollectionid) as dccount,
max(pjis.processingjobid) as processingjobid,
(SELECT IFNULL(blsg.name, bls.name) FROM processingjobparameter pjp
LEFT OUTER JOIN blsample bls ON pjp.parametervalue = bls.blsampleid
LEFT OUTER JOIN blsamplegroup blsg ON pjp.parametervalue = blsg.blsamplegroupid
WHERE pjp.processingjobid = pj.processingjobid
AND pjp.parameterkey in ('sample_id', 'sample_group_id')
) as groupname,
pj.automatic";

$from = "FROM autoprocintegration api";
Expand Down Expand Up @@ -751,7 +757,7 @@ private function _format_auto_processing_result($table_rows, $messages_result) {
'cell_ga',
);
$resolution_data = array('rlow', 'rhigh');
$returned_keys = array('PROCESSINGJOBID', 'IMAGESWEEPCOUNT', 'DCCOUNT', 'TYPE', 'PROCESSINGSTATUS', 'PROCESSINGMESSAGE');
$returned_keys = array('PROCESSINGJOBID', 'IMAGESWEEPCOUNT', 'DCCOUNT', 'TYPE', 'PROCESSINGSTATUS', 'PROCESSINGMESSAGE', 'GROUPNAME');

foreach($table_rows as &$row) {
if (!array_key_exists($row['AUTOPROCPROGRAMID'], $formatted_result)) {
Expand All @@ -772,6 +778,9 @@ private function _format_auto_processing_result($table_rows, $messages_result) {
$prefix = preg_match('/multi/', $value) ? '' : 'multi-';
$value = $row['DCCOUNT'] . 'x ' . $prefix . $value;
}
if ($row['GROUPNAME']) {
$value .= ' ('.$row['GROUPNAME'].')';
}
}


Expand Down

0 comments on commit 7749513

Please sign in to comment.