From: Rod Roark Date: Tue, 8 Jan 2013 17:27:03 +0000 (-0800) Subject: Assorted minor corrections per code review. X-Git-Tag: whats-been-changed~439 X-Git-Url: https://repo.or.cz/w/openemr.git/commitdiff_plain/a3176ebab0343016458e06156590237986dfe930 Assorted minor corrections per code review. --- diff --git a/interface/forms/procedure_order/new.php b/interface/forms/procedure_order/new.php index c2737ed3d..a97ae78ff 100644 --- a/interface/forms/procedure_order/new.php +++ b/interface/forms/procedure_order/new.php @@ -220,7 +220,7 @@ var gbl_formseq; function sel_proc_type(formseq) { var f = document.forms[0]; // if (!f.form_lab_id.value) { - // alert(''); + // alert(''); // return; // } gbl_formseq = formseq; @@ -272,7 +272,7 @@ function addProcLine() { var row = table.insertRow(table.rows.length); var cell = row.insertCell(0); cell.vAlign = 'top'; - cell.innerHTML = " " + (i + 1) + ":"; + cell.innerHTML = " " + (i + 1) + ":"; var cell = row.insertCell(1); cell.vAlign = 'top'; cell.innerHTML = @@ -479,10 +479,10 @@ generate_form_field(array('data_type'=>1,'field_id'=>'order_status', : ' + value='' onclick="sel_proc_type()" onfocus='this.blur()' - title='' + title='' style='width:100%;cursor:pointer;cursor:hand' readonly /> diff --git a/interface/forms/procedure_order/report.php b/interface/forms/procedure_order/report.php index 9808d7e9f..ea4b3f5dc 100644 --- a/interface/forms/procedure_order/report.php +++ b/interface/forms/procedure_order/report.php @@ -28,26 +28,26 @@ function procedure_order_report($pid, $encounter, $cols, $id) { echo "\n"; echo " \n"; echo " \n"; - echo " \n"; + echo " \n"; echo " \n"; echo " \n"; echo " \n"; - echo " \n"; + echo " \n"; echo " \n"; echo " \n"; echo " \n"; - echo " \n"; + echo " \n"; echo " \n"; echo " \n"; echo " \n"; - echo " \n"; + echo " \n"; echo " \n"; if (!empty($data['procedure_report_id'])) { echo " \n"; echo " \n"; echo " \n"; echo " \n"; diff --git a/interface/forms/procedure_order/table.sql b/interface/forms/procedure_order/table.sql dissimilarity index 99% index 9d5955157..ed6644738 100644 --- a/interface/forms/procedure_order/table.sql +++ b/interface/forms/procedure_order/table.sql @@ -1,15 +1,2 @@ -CREATE TABLE IF NOT EXISTS procedure_order ( - `procedure_order_id` bigint(20) NOT NULL AUTO_INCREMENT, - `procedure_type_id` bigint(20) NOT NULL COMMENT 'references procedure_type.procedure_type_id', - `provider_id` bigint(20) NOT NULL DEFAULT 0 COMMENT 'references users.id', - `patient_id` bigint(20) NOT NULL COMMENT 'references patient_data.pid', - `encounter_id` bigint(20) NOT NULL DEFAULT 0 COMMENT 'references form_encounter.encounter', - `date_collected` datetime DEFAULT NULL COMMENT 'time specimen collected', - `date_ordered` date DEFAULT NULL, - `order_priority` varchar(31) NOT NULL DEFAULT '', - `order_status` varchar(31) NOT NULL DEFAULT '' COMMENT 'pending,routed,complete,canceled', - `patient_instructions` text NOT NULL DEFAULT '', - `activity` tinyint(1) NOT NULL DEFAULT 1 COMMENT '0 if deleted', - PRIMARY KEY (`procedure_order_id`) -) ENGINE=MyISAM; - +-- Tables supporting procedure orders are already defined at installation. + diff --git a/interface/orders/gen_hl7_order.inc.php b/interface/orders/gen_hl7_order.inc.php index 56e12432a..256325bce 100644 --- a/interface/orders/gen_hl7_order.inc.php +++ b/interface/orders/gen_hl7_order.inc.php @@ -435,17 +435,17 @@ function send_hl7_order($ppid, $out) { // Connect to the server and write the file. $sftp = new Net_SFTP($remote_host); if (!$sftp->login($pprow['login'], $pprow['password'])) { - return xl('Login to remote host') . " '$remote_host' " . xl('failed'); + return xl('Login to this remote host failed') . ": '$remote_host'"; } if (!$sftp->put($filename, $out)) { - return xl('Creating file') . " '$filename' " . xl('on remote host failed'); + return xl('Creating this file on remote host failed') . ": '$filename'"; } } // TBD: Insert "else if ($protocol == '???') {...}" to support other protocols. else { - return xl('Protocol') . " '$protocol' " . xl('not implemented'); + return xl('This protocol is not implemented') . ": '$protocol'"; } // Falling through to here indicates success. diff --git a/interface/orders/list_reports.php b/interface/orders/list_reports.php index 1b60d44d2..a0dcf277f 100644 --- a/interface/orders/list_reports.php +++ b/interface/orders/list_reports.php @@ -19,6 +19,9 @@ * @author Rod Roark */ +$sanitize_all_escapes = true; +$fake_register_globals = false; + require_once("../globals.php"); require_once("$srcdir/acl.inc"); require_once("$srcdir/formdata.inc.php"); @@ -26,6 +29,13 @@ require_once("$srcdir/options.inc.php"); require_once("$srcdir/formatting.inc.php"); require_once("./receive_hl7_results.inc.php"); +/** + * Get a list item title, translating if required. + * + * @param string $listid List identifier. + * @param string $value List item identifier. + * @return string The item's title. + */ function getListItem($listid, $value) { $lrow = sqlQuery("SELECT title FROM list_options " . "WHERE list_id = ? AND option_id = ?", @@ -35,6 +45,12 @@ function getListItem($listid, $value) { return $tmp; } +/** + * Adapt text to be suitable as the contents of a table cell. + * + * @param string $s Input text. + * @return string Output text. + */ function myCellText($s) { if ($s === '') return ' '; return text($s); @@ -42,14 +58,14 @@ function myCellText($s) { // Check authorization. $thisauth = acl_check('patients', 'med'); -if (!$thisauth) die(xl('Not authorized')); +if (!$thisauth) die(xlt('Not authorized')); ?> -<?php xl('Procedure Orders and Reports','e'); ?> +<?php echo xlt('Procedure Orders and Reports'); ?>
" . xlt('Order ID') . ": " . xlt($data['procedure_order_id']) . "" . text($data['procedure_order_id']) . "
" . xlt('Order Date') . ": " . xlt(oeFormatShortDate($data['date_ordered'])) . "" . text(oeFormatShortDate($data['date_ordered'])) . "
" . xlt('Ordered By') . ": " . xlt($data['ulname'] . ', ' . $data['ufname'] . ' ' . $data['umname']) . "" . text($data['ulname'] . ', ' . $data['ufname'] . ' ' . $data['umname']) . "
" . xlt('Lab') . ": " . xlt($data['labname']) . "" . text($data['labname']) . "
 [" . xlt('View Results') . "]