<?php if(@$feature->pacs): ?>
    <div class="col-9">
        <input class="form-check-input ck-pacs" name="send_to" value="pacs" type="checkbox" id="formCheckpac1"
            <?php if(@$pacs->accessionnumberrequest): ?> checked
        <?php else: ?>
            checked <?php endif; ?>>
        <label class="form-check-label" for="formCheckpac1">
            &ensp; PACs Server (<?php echo e(@$pacs->pacsserver); ?>)
            <span class="d-block text-muted"> &ensp; Report and Photo</span>
            <?php if(isset($casedata->case_pacs)): ?>
                <?php
                    $lastsendpacs = end($casedata->case_pacs);
                ?>
                <?php if(isset($lastsendpacs['when'])): ?>
                    <span class="text-muted">&ensp; Last send : <?php echo e(@$lastsendpacs['when']); ?></span>
                <?php else: ?>
                    <span class="text-muted">&ensp; Last send : -</span>
                <?php endif; ?>
            <?php else: ?>
                <span class="text-muted">&ensp; Last send : -</span>
            <?php endif; ?>
        </label>
    </div>
    <div class="col-3 " id="pacsreload" style="display: none;">
        <div class="spinner-border text-spin-primary " role="status">
            <span class="sr-only"></span>
        </div>
    </div>
    <div class="col-3" id="pacssuccess" style="display: none; ">
        <button class="btn btn-status-pacs btn-sm fw-bold">Success</button>
    </div>
    <div class="col-3" id="pacsnotsuccess" style="display: none; ">
        <button class="btn btn-danger btn-sm fw-bold">Not success</button>
    </div>
    <?php if(@$pacs->accessionnumberrequest): ?>
        <div class="col-6">
            <input id="input_assesion" type="text" class="form-control input_assesion" placeholder="Please fill Accession number"
                value="<?php echo e(@$casedata->accessionno); ?>">
        </div>
        <div class="col-4">
            <?php
                $btn_class = empty($casedata->accessionno) ? 'verify' : 'primary';
                $btn_style = empty($casedata->accessionno) ? 'background: #BBBBBB; color: #ffffff;' : '';
                $span_style = empty($casedata->accessionno) ? 'none' : 'block';
            ?>
            <button class="btn btn-<?php echo e(@$btn_class); ?> verify-btn" style="<?php echo e(@$btn_style); ?>">
                Verify</button>
            <button id="btn-accessionno-save" class="btn btn-primary">
                <i class="ri-save-line"></i>
            </button>
        </div>
        <span style="color:#F06548; display:<?php echo e(@$span_style); ?>;" class="patient-detail-success mt-2">Patient Detail :
            <span class="hn-detail"><?php echo e(@$casedata->case_hn); ?></span> <span
                class="patientname-detail"><?php echo e(@$casedata->patientname); ?></span> (<span
                class="procedurename-detail"><?php echo e(@$casedata->procedurename); ?></span> : <span
                class="visitno-detail"><?php echo e(@$casedata->visitno); ?></span>)</span>
        <span style="color:#F06548;display:none" class="patient-detail-warning">Not Found</span>
    <?php endif; ?>
<?php endif; ?>
<script>
    $(document).ready(function(){
        $('#btn-accessionno-save').click(function(){
            var accessionno = $('#input_assesion').val();
            $.post('<?php echo e(url('api/pacspython')); ?>', {
                event: 'saveaccessionno',
                cid: '<?php echo e($casedata->_id); ?>',
                accessionno: accessionno,
            }, function(response){
                console.log(response);
            });
        });
    });
</script>
<?php /**PATH D:\laragon\htdocs\screening\resources\views/reportendocapture/component/feature/pacs.blade.php ENDPATH**/ ?>