# HG changeset patch # User Sebastien Jodogne # Date 1423744127 -3600 # Node ID 0c735fed8953d68240b6e009d809ae84c07b7981 # Parent 01be1432bda93d30c8a94e8fe053d8b77fdbff9c ZIP archives now display the accession number of the studies diff -r 01be1432bda9 -r 0c735fed8953 NEWS --- a/NEWS Wed Feb 11 12:33:07 2015 +0100 +++ b/NEWS Thu Feb 12 13:28:47 2015 +0100 @@ -15,6 +15,7 @@ * More flexible "/modify" and "/anonymize" for single instance * Access to called AET and remote AET from Lua scripts ("OnStoredInstance") * Option "DicomAssociationCloseDelay" to set delay before closing DICOM association +* ZIP archives now display the accession number of the studies Plugins ------- diff -r 01be1432bda9 -r 0c735fed8953 OrthancServer/OrthancRestApi/OrthancRestArchive.cpp --- a/OrthancServer/OrthancRestApi/OrthancRestArchive.cpp Wed Feb 11 12:33:07 2015 +0100 +++ b/OrthancServer/OrthancRestApi/OrthancRestArchive.cpp Thu Feb 12 13:28:47 2015 +0100 @@ -56,27 +56,34 @@ ResourceType resourceType) { std::string s; + const Json::Value& tags = resource["MainDicomTags"]; switch (resourceType) { case ResourceType_Patient: { - std::string p = resource["MainDicomTags"]["PatientID"].asString(); - std::string n = resource["MainDicomTags"]["PatientName"].asString(); + std::string p = tags["PatientID"].asString(); + std::string n = tags["PatientName"].asString(); s = p + " " + n; break; } case ResourceType_Study: { - s = resource["MainDicomTags"]["StudyDescription"].asString(); + std::string p; + if (tags.isMember("AccessionNumber")) + { + p = tags["AccessionNumber"].asString() + " "; + } + + s = p + tags["StudyDescription"].asString(); break; } case ResourceType_Series: { - std::string d = resource["MainDicomTags"]["SeriesDescription"].asString(); - std::string m = resource["MainDicomTags"]["Modality"].asString(); + std::string d = tags["SeriesDescription"].asString(); + std::string m = tags["Modality"].asString(); s = m + " " + d; break; }