";
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";