Details | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 200 | espaco | 1 | <?xml version="1.0" encoding="UTF-8"?> |
| 2 | <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"> |
||
| 3 | <property name="ireport.zoom" value="1.0"/> |
||
| 4 | <property name="ireport.x" value="0"/> |
||
| 5 | <property name="ireport.y" value="0"/> |
||
| 6 | <parameter name="pSequencialPessoaPaciente" class="java.lang.Integer"> |
||
| 7 | <defaultValueExpression><![CDATA[]]></defaultValueExpression> |
||
| 8 | </parameter> |
||
| 9 | <queryString> |
||
| 10 | <![CDATA[select |
||
| 11 | pe.seq_pessoa, |
||
| 12 | pe.nom_pessoa, |
||
| 13 | pe.seq_arquivo_foto, |
||
| 14 | ar.seq_arquivo, |
||
| 15 | ar.dsc_extensao_arquivo, |
||
| 16 | '#' || lpad(cast((pa.seq_pessoa_paciente + 1000) as varchar),6,'0') as num_prontuario, |
||
| 17 | pf.dat_nascimento, |
||
| 18 | replace(replace(replace(replace(cast(age(pf.dat_nascimento) as varchar), 'year', 'ano'), 'mons', 'mêses'), 'mon', 'mês'), 'day', 'dia') |
||
| 19 | as idade, |
||
| 20 | (case when pf.tip_sexo = 'M' then 'MASCULINO' when pf.tip_sexo = 'F' then 'FEMININO' else null end) as tipo_sexo, |
||
| 21 | pf.tip_sanguineo, |
||
| 22 | ar.obj_arquivo, |
||
| 23 | (case when pf.tip_estado_civil = 'S' then 'SOLTEIRO' |
||
| 24 | when pf.tip_estado_civil = 'C' then 'CASADO' |
||
| 25 | when pf.tip_estado_civil = 'D' then 'DIVORCIADO' |
||
| 26 | when pf.tip_estado_civil = 'V' then 'VIÚVO' |
||
| 27 | when pf.tip_estado_civil = 'E' then 'SEPARADO' |
||
| 28 | when pf.tip_estado_civil = 'M' then 'COMPANHEIRO' |
||
| 29 | else null end) as estado_civil, |
||
| 30 | (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 ocupacoes |
||
| 31 | from sc_cln.cln_paciente pa |
||
| 32 | join sc_adm.adm_pessoa pe on (pe.seq_pessoa = pa.seq_pessoa_paciente) |
||
| 33 | join sc_adm.adm_pessoa_fisica pf on (pf.seq_pessoa = pe.seq_pessoa) |
||
| 34 | left join sc_adm.adm_arquivo ar on (ar.seq_arquivo = pe.seq_arquivo_foto) |
||
| 35 | where pa.seq_pessoa_paciente = $P{pSequencialPessoaPaciente}]]> |
||
| 36 | </queryString> |
||
| 37 | <field name="seq_pessoa" class="java.lang.Integer"/> |
||
| 38 | <field name="nom_pessoa" class="java.lang.String"/> |
||
| 39 | <field name="seq_arquivo_foto" class="java.lang.Integer"/> |
||
| 40 | <field name="seq_arquivo" class="java.lang.Integer"/> |
||
| 41 | <field name="dsc_extensao_arquivo" class="java.lang.String"/> |
||
| 42 | <field name="num_prontuario" class="java.lang.String"/> |
||
| 43 | <field name="dat_nascimento" class="java.sql.Date"/> |
||
| 44 | <field name="idade" class="java.lang.String"/> |
||
| 45 | <field name="tipo_sexo" class="java.lang.String"/> |
||
| 46 | <field name="tip_sanguineo" class="java.lang.String"/> |
||
| 47 | <field name="obj_arquivo" class="java.lang.Object"/> |
||
| 48 | <field name="estado_civil" class="java.lang.String"/> |
||
| 49 | <field name="ocupacoes" class="java.lang.String"/> |
||
| 50 | <background> |
||
| 51 | <band splitType="Stretch"/> |
||
| 52 | </background> |
||
| 53 | <columnHeader> |
||
| 54 | <band height="113"> |
||
| 55 | <image> |
||
| 56 | <reportElement uuid="b3e94d88-08ee-4d82-9fef-17de72e76936" x="0" y="0" width="118" height="113"/> |
||
| 57 | <imageExpression><![CDATA[new ByteArrayInputStream((byte[])$F{obj_arquivo})]]></imageExpression> |
||
| 58 | </image> |
||
| 59 | <textField> |
||
| 60 | <reportElement uuid="db59d64e-fc85-4b41-9d10-0363238c5d9c" x="131" y="0" width="411" height="26"/> |
||
| 61 | <textElement> |
||
| 62 | <font fontName="Arial" size="14" isBold="true" pdfFontName="Helvetica-Bold"/> |
||
| 63 | </textElement> |
||
| 64 | <textFieldExpression><![CDATA["PACIENTE: " + $F{nom_pessoa}]]></textFieldExpression> |
||
| 65 | </textField> |
||
| 66 | <textField> |
||
| 67 | <reportElement uuid="649bfcb2-a76e-4b62-8fb6-1f76b1485cc1" x="237" y="26" width="100" height="20"/> |
||
| 68 | <textElement> |
||
| 69 | <font fontName="Arial"/> |
||
| 70 | </textElement> |
||
| 71 | <textFieldExpression><![CDATA[$F{num_prontuario}]]></textFieldExpression> |
||
| 72 | </textField> |
||
| 73 | <staticText> |
||
| 74 | <reportElement uuid="e7993e68-a156-4dd8-92eb-f588de0f0dbc" x="131" y="26" width="106" height="20"/> |
||
| 75 | <textElement> |
||
| 76 | <font fontName="Arial"/> |
||
| 77 | </textElement> |
||
| 78 | <text><![CDATA[Nº DO PRONTUÁRIO:]]></text> |
||
| 79 | </staticText> |
||
| 80 | <textField pattern="dd/MM/yyyy" isBlankWhenNull="true"> |
||
| 81 | <reportElement uuid="f21463fd-9248-4e14-ba2b-6ed639bd1ccc" x="238" y="46" width="100" height="20"/> |
||
| 82 | <textElement> |
||
| 83 | <font fontName="Arial"/> |
||
| 84 | </textElement> |
||
| 85 | <textFieldExpression><![CDATA[$F{dat_nascimento}]]></textFieldExpression> |
||
| 86 | </textField> |
||
| 87 | <staticText> |
||
| 88 | <reportElement uuid="b10861d0-5d0f-48b0-95dd-a7e1824a2634" x="131" y="46" width="106" height="20"/> |
||
| 89 | <textElement> |
||
| 90 | <font fontName="Arial"/> |
||
| 91 | </textElement> |
||
| 92 | <text><![CDATA[DATA DE NASC.:]]></text> |
||
| 93 | </staticText> |
||
| 94 | <textField> |
||
| 95 | <reportElement uuid="237f53c7-e745-4e46-a487-682d00e305c7" x="437" y="46" width="118" height="20"/> |
||
| 96 | <textElement> |
||
| 97 | <font fontName="Arial"/> |
||
| 98 | </textElement> |
||
| 99 | <textFieldExpression><![CDATA[$F{idade}]]></textFieldExpression> |
||
| 100 | </textField> |
||
| 101 | <staticText> |
||
| 102 | <reportElement uuid="7e34aff2-f538-4654-b223-d0002759a150" x="358" y="46" width="79" height="20"/> |
||
| 103 | <textElement> |
||
| 104 | <font fontName="Arial"/> |
||
| 105 | </textElement> |
||
| 106 | <text><![CDATA[IDADE:]]></text> |
||
| 107 | </staticText> |
||
| 108 | <textField> |
||
| 109 | <reportElement uuid="950d267e-108b-4535-b636-d88f1e20f822" x="237" y="66" width="100" height="20"/> |
||
| 110 | <textElement> |
||
| 111 | <font fontName="Arial"/> |
||
| 112 | </textElement> |
||
| 113 | <textFieldExpression><![CDATA[$F{tipo_sexo}]]></textFieldExpression> |
||
| 114 | </textField> |
||
| 115 | <staticText> |
||
| 116 | <reportElement uuid="6127a3fc-2def-4747-97a8-b99c2644e0f2" x="131" y="66" width="106" height="20"/> |
||
| 117 | <textElement> |
||
| 118 | <font fontName="Arial"/> |
||
| 119 | </textElement> |
||
| 120 | <text><![CDATA[SEXO:]]></text> |
||
| 121 | </staticText> |
||
| 122 | <textField isBlankWhenNull="true"> |
||
| 123 | <reportElement uuid="511ccfc7-872b-4244-9bdf-ccd41ed8b2a3" x="437" y="66" width="118" height="20"/> |
||
| 124 | <textElement> |
||
| 125 | <font fontName="Arial"/> |
||
| 126 | </textElement> |
||
| 127 | <textFieldExpression><![CDATA[$F{estado_civil}]]></textFieldExpression> |
||
| 128 | </textField> |
||
| 129 | <staticText> |
||
| 130 | <reportElement uuid="e7993e68-a156-4dd8-92eb-f588de0f0dbc" x="358" y="66" width="79" height="20"/> |
||
| 131 | <textElement> |
||
| 132 | <font fontName="Arial"/> |
||
| 133 | </textElement> |
||
| 134 | <text><![CDATA[ESTADO CIVIL:]]></text> |
||
| 135 | </staticText> |
||
| 136 | <staticText> |
||
| 137 | <reportElement uuid="e7993e68-a156-4dd8-92eb-f588de0f0dbc" x="131" y="86" width="106" height="20"/> |
||
| 138 | <textElement> |
||
| 139 | <font fontName="Arial"/> |
||
| 140 | </textElement> |
||
| 141 | <text><![CDATA[OCUPAÇÕES:]]></text> |
||
| 142 | </staticText> |
||
| 143 | <textField isStretchWithOverflow="true" isBlankWhenNull="true"> |
||
| 144 | <reportElement uuid="691baf2e-6481-4306-a527-8dbe5b8a1cf6" x="238" y="86" width="317" height="20"/> |
||
| 145 | <textElement> |
||
| 146 | <font fontName="Arial"/> |
||
| 147 | </textElement> |
||
| 148 | <textFieldExpression><![CDATA[$F{ocupacoes}]]></textFieldExpression> |
||
| 149 | </textField> |
||
| 150 | </band> |
||
| 151 | </columnHeader> |
||
| 152 | </jasperReport> |