Skip to content

Commit

Permalink
cdr wildcard (openemr#416)
Browse files Browse the repository at this point in the history
* New  Demographics filter criteria wild card

* new Demographics filter criteria wild card - #CURDATE#
  • Loading branch information
eyalvo-matrix authored and bradymiller committed Jan 2, 2017
1 parent 739c51d commit ced560f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions library/clinical_rules.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) . "` " .
Expand Down

0 comments on commit ced560f

Please sign in to comment.