Question:
Admin(Study designer) configured a query rule in CDMS by using the InWindow Function in the rule expression, but the query(InWindow Function) does not work as the Admin expected. What is the order of arguments for the InWindow function in CDMS formula language?
Answer:
-
Syntax(Returns true if a date is in the specified window, based on the reference date):
InWindow() -
Use:
InWindow(date, date, interval, interval, boolean, boolean)
The order of arguments for InWindow is: test date, reference date, reference offset early, reference offset late, early exclusive, late exclusive.
For example, if the rule expression is InWindow(Vitals_time, Injection_time, Minutes(30), Minutes(30), false, false), and the Injection_time is 12:30. The rule evaluation returns true if the Vitals_time is 13:00 (12:30 + 00:30, 12:30 + 00:30) and return false if the Vitals_time is 12:00.
Related Documentation:
Vault Help Documentation: Formula Reference V2 - Date & DateTime Functions - InWindow