Skip to content

Commit

Permalink
minor PSR2 fixes to weno erx
Browse files Browse the repository at this point in the history
  • Loading branch information
bradymiller committed Sep 8, 2017
1 parent 049d45a commit cec9566
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
3 changes: 2 additions & 1 deletion interface/weno/confirm.php
Expand Up @@ -73,7 +73,8 @@
<h3><?php echo xlt("Select Pharmacy"); ?></h3>
<?php echo xlt("Patient Default"); ?> <br>
<input type = 'radio' name = "pharmacy" id = 'patientPharmacy' value="<?php print attr($patientPharmacy['pharmacy_id']) ?>" checked="checked">
<?php if (!$patientPharmacy['name']) {
<?php
if (!$patientPharmacy['name']) {
print "<b>".xlt("Please set pharmacy in patient\'s chart!")."</b><br> <br>";
} else {
print text($patientPharmacy['name']);
Expand Down
1 change: 0 additions & 1 deletion interface/weno/jsonScript.php
Expand Up @@ -15,7 +15,6 @@
require_once($srcdir."/patient.inc");
use OpenEMR\Rx\Weno\TransmitData;


$date = date("Y-m-d");
$pid = $GLOBALS['pid'];
$uid = $_SESSION['authUserID'];
Expand Down
12 changes: 6 additions & 6 deletions library/ajax/drug_autocomplete/search.php
Expand Up @@ -15,12 +15,12 @@
$return_arr = array();
$term = filter_input(INPUT_GET, "term");

$sql = "SELECT drug_label_name, price_per_unit FROM erx_drug_paid WHERE drug_label_name LIKE ? ";
$val = array('%'.$term.'%');
$res = sqlStatement($sql, $val);
while ($row = sqlFetchArray($res)) {
$return_arr[] = $row['drug_label_name'] . " - ". $row['price_per_unit'];
}
$sql = "SELECT drug_label_name, price_per_unit FROM erx_drug_paid WHERE drug_label_name LIKE ? ";
$val = array('%'.$term.'%');
$res = sqlStatement($sql, $val);
while ($row = sqlFetchArray($res)) {
$return_arr[] = $row['drug_label_name'] . " - ". $row['price_per_unit'];
}

/* Toss back results as json encoded array. */
echo json_encode($return_arr);
Expand Down
14 changes: 7 additions & 7 deletions library/ajax/pharmacy_autocomplete/search.php
Expand Up @@ -18,13 +18,13 @@
$city = filter_input(INPUT_GET, "city");
$address = filter_input(INPUT_GET, "address");

$sql = "SELECT id, Store_name, address_line_1, city, state FROM erx_pharmacies WHERE Store_name LIKE ? AND city LIKE ? ";
$sql .= " AND address_line_1 LIKE ? ";
$stm = array('%'.$term.'%','%'.$city.'%','%'.$address.'%');
$res = sqlStatement($sql, $stm);
while ($row = sqlFetchArray($res)) {
$return_arr[] = $row['id'] . " - " . $row['Store_name'] . " " . $row['address_line_1'] . " " . $row['city'] . " " . $row['state'];
}
$sql = "SELECT id, Store_name, address_line_1, city, state FROM erx_pharmacies WHERE Store_name LIKE ? AND city LIKE ? ";
$sql .= " AND address_line_1 LIKE ? ";
$stm = array('%'.$term.'%','%'.$city.'%','%'.$address.'%');
$res = sqlStatement($sql, $stm);
while ($row = sqlFetchArray($res)) {
$return_arr[] = $row['id'] . " - " . $row['Store_name'] . " " . $row['address_line_1'] . " " . $row['city'] . " " . $row['state'];
}
/* Toss back results as json encoded array. */
echo json_encode($return_arr);
}

0 comments on commit cec9566

Please sign in to comment.