From ced560f355589d07d7cddd8c85db48a3ce362d22 Mon Sep 17 00:00:00 2001 From: eyalvo-matrix Date: Mon, 2 Jan 2017 11:30:22 +0200 Subject: [PATCH] cdr wildcard (#416) * New Demographics filter criteria wild card * new Demographics filter criteria wild card - #CURDATE# --- library/clinical_rules.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/library/clinical_rules.php b/library/clinical_rules.php index 8eba3f19b..05e5dd108 100644 --- a/library/clinical_rules.php +++ b/library/clinical_rules.php @@ -1929,6 +1929,11 @@ function exist_database_item($patient_id,$table,$column='',$data_comp,$data='',$ ,array($data, $patient_id)); } else { + // This allows to enter the wild card #CURDATE# in the CDR Demographics filter criteria at the value field + // #CURDATE# is replace by the Current date allowing a dynamic date filtering + if ($data=='#CURDATE#') { + $data = date("Y-m-d"); + } // search for number of specific items $sql = sqlStatementCdrEngine("SELECT `" . add_escape_custom($column) . "` " . "FROM `" . add_escape_custom($table) . "` " . -- 2.11.4.GIT