document.getElementById('row_injury_part' ).style.display = injdisp; document.getElementById('row_injury_type' ).style.display = injdisp; document.getElementById('row_medical_system').style.display = nordisp; document.getElementById('row_medical_type' ).style.display = nordisp; // Change label text of 'title' row depending on issue type: document.getElementById('title_diagnosis').innerHTML = '<b>' + (index == <?php echo issueTypeIndex('allergy'); ?> ? '<?php echo xl('Allergy'); ?> ' : (index == <?php echo issueTypeIndex('general'); ?> ? '<?php echo xl('Title'); ?> ' : '<?php echo xl('Text Diagnosis'); ?> ')) + ':</b>'; <?php } else { ?> document.getElementById('row_referredby' ).style.display = (f.form_referredby.value) ? '' : comdisp;
for (ix = 0; ix < listBoxOptions2[index].length; ++ix) { listBoxOpts2[ix] = listBoxOptions2[index][ix]; listBoxOpts2[ix].title = listBoxOptions2[index][ix].text; } document.getElementById('row_codeSelect2').style.display = ix ? '' : 'none'; ////////////////////// // // Show or hide various rows depending on issue type, except do not // hide the comments or referred-by fields if they have data. var comdisp = (aitypes[index] == 1) ? 'none' : ''; var revdisp = (aitypes[index] == 1) ? '' : 'none'; var injdisp = (aitypes[index] == 2) ? '' : 'none'; var nordisp = (aitypes[index] == 0) ? '' : 'none'; // reaction row should be displayed only for medication allergy. var alldisp = (index == <?php echo issueTypeIndex('allergy'); ?> ) ? '' : 'none'; document.getElementById('row_enddate' ).style.display = comdisp; // Note that by default all the issues will not show the active row // (which is desired functionality, since then use the end date // to inactivate the item.) document.getElementById('row_active' ).style.display = revdisp; document.getElementById('row_diagnosis' ).style.display = comdisp; document.getElementById('row_occurrence' ).style.display = comdisp; document.getElementById('row_classification').style.display = injdisp; document.getElementById('row_reinjury_id' ).style.display = injdisp; document.getElementById('row_severity' ).style.display = alldisp; document.getElementById('row_reaction' ).style.display = alldisp; document.getElementById('row_referredby' ).style.display = (f.form_referredby.value) ? '' : comdisp; document.getElementById('row_comments' ).style.display = (f.form_comments.value ) ? '' : revdisp;