Skip to content

Commit

Permalink
handles array of tars
Browse files Browse the repository at this point in the history
  • Loading branch information
MounaSafiHarab committed Jul 20, 2017
1 parent 5d09e00 commit c00366a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,15 +98,19 @@ class Imaging_Session_ControlPanel
}

// To enable DICOM download: Add pair: tarchiveID, ArchiveLocation
$qresult = $DB->pselectRow(
$qresult = $DB->pselect(
"SELECT TarchiveID, ArchiveLocation
FROM tarchive
WHERE PatientName LIKE $ID",
$params
);
$subjectData['tarchiveids'] = $qresult['TarchiveID'];
$subjectData['tarchiveidLoc'] = (empty($qresult['ArchiveLocation'])) ? ""
: $qresult['ArchiveLocation'];

$tarIDTotarLoc=array();
foreach($qresult as $k=>$v) {
$tarchiveID = $v['TarchiveID'];
$tarIDTotarLoc[$tarchiveID]=$v['ArchiveLocation'];
}
$subjectData['tarchiveIDLoc'] = $tarIDTotarLoc;

$config =& NDB_Config::singleton();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,11 @@
{if $rad_review_table_exists}
<li><a href="{$baseurl}/{$subject.candid}/{$subject.sessionID}/radiology_review/?commentID={$subject.RadiologyReviewCommentID}">Radiology Review</a></li>
{/if}
{foreach from=$subject.tarchiveids item=tarchive}
<li><a href="{$baseurl}/dicom_archive/viewDetails/?tarchiveID={$tarchive}&backURL={$backURL|escape:"url"}">DICOM Archive(s) {$tarchive}</a></li>
{/foreach}
{foreach from=$subject.tarchiveidLoc item=tarchiveLoc}
<li><a href="/mri/jiv/get_file.php?file=tarchive/{$tarchiveLoc}" class="btn btn-primary btn-small">
<span class="glyphicon glyphicon-cloud-download"></span><span class="hidden-xs"> Download DICOM</span>
</a></li>
{foreach from=$subject.tarchiveIDLoc key=tarchive item=tarchiveLoc}
<li><a href="{$baseurl}/dicom_archive/viewDetails/?tarchiveID={$tarchive}&backURL={$backURL|escape:"url"}">DICOM Archive {$tarchive}</a></li>
<li><a href="/mri/jiv/get_file.php?file=tarchive/{$tarchiveLoc}" class="btn btn-primary btn-small">
<span class="glyphicon glyphicon-cloud-download"></span><span class="hidden-xs"> Download DICOM {$tarchive}</span>
</a></li>
{/foreach}
{if $mantis}
<li><a target="mantis" href="{$mantis}">Report a Bug (Mantis)</a></li>
Expand Down

0 comments on commit c00366a

Please sign in to comment.