quadroRiassuntivoIntervento.jsp 5.96 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164
<%@ include file="/project/include.jsp" %>

<%@ page import = "java.util.Calendar" %>
<%@ page import = "java.util.Date" %>
<%@ page import = "java.util.List" %>
<%@ page import = "it.cedaf.commons.DateLib" %>
<%@ page import = "it.cedaf.commons.StringLib" %>
<%@ page import = "it.cedaf.juice.mvc.view.customtags.misc.UrlFunctions" %>
<%@ page import = "it.cedaf.icare.quadririassuntivi.view.dto.QuadroRiassuntivoJspSupport" %>
<%@ page import = "it.cedaf.icare.business.managers.quadririassuntivi.Info" %>
<%@ page import = "it.cedaf.icare.quadririassuntivi.view.dto.InterventoItem" %>
<%@ page import = "it.cedaf.icare.business.managers.quadririassuntivi.InterventoInfo" %>


<% 
InterventoItem item = (InterventoItem) request.getAttribute("currentItem"); 
InterventoInfo interventoInfo = item.getInterventoInfo(); 
Info info = QuadroRiassuntivoJspSupport.getInfo(item);
String responsabile = getStringValue(info.getOperatoreResponsabile());
String emailAddress = info.getMailOperatoreResponsabile();
if (!StringLib.isNullOrEmptyString(emailAddress)) {
	responsabile = "<a href='mailto:" + emailAddress + "'>" + responsabile + "</a>";
}

Date itemFrom = item.getFrom();
Date itemTo = item.getTo();
String itemFrom_str = DateLib.format(itemFrom);
String itemTo_str = "&nbsp;";
if (itemTo != null && item.getRange() && item.getCompleted()) {
	itemTo_str = DateLib.format(itemTo);
}
%>


<td width="100%">
	<table border="0" cellspacing="0" cellpadding="3" width="100%">
		<tr>
			<td width="50%">
				<table>
					<tr>
						<td class="gantt-detail-label"><shell:label prop="dataInizio" /></td>
						<td class="gantt-detail-value"><%=itemFrom_str%></td>	
					</tr>
					<tr>
						<td class="gantt-detail-label"><shell:label prop="tipoIntervento" /></td>
						<td class="gantt-detail-value"><%=getStringValue(interventoInfo.getTipo())%></td>	
					</tr>
					<tr>
						<td class="gantt-detail-label"><shell:label prop="operatoreResponsabile" /></td>
						<td class="gantt-detail-value"><%=responsabile%></td>	
					</tr>
					<tr>
						<td class="gantt-detail-label"><shell:label prop="stato" /></td>
						<td class="gantt-detail-value"><%=getStringValue(interventoInfo.getStato())%></td>	
					</tr>
					<tr>
						<td class="gantt-detail-label"><shell:label prop="motivoErogazione" /></td>
						<td class="gantt-detail-value"><%=getStringValue(interventoInfo.getMotivoErogazione())%></td>	
					</tr>								
				</table>
			</td>
			<td width="50%">
				<table>
					<tr>
						<td class="gantt-detail-label"><shell:label prop="dataFine" /></td>
						<td class="gantt-detail-value"><%=itemTo_str%></td>	
					</tr>
					<tr>
						<td class="gantt-detail-label"><shell:label prop="livelloAssistenza" /></td>
						<td class="gantt-detail-value"><%=getStringValue(interventoInfo.getLivelloAssistenza())%></td>
					</tr>
					<tr>
						<td class="gantt-detail-label"><shell:label prop="erogato" /></td>
						<td class="gantt-detail-value"><%=getStringValue(interventoInfo.getErogato())%></td>
					</tr>
					<tr>
						<td class="gantt-detail-label"><shell:label prop="enteErogatore" /></td>
						<td class="gantt-detail-value"><%=getStringValue(interventoInfo.getEnteErogatore())%></td>	
					</tr>
					<tr>
						<td class="gantt-detail-label"><shell:label prop="motivoTermine" /></td>
						<td class="gantt-detail-value"><%=getStringValue(interventoInfo.getMotivoTermine())%></td>	
					</tr>
				</table>
			</td>	
		</tr>
		<tr id="tr_accomp_<%=interventoInfo.getIdIntervento()%>" style="display:none">			
			<td colspan="2">
				<table border="0" cellspacing="3" cellpadding="0" width="100%">
					<tr>
						<td class="gantt-detail-label" style="white-space:nowrap"><span>Accompagnamento</span></td>
						<td class="gantt-detail-value" style="width:90%">
							<div id="div_accomp_<%=interventoInfo.getIdIntervento()%>" style="display:none">
							<shell:fieldset title="Accompagnamento">
							</shell:fieldset>
							</div>
							<script type="text/javascript">getInfoAccompagamento(<%=interventoInfo.getIdIntervento()%>);</script>
						</td>
					</tr>
				</table>
			</td>
		</tr>			
		<%
		if (interventoInfo.getDataInizioContrattoMMG() != null){
		%>
		<tr>
			<td colspan="2">
				<shell:fieldset title="Contratto MMG">
				<table border="0" cellspacing="3" cellpadding="0" width="100%">
					<td width="50%" valign="top">
						<table>
							<tr>
								<td class="gantt-detail-label"><shell:label prop="nominativoMedicoContrattoMMG" /></td>
								<td class="gantt-detail-value"><%=getStringValue(interventoInfo.getNominativoMedicoContrattoMMG())%></td>	
							</tr>
							<tr>
								<td class="gantt-detail-label"><shell:label prop="frequenzaContrattoMMG" /></td>
								<td class="gantt-detail-value"><%=getStringValue(interventoInfo.getFrequenzaContrattoMMG())%></td>	
							</tr>
							<tr>
								<td class="gantt-detail-label"><shell:label prop="numeroAccessiMMG" /></td>
								<td class="gantt-detail-value"><%=getStringValue(interventoInfo.getNumeroAccessiContrattoMMG() != null ? interventoInfo.getNumeroAccessiContrattoMMG().toString() : null)%></td>	
							</tr>
						</table>
					</td>
					<td width="50%" valign="top">
						<table>
							<tr>
								<td class="gantt-detail-label"><shell:label prop="dataInizioContrattoMMG" /></td>
								<td class="gantt-detail-value"><%=getStringValue(DateLib.format(interventoInfo.getDataInizioContrattoMMG()))%></td>
							</tr>
							<tr>
								<td class="gantt-detail-label"><shell:label prop="dataFineContrattoMMG" /></td>
								<td class="gantt-detail-value"><%=(interventoInfo.getDataFineContrattoMMG() != null) ? getStringValue(DateLib.format(interventoInfo.getDataFineContrattoMMG())) : ""%></td>
							</tr>
						</table>
					</td>
				</table>
				</shell:fieldset>
			</td>
		</tr>
		<%
		}
		%>

	</table>
</td>
<%! 

	// 
	public String getStringValue(String value) {
		return value != null ? value : StringLib.EMPTY_STRING;
	}
	
	// 
	public String getStringValue(Boolean value) {
		if (Boolean.TRUE.equals(value)) {
			return "S";
		} else {
			return "No";
		}
	}

%>