Mercurial > hg > orthanc
comparison PalantirServer/ServerIndex.cpp @ 40:a08b085190e1
simplifications
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 30 Aug 2012 14:52:33 +0200 |
parents | 741efcd39682 |
children |
comparison
equal
deleted
inserted
replaced
39:741efcd39682 | 40:a08b085190e1 |
---|---|
615 } | 615 } |
616 else | 616 else |
617 { | 617 { |
618 result["ID"] = instanceUuid; | 618 result["ID"] = instanceUuid; |
619 result["ParentSeries"] = s.ColumnString(0); | 619 result["ParentSeries"] = s.ColumnString(0); |
620 result["DicomSOPInstanceUID"] = s.ColumnString(1); | |
621 result["FileSize"] = s.ColumnInt(2); // TODO switch to 64bit with JsonCpp 0.6? | 620 result["FileSize"] = s.ColumnInt(2); // TODO switch to 64bit with JsonCpp 0.6? |
622 result["FileUuid"] = s.ColumnString(3); | 621 result["FileUuid"] = s.ColumnString(3); |
623 MainDicomTagsToJson(result, instanceUuid); | 622 MainDicomTagsToJson(result, instanceUuid); |
624 return true; | 623 return true; |
625 } | 624 } |
639 return false; | 638 return false; |
640 } | 639 } |
641 | 640 |
642 result["ID"] = seriesUuid; | 641 result["ID"] = seriesUuid; |
643 result["ParentStudy"] = s1.ColumnString(0); | 642 result["ParentStudy"] = s1.ColumnString(0); |
644 result["DicomSeriesInstanceUID"] = s1.ColumnString(1); | |
645 MainDicomTagsToJson(result, seriesUuid); | 643 MainDicomTagsToJson(result, seriesUuid); |
646 | 644 |
647 Json::Value instances(Json::arrayValue); | 645 Json::Value instances(Json::arrayValue); |
648 SQLite::Statement s2(db_, SQLITE_FROM_HERE, "SELECT uuid FROM Instances WHERE parentSeries=?"); | 646 SQLite::Statement s2(db_, SQLITE_FROM_HERE, "SELECT uuid FROM Instances WHERE parentSeries=?"); |
649 s2.BindString(0, seriesUuid); | 647 s2.BindString(0, seriesUuid); |
671 return false; | 669 return false; |
672 } | 670 } |
673 | 671 |
674 result["ID"] = studyUuid; | 672 result["ID"] = studyUuid; |
675 result["ParentPatient"] = s1.ColumnString(0); | 673 result["ParentPatient"] = s1.ColumnString(0); |
676 result["DicomStudyInstanceUID"] = s1.ColumnString(1); | |
677 MainDicomTagsToJson(result, studyUuid); | 674 MainDicomTagsToJson(result, studyUuid); |
678 | 675 |
679 Json::Value series(Json::arrayValue); | 676 Json::Value series(Json::arrayValue); |
680 SQLite::Statement s2(db_, SQLITE_FROM_HERE, "SELECT uuid FROM Series WHERE parentStudy=?"); | 677 SQLite::Statement s2(db_, SQLITE_FROM_HERE, "SELECT uuid FROM Series WHERE parentStudy=?"); |
681 s2.BindString(0, studyUuid); | 678 s2.BindString(0, studyUuid); |
701 { | 698 { |
702 return false; | 699 return false; |
703 } | 700 } |
704 | 701 |
705 result["ID"] = patientUuid; | 702 result["ID"] = patientUuid; |
706 result["DicomPatientID"] = s1.ColumnString(0); | |
707 MainDicomTagsToJson(result, patientUuid); | 703 MainDicomTagsToJson(result, patientUuid); |
708 | 704 |
709 Json::Value studies(Json::arrayValue); | 705 Json::Value studies(Json::arrayValue); |
710 SQLite::Statement s2(db_, SQLITE_FROM_HERE, "SELECT uuid FROM Studies WHERE parentPatient=?"); | 706 SQLite::Statement s2(db_, SQLITE_FROM_HERE, "SELECT uuid FROM Studies WHERE parentPatient=?"); |
711 s2.BindString(0, patientUuid); | 707 s2.BindString(0, patientUuid); |