We have modalities that are configured to query conquest by today's date by default, and some modalities allow users to change this when querying but some don't. For those that don't it creates a situation around midnight each night where things get a little unpredictable and very time dependant, for example if a scan is scheduled for 00:10 the following day but it's only 23:50 at the moment then the operator has to wait until midnight to see the entry. Things also become very sensitive to how correct the clocks are on each modality and on conquest, and a difference of a few minutes or more will cause similar mismatching effects. To further complicate things, some modalities implement a feature where they can search for studies "within X hours of now" but in practice it's not always implemented correctly and if this window of time crosses over into a different day it results in a query to conquest like "date>=today AND time>=21:00 AND date<=tomorrow AND time<= 03:00". When this happens this query returns no results, because of the way the times are ANDed (eg >=21:00 AND <= 03:00).
To avoid these issues I'm exploring the possibility of using a WorkListQueryConverter0 to override all date and time queries that a modality may have set, and instead set it to a rolling window that I can apply to all incoming queries, for example filter to all studies from 24 hours in the past to 24 hours in the future no matter what time/date was queried for. However to do this without falling into the wierdness around midnight mentioned above I need an OR clause, for example "(date >=today AND time>=21:00) OR (date<=tomorrow AND time<= 03:00)".
I've tried searching in the code to see if it's possible to do an OR instead of an AND when setting fields in the query but I don't think I found the right place. I've also tried searching to see if it's even possible to define an OR in these queries but also couldn't find any guidance from the standard.
Is this possible? Any suggestions or pointers would be greatly appreciated, thanks in advance!