# HG changeset patch # User Sebastien Jodogne # Date 1465382181 -7200 # Node ID 9e021b2b348b6585bdbc2d8128844587152ba70e # Parent 3c76fac299ac7043cc5e14da6930049f3fdf2a72 Support of optional tags for counting resources in C-Find SCU diff -r 3c76fac299ac -r 9e021b2b348b OrthancServer/DicomProtocol/DicomUserConnection.cpp --- a/OrthancServer/DicomProtocol/DicomUserConnection.cpp Wed Jun 08 10:40:40 2016 +0200 +++ b/OrthancServer/DicomProtocol/DicomUserConnection.cpp Wed Jun 08 12:36:21 2016 +0200 @@ -436,9 +436,27 @@ throw OrthancException(ErrorCode_InternalError); } - if (level == ResourceType_Study) + switch (level) { - allowedTags.insert(DICOM_TAG_MODALITIES_IN_STUDY); + case ResourceType_Patient: + allowedTags.insert(DICOM_TAG_NUMBER_OF_PATIENT_RELATED_STUDIES); + allowedTags.insert(DICOM_TAG_NUMBER_OF_PATIENT_RELATED_SERIES); + allowedTags.insert(DICOM_TAG_NUMBER_OF_PATIENT_RELATED_INSTANCES); + break; + + case ResourceType_Study: + allowedTags.insert(DICOM_TAG_MODALITIES_IN_STUDY); + allowedTags.insert(DICOM_TAG_NUMBER_OF_STUDY_RELATED_SERIES); + allowedTags.insert(DICOM_TAG_NUMBER_OF_STUDY_RELATED_INSTANCES); + allowedTags.insert(DICOM_TAG_SOP_CLASSES_IN_STUDY); + break; + + case ResourceType_Series: + allowedTags.insert(DICOM_TAG_NUMBER_OF_SERIES_RELATED_INSTANCES); + break; + + default: + break; } allowedTags.insert(DICOM_TAG_SPECIFIC_CHARACTER_SET);