templates/case_laboratory/index.html.twig line 1

Open in your IDE?
  1. {% extends 'base.html.twig' %}
  2. {% block title %}Laboratory Tests{% endblock %}
  3. {% block content %}
  4. <div class="kt-subheader kt-grid__item"></div>
  5. <div class="kt-container kt-grid__item kt-grid__item--fluid">
  6.     <div class="kt-portlet kt-portlet--mobile">
  7.         <div class="kt-portlet__head kt-portlet__head--lg">
  8.             <div class="kt-portlet__head-label">
  9.                 <h3 class="kt-portlet__head-title">Laboratory Tests</h3>
  10.             </div>
  11.             <div class="kt-portlet__head-toolbar">
  12.                 <div class="kt-portlet__head-wrapper">
  13.                     <a href="{{ path('dashboard') }}" class="btn btn-clean btn-icon-sm"><i
  14.                             class="la la-long-arrow-left"></i>Back</a>
  15.                 </div>
  16.             </div>
  17.         </div>
  18.         <div class="kt-portlet__body">
  19.             {% include 'parts/tests_topnav.html.twig' %}
  20.             <div class="tab-content">
  21.                 <div class="tab-pane active" id="pending_tests" role="tabpanel">
  22.                     {% include 'parts/flash.html.twig' %}
  23.                     <table class="table table-striped table-bordered">
  24.                         <thead>
  25.                             <tr>
  26.                                 <th width="5%">Sr. No.</th>
  27.                                 <th>Case ID</th>
  28.                                 <th>Patient Name</th>
  29.                                 <th>Doctor</th>
  30.                                 <th width="15%">Date &amp; Time</th>
  31.                                 <th width="5%" class="text-center">Actions</th>
  32.                             </tr>
  33.                         </thead>
  34.                         <tbody>
  35.                             {% for case in cases %}
  36.                             <tr>
  37.                                 <td class="text-right">{{ loop.index }}</td>
  38.                                 <td>
  39.                                     {% if case.labTestStatus == 'Completed' %}
  40.                                     <span class="kt-badge kt-badge--success kt-badge--md mr-2 btn font-weight-bold"
  41.                                         data-toggle="kt-tooltip" title="Completed">C</span>
  42.                                     {% elseif case.labTestStatus == 'Sample taken' %}
  43.                                     <span
  44.                                         class="kt-badge kt-badge--outline kt-badge--outline-2x kt-badge--warning kt-badge--md mr-2 btn font-weight-bold"
  45.                                         data-toggle="kt-tooltip" title="Sample Taken">S</span>
  46.                                     {% else %}
  47.                                     <span class="kt-badge kt-badge--warning kt-badge--md mr-2 btn font-weight-bold"
  48.                                         data-toggle="kt-tooltip" title="Pending">P</span>
  49.                                     {% endif %}
  50.                                     {{ case.mrdId }}
  51.                                 </td>
  52.                                 <td>{{ case.patient }}</td>
  53.                                 <td>{{ case.doctor }}</td>
  54.                                 <td class="text-right">{{ case.createdAt|date('d/m/Y h:i a') }}</td>
  55.                                 <td class="text-center">
  56.                                     <div class="dropdown">
  57.                                         <a href="#" class="btn btn-sm btn-clean btn-icon btn-icon-md"
  58.                                             data-toggle="dropdown" aria-expanded="true">
  59.                                             <i class="la la-ellipsis-h"></i>
  60.                                         </a>
  61.                                         <div class="dropdown-menu dropdown-menu-right">
  62.                                             {% if case.labTestStatus == 'Pending' or not case.labTestStatus %}
  63.                                             <a href="{{ path('case_lab_add_sample', {'id': case.id | nzo_encrypt}) }}"
  64.                                                 class="dropdown-item">
  65.                                                 <i class="fa far fa-vial"></i>Add Sample
  66.                                             </a>
  67.                                             {% elseif case.labTestStatus == 'Sample taken' %}
  68.                                             <a href="{{ path('case_lab_add_result', {'id': case.id | nzo_encrypt}) }}"
  69.                                                 class="dropdown-item">
  70.                                                 <i class="fa far fa-file-alt"></i>Add Report
  71.                                             </a>
  72.                                             {% elseif case.labTestStatus == 'Completed' %}
  73.                                             <a href="{{ path('case_lab_print', {'id': case.id | nzo_encrypt}) }}"
  74.                                                 class="dropdown-item" target="_blank">
  75.                                                 <i class="fa far fa-print fa-2x"></i>Print
  76.                                             </a>
  77.                                             <a href="{{ path('lab_consent', {'id': case.id | nzo_encrypt}) }}"
  78.                                                 class="dropdown-item"
  79.                                                 target="_blank">
  80.                                                 <i class="fa fa-history"></i>Other Hospital History
  81.                                             </a>
  82.                                             {% endif %}
  83.                                             {% if case.patient.healthAddress == '' and case.labTestStatus != 'Rejected' %}
  84.                                             <a href="javascript:void(0);"
  85.                                                 onclick="CreateABHA('{{case.id | nzo_encrypt}}')"
  86.                                                 class="dropdown-item AbhaPop"><i class="fa fa-id-card"
  87.                                                     aria-hidden="true"></i> Create ABHA Card
  88.                                             </a>
  89.                                             {% elseif case.labTestStatus == 'Completed' %}
  90.                                             {#<a href="{{ path('abha_link') }}" class="dropdown-item" target="_blank">
  91.                                                 <i class="fa fa-link"></i>Link Health Record
  92.                                             </a>#}
  93.                                             {% endif %}
  94.                                         </div>
  95.                                     </div>
  96.                                 </td>
  97.                             </tr>
  98.                             {% else %}
  99.                             <tr>
  100.                                 <td colspan="6" class="text-center">No records found</td>
  101.                             </tr>
  102.                             {% endfor %}
  103.                         </tbody>
  104.                     </table>
  105.                     {{ include('parts/pagination.html.twig', {'lastPage': last_page}) }}
  106.                 </div>
  107.             </div>
  108.         </div>
  109.     </div>
  110. </div>
  111. <form action="{{ path('abha_link') }}" id="link-abha" method="POST">
  112.     <input type="hidden" name="type" id="abha_link_val" value>
  113.     <input type="hidden" name="abha_details" id="abha_details" value="">
  114. </form>
  115. <form action="{{ path('abha_card') }}" id="new-abha" method="POST">
  116.     <input type="hidden" name="case_id" id="caseId" value="">
  117.     <input type="hidden" name="type" id="redirect" value="">
  118. </form>
  119. {% endblock %}
  120. {% block scripts %}
  121. {{ parent() }}
  122. <script>
  123.     function CreateABHA(id) {
  124.         Swal.fire({
  125.             title: 'Do you have ABHA?',
  126.             type: 'warning',
  127.             allowOutsideClick: false,
  128.             showCancelButton: true,
  129.             confirmButtonColor: '#189f9f',
  130.             cancelButtonColor: '#d33',
  131.             confirmButtonText: 'Yes',
  132.             cancelButtonText: 'No',
  133.         }).then((result) => {
  134.             if (result.value) {
  135.                 Swal.fire({
  136.                     title: 'Do you want verify your ABHA?',
  137.                     type: 'warning',
  138.                     allowOutsideClick: false,
  139.                     showCancelButton: true,
  140.                     confirmButtonColor: '#189f9f',
  141.                     cancelButtonColor: '#d33',
  142.                     confirmButtonText: 'Yes',
  143.                     cancelButtonText: 'No',
  144.                 }).then((result) => {
  145.                     if (result.value) { //yes
  146.                         //Todo : abha link page route define
  147.                         $('#abha_link_val').val('reg');
  148.                         $('#link-abha').submit();
  149.                     } else { //no
  150.                         //Todo : new patient reg link
  151.                         //window.location.href = "{{ path('patient_new') }}";
  152.                     }
  153.                 });
  154.             } else {
  155.                 Swal.fire({
  156.                     title: 'Do you want to create ABHA?',
  157.                     type: 'warning',
  158.                     confirmButtonColor: '#189f9f',
  159.                     cancelButtonColor: '#d33',
  160.                     showCancelButton: true,
  161.                     allowOutsideClick: false,
  162.                     confirmButtonText: 'Yes',
  163.                     cancelButtonText: 'No',
  164.                     reverseButtons: false
  165.                 }).then((result) => {
  166.                     if (result.value) {
  167.                         $('#caseId').val(id);
  168.                         $('#redirect').val('case_lab_test');
  169.                         $('#new-abha').submit();
  170.                     } else {
  171.                         //window.location.href = "{{ path('patient_new') }}";
  172.                     }
  173.                 })
  174.             }
  175.         })
  176.     }
  177. </script>
  178. {% endblock %}