Creating timepoint browser

This commit is contained in:
Bruno Alves de Faria committed 2017-10-25 22:18:42 -02:00
1 parent eb372bed03
commit fd9cfed8e9
23 files changed
+204 -132

No files matched your search

@@ -2,49 +2,52 @@ import { OHIF } from 'meteor/ohif:core';
import { remoteGetValue } from '../../lib/remoteGetValue';
function resultDataToStudies(resultData) {
var studies = [];
const studies = [];
resultData.forEach(function(study) {
studies.push({
studyInstanceUid: remoteGetValue(study['0020,000d']),
// 00080005 = SpecificCharacterSet
studyDate: remoteGetValue(study['0008,0020']),
studyTime: remoteGetValue(study['0008,0030']),
accessionNumber: remoteGetValue(study['0008,0050']),
referringPhysicianName: remoteGetValue(study['0008,0090']),
// 00081190 = URL
patientName: remoteGetValue(study['0010,0010']),
patientId: remoteGetValue(study['0010,0020']),
patientBirthdate: remoteGetValue(study['0010,0030']),
patientSex: remoteGetValue(study['0010,0040']),
studyId: remoteGetValue(study['0020,0010']),
numberOfStudyRelatedSeries: parseFloat(remoteGetValue(study['0020,1206'])),
numberOfStudyRelatedInstances: parseFloat(remoteGetValue(study['0020,1208'])),
studyDescription: remoteGetValue(study['0008,1030']),
modalities: remoteGetValue(study['0008,0061'])
resultData.forEach(function(study) {
studies.push({
studyInstanceUid: remoteGetValue(study['0020,000d']),
// 00080005 = SpecificCharacterSet
studyDate: remoteGetValue(study['0008,0020']),
studyTime: remoteGetValue(study['0008,0030']),
accessionNumber: remoteGetValue(study['0008,0050']),
referringPhysicianName: remoteGetValue(study['0008,0090']),
// 00081190 = URL
patientName: remoteGetValue(study['0010,0010']),
patientId: remoteGetValue(study['0010,0020']),
patientBirthdate: remoteGetValue(study['0010,0030']),
patientSex: remoteGetValue(study['0010,0040']),
studyId: remoteGetValue(study['0020,0010']),
numberOfStudyRelatedSeries: parseFloat(remoteGetValue(study['0020,1206'])),
numberOfStudyRelatedInstances: parseFloat(remoteGetValue(study['0020,1208'])),
studyDescription: remoteGetValue(study['0008,1030']),
modalities: remoteGetValue(study['0008,0061'])
});
});
});
return studies;
return studies;
}
OHIF.studies.services.REMOTE.Studies = function(server, filter) {
var parameters = {
PatientName: filter.patientName ? filter.patientName : "",
const parameters = {
studyInstanceUID: filter.studyInstanceUid || '',
PatientName: filter.patientName ? filter.patientName : '',
PatientID: filter.patientId,
AccessionNumber: filter.accessionNumber ? filter.accessionNumber : "",
StudyDescription: "",
StudyDate : "",
StudyTime : "",
ReferringPhysicianName : "",
PatientBirthDate : "",
PatientSex : "",
StudyID : "",
NumberOfStudyRelatedSeries : "",
NumberOfStudyRelatedInstances : "",
ModalitiesInStudy : ""
AccessionNumber: filter.accessionNumber ? filter.accessionNumber : '',
StudyDescription: '',
StudyDate: '',
StudyTime: '',
ReferringPhysicianName: '',
PatientBirthDate: '',
PatientSex: '',
StudyID: '',
NumberOfStudyRelatedSeries: '',
NumberOfStudyRelatedInstances: '',
ModalitiesInStudy: ''
};
var remote = new OrthancRemote(server.root, server.sourceAE);
var data = remote.findStudies(server.modality, parameters);
const remote = new OrthancRemote(server.root, server.sourceAE);
const data = remote.findStudies(server.modality, parameters);
return resultDataToStudies(data.results);
};