<div id="ultrasoundobstOPrintDiv">
    {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="ultrasoundobstobstPage" value="1"/>
    <input type="hidden" id="patientId" value="{$patientData->id}"/>
    <input type="hidden" id="controllName" value="ultrasoundobstobst"/>
    <!---======================================================== tab1============================================================================================ ----->

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

            <div class="row">

                <div class="portlet-body form prntbl" style="height: 5cm !important;">
                    <center><br /><br /><h5>APPENDIX : ROUTINE ULTRASOUND WORKSHEET </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>Patient</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">{$ultrasoundobstData->physician}</td>
                                </tr>
                                <tr>
                                    <td colspan="4"><span>Date Of Exam</span> {$ultrasoundobstData->edate}</td>
                                </tr>

                                <tr>
                                    <td width="256" colspan="1"><span> Sonographer  </span></td>
                                    <td colspan="3">{foreach $allSname as $sname}{if $ultrasoundobstData->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">{$ultrasoundobstData->indication}</td>
                                </tr>
                                <tr>
                                    <td colspan="3"><span>Gestational Age</span>  {$ultrasoundobstData->gage}</td>
                                    <td width="100"><span>Technical Conditions</span></td>
                                    <td width="67">{if $ultrasoundobstData->tcondition eq 0}Good{elseif $ultrasoundobstData->tcondition eq 1}Limited by: {$ultrasoundobstData->limit}{/if}</td>
                                </tr>
                                <tr>
                                    <td><span>Based On</span></td>
                                    <td colspan="5">{if $ultrasoundobstData->based eq 0}LMP{elseif $ultrasoundobstData->based eq 1}Previous US{elseif $ultrasoundobstData->based eq 2}{$ultrasoundobstData->otherbased}{/if}</td>
                                </tr>
                                <tr>
                            </tbody>
                        </table>
                        <table border="1">
                            <th colspan="6"><span style="color: #ffffff !important;">ADNEXA</span></th>
                            </tr>
                            <tr>
                                <td><span>Appearance</span></td>
                                <td colspan="5">{if $ultrasoundobstDetail->appearance eq 0}Normal{else}Abnormal{/if}</td>
                            </tr>
                            <tr>
                                <td width="170"><span>Anomaly</span></td>
                                <td colspan="5">{$ultrasoundobstDetail->anomaly}</td>
                            </tr>
                        </table>
                        <table>
                            <tr class="darkcolorx">
                                <th>MEASUREMENTS</th>
                                <th>mm</th>
                                <th colspan="4">Centile(Reference range)</th>
                            </tr>
                            <tr>
                                <td class="txtl"><span>Crown-rump length</span></td>
                                <td>{$ultrasoundobstDetail->crownm}</td>
                                <td colspan="4">{$ultrasoundobstDetail->crownmc}</td>
                            </tr>
                            <tr>
                                <td class="txtl"><span>Nuchal translucency</span></td>
                                <td>{$ultrasoundobstDetail->nuchalm}</td>
                                <td colspan="4">{$ultrasoundobstDetail->nuchalc}</td>
                            </tr>
                            <tr>
                                <td class="txtl"><span>Biparietal diameter</span></td>
                                <td>{$ultrasoundobstDetail->diameterm}</td>
                                <td colspan="4">{$ultrasoundobstDetail->diameterc}</td>
                            </tr>
                            <tr>
                                <td class="txtl"><span>Head circumference</span></td>
                                <td>{$ultrasoundobstDetail->headcm}</td>
                                <td colspan="4">{$ultrasoundobstDetail->headcc}</td>
                            </tr>
                            <tr>
                                <td class="txtl"><span>Abdominal circumference</span></td>
                                <td>{$ultrasoundobstDetail->abdominalm}</td>
                                <td colspan="4">{$ultrasoundobstDetail->abdominalc}</td>
                            </tr>
                            <tr>
                                <td class="txtl"><span>Femoral diaphysis length</span></td>
                                <td>{$ultrasoundobstDetail->flengthm}</td>
                                <td colspan="4">{$ultrasoundobstDetail->flengthc}</td>
                            </tr>

                            <tr>
                                <td><span>Abnormal Findings</span></td>
                                <td colspan="5">{$ultrasoundobstDetail->finding}</td>
                            </tr>
                            <tr>
                                <td><span>Estimation of GA</span></td>
                                <td colspan="5">{$ultrasoundobstDetail->gaestimatew} weeks + {$ultrasoundobstDetail->gaestimated} Days</td>
                            </tr>

                            <tr>
                                <td><span>Conclusion</span></td>
                                <td colspan="5">{if $ultrasoundobstDetail->conclusion eq 1}Normal And Complete Examination{/if}
                                    {if $ultrasoundobstDetail->inconclusion eq 1}<br/>Normal But Incomplete Examination{/if}
                                    {if $ultrasoundobstDetail->abconclusion eq 1}<br/>Abnormal Examination{/if}</td>
                            </tr>
                            {if !empty($ultrasoundobstDetail->pconclusion)}
                            <tr>
                                <td><span>Plans</span></td> 
                                <td colspan="5">{if $ultrasoundobstDetail->plans eq 0}No Further Ultrasound Scans Required{elseif $ultrasoundobstDetail->plans eq 1}Follow Up Planned In {$ultrasoundobstDetail->weeks} Weeks{elseif $ultrasoundobstDetail->plans eq 2}Referred To {$ultrasoundobstDetail->referred}{else}{$ultrasoundobstDetail->oplans}{/if}</td>
                            </tr>
                            {/if}

                            <tr>
                                <td><span>Other</span></td>
                                <td colspan="5">{$ultrasoundobstDetail->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 $ultrasoundobstDetail->shape eq 0}Normal {elseif $ultrasoundobstDetail->shape eq 1}Abnormal{else}Not visualized{/if}</td>
                                </tr>
                                <tr>
                                    <td>Cranial Ossification</td>
                                    <td>{if $ultrasoundobstDetail->cranial eq 0}Normal {elseif $ultrasoundobstDetail->cranial eq 1}Abnormal{else}Not visualized{/if}</td>
                                </tr>
                                <tr>
                                    <td>Midline falx</td>
                                    <td>{if $ultrasoundobstDetail->falx eq 0}Normal {elseif $ultrasoundobstDetail->falx eq 1}Abnormal{else}Not visualized{/if}</td>
                                </tr>
                                <tr>
                                    <td>Choroid plexus</td>
                                    <td>{if $ultrasoundobstDetail->choroid eq 0}Normal {elseif $ultrasoundobstDetail->choroid eq 1}Abnormal{else}Not visualized{/if}</td>
                                </tr>
                                <tr>
                                    <th colspan="2">Face</th>
                                </tr>
                                <tr>
                                    <td>Orbits</td>
                                    <td>{if $ultrasoundobstDetail->orbits eq 0}Normal {elseif $ultrasoundobstDetail->orbits eq 1}Abnormal{else}Not visualized{/if}</td>
                                </tr>
                                <tr>
                                    <td>Profile</td>
                                    <td>{if $ultrasoundobstDetail->profile eq 0}Normal {elseif $ultrasoundobstDetail->profile eq 1}Abnormal{else}Not visualized{/if}</td>
                                </tr>
                                <tr>
                                    <th>Neck</th>
                                    <td>{if $ultrasoundobstDetail->neck eq 0}Normal {elseif $ultrasoundobstDetail->neck eq 1}Abnormal{else}Not visualized{/if}</td>
                                </tr>
                                <tr>
                                    <th colspan="2">Thorax</th>
                                </tr>
                                <tr>
                                    <td>Pulm. Area</td>
                                    <td>{if $ultrasoundobstDetail->pulm eq 0}Normal {elseif $ultrasoundobstDetail->pulm eq 1}Abnormal{else}Not visualized{/if}</td>
                                </tr>
                                <tr>
                                    <td>Diaphragm</td>
                                    <td>{if $ultrasoundobstDetail->diaphragm eq 0}Normal {elseif $ultrasoundobstDetail->diaphragm eq 1}Abnormal{else}Not visualized{/if}</td>
                                </tr>
                                <tr>
                                    <th>Heart</th>
                                    <td>{if $ultrasoundobstDetail->heart eq 0}Normal {elseif $ultrasoundobstDetail->heart eq 1}Abnormal{else}Not visualized{/if}</td>
                                </tr>
                                <tr>
                                    <td>Heart activity</td>
                                    <td>{if $ultrasoundobstDetail->heartactivity eq 0}Normal {elseif $ultrasoundobstDetail->heartactivity eq 1}Abnormal{else}Not visualized{/if}</td>
                                </tr>
                                <tr>
                                    <td>Size</td>
                                    <td>{if $ultrasoundobstDetail->hsize eq 0}Normal {elseif $ultrasoundobstDetail->hsize eq 1}Abnormal{else}Not visualized{/if}</td>
                                </tr>
                                <tr>
                                    <td>Cardiac axis</td>
                                    <td>{if $ultrasoundobstDetail->haxix eq 0}Normal {elseif $ultrasoundobstDetail->haxix eq 1}Abnormal{else}Not visualized{/if}</td>
                                </tr>
                                <tr>
                                    <td>Four-chamber view</td>
                                    <td>{if $ultrasoundobstDetail->chamberview eq 0}Normal {elseif $ultrasoundobstDetail->chamberview eq 1}Abnormal{else}Not visualized{/if}</td>
                                </tr>
                                <tr>
                                    <th colspan="2">Abdomen</th>
                                </tr>
                                <tr>
                                    <td>Stomach</td>
                                    <td>{if $ultrasoundobstDetail->stomach eq 0}Normal {elseif $ultrasoundobstDetail->stomach eq 1}Abnormal{else}Not visualized{/if}</td>
                                </tr>
                                <tr>
                                    <td>Bowel</td>
                                    <td>{if $ultrasoundobstDetail->bowel eq 0}Normal {elseif $ultrasoundobstDetail->bowel eq 1}Abnormal{else}Not visualized{/if}</td>
                                </tr>
                                <tr>
                                    <td>Kidneys</td>
                                    <td>{if $ultrasoundobstDetail->kidney eq 0}Normal {elseif $ultrasoundobstDetail->kidney eq 1}Abnormal{else}Not visualized{/if}</td>
                                </tr>
                                <tr>
                                    <td>Urinary bladder</td>
                                    <td>{if $ultrasoundobstDetail->bladder eq 0}Normal {elseif $ultrasoundobstDetail->bladder eq 1}Abnormal{else}Not visualized{/if}</td>
                                </tr>
                                <tr>
                                    <td>Cord insertion/Abdominal wall</td>
                                    <td>{if $ultrasoundobstDetail->cordinsertion eq 0}Normal {elseif $ultrasoundobstDetail->cordinsertion eq 1}Abnormal{else}Not visualized{/if}</td>
                                </tr>
                                <tr>
                                    <td>Cord vessels</td>
                                    <td>{if $ultrasoundobstDetail->cordvessels eq 0}Normal {elseif $ultrasoundobstDetail->cordvessels eq 1}Abnormal{else}Not visualized{/if}</td>
                                </tr>
                                <tr>
                                    <th>Spine</th>
                                    <td>{if $ultrasoundobstDetail->spine eq 0}Normal {elseif $ultrasoundobstDetail->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 $ultrasoundobstDetail->rarm eq 0}Normal {elseif $ultrasoundobstDetail->rarm eq 1}Abnormal{else}Not visualized{/if}</td>
                                </tr>
                                <tr>
                                    <td>Right leg (incl. foot)</td>
                                    <td>{if $ultrasoundobstDetail->rleg eq 0}Normal {elseif $ultrasoundobstDetail->rleg eq 1}Abnormal{else}Not visualized{/if}</td>
                                </tr>
                                <tr>
                                    <td>Left arm (incl. hand)</td>
                                    <td>{if $ultrasoundobstDetail->larm eq 0}Normal {elseif $ultrasoundobstDetail->larm eq 1}Abnormal{else}Not visualized{/if}</td>
                                </tr>
                                <tr>
                                    <td>Left leg (incl. foot)</td>
                                    <td>{if $ultrasoundobstDetail->lleg eq 0}Normal {elseif $ultrasoundobstDetail->lleg eq 1}Abnormal{else}Not visualized{/if}</td>
                                </tr>
                                <tr>
                                    <th><span style="color: #ffffff !important;">Gender</span> {if $ultrasoundobstDetail->gender eq 0}Male {elseif $ultrasoundobstDetail->gender eq 1}Female{/if} </th>
                                    <td>{if $ultrasoundobstDetail->gendern eq 0}Normal {elseif $ultrasoundobstDetail->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>