# HG changeset patch # User Sebastien Jodogne # Date 1378297154 -7200 # Node ID a482948c1fd64ab6eda5fd9f7c5cf4d4946dd2f5 # Parent c8347eef225bcca6c85ce53454f2bf2a165806ae fix diff -r c8347eef225b -r a482948c1fd6 OrthancServer/RadiotherapyRestApi.cpp --- a/OrthancServer/RadiotherapyRestApi.cpp Wed Sep 04 13:46:08 2013 +0200 +++ b/OrthancServer/RadiotherapyRestApi.cpp Wed Sep 04 14:19:14 2013 +0200 @@ -163,14 +163,16 @@ return false; } - // Check that the "ReferencedStudySequence" is the same as the parent study. - if (!content.isMember(REFERENCED_STUDY_SEQUENCE) || - content[REFERENCED_STUDY_SEQUENCE]["Value"].size() != 1 || - !content[REFERENCED_STUDY_SEQUENCE]["Value"][0].isMember(REFERENCED_SOP_INSTANCE_UID) || - content[REFERENCED_STUDY_SEQUENCE]["Value"][0][REFERENCED_SOP_INSTANCE_UID]["Value"].asString() != - study["MainDicomTags"]["StudyInstanceUID"].asString()) + // Check that the "ReferencedStudySequence" (if any) is the same as the parent study. + if (content.isMember(REFERENCED_STUDY_SEQUENCE)) { - return false; + if (content[REFERENCED_STUDY_SEQUENCE]["Value"].size() != 1 || + !content[REFERENCED_STUDY_SEQUENCE]["Value"][0].isMember(REFERENCED_SOP_INSTANCE_UID) || + content[REFERENCED_STUDY_SEQUENCE]["Value"][0][REFERENCED_SOP_INSTANCE_UID]["Value"].asString() != + study["MainDicomTags"]["StudyInstanceUID"].asString()) + { + return false; + } } // Lookup for the frame of reference. Orthanc does not support