<div class="heading">
  <div class="spaced bg-primary">
    <div class="box">
      <h1>
        {% block heading %}[[ episode.demographics[0].name ]]{% endblock %}
        <small>
          {% block subheading %}
          [[ episode.demographics[0].hospital_number ]]
          [[ episode.demographics[0].date_of_birth | shortDate ]]
          {% endblock %}
        </small>
      </h1>
    </div>
  </div>
</div>

<div class="container headed-content-offset detail">
  <div class="row"> <!-- Main Panel -->

    <div class="col-md-3"> <!-- Action Panels -->
      <div class="affix col-md-2">
        <div class="panel panel-default">
          <div class="panel-heading ">
            <h3>
              [[ episode.demographics[0].name ]]
            </h3>
          </div>
          <ul class="list-group">
            <li class="list-group-item">
              <button class="btn btn-secondary" ng-click="open_modal('PatientHistoryCtrl', '/templates/modals/patient_history.html', 'lg', {episode: episode})">
                <i class="fa fa-history"></i>
                History
              </button>
            </li>
            <li class="list-group-item">
              {% with edit_teams="editNamedItem('tagging', 0)" %}
              {% include 'partials/_teams_list.html' %}
              {% endwith %}
            </li>
            <li class="list-group-item">
              {% include 'partials/_episode_actions.html' %}
            </li>
          </ul>
        </div>
        {% block sidebar_panels %}{% endblock %}
      </div>
    </div><!-- Ends Action Panels -->

    <div class="col-md-9"> <!-- Detail panels -->
      <div class="row">
        <div class="col-md-6"> <!-- Detail panels col 1 -->
          {% block left_column %}{% endblock %}
        </div>                 <!-- Ends Detail panels col 1 -->
        <div class="col-md-6"> <!-- Detail panels col 2 -->
          {% block right_column %}{% endblock %}
        </div>                 <!-- Ends Detail panels col 2 -->
      </div>
      <div class="row">
        {% block under_split_cols %}{% endblock %}
      </div>
    </div> <!-- Ends Detail Panels -->
    
  </div>
</div> <!-- Ends Main Panel -->
