Subversion Repositories Integrator Subversion

Rev

Rev 182 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
179 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" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="85db9332-5d67-469c-bb57-e16884560a4d">
3
	<property name="ireport.zoom" value="1.6105100000000008"/>
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[""]]></defaultValueExpression>
8
	</parameter>
9
	<parameter name="pSequencialPessoaPaciente" class="java.lang.Long">
10
		<defaultValueExpression><![CDATA[]]></defaultValueExpression>
11
	</parameter>
12
	<parameter name="pSequencialAtendimento" class="java.lang.Long">
13
		<defaultValueExpression><![CDATA[]]></defaultValueExpression>
14
	</parameter>
15
	<queryString>
16
		<![CDATA[select * from
17
(select at.*,
18
CASE WHEN at.tip_atendimento = 'C' THEN 'CONSULTA' WHEN at.tip_atendimento = 'R' then 'RETORNO' ELSE NULL END AS TIPO_ATENDIMENTO,
19
pf.dsc_tratamento || ' ' || pe.nom_pessoa as profissional,
20
es.dsc_especialidade,
21
(select exists(select 1 from sc_cln.cln_atendimento_itemrespquest air where air.seq_atendimento = at.seq_atendimento)) as questionario,
22
(select exists(select 1 from sc_cln.cln_solicitacao_procedimento sp where sp.seq_atendimento = at.seq_atendimento)) as procedimento,
23
(select exists(select 1 from sc_cln.cln_atendimento_texto ap where ap.seq_atendimento = at.seq_atendimento)) as prescricao
24
from sc_cln.cln_atendimento at
25
join sc_adm.adm_pessoa pe on (at.seq_pessoa_profissional = pe.seq_pessoa)
26
join sc_adm.adm_pessoa_fisica pf on (pf.seq_pessoa = pe.seq_pessoa)
27
join sc_cln.cln_especialidade es on (es.seq_especialidade = at.seq_especialidade)
28
where at.seq_pessoa_paciente = $P{pSequencialPessoaPaciente} and (at.seq_atendimento = $P{pSequencialAtendimento} or $P{pSequencialAtendimento} is null)) tabela
29
where tabela.questionario = true or tabela.procedimento = true or tabela.prescricao = true]]>
30
	</queryString>
31
	<field name="seq_atendimento" class="java.lang.Integer"/>
32
	<field name="seq_agenda" class="java.lang.Integer"/>
33
	<field name="seq_pessoa_paciente" class="java.lang.Integer"/>
34
	<field name="seq_pessoa_profissional" class="java.lang.Integer"/>
35
	<field name="seq_especialidade" class="java.lang.Integer"/>
36
	<field name="tip_atendimento" class="java.lang.String"/>
37
	<field name="dth_inicio_atendimento" class="java.sql.Timestamp"/>
38
	<field name="dth_fim_atendimento" class="java.sql.Timestamp"/>
39
	<field name="seq_cliente" class="java.lang.Integer"/>
40
	<field name="tipo_atendimento" class="java.lang.String"/>
41
	<field name="profissional" class="java.lang.String"/>
42
	<field name="dsc_especialidade" class="java.lang.String"/>
43
	<field name="questionario" class="java.lang.Boolean"/>
44
	<field name="procedimento" class="java.lang.Boolean"/>
45
	<field name="prescricao" class="java.lang.Boolean"/>
46
	<background>
47
		<band splitType="Stretch"/>
48
	</background>
49
	<title>
50
		<band height="105" splitType="Stretch">
51
			<subreport>
52
				<reportElement positionType="Float" x="0" y="47" width="555" height="46" isPrintWhenDetailOverflows="true" uuid="34d3ac81-6c38-4c13-b4aa-bc0b54543612"/>
53
				<subreportParameter name="pSequencialPessoaPaciente">
54
					<subreportParameterExpression><![CDATA[$F{seq_pessoa_paciente}]]></subreportParameterExpression>
55
				</subreportParameter>
56
				<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
57
				<subreportExpression><![CDATA[$P{SUBREPORT_DIR} + "prontuario_paciente_subreport.jasper"]]></subreportExpression>
58
			</subreport>
59
			<subreport>
60
				<reportElement x="0" y="0" width="555" height="42" uuid="8622a802-2a3a-45be-b4b0-4b1cf2336d6b"/>
61
				<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
62
				<subreportExpression><![CDATA[$P{SUBREPORT_DIR} + "subrelatorio_cabecalho.jasper"]]></subreportExpression>
63
			</subreport>
64
		</band>
65
	</title>
66
	<detail>
67
		<band height="48" splitType="Stretch">
68
			<textField>
69
				<reportElement x="99" y="0" width="456" height="20" uuid="c61c438d-83c4-4e0f-81ed-1a3e8f11cfd3"/>
70
				<textElement verticalAlignment="Middle">
71
					<font fontName="Arial"/>
72
				</textElement>
73
				<textFieldExpression><![CDATA[$F{tipo_atendimento} + " - " + $F{profissional} + " - " + $F{dsc_especialidade}]]></textFieldExpression>
74
			</textField>
75
			<textField pattern="dd/MM/yyyy HH:mm" isBlankWhenNull="true">
76
				<reportElement mode="Opaque" x="0" y="0" width="88" height="20" forecolor="#FFFFFF" backcolor="#666666" uuid="a8c8dc25-a43e-463f-8505-ffb5e65c4eb9"/>
77
				<textElement textAlignment="Center" verticalAlignment="Middle">
78
					<font fontName="Arial" isBold="false"/>
79
				</textElement>
80
				<textFieldExpression><![CDATA[$F{dth_inicio_atendimento}]]></textFieldExpression>
81
			</textField>
82
			<line>
83
				<reportElement x="0" y="20" width="555" height="1" forecolor="#666666" uuid="a7a83cb2-419e-4adf-abbe-1f88513196a6"/>
84
				<graphicElement>
85
					<pen lineWidth="0.75"/>
86
				</graphicElement>
87
			</line>
88
			<subreport>
89
				<reportElement x="0" y="24" width="555" height="22" uuid="2170aa06-1442-4bb5-a1f5-3e0f43aca081"/>
90
				<subreportParameter name="pSequencialAtendimento">
91
					<subreportParameterExpression><![CDATA[$F{seq_atendimento}]]></subreportParameterExpression>
92
				</subreportParameter>
93
				<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
94
				<subreportExpression><![CDATA[$P{SUBREPORT_DIR} + "itens_prontuario_subreport.jasper"]]></subreportExpression>
95
			</subreport>
96
		</band>
97
	</detail>
98
	<pageFooter>
99
		<band height="57">
100
			<subreport>
101
				<reportElement x="0" y="0" width="555" height="35" uuid="70117411-be4b-4b41-86cf-e7957c2b3f1e"/>
102
				<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
103
				<subreportExpression><![CDATA[$P{SUBREPORT_DIR} + "subrelatorio_rodape.jasper"]]></subreportExpression>
104
			</subreport>
105
		</band>
106
	</pageFooter>
107
	<summary>
108
		<band splitType="Stretch"/>
109
	</summary>
110
</jasperReport>