Skip to content

Commit

Permalink
Standardized the diagnosis code searching in the Rules admin GUI
Browse files Browse the repository at this point in the history
  • Loading branch information
bradymiller committed Jun 16, 2012
1 parent 4fe0b72 commit 6ae12f4
Showing 1 changed file with 20 additions and 11 deletions.
31 changes: 20 additions & 11 deletions interface/super/rules/controllers/edit/view/diagnosis.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,36 @@
?>

<head>
<script language="javascript" src="<?php js_src('jQuery.autocomplete.js') ?>"></script>
<script language="javascript" src="<?php js_src('typeahead.js') ?>"></script>
<link rel="stylesheet" href="<?php css_src('rules.css') ?>" type="text/css">
<link rel="stylesheet" href="<?php css_src('jQuery.autocomplete.css') ?>" type="text/css">

<script language="javascript" src="../../../library/dialog.js"></script>
<script type="text/javascript">
var type_ahead = new type_ahead( {
url: "index.php?action=edit!codes",
inputId: "fld_value"
});
type_ahead.init();
// This invokes the find-code popup.
function sel_diagnosis() {
dlgopen('../../patient_file/encounter/find_code_popup.php', '_blank', 500, 400);
}
// This is for callback by the find-code popup.
// Aonly allows one entry.
function set_related(codetype, code, selector, codedesc) {
var f = document.forms[0];
var s = f.fld_value.value;
if (code) {
if (s.length > 0) s += ';';
s = codetype + ':' + code;
} else {
s = '';
}
f.fld_value.value = s;
}
</script>
</head>

<!-- diagnosis -->
<p class="row">
<span class="left_col colhead req" data-fld="fld_diagnosis"><?php echo out( $criteria->getTitle() ); ?></span>
<span class="end_col"><input id="fld_value" type="text" name="fld_value" class="field" value="<?php echo out( $criteria->getRequirements() ); ?>"></span>
<span class="end_col"><input id="fld_value" type="text" name="fld_value" class="field" onclick="sel_diagnosis()" value="<?php echo out( $criteria->getRequirements() ); ?>"></span>
</p>

<br/>

<!-- optional/required and inclusion/exclusion fields -->
<?php echo common_fields( array( "criteria" => $criteria) ); ?>
<?php echo common_fields( array( "criteria" => $criteria) ); ?>

0 comments on commit 6ae12f4

Please sign in to comment.