<?

$chartTemplate =
[
"COCP" =>  ["Primary Complaint",'TA','value'=>['This was the last value'] ],
"HISP" =>  ["History of Present Illness",'TA'],
"POSB" =>  ["Primary Obervation",'TA'],

"TREH" =>  ["Treatment History",'TA'],
"MEDH" =>  ["Medication History",'TA'],
"SUGH" =>  ["Surgery History",'TA'],
"DIAG" =>  ["Diagnosis",'TA'],
"TRET" =>  ["Treatment Plan",'TA']

];


function sectionlayout($head_code,$head_name) {
$sTring ="

 <h4 class='chart_code_header' id='item-{$head_code}'>$head_name</h4>
            <textarea class='form-control border border-info'>Ex consequat commodo adipisicing exercitation aute excepteur occaecat ullamco duis aliqua id magna ullamco eu. Do aute ipsum ipsum ullamco cillum consectetur ut et aute consectetur labore. Fugiat laborum incididunt tempor eu consequat enim dolore proident. Qui laborum do non excepteur nulla magna eiusmod consectetur in. Aliqua et aliqua officia quis et incididunt voluptate non anim reprehenderit adipisicing dolore ut consequat deserunt mollit dolore. Aliquip nulla enim veniam non fugiat id cupidatat nulla elit cupidatat commodo velit ut eiusmod cupidatat elit dolore.</textarea>";


return $sTring;
}
$sectionAdd='';
?>   


						


<div class="row">

    <div class="col-3">

        <nav id="navbar-example3" class="navbar navbar-light bg-light">
        <a class="navbar-brand" href="#">Patient Name</a>
 <nav class="nav nav-pills flex-column" style="text-align:left;">
<?php
foreach( $chartTemplate as $key=>$cTmp ){
    echo "<a class='nav-link link_text' href='#item-{$key}'>{$cTmp[0]}</a>";

$sectionAdd .= sectionlayout($key,$cTmp[0]);
}
?>


		
		
        </nav>
        </nav>




    </div>

    <div class="col-9">
  <?=$sectionAdd?>
           



    </div>

</div> 


