comparison OrthancServer/Plugins/Samples/Housekeeper/Plugin.cpp @ 4993:8feb00fea93d

fix build
author Alain Mazy <am@osimis.io>
date Mon, 02 May 2022 14:31:41 +0200
parents 3cdda1cec537
children ed4ceb31bcf8
comparison
equal deleted inserted replaced
4992:d05626038846 4993:8feb00fea93d
244 244
245 PluginStatus() 245 PluginStatus()
246 : statusVersion(1), 246 : statusVersion(1),
247 lastProcessedChange(-1), 247 lastProcessedChange(-1),
248 lastChangeToProcess(-1), 248 lastChangeToProcess(-1),
249 lastTimeStarted(boost::date_time::special_values::not_a_date_time) 249 lastTimeStarted(boost::date_time::not_a_date_time)
250 { 250 {
251 } 251 }
252 252
253 void ToJson(Json::Value& target) 253 void ToJson(Json::Value& target)
254 { 254 {
256 256
257 target["Version"] = statusVersion; 257 target["Version"] = statusVersion;
258 target["LastProcessedChange"] = Json::Value::Int64(lastProcessedChange); 258 target["LastProcessedChange"] = Json::Value::Int64(lastProcessedChange);
259 target["LastChangeToProcess"] = Json::Value::Int64(lastChangeToProcess); 259 target["LastChangeToProcess"] = Json::Value::Int64(lastChangeToProcess);
260 260
261 if (lastTimeStarted == boost::date_time::special_values::not_a_date_time) 261 if (lastTimeStarted == boost::date_time::not_a_date_time)
262 { 262 {
263 target["LastTimeStarted"] = Json::Value::null; 263 target["LastTimeStarted"] = Json::Value::null;
264 } 264 }
265 else 265 else
266 { 266 {
276 statusVersion = source["Version"].asInt(); 276 statusVersion = source["Version"].asInt();
277 lastProcessedChange = source["LastProcessedChange"].asInt64(); 277 lastProcessedChange = source["LastProcessedChange"].asInt64();
278 lastChangeToProcess = source["LastChangeToProcess"].asInt64(); 278 lastChangeToProcess = source["LastChangeToProcess"].asInt64();
279 if (source["LastTimeStarted"].isNull()) 279 if (source["LastTimeStarted"].isNull())
280 { 280 {
281 lastTimeStarted = boost::date_time::special_values::not_a_date_time; 281 lastTimeStarted = boost::date_time::not_a_date_time;
282 } 282 }
283 else 283 else
284 { 284 {
285 lastTimeStarted = boost::posix_time::from_iso_string(source["LastTimeStarted"].asString()); 285 lastTimeStarted = boost::posix_time::from_iso_string(source["LastTimeStarted"].asString());
286 } 286 }
316 { 316 {
317 // default config 317 // default config
318 pluginStatus_.statusVersion = 1; 318 pluginStatus_.statusVersion = 1;
319 pluginStatus_.lastProcessedChange = -1; 319 pluginStatus_.lastProcessedChange = -1;
320 pluginStatus_.lastChangeToProcess = -1; 320 pluginStatus_.lastChangeToProcess = -1;
321 pluginStatus_.lastTimeStarted = boost::date_time::special_values::not_a_date_time; 321 pluginStatus_.lastTimeStarted = boost::date_time::not_a_date_time;
322 322
323 pluginStatus_.lastProcessedConfiguration.orthancVersion = "1.9.0"; // when we don't know, we assume some files were stored with Orthanc 1.9.0 (last version saving the dicom-as-json files) 323 pluginStatus_.lastProcessedConfiguration.orthancVersion = "1.9.0"; // when we don't know, we assume some files were stored with Orthanc 1.9.0 (last version saving the dicom-as-json files)
324 324
325 // default main dicom tags signature are the one from Orthanc 1.4.2 (last time the list was changed): 325 // default main dicom tags signature are the one from Orthanc 1.4.2 (last time the list was changed):
326 pluginStatus_.lastProcessedConfiguration.patientsMainDicomTagsSignature = "0010,0010;0010,0020;0010,0030;0010,0040;0010,1000"; 326 pluginStatus_.lastProcessedConfiguration.patientsMainDicomTagsSignature = "0010,0010;0010,0020;0010,0030;0010,0040;0010,1000";