From: Rod Roark Date: Tue, 15 Jan 2013 17:57:30 +0000 (-0800) Subject: Added a new order type picker for the procedure order form. X-Git-Tag: whats-been-changed~438 X-Git-Url: https://repo.or.cz/w/openemr.git/commitdiff_plain/b3e1fe68a4234c52f6187d4c22f26072c72d14b2 Added a new order type picker for the procedure order form. --- diff --git a/interface/forms/procedure_order/new.php b/interface/forms/procedure_order/new.php index a97ae78ff..a05373070 100644 --- a/interface/forms/procedure_order/new.php +++ b/interface/forms/procedure_order/new.php @@ -225,12 +225,21 @@ function sel_proc_type(formseq) { // } gbl_formseq = formseq; var ptvarname = 'form_proc_type[' + formseq + ']'; + /******************************************************************** dlgopen('../../orders/types.php?popup=1' + '&labid=' + f.form_lab_id.value + '&order=' + f[ptvarname].value + '&formid=' + '&formseq=' + formseq, '_blank', 800, 500); + ********************************************************************/ + // This replaces the above for an easier/faster order picker tool. + dlgopen('../../orders/find_order_popup.php' + + '?labid=' + f.form_lab_id.value + + '&order=' + f[ptvarname].value + + '&formid=' + + '&formseq=' + formseq, + '_blank', 800, 500); } // This is for callback by the find-procedure-type popup. diff --git a/interface/orders/find_order_popup.php b/interface/orders/find_order_popup.php new file mode 100644 index 000000000..ef34212af --- /dev/null +++ b/interface/orders/find_order_popup.php @@ -0,0 +1,179 @@ + +* +* 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 . +* +* @package OpenEMR +* @author Rod Roark +*/ + +$fake_register_globals = false; +$sanitize_all_escapes = true; + +require_once("../globals.php"); + +$order = 0 + $_GET['order']; +$labid = 0 + $_GET['labid']; + +////////////////////////////////////////////////////////////////////// +// The form was submitted with the selected code type. +if (isset($_GET['typeid'])) { + $typeid = $_GET['typeid'] + 0; + $name = ''; + if ($typeid) { + $ptrow = sqlQuery("SELECT name FROM procedure_type WHERE " . + "procedure_type_id = '$typeid'"); + $name = addslashes($ptrow['name']); + } +?> + + + + + +<?php echo xlt('Procedure Picker'); ?> + + + + + + + + + + +
'> + +
+ + + + + + + + + + + + + + + +
+
+ + + + ' + title='' /> +   + ' /> +     + ' onclick="selcode(0)" /> + +
+
+ + + + + + + + +\n"; // debugging + + $res = sqlStatement($query, array($labid, $search_term, $search_term)); + + while ($row = sqlFetchArray($res)) { + $itertypeid = $row['procedure_type_id']; + $itercode = $row['procedure_code']; + $itertext = trim($row['name']); + $anchor = ""; + echo " "; + echo " \n"; + echo " \n"; + echo " "; + } +?> +
$anchor" . text($itercode) . "$anchor" . text($itertext) . "
+ + + +
+ + +