<div class="modal display_flex justify-content_flex-center align-items_center">
  <div class="modalBody" style="width: 1000px;">
    <div class="title">追加检查项目<i class="icon_transport transport-guanbi" (click)="hideModal()"></i></div>
    <div class="content">
      <div class="patient">
        <span>患者姓名：{{patientDTO.patientName}}</span>
        <span *ngIf="patientDTO.patientType && patientDTO.patientType.value == 'I'">住院号：{{patientDTO.patientCode}}（{{patientDTO.bedNum}}）</span>
        <span *ngIf="patientDTO.patientType && patientDTO.patientType.value == 'O'">门诊号：{{patientDTO.patientCode}}</span>
        <span *ngIf="patientDTO.patientType && patientDTO.patientType.value == 'E'">急诊号：{{patientDTO.patientCode}}</span>
        <span>护理级别：{{patientDTO.careLevel?.name}}</span>
        <span>危重等级：{{patientDTO.illnessState?.name}}</span>
      </div>
      <div class="tableWrap">
        <div class="row">
          <div class="formItem flex_1">
            <div class="name"><i class="icon_transport transport-required red"></i>检查项目：</div>
            <div class="value">
              <nz-select class="w100" [nzDropdownMatchSelectWidth]="false" [(ngModel)]="inspectData.id" nzShowSearch nzPlaceHolder="请选择检查项目" nzServerSearch (nzOnSearch)="searchInspect($event)" (nzOpenChange)="openInspect($event)" (ngModelChange)="changeInspect($event)">
                <ng-container *ngFor="let data of inspectList">
                  <nz-option *ngIf="!isLoading" [nzLabel]="data.name" [nzValue]="data.id">
                  </nz-option>
                </ng-container>
                <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
                  <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
                </nz-option>
              </nz-select>
            </div>
          </div>
        </div>

        <div class="row">
          <div class="formItem flex_2">
            <div class="name"><i class="icon_transport transport-required red"></i>检查科室：</div>
            <div class="value">
              <nz-select class="w100" [nzDropdownMatchSelectWidth]="false" [(ngModel)]="inspectData.execDeptId" nzPlaceHolder="请选择检查科室">
                <ng-container *ngFor="let data of execDeptList">
                  <nz-option *ngIf="!isLoading" [nzLabel]="data.dept" [nzValue]="data.id">
                  </nz-option>
                </ng-container>
                <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
                  <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
                </nz-option>
              </nz-select>
            </div>
          </div>
          <div class="formItem flex_1 justify-content_flex-end">
            检查项目标识：{{inspectData.sign}}
          </div>
          <div class="formItem flex_1 justify-content_flex-end">
            检查类型：{{inspectData.type}}
          </div>
        </div>

        <div class="row">
          <div class="formItem flex_1">
            <div class="name"><i class="icon_transport transport-required red"></i>预约时间：</div>
            <div class="value">
              <nz-date-picker [(ngModel)]="inspectData.date" [nzAllowClear]="false" [nzShowToday]="false" (ngModelChange)="dateChange($event)"></nz-date-picker>
              <nz-time-picker class="ml8" nzFormat="HH:mm" [(ngModel)]="inspectData.time" [nzAllowEmpty]="false" (ngModelChange)="timeChange($event)"></nz-time-picker>
              <button nz-button nzType="primary" class="ml8 mt0" (click)="nextDay()">下一日</button>
            </div>
          </div>
        </div>
				
				<div class="row" *ngIf="endTime">
				  <div class="formItem flex_1">
				    <div class="name"><i class="icon_transport transport-required red"></i>预约结束时间：</div>
				    <div class="value">
							{{endTime}}
				    </div>
				  </div>
				</div>
      </div>
    </div>
    <div class="display_flex justify-content_flex-center">
      <button class="btn" nz-button nzType="primary" (click)="confirmModal()">确认</button>
      <button class="btn cancel" nz-button nzType="default" (click)="hideModal()">取消</button>
    </div>
  </div>
</div>
