Mercurial > hg > orthanc
changeset 445:7816aaa5db17
merge
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 17 May 2013 17:32:16 +0200 |
parents | de660d1fd8f2 (diff) 9d876ea52df4 (current diff) |
children | b7ef1a7d857e |
files | |
diffstat | 4 files changed, 87 insertions(+), 27 deletions(-) [+] |
line wrap: on
line diff
--- a/NEWS Thu May 16 15:45:38 2013 +0200 +++ b/NEWS Fri May 17 17:32:16 2013 +0200 @@ -14,6 +14,7 @@ ----- * Statistics about patients, studies, series and instances +* Link from anonymized to original resource in Orthanc Explorer * Fixes for Red Hat and Debian packaging * Fixes for boost::thread, as reported by Cyril Paulus
--- a/OrthancExplorer/explorer.html Thu May 16 15:45:38 2013 +0200 +++ b/OrthancExplorer/explorer.html Fri May 17 17:32:16 2013 +0200 @@ -88,12 +88,21 @@ <option value="on">Protected</option> </select> </div> - <!--a href="#find-patients" data-role="button" data-icon="search">Go to patient finder</a--> - <a href="#" data-role="button" data-icon="delete" id="patient-delete">Delete this patient</a> - <a href="#" data-role="button" data-icon="forward" id="patient-store">Store in another DICOM modality</a> - <a href="#" data-role="button" data-icon="gear" id="patient-archive">Download ZIP</a> - <a href="#" data-role="button" data-icon="star" id="patient-anonymize">Anonymize</a> </p> + <ul data-role="listview" data-inset="true" data-theme="d" data-divider-theme="c"> + <li data-role="list-divider">Interact</li> + <li data-icon="delete"><a href="#" id="patient-delete">Delete this patient</a></li> + <li data-icon="forward"><a href="#" id="patient-store">Send to DICOM modality</a></li> + <li data-icon="star"><a href="#" id="patient-anonymize">Anonymize</a></li> + </ul> + + <ul data-role="listview" data-inset="true" data-theme="d" data-divider-theme="c"> + <li data-role="list-divider">Access</li> + <li data-icon="info" data-theme="e" style="display:none"> + <a href="#" id="patient-anonymized-from">Before anonymization</a> + </li> + <li data-icon="gear"><a href="#" id="patient-archive">Download ZIP</a></li> + </ul> </div> </div> <div class="ui-block-b" style="width:70%"> @@ -122,12 +131,21 @@ <div style="padding-right:10px"> <ul data-role="listview" data-inset="true" data-theme="a" id="study-info"> </ul> - <p> - <a href="#" data-role="button" data-icon="delete" id="study-delete">Delete this study</a> - <a href="#" data-role="button" data-icon="forward" id="study-store">Store in another DICOM modality</a> - <a href="#" data-role="button" data-icon="gear" id="study-archive">Download ZIP</a> - <a href="#" data-role="button" data-icon="star" id="study-anonymize">Anonymize</a> - </p> + + <ul data-role="listview" data-inset="true" data-theme="d" data-divider-theme="c"> + <li data-role="list-divider">Interact</li> + <li data-icon="delete"><a href="#" id="study-delete">Delete this study</a></li> + <li data-icon="forward"><a href="#" id="study-store">Send to DICOM modality</a></li> + <li data-icon="star"><a href="#" id="study-anonymize">Anonymize</a></li> + </ul> + + <ul data-role="listview" data-inset="true" data-theme="d" data-divider-theme="c"> + <li data-role="list-divider">Access</li> + <li data-icon="info" data-theme="e" style="display:none"> + <a href="#" id="study-anonymized-from">Before anonymization</a> + </li> + <li data-icon="gear"><a href="#" id="study-archive">Download ZIP</a></li> + </ul> </div> </div> <div class="ui-block-b" style="width:70%"> @@ -156,15 +174,24 @@ <div class="ui-grid-a"> <div class="ui-block-a" style="width:30%"> <div style="padding-right:10px"> - <ul data-role="listview" data-inset="true" data-theme="a" id="series-info"> + <ul data-role="listview" data-inset="true" data-theme="a" id="series-info"> + </ul> + + <ul data-role="listview" data-inset="true" data-theme="d" data-divider-theme="c"> + <li data-role="list-divider">Interact</li> + <li data-icon="delete"><a href="#" id="series-delete">Delete this series</a></li> + <li data-icon="forward"><a href="#" id="series-store">Send to DICOM modality</a></li> + <li data-icon="star"><a href="#" id="series-anonymize">Anonymize</a></li> </ul> - <p> - <a href="#" data-role="button" data-icon="delete" id="series-delete">Delete this series</a> - <a href="#" data-role="button" data-icon="search" id="series-preview">Preview this series</a> - <a href="#" data-role="button" data-icon="forward" id="series-store">Store in another DICOM modality</a> - <a href="#" data-role="button" data-icon="gear" id="series-archive">Download ZIP</a> - <a href="#" data-role="button" data-icon="star" id="series-anonymize">Anonymize</a> - </p> + + <ul data-role="listview" data-inset="true" data-theme="d" data-divider-theme="c"> + <li data-role="list-divider">Access</li> + <li data-icon="info" data-theme="e" style="display:none"> + <a href="#" id="series-anonymized-from">Before anonymization</a> + </li> + <li data-icon="search"><a href="#" id="series-preview">Preview this series</a></li> + <li data-icon="gear"><a href="#" id="series-archive">Download ZIP</a></li> + </ul> </div> </div> <div class="ui-block-b" style="width:70%"> @@ -195,13 +222,19 @@ <div style="padding-right:10px"> <ul data-role="listview" data-inset="true" data-theme="a" id="instance-info"> </ul> - <p> - <a href="#" data-role="button" data-icon="delete" id="instance-delete">Delete this instance</a> - <a href="#" data-role="button" data-icon="arrow-d" id="instance-download-dicom">Download the DICOM file</a> - <a href="#" data-role="button" data-icon="arrow-d" id="instance-download-json">Download the JSON file</a> - <a href="#" data-role="button" data-icon="search" id="instance-preview">Preview the instance</a> - <a href="#" data-role="button" data-icon="forward" id="instance-store">Store in another DICOM modality</a> - </p> + + <ul data-role="listview" data-inset="true" data-theme="d" data-divider-theme="c"> + <li data-role="list-divider">Interact</li> + <li data-icon="delete"><a href="#" id="instance-delete">Delete this instance</a></li> + <li data-icon="forward"><a href="#" id="instance-store">Send to DICOM modality</a></li> + </ul> + + <ul data-role="listview" data-inset="true" data-theme="d" data-divider-theme="c"> + <li data-role="list-divider">Access</li> + <li data-icon="arrow-d"><a href="#" id="instance-download-dicom">Download the DICOM file</a></li> + <li data-icon="arrow-d"><a href="#" id="instance-download-json">Download the JSON file</a></li> + <li data-icon="search"><a href="#" id="instance-preview">Preview the instance</a></li> + </ul> </div> </div> <div class="ui-block-b" style="width:70%">
--- a/OrthancExplorer/explorer.js Thu May 16 15:45:38 2013 +0200 +++ b/OrthancExplorer/explorer.js Fri May 17 17:32:16 2013 +0200 @@ -356,6 +356,23 @@ +function SetupAnonymizedFrom(buttonSelector, resource, resourceType) +{ + if ('AnonymizedFrom' in resource) + { + $(buttonSelector).closest('li').show(); + $(buttonSelector).click(function(e) { + window.location.assign('explorer.html#' + resourceType + '?uuid=' + resource.AnonymizedFrom); + window.location.reload(); + }); + } + else + { + $(buttonSelector).closest('li').hide(); + } +} + + $('#patient').live('pagebeforeshow', function() { if ($.mobile.pageData) { GetSingleResource('patients', $.mobile.pageData.uuid, function(patient) { @@ -381,6 +398,8 @@ target.append(FormatStudy(studies[i], '#study?uuid=' + studies[i].ID)); } + SetupAnonymizedFrom('#patient-anonymized-from', patient, 'patient'); + target.listview('refresh'); // Check whether this patient is protected @@ -417,6 +436,8 @@ .append(FormatStudy(study)) .listview('refresh'); + SetupAnonymizedFrom('#study-anonymized-from', study, 'study'); + var target = $('#list-series'); $('li', target).remove(); for (var i = 0; i < series.length; i++) { @@ -456,6 +477,8 @@ .append(FormatSeries(series)) .listview('refresh'); + SetupAnonymizedFrom('#series-anonymized-from', series, 'series'); + var target = $('#list-instances'); $('li', target).remove(); for (var i = 0; i < instances.length; i++) {
--- a/OrthancServer/OrthancRestApi.cpp Thu May 16 15:45:38 2013 +0200 +++ b/OrthancServer/OrthancRestApi.cpp Fri May 17 17:32:16 2013 +0200 @@ -1319,7 +1319,7 @@ /** - * Record metadata information (AnonimizedFrom/ModifiedFrom). + * Record metadata information (AnonymizedFrom/ModifiedFrom). **/ DicomInstanceHasher modifiedHasher = modified->GetHasher(); @@ -1348,6 +1348,9 @@ if (isFirst) { + context.GetIndex().SetMetadata(modifiedHasher.HashPatient(), + metadataType, originalHasher.HashPatient()); + std::string newId; switch (resourceType)