- Add modality tag in filter object to filter studies
This commit is contained in:
parent
bee1e38044
commit
28ba53b328
@ -40,7 +40,7 @@ Services.DIMSE.Studies = function(filter) {
|
|||||||
0x00081030: filter.studyDescription,
|
0x00081030: filter.studyDescription,
|
||||||
0x00100040: "",
|
0x00100040: "",
|
||||||
0x00201208: "",
|
0x00201208: "",
|
||||||
0x00080061: ""
|
0x00080061: filter.modality
|
||||||
};
|
};
|
||||||
|
|
||||||
var results = DIMSE.retrieveStudies(parameters);
|
var results = DIMSE.retrieveStudies(parameters);
|
||||||
|
|||||||
@ -17,6 +17,7 @@ function filterToQIDOURL(server, filter) {
|
|||||||
PatientID: filter.patientId,
|
PatientID: filter.patientId,
|
||||||
AccessionNumber: filter.accessionNumber,
|
AccessionNumber: filter.accessionNumber,
|
||||||
StudyDescription: filter.studyDescription,
|
StudyDescription: filter.studyDescription,
|
||||||
|
ModalitiesInStudy: filter.modality,
|
||||||
limit: filter.limit || 20,
|
limit: filter.limit || 20,
|
||||||
includefield: server.qidoSupportsIncludeField ? 'all' : commaSeparatedFields
|
includefield: server.qidoSupportsIncludeField ? 'all' : commaSeparatedFields
|
||||||
};
|
};
|
||||||
|
|||||||
@ -71,17 +71,6 @@ function isIndexOf(mainVal, searchVal) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Replace object if undefined
|
|
||||||
*/
|
|
||||||
function replaceUndefinedColumnValue(text) {
|
|
||||||
if (text === undefined || text === 'undefined') {
|
|
||||||
return '';
|
|
||||||
} else {
|
|
||||||
return text.toUpperCase();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Convert string to study date
|
* Convert string to study date
|
||||||
*/
|
*/
|
||||||
@ -109,13 +98,10 @@ function search() {
|
|||||||
patientName: getFilter($('input#patientName').val()),
|
patientName: getFilter($('input#patientName').val()),
|
||||||
patientId: getFilter($('input#patientId').val()),
|
patientId: getFilter($('input#patientId').val()),
|
||||||
accessionNumber: getFilter($('input#accessionNumber').val()),
|
accessionNumber: getFilter($('input#accessionNumber').val()),
|
||||||
studyDescription: getFilter($('input#studyDescription').val())
|
studyDescription: getFilter($('input#studyDescription').val()),
|
||||||
|
modality: getFilter($('input#modality').val())
|
||||||
};
|
};
|
||||||
|
|
||||||
// Make sure that modality has a reasonable value, since it is occasionally
|
|
||||||
// returned as 'undefined'
|
|
||||||
var modality = replaceUndefinedColumnValue($('input#modality').val());
|
|
||||||
|
|
||||||
// Clear all current studies
|
// Clear all current studies
|
||||||
WorklistStudies.remove({});
|
WorklistStudies.remove({});
|
||||||
|
|
||||||
@ -137,8 +123,7 @@ function search() {
|
|||||||
studies.forEach(function(study) {
|
studies.forEach(function(study) {
|
||||||
|
|
||||||
// Search the rest of the parameters that aren't done via the server call
|
// Search the rest of the parameters that aren't done via the server call
|
||||||
if (isIndexOf(study.modalities, modality) &&
|
if ((new Date(studyDateFrom).setHours(0, 0, 0, 0) <= convertStringToStudyDate(study.studyDate) || !studyDateFrom || studyDateFrom === "") &&
|
||||||
(new Date(studyDateFrom).setHours(0, 0, 0, 0) <= convertStringToStudyDate(study.studyDate) || !studyDateFrom || studyDateFrom === "") &&
|
|
||||||
(convertStringToStudyDate(study.studyDate) <= new Date(studyDateTo).setHours(0, 0, 0, 0) || !studyDateTo || studyDateTo === "")) {
|
(convertStringToStudyDate(study.studyDate) <= new Date(studyDateTo).setHours(0, 0, 0, 0) || !studyDateTo || studyDateTo === "")) {
|
||||||
|
|
||||||
// Convert numberOfStudyRelatedInstance string into integer
|
// Convert numberOfStudyRelatedInstance string into integer
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user