<!DOCTYPE html>
<html>
    <head>
        <style>
        table {
            border-collapse: collapse;
        }
        table, th, td {
            border: 1px solid black;
        }
        </style>
    </head> 
    <body>
        <div style="width: 85%; margin: 0 7.5%;">
            <div style="text-align: center; padding-left: 50px;">       
			<img src="http://planmyhealth.co/assets/images/smallplanmyhealth.png" alt="Girl in a jacket" width="150" height="50">			
                <h3>Medical Prescription </h3>
				
				<h5>Doctor Name : <%= doctorname %><span>    Qualification : <%= qualification %></span></h5>
				<h5>Registration No : <%= redId %></h5>
				<p><%= doctorcheckdate %></p>
				<h5>Findings</h5> 
                <table>
				<tr><td>Name</td></tr>
                <% if (findings.length > 0) { %>
                    <% findings.forEach(finding => {%>
                       <tr><td><%= finding.name %></td></tr>
                    <%  });%>
                <% }%>
                </table>

				<h5>Diagnosis</h5> 
                <table>
				<tr><td>Name</td></tr>
                <% if (diagnosis.length > 0) { %>
                    <% diagnosis.forEach(diagnosi => {%>
                       <tr><td><%= diagnosi.diagnosis_name %></td></tr>
                    <%  });%>
                <% }%>
                </table>				
                
				<h5>Medicine List</h5> 
                <table>
				<tr><td>Name</td><td>Frequency</td><td>Qty</td><td>With</td></tr>
                <% if (medicine.length > 0) { %>
                    <% medicine.forEach(medicin => {%>
                       <tr><td><%= medicin.name %></td><td><%= medicin.time %></td><td><%= medicin.qut %></td><td><%=medicin.withtake %></td></tr>
                    <%  });%>
                <% }%>
                </table>
				
				
				
				<h5>Medical Test</h5>
                <table>
                <% if (test.length > 0) { %>
                    <% test.forEach(tes => {%>
                       <tr><td><%= tes.name %></td></tr>
                    <%  });%>
                <% }%>
                </table>
				
				<h5>Hospitalization Required: </h5><p><%= hospitalise %></p>
				<h5>Specialist Consultant Required: </h5><p><%= specialist %></p>
				<h5>Wellness Advice: </h5> <% if (wellness.length > 0) { %>
                    <% wellness.forEach(wellnes => {%>
                       <p><%= wellnes.wellnessname %></p>
                    <%  });%>
                <% }%>
				<p>Follow Up Date:<%= followupdate %></p>
				<img src="<%= signature %>" alt="Girl in a jacket" width="150" height="50">
				<p>Note:<%= remark %></p>
				
						
             </div>
        </div>
    </body>
</html>