|
@@ -246,8 +246,8 @@
|
|
</script>
|
|
</script>
|
|
<script>
|
|
<script>
|
|
(function() {
|
|
(function() {
|
|
- function init() {
|
|
|
|
- $('input[type="text"][name="ICD"]').each(function() {
|
|
|
|
|
|
+ window.initAutoRxAndICDComplete = function () {
|
|
|
|
+ $('input[type="text"][name="ICD"]:not([ac-initialized])').each(function() {
|
|
var elem = this,
|
|
var elem = this,
|
|
dynID = 'icd-' + Math.ceil(Math.random() * 1000000);
|
|
dynID = 'icd-' + Math.ceil(Math.random() * 1000000);
|
|
$(elem).attr('id', dynID);
|
|
$(elem).attr('id', dynID);
|
|
@@ -264,8 +264,9 @@
|
|
$(elem).closest('form').find('[name="contentText"]').val(name);
|
|
$(elem).closest('form').find('[name="contentText"]').val(name);
|
|
return false;
|
|
return false;
|
|
});
|
|
});
|
|
|
|
+ $(elem).attr('ac-initialized', 1);
|
|
});
|
|
});
|
|
- $('[rx-section] input[type="text"][name="contentText"]').each(function() {
|
|
|
|
|
|
+ $('[rx-section] input[type="text"][name="contentText"]:not([ac-initialized])').each(function() {
|
|
var elem = this,
|
|
var elem = this,
|
|
dynID = 'rx-' + Math.ceil(Math.random() * 1000000);
|
|
dynID = 'rx-' + Math.ceil(Math.random() * 1000000);
|
|
$(elem).attr('id', dynID);
|
|
$(elem).attr('id', dynID);
|
|
@@ -282,9 +283,10 @@
|
|
if (strengths)
|
|
if (strengths)
|
|
strengthElem.autocomp.setListAndField(strengths, '');
|
|
strengthElem.autocomp.setListAndField(strengths, '');
|
|
});
|
|
});
|
|
|
|
+ $(elem).attr('ac-initialized', 1);
|
|
});
|
|
});
|
|
}
|
|
}
|
|
- addMCInitializer('patient-single', init);
|
|
|
|
|
|
+ addMCInitializer('patient-single', window.initAutoRxAndICDComplete);
|
|
})();
|
|
})();
|
|
</script>
|
|
</script>
|
|
|
|
|