patologiaDetailTile.jsp 1.43 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
<%@ include file="/project/include.jsp" %>
<tr>
	<td class="form-label">
		<shell:label prop="icd9" />
	</td>
	<td class="form-values">
		<bui:out modes="view">
			<j:tile name="shell.plaintext" prop="icd9" />
		</bui:out>
		<bui:out modes="create, update">
			<j:bind prop="icd9">
				<j:text id="codice_prICD9" class="form-short-text" onBlur="javascript:onChangeIcd9(this, 'icd9');" /> 
				<shell:lookup lookupId="prICD9" identifier="tabelle.tabella" 
					init="it.cedaf.icare.tabelle.control.initializer.ICD9LookupInitializer" 
					formParams="codice_prICD9|codice" />
				<j:tile slave="${_slave}" name="shell.plaintext" prop="icd9" />
				<input type="hidden" id="descrizione_prICD9"/>
				<shell:error />
			</j:bind>
		</bui:out>
	</td>						
</tr>

<script type="text/javascript">
function onChangeIcd9(txtIcd9, idTag) {
	var codIcd9 = txtIcd9.value;
	var textValue = '';
	if (codIcd9 != '') {
		textValue = jsLoadString('it.cedaf.icare.tabelle.commons.findPatologiaExecutor',  '&codPatologia=' + codIcd9);
	}
	scriviDescrizioneIcd9(idTag, textValue);
}

function scriviDescrizioneIcd9(idTag, descrizione) {
	var elSpan = document.getElementById('cpmt_' + idTag); 
	if (elSpan) {
		elSpan.innerHTML = descrizione;
	}
}

registerOnChangeLookup('prICD9', function() { scriviDescrizioneIcd9('icd9', document.getElementById('descrizione_prICD9').value); });
registerOnClearLookup('prICD9', function() { scriviDescrizioneIcd9('icd9', ''); });

</script>