Mercurial > hg > orthanc
comparison OrthancServer/ServerIndex.cpp @ 1716:2ca7888f8600 db-changes
refactoring DicomIdentifiers
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Sat, 17 Oct 2015 12:16:27 +0200 |
parents | 5ebd6cbb3da8 |
children | 3926e6317a43 |
comparison
equal
deleted
inserted
replaced
1715:c3baf74e443f | 1716:2ca7888f8600 |
---|---|
625 | 625 |
626 Recycle(instanceSize, hasher.HashPatient()); | 626 Recycle(instanceSize, hasher.HashPatient()); |
627 | 627 |
628 // Create the instance | 628 // Create the instance |
629 int64_t instance = CreateResource(hasher.HashInstance(), ResourceType_Instance); | 629 int64_t instance = CreateResource(hasher.HashInstance(), ResourceType_Instance); |
630 Toolbox::SetMainDicomTags(db_, instance, ResourceType_Instance, dicomSummary, true); | 630 Toolbox::SetMainDicomTags(db_, instance, ResourceType_Instance, dicomSummary); |
631 | 631 |
632 // Detect up to which level the patient/study/series/instance | 632 // Detect up to which level the patient/study/series/instance |
633 // hierarchy must be created | 633 // hierarchy must be created |
634 int64_t patient = -1, study = -1, series = -1; | 634 int64_t patient = -1, study = -1, series = -1; |
635 bool isNewPatient = false; | 635 bool isNewPatient = false; |
677 | 677 |
678 // Create the series if needed | 678 // Create the series if needed |
679 if (isNewSeries) | 679 if (isNewSeries) |
680 { | 680 { |
681 series = CreateResource(hasher.HashSeries(), ResourceType_Series); | 681 series = CreateResource(hasher.HashSeries(), ResourceType_Series); |
682 Toolbox::SetMainDicomTags(db_, series, ResourceType_Series, dicomSummary, true); | 682 Toolbox::SetMainDicomTags(db_, series, ResourceType_Series, dicomSummary); |
683 } | 683 } |
684 | 684 |
685 // Create the study if needed | 685 // Create the study if needed |
686 if (isNewStudy) | 686 if (isNewStudy) |
687 { | 687 { |
688 study = CreateResource(hasher.HashStudy(), ResourceType_Study); | 688 study = CreateResource(hasher.HashStudy(), ResourceType_Study); |
689 Toolbox::SetMainDicomTags(db_, study, ResourceType_Study, dicomSummary, true); | 689 Toolbox::SetMainDicomTags(db_, study, ResourceType_Study, dicomSummary); |
690 Toolbox::SetMainDicomTags(db_, study, ResourceType_Patient, dicomSummary, false); // New in version 0.9.5 (db v6) | |
691 } | 690 } |
692 | 691 |
693 // Create the patient if needed | 692 // Create the patient if needed |
694 if (isNewPatient) | 693 if (isNewPatient) |
695 { | 694 { |
696 patient = CreateResource(hasher.HashPatient(), ResourceType_Patient); | 695 patient = CreateResource(hasher.HashPatient(), ResourceType_Patient); |
697 Toolbox::SetMainDicomTags(db_, patient, ResourceType_Patient, dicomSummary, true); | 696 Toolbox::SetMainDicomTags(db_, patient, ResourceType_Patient, dicomSummary); |
698 } | 697 } |
699 | 698 |
700 // Create the parent-to-child links | 699 // Create the parent-to-child links |
701 db_.AttachChild(series, instance); | 700 db_.AttachChild(series, instance); |
702 | 701 |