From ddf89ef6056085a4bc1a8f80646c2fbd5de08976 Mon Sep 17 00:00:00 2001 From: "sandipsamal117@gmail.com" Date: Wed, 11 Dec 2024 12:32:15 -0500 Subject: [PATCH] use AND logic for filter --- pacs_query.py | 2 +- pfdcm.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pacs_query.py b/pacs_query.py index bcb28cd..ff28492 100644 --- a/pacs_query.py +++ b/pacs_query.py @@ -23,7 +23,7 @@ ) logger.remove() logger.add(sys.stderr, format=logger_format) -__version__ = '1.0.2' +__version__ = '1.0.3' DISPLAY_TITLE = r""" _ diff --git a/pfdcm.py b/pfdcm.py index 4c5c0b7..56f597b 100644 --- a/pfdcm.py +++ b/pfdcm.py @@ -95,12 +95,12 @@ def autocomplete_directive(directive: dict, d_response: dict) -> (list,int): # iteratively check for all search fields and update the search record simultaneously # with SeriesInstanceUID and StudyInstanceUID - flag = False + flag = True for key in directive.keys(): if series.get(key) and directive[key].lower() in series[key]["value"].lower(): - flag = True + flag = flag and True else: - flag = False + flag = flag and False if flag: for label in series: ser[label] = series[label]["value"]