<wrapper>
  <view class="patient-list">
    <block a:if="{{ patientList.length }}">
      <list loadMore="{{ loadMore }}" loadContent="{{ loadContent }}">
        <list-item a:for="{{ patientList }}" key="{{ index }}" borderRadius="{{ true }}" arrow="{{ true }}" last="{{ true }}" onClick="onDetail" data-id="{{ item.id }}">
          <view class="patient-flex">
            <view class="patient-name">{{ item.name }}</view>
            <view class="patient-rela">{{ item.relationShip }}</view>
          </view>
          <view class="patient-text">
            {{ item.sex }}
            <block a:if="{{ item.age }}">，{{ item.age }}岁</block>
            <block a:if="{{ item.phoneNumber }}">，{{ item.phoneNumber }}</block>
          </view>
        </list-item>
      </list>

      <view class="patient-button" onTap="addPatient">添加就诊人</view>
    </block>

    <empty a:else type="card" title="请先绑定就诊人后查看" height="100vh">
      <button type="primary" onTap="addPatient">绑定就诊人</button>
    </empty>
  </view>
</wrapper>
