Rev 182 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
<?xml version="1.0" encoding="UTF-8"?><jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="prontuario_paciente_subreport" pageWidth="555" pageHeight="802" columnWidth="555" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" uuid="f862581b-e8cc-4eb3-a9fa-de182e5be715"><property name="ireport.zoom" value="1.0"/><property name="ireport.x" value="0"/><property name="ireport.y" value="0"/><parameter name="pSequencialPessoaPaciente" class="java.lang.Integer"><defaultValueExpression><![CDATA[]]></defaultValueExpression></parameter><queryString><![CDATA[selectpe.seq_pessoa,pe.nom_pessoa,pe.seq_arquivo_foto,ar.seq_arquivo,ar.dsc_extensao_arquivo,'#' || lpad(cast((pa.seq_pessoa_paciente + 1000) as varchar),6,'0') as num_prontuario,pf.dat_nascimento,replace(replace(replace(replace(cast(age(pf.dat_nascimento) as varchar), 'year', 'ano'), 'mons', 'mêses'), 'mon', 'mês'), 'day', 'dia')as idade,(case when pf.tip_sexo = 'M' then 'MASCULINO' when pf.tip_sexo = 'F' then 'FEMININO' else null end) as tipo_sexo,pf.tip_sanguineo,ar.obj_arquivo,(case when pf.tip_estado_civil = 'S' then 'SOLTEIRO'when pf.tip_estado_civil = 'C' then 'CASADO'when pf.tip_estado_civil = 'D' then 'DIVORCIADO'when pf.tip_estado_civil = 'V' then 'VIÚVO'when pf.tip_estado_civil = 'E' then 'SEPARADO'when pf.tip_estado_civil = 'M' then 'COMPANHEIRO'else null end) as estado_civil,(select array_to_string(array_agg(oc.dsc_ocupacao), ',') from sc_adm.adm_ocupacao oc where exists(select 1 from sc_adm.adm_pessoafisica_ocupacao pfo where pfo.cod_ocupacao = oc.cod_ocupacao and pfo.seq_pessoa = pf.seq_pessoa)) as ocupacoesfrom sc_cln.cln_paciente pajoin sc_adm.adm_pessoa pe on (pe.seq_pessoa = pa.seq_pessoa_paciente)join sc_adm.adm_pessoa_fisica pf on (pf.seq_pessoa = pe.seq_pessoa)left join sc_adm.adm_arquivo ar on (ar.seq_arquivo = pe.seq_arquivo_foto)where pa.seq_pessoa_paciente = $P{pSequencialPessoaPaciente}]]></queryString><field name="seq_pessoa" class="java.lang.Integer"/><field name="nom_pessoa" class="java.lang.String"/><field name="seq_arquivo_foto" class="java.lang.Integer"/><field name="seq_arquivo" class="java.lang.Integer"/><field name="dsc_extensao_arquivo" class="java.lang.String"/><field name="num_prontuario" class="java.lang.String"/><field name="dat_nascimento" class="java.sql.Date"/><field name="idade" class="java.lang.String"/><field name="tipo_sexo" class="java.lang.String"/><field name="tip_sanguineo" class="java.lang.String"/><field name="obj_arquivo" class="java.lang.Object"/><field name="estado_civil" class="java.lang.String"/><field name="ocupacoes" class="java.lang.String"/><background><band splitType="Stretch"/></background><columnHeader><band height="113"><image><reportElement uuid="b3e94d88-08ee-4d82-9fef-17de72e76936" x="0" y="0" width="118" height="113"/><imageExpression><![CDATA[new ByteArrayInputStream((byte[])$F{obj_arquivo})]]></imageExpression></image><textField><reportElement uuid="db59d64e-fc85-4b41-9d10-0363238c5d9c" x="131" y="0" width="411" height="26"/><textElement><font fontName="Arial" size="14" isBold="true" pdfFontName="Helvetica-Bold"/></textElement><textFieldExpression><![CDATA["PACIENTE: " + $F{nom_pessoa}]]></textFieldExpression></textField><textField><reportElement uuid="649bfcb2-a76e-4b62-8fb6-1f76b1485cc1" x="237" y="26" width="100" height="20"/><textElement><font fontName="Arial"/></textElement><textFieldExpression><![CDATA[$F{num_prontuario}]]></textFieldExpression></textField><staticText><reportElement uuid="e7993e68-a156-4dd8-92eb-f588de0f0dbc" x="131" y="26" width="106" height="20"/><textElement><font fontName="Arial"/></textElement><text><![CDATA[Nº DO PRONTUÁRIO:]]></text></staticText><textField pattern="dd/MM/yyyy" isBlankWhenNull="true"><reportElement uuid="f21463fd-9248-4e14-ba2b-6ed639bd1ccc" x="238" y="46" width="100" height="20"/><textElement><font fontName="Arial"/></textElement><textFieldExpression><![CDATA[$F{dat_nascimento}]]></textFieldExpression></textField><staticText><reportElement uuid="b10861d0-5d0f-48b0-95dd-a7e1824a2634" x="131" y="46" width="106" height="20"/><textElement><font fontName="Arial"/></textElement><text><![CDATA[DATA DE NASC.:]]></text></staticText><textField><reportElement uuid="237f53c7-e745-4e46-a487-682d00e305c7" x="437" y="46" width="118" height="20"/><textElement><font fontName="Arial"/></textElement><textFieldExpression><![CDATA[$F{idade}]]></textFieldExpression></textField><staticText><reportElement uuid="7e34aff2-f538-4654-b223-d0002759a150" x="358" y="46" width="79" height="20"/><textElement><font fontName="Arial"/></textElement><text><![CDATA[IDADE:]]></text></staticText><textField><reportElement uuid="950d267e-108b-4535-b636-d88f1e20f822" x="237" y="66" width="100" height="20"/><textElement><font fontName="Arial"/></textElement><textFieldExpression><![CDATA[$F{tipo_sexo}]]></textFieldExpression></textField><staticText><reportElement uuid="6127a3fc-2def-4747-97a8-b99c2644e0f2" x="131" y="66" width="106" height="20"/><textElement><font fontName="Arial"/></textElement><text><![CDATA[SEXO:]]></text></staticText><textField isBlankWhenNull="true"><reportElement uuid="511ccfc7-872b-4244-9bdf-ccd41ed8b2a3" x="437" y="66" width="118" height="20"/><textElement><font fontName="Arial"/></textElement><textFieldExpression><![CDATA[$F{estado_civil}]]></textFieldExpression></textField><staticText><reportElement uuid="e7993e68-a156-4dd8-92eb-f588de0f0dbc" x="358" y="66" width="79" height="20"/><textElement><font fontName="Arial"/></textElement><text><![CDATA[ESTADO CIVIL:]]></text></staticText><staticText><reportElement uuid="e7993e68-a156-4dd8-92eb-f588de0f0dbc" x="131" y="86" width="106" height="20"/><textElement><font fontName="Arial"/></textElement><text><![CDATA[OCUPAÇÕES:]]></text></staticText><textField isStretchWithOverflow="true" isBlankWhenNull="true"><reportElement uuid="691baf2e-6481-4306-a527-8dbe5b8a1cf6" x="238" y="86" width="317" height="20"/><textElement><font fontName="Arial"/></textElement><textFieldExpression><![CDATA[$F{ocupacoes}]]></textFieldExpression></textField></band></columnHeader></jasperReport>