<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
				xmlns:fo="http://www.w3.org/1999/XSL/Format" exclude-result-prefixes="fo">
	
	<xsl:output method="xml" version="1.0" omit-xml-declaration="no" indent="yes"/>
	<xsl:template match="FichaAptidao">
		<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
			
			<fo:layout-master-set>
				<fo:simple-page-master master-name="simpleA4" page-height="29.7cm" page-width="21cm"
				                    margin-top="2cm" margin-bottom="0.1cm" margin-left="2cm" margin-right="2cm">
					<fo:region-body/>
				</fo:simple-page-master>
			</fo:layout-master-set>
			<fo:page-sequence master-reference="simpleA4">
				<fo:flow flow-name="xsl-region-body">
					<fo:block>
						<fo:block text-align="center" font-size="10pt" font-weight="bold">
							FICHA DE APTID&#xc3;O
						</fo:block>
						<fo:block text-align="center" font-size="7pt" space-before="0.3cm" font-weight="bold">
							(<xsl:value-of select="portaria"/>)
						</fo:block>
						<fo:table table-layout="fixed" border-color="black" border-style="solid" border-width="medium">
							<fo:table-column column-width="proportional-column-width(50)" />
							<fo:table-column column-width="proportional-column-width(50)" />
							<fo:table-body>
								
								<fo:table-row >
									<fo:table-cell border-bottom-color="black" border-bottom-style="solid" border-bottom-width="thin" number-columns-spanned="2">
										<fo:block font-size="8pt" space-before="0.3cm" space-after="0.3cm" margin-left="0.2cm" font-weight="bold">
	Empresa/Entidade
										</fo:block>
									</fo:table-cell>
								</fo:table-row>
								<fo:table-row>
									<fo:table-cell number-columns-spanned="2">
										<fo:block font-size="8pt" space-before="0.1cm" margin-left="0.2cm">
DESIGNA&#xc7;&#xc3;O SOCIAL: <xsl:value-of select="designacao_social"/>
										</fo:block>
									</fo:table-cell>
								</fo:table-row>
								<fo:table-row>
									<fo:table-cell number-columns-spanned="1">
										<fo:block font-size="8pt" space-before="0.1cm" margin-left="0.2cm">
ESTABELECIMENTO: <xsl:value-of select="estabelecimentos.nome"/>
										</fo:block>
									</fo:table-cell>
									<fo:table-cell number-columns-spanned="1">
										<fo:block font-size="8pt" space-before="0.1cm" margin-left="0.2cm">
LOCALIDADE: <xsl:value-of select="estabelecimentos.localidade"/>
										</fo:block>
									</fo:table-cell>
								</fo:table-row>
								<fo:table-row>
									<fo:table-cell number-columns-spanned="2">
										<fo:block font-size="8pt" space-before="0.1cm" margin-left="0.2cm">
SERVI&#xc7;O DE SA&#xda;DE: Tipo
	<fo:inline font-size="8pt">&#160;&#160;&#160;&#160;<xsl:value-of select="servico_saude_tipo_interno"/></fo:inline> Interno 
	<fo:inline font-size="8pt">&#160;&#160;&#160;&#160;<xsl:value-of select="servico_saude_tipo_interempresas"/></fo:inline> Interempresas 
	<fo:inline font-size="8pt">&#160;&#160;&#160;&#160;<xsl:value-of select="servico_saude_tipo_externo"/></fo:inline> Externo 
	<fo:inline font-size="8pt">&#160;&#160;&#160;&#160;<xsl:value-of select="servico_saude_tipo_sns"/></fo:inline> Servi&#xe7;o Nacional de Sa&#xfa;de 
										</fo:block>
										<fo:block font-size="8pt" space-before="0.1cm" margin-left="0.2cm">
DESIGNA&#xc7;&#xc3;O: <xsl:value-of select="servico_saude_designacao"/>
										</fo:block>
										<fo:block font-size="8pt" space-before="0.1cm" margin-left="0.2cm">
SERVI&#xc7;O DE HIGIENE E SEGURAN&#xc7;A: Tipo
	<fo:inline font-size="8pt">&#160;&#160;&#160;&#160;<xsl:value-of select="servico_higiene_tipo_interno"/> Interno </fo:inline>
	<fo:inline font-size="8pt">&#160;&#160;&#160;&#160;<xsl:value-of select="servico_higiene_tipo_interempresas"/> Interempresas </fo:inline>
	<fo:inline font-size="8pt">&#160;&#160;&#160;&#160;<xsl:value-of select="servico_higiene_tipo_externo"/> Externo </fo:inline>
	<fo:inline font-size="8pt">&#160;&#160;&#160;&#160;<xsl:value-of select="servico_higiene_tipo_outro"/> Outro </fo:inline>
										</fo:block>
										<fo:block font-size="8pt" space-before="0.1cm" margin-left="0.2cm">
DESIGNA&#xc7;&#xc3;O: <xsl:value-of select="servico_higiene_designacao"/>
										</fo:block>

									</fo:table-cell>
								</fo:table-row>
							</fo:table-body>
						</fo:table>
<fo:table table-layout="fixed" space-before="5mm" border-color="black" border-style="solid" border-width="medium">
							<fo:table-column column-width="proportional-column-width(1)" />
							<fo:table-column column-width="proportional-column-width(1)" />
							<fo:table-column column-width="proportional-column-width(1)" />
							<fo:table-column column-width="proportional-column-width(1)" />
							<fo:table-column column-width="proportional-column-width(1)" />
							<fo:table-column column-width="proportional-column-width(1)" />
							<fo:table-body>
								<fo:table-row>
									<fo:table-cell border-bottom-color="black" border-bottom-style="solid" border-bottom-width="thin" number-columns-spanned="6">
										<fo:block font-size="8pt" space-before="0.3cm" space-after="0.3cm" margin-left="0.2cm" font-weight="bold">
	Trabalhador
										</fo:block>
									</fo:table-cell>
								</fo:table-row>
								<fo:table-row>
									<fo:table-cell number-columns-spanned="6">
										<fo:block font-size="8pt" space-before="0.1cm" margin-left="0.2cm">
NOME: <xsl:value-of select="trabalhadores.nome"/>
										</fo:block>
									</fo:table-cell>
								</fo:table-row>
								<fo:table-row>
									<fo:table-cell number-columns-spanned="1">
										<fo:block font-size="8pt" space-before="0.1cm" margin-left="0.2cm">
SEXO:  <xsl:value-of select="sexo"/>
										</fo:block>
									</fo:table-cell>
									<fo:table-cell number-columns-spanned="2">
										<fo:block font-size="8pt" space-before="0.1cm" margin-left="0.2cm">
DATA DE NASCIMENTO: <xsl:value-of select="data_nascimento"/>
										</fo:block>
									</fo:table-cell>
									<fo:table-cell number-columns-spanned="3">
										<fo:block font-size="8pt" space-before="0.1cm" margin-left="0.2cm">
NACIONALIDADE: <xsl:value-of select="nacionalidade"/>
										</fo:block>
									</fo:table-cell>
								</fo:table-row>
								<fo:table-row>
									<fo:table-cell number-columns-spanned="3">
										<fo:block font-size="8pt" space-before="0.1cm" margin-left="0.2cm">
N&#xda;MERO MECANOGR&#xc1;FICO/OUTRO: <xsl:value-of select="numero_mecanografico"/>
										</fo:block>
										<fo:block font-size="8pt" space-before="0.1cm" margin-left="0.2cm">
CATEGORIA PROFISSIONAL: <xsl:value-of select="categoria"/>
										</fo:block>
										<fo:block font-size="8pt" space-before="0.1cm" margin-left="0.2cm">
FUNCAO PROPOSTA: <xsl:value-of select="funcao_proposta"/>
										</fo:block>
									</fo:table-cell>
									<fo:table-cell number-columns-spanned="3">
										<fo:block font-size="8pt" space-before="0.1cm" margin-left="0.2cm">
DATA DE ADMISS&#xc3;O: <xsl:value-of select="data_admissao"/>
										</fo:block>
										<fo:block font-size="8pt" space-before="0.1cm" margin-left="0.2cm">
LOCAL DE TRABALHO: <xsl:value-of select="local_trabalho"/>
										</fo:block>
										<fo:block font-size="8pt" space-before="0.1cm" margin-left="0.2cm">
DATA DE ADMISS&#xc3;O NA FUN&#xc7;&#xc3;O: <xsl:value-of select="data_admissao_funcao"/>
										</fo:block>
									</fo:table-cell>
								</fo:table-row>
							</fo:table-body>
						</fo:table>
<fo:table table-layout="fixed" space-before="5mm" border-color="black" border-style="solid" border-width="medium">
							<fo:table-column column-width="proportional-column-width(50)" />
							<fo:table-column column-width="proportional-column-width(50)" />
							<fo:table-body>
								<fo:table-row>
									<fo:table-cell border-bottom-color="black" border-bottom-style="solid" border-bottom-width="thin" number-columns-spanned="2">
										<fo:block font-size="8pt" space-before="0.3cm" space-after="0.3cm" margin-left="0.2cm" font-weight="bold">
	Observa&#xe7;&#xf5;es
										</fo:block>
									</fo:table-cell>
								</fo:table-row>
								<fo:table-row>
									<fo:table-cell number-columns-spanned="2">
										<fo:block font-size="8pt" space-before="1cm" margin-left="0.2cm">
										</fo:block>
									</fo:table-cell>
								</fo:table-row>
							</fo:table-body>
						</fo:table>
<fo:table table-layout="fixed" space-before="5mm" border-color="black" border-style="solid" border-width="medium">
							<fo:table-column column-width="proportional-column-width(50)" />
							<fo:table-column column-width="proportional-column-width(50)" />
							<fo:table-body>
								<fo:table-row>
									<fo:table-cell border-bottom-color="black" border-bottom-style="solid" border-bottom-width="thin" number-columns-spanned="2">
										<fo:block font-size="8pt" space-before="0.3cm" space-after="0.3cm" margin-left="0.2cm" font-weight="bold">
	Exame M&#xe9;dico
										</fo:block>
									</fo:table-cell>
								</fo:table-row>
								<fo:table-row>
									<fo:table-cell border-right-color="black" border-right-style="solid" border-right-width="thin" number-columns-spanned="1">
										<fo:block font-size="8pt" space-before="0.1cm" margin-left="0.2cm">
DATA DO EXAME: <xsl:value-of select="exames.data"/>
										</fo:block>
	<fo:block font-size="8pt" space-before="0.1cm" margin-left="0.2cm">
TIPO
										</fo:block>
										<fo:block font-size="8pt" space-before="0.1cm" margin-left="0.2cm">
<xsl:value-of select="tipo_admissao"/> ADMISS&#xc3;O
										</fo:block>
										<fo:block font-size="8pt" space-before="0.1cm" margin-left="0.2cm">
<xsl:value-of select="tipo_periodico"/> PERI&#xd3;DICO
										</fo:block>
										<fo:block font-size="8pt" space-before="0.1cm" margin-left="0.2cm">
<xsl:value-of select="tipo_ocasional"/> OCASIONAL
										</fo:block>
										<fo:block font-size="8pt" space-before="0.1cm" margin-left="1.2cm">
	<xsl:value-of select="tipo_apos_doenca"/> AP&#xd3;S DOENCA
										</fo:block>
										<fo:block font-size="8pt" space-before="0.1cm" margin-left="1.2cm">
	<xsl:value-of select="tipo_apos_acidente"/> AP&#xd3;S ACIDENTE
										</fo:block>
										<fo:block font-size="8pt" space-before="0.1cm" margin-left="1.2cm">
	<xsl:value-of select="tipo_pedido_trabalhador"/> A PEDIDO DO TRABALHADOR
										</fo:block>
										<fo:block font-size="8pt" space-before="0.1cm" margin-left="1.2cm">
	<xsl:value-of select="tipo_pedido_empresa"/> A PEDIDO DO SERVI&#xc7;O
										</fo:block>
										<fo:block font-size="8pt" space-before="0.1cm" margin-left="1.2cm">
	<xsl:value-of select="tipo_mudanca_funcao"/> POR MUDANCA DE FUN&#xc7;&#xc3;O
										</fo:block>
										<fo:block font-size="8pt" space-before="0.1cm" margin-left="1.2cm">
	<xsl:value-of select="tipo_trabalho"/> POR ALTERA&#xc7;&#xc3;O DAS CONDI&#xc7;&#xd5;ES DE TRABALHO
										</fo:block>
										<fo:block font-size="8pt" space-before="0.1cm" margin-left="1.2cm">
	<xsl:value-of select="tipo_outro"/> OUTRO
										</fo:block>
										<fo:block font-size="8pt" space-before="0.1cm" margin-left="0.2cm">
ESPECIFIQUE: <xsl:value-of select="tipo_outro_texto"/>
										</fo:block>
									</fo:table-cell>
									<fo:table-cell number-columns-spanned="1">
										<fo:block font-size="8pt" space-before="0.1cm" margin-left="0.2cm">
RESULTADO
										</fo:block>
										<fo:block font-size="8pt" space-before="0.1cm" margin-left="0.2cm">
<xsl:value-of select="resultado_apto"/> APTO
										</fo:block>
										<fo:block font-size="8pt" space-before="0.1cm" margin-left="0.2cm">
<xsl:value-of select="resultado_apto_condicionalmente"/> APTO CONDICIONALMENTE
										</fo:block>
										<fo:block font-size="8pt" space-before="0.1cm" margin-left="0.2cm">
	&#160;
										</fo:block>
										<fo:block font-size="8pt" space-before="0.1cm" margin-left="0.2cm">
<xsl:value-of select="resultado_inapto_temp"/> INAPTO TEMPORARIAMENTE
										</fo:block>
										<fo:block font-size="8pt" space-before="0.1cm" margin-left="0.2cm">
<xsl:value-of select="resultado_inapto_def"/> INAPTO DEFINITIVAMENTE
										</fo:block>
										<fo:block font-size="8pt" space-before="0.1cm" margin-left="0.2cm">
	&#160;
										</fo:block>
										<fo:block font-size="8pt" space-before="0.1cm" margin-left="0.2cm">
OUTRAS FUN&#xc7;&#xd5;ES QUE PODE DESEMPENHAR
										</fo:block>
										<fo:block font-size="8pt" space-before="0.1cm" margin-left="1.2cm">
	1 <xsl:value-of select="outra_funcao_1"/>
										</fo:block>
										<fo:block font-size="8pt" space-before="0.1cm" margin-left="1.2cm">
	2 <xsl:value-of select="outra_funcao_2"/>
										</fo:block>
										<fo:block font-size="8pt" space-before="0.1cm" margin-left="1.2cm">
	3 <xsl:value-of select="outra_funcao_3"/>
										</fo:block>
										<fo:block font-size="8pt" space-before="0.1cm" margin-left="1.2cm">
	4 <xsl:value-of select="outra_funcao_4"/>
										</fo:block>
										<fo:block font-size="8pt" space-before="0.1cm" margin-left="0.2cm">
	&#160;
										</fo:block>
									</fo:table-cell>
								</fo:table-row>
							</fo:table-body>
						</fo:table>
<fo:table table-layout="fixed" space-before="5mm" border-color="black" border-style="solid" border-width="medium">
							<fo:table-column column-width="proportional-column-width(50)" />
							<fo:table-column column-width="proportional-column-width(50)" />
							<fo:table-body>
								<fo:table-row>
									<fo:table-cell border-bottom-color="black" border-bottom-style="solid" border-bottom-width="thin" number-columns-spanned="2">
										<fo:block font-size="8pt" space-before="0.3cm" space-after="0.3cm" margin-left="0.2cm" font-weight="bold">
	Outras Recomenda&#xe7;&#xf5;es
										</fo:block>
									</fo:table-cell>
								</fo:table-row>
								<fo:table-row>
									<fo:table-cell number-columns-spanned="2">
										<fo:block font-size="8pt" space-before="0.1cm" margin-left="0.2cm">
<xsl:value-of select="outras_recomendacoes"/>
										</fo:block>
										<fo:block font-size="8pt" space-before="0.1cm" margin-left="0.2cm">
PR&#xd3;XIMO EXAME: <xsl:value-of select="proximo_exame"/>
										</fo:block>
									</fo:table-cell>
								</fo:table-row>
							</fo:table-body>
						</fo:table>
<fo:table table-layout="fixed" space-before="5mm" border-color="black" border-style="solid" border-width="medium">
							<fo:table-column column-width="proportional-column-width(50)" />
							<fo:table-column column-width="proportional-column-width(50)" />
							<fo:table-body>
								<fo:table-row>
									<fo:table-cell number-columns-spanned="1">
										<fo:block font-size="8pt" space-before="0.3cm" margin-left="0.2cm">
M&#xc9;DICO DO TRABALHO: <xsl:value-of select="medicos.nome"/>
										</fo:block>
									</fo:table-cell>
									<fo:table-cell number-columns-spanned="1">
										<fo:block font-size="8pt" space-before="0.1cm" margin-left="0.2cm">
C.P. <xsl:value-of select="numero_cedula"/>
										</fo:block>
									</fo:table-cell>
								</fo:table-row>
								<fo:table-row>
									<fo:table-cell number-columns-spanned="2">
										<fo:block font-size="8pt" space-before="0.3cm" margin-left="0.2cm">
ASSINATURA _____________________________________________________________________________________________
										</fo:block>
										<fo:block font-size="8pt" space-before="0.3cm" margin-left="0.2cm">
TOMEI CONHECIMENTO ___________________________________________________________________ DATA: ___/___/______
										</fo:block>
										<fo:block font-size="8pt" space-before="0.1cm" margin-left="5.2cm">
		O RESPONS&#xc1;VEL DOS RECURSOS HUMANOS
										</fo:block>
									</fo:table-cell>
								</fo:table-row>
							</fo:table-body>
						</fo:table>

					</fo:block>
				</fo:flow>
			</fo:page-sequence>
		</fo:root>
	</xsl:template>
</xsl:stylesheet>
