# HG changeset patch # User Sebastien Jodogne # Date 1346331153 -7200 # Node ID a08b085190e1d89c1b7bb0300689b0159203b639 # Parent 741efcd396822ea4054348ca82086c84b5575ba4 simplifications diff -r 741efcd39682 -r a08b085190e1 PalantirExplorer/explorer.js --- a/PalantirExplorer/explorer.js Thu Aug 30 14:38:05 2012 +0200 +++ b/PalantirExplorer/explorer.js Thu Aug 30 14:52:33 2012 +0200 @@ -207,11 +207,14 @@ { var v = tags[i]; - if (v == "PatientBirthDate") + if (i == "PatientBirthDate" || + i == "StudyDate" || + i == "SeriesDate") { v = FormatDicomDate(v); } - else if (v == "DicomStudyInstanceUID") + else if (i == "DicomStudyInstanceUID" || + i == "DicomSeriesInstanceUID") { v = SplitLongUid(v); } @@ -227,18 +230,14 @@ function FormatPatient(patient, link, isReverse) { - var s = ('

{0}

' + - '

Patient ID: {1}

' + - '

Accession aaNumber: {2}

' + - '

Date of Birth: {3}

' + - '

Sex: {4}

' + - '{5}' + var s = ('

{0}

{1}' + + '{2}' ).format (patient.MainDicomTags.PatientName, - patient.DicomPatientID, - patient.MainDicomTags.AccessionNumber, - FormatDicomDate(patient.MainDicomTags.PatientBirthDate), - patient.MainDicomTags.PatientSex, + FormatMainDicomTags(patient.MainDicomTags, [ + "PatientName", + "OtherPatientIDs" + ]), patient.Studies.length ); @@ -249,14 +248,14 @@ function FormatStudy(study, link, isReverse) { - var s = ('

{0}

' + - //'

Study Instance UID: {1}

' + - '{1}' + + var s = ('

{0}

{1}' + '{2}' ).format (study.MainDicomTags.StudyDescription, - //SplitLongUid(study.DicomStudyInstanceUID), - FormatMainDicomTags(study.MainDicomTags, [ "StudyDescription", "StudyTime" ]), + FormatMainDicomTags(study.MainDicomTags, [ + "StudyDescription", + "StudyTime" + ]), study.Series.length ); @@ -267,17 +266,15 @@ function FormatSeries(series, link, isReverse) { - var s = ('

{0}

' + - '

Modality: {1}

' + - '

Protocol: {2}

' + - '

Station name: {3}

' + - '

Series Instance UID: {4}

' + - '{5}').format + var s = ('

{0}

{1}' + + '{2}').format (series.MainDicomTags.SeriesDescription, - series.MainDicomTags.Modality, - series.MainDicomTags.ProtocolName, - series.MainDicomTags.StationName, - SplitLongUid(series.DicomSeriesInstanceUID), + FormatMainDicomTags(series.MainDicomTags, [ + "SeriesDescription", + "SeriesTime", + "Manufacturer", + "SeriesDate" + ]), series.Instances.length ); @@ -287,11 +284,14 @@ function FormatInstance(instance, link, isReverse) { - var s = ('

Instance {0}

' + - '

SOP Instance UID: {1}

' - ).format + var s = ('

Instance {0}

{1}').format (instance.MainDicomTags.InstanceNumber, - instance.DicomSOPInstanceUID + FormatMainDicomTags(instance.MainDicomTags, [ + "AcquisitionNumber", + "InstanceNumber", + "InstanceCreationDate", + "InstanceCreationTime" + ]) ); return CompleteFormatting(s, link, isReverse); diff -r 741efcd39682 -r a08b085190e1 PalantirServer/ServerIndex.cpp --- a/PalantirServer/ServerIndex.cpp Thu Aug 30 14:38:05 2012 +0200 +++ b/PalantirServer/ServerIndex.cpp Thu Aug 30 14:52:33 2012 +0200 @@ -617,7 +617,6 @@ { result["ID"] = instanceUuid; result["ParentSeries"] = s.ColumnString(0); - result["DicomSOPInstanceUID"] = s.ColumnString(1); result["FileSize"] = s.ColumnInt(2); // TODO switch to 64bit with JsonCpp 0.6? result["FileUuid"] = s.ColumnString(3); MainDicomTagsToJson(result, instanceUuid); @@ -641,7 +640,6 @@ result["ID"] = seriesUuid; result["ParentStudy"] = s1.ColumnString(0); - result["DicomSeriesInstanceUID"] = s1.ColumnString(1); MainDicomTagsToJson(result, seriesUuid); Json::Value instances(Json::arrayValue); @@ -673,7 +671,6 @@ result["ID"] = studyUuid; result["ParentPatient"] = s1.ColumnString(0); - result["DicomStudyInstanceUID"] = s1.ColumnString(1); MainDicomTagsToJson(result, studyUuid); Json::Value series(Json::arrayValue); @@ -703,7 +700,6 @@ } result["ID"] = patientUuid; - result["DicomPatientID"] = s1.ColumnString(0); MainDicomTagsToJson(result, patientUuid); Json::Value studies(Json::arrayValue);