Details | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 106 | 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="relatorio_agenda" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="c6447326-3eb7-45a9-af8e-852ae2ec5c1b"> |
||
| 3 | <property name="ireport.zoom" value="1.5"/> |
||
| 4 | <property name="ireport.x" value="0"/> |
||
| 5 | <property name="ireport.y" value="0"/> |
||
| 6 | <parameter name="SUBREPORT_DIR" class="java.lang.String" isForPrompting="false"> |
||
| 7 | <defaultValueExpression><![CDATA["/Users/periclesalmeida/Documents/workspaceEclipse/CLINICA_SVN/clinica/src/main/resources/relatorios/"]]></defaultValueExpression> |
||
| 8 | </parameter> |
||
| 9 | <parameter name="pSequencialProfissional" class="java.lang.Long"> |
||
| 10 | <defaultValueExpression><![CDATA[]]></defaultValueExpression> |
||
| 11 | </parameter> |
||
| 12 | <parameter name="pDataAgenda" class="java.util.Date"> |
||
| 13 | <defaultValueExpression><![CDATA[]]></defaultValueExpression> |
||
| 14 | </parameter> |
||
| 15 | <queryString> |
||
| 16 | <![CDATA[select row_number() OVER (ORDER BY a.num_horario_inicial) AS num_registro, |
||
| 17 | CASE a.tip_atendimento |
||
| 18 | WHEN 'C' THEN 'CONSULTA' |
||
| 19 | WHEN 'R' THEN 'RETORNO' |
||
| 20 | WHEN 'P' THEN 'PROCEDIMENTO' |
||
| 21 | END AS tip_atendimento, |
||
| 22 | TO_CHAR(CAST(a.num_horario_inicial AS TIME), 'HH24:mi' ) AS num_horario_inicial, |
||
| 23 | CASE a.tip_situacao |
||
| 24 | WHEN 'M' THEN 'MARCADO' |
||
| 25 | WHEN 'L' THEN 'LIVRE' |
||
| 26 | WHEN 'N' THEN 'EM ATENDIMENTO' |
||
| 27 | WHEN 'G' THEN 'AGUARDANDO' |
||
| 28 | WHEN 'C' THEN 'CONFIRMADO' |
||
| 29 | WHEN 'F' THEN 'FALTA' |
||
| 30 | WHEN 'A' THEN 'ATENDIDO' |
||
| 31 | END as tip_situacao, |
||
| 32 | a.dat_agenda, |
||
| 33 | TO_CHAR(a.dat_agenda, 'DD') AS num_dia, |
||
| 34 | TO_CHAR(a.dat_agenda, 'YYYY') AS num_ano, |
||
| 35 | CASE WHEN TO_CHAR(a.dat_agenda, 'D') = '1' THEN 'DOMINGO' |
||
| 36 | WHEN TO_CHAR(a.dat_agenda, 'D') = '2' THEN 'SEGUNDA' |
||
| 37 | WHEN TO_CHAR(a.dat_agenda, 'D') = '3' THEN 'TERCA' |
||
| 38 | WHEN TO_CHAR(a.dat_agenda, 'D') = '4' THEN 'QUARTA' |
||
| 39 | WHEN TO_CHAR(a.dat_agenda, 'D') = '5' THEN 'QUINTA' |
||
| 40 | WHEN TO_CHAR(a.dat_agenda, 'D') = '6' THEN 'SEXTA' |
||
| 41 | WHEN TO_CHAR(a.dat_agenda, 'D') = '7' THEN 'SABADO' |
||
| 42 | END as nom_dia_semana, |
||
| 43 | |||
| 44 | CASE DATE_PART('MONTH', a.dat_agenda) |
||
| 45 | WHEN 1 THEN 'JANEIRO' |
||
| 46 | WHEN 2 THEN 'FEVEREIRO' |
||
| 47 | WHEN 3 THEN 'MARÇO' |
||
| 48 | WHEN 4 THEN 'ABRIL' |
||
| 49 | WHEN 5 THEN 'MAIO' |
||
| 50 | WHEN 6 THEN 'JUNHO' |
||
| 51 | WHEN 7 THEN 'JULHO' |
||
| 52 | WHEN 8 THEN 'AGOSTO' |
||
| 53 | WHEN 9 THEN 'SETEMBRO' |
||
| 54 | WHEN 10 THEN 'OUTUBRO' |
||
| 55 | WHEN 11 THEN 'NOVEMBRO' |
||
| 56 | WHEN 12 THEN 'DEZEMBRO' |
||
| 57 | END as nom_mes, |
||
| 58 | i.dsc_tratamento || s.nom_pessoa AS nom_profissional, |
||
| 59 | CASE WHEN e.nom_pessoa IS NULL THEN a.dsc_pessoa_paciente ELSE e.nom_pessoa END as nom_paciente |
||
| 60 | from sc_cln.cln_agenda a |
||
| 61 | left join sc_cln.cln_paciente p on (a.seq_pessoa_paciente = p.seq_pessoa_paciente) |
||
| 62 | left join sc_adm.adm_pessoa e on (p.seq_pessoa_paciente = e.seq_pessoa) |
||
| 63 | join sc_cln.cln_profissional r on (a.seq_pessoa_profissional = r.seq_pessoa_profissional) |
||
| 64 | join sc_adm.adm_pessoa s on (a.seq_pessoa_profissional = s.seq_pessoa) |
||
| 65 | join sc_adm.adm_pessoa_fisica i on (s.seq_pessoa = i.seq_pessoa) |
||
| 66 | WHERE r.seq_pessoa_profissional =$P{pSequencialProfissional} |
||
| 67 | AND a.dat_agenda =$P{pDataAgenda} |
||
| 68 | ORDER BY a.num_horario_inicial]]> |
||
| 69 | </queryString> |
||
| 70 | <field name="num_registro" class="java.lang.Long"/> |
||
| 71 | <field name="tip_atendimento" class="java.lang.String"/> |
||
| 72 | <field name="num_horario_inicial" class="java.lang.String"/> |
||
| 73 | <field name="tip_situacao" class="java.lang.String"> |
||
| 74 | <fieldDescription><![CDATA[Valores possiveis: P - Pendente de Confirmacao, C - Confirmado, N - Canceado e R - Realizado.]]></fieldDescription> |
||
| 75 | </field> |
||
| 76 | <field name="dat_agenda" class="java.sql.Date"/> |
||
| 77 | <field name="num_dia" class="java.lang.String"/> |
||
| 78 | <field name="num_ano" class="java.lang.String"/> |
||
| 79 | <field name="nom_dia_semana" class="java.lang.String"/> |
||
| 80 | <field name="nom_mes" class="java.lang.String"/> |
||
| 81 | <field name="nom_profissional" class="java.lang.String"/> |
||
| 82 | <field name="nom_paciente" class="java.lang.String"/> |
||
| 83 | <background> |
||
| 84 | <band splitType="Stretch"/> |
||
| 85 | </background> |
||
| 86 | <title> |
||
| 87 | <band height="75" splitType="Stretch"> |
||
| 88 | <subreport> |
||
| 89 | <reportElement uuid="b6db748c-379b-4157-8672-20b46c75530e" x="0" y="0" width="555" height="45"/> |
||
| 90 | <connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression> |
||
| 91 | <subreportExpression><![CDATA[$P{SUBREPORT_DIR} + "subrelatorio_cabecalho.jasper"]]></subreportExpression> |
||
| 92 | </subreport> |
||
| 93 | <staticText> |
||
| 94 | <reportElement uuid="ec887a4d-29f4-4d9c-85b3-39483a26ebb3" x="-1" y="45" width="555" height="30"/> |
||
| 95 | <textElement textAlignment="Center" verticalAlignment="Middle"> |
||
| 96 | <font fontName="Arial" size="10" isBold="true" pdfFontName="Helvetica-Bold"/> |
||
| 97 | </textElement> |
||
| 98 | <text><![CDATA[AGENDA]]></text> |
||
| 99 | </staticText> |
||
| 100 | </band> |
||
| 101 | </title> |
||
| 102 | <pageHeader> |
||
| 103 | <band height="62" splitType="Stretch"> |
||
| 104 | <textField> |
||
| 105 | <reportElement uuid="2fd1a221-794b-4234-aac8-b730d81b2e7b" x="-1" y="30" width="320" height="20"/> |
||
| 106 | <textElement verticalAlignment="Middle"> |
||
| 107 | <font fontName="Arial" size="12" isBold="true"/> |
||
| 108 | </textElement> |
||
| 109 | <textFieldExpression><![CDATA[$F{nom_dia_semana} + ", " + $F{num_dia} + " DE " + $F{nom_mes} + " DE " + $F{num_ano}]]></textFieldExpression> |
||
| 110 | </textField> |
||
| 111 | <textField> |
||
| 112 | <reportElement uuid="2b4e8875-32c1-46b3-9d9d-75da5cf539d2" x="319" y="30" width="236" height="20"/> |
||
| 113 | <textElement textAlignment="Right"> |
||
| 114 | <font fontName="Arial" size="12" isBold="true"/> |
||
| 115 | </textElement> |
||
| 116 | <textFieldExpression><![CDATA[$F{nom_profissional}]]></textFieldExpression> |
||
| 117 | </textField> |
||
| 118 | </band> |
||
| 119 | </pageHeader> |
||
| 120 | <columnHeader> |
||
| 121 | <band height="20" splitType="Stretch"> |
||
| 122 | <rectangle> |
||
| 123 | <reportElement uuid="eabe0b10-cbe6-48c3-9f2c-8cb3e250585d" x="0" y="0" width="555" height="20" backcolor="#CCCCCC"/> |
||
| 124 | </rectangle> |
||
| 125 | <staticText> |
||
| 126 | <reportElement uuid="8cb4c6d2-d253-42d4-9839-59e04e746346" x="95" y="0" width="113" height="20"/> |
||
| 127 | <textElement textAlignment="Center" verticalAlignment="Middle"> |
||
| 128 | <font fontName="Arial"/> |
||
| 129 | </textElement> |
||
| 130 | <text><![CDATA[TIPO]]></text> |
||
| 131 | </staticText> |
||
| 132 | <staticText> |
||
| 133 | <reportElement uuid="6423b892-6a8f-4bac-9f06-2dc94d036b43" x="38" y="0" width="57" height="20"/> |
||
| 134 | <textElement textAlignment="Center" verticalAlignment="Middle"> |
||
| 135 | <font fontName="Arial"/> |
||
| 136 | </textElement> |
||
| 137 | <text><![CDATA[HORA]]></text> |
||
| 138 | </staticText> |
||
| 139 | <staticText> |
||
| 140 | <reportElement uuid="a2e0bb46-bcdc-4b8f-8829-de3e5b99b8c0" x="429" y="0" width="125" height="20"/> |
||
| 141 | <textElement textAlignment="Center" verticalAlignment="Middle"> |
||
| 142 | <font fontName="Arial"/> |
||
| 143 | </textElement> |
||
| 144 | <text><![CDATA[SITUAÇÃO]]></text> |
||
| 145 | </staticText> |
||
| 146 | <staticText> |
||
| 147 | <reportElement uuid="f802cf2d-9be6-4bd5-9e69-130733efb241" x="208" y="0" width="256" height="20"/> |
||
| 148 | <textElement textAlignment="Center" verticalAlignment="Middle"> |
||
| 149 | <font fontName="Arial"/> |
||
| 150 | </textElement> |
||
| 151 | <text><![CDATA[PACIENTE]]></text> |
||
| 152 | </staticText> |
||
| 153 | <staticText> |
||
| 154 | <reportElement uuid="8deb6a6f-ee64-4038-8c6a-4777917700d9" x="0" y="0" width="38" height="20"/> |
||
| 155 | <textElement textAlignment="Center" verticalAlignment="Middle"> |
||
| 156 | <font fontName="Arial"/> |
||
| 157 | </textElement> |
||
| 158 | <text><![CDATA[#]]></text> |
||
| 159 | </staticText> |
||
| 160 | </band> |
||
| 161 | </columnHeader> |
||
| 162 | <detail> |
||
| 163 | <band height="20" splitType="Stretch"> |
||
| 164 | <rectangle> |
||
| 165 | <reportElement uuid="eabe0b10-cbe6-48c3-9f2c-8cb3e250585d" x="0" y="0" width="555" height="20"/> |
||
| 166 | </rectangle> |
||
| 167 | <textField isBlankWhenNull="true"> |
||
| 168 | <reportElement uuid="5678060b-4854-40c5-a5c4-22f0900964c3" x="95" y="0" width="113" height="20"/> |
||
| 169 | <textElement textAlignment="Center" verticalAlignment="Middle"> |
||
| 170 | <font fontName="Arial"/> |
||
| 171 | </textElement> |
||
| 172 | <textFieldExpression><![CDATA[$F{tip_atendimento}]]></textFieldExpression> |
||
| 173 | </textField> |
||
| 174 | <textField> |
||
| 175 | <reportElement uuid="b1f1a551-0388-48a6-8a71-c0fa04c67ec9" x="38" y="0" width="57" height="20"/> |
||
| 176 | <textElement textAlignment="Center" verticalAlignment="Middle"> |
||
| 177 | <font fontName="Arial"/> |
||
| 178 | </textElement> |
||
| 179 | <textFieldExpression><![CDATA[$F{num_horario_inicial}]]></textFieldExpression> |
||
| 180 | </textField> |
||
| 181 | <textField> |
||
| 182 | <reportElement uuid="7d3bacb3-4009-40ef-9709-05e10c43ec3e" x="429" y="0" width="125" height="20"/> |
||
| 183 | <textElement textAlignment="Center" verticalAlignment="Middle"> |
||
| 184 | <font fontName="Arial"/> |
||
| 185 | </textElement> |
||
| 186 | <textFieldExpression><![CDATA[$F{tip_situacao}]]></textFieldExpression> |
||
| 187 | </textField> |
||
| 188 | <textField isBlankWhenNull="true"> |
||
| 189 | <reportElement uuid="ae4ed9f9-c578-4caf-9645-ca28ea392eeb" x="208" y="0" width="246" height="20"/> |
||
| 190 | <textElement textAlignment="Center" verticalAlignment="Middle"> |
||
| 191 | <font fontName="Arial"/> |
||
| 192 | </textElement> |
||
| 193 | <textFieldExpression><![CDATA[$F{nom_paciente}]]></textFieldExpression> |
||
| 194 | </textField> |
||
| 195 | <textField> |
||
| 196 | <reportElement uuid="3c7afd66-2a84-42c9-9e07-7038b405835f" x="0" y="0" width="38" height="20"/> |
||
| 197 | <textElement textAlignment="Center" verticalAlignment="Middle"> |
||
| 198 | <font fontName="Arial"/> |
||
| 199 | </textElement> |
||
| 200 | <textFieldExpression><![CDATA[$F{num_registro}]]></textFieldExpression> |
||
| 201 | </textField> |
||
| 202 | </band> |
||
| 203 | </detail> |
||
| 204 | <pageFooter> |
||
| 205 | <band height="49" splitType="Stretch"> |
||
| 206 | <subreport> |
||
| 207 | <reportElement uuid="ae8d065c-9cac-41c0-b26e-489b91e02902" x="0" y="0" width="555" height="35"/> |
||
| 208 | <connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression> |
||
| 209 | <subreportExpression><![CDATA[$P{SUBREPORT_DIR} + "subrelatorio_rodape.jasper"]]></subreportExpression> |
||
| 210 | </subreport> |
||
| 211 | </band> |
||
| 212 | </pageFooter> |
||
| 213 | </jasperReport> |