<!DOCTYPE html>
<html lang="es">
<head>
	<meta name="robots" content="noindex, nofollow">
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<meta name="author" content="F. Alexander Osorio ">
	<title><?php echo e($paciente->nombre); ?> - <?php echo e($programa->nombre); ?> - Formulario de seguimiento</title>
	<style type="text/css">
		td, th {
			padding-right: 8px;
		}
		p, td, th {
			font-family: Verdana, Geneva, sans-serif;
			vertical-align:top;
			text-align: left;
		}
		table {
			margin-left: -2px
		}
		hr {
			border: none;
			border-top: dashed 1px #9e9e9e;
			padding: 0px;
			margin: 0px;
			margin-top: -20px;

		}
		table.informe  tr  th {
			font-size: 9px;
			text-align: right;
		}
		table.informe  tr  td {
			font-size: 9px;
			width: 120px;
		}
		table.informe thead tr th {
			text-align: left;
		}
		table.informe > thead > tr > th:first-child {
			text-align: right;
		}
		body{
			margin-top: 10px;
		}
		table.bordered {
			margin: 0 0 20px 0
		}
		table.bordered td, table.bordered th{
			border: solid 1px #9e9e9e;
			margin: 0px;
			padding: 2px 7px;
			border-collapse: collapse;
		}

	</style>
</head>
<body style="font-size:0.7rem">

	<?php echo $__env->make('pdfs.encabezado-pdf', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>

	<br />
	<?php /* agregar la lista de diagnósticos */ ?>
	<?php if(	isset($formulario->diagnostico_p) ||
			isset($formulario->diagnostico_r1) ||
			isset($formulario->diagnostico_r2) ||
			isset($formulario->diagnostico_r3) ||
			isset($formulario->complicacion)): ?>
		<table class="bordered" cellpadding="0" cellspacing="0">
			<!--<thead>
				<tr>
					<th colspan="2">Lista de diagnósticos:</th>
				</tr>
			</thead>-->
			<tbody>
				<?php if(isset($formulario->diagnostico_p)): ?>
					<tr>
						<th>Dx. Principal</th>
						<td><?php echo e($formulario->diagnostico_p); ?></td>
					</tr>
				<?php endif; ?>
				
				<!--<?php if(isset($formulario->diagnostico_r1)): ?>
					<tr>
						<th>Relacionado 1</th>
						<td><?php echo e($formulario->diagnostico_r1); ?></td>
					</tr>
				<?php endif; ?>
				
				<?php if(isset($formulario->diagnostico_r2)): ?>
					<tr>
						<th>Relacionado 2</th>
						<td><?php echo e($formulario->diagnostico_r2); ?></td>
					</tr>
				<?php endif; ?>
				
				<?php if(isset($formulario->diagnostico_r3)): ?>
					<tr>
						<th>Relacionado 3</th>
						<td><?php echo e($formulario->diagnostico_r3); ?></td>
					</tr>
				<?php endif; ?>
				
				<?php if(isset($formulario->complicacion)): ?>
					<tr>
						<th>Complicación</th>
						<td><?php echo e($formulario->complicacion); ?></td>
					</tr>
				<?php endif; ?>
				-->
			</tbody>
		</table>
	<?php else: ?>
		<?php if($programa->id == 3 || $programa->id == 4): ?>
			<p>No se incluyeron diagnósticos.</p>
		<?php endif; ?>
	<?php endif; ?>

	<?php /* agregar la lista de medicamentos recetados */ ?>
	<?php if(count($medicamentos)): ?>
		<table class="bordered" cellpadding="0" cellspacing="0">
			<thead>
			<!--	<tr>
					<th colspan="6">Lista de medicamentos:</th>
				</tr>-->
				<tr>
					<th>CUM</th>
					<th>Código</th>
					<th>Nombre del medicamento</th>
					<th>Cantidad</th>
					<th>Posología</th>
					<th>Duracion_Tto</th>					
				</tr>
			</thead>
			<tbody>
				<?php foreach($medicamentos as $medicamento): ?>
					<tr>
						<td><?php echo e($medicamento->cum); ?></td>
						<td><?php echo e($medicamento->cod); ?></td>
						<td><?php echo e($medicamento->nombre); ?></td>
						<td><?php echo e($medicamento->cantidad); ?></td>
						<td><?php echo e($medicamento->posologia); ?></td>
						<td><?php echo e($medicamento->duracion_tto); ?></td>
					</tr>
				<?php endforeach; ?>
			</tbody>
		</table>
        <br>
		<p>___________________________________</p>
		<p>      Nombre y/o Firma Usuario     </p>

		<?php else: ?>
		<p>No se recetaron medicamentos.</p>
	<?php endif; ?>

	<?php echo $__env->make('pdfs.footer-pdf', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>

</body>
</html>
