<div id="ultrasoundPrintDiv">
    {literal}
    <style>


        .prntbl {
            padding:0px !important;
            width:95% !important;
            margin:0px auto !important;
        }.prntbl table{
            border-collapse: collapse !important;
            width:100% !important;
            margin:0px !important;
            padding:0px !important;
        }
        .prntbl table th {
            background-color: #2D2D2D !important;
            background: #2D2D2D !important;
            border:0px solid #000000 !important;
            border-width:0px 0px 1px 1px !important;
            font-size:15px !important;
            font-family:Arial !important;
            font-weight:bold !important;
            color: #FFFFFF !important;
            text-align: center !important;
        }.prntbl tr:hover td{

        }
        .prntbl tr:nth-child(odd){background-color: #E0E0E0 !important;}
        .prntbl tr:nth-child(even)    { background-color:#ffffff !important; }.prntbl td{
            border:1px solid #000000 !important;
            padding: 0px 3px !important;
            font-size: 13px !important;
            font-family: tahoma !important;
            color:#000000 !important;
            text-align: left !important;
        }


        .prntbl th, .prntbl tt, .prntbl td {
            line-height: 20px !important;
            padding: 1xp 5px !important;

        }

        .prntbl span {
            font-weight: 700;
        }

    </style>

    {/literal}
    <meta charset="UTF-8">

    <input type="hidden" id="ultrasoundPage" value="1"/>
    <input type="hidden" id="patientId" value="{$patientData->id}"/>
    <input type="hidden" id="controllName" value="ultrasound"/>
    <!---======================================================== tab1============================================================================================ ----->

    <div class="row">
        <div id="">

            <div class="row">

                <div class="portlet-body form prntbl" style="height: 5cm !important;">
                    <center><br /><br /><h5>{if $ultrasoundData->stype eq 1}3D/4D{else}2D{/if} fetal anatomical scan </h5></center>
                    <div style="width: 65%; float: left;height: 5cm;">


                        <table border="1">
                            <thead></thead>
                            <tbody>
                                <tr>
                                    <td width="120" rowspan="5" style="width:120px;height: 125px;"><img src="{$hosturl}/../upload/logo/{$ProgramesettingData->logo}" width="120" height="120"/></td>
                                    <td colspan="2"><span>Paient</span> : {$patientData->wifename}</td>
                                    <td colspan="2"><span>ID </span> : {$patientData->id}</td>
                                </tr>
                                <tr>
                                    <td colspan="4"><span>Date Of Birth</span> {$patientData->dateofbirth}</td>
                                </tr>
                                <tr>
                                    <td colspan="2"><span>Referring Physican</span></td>
                                    <td colspan="2">{$ultrasoundData->physician}</td>
                                </tr>
                                <tr>
                                    <td colspan="4"><span>Date Of Exam</span> {$ultrasoundData->edate}</td>
                                </tr>

                                <tr>
                                    <td width="256" colspan="1"><span> Sonographer  </span></td>
                                    <td colspan="3">{foreach $allSname as $sname}{if $ultrasoundData->sid eq $sname.user_id}{$sname.user_name}{/if}{/foreach}</td>
                                </tr>
                                <tr>
                                    <td colspan="3"><span>Indication For Scan And Relevant Clinical Information</span></td>
                                    <td colspan="3">{$ultrasoundData->indication}</td>
                                </tr>
                                <tr>
                                    <td colspan="3"><span>Gestational Age</span>  {$ultrasoundData->gage}</td>
                                    <td width="100"><span>Technical Conditions</span></td>
                                    <td width="67">{if $ultrasoundData->tcondition eq 0}Good{elseif $ultrasoundData->tcondition eq 1}Limited by: {$ultrasoundData->limit}{/if}</td>
                                </tr>
                                <tr>
                                    <td><span>Based On</span></td>
                                    <td colspan="5">{if $ultrasoundData->based eq 0}LMP{elseif $ultrasoundData->based eq 1}Previous US{elseif $ultrasoundData->based eq 2}{$ultrasoundData->otherbased}{/if}</td>
                                </tr>
                                <tr>
                            </tbody>
                        </table>
                        <table border="1">
                            <th colspan="6"><span style="color: #ffffff !important;">PLACENTA</span></th>
                            </tr>
                            <tr>
                                <td width="170"><span>Position</span></td>
                                <td colspan="5">{$ultrasoundDetail->position}</td>
                            </tr>
                            <tr>
                                <td><span>Relation To Cervical Os</span></td>
                                <td colspan="5">{if $ultrasoundDetail->relationc eq 0}Clear{else}Covering: {$ultrasoundDetail->cover} mm from os{/if}</td>
                            </tr>
                            <tr>
                                <td><span>Appearance</span></td>
                                <td colspan="5">{if $ultrasoundDetail->appearance eq 0}Normal{else}Abnormal{/if}</td>
                            </tr>
                            <tr>
                                <td><span>AMNIOTIC FLUID</span></td>
                                <td colspan="5">{if $ultrasoundDetail->fluid eq 0}Normal{else}Abnormal{/if}</td>
                            </tr>
                            <tr>
                                <td><span>FETAL MOVEMENT</span></td>
                                <td colspan="5">{if $ultrasoundDetail->movement eq 0}Normal{else}Abnormal{/if}</td>
                            </tr>
                        </table>
                        <table>
                            <tr class="darkcolorx">
                                <th>MEASUREMENTS</th>
                                <th>mm</th>
                                <th colspan="4">Percentile(References)</th>
                            </tr>

                            <tr>
                                <td class="txtl"><span>Biparietal diameter</span></td>
                                <td>{$ultrasoundDetail->diameterm}</td>
                                <td colspan="4">{$ultrasoundDetail->diameterp}</td>
                            </tr>
                            <tr>
                                <td class="txtl"><span>Head circumference</span></td>
                                <td>{$ultrasoundDetail->headcm}</td>
                                <td colspan="4">{$ultrasoundDetail->headcp}</td>
                            </tr>
                            <tr>
                                <td class="txtl"><span>Abdominal circumference</span></td>
                                <td>{$ultrasoundDetail->abdominalm}</td>
                                <td colspan="4">{$ultrasoundDetail->abdominalp}</td>
                            </tr>
                            <tr>
                                <td class="txtl"><span>Femur diaphysis length</span></td>
                                <td>{$ultrasoundDetail->lengthm}</td>
                                <td colspan="4">{$ultrasoundDetail->lengthp}</td>
                            </tr>
                            <tr>
                                <td class="txtl"><span>Other</span></td>
                                <td>{$ultrasoundDetail->otherm}</td>
                                <td colspan="4">{$ultrasoundDetail->otherp}</td>
                            </tr>
                            <tr>
                                <td><span>Abnormal Findings</span></td>
                                <td colspan="5">{$ultrasoundDetail->finding}</td>
                            </tr>
                            <tr>
                                <td><span>Conclusion</span></td>
                                <td colspan="5">{if $ultrasoundDetail->conclusion eq 1}Normal And Complete Examination{/if}
                                    {if $ultrasoundDetail->inconclusion eq 1}<br/>Normal But Incomplete Examination{/if}
                                    {if $ultrasoundDetail->abconclusion eq 1}<br/>Abnormal Examination{/if}</td>
                            </tr>
                            {if !empty($ultrasoundDetail->pconclusion)}
                            <tr>
                                <td><span>Plans</span></td> 
                                <td colspan="5">{if $ultrasoundDetail->plans eq 0}No Further Ultrasound Scans Required{elseif $ultrasoundDetail->plans eq 1}Follow Up Planned In {$ultrasoundDetail->weeks} Weeks{elseif $ultrasoundDetail->plans eq 2}Referred To {$ultrasoundDetail->referred}{else}{$ultrasoundDetail->oplans}{/if}</td>
                            </tr>
                            {/if}
                            <tr>
                                <td><span>Other</span></td>
                                <td colspan="5">{$ultrasoundDetail->othernormal}</td>
                            </tr>
                        </table>


                    </div>
                    <div style="width: 34%; float: left;margin-left: 1%;height: 5cm;">



                        <table>
                            <thead>
                                <tr>
                                    <th colspan="2" style=" vertical-align: middle;">SONOGRAPHIC APPEARANCE OF FETAL ANATOMY</th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr>
                                    <th colspan="2">Head</th>
                                </tr>
                                <tr>
                                    <td width="284">Shape</td>
                                    <td width="159">{if $ultrasoundDetail->shape eq 0}Normal {elseif $ultrasoundDetail->shape eq 1}Abnormal{else}Not visualized{/if}</td>
                                </tr>
                                <tr>
                                    <td>Cavum septi pellucidi</td>
                                    <td>{if $ultrasoundDetail->cavum eq 0}Normal {elseif $ultrasoundDetail->cavum eq 1}Abnormal{else}Not visualized{/if}</td>
                                </tr>
                                <tr>
                                    <td>Midline falx</td>
                                    <td>{if $ultrasoundDetail->falx eq 0}Normal {elseif $ultrasoundDetail->falx eq 1}Abnormal{else}Not visualized{/if}</td>
                                </tr>
                                <tr>
                                    <td>Thalami</td>
                                    <td>{if $ultrasoundDetail->thalami eq 0}Normal {elseif $ultrasoundDetail->thalami eq 1}Abnormal{else}Not visualized{/if}</td>
                                </tr>
                                <tr>
                                    <td>Lateral ventricle</td>
                                    <td>{if $ultrasoundDetail->ventricle eq 0}Normal {elseif $ultrasoundDetail->ventricle eq 1}Abnormal{else}Not visualized{/if}</td>
                                </tr>
                                <tr>
                                    <td>Cerebellum</td>
                                    <td>{if $ultrasoundDetail->cerebellum eq 0}Normal {elseif $ultrasoundDetail->cerebellum eq 1}Abnormal{else}Not visualized{/if}</td>
                                </tr>
                                <tr>
                                    <td>Cisterna magna</td>
                                    <td>{if $ultrasoundDetail->magna eq 0}Normal {elseif $ultrasoundDetail->magna eq 1}Abnormal{else}Not visualized{/if}</td>
                                </tr>
                                <tr>
                                    <th colspan="2">Face</th>
                                </tr>
                                <tr>
                                    <td>Upper lip</td>
                                    <td>{if $ultrasoundDetail->u_lip eq 0}Normal {elseif $ultrasoundDetail->u_lip eq 1}Abnormal{else}Not visualized{/if}</td>
                                </tr>
                                <tr>
                                    <td>Median profile</td>
                                    <td>{if $ultrasoundDetail->profile eq 0}Normal {elseif $ultrasoundDetail->profile eq 1}Abnormal{else}Not visualized{/if}</td>
                                </tr>
                                <tr>
                                    <td>Orbits</td>
                                    <td>{if $ultrasoundDetail->orbits eq 0}Normal {elseif $ultrasoundDetail->orbits eq 1}Abnormal{else}Not visualized{/if}</td>
                                </tr>
                                <tr>
                                    <td>Nose</td>
                                    <td>{if $ultrasoundDetail->nose eq 0}Normal {elseif $ultrasoundDetail->nose eq 1}Abnormal{else}Not visualized{/if}</td>
                                </tr>
                                <tr>
                                    <td>Nostrils</td>
                                    <td>{if $ultrasoundDetail->nostrils eq 0}Normal {elseif $ultrasoundDetail->nostrils eq 1}Abnormal{else}Not visualized{/if}</td>
                                </tr>
                                <tr>
                                    <th>Neck</th>
                                    <td>{if $ultrasoundDetail->neck eq 0}Normal {elseif $ultrasoundDetail->neck eq 1}Abnormal{else}Not visualized{/if}</td>
                                </tr>
                                <tr>
                                    <th colspan="2">Thorax</th>
                                </tr>
                                <tr>
                                    <td>Shape</td>
                                    <td>{if $ultrasoundDetail->thoraxshape eq 0}Normal {elseif $ultrasoundDetail->thoraxshape eq 1}Abnormal{else}Not visualized{/if}</td>
                                </tr>
                                <tr>
                                    <td>No mass</td>
                                    <td>{if $ultrasoundDetail->mass eq 0}Normal {elseif $ultrasoundDetail->mass eq 1}Abnormal{else}Not visualized{/if}</td>
                                </tr>
                                <tr>
                                    <th>Heart</th>
                                    <td>{if $ultrasoundDetail->heart eq 0}Normal {elseif $ultrasoundDetail->heart eq 1}Abnormal{else}Not visualized{/if}</td>
                                </tr>
                                <tr>
                                    <td>Heart activity</td>
                                    <td>{if $ultrasoundDetail->heartactivity eq 0}Normal {elseif $ultrasoundDetail->heartactivity eq 1}Abnormal{else}Not visualized{/if}</td>
                                </tr>
                                <tr>
                                    <td>Size</td>
                                    <td>{if $ultrasoundDetail->hsize eq 0}Normal {elseif $ultrasoundDetail->hsize eq 1}Abnormal{else}Not visualized{/if}</td>
                                </tr>
                                <tr>
                                    <td>Cardiac axis</td>
                                    <td>{if $ultrasoundDetail->haxix eq 0}Normal {elseif $ultrasoundDetail->haxix eq 1}Abnormal{else}Not visualized{/if}</td>
                                </tr>
                                <tr>
                                    <td>Four-chamber view</td>
                                    <td>{if $ultrasoundDetail->chamberview eq 0}Normal {elseif $ultrasoundDetail->chamberview eq 1}Abnormal{else}Not visualized{/if}</td>
                                </tr>
                                <tr>
                                    <td>Left ventricular outflow</td>
                                    <td>{if $ultrasoundDetail->loutflow eq 0}Normal {elseif $ultrasoundDetail->loutflow eq 1}Abnormal{else}Not visualized{/if}</td>
                                </tr>
                                <tr>
                                    <td>Right ventricular outflow</td>
                                    <td>{if $ultrasoundDetail->routflow eq 0}Normal {elseif $ultrasoundDetail->routflow eq 1}Abnormal{else}Not visualized{/if}</td>
                                </tr>
                                <tr>
                                    <th colspan="2">Abdomen</th>
                                </tr>
                                <tr>
                                    <td>Stomach</td>
                                    <td>{if $ultrasoundDetail->stomach eq 0}Normal {elseif $ultrasoundDetail->stomach eq 1}Abnormal{else}Not visualized{/if}</td>
                                </tr>
                                <tr>
                                    <td>Bowel</td>
                                    <td>{if $ultrasoundDetail->bowel eq 0}Normal {elseif $ultrasoundDetail->bowel eq 1}Abnormal{else}Not visualized{/if}</td>
                                </tr>
                                <tr>
                                    <td>Kidneys</td>
                                    <td>{if $ultrasoundDetail->kidney eq 0}Normal {elseif $ultrasoundDetail->kidney eq 1}Abnormal{else}Not visualized{/if}</td>
                                </tr>
                                <tr>
                                    <td>Urinary bladder</td>
                                    <td>{if $ultrasoundDetail->bladder eq 0}Normal {elseif $ultrasoundDetail->bladder eq 1}Abnormal{else}Not visualized{/if}</td>
                                </tr>
                                <tr>
                                    <td>Abdominal cord insertion</td>
                                    <td>{if $ultrasoundDetail->cordinsertion eq 0}Normal {elseif $ultrasoundDetail->cordinsertion eq 1}Abnormal{else}Not visualized{/if}</td>
                                </tr>
                                <tr>
                                    <td>Cord vessels</td>
                                    <td>{if $ultrasoundDetail->cordvessels eq 0}Normal {elseif $ultrasoundDetail->cordvessels eq 1}Abnormal{else}Not visualized{/if}</td>
                                </tr>
                                <tr>
                                    <th>Spine</th>
                                    <td>{if $ultrasoundDetail->spine eq 0}Normal {elseif $ultrasoundDetail->spine eq 1}Abnormal{else}Not visualized{/if}</td>
                                </tr>
                                <tr>
                                    <th colspan="2">Limbs</th>
                                </tr>
                                <tr>
                                    <td>Right arm (incl. hand)</td>
                                    <td>{if $ultrasoundDetail->rarm eq 0}Normal {elseif $ultrasoundDetail->rarm eq 1}Abnormal{else}Not visualized{/if}</td>
                                </tr>
                                <tr>
                                    <td>Right leg (incl. foot)</td>
                                    <td>{if $ultrasoundDetail->rleg eq 0}Normal {elseif $ultrasoundDetail->rleg eq 1}Abnormal{else}Not visualized{/if}</td>
                                </tr>
                                <tr>
                                    <td>Left arm (incl. hand)</td>
                                    <td>{if $ultrasoundDetail->larm eq 0}Normal {elseif $ultrasoundDetail->larm eq 1}Abnormal{else}Not visualized{/if}</td>
                                </tr>
                                <tr>
                                    <td>Left leg (incl. foot)</td>
                                    <td>{if $ultrasoundDetail->lleg eq 0}Normal {elseif $ultrasoundDetail->lleg eq 1}Abnormal{else}Not visualized{/if}</td>
                                </tr>
                                <tr>
                                    <th><span style="color: #ffffff !important;">Gender</span> {if $ultrasoundDetail->gender eq 0}Male {elseif $ultrasoundDetail->gender eq 1}Female{/if} </th>
                                    <td>{if $ultrasoundDetail->gendern eq 0}Normal {elseif $ultrasoundDetail->gendern eq 1}Abnormal{else}Not visualized{/if}</td>
                                </tr>

                            </tbody>
                        </table>


                    </div>


                    <div class="clearfix"></div>

                </div>

            </div>
            <div class="clearfix"></div>

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