<div class="left">
  <ul>
    <li>
    <label>N° dossier papier :</label> {{ object.paper_id|default_if_none:"Non renseigné" }}
    <button id="update-paper-id-btn" class="icon-edit" title="Modifier"></button>
    </li>
    <li><label>N° dossier informatique :</label> {{ object.id }}</li>
    <li><label>Nom :</label> <span class="lastname">{{ object.last_name }}</span></li>
    <li><label>Prénom :</label> {{ object.first_name }}</li>
    <li><label>Genre :</label> {{ object.get_gender_display|default_if_none:"Non renseigné" }}</li>
    <li><label>Date de naissance :</label> {% if object.birthdate %}{{ object.birthdate|date:"d/m/Y" }}{% else %}Non renseignée{% endif %}</li>
    <li><label>Lieux de vie :</label>
        {% if object.addresses.all %}
        <ul>
          {% for address in object.addresses.all %}
          {% if address.place_of_life %}<li>{{ address.display_name }}</li>{% endif %}
          {% endfor %}
        </ul>
        {% else %}Aucun{% endif %}
    </li>
    <li><label>Date de contact :</label> {{ initial_state.date_selected|date:"d/m/Y" }}</li>
    <li><label>Date de création :</label> {{ object.created|date:"d/m/Y" }}</li>
    <li><label>Lieu de socialisation :</label> {{ object.school|default_if_none:"Non renseigné" }}</li>
    <li><label>Coordinateurs :</label>
        {% if object.coordinators.all %}
        <ul>
          {% for coordinator in object.coordinators.all %}
          <li>{{ coordinator.first_name }} <span class="lastname">{{ coordinator.last_name }}</span></li>
          {% endfor %}
        </ul>
        {% else %}Aucun{% endif %}
    </li>
    <form method="post" id="general-form" class="patientrecordform">{% csrf_token %}
      <li><label>Commentaire </label> <button class="save enable-on-change" id="btn-maj">✔</button><br/>
      {{ forms.general.comment }}
      </li>
    </ul>
  </div>
  <div class="right">
    <ul>
      <li><label>Dernier acte :</label>
      {% if last_rdv %}
      {{ last_rdv.start_datetime|date:"d/m/Y" }} -
      {% for participant in last_rdv.participants %}
      <span class="lastname">{{ participant.last_name }}</span> -
      {% endfor %}
      {{ last_rdv.act_type }}
      {% else %}
      Aucun
      {% endif %}
      </li>
      <li><label>Prochain rendez-vous :</label>
      {% if next_rdv %}
      {{ next_rdv.start_datetime|date:"d/m/Y" }} -
      {% for participant in next_rdv.participants %}
      <span class="lastname">{{ participant.last_name }}</span> -
      {% endfor %}
      {{ next_rdv.act_type }}
      {% else %}
      Aucun
      {% endif %}
      </li>
    </ul>
    <div class="etat">
      <h4>État courant du dossier :  {{ current_state.status.name.lower }}</h4>
      <p>depuis le : {{ current_state.date_selected|date:"d/m/Y" }}</p>
      {% if current_state.comment %}<p><label>Commentaire :</label> {{ current_state.comment }}</p>{% endif %}
      {% for state in status %}
      <button type="button" id="{{ state.0 }}">{{ state.1 }}</button>
      {% endfor %}
      <button type="button" id="patientrecord-history">Historique</button><br/>
      <hr/>
      <p id="confidential-msg" style="display: none; font-size: 10px;">Confidentialité mise à jour</p>
      {{ forms.general.confidential.label_tag }} : {{ forms.general.confidential }}
      <p id="pause-msg" style="display: none; font-size: 10px;">Pause facturation mise à jour</p>
      {{ forms.general.pause.label_tag }} : {{ forms.general.pause }}
      <!-- 3/6 diagnostics -->
    </div>
  </form>

<!--    <form method="post" id="create-directory-form" action="create-directory">{% csrf_token %}-->
<!--      <button>Créer répertoire patient</button>-->
<!--    </form>-->

  <!-- <div class="notifs">
    <h4>Notifications</h4>
    <ul>
      <li>Dossier en pause facturation <button>Sortir</button></li>
    </ul>
  </div> -->

</div>
<br style="clear:both"/>
