Mercurial > hg > orthanc
diff OrthancServer/Search/Compatibility/ICreateInstance.cpp @ 3091:476cba12c2b0 db-changes
IDatabaseWrapper::GetChildrenMetadata()
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Sat, 05 Jan 2019 15:08:53 +0100 |
parents | 195ba4cbac3f |
children |
line wrap: on
line diff
--- a/OrthancServer/Search/Compatibility/ICreateInstance.cpp Sat Jan 05 12:17:30 2019 +0100 +++ b/OrthancServer/Search/Compatibility/ICreateInstance.cpp Sat Jan 05 15:08:53 2019 +0100 @@ -40,8 +40,7 @@ { namespace Compatibility { - bool ICreateInstance::Apply(ICreateInstance& compatibility, - IDatabaseWrapper& database, + bool ICreateInstance::Apply(ICreateInstance& database, IDatabaseWrapper::CreateInstanceResult& result, int64_t& instanceId, const std::string& hashPatient, @@ -62,7 +61,7 @@ } } - instanceId = compatibility.CreateResource(hashInstance, ResourceType_Instance); + instanceId = database.CreateResource(hashInstance, ResourceType_Instance); result.isNewPatient_ = false; result.isNewStudy_ = false; @@ -116,32 +115,32 @@ // Create the series if needed if (result.isNewSeries_) { - result.seriesId_ = compatibility.CreateResource(hashSeries, ResourceType_Series); + result.seriesId_ = database.CreateResource(hashSeries, ResourceType_Series); } // Create the study if needed if (result.isNewStudy_) { - result.studyId_ = compatibility.CreateResource(hashStudy, ResourceType_Study); + result.studyId_ = database.CreateResource(hashStudy, ResourceType_Study); } // Create the patient if needed if (result.isNewPatient_) { - result.patientId_ = compatibility.CreateResource(hashPatient, ResourceType_Patient); + result.patientId_ = database.CreateResource(hashPatient, ResourceType_Patient); } // Create the parent-to-child links - compatibility.AttachChild(result.seriesId_, instanceId); + database.AttachChild(result.seriesId_, instanceId); if (result.isNewSeries_) { - compatibility.AttachChild(result.studyId_, result.seriesId_); + database.AttachChild(result.studyId_, result.seriesId_); } if (result.isNewStudy_) { - compatibility.AttachChild(result.patientId_, result.studyId_); + database.AttachChild(result.patientId_, result.studyId_); } // Sanity checks