<div class="patient-details container ng-cloak" ng-cloak>
  <div ng-if="vm.patient == null">
    Es wurde kein Patient ausgewählt!
  </div>
  <div ng-if="vm.patient != null">
    <h1 class="header">Patient</h1>

    <div class="clearfix">
      <div class="patient-personal patient-abstract">
        <h2 class="sub-header">Persönliche Daten</h2>

        <span class="table list">
          <span class="table-row">
            <span class="table-cell">Vorname</span>
            <span class="table-cell">{{ vm.patient.firstname }}</span>
          </span>
          <span class="table-row">
            <span class="table-cell">Nachname</span>
            <span class="table-cell">{{ vm.patient.lastname }}</span>
          </span>
          <span class="table-row">
            <span class="table-cell">Straße</span>
            <span class="table-cell">{{ vm.patient.street }}</span>
          </span>
          <span class="table-row">
            <span class="table-cell">PLZ / Ort</span>
            <span class="table-cell">{{ vm.patient.postal }} {{ vm.patient.city }}</span>
          </span>
        </span>

        <span class="table list">
          <span class="table-row">
            <span class="table-cell">Telefon</span>
            <span class="table-cell">{{ vm.patient.phone }}</span>
          </span>
          <span class="table-row">
            <span class="table-cell">Geschäftlich</span>
            <span class="table-cell">{{ vm.patient.office }}</span>
          </span>
          <span class="table-row">
            <span class="table-cell">Mobil</span>
            <span class="table-cell">{{ vm.patient.mobile }}</span>
          </span>
        </span>

        <a ng-click="vm.showPersonalDetails = !vm.showPersonalDetails" ng-hide="vm.showPersonalDetails" style="display: block; margin-bottom: 0.3em;">Details anzeigen</a>
        <a ng-click="vm.showPersonalDetails = !vm.showPersonalDetails" ng-show="vm.showPersonalDetails" style="display: block; margin-bottom: 0.3em;">Details verbergen</a>
        <span class="table list" ng-show="vm.showPersonalDetails">
          <span class="table-row">
            <span class="table-cell">Geburtstag</span>
            <span class="table-cell">{{ vm.patient.birthday }}</span>
          </span>
          <span class="table-row">
            <span class="table-cell">Familienstatus</span>
            <span class="table-cell">{{ vm.patient.status }}</span>
          </span>
           <span class="table-row">
            <span class="table-cell">Beruf</span>
            <span class="table-cell">{{ vm.patient.profession }}</span>
          </span>
           <span class="table-row">
            <span class="table-cell">Versicherung</span>
            <span class="table-cell">{{ vm.patient.insurance.type }} {{ vm.patient.insurance.name }}</span>
          </span>
          <span class="table-row">
            <span class="table-cell">Bemerkungen</span>
            <span class="table-cell">{{ vm.patient.notes }}</span>
          </span>
        </span>
      </div>

      <div class="patient-attributes patient-abstract">
        <div class="patient-attention">
          <h2 class="sub-header">Vermerk</h2>
          <span>{{ vm.patient.attention }}</span>
        </div>

        <span class="table list">
          <span class="table-row">
            <span class="table-cell">Referenz durch</span>
            <span class="table-cell">{{ vm.patient.reference }}</span>
          </span>
          <span class="table-row">
            <span class="table-cell">Behandelnder Arzt</span>
            <span class="table-cell">{{ vm.patient.doctor }}</span>
          </span>
          <span class="table-row">
            <span class="table-cell">Papierakte?</span>
            <span class="table-cell">
              <span ng-if="vm.patient.paperfile">Ja</span>
              <span ng-if="!vm.patient.paperfile">Nein</span>
            </span>
          </span>
        </span>
      </div>
    </div>

    <div class="patient-abstract">
      <h2 class="sub-header">Aktuelles</h2>

      <span class="table list">
        <span class="table-row">
          <span class="table-cell">Befunde</span>
          <span class="table-cell">{{ vm.patient.findings }}</span>
        </span>
        <span class="table-row">
          <span class="table-cell">Therapie</span>
          <span class="table-cell">{{ vm.patient.therapy }}</span>
        </span>
      </span>
    </div>

    <div class="patient-abstract">
      <h2 class="sub-header">Krankengeschichte</h2>

      <span class="table list">
        <span class="table-row">
          <span class="table-cell">Operationen </span>
          <span class="table-cell">{{ vm.patient.history.operations }}</span>
        </span>
        <span class="table-row">
          <span class="table-cell">Unfälle</span>
          <span class="table-cell">{{ vm.patient.history.accidents }}</span>
        </span>
         <span class="table-row">
          <span class="table-cell">Vorerkrankungen</span>
          <span class="table-cell">{{ vm.patient.history.disease }}</span>
        </span>
      </span>
    </div>

    <div class="patient-abstract">
      <div class="patient-current">
        <h2 class="sub-header">Risikofaktoren</h2>

        <span class="table list">
          <span class="table-row">
            <span class="table-cell">Allergien</span>
            <span class="table-cell">{{ vm.patient.risks.allergy }}</span>
          </span>
          <span class="table-row">
            <span class="table-cell">Medikation</span>
            <span class="table-cell">{{ vm.patient.risks.medicine }}</span>
          </span>
        </span>
      </div>
    </div>
  </div>
</div>
<div class="footer">
  <a class="button" ng-click="vm.goBack()">Zurück</a>
  <a class="button" ng-click="vm.editPatient()">Editieren</a>
  <a class="button" ng-click="vm.showTreatment()">Behandlungsakte</a>
</div>
