forked from openemr/openemr
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto suggest for lot number in the immunization form
Signed-off-by: Sherwin Gaddis <[email protected]>
- Loading branch information
1 parent
55872bd
commit 19e733e
Showing
2 changed files
with
68 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
<?php | ||
|
||
/** Copyright (C) 2016 Sherwin Gaddis <[email protected]> | ||
* | ||
* LICENSE: This program is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU General Public License | ||
* as published by the Free Software Foundation; either version 2 | ||
* of the License, or (at your option) any later version. | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see <http:https://opensource.org/licenses/gpl-license.php>;. | ||
* | ||
* @package OpenEMR | ||
* Sherwin Gaddis <[email protected]> | ||
* @link http:https://www.open-emr.org | ||
*/ | ||
|
||
//SANITIZE ALL ESCAPES | ||
$sanitize_all_escapes=true; | ||
// | ||
|
||
//STOP FAKE REGISTER GLOBALS | ||
$fake_register_globals=false; | ||
// | ||
require_once('../../../interface/globals.php'); | ||
|
||
|
||
if (isset($_GET['term'])){ | ||
$term = $_GET['term']; | ||
$return_arr = array(); | ||
|
||
try { | ||
$sql = "SELECT DISTINCT lot_number FROM immunizations WHERE lot_number LIKE ? "; | ||
|
||
$res = sqlstatement($sql,"%".$term."%"); | ||
while($row = sqlFetchArray($res)){ | ||
$return_arr[] = $row['lot_number'] ; | ||
} | ||
|
||
|
||
catch(Excption $e) { | ||
echo 'ERROR: ' . $e->getMessage(), "\n"; | ||
} | ||
|
||
|
||
/* Toss back results as json encoded array. */ | ||
echo json_encode($return_arr); | ||
} | ||
|
||
|
||
?> |