2 // Copyright (C) 2010-2017 Rod Roark <rod@sunsetsystems.com>
4 // This program is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU General Public License
6 // as published by the Free Software Foundation; either version 2
7 // of the License, or (at your option) any later version.
8 require_once("../globals.php");
9 require_once("$srcdir/acl.inc");
10 require_once("$srcdir/options.inc.php");
12 use OpenEMR\Core\Header
;
14 $typeid = formData('typeid', 'R') +
0;
15 $parent = formData('parent', 'R') +
0;
16 $ordtype = isset($_REQUEST['addfav']) ?
$_REQUEST['addfav'] : '';
17 $disabled = $ordtype ?
"disabled" : '';
18 $labid = isset($_GET['labid']) ?
$_GET['labid'] +
0 : 0;
21 function QuotedOrNull($fld)
23 $fld = add_escape_custom(trim($fld));
31 function invalue($name)
33 $fld = formData($name, "P", true);
37 function rbinput($name, $value, $desc, $colname)
40 $ret = "<input type='radio' name='$name' value='$value'";
41 if ($row[$colname] == $value) {
49 function rbvalue($rbname)
51 $tmp = $_POST[$rbname];
59 function cbvalue($cbname)
61 return empty($_POST[$cbname]) ?
0 : 1;
64 function recursiveDelete($typeid)
66 $res = sqlStatement("SELECT procedure_type_id FROM " .
67 "procedure_type WHERE parent = '$typeid'");
68 while ($row = sqlFetchArray($res)) {
69 recursiveDelete($row['procedure_type_id']);
72 sqlStatement("DELETE FROM procedure_type WHERE " .
73 "procedure_type_id = '$typeid'");
81 <?php Header
::setupHeader(['opener','topdialog','datetime-picker', 'jquery-ui', 'jquery-ui-base']);?
>
83 <title
><?php
echo $typeid ?
xlt('Edit') : xlt('Add New'); ?
> <?php
echo xlt('Order/Result Type'); ?
></title
>
103 font
-family
: sans
-serif
;
118 .label
-div
:hover
> a
{
119 display
:inline
-block
;
124 margin
: 10px
15px
0px
15px
;
126 div
[id$
="_info"] > a
{
130 fieldset
> [class*="col-"] {
132 text
-align
:left
!Important
;
137 <script language
="JavaScript">
139 <?php
require($GLOBALS['srcdir'] . "/restoreSession.php"); ?
>
141 // The name of the form field for find-code popup results.
144 // This is for callback by the find-code popup.
145 // Appends to or erases the current list of related codes.
146 function set_related(codetype
, code
, selector
, codedesc
) {
147 var f
= document
.forms
[0];
148 var s
= f
[rcvarname
].value
;
150 if (s
.length
> 0) s +
= ';';
151 s +
= codetype +
':' + code
;
155 f
[rcvarname
].value
= s
;
158 // This is for callback by the find-code popup.
159 // Returns the array of currently selected codes with each element in codetype:code format.
160 function get_related() {
161 return document
.forms
[0][rcvarname
].value
.split(';');
164 // This is for callback by the find-code popup.
165 // Deletes the specified codetype:code from the currently selected list.
166 function del_related(s
) {
167 my_del_related(s
, document
.forms
[0][rcvarname
], false);
170 // This invokes the find-code popup.
171 function sel_related(varname
) {
172 if (typeof varname
== 'undefined') {
173 varname
= 'form_related_code';
176 let url
= '../patient_file/encounter/find_code_dynamic.php';
177 if (varname
== 'form_diagnosis_code')
178 url
= '../patient_file/encounter/find_code_dynamic.php?codetype=<?php echo attr(collect_codetypes("diagnosis", "csv")); ?>';
180 dlgopen(url
, '_codeslkup', 985, 800, '', '<?php echo xla("Select Default Codes"); ?>');
183 // call back for procedure picker
184 function set_new_fav(result
) {
185 var f
= document
.forms
[0];
186 f
.form_procedure_code
.value
= result
.procedure_code
;
187 f
.form_name
.value
= result
.name
;
188 f
.form_lab_id
.value
= result
.lab_id
;
189 f
.form_procedure_code
.value
= result
.procedure_code
;
190 f
.form_procedure_type
.value
= "for";
191 f
.form_body_site
.value
= result
.body_site
;
192 f
.form_specimen
.value
= result
.specimen
;
193 f
.form_route_admin
.value
= result
.route_admin
;
194 f
.form_laterality
.value
= result
.laterality
;
195 f
.form_description
.value
= result
.description
;
196 f
.form_units
.value
= result
.units
;
197 f
.form_range
.value
= result
.range
;
198 f
.form_standard_code
.value
= result
.standard_code
;
202 function doOrdPicker(e
){
204 let labid
= $
("#form_lab_id").val();
205 let title
= '<?php echo xla("Find Procedure Order"); ?>';
206 dlgopen('find_order_popup.php?addfav=1&labid=' + labid
, '_blank', 850, 500, '', title
);
209 // Show or hide sections depending on procedure type.
210 function proc_type_changed() {
211 var f
= document
.forms
[0];
212 var pt
= f
.form_procedure_type
;
213 var ix
= pt
.selectedIndex
;
215 var ptval
= pt
.options
[ix
].value
;
216 var ptpfx
= ptval
.substring(0, 3);
217 $
('.ordonly').hide();
218 $
('.resonly').hide();
219 $
('.fgponly').hide();
220 $
('.foronly').hide();
221 if (ptpfx
== 'ord') $
('.ordonly').show();
222 if (ptpfx
== 'for') $
('.foronly').show();
223 if (ptpfx
== 'res' || ptpfx
== 'rec') $
('.resonly').show();
224 if (ptpfx
== 'fgp') $
('.fgponly').show(); // Favorites
225 if (ptpfx
== 'grp') {
226 $
('#form_legend').html(
227 "<?php echo xlt('Enter Details for Group'); ?>" +
" <i id='grp' class='fa fa-info-circle oe-text-black oe-superscript enter-details-tooltip' aria-hidden='true'></i>");
228 } else if (ptpfx
== 'fgp') {
229 $
('#form_legend').html(
230 "<?php echo xlt('Enter Details for Custom Favorite Group'); ?>" +
" <i id='ord' class='fa fa-info-circle oe-text-black oe-superscript enter-details-tooltip' aria-hidden='true'></i>");
231 } else if (ptpfx
== 'ord') {
232 $
('#form_legend').html(
233 "<?php echo xlt('Enter Details for Individual Procedures'); ?>" +
" <i id='ord' class='fa fa-info-circle oe-text-black oe-superscript enter-details-tooltip' aria-hidden='true'></i>");
234 } else if (ptpfx
== 'for') {
235 $
('#form_legend').html(
236 "<?php echo xlt('Enter Details for Individual Custom Favorite Item'); ?>" +
" <i id='ord' class='fa fa-info-circle oe-text-black oe-superscript enter-details-tooltip' aria-hidden='true'></i>");
238 else if (ptpfx
== 'res') {
239 $
('#form_legend').html(
240 "<?php echo xlt('Enter Details for Discrete Results'); ?>" +
" <i id='res' class='fa fa-info-circle oe-text-black oe-superscript enter-details-tooltip' aria-hidden='true'></i>");
241 } else if (ptpfx
== 'rec') {
242 $
('#form_legend').html(
243 "<?php echo xlt('Enter Details for Recommendation'); ?>" +
" <i id='rec' class='fa fa-info-circle oe-text-black oe-superscript enter-details-tooltip' aria-hidden='true'></i>");
246 $
(document
).ready(function() {
254 <body
class="body_top">
255 <div
class= "container">
257 // If we are saving, then save and close the window.
259 if ($_POST['form_save']) {
260 $p_procedure_code = invalue('form_procedure_code');
262 if ($_POST['form_procedure_type'] == 'grp') {
263 $p_procedure_code = "''";
267 "name = " . invalue('form_name') . ", " .
268 "lab_id = " . invalue('form_lab_id') . ", " .
269 "procedure_code = $p_procedure_code, " .
270 "procedure_type = " . invalue('form_procedure_type') . ", " .
271 "body_site = " . invalue('form_body_site') . ", " .
272 "specimen = " . invalue('form_specimen') . ", " .
273 "route_admin = " . invalue('form_route_admin') . ", " .
274 "laterality = " . invalue('form_laterality') . ", " .
275 "description = " . invalue('form_description') . ", " .
276 "units = " . invalue('form_units') . ", " .
277 "`range` = " . invalue('form_range') . ", " .
278 "standard_code = " . invalue('form_standard_code') . ", " .
279 "related_code = " . (isset($_POST['form_diagnosis_code']) ?
invalue('form_diagnosis_code') : invalue('form_related_code')) . ", " .
280 "seq = " . invalue('form_seq');
283 sqlStatement("UPDATE procedure_type SET $sets WHERE procedure_type_id = '$typeid'");
284 // Get parent ID so we can refresh the tree view.
285 $row = sqlQuery("SELECT parent FROM procedure_type WHERE " .
286 "procedure_type_id = '$typeid'");
287 $parent = $row['parent'];
289 $newid = sqlInsert("INSERT INTO procedure_type SET parent = '$parent', $sets");
290 // $newid is not really used in this script
292 } elseif ($_POST['form_delete']) {
294 // Get parent ID so we can refresh the tree view after deleting.
295 $row = sqlQuery("SELECT parent FROM procedure_type WHERE " .
296 "procedure_type_id = '$typeid'");
297 $parent = $row['parent'];
298 recursiveDelete($typeid);
302 if ($_POST['form_save'] ||
$_POST['form_delete']) {
303 // Find out if this parent still has any children.
304 $trow = sqlQuery("SELECT procedure_type_id FROM procedure_type WHERE parent = '$parent' LIMIT 1");
305 // Close this window and redisplay the updated list.
306 echo "<script language='JavaScript'>\n";
308 echo " alert('$info_msg');\n";
311 echo " window.close();\n";
312 echo " if (opener.refreshFamily) opener.refreshFamily($parent,'true');\n";
313 echo "</script></body></html>\n";
318 $row = sqlQuery("SELECT * FROM procedure_type WHERE procedure_type_id = '$typeid'");
320 $info_icon_title = xl("Click to reveal more information");
323 <div
class="col-sm-12">
324 <form method
='post' name
='theform' class="form-horizontal"
325 action
='types_edit.php?typeid=<?php echo $typeid ?>&parent=<?php echo $parent ?>'>
326 <!-- no
restoreSession() on submit because session data are not relevant
-->
328 <legend name
="form_legend" id
="form_legend"><?php
echo xlt('Enter Details'); ?
> <i id
='enter_details' class='fa fa-info-circle oe-text-black oe-superscript enter-details-tooltip' aria
-hidden
='true'></i
></legend
>
330 <div
class="col-sm-12">
331 <div
class="clearfix">
332 <div
class="col-sm-12 label-div">
333 <label
class="control-label" for="form_procedure_type"><?php
echo xlt('Procedure Tier'); ?
>:</label
> <a href
="#procedure_type_info" class="info-anchor icon-tooltip" data
-toggle
="collapse" ><i
class="fa fa-question-circle" aria
-hidden
="true"></i
></a
>
335 <div
class="col-sm-12">
337 $ordd = $ordtype ?
$ordtype : $row['procedure_type'];
338 echo generate_select_list(
339 'form_procedure_type',
342 xl('The type of this entity'),
345 'proc_type_changed()'
350 <div id
="procedure_type_info" class="collapse">
351 <a href
="#procedure_type_info" data
-toggle
="collapse" class="oe-pull-away"><i
class="fa fa-times oe-help-x" aria
-hidden
="true"></i
></a
>
352 <p
><?php
echo xlt("In order to properly store and retrieve test results and place new orders, tests/orders have to be setup in
353 a hierarchical manner");?
></p
>
354 <p
><strong
><?php
echo xlt("Single Tests");?
>:</strong
></p
>
355 <p
><?php
echo xlt("Group > Procedure Order > Discrete Result");?
></p
>
356 <p
><?php
echo xlt("Tier 1 - Group - e.g. Serum Chemistry");?
></p
>
357 <p
><?php
echo xlt("Tier 2 - Procedure Order - e.g. Serum Uric Acid");?
></p
>
358 <p
><?php
echo xlt("Tier 3 - Discrete Result - e.g. Serum Uric Acid - will hold the returned result value and Default Units, Default Range etc");?
></p
>
359 <p
><?php
echo xlt("Recommendation - Optional");?
></p
>
360 <p
><strong
><?php
echo xlt("For a Recognized Panel of Tests");?
>:</strong
></p
>
361 <p
><?php
echo xlt("Group > Group > Procedure Order > Discrete Result");?
></p
>
362 <p
><?php
echo xlt("Tier 1 - Group - e.g. Serum Chemistry");?
></p
>
363 <p
><?php
echo xlt("Tier 2 - Group (will display in category column as Sub Group) - e.g. Organ/Disease Panel");?
></p
>
364 <p
><?php
echo xlt("Tier 3 - Procedure Order - e.g. Electrolyte Panel");?
></p
>
365 <p
><?php
echo xlt("Tier 4 - Discrete Result - The actual test names to hold the results returned Na, K, Cl, CO2 and Default Units, Default Range etc");?
></p
>
366 <p
><?php
echo xlt("The difference between the two is that for a panel of tests that are ordered together the individual tests are represented by Discrete Result only and these tests cannot be ordered separately unless they have also been setup as single tests");?
></p
>
367 <p
><strong
><?php
echo xlt("For Custom Groups");?
>: <i
class="fa fa-exclamation-circle oe-text-red" aria
-hidden
="true"></i
> 
;<?php
echo xlt("New in openEMR ver 5.0.2 "); ?
></strong
></p
>
368 <p
><?php
echo xlt("Custom Favorite Group > Custom Favorite Item > Discrete results");?
></p
>
369 <p
><?php
echo xlt("As the fist step choose Group or Custom Favorite Group, as the case may be, as the Top Level Tier 1 and fill in the required details");?
></p
>
370 <p
><?php
echo xlt("For detailed instructions close the 'Enter Details' pop-up and click on the Help icon on the main form. ");?
><i
class="fa fa-question-circle" aria
-hidden
="true"></i
></p
>
375 <div
class="col-sm-12">
376 <div
class="clearfix">
377 <div
class="col-sm-12 label-div">
378 <label
class="control-label" for="form_name"><?php
echo xlt('Name'); ?
>:</label
><a href
="#name_info" class="icon-tooltip" data
-toggle
="collapse"><i
class="fa fa-question-circle" aria
-hidden
="true"></i
></a
>
380 <div
class="col-sm-12">
381 <input type
='text' name
='form_name' id
='form_name 'maxlength
='63'
382 value
='<?php echo htmlspecialchars($row['name
'], ENT_QUOTES); ?>'
383 title
='<?php echo xlt('Your name
for this category
, procedure
or result
'); ?>'
384 class='form-control'>
387 <div id
="name_info" class="collapse">
388 <a href
="#name_info" data
-toggle
="collapse" class="oe-pull-away"><i
class="fa fa-times oe-help-x" aria
-hidden
="true"></i
></a
>
389 <p
><?php
echo xlt("Name for this Category, Procedure or Result");?
></p
>
394 <div
class="col-sm-12">
395 <div
class="clearfix">
396 <div
class="col-sm-12 label-div">
397 <label
class="control-label" for="form_description"><?php
echo xlt('Description'); ?
>:</label
><a href
="#description_info" class="icon-tooltip" data
-toggle
="collapse"><i
class="fa fa-question-circle" aria
-hidden
="true"></i
></a
>
399 <div
class="col-sm-12">
400 <input type
='text' name
='form_description' id
='form_description'
402 value
='<?php echo htmlspecialchars($row['description
'], ENT_QUOTES); ?>'
403 title
='<?php echo xlt('Description of this procedure
or result code
'); ?>'
404 class='form-control'>
407 <div id
="description_info" class="collapse">
408 <a href
="#description_info" data
-toggle
="collapse" class="oe-pull-away"><i
class="fa fa-times oe-help-x" aria
-hidden
="true"></i
></a
>
409 <p
><?php
echo xlt("A short description of this procedure or result code");?
></p
>
414 <div
class="col-sm-12">
415 <div
class="clearfix">
416 <div
class="col-sm-12 label-div">
417 <label
class="control-label" for="form_seq"><?php
echo xlt('Sequence'); ?
>:</label
><a href
="#sequence_info" class="icon-tooltip" data
-toggle
="collapse"><i
class="fa fa-question-circle" aria
-hidden
="true"></i
></a
>
419 <div
class="col-sm-12">
420 <input type
='text' name
='form_seq' id
=='form_seq' maxlength
='11'
421 value
='<?php echo $row['seq
'] + 0; ?>'
422 title
='<?php echo xla('Relative ordering of this entity
'); ?>'
423 class='form-control'>
426 <div id
="sequence_info" class="collapse">
427 <a href
="#sequence_info" data
-toggle
="collapse" class="oe-pull-away"><i
class="fa fa-times oe-help-x" aria
-hidden
="true"></i
></a
>
428 <p
><?php
echo xlt("The order in which the Category, Procedure or Result appears");?
></p
>
429 <p
><?php
echo xlt("If value is left as zero, will be sorted alphabetically");?
></p
>
434 <div
class="col-sm-12 ordonly fgponly foronly">
435 <div
class="clearfix">
436 <div
class="col-sm-12 label-div">
437 <label
class="control-label" for="form_lab_id"><?php
echo xlt('Order From'); ?
>:</label
><a href
="#order_info" class="icon-tooltip" data
-toggle
="collapse"><i
class="fa fa-question-circle" aria
-hidden
="true"></i
></a
>
439 <div
class="col-sm-12">
441 if ($ordtype == 'for') {
442 //$title = xl('This Custom Favorite item can only be sent to the displayed lab, the one that was chosen in the Custom Favorite Group');
443 $ord_disabled = 'disabled';
444 } elseif ($ordtype == 'fgp') {
445 //$title = xl('You cannot edit the already chosen lab, if sending to different lab delete entry and create a new one');
446 $ord_disabled = 'disabled';
448 $title = xl('The entity performing this procedure');
452 <select name
='form_lab_id' id
='form_lab_id' class='form-control <?php echo $ord_disabled ;?>'
453 title
='<?php echo attr($title); ?>'>
456 $ppres = sqlStatement("SELECT ppid, name FROM procedure_providers WHERE ppid = ? ORDER BY name, ppid", array($labid));
458 $ppres = sqlStatement("SELECT ppid, name FROM procedure_providers " . "ORDER BY name, ppid");
462 while ($pprow = sqlFetchArray($ppres)) {
463 echo "<option value='" . attr($pprow['ppid']) . "'";
464 if ($pprow['ppid'] == $row['lab_id']) {
468 echo ">" . text($pprow['name']) . "</option>";
474 <div id
="order_info" class="collapse">
475 <a href
="#order_info" data
-toggle
="collapse" class="oe-pull-away"><i
class="fa fa-times oe-help-x" aria
-hidden
="true"></i
></a
>
476 <p
><?php
echo xlt("The entity performing this procedure");?
></p
>
477 <p
><?php
echo xlt("The entity for a Custom Favorite Item is the entity chosen for the Custom Favorite Group and cannot be changed");?
></p
>
478 <p
><?php
echo xlt("Once saved the entity for a Custom Favorite Group cannot be changed. If you need to change the entity you have to delete this entry and create a new one");?
></p
>
483 <div
class="col-sm-12 ordonly resonly fgponly foronly">
484 <div
class="clearfix">
485 <div
class="col-sm-12 label-div">
486 <label
class="control-label" for="form_procedure_code"><?php
echo xlt('Identifying Code'); ?
>:</label
><a href
="#procedure_code_info" class="icon-tooltip" data
-toggle
="collapse"><i
class="fa fa-question-circle" aria
-hidden
="true"></i
></a
>
488 <div
class="col-sm-12">
489 <input type
='text' name
='form_procedure_code' id
='form_procedure_code'
491 value
='<?php echo htmlspecialchars($row['procedure_code
'], ENT_QUOTES); ?>'
492 title
='<?php echo xla('The vendor
-specific code identifying this procedure
or result
'); ?>'
493 class='form-control'>
496 <div id
="procedure_code_info" class="collapse">
497 <a href
="#procedure_code_info" data
-toggle
="collapse" class="oe-pull-away"><i
class="fa fa-times oe-help-x" aria
-hidden
="true"></i
></a
>
498 <p
><?php
echo xlt("The vendor-specific code identifying this procedure or result. If no vendor enter any arbitrary unique number, preferably a 5 digit zero-padded e.g. 00211");?
></p
>
499 <p
><?php
echo xlt("For proper display of results this is a required field");?
></p
>
500 <p
><i
class="fa fa-exclamation-circle oe-text-orange" aria
-hidden
="true"></i
> <strong
><?php
echo xlt("Important - the Identifying Code for Custom Favorite Group is always user defined");?
></strong
></p
>
505 <div
class="col-sm-12 ordonly foronly">
506 <div
class="clearfix">
507 <div
class="col-sm-12 label-div">
508 <label
class="control-label" for="form_standard_code"><?php
echo xlt('Standard Code'); ?
>:</label
><a href
="#standard_code_info" class="icon-tooltip" data
-toggle
="collapse"><i
class="fa fa-question-circle" aria
-hidden
="true"></i
></a
>
510 <div
class="col-sm-12">
511 <input type
='text' name
='form_standard_code' id
='form_standard_code'
512 value
='<?php echo attr($row['standard_code
']); ?>'
513 title
='<?php echo xla('Enter the LOINC code
for this procedure
'); ?>'
514 class='form-control'>
517 <div id
="standard_code_info" class="collapse">
518 <a href
="#standard_code_info" data
-toggle
="collapse" class="oe-pull-away"><i
class="fa fa-times oe-help-x" aria
-hidden
="true"></i
></a
>
519 <p
><?php
echo xlt("Enter the Logical Observation Identifiers Names and Codes (LOINC) code for this procedure. LOINC is a database and universal standard for identifying medical laboratory observations.");?
></p
>
520 <p
><?php
echo xlt("This code is optional if only using manual lab data entry");?
></p
>
521 <p
><?php
echo xlt("Generally a good idea to include it");?
></p
>
526 <div
class="col-sm-12 foronly">
527 <div
class="clearfix">
528 <div
class="col-sm-12 label-div">
529 <label
class="control-label" for="form_diagnosis_code"><?php
echo xlt('Diagnosis Codes'); ?
>:</label
><a href
="#diagnosis_code_info" class="icon-tooltip" data
-toggle
="collapse"><i
class="fa fa-question-circle" aria
-hidden
="true"></i
></a
>
531 <div
class="col-sm-12">
532 <input type
='text' name
='form_diagnosis_code' id
='form_diagnosis_code'
533 value
='<?php echo attr($row['related_code
']) //data stored in related_code field?>'
534 onclick
='sel_related("form_diagnosis_code")'
535 title
='<?php echo xla('Click to select diagnosis
or procedure code to
default to order
'); ?>'
536 class='form-control' readonly
/>
539 <div id
="diagnosis_code_info" class="collapse">
540 <a href
="#diagnosis_code_info" data
-toggle
="collapse" class="oe-pull-away"><i
class="fa fa-times oe-help-x" aria
-hidden
="true"></i
></a
>
541 <p
><?php
echo xlt("Click to select a default diagnosis or procedure code for this order");?
></p
>
542 <p
><?php
echo xlt("A default code is optional as the needed code can be entered at the time of placing the actual order");?
></p
>
547 <div
class="col-sm-12 ordonly foronly">
548 <div
class="clearfix">
549 <div
class="col-sm-12 label-div">
550 <label
class="control-label" for="form_body_site"><?php
echo xlt('Body Site'); ?
>:</label
><a href
="#body_site_info" class="icon-tooltip" data
-toggle
="collapse"><i
class="fa fa-question-circle" aria
-hidden
="true"></i
></a
>
552 <div
class="col-sm-12">
554 generate_form_field(array(
556 'field_id' => 'body_site',
557 'list_id' => 'proc_body_site',
558 'description' => xl('Body site, if applicable')
559 ), $row['body_site']);
563 <div id
="body_site_info" class="collapse">
564 <a href
="#body_site_info" data
-toggle
="collapse" class="oe-pull-away"><i
class="fa fa-times oe-help-x" aria
-hidden
="true"></i
></a
>
565 <p
><?php
echo xlt("Enter the relevant site if applicable.");?
></p
>
570 <div
class="col-sm-12 ordonly foronly">
571 <div
class="clearfix">
572 <div
class="col-sm-12 label-div">
573 <label
class="control-label" for="form_specimen"><?php
echo xlt('Specimen Type'); ?
>:</label
><a href
="#specimen_info" class="icon-tooltip" data
-toggle
="collapse"><i
class="fa fa-question-circle" aria
-hidden
="true"></i
></a
>
575 <div
class="col-sm-12">
577 generate_form_field(array(
579 'field_id' => 'specimen',
580 'list_id' => 'proc_specimen',
581 'description' => xl('Specimen Type')
582 ), $row['specimen']);
586 <div id
="specimen_info" class="collapse">
587 <a href
="#specimen_info" data
-toggle
="collapse" class="oe-pull-away"><i
class="fa fa-times oe-help-x" aria
-hidden
="true"></i
></a
>
588 <p
><?php
echo xlt("Enter the specimen type if applicable.");?
></p
>
589 <p
><?php
echo xlt("This code is optional, but is a good practise to do so.");?
></p
>
594 <div
class="col-sm-12 ordonly foronly">
595 <div
class="clearfix">
596 <div
class="col-sm-12 label-div">
597 <label
class="control-label" for="form_route_admin"><?php
echo xlt('Administer Via'); ?
>:</label
><a href
="#administer_via_info" class="icon-tooltip" data
-toggle
="collapse"><i
class="fa fa-question-circle" aria
-hidden
="true"></i
></a
>
599 <div
class="col-sm-12">
601 generate_form_field(array(
603 'field_id' => 'route_admin',
604 'list_id' => 'proc_route',
605 'description' => xl('Route of administration, if applicable')
606 ), $row['route_admin']);
610 <div id
="administer_via_info" class="collapse">
611 <a href
="#administer_via_info" data
-toggle
="collapse" class="oe-pull-away"><i
class="fa fa-times oe-help-x" aria
-hidden
="true"></i
></a
>
612 <p
><?php
echo xlt("Enter the specimen type if applicable.");?
></p
>
613 <p
><?php
echo xlt("This code is optional.");?
></p
>
618 <div
class="col-sm-12 ordonly foronly">
619 <div
class="clearfix">
620 <div
class="col-sm-12 label-div">
621 <label
class="control-label" for="form_laterality"><?php
echo xlt('Laterality'); ?
>:</label
><a href
="#laterality_info" class="icon-tooltip" data
-toggle
="collapse"><i
class="fa fa-question-circle" aria
-hidden
="true"></i
></a
>
623 <div
class="col-sm-12">
625 generate_form_field(array(
627 'field_id' => 'laterality',
628 'list_id' => 'proc_lat',
629 'description' => xl('Laterality of this procedure, if applicable')
630 ), $row['laterality']);
634 <div id
="laterality_info" class="collapse">
635 <a href
="#laterality_info" data
-toggle
="collapse" class="oe-pull-away"><i
class="fa fa-times oe-help-x" aria
-hidden
="true"></i
></a
>
636 <p
><?php
echo xlt("Enter the laterality of this procedure, if applicable.");?
></p
>
637 <p
><?php
echo xlt("This code is optional.");?
></p
>
642 <div
class="col-sm-12 resonly">
643 <div
class="clearfix">
644 <div
class="col-sm-12 label-div">
645 <label
class="control-label" for="form_units"><?php
echo xlt('Default Units'); ?
>:</label
><a href
="#units_info" class="icon-tooltip" data
-toggle
="collapse"><i
class="fa fa-question-circle" aria
-hidden
="true"></i
></a
>
647 <div
class="col-sm-12">
649 generate_form_field(array(
651 'field_id' => 'units',
652 'list_id' => 'proc_unit',
653 'description' => xl('Optional default units for manual entry of results')
658 <div id
="units_info" class="collapse">
659 <a href
="#units_info" data
-toggle
="collapse" class="oe-pull-away"><i
class="fa fa-times oe-help-x" aria
-hidden
="true"></i
></a
>
660 <p
><?php
echo xlt("Enter the default units for this test.");?
></p
>
661 <p
><?php
echo xlt("This code is optional, but is a good practise.");?
></p
>
666 <div
class="col-sm-12 resonly">
667 <div
class="clearfix">
668 <div
class="col-sm-12 label-div">
669 <label
class="control-label" for="form_range"><?php
echo xlt('Default Range'); ?
>:</label
><a href
="#range_info" class="icon-tooltip" data
-toggle
="collapse"><i
class="fa fa-question-circle" aria
-hidden
="true"></i
></a
>
671 <div
class="col-sm-12">
672 <input type
='text' name
='form_range' id
='form_range' maxlength
='255'
673 value
='<?php echo htmlspecialchars($row['range
'], ENT_QUOTES); ?>'
674 title
='<?php echo xla('Optional
default range
for manual entry of results
'); ?>'
675 class='form-control' >
678 <div id
="range_info" class="collapse">
679 <a href
="#range_info" data
-toggle
="collapse" class="oe-pull-away"><i
class="fa fa-times oe-help-x" aria
-hidden
="true"></i
></a
>
680 <p
><?php
echo xlt("Enter the default range values if applicable, used in manual entry of results.");?
></p
>
681 <p
><?php
echo xlt("This code is optional.");?
></p
>
686 <div
class="col-sm-12 resonly">
687 <div
class="clearfix">
688 <div
class="col-sm-12 label-div">
689 <label
class="control-label" for="form_related_code"><?php
echo xlt('Followup Services'); ?
>:</label
><a href
="#related_code_info" class="icon-tooltip" data
-toggle
="collapse"><i
class="fa fa-question-circle" aria
-hidden
="true"></i
></a
>
691 <div
class="col-sm-12">
692 <input type
='text' name
='form_related_code' id
='form_related_code'
693 value
='<?php echo attr($row['related_code
']) ?>'
694 onclick
='sel_related("form_related_code")'
695 title
='<?php echo xla('Click to select services to perform
if this result is abnormal
'); ?>'
696 class='form-control' readonly
/>
699 <div id
="related_code_info" class="collapse">
700 <a href
="#related_code_info" data
-toggle
="collapse" class="oe-pull-away"><i
class="fa fa-times oe-help-x" aria
-hidden
="true"></i
></a
>
701 <p
><?php
echo xlt("Click to select services to perform if this result is abnormal.");?
></p
>
702 <p
><?php
echo xlt("This code is optional.");?
></p
>
707 <?php
//can change position of buttons by creating a class 'position-override' and adding rule text-alig:center or right as the case may be in individual stylesheets ?>
708 <div
class="form-group clearfix" id
="button-container">
709 <div
class="col-sm-12 text-left position-override">
710 <div
class="btn-group btn-group-pinch" role
="group">
711 <button type
='submit' name
='form_save' class="btn btn-default btn-save" value
='<?php echo xla('Save
'); ?>'><?php
echo xlt('Save'); ?
></button
>
712 <button type
="button" class="btn btn-link btn-cancel btn-separate-left" onclick
='window.close()';><?php
echo xlt('Cancel');?
></button
>
713 <?php
if ($typeid) { ?
>
714 <button type
='submit' name
='form_delete' class="btn btn-default btn-cancel btn-delete btn-separate-left" value
='<?php echo xla('Delete
'); ?>'><?php
echo xlt('Delete'); ?
></button
>
722 </div
><!--end of conatainer div
-->
725 $
(document
).ready(function() {
726 //for jquery tooltip to function if jquery 1.12.1.js is called via jquery-ui in the Header::setupHeader
727 // the relevant css file needs to be called i.e. jquery-ui-darkness - to get a black tooltip
728 $
('.icon-tooltip').attr("title", "<?php echo xla('Click to see more information'); ?>").tooltip({
734 $
('.enter-details-tooltip').attr( "title", "<?php echo xla('Additional help to fill out this form is available by hovering over labels of each box and clicking on the dark blue help ? icon that is revealed'); ?>" +
". " +
"<?php echo xla('On mobile devices tap once on the label to reveal the help icon and tap on the icon to show the help section'); ?>.").tooltip();
735 $
('#form_procedure_type').click(function(){
736 $
('.enter-details-tooltip').attr( "title", "<?php echo xla('Additional help to fill out this form is available by hovering over labels of each box and clicking on the dark blue help ? icon that is revealed'); ?>" +
". " +
"<?php echo xla('On mobile devices tap once on the label to reveal the help icon and tap on the icon to show the help section'); ?>.").tooltip();