# HG changeset patch # User Sebastien Jodogne # Date 1368804736 -7200 # Node ID 7816aaa5db17b54a5273766eb7a6e1943110ca5b # Parent de660d1fd8f2513968749f39d3c129186e03b2b5# Parent 9d876ea52df4a00300692f138a3f48237581825e merge diff -r 9d876ea52df4 -r 7816aaa5db17 NEWS --- 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 diff -r 9d876ea52df4 -r 7816aaa5db17 OrthancExplorer/explorer.html --- 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 @@ - - Delete this patient - Store in another DICOM modality - Download ZIP - Anonymize

+ + +
@@ -122,12 +131,21 @@
-

- Delete this study - Store in another DICOM modality - Download ZIP - Anonymize -

+ + + +
@@ -156,15 +174,24 @@
diff -r 9d876ea52df4 -r 7816aaa5db17 OrthancExplorer/explorer.js --- 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++) { diff -r 9d876ea52df4 -r 7816aaa5db17 OrthancServer/OrthancRestApi.cpp --- 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)