<commit_before><h1>Editing Confidential Morbidity Report</h1>

<% @form_index = 0 %>

<%= error_messages_for :object => [@event, @event.disease, @event.lab_result, @event.active_patient.active_primary_entity.person] %>
<%= error_messages_for :object => [@event.active_patient.active_primary_entity.entities_location] unless @event.active_patient.active_primary_entity.entities_location.nil? %>
<%= error_messages_for :object => [@event.active_patient.active_primary_entity.address] unless @event.active_patient.active_primary_entity.address.nil? %>
<%= error_messages_for :object => [@event.active_patient.active_primary_entity.telephone] unless @event.active_patient.active_primary_entity.telephone.nil? %>

<%= error_messages_for :object => [@event.active_hospital.hospitals_participation] unless @event.active_hospital.nil? or @event.active_hospital.hospitals_participation.nil? %>
<%= error_messages_for :object => [@event.active_reporting_agency.active_secondary_entity.place] unless @event.active_reporting_agency.nil? %>
<%= error_messages_for :object => @event.answers unless @event.answers.nil? %>

<script type="text/javascript">
var myTabs = new YAHOO.widget.TabView("cmr_tabs");
</script>

<span id='disable_tabs' onClick="myTabs.removeClass('yui-navset'); myTabs.removeClass('yui-content'); ['demographic_tab','clinical_tab','lab_info_tab','epi_tab','reporting_tab','administrative_tab', 'investigation_tab'].each(Element.show); Element.hide('disable_tabs'); Element.hide('tabs'); Element.show('enable_tabs');return false;">[Disable Tabs]</span>
<span id='enable_tabs' onClick="myTabs.addClass('yui-navset'); myTabs.addClass('yui-content'); ['demographic_tab','clinical_tab','lab_info_tab','epi_tab','reporting_tab','administrative_tab', 'investigation_tab','enable_tabs'].each(Element.hide); Element.show('disable_tabs'); Element.show('tabs'); myTabs.set('activeIndex',0); return false;" style='display: none;'>[Enable Tabs]</span>

<% can_investigate = ( (@event.under_investigation? or @event.reopened?) and User.current_user.is_entitled_to_in?(:investigate, @event.active_jurisdiction.secondary_entity_id) ) %>

<div id="cmr_tabs" class="yui-navset">
  <ul id='tabs' class="yui-nav">
    <li class="selected"><a href="#demographic_tab"><em>Demographic Information</em></a></li>
    <li><a href="#clinical_tab"><em>Clinical Information</em></a></li>
    <li><a href="#lab_info_tab"><em>Laboratory Information</em></a></li>
    <li><a href="#epi_tab"><em>Epidemiological Information</em></a></li><commit_msg>Fix to unds575.  CMR with no disease but under investigation causes form rendering to crash app.<commit_after><h1>Editing Confidential Morbidity Report</h1>

<% @form_index = 0 %>

<%= error_messages_for :object => [@event, @event.disease, @event.lab_result, @event.active_patient.active_primary_entity.person] %>
<%= error_messages_for :object => [@event.active_patient.active_primary_entity.entities_location] unless @event.active_patient.active_primary_entity.entities_location.nil? %>
<%= error_messages_for :object => [@event.active_patient.active_primary_entity.address] unless @event.active_patient.active_primary_entity.address.nil? %>
<%= error_messages_for :object => [@event.active_patient.active_primary_entity.telephone] unless @event.active_patient.active_primary_entity.telephone.nil? %>

<%= error_messages_for :object => [@event.active_hospital.hospitals_participation] unless @event.active_hospital.nil? or @event.active_hospital.hospitals_participation.nil? %>
<%= error_messages_for :object => [@event.active_reporting_agency.active_secondary_entity.place] unless @event.active_reporting_agency.nil? %>
<%= error_messages_for :object => @event.answers unless @event.answers.nil? %>

<script type="text/javascript">
var myTabs = new YAHOO.widget.TabView("cmr_tabs");
</script>

<span id='disable_tabs' onClick="myTabs.removeClass('yui-navset'); myTabs.removeClass('yui-content'); ['demographic_tab','clinical_tab','lab_info_tab','epi_tab','reporting_tab','administrative_tab', 'investigation_tab'].each(Element.show); Element.hide('disable_tabs'); Element.hide('tabs'); Element.show('enable_tabs');return false;">[Disable Tabs]</span>
<span id='enable_tabs' onClick="myTabs.addClass('yui-navset'); myTabs.addClass('yui-content'); ['demographic_tab','clinical_tab','lab_info_tab','epi_tab','reporting_tab','administrative_tab', 'investigation_tab','enable_tabs'].each(Element.hide); Element.show('disable_tabs'); Element.show('tabs'); myTabs.set('activeIndex',0); return false;" style='display: none;'>[Enable Tabs]</span>

  <% can_investigate = ( (@event.under_investigation? or @event.reopened?) and User.current_user.is_entitled_to_in?(:investigate, @event.active_jurisdiction.secondary_entity_id) and !@event.disease.disease_id.nil? ) %>

<div id="cmr_tabs" class="yui-navset">
  <ul id='tabs' class="yui-nav">
    <li class="selected"><a href="#demographic_tab"><em>Demographic Information</em></a></li>
    <li><a href="#clinical_tab"><em>Clinical Information</em></a></li>
    <li><a href="#lab_info_tab"><em>Laboratory Information</em></a></li>
    <li><a href="#epi_tab"><em>Epidemiological Information</em></a></li>
{'fraction_non_alphanumeric': 0.1734081672150184, 'fraction_numerical': 0.002128894910005806, 'mean_word_length': 9.133333333333333, 'pattern_counts': {'":': 0, '<': 89, '<?xml version=': 0, '>': 103, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6266599', 'n_tokens_mistral': 1766, 'n_tokens_neox': 1644, 'n_words': 220}