diff --git a/interface/patient_file/encounter/find_code_popup.php b/interface/patient_file/encounter/find_code_popup.php index 7f12a8ea873..227a38a4acc 100644 --- a/interface/patient_file/encounter/find_code_popup.php +++ b/interface/patient_file/encounter/find_code_popup.php @@ -106,9 +106,11 @@ function selcode_target(codetype, code, selector, codedesc, target_element) { } ?> -
+ - +
@@ -123,7 +125,8 @@ function selcode_target(codetype, code, selector, codedesc, target_element) { } $selected_attr = ($default == $code) ? " selected='selected'" : ''; ?> - + ' placeholder="" />
- + + onclick="selcode_target('', '', '', '', + )"> - +
@@ -189,7 +195,8 @@ function selcode_target(codetype, code, selector, codedesc, target_element) { $selector = $row['selector']; $desc = $row['name']; $anchor = ""; + "onclick='return selcode(\"PROD\", " . + attr_js($drug_id) . ", " . attr_js($selector) . ", " . attr_js($desc) . ")'>"; echo ""; echo "$anchor" . text($drug_id . ":" . $selector) . "\n"; echo "$anchor" . text($desc) . "\n"; @@ -200,16 +207,22 @@ function selcode_target(codetype, code, selector, codedesc, target_element) { $itercode = $row['code']; $itertext = ucfirst(strtolower(trim($row['code_text']))); $dynCodeType = $form_code_type ?: $codetype; - if (stripos($dynCodeType, 'VALUESET') !== false) { + if (stripos($dynCodeType, 'VALUESET-OID') !== false) { + $dynCodeType = 'OID'; + } elseif (stripos($dynCodeType, 'VALUESET') !== false) { $dynCodeType = $row['valueset_code_type'] ?? 'VALUESET'; } if (!empty($target_element)) { - // add a 5th parameter to function to select the target element on the form for placing the code. + // add a 5th parameter to function to select the target element + // on the form for placing the code. $anchor = ""; + "onclick='return selcode_target(" . attr_js($dynCodeType) . + ", " . attr_js($itercode) . ", \"\", " . attr_js($itertext) . + ", " . attr_js($target_element) . ")'>"; } else { $anchor = ""; + "onclick='return selcode(" . attr_js($dynCodeType) . + ", " . attr_js($itercode) . ", \"\", " . attr_js($itertext) . ")'>"; } echo " "; echo " $anchor" . text($itercode) . "\n";