← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 5948: (patient) Add suggestion-values for Beneficiary Query Builder (finished)

 

------------------------------------------------------------
revno: 5948
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2012-02-14 10:37:23 +0700
message:
  (patient) Add suggestion-values for Beneficiary Query Builder (finished)
modified:
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/caseagg.js
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addCaseAggregation.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/caseaggregation.js
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/responseAggDataElement.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateCaseAggregation.vm


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/caseagg.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/caseagg.js	2012-02-14 03:26:52 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/caseagg.js	2012-02-14 03:37:23 +0000
@@ -144,7 +144,3 @@
 	showById('caseAggregationForm');
 }
 
-function addDESuggestedValues()
-{
-	
-}

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addCaseAggregation.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addCaseAggregation.vm	2012-02-11 13:58:02 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addCaseAggregation.vm	2012-02-14 03:37:23 +0000
@@ -58,146 +58,180 @@
         <td colspan="2"><p></p></td>
     </tr>
 	
+	<tr>
+		<th colspan="4">$i18n.getString( "condition_detail" )</th>
+	</tr>
+	
     </tbody>
 </table>
 
+<div id="tabs" width="20em">
+	<ul>
+		<li><a href="#tab-1">$i18n.getString("dataelement")</a></li>
+		<li><a href="#tab-2">$i18n.getString("case_attributes")</a></li>
+		<li><a href="#tab-3">$i18n.getString("program")</a></li>
+	</ul>	
+	
+	<div id="tab-1">
+		<table>
+			<tr>
+				<td>
+				<fieldset style="border: 1px solid #3f5d8e; ">
+				<legend>$i18n.getString( "data_element" )</legend>
+				<table>
+					<tr>
+						<td>
+							<label for="program">$i18n.getString( "program_properties" )</label>
+						</td>
+					</tr>
+					<tr>
+						<td>
+							<select id="program" name="program" style="width:20em" onChange="getProgramStages();">
+								<option value="0">[$i18n.getString('please_select')]</option>
+								#foreach( $program in $programs )
+									<option value="$program.id" title='$program.name'>$encoder.htmlEncode( $program.name )</option>
+								#end
+							</select>
+						</td>
+					</tr>
+					
+					<tr>
+						<td>
+							<label for="programStage">$i18n.getString( "program_stage" )</label>
+						</td>
+					</tr>
+					<tr>
+						<td>
+							<select id="programStage" name="programStage" style="width:20em" onchange="getPrgramStageDataElements();" ondblclick="insertProgramStage(this);">
+							</select>
+						</td>
+					</tr>
+					<tr>
+						<td>
+							<label for="dataelement">$i18n.getString( "dataelement" )</label>
+						</td>
+					</tr>
+					<tr>
+						<td>
+							<input type='text' style="min-width:19.8em" onkeyup="filterDE(event, this.value, 'programstageDE');"/>
+						</td>
+					</tr>
+					<tr>
+						<td>
+							<select id="programstageDE" name="programstageDE" size="5" style="width:20em; height: 6em" ondblclick="insertInfo(this);" onclick="getSuggestedValues(this.id, 'suggestedDEValues' )">
+							</select>
+						</td>
+					</tr>
+				</table>
+				</fieldset>
+			</td>
+			<td>
+				<fieldset style="border: 1px solid #3f5d8e; ">
+				<legend>$i18n.getString( "suggested_values" )</legend>
+				<select multiple size="10" id='suggestedDEValues' style="width:20em; height: 17em" ondblclick="insertInfo(this);" >
+				</select>
+			</td>
+		</tr>
+		</table>
+	</div>
+	
+	<div id="tab-2">
+		<table>
+			<tr>
+				<td>
+					<fieldset style="border: 1px solid #3f5d8e; ">
+					<legend>$i18n.getString( "attribute" )</legend>
+				
+					<table>
+						<tr>
+							<td>
+								<select id="caseProperty" name="caseProperty" size="8" ondblclick="insertInfo(this);" style="width:18em; height:16.5em" onclick="getSuggestedValues(this.id, 'caSuggestedValues' )">
+									<option value="[PT:count]" suggestedValues=''>$i18n.getString( "patients_registered" )</option>
+									<option value="[CP:gender]" suggestedValues='F, M' title='$i18n.getString( "gender" )'>$i18n.getString( "gender" )</option>
+									<option value="[CP:dobType]" suggestedValues='V, D, A' title='$i18n.getString( "dob_type" )'>$i18n.getString( "dob_type" )</option>
+									<option value="[CP:age]" title='$i18n.getString( "age_month" )'>$i18n.getString( "age_month" )</option>
+									
+									#foreach( $patientAttribute in $patientAttributes )
+									<option value="[CA:$patientAttribute.id]" suggestedValues='$patientAttribute.attributeOptions' title='$patientAttribute.name'>$encoder.htmlEncode( $patientAttribute.name )</option>
+									#end
+								</select>
+							</td>
+						</tr>
+					</table>
+					</fieldset>
+				</td>
+				</td>
+				<td>
+					<fieldset style="border: 1px solid #3f5d8e; ">
+						<legend>$i18n.getString( "suggested_values" )</legend>
+						<select multiple size="10" id='caSuggestedValues' style="width:20em; height: 17em" ondblclick="insertInfo(this);">
+						</select>
+					</fieldset>
+				</td>
+				
+			</tr>
+		</table>
+	</div>
+	
+	<div id="tab-3">
+		<table>
+			<tr>
+				<td>
+					<fieldset style="border: 1px solid #3f5d8e; ">
+					<legend>$i18n.getString( "program_properties" )</legend>
+					<table>
+						<tr>
+							<td>
+								<select id="programProperty" name="programProperty" size="4" ondblclick="insertInfo(this);" style="width:18em; height:16.5em" >
+									#foreach( $program in $programs )
+										<option value="[PG:$program.id]" title='$program.name'>$i18n.getString('program'): $encoder.htmlEncode( $program.name )</option>
+									#end
+									<option value="[PP:enrollmentdate - dateofincident]">$i18n.getString( "enrolldate_minus_incidentdate" )</option>
+									<option value="[PP:enrollmentdate]">$i18n.getString( "date_of_enrollment" )</option>
+									<option value="[PP:incidentdate]">$i18n.getString( "date_of_incident" )</option>
+								</select>
+							</td>
+						</tr>
+					</table>
+					</fieldset>
+				</td>
+				<td>
+					<fieldset style="border: 1px solid #3f5d8e; ">
+					<legend>$i18n.getString( "program" )</legend>
+					<table>
+						<tr>
+							<td>
+								<select id="programFormula" name="programFormula" style="width:20em" onChange="getProgramStagesForFormula();">
+									<option value="0">[$i18n.getString('please_select')]</option>
+									#foreach( $program in $programs )
+										<option value="$program.id" title='$program.name'>$encoder.htmlEncode( $program.name )</option>
+									#end
+								</select>
+							</td>
+						</tr>
+						<tr>
+							<td>
+								<label for="programStageFormula">$i18n.getString( "program_stage" )</label>
+							</td>
+						</tr>
+						<tr>
+							<td>
+								<select multiple id="programStageFormula" name="programStageFormula" style="width:20em; height:12.5em" ondblclick="insertInfo(this);">
+								</select>
+							</td>
+						</tr>
+					</table>
+					</fieldset>
+				</td>
+			</tr>
+		</table>
+	</div>
+	
+</div>
+
+<p></p>
+
 <table>
-	<thead>
-		<tr>
-			<th colspan="4">$i18n.getString( "condition_detail" )</th>
-		</tr>
-	</thead>
-	
-	<tbody>
-	
-	<tr>
-		<td>
-		<fieldset style="border: 1px solid #3f5d8e; ">
-		<legend>$i18n.getString( "dataelement" )</legend>
-		
-		<table>
-		
-			<tr>
-				<td>
-					<label for="program">$i18n.getString( "program" )</label>
-				</td>
-			</tr>
-			<tr>
-				<td>
-					<select id="program" name="program" style="width:20em" onChange="getProgramStages();">
-						<option value="0">[$i18n.getString('please_select')]</option>
-						#foreach( $program in $programs )
-							<option value="$program.id" title='$program.name'>$encoder.htmlEncode( $program.name )</option>
-						#end
-					</select>
-				</td>
-			</tr>
-			
-			<tr>
-				<td>
-					<label for="programStage">$i18n.getString( "program_stage" )</label>
-				</td>
-			</tr>
-			<tr>
-				<td>
-					<select id="programStage" name="programStage" style="width:20em" onClick="getPrgramStageDataElements();" ondblclick="insertProgramStage(this);">
-					</select>
-				</td>
-			</tr>
-			<tr>
-				<td>
-					<label for="dataelement">$i18n.getString( "dataelement" )</label>
-				</td>
-			</tr>
-			<tr>
-				<td>
-					<input type='text' style="min-width:19.8em" onkeyup="filterDE(event, this.value, 'programstageDE');"/>
-				</td>
-			</tr>
-			<tr>
-				<td>
-					<select id="programstageDE" name="programstageDE" size="5" style="width:20em; height: 6em" ondblclick="insertInfo(this);">
-					</select>
-				</td>
-			</tr>
-		</table>
-		</fieldset>
-		
-		</td>
-		
-		<td>
-		<fieldset style="border: 1px solid #3f5d8e; ">
-		<legend>$i18n.getString( "case_attributes" )</legend>
-		
-		<table>
-		
-			<tr>
-				<td>
-					<select id="caseProperty" name="caseProperty" size="8" ondblclick="insertInfo(this);" style="width:18em; height:16.5em" >
-						<option value="[PT:count]">$i18n.getString( "patients_registered" )</option>
-						<option value="[CP:gender]">$i18n.getString( "gender" )</option>
-						<option value="[CP:dobType]">$i18n.getString( "dob_type" )</option>
-						<option value="[CP:age]">$i18n.getString( "age_month" )</option>
-						
-						#foreach( $patientAttribute in $patientAttributes )
-						<option value="[CA:$patientAttribute.id]">$encoder.htmlEncode( $patientAttribute.name )</option>
-						#end
-					</select>
-				</td>
-			</tr>
-		</table>
-		</td>
-		
-		<td>
-		<fieldset style="border: 1px solid #3f5d8e; ">
-		<legend>$i18n.getString( "program_properties" )</legend>
-		
-		<table>
-			<tr>
-				<td>
-					<select id="caseProperty" name="caseProperty" size="4" ondblclick="insertInfo(this);" style="width:18em; height:16.5em" >
-						#foreach( $program in $programs )
-							<option value="[PG:$program.id]">$i18n.getString('program'): $encoder.htmlEncode( $program.name )</option>
-						#end
-						<option value="[PP:enrollmentdate - dateofincident]">$i18n.getString( "enrolldate_minus_incidentdate" )</option>
-						<option value="[PP:enrollmentdate]">$i18n.getString( "date_of_enrollment" )</option>
-						<option value="[PP:incidentdate]">$i18n.getString( "date_of_incident" )</option>
-					</select>
-				</td>
-			</tr>
-		</table>
-		</td>
-		
-		<td>
-		<fieldset style="border: 1px solid #3f5d8e; ">
-		<legend>$i18n.getString( "program_stage" )</legend>
-		<table>
-			<tr>
-				<td>
-					<select id="programFormula" name="programFormula" style="width:20em" onChange="getProgramStagesForFormula();">
-						<option value="0">[$i18n.getString('please_select')]</option>
-						#foreach( $program in $programs )
-							<option value="$program.id" title='$program.name'>$encoder.htmlEncode( $program.name )</option>
-						#end
-					</select>
-				</td>
-			</tr>
-			
-			<tr>
-				<td>
-					<label for="programStageFormula">$i18n.getString( "program_stage" )</label>
-				</td>
-			</tr>
-			<tr>
-				<td>
-					<select multiple id="programStageFormula" name="programStageFormula" style="width:20em; height:12.5em" ondblclick="insertInfo(this);">
-					</select>
-				</td>
-			</tr>
-		</table>
-		</td>
-		
-	</tr>	
 	<tr>
 		<td colspan='4'>
 			<img src="../images/less.png" alt="$i18n.getString( 'less' )" onclick='insertOperator( "<" );' style="cursor:pointer;">
@@ -223,8 +257,7 @@
 			<img src="../images/clear.png" align="right" alt="$i18n.getString( 'clear' )" onclick="byId('aggregationCondition').value='';" style="cursor:pointer;"/>
 		</td>
 	</tr>
-    </tbody>
-	
+		
 	<tr>
 		<td colspan='4'>
 			<fieldset style="border: 1px solid #3f5d8e;">
@@ -259,4 +292,5 @@
 	getProgramStages();
 	var i18n_run_success = '$encoder.jsEscape( $i18n.getString( "run_success" ) , "'" )';
 	var i18n_run_fail = '$encoder.jsEscape( $i18n.getString( "run_fail" ) , "'" )';
+	jQuery("#tabs").tabs();
 </script>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/caseaggregation.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/caseaggregation.js	2012-02-08 12:47:59 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/caseaggregation.js	2012-02-14 03:37:23 +0000
@@ -134,21 +134,16 @@
 
 function getPrgramStageDataElementsCompleted( dataelementElement )
 {
-	var programstageDE = byId('programstageDE');
+	var programstageDE = jQuery('#programstageDE');
 	var psDataElements = $(dataelementElement).find( 'dataelement' );
 
 	$( psDataElements ).each( function( i, item )
 	{
 		var id = $(item).find("id").text();
 		var name = $(item).find("name").text();
-		var type =$(item).find("type").text();
-
-		var option = document.createElement("option");
-		option.value = id;
-		option.text = name;
-		option.title = name;
-		jQuery(option).attr({data:"{type:'"+type+"'}"});
-		programstageDE.add(option, null);       	
+		var optionset =$(item).find("optionset").text();
+		
+		programstageDE.append( "<option value='" + id + "' title='" + name + "' suggestedValues='" + optionset + "'>" + name + "</option>" );
 	} );	    
 }
 
@@ -232,4 +227,27 @@
 				showSuccessMessage( i18n_run_success );
 			}
 		});
-}
\ No newline at end of file
+}
+
+function getSuggestedValues( sourceId, targetId )
+{
+	clearListById( targetId );
+	
+	var suggestedValues = jQuery('select[id=' + sourceId + '] option:selected').attr('suggestedValues');	
+	
+	var arrValues = new Array();
+	arrValues = suggestedValues.replace(/[//[]+/g,'').replace(/]/g, '').split(', ');
+
+	var suggestedValueSelector = byId( targetId );
+	for( var i=0; i< arrValues.length; i++ )
+	{
+		var option = document.createElement("option");
+		option.value = "'" + arrValues[i] + "'";
+		option.text = arrValues[i];
+		option.title = arrValues[i];
+
+		suggestedValueSelector.add(option, null); 
+	}
+}
+
+

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/responseAggDataElement.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/responseAggDataElement.vm	2012-02-11 13:58:02 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/responseAggDataElement.vm	2012-02-14 03:37:23 +0000
@@ -4,6 +4,7 @@
 		<dataelement>
 			<id>[DE:$psId.$dataElement.id]</id>
 			<name>$encoder.xmlEncode( $dataElement.name )</name>
+			<optionset>$!dataElement.optionSet.options</optionset>
 		</dataelement>	
 	#end
 </dataelements>
\ No newline at end of file

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateCaseAggregation.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateCaseAggregation.vm	2012-02-08 12:47:59 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateCaseAggregation.vm	2012-02-14 03:37:23 +0000
@@ -64,135 +64,173 @@
 </table>
 
 
-   
+<div id="tabs" width="20em">
+	<ul>
+		<li><a href="#tab-1">$i18n.getString("dataelement")</a></li>
+		<li><a href="#tab-2">$i18n.getString("case_attributes")</a></li>
+		<li><a href="#tab-3">$i18n.getString("program")</a></li>
+	</ul>	
+	
+	<div id="tab-1">
+		<table>
+			<tr>
+				<td>
+				<fieldset style="border: 1px solid #3f5d8e; ">
+				<legend>$i18n.getString( "data_element" )</legend>
+				<table>
+					<tr>
+						<td>
+							<label for="program">$i18n.getString( "program_properties" )</label>
+						</td>
+					</tr>
+					<tr>
+						<td>
+							<select id="program" name="program" style="width:20em" onChange="getProgramStages();">
+								<option value="0">[$i18n.getString('please_select')]</option>
+								#foreach( $program in $programs )
+									<option value="$program.id" title='$program.name'>$encoder.htmlEncode( $program.name )</option>
+								#end
+							</select>
+						</td>
+					</tr>
+					
+					<tr>
+						<td>
+							<label for="programStage">$i18n.getString( "program_stage" )</label>
+						</td>
+					</tr>
+					<tr>
+						<td>
+							<select id="programStage" name="programStage" style="width:20em" onchange="getPrgramStageDataElements();" ondblclick="insertProgramStage(this);">
+							</select>
+						</td>
+					</tr>
+					<tr>
+						<td>
+							<label for="dataelement">$i18n.getString( "dataelement" )</label>
+						</td>
+					</tr>
+					<tr>
+						<td>
+							<input type='text' style="min-width:19.8em" onkeyup="filterDE(event, this.value, 'programstageDE');"/>
+						</td>
+					</tr>
+					<tr>
+						<td>
+							<select id="programstageDE" name="programstageDE" size="5" style="width:20em; height: 6em" ondblclick="insertInfo(this);" onclick="getSuggestedValues(this.id, 'suggestedDEValues' )">
+							</select>
+						</td>
+					</tr>
+				</table>
+				</fieldset>
+			</td>
+			<td>
+				<fieldset style="border: 1px solid #3f5d8e; ">
+				<legend>$i18n.getString( "suggested_values" )</legend>
+				<select multiple size="10" id='suggestedDEValues' style="width:20em; height: 17em" ondblclick="insertInfo(this);" >
+				</select>
+			</td>
+		</tr>
+		</table>
+	</div>
+	
+	<div id="tab-2">
+		<table>
+			<tr>
+				<td>
+					<fieldset style="border: 1px solid #3f5d8e; ">
+					<legend>$i18n.getString( "attribute" )</legend>
+				
+					<table>
+						<tr>
+							<td>
+								<select id="caseProperty" name="caseProperty" size="8" ondblclick="insertInfo(this);" style="width:18em; height:16.5em" onclick="getSuggestedValues(this.id, 'caSuggestedValues' )">
+									<option value="[PT:count]" suggestedValues=''>$i18n.getString( "patients_registered" )</option>
+									<option value="[CP:gender]" suggestedValues='F, M' title='$i18n.getString( "gender" )'>$i18n.getString( "gender" )</option>
+									<option value="[CP:dobType]" suggestedValues='V, D, A' title='$i18n.getString( "dob_type" )'>$i18n.getString( "dob_type" )</option>
+									<option value="[CP:age]" title='$i18n.getString( "age_month" )'>$i18n.getString( "age_month" )</option>
+									
+									#foreach( $patientAttribute in $patientAttributes )
+									<option value="[CA:$patientAttribute.id]" suggestedValues='$patientAttribute.attributeOptions' title='$patientAttribute.name'>$encoder.htmlEncode( $patientAttribute.name )</option>
+									#end
+								</select>
+							</td>
+						</tr>
+					</table>
+					</fieldset>
+				</td>
+				</td>
+				<td>
+					<fieldset style="border: 1px solid #3f5d8e; ">
+						<legend>$i18n.getString( "suggested_values" )</legend>
+						<select multiple size="10" id='caSuggestedValues' style="width:20em; height: 17em" ondblclick="insertInfo(this);">
+						</select>
+					</fieldset>
+				</td>
+				
+			</tr>
+		</table>
+	</div>
+	
+	<div id="tab-3">
+		<table>
+			<tr>
+				<td>
+					<fieldset style="border: 1px solid #3f5d8e; ">
+					<legend>$i18n.getString( "program_properties" )</legend>
+					<table>
+						<tr>
+							<td>
+								<select id="programProperty" name="programProperty" size="4" ondblclick="insertInfo(this);" style="width:18em; height:16.5em" >
+									#foreach( $program in $programs )
+										<option value="[PG:$program.id]" title='$program.name'>$i18n.getString('program'): $encoder.htmlEncode( $program.name )</option>
+									#end
+									<option value="[PP:enrollmentdate - dateofincident]">$i18n.getString( "enrolldate_minus_incidentdate" )</option>
+									<option value="[PP:enrollmentdate]">$i18n.getString( "date_of_enrollment" )</option>
+									<option value="[PP:incidentdate]">$i18n.getString( "date_of_incident" )</option>
+								</select>
+							</td>
+						</tr>
+					</table>
+					</fieldset>
+				</td>
+				<td>
+					<fieldset style="border: 1px solid #3f5d8e; ">
+					<legend>$i18n.getString( "program" )</legend>
+					<table>
+						<tr>
+							<td>
+								<select id="programFormula" name="programFormula" style="width:20em" onChange="getProgramStagesForFormula();">
+									<option value="0">[$i18n.getString('please_select')]</option>
+									#foreach( $program in $programs )
+										<option value="$program.id" title='$program.name'>$encoder.htmlEncode( $program.name )</option>
+									#end
+								</select>
+							</td>
+						</tr>
+						<tr>
+							<td>
+								<label for="programStageFormula">$i18n.getString( "program_stage" )</label>
+							</td>
+						</tr>
+						<tr>
+							<td>
+								<select multiple id="programStageFormula" name="programStageFormula" style="width:20em; height:12.5em" ondblclick="insertInfo(this);">
+								</select>
+							</td>
+						</tr>
+					</table>
+					</fieldset>
+				</td>
+			</tr>
+		</table>
+	</div>
+	
+</div>
+
+<p></p>
+
 <table>
-	<thead>
-		<tr>
-			<th colspan="4">$i18n.getString( "condition_detail" )</th>
-		</tr>
-	</thead>
-	
-	<tbody>
-	
-	<tr>
-		<td>
-		<fieldset style="border: 1px solid #3f5d8e; ">
-		<legend>$i18n.getString( "dataelement" )</legend>
-		<table>
-			<tr>
-				<td>
-					<label for="program">$i18n.getString( "program" )</label>
-				</td>
-			</tr>
-			<tr>
-				<td>
-					<select id="program" name="program" style="min-width:20em" onChange="getProgramStages();">
-						<option value="0">[$i18n.getString('please_select')]</option>
-						#foreach( $program in $programs )
-							<option value="$program.id">$encoder.htmlEncode( $program.name )</option>
-						#end
-					</select>
-				</td>
-			</tr>
-			
-			<tr>
-				<td>
-					<label for="programStage">$i18n.getString( "program_stage" )</label>
-				</td>
-			</tr>
-			<tr>
-				<td>
-					<select id="programStage" name="programStage" style="min-width:20em" onClick="getPrgramStageDataElements();" ondblclick="insertProgramStage(this);">
-					</select>
-				</td>
-			</tr>
-			
-			<tr>
-				<td>
-					<label for="dataelement">$i18n.getString( "dataelement" )</label>
-				</td>
-			</tr>
-			<tr>
-				<td>
-					<select id="programstageDE" name="programstageDE" size="5" style="width:20em" ondblclick="insertInfo(this);">
-					</select>
-				</td>
-			</tr>
-		</table>
-		</fieldset>
-		
-		</td>
-		
-		<td>
-		<fieldset style="border: 1px solid #3f5d8e; ">
-		<legend>$i18n.getString( "case_attributes" )</legend>
-		<table>
-			<tr>
-				<td>
-					<select id="caseProperty" name="caseProperty" size="10" ondblclick="insertInfo(this);" style="width:20em; height:16.5em" >
-						<option value="[PT:count]">$i18n.getString( "patients_registered" )</option>
-						<option value="[CP:gender]">$i18n.getString( "gender" )</option>
-						<option value="[CP:dobType]">$i18n.getString( "dob_type" )</option>
-						<option value="[CP:age]">$i18n.getString( "age_month" )</option>
-						
-						#foreach( $patientAttribute in $patientAttributes )
-						<option value="[CA:$patientAttribute.id]">$encoder.htmlEncode( $patientAttribute.name )</option>
-						#end
-					</select>
-				</td>
-			</tr>
-		</table>
-		</td>
-		
-		<td>
-		<fieldset style="border: 1px solid #3f5d8e; ">
-		<legend>$i18n.getString( "program_properties" )</legend>
-		<table>
-			<tr>
-				<td>
-					<select id="caseProperty" name="caseProperty" size="5" ondblclick="insertInfo(this);" style="min-width:15em; height:16.5em" >
-						#foreach( $program in $programs )
-							<option value="[PG:$program.id]">$i18n.getString('program'): $encoder.htmlEncode( $program.name )</option>
-						#end
-						<option value="[PP:enrollmentdate - dateofincident]">$i18n.getString( "enrolldate_minus_incidentdate" )</option>
-						<option value="[PP:enrollmentdate]">$i18n.getString( "date_of_enrollment" )</option>
-						<option value="[PP:incidentdate]">$i18n.getString( "date_of_incident" )</option>
-					</select>
-				</td>
-			</tr>
-		</table>
-		</td>
-		
-		<td>
-		<fieldset style="border: 1px solid #3f5d8e; ">
-		<legend>$i18n.getString( "program_stage" )</legend>
-		<table>
-			<tr>
-				<td>
-					<select id="programFormula" name="programFormula" style="width:20em" onChange="getProgramStagesForFormula();">
-						<option value="0">[$i18n.getString('please_select')]</option>
-						#foreach( $program in $programs )
-							<option value="$program.id" title='$program.name'>$encoder.htmlEncode( $program.name )</option>
-						#end
-					</select>
-				</td>
-			</tr>
-			
-			<tr>
-				<td>
-					<label for="programStageFormula">$i18n.getString( "program_stage" )</label>
-				</td>
-			</tr>
-			<tr>
-				<td>
-					<select multiple id="programStageFormula" name="programStageFormula" style="width:20em; height:12.5em" ondblclick="insertInfo(this);">
-					</select>
-				</td>
-			</tr>
-		</table>
-		</td>
-		
-	</tr>	
 	<tr>
 		<td colspan='4'>
 			<img src="../images/less.png" alt="$i18n.getString( 'less' )" onclick='insertOperator( "<" );' style="cursor:pointer;">
@@ -251,4 +289,5 @@
 	byId('description').focus();
 	var i18n_run_success = '$encoder.jsEscape( $i18n.getString( "run_success" ) , "'" )';
 	var i18n_run_fail = '$encoder.jsEscape( $i18n.getString( "run_fail" ) , "'" )';
+	jQuery("#tabs").tabs();
 </script>