Very basic search test based on query param
This commit is contained in:
1 parent
6f9c27f10b
commit
45ca73946d
2 files changed
+87
-22
No files matched your search
@@ -37,22 +37,12 @@ const { getString, getName, getModalities } = DICOMWeb;
|
||||
* @returns {Array} An array of Study MetaData objects
|
||||
*/
|
||||
function processResults(qidoStudies) {
|
||||
debugger;
|
||||
if (!qidoStudies || !qidoStudies.length) {
|
||||
return [];
|
||||
}
|
||||
|
||||
const studies = [];
|
||||
|
||||
// LIST
|
||||
// AccessionNumber,
|
||||
// Modalities,
|
||||
// Instances,
|
||||
// StudyDescription,
|
||||
// PatientId,
|
||||
// PatientName,
|
||||
// StudyDate,
|
||||
|
||||
qidoStudies.forEach(qidoStudy =>
|
||||
studies.push({
|
||||
studyInstanceUid: getString(qidoStudy['0020000D']),
|
||||
@@ -140,10 +130,10 @@ function mapParams(params) {
|
||||
AccessionNumber: params.accessionNumber,
|
||||
StudyDescription: params.studyDescription,
|
||||
ModalitiesInStudy: params.modalitiesInStudy,
|
||||
limit: params.limit,
|
||||
offset: params.offset,
|
||||
fuzzymatching: params.fuzzymatching,
|
||||
includefield: serverSupportsQIDOIncludeField ? commaSeparatedFields : 'all',
|
||||
limit: params.limit || 101,
|
||||
offset: params.offset || 0,
|
||||
fuzzymatching: params.fuzzymatching === undefined ? false : true,
|
||||
includefield: commaSeparatedFields, // serverSupportsQIDOIncludeField ? commaSeparatedFields : 'all',
|
||||
};
|
||||
|
||||
// build the StudyDate range parameter
|
||||
@@ -162,14 +152,14 @@ function mapParams(params) {
|
||||
}
|
||||
|
||||
// Clean query params of undefined values.
|
||||
// const params = {};
|
||||
const final = {};
|
||||
Object.keys(parameters).forEach(key => {
|
||||
if (parameters[key] !== undefined && parameters[key] !== '') {
|
||||
params[key] = parameters[key];
|
||||
final[key] = parameters[key];
|
||||
}
|
||||
});
|
||||
|
||||
return params;
|
||||
return final;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user