<style>
    /*.fntSize { font-size: 23px;}
    .bold { font-weight: 900;}
    .center { text-align: center !important ;}*/

    .barcode {
        text-align: center;
        width: 188px;
        height: 90px;
        margin: auto;
        direction: ltr;
        font-size: 0.6em;
    }
    .barcode img {
        height: 40px;
        width: 100%;
        margin-top: 0;
        padding-bottom: 0;
        padding-top: 0;
    }
    .patient-name-bar {
        font-size: 0.8em;
        padding-top: 5px;
        padding-bottom: 0;
        font-weight: bold;
        text-align: left;
    }
    .date-info {
        margin-top: 0;
        margin-bottom: 0;
        padding-bottom: 0;
        padding-top: 0;
        display: flex;
        justify-content: space-between;
        font-size: 0.7em;
        font-weight: bold;
        z-index: 9;
        position: relative;
    }
    .anatomy-info {
        margin-top: 0;
        margin-bottom: 0;
        padding-bottom: 0;
        padding-top: 0;
        display: flex;
        justify-content: space-between;
        font-size: 0.7em;
        font-weight: bold;
    }
    .barcode-number-bar {
        font-size: 1.5em;
        font-weight: bold;
    }
    .barcode:last-child {
        page-break-after: auto;
    }
    @media print
    {
        html, body {
            /*height:100vh;*/
            margin: 0 !important;
            padding: 0 5px !important;
            overflow: hidden;
        }
        .barcode {
            width: 100%;
            margin: 0;
            padding: 0;
        }
        @page
        {
            size: 1.97in 0.98in;
            margin: 0;
            padding: 0;
        }
        .barcode:last-child {
            page-break-after: auto;
        }
    }
</style>

{if  $sampletypes_count > 0    }

{foreach $sampletypes as $data}

<!--div class="row break " style="direction: rtl;margin-top:10px !important; ">
    <div class="col-md-12">

        <table style="width: 98%;margin: 5px auto;    margin-top: 2%;" >
            <tr>
                <td class="center">
                    <span class="bold fntSize" style="margin-right:  2%;" >{$name}</span>
                </td>
            </tr>
            <tr>
                <td class="center">
                    <span class="bold fntSize" style="  margin-left: 2%;direction: ltr;">  
                        {$gender}-{$age}  {$visit->visittime}   {$visit->visitdate}
                    </span>
                </td>
            </tr>
            {if $data.showDocName == 1 && $labSetting->lab_style !=  2  }
            <tr>
                <td class="center">
                    <span class="bold fntSize" style="margin-right:  2%;" >  {$docName} </span>
                </td>
            </tr>
            {/if}
            <tr>
                <td class="center"> 
                    <img id="xx"  src="{$hosturl}/../upload/samplebarcodes/{$data.sampleId}.png" height="50" width="75%">
                </td>
            </tr>
            <tr>
                <td class="center"> {$data.sampleId}</td>
            </tr>
            <tr>
                <td> <hr style="border-top: 1px solid #8c8b8b;margin: 5px 0;"> </td>
            </tr>
            <tr>
                <td>
                    <span class="bold" style="float: left;    margin-left: 5%; text-align: left;">{$data.invests }</span>
                </td>
            </tr>
            <tr>
                <td> <hr style="border-top: 1px solid #8c8b8b;margin: 5px 0;"> </td>
            </tr>
            <tr>
                <td>
                    <span class="bold" style="float: left; margin-right:  2%;margin-left: 5%;">{$data.samplename}</span>
                </td>
            </tr>
        </table>
    </div>
</div-->

<div class="row break " style="direction: rtl;margin-top:0px !important; margin-bottom:0px !important;">
    <div class="col-md-12">

        <div class="barcode">
            <div class="patient-name-bar">
                {$name}   <span style="float: right;">{$statusNo}</span>
            </div>
            <div class="date-info">
                <div>
                    <span>{$gender}-{$age}</span>
                </div>
                <div>
                    <span>{$visit->visittime}</span>
                </div>
                <div>
                    <span>{$visit->visitdate}</span>
                </div>
            </div>
            <img src="{$hosturl}/../upload/samplebarcodes/{$data.sampleId}.png" alt="barcode">
            <div class="anatomy-info">
                <div>
                    <div>
                        <span>{$data.invests|truncate:40 }</span>
                    </div>
                    <div>
                        <span>{$data.samplename}</span>
                    </div>
                </div>
                <div>
                    <span class="barcode-number-bar">{$data.sampleId}</span>
                </div>
            </div>
        </div>
    </div>
</div>
{/foreach}

{/if}

{if  $empty_count > 0    }

<div class="row break " style="direction: rtl;margin-top:10px !important; ">
    <div class="col-md-12">

        <table style="width: 98%;margin: 5px auto;    margin-top: 2%;" >
            <tr>
                <td class="center">
                    <span class="bold fntSize" style="margin-right:  2%;">{$name}</span>
                    <span style="float: right;">{$statusNo}</span>
                </td>
            </tr>

            <tr>
                <td class="center">
                    <span class="bold fntSize" style="   margin-left: 2%;direction: ltr;">  
                        {$gender}-{$age}  {$visit->visittime}   {$visit->visitdate}
                    </span>
                </td>
            </tr>

            {if $showDocName == 1 && $labSetting->lab_style !=  2  }
            <tr>
                <td class="center">
                    <span class="bold fntSize" style="margin-right:  2%;" >  {$docName} </span>
                </td>
            </tr>
            {/if}

            <tr>
                <td class="center">
                    <img id="xx"  src="{$hosturl}/../upload/samplebarcodes/{$data.sampleId}.png" height="30" width="100%">
                    <span class="bold">{$data.sampleId}</span>
                </td>
            </tr>

            <tr>
                <td> <hr style="border-top: 1px solid #8c8b8b;margin: 5px 0;"> </td>
            </tr>

            <tr>
                <td>

                    <span class="bold" style="float: left;    margin-left: 5%; text-align: left;">{$empty_invests}</span>

                </td>
            </tr>

            <tr>
                <td> <hr style="border-top: 1px solid #8c8b8b;margin: 5px 0;"> </td>
            </tr>

            <tr>
                <td>

                    <span style="margin-right:  2%;margin-left: 5%;"></span>

                </td>
            </tr>

        </table>
    </div>
</div>

{/if}







