fix(DicomWebDataSource): Enhance QIDO query to disable wildcard for mrn (#4435)

This commit is contained in:
Alireza authored and GitHub committed 2024-10-24 15:42:42 -04:00
1 parent 7cf8abf0ba
commit 22a1f321af
5 files changed
+59 -24

No files matched your search

@@ -154,9 +154,11 @@ function mapParams(params, options = {}) {
// Add more fields here if you want them in the result
].join(',');
const { supportsWildcard } = options;
const useWildcard =
params?.disableWildcard !== undefined ? !params.disableWildcard : options.supportsWildcard;
const withWildcard = value => {
return supportsWildcard && value ? `*${value}*` : value;
return useWildcard && value ? `*${value}*` : value;
};
const parameters = {
@@ -2,6 +2,7 @@ async function getStudiesForPatientByMRN(dataSource, qidoForStudyUID) {
if (qidoForStudyUID && qidoForStudyUID.length && qidoForStudyUID[0].mrn) {
return dataSource.query.studies.search({
patientId: qidoForStudyUID[0].mrn,
disableWildcard: true,
});
}
console.log('No mrn found for', qidoForStudyUID);