Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. <?php //debug($this->session->getSessionValue('reqSearPatient')); ?>
  2. <div class="table-overflow">
  3. <form id="table-search-requests">
  4. <table class="table table-hover">
  5. <thead class="thead-light">
  6. <tr>
  7. <th width="10%" nowrap><?php echo $this->helper->setSortableCol('#ID', $this->view->baseUri, 'id', 'desc'); ?></th>
  8. <th nowrap class="text-right" width="1%"></th>
  9. <th nowrap class="text-right" width="1%"></th>
  10. <th nowrap class="text-right"><?php echo $this->helper->setSortableCol(_('Pub. (GMT)'), $this->view->baseUri, 'created_at', 'desc'); ?></th>
  11. <th nowrap class="text-right"><?php echo $this->helper->setSortableCol(_('Offiline Pub. (GMT)'), $this->view->baseUri, 'desktop_created_at', 'desc'); ?></th>
  12. <?php if($this->view->scope != 'my'): ?>
  13. <th width="15%" nowrap><?php echo $this->helper->setSortableCol(_('Requester'), $this->view->baseUri, 'applicant_surname', 'desc'); ?></th>
  14. <?php endif; ?>
  15. <th width="25%" nowrap><?php echo $this->helper->setSortableCol(_('Patient'), $this->view->baseUri, 'patient_surname', 'desc'); ?></th>
  16. <th nowrap><?php echo $this->helper->setSortableCol(_('Status'), $this->view->baseUri, 'request_status_number', 'desc'); ?></th>
  17. <th width="15%" nowrap><?php echo $this->helper->setSortableCol(_('Med. Spec.'), $this->view->baseUri, 'med_specialties', 'desc'); ?></th>
  18. <th nowrap><?php echo $this->helper->setSortableCol(_('C. Center'), $this->view->baseUri, 'center_name', 'desc'); ?></th>
  19. <th class="text-center" nowrap><?php echo $this->helper->setSortableCol(_('Triage'), $this->view->baseUri, 'triage_number', 'desc'); ?></th>
  20. <th nowrap></th>
  21. <th width="1%"></th>
  22. </tr>
  23. <tr>
  24. <th class="request-search-id-wrapper">
  25. <input type="text" class="form-control form-control-sm request-search-ctrl" value="<?php echo $this->session->getSessionValue('reqSearStorId') !== false ? $this->session->getSessionValue('reqSearStorId') : ''; ?>" name="search[id]">
  26. </th>
  27. <th></th>
  28. <th></th>
  29. <th></th>
  30. <th></th>
  31. <?php if($this->view->scope != 'my'): ?>
  32. <th>
  33. <select class="form-control form-control-sm request-search-ctrl" name="search[requester]">
  34. <option value=""></option>
  35. <?php foreach($this->view->requesterSelectList as $userId => $userSurname): ?>
  36. <option <?php echo (int)$this->session->getSessionValue('reqSearStorUid') == $userId ? 'selected' : ''; ?> value="<?php echo $userId; ?>"><?php echo $userSurname; ?></option>
  37. <?php endforeach; ?>
  38. </select>
  39. </th>
  40. <?php endif ?>
  41. <th>
  42. <input type="text" class="form-control form-control-sm request-search-ctrl" value="<?php echo $this->session->getSessionValue('reqSearPatient') !== false ? $this->session->getSessionValue('reqSearPatient') : ''; ?>" name="search[patient]">
  43. </th>
  44. <th>
  45. <select class="form-control form-control-sm request-search-ctrl" name="search[status]" style="min-width: 100px;">
  46. <option value=""></option>
  47. <?php foreach($this->view->statusSelectList as $statusCode => $statusLabel): ?>
  48. <option <?php echo $this->session->getSessionValue('reqSearStorStat') == $statusCode ? 'selected' : ''; ?> value="<?php echo $statusCode; ?>"><?php echo $statusLabel; ?></option>
  49. <?php endforeach; ?>
  50. </select>
  51. </th>
  52. <th>
  53. <select class="form-control form-control-sm request-search-ctrl" name="search[ms]">
  54. <option value=""></option>
  55. <?php foreach($this->view->msSelectList as $msId => $msName): ?>
  56. <option <?php echo (int)$this->session->getSessionValue('reqSearStorMs') == $msId ? 'selected' : ''; ?> value="<?php echo $msId; ?>"><?php echo $msName; ?></option>
  57. <?php endforeach; ?>
  58. </select>
  59. </th>
  60. <th>
  61. <select class="form-control form-control-sm request-search-ctrl" name="search[cc]">
  62. <option value=""></option>
  63. <?php foreach($this->view->ccSelectList as $centerId => $centerInfo): ?>
  64. <option <?php echo (int)$this->session->getSessionValue('reqSearStorCc') == $centerId ? 'selected' : ''; ?> value="<?php echo $centerId; ?>"><?php echo $centerInfo['description']; ?></option>
  65. <?php endforeach; ?>
  66. </select>
  67. </th>
  68. <th></th>
  69. <th></th>
  70. <th>
  71. <a href="<?php echo $this->helper->setHash('requests/'.time().'/'.$this->view->scope.'/created_at/desc/1'); ?>" class="btn btn-info btn-sm"><span class="icon-search"></span></a>
  72. </th>
  73. </tr>
  74. </thead>
  75. <tbody>
  76. <?php if (is_array($this->view->requests) && !empty($this->view->requests)): ?>
  77. <?php foreach($this->view->requests as $request): ?>
  78. <tr>
  79. <td><button type="button" class="btn btn-outline-dark btn-sm btn-request-trigger-open" data-requestid="<?php echo $request['id']; ?>"><?php echo ucfirst($request['id']); ?></button></td>
  80. <td nowrap class="text-center">
  81. <?php echo $request['request_origin'] == 'web' ? '<span class="icon-earth" alt="Web"></span>' : '<span class="icon-display" alt="Off-line"></span>'; ?>
  82. </td>
  83. <td>
  84. <?php if ((int)$request['total_reports'] > 0): ?>
  85. <i class="fa fa-file-pdf-o" aria-hidden="true" title="Risposta inviata al paziente"></i>
  86. <?php endif; ?>
  87. </td>
  88. <td nowrap><small title="<?php echo strip_tags($this->helper->dateIntervalString($request['created_at'])); ?>"><?php echo $this->helper->getDateString($request['created_at'], true); ?></small></td>
  89. <td nowrap><small title="<?php echo $request['desktop_created_at'] != '' ? strip_tags($this->helper->dateIntervalString($request['desktop_created_at'])) : ''; ?>"><?php echo $request['desktop_created_at'] != '' ? $this->helper->getDateString($request['desktop_created_at'], true) : ''; ?></small></td>
  90. <?php if($this->view->scope != 'my'): ?>
  91. <td><small><?php echo $this->helper->setDottedFullname($request['applicant_name'], $request['applicant_surname'], false); ?></small></td>
  92. <?php endif; ?>
  93. <td>
  94. <?php echo $this->helper->requestSubject(['patientSurname'=>ucwords(strtolower($request['patient_surname'])), 'patientName'=>ucwords(strtolower($request['patient_name'])), 'ageYears'=>$request['patient_age_years'], 'ageMonths'=>$request['patient_age_months'], 'ageDays'=>$request['patient_age_days'], 'patientGender'=>$request['patient_gender'], 'anonymous'=>$request['request_anonymous']]); ?>
  95. </td>
  96. <td><?php echo $this->helper->setRequestStatus($request['request_status']); ?></td>
  97. <td><small>
  98. <?php if(is_array($request['specialties'])): ?>
  99. <ul class="list-unstyled">
  100. <?php foreach($request['specialties'] as $specialtyList): ?>
  101. <li>
  102. <b></span> <?php echo _($specialtyList['specialty_name']); ?></b>
  103. <?php if(is_array($specialtyList['referrals']) && !empty($specialtyList['referrals'])): ?>
  104. <ul class="list-unstyled">
  105. <?php foreach($specialtyList['referrals'] as $referral): ?>
  106. <li class="list-ident"><?php echo $referral; ?></li>
  107. <?php endforeach ?>
  108. </ul>
  109. <?php endif; ?>
  110. </li>
  111. <?php endforeach; ?>
  112. </ul>
  113. <?php endif; ?>
  114. </small></td>
  115. <td><span class="badge badge-light"><?php echo $request['center_name']; ?></span></td>
  116. <td class="text-center"><span class="triage-list triage-<?php echo $request['triage_color']; ?>"></span></td>
  117. <td class="text-center"><?php echo (int)$request['total_attach'] > 0 ? '<span class="icon-attachment" title="'.vsprintf(_('Attachments: %s'), [$request['total_attach']]).'"></span>' : '-'; ?></td>
  118. <td class="text-right">
  119. <?php if($request['request_status'] != 'draft'): ?>
  120. <a href="<?php echo $this->helper->setHash('requests-edit/'.time().'/'.$request['id'].'/view/'.rawurlencode($this->view->actionTitle).'/'.$this->view->scope.'/'.$this->view->parentBaseUri.'/'.$this->view->orderField.'/'.$this->view->orderDir.'/'.$this->view->currentPage); ?>" class="btn btn-outline-dark btn-sm" id="btn-open-request-<?php echo $request['id']; ?>"><span class="icon-eye"></span></a>
  121. <?php else: ?>
  122. <a href="<?php echo $this->helper->setHash('requests-edit/'.time().'/'.$request['id'].'/new-edit/'.rawurlencode($this->view->actionTitle).'/'.$this->view->scope.'/'.$this->view->parentBaseUri.'/'.$this->view->orderField.'/'.$this->view->orderDir.'/'.$this->view->currentPage); ?>" class="btn btn-outline-dark btn-sm" id="btn-open-request-<?php echo $request['id']; ?>"><span class="icon-pencil"></span></a>
  123. <?php endif; ?>
  124. </td>
  125. </tr>
  126. <?php endforeach; ?>
  127. <?php endif; ?>
  128. </tbody>
  129. </table>
  130. </form>
  131. <?php if (empty($this->view->requests)): ?>
  132. <div class="alert alert-warning" role="alert">
  133. <?php echo _('No data available in this list.'); ?>
  134. </div>
  135. <?php endif; ?>
  136. </div>