From b6ae4d82bb6f453c800ff6920e63f90cdaa7691b Mon Sep 17 00:00:00 2001 From: Enric Prats Date: Mon, 8 Jan 2024 11:16:36 +0100 Subject: [PATCH] range search added --- .../metadata/SearchFields.php | 15 ++++++++++ modules/stic_Medication_Log/vardefs.php | 3 +- .../metadata/SearchFields.php | 30 +++++++++++++++++++ modules/stic_Prescription/vardefs.php | 6 ++-- 4 files changed, 51 insertions(+), 3 deletions(-) diff --git a/modules/stic_Medication_Log/metadata/SearchFields.php b/modules/stic_Medication_Log/metadata/SearchFields.php index 443083fc439..4fcc4bfd2f6 100644 --- a/modules/stic_Medication_Log/metadata/SearchFields.php +++ b/modules/stic_Medication_Log/metadata/SearchFields.php @@ -60,6 +60,21 @@ 'enable_range_search' => true, 'is_date_field' => true ), + 'range_intake_date' => array( + 'query_type' => 'default', + 'enable_range_search' => true, + 'is_date_field' => true, + ), + 'start_range_intake_date' => array( + 'query_type' => 'default', + 'enable_range_search' => true, + 'is_date_field' => true, + ), + 'end_range_intake_date' => array( + 'query_type' => 'default', + 'enable_range_search' => true, + 'is_date_field' => true, + ), //Range Search Support 'favorites_only' => array( 'query_type' => 'format', diff --git a/modules/stic_Medication_Log/vardefs.php b/modules/stic_Medication_Log/vardefs.php index 909feb30bde..cff6d1aea38 100644 --- a/modules/stic_Medication_Log/vardefs.php +++ b/modules/stic_Medication_Log/vardefs.php @@ -46,7 +46,8 @@ 'unified_search' => false, 'merge_filter' => 'disabled', 'size' => '20', - 'enable_range_search' => false, + 'options' => 'date_range_search_dom', + 'enable_range_search' => 1, ), 'medication' => array ( diff --git a/modules/stic_Prescription/metadata/SearchFields.php b/modules/stic_Prescription/metadata/SearchFields.php index 459532744b4..b74053fa301 100644 --- a/modules/stic_Prescription/metadata/SearchFields.php +++ b/modules/stic_Prescription/metadata/SearchFields.php @@ -60,6 +60,36 @@ 'enable_range_search' => true, 'is_date_field' => true ), + 'range_start_date' => array( + 'query_type' => 'default', + 'enable_range_search' => true, + 'is_date_field' => true, + ), + 'start_range_start_date' => array( + 'query_type' => 'default', + 'enable_range_search' => true, + 'is_date_field' => true, + ), + 'end_range_start_date' => array( + 'query_type' => 'default', + 'enable_range_search' => true, + 'is_date_field' => true, + ), + 'range_end_date' => array( + 'query_type' => 'default', + 'enable_range_search' => true, + 'is_date_field' => true, + ), + 'start_range_end_date' => array( + 'query_type' => 'default', + 'enable_range_search' => true, + 'is_date_field' => true, + ), + 'end_range_end_date' => array( + 'query_type' => 'default', + 'enable_range_search' => true, + 'is_date_field' => true, + ), //Range Search Support 'favorites_only' => array( 'query_type' => 'format', diff --git a/modules/stic_Prescription/vardefs.php b/modules/stic_Prescription/vardefs.php index 6f53022927e..cfe0bc40a94 100644 --- a/modules/stic_Prescription/vardefs.php +++ b/modules/stic_Prescription/vardefs.php @@ -46,7 +46,8 @@ 'unified_search' => false, 'merge_filter' => 'disabled', 'size' => '20', - 'enable_range_search' => false, + 'options' => 'date_range_search_dom', + 'enable_range_search' => 1, ), 'end_date' => array ( @@ -67,7 +68,8 @@ 'unified_search' => false, 'merge_filter' => 'disabled', 'size' => '20', - 'enable_range_search' => false, + 'options' => 'date_range_search_dom', + 'enable_range_search' => 1, ), 'active' => array (