pdf; $maps = array(); $mapQueraL =array(); $mapQueraL['var'] = 'LocDolor'; $mapQueraL['name'] = 'Foot'; $mapQueraL['foot'] = 'L'; $mapQueraL['imageHeight'] = 188; $mapQueraL['imageWidth'] = 103; $mapQueraL['image'] = JRoute::_('components/com_vxc/assets/images/footL.jpg'); $areas = array(); $areas[] = array('type'=>'circle', 'coords' => '58,20,8'); $areas[] = array('type'=>'circle', 'coords' => '22,49,6'); $areas[] = array('type'=>'circle', 'coords' => '29,40,7'); $areas[] = array('type'=>'circle', 'coords' => '34,28,6'); $areas[] = array('type'=>'circle', 'coords' => '43,21,7'); $areas[] = array('type'=>'circle', 'coords' => '63,44,8'); $areas[] = array('type'=>'circle', 'coords' => '69,61,8'); $areas[] = array('type'=>'circle', 'coords' => '43,45,9'); $areas[] = array('type'=>'circle', 'coords' => '52,56,9'); $areas[] = array('type'=>'circle', 'coords' => '29,59,9'); $areas[] = array('type'=>'circle', 'coords' => '30,78,9'); $areas[] = array('type'=>'circle', 'coords' => '50,72,9'); $areas[] = array('type'=>'circle', 'coords' => '64,80,10'); $areas[] = array('type'=>'circle', 'coords' => '70,100,11'); $areas[] = array('type'=>'circle', 'coords' => '45,90,10'); $areas[] = array('type'=>'circle', 'coords' => '34,106,10'); $areas[] = array('type'=>'circle', 'coords' => '41,126,10'); $areas[] = array('type'=>'circle', 'coords' => '69,122,11'); $areas[] = array('type'=>'circle', 'coords' => '73,141,9'); $areas[] = array('type'=>'circle', 'coords' => '57,157,10'); $areas[] = array('type'=>'circle', 'coords' => '77,159,9'); $areas[] = array('type'=>'circle', 'coords' => '65,174,10'); $areas[] = array('type'=>'circle', 'coords' => '44,169,9'); $areas[] = array('type'=>'circle', 'coords' => '54,137,9'); $areas[] = array('type'=>'circle', 'coords' => '40,147,8'); $areas[] = array('type'=>'circle', 'coords' => '53,109,10'); $mapQueraL['areas'] = $areas; $maps['FootL'] = $mapQueraL; $mapQueraR =array(); $mapQueraR['var'] = 'LocDolor'; $mapQueraR['name'] = 'Foot'; $mapQueraR['foot'] = 'R'; $mapQueraR['imageHeight'] = 188; $mapQueraR['imageWidth'] = 103; $mapQueraR['image'] = JRoute::_('components/com_vxc/assets/images/footR.jpg'); $areas = array(); $areas[] = array('type'=>'circle', 'coords' => '45,20,8'); $areas[] = array('type'=>'circle', 'coords' => '81,49,6'); $areas[] = array('type'=>'circle', 'coords' => '74,40,7'); $areas[] = array('type'=>'circle', 'coords' => '69,28,6'); $areas[] = array('type'=>'circle', 'coords' => '60,21,7'); $areas[] = array('type'=>'circle', 'coords' => '40,44,8'); $areas[] = array('type'=>'circle', 'coords' => '34,61,8'); $areas[] = array('type'=>'circle', 'coords' => '60,45,9'); $areas[] = array('type'=>'circle', 'coords' => '51,56,9'); $areas[] = array('type'=>'circle', 'coords' => '74,59,9'); $areas[] = array('type'=>'circle', 'coords' => '73,78,9'); $areas[] = array('type'=>'circle', 'coords' => '53,72,9'); $areas[] = array('type'=>'circle', 'coords' => '39,80,10'); $areas[] = array('type'=>'circle', 'coords' => '33,100,11'); $areas[] = array('type'=>'circle', 'coords' => '58,90,10'); $areas[] = array('type'=>'circle', 'coords' => '69,106,10'); $areas[] = array('type'=>'circle', 'coords' => '62,126,10'); $areas[] = array('type'=>'circle', 'coords' => '34,122,11'); $areas[] = array('type'=>'circle', 'coords' => '30,141,9'); $areas[] = array('type'=>'circle', 'coords' => '46,157,10'); $areas[] = array('type'=>'circle', 'coords' => '26,159,9'); $areas[] = array('type'=>'circle', 'coords' => '38,174,10'); $areas[] = array('type'=>'circle', 'coords' => '59,169,9'); $areas[] = array('type'=>'circle', 'coords' => '49,137,9'); $areas[] = array('type'=>'circle', 'coords' => '63,147,8'); $areas[] = array('type'=>'circle', 'coords' => '50,109,10'); $mapQueraR['areas'] = $areas; $maps['FootR'] = $mapQueraR; $this->loadHelper('AtAreaMaphelper'); $helperMapArea = new AtAreaMaphelper(); $helperMapArea->setMaps($maps); $lang = &JFactory::getLanguage(); $font = $lang->getPdfFontName(); $font = ($font) ? $font : 'freesans'; $pdf->setRTL($lang->isRTL()); $pdf->setHeaderFont(array($font, '', 10)); $pdf->setFooterFont(array($font, '', 8)); $pdf->AliasNbPages(); $pdf->AddPage(); $pdf->Ln(); $currentDate = new JDate(); $currentDate->setOffset(date('Z')/3600.0); $html = "

".JText::_('Anamnesis')."

".JText::_('Patient').": ".$this->order->customerfullname." ".JText::_('Reference').": ".$this->order->reference."
".JText::_('Order').": ".$this->order->id." ".JText::_('Date').": ".$currentDate->toFormat("%d/%m/%y %H:%M")."
"; $pdf->writeHTML($html,true); $motivoConsulta = $this->anamnesis['MotivoConsulta']; $dolores = array(); foreach ($this->lists['TipoDolor'] as $option) { $selected = in_array($option->value,$this->anamnesis['TipoDolor']); if ($selected) $dolores[] = $option->text; } $doloresS = implode(', ',$dolores); $evolucionS = ''; foreach($this->lists['EvoDolor'] as $evo) { if ($evo->value ==$this->anamnesis['EvoDolor']) $evolucionS = JText::_($evo->text); } $tipoActividad = ''; foreach($this->lists['TipoActividad'] as $evo) { if ($evo->value ==$this->anamnesis['TipoActividad']) $tipoActividad = JText::_($evo->text); } $descCalzado = array(); foreach ($this->lists['DescCalzado'] as $option) { $selected = in_array($option->value,$this->anamnesis['DescCalzado']); if ($selected) $descCalzado[] = $option->text; } $descCalzadoS= implode(', ',$descCalzado); $AntMedQuir = array(); foreach ($this->lists['AntMedQuir'] as $option) { $selected = in_array($option->value,$this->anamnesis['AntMedQuir']); if ($selected) $AntMedQuir[] = $option->text; } $AntMedQuirS = implode('
',$AntMedQuir); $CompTests = array(); foreach ($this->lists['CompTests'] as $option) { $selected = in_array($option->value,$this->anamnesis['CompTests']); if ($selected) $CompTests[] = $option->text; } $CompTestsS = implode('
',$CompTests); $html = "
1. ". JText::_('MOTIVO DE CONSULTA') . ""; if (trim($motivoConsulta)) $html.= "
{$motivoConsulta}
"; $html.="
"; $pdf->writeHTML($html, true); $html ="
2. ". JText::_('CARACTERÍSTICAS DEL DOLOR') .""; $options =''; if (trim($doloresS)) $options.= "
  • ". JText::_('TIPO') . ": {$doloresS}
  • "; if ($this->anamnesis['LocDolor']['L'][0] || $this->anamnesis['LocDolor']['R'][0]) { $options .="
  • ". JText::_('LOCALIZACIÓN') ."
  • "; } if ($options) $html.=""; $pdf->writeHTML($html, false); if ($this->anamnesis['LocDolor']['L'][0] || $this->anamnesis['LocDolor']['R'][0]) { $pdf->Ln(); $imageWidthMM = 30; $margins = $pdf->GetMargins(); $sepStartX = 10; $startX =$margins['left']+$sepStartX; $sep = 10; $pdf->Cell($sepStartX-1, 0,''); $pdf->Cell($imageWidthMM+$sep, 0,JText::_('PIE IZQUIERDO')); $pdf->Cell(0, 0,JText::_('PIE DERECHO')); $pdf->Ln(); $curY = $pdf->GetY(); $helperMapArea->PrintAreaMapReport($pdf,$startX,$curY,$imageWidthMM,'FootL',$this->anamnesis['LocDolor']['L']); $helperMapArea->PrintAreaMapReport($pdf,$startX + $imageWidthMM+ $sep,$curY,$imageWidthMM,'FootR',$this->anamnesis['LocDolor']['R']); } $options=''; if (trim($evolucionS)) $options.="
  • ".JText::_('EVOLUCIÓN').": {$evolucionS}
  • "; if ((float)$this->anamnesis['IntDolor']) $options.="
  • ".JText::_('INTENSIDAD').": ".(100*(float)$this->anamnesis['IntDolor'])." %
  • "; if ($options) { $html=""; $html.="
    "; $pdf->writeHTML($html, false); } else $pdf->Ln(); $options =''; if (trim($this->anamnesis['HistoriaLesiones'])) $options .="
  • ".JText::_('HISTORIA PREVIA DE LESIONES'). "
    ". $this->anamnesis['HistoriaLesiones']."
  • "; if (trim($this->anamnesis['HistoriaAntFam'])) $options .="
  • ".JText::_('HISTORIA ANTECEDENTES FAMILIARES'). "
    ".$this->anamnesis['HistoriaAntFam']."
  • "; if (trim($this->anamnesis['TrataAntAct'])) $options .="
  • ".JText::_('TRATAMIENTOS ANTERIORES Y ACTUALES'). "
    ".$this->anamnesis['TrataAntAct']."
  • "; if (trim($tipoActividad)) $options .="
  • ".JText::_('TIPO DE ACTIVIDAD LABORAL/DEPORTIVA').": {$tipoActividad}
  • "; if (trim($descCalzadoS)) $options .="
  • ".JText::_('DESCRIPCION DEL CALZADO').": {$descCalzadoS}
  • "; $html = "
    3. ".JText::_('ANTECEDENTES PODOLÓGICOS').""; if ($options) $html .= ""; else $html .= "
    "; $html.="
    "; $pdf->writeHTML($html, false); $html = "
    4. ".JText::_('ANTECEDENTES MEDICO-QUIRÚRGICOS').""; if (trim($AntMedQuirS)) $html.="
    {$AntMedQuirS}
    "; else $html .= "
    "; $html.= "
    "; $pdf->writeHTML($html, true); $html = "
    5. ".JText::_('PRUEBAS COMPLEMENTARIAS').""; if (trim($CompTestsS)) $html.="
    {$CompTestsS}
    "; else $html .= "
    "; $html.= "
    "; $pdf->writeHTML($html, true); $html = "
    6. ". JText::_('OTROS DATOS DE INTERÉS').""; if (trim($this->anamnesis['OtrosDatosInt'])) $html.="
    ".$this->anamnesis['OtrosDatosInt']."
    "; else $html .= "
    "; $html.= "
    "; $pdf->writeHTML($html, true); $pdf->Output('report.pdf', 'D'); ?>