
                       <?php
                       $i=1;
//                       if($action == 'view_medical_history_details' || $action == 'view_medical_history_details_per'){
                       $med_his = mysql_query("select m.date_time, p.process_claim_no, m.id from process_claim_no p,medical_history m where p.process_claim_no=m.process_claim_no AND p.patient_no = '$patient_no' ORDER BY m.id DESC", $courier);
//                       } else {
//                       $med_his = mysql_query("select m.date_time, p.process_claim_no, m.id from process_claim_no p,medical_history m where p.process_claim_no=m.process_claim_no AND p.patient_no = '$patient_no' AND p.process_claim_no = '$process_claim_no' ORDER BY m.id DESC", $courier);
//                       }
                       while($med_row = mysql_fetch_assoc($med_his)){ ?>
                               <div class="mt-comments" style="cursor: pointer;">
                                        <div class="mt-comment" style="background-color: #FAFAFA;border: 1px solid #eee;">
                                                    <div class="mt-comment-img"><?php echo $i;?></div>
                                                    <div class="mt-comment-body">
                                                        <div class="mt-comment-info">
                                                            <span class="mt-comment-author"> VISIT NO : <?php echo $med_row['process_claim_no'];?> </span>
                                                            <span class="mt-comment-date"><?php echo date('D,jS F Y @ g:ia', strtotime($med_row['date_time']));?></span>
                                                        </div>
                                                        <div class="mt-comment-text"> 
                                                            <?php get_patient_symptoms($med_row['id'], $med_row['process_claim_no'], $courier);?>
                                                            <?php get_patient_diagnosis($med_row['id'], $med_row['process_claim_no'], $courier);?>
                                                            <?php get_patient_diagnostics($med_row['id'], $med_row['process_claim_no'], $courier);?>
                                                            <?php get_patient_drug_prescription($med_row['id'], $med_row['process_claim_no'], $courier);?>
                                                            <?php get_patient_medical_note($med_row['id'], $med_row['process_claim_no'], $i, $courier);?>
                                                            <?php get_patient_status($med_row['process_claim_no'], $courier);?>
                                                        </div>
                                                        <div class="mt-comment-details">
                                                            <ul class="mt-comment-actions" style="display: block">
                                                                <li>
                                                                    <a onclick="save_information('view_medical_history_details_per','<?php echo $patient_no."@@@".$id."@@@".$med_row['id'];?>', '<?php echo $med_row['process_claim_no'];?>', 'currentarea','<?php echo $med_row['id'];?>');" href="#">View</a>
                                                                </li>
                                                            </ul>
                                                        </div>
                                                    </div>
                                                </div>
                                    </div>
                                <?php $i++; } ?>
                        