comparison OrthancServer/Sources/Database/OrthancIdentifiers.cpp @ 5748:4bc650d88463 find-refactoring

WIP: started to implement IntegratedFind in SQLite
author Alain Mazy <am@orthanc.team>
date Fri, 30 Aug 2024 18:03:37 +0200
parents 359a8adb3802
children
comparison
equal deleted inserted replaced
5747:796cb17db15c 5748:4bc650d88463
163 !HasSeriesId() && 163 !HasSeriesId() &&
164 !HasInstanceId()) 164 !HasInstanceId())
165 { 165 {
166 return ResourceType_Patient; 166 return ResourceType_Patient;
167 } 167 }
168 else if (HasPatientId() && 168 else if (// HasPatientId() &&
169 HasStudyId() && 169 HasStudyId() &&
170 !HasSeriesId() && 170 !HasSeriesId() &&
171 !HasInstanceId()) 171 !HasInstanceId())
172 { 172 {
173 return ResourceType_Study; 173 return ResourceType_Study;
174 } 174 }
175 else if (HasPatientId() && 175 else if (// HasPatientId() &&
176 HasStudyId() && 176 // HasStudyId() &&
177 HasSeriesId() && 177 HasSeriesId() &&
178 !HasInstanceId()) 178 !HasInstanceId())
179 { 179 {
180 return ResourceType_Series; 180 return ResourceType_Series;
181 } 181 }
182 else if (HasPatientId() && 182 else if (// HasPatientId() &&
183 HasStudyId() && 183 // HasStudyId() &&
184 HasSeriesId() && 184 // HasSeriesId() &&
185 HasInstanceId()) 185 HasInstanceId())
186 { 186 {
187 return ResourceType_Instance; 187 return ResourceType_Instance;
188 } 188 }
189 else 189 else
238 238
239 default: 239 default:
240 throw OrthancException(ErrorCode_ParameterOutOfRange); 240 throw OrthancException(ErrorCode_ParameterOutOfRange);
241 } 241 }
242 } 242 }
243
244 bool OrthancIdentifiers::IsDefined() const
245 {
246 return HasPatientId() || HasStudyId() || HasSeriesId() || HasInstanceId();
247 }
243 } 248 }