dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #18565
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 7867: Add nested search function in multi data entry form.
------------------------------------------------------------
revno: 7867
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2012-08-07 12:43:56 +0700
message:
Add nested search function in multi data entry form.
removed:
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/multiDataEntryIndex.vm
modified:
dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/GetDataRecordsAction.java
dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/META-INF/dhis/beans.xml
dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties
dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/struts.xml
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/anonymousRegistration.vm
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/dataentryRecords.vm
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.js
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/multiDataEntry.js
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/listPatient.vm
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/multiDataEntrySelect.vm
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientRegistrationList.vm
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/searchPatientCriteria.vm
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/singleEventPatient.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/java/org/hisp/dhis/caseentry/action/caseentry/GetDataRecordsAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/GetDataRecordsAction.java 2012-07-30 10:56:25 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/GetDataRecordsAction.java 2012-08-07 05:43:56 +0000
@@ -38,11 +38,7 @@
import org.hisp.dhis.organisationunit.OrganisationUnit;
import org.hisp.dhis.paging.ActionPagingSupport;
import org.hisp.dhis.patient.Patient;
-import org.hisp.dhis.patient.PatientAttribute;
-import org.hisp.dhis.patient.PatientAttributeService;
import org.hisp.dhis.patient.PatientService;
-import org.hisp.dhis.patientattributevalue.PatientAttributeValue;
-import org.hisp.dhis.patientattributevalue.PatientAttributeValueService;
import org.hisp.dhis.program.Program;
import org.hisp.dhis.program.ProgramInstance;
import org.hisp.dhis.program.ProgramInstanceService;
@@ -93,36 +89,10 @@
this.programStageInstanceService = programStageInstanceService;
}
- private PatientAttributeService patientAttributeService;
-
- public void setPatientAttributeService( PatientAttributeService patientAttributeService )
- {
- this.patientAttributeService = patientAttributeService;
- }
-
- private PatientAttributeValueService patientAttributeValueService;
-
- public void setPatientAttributeValueService( PatientAttributeValueService patientAttributeValueService )
- {
- this.patientAttributeValueService = patientAttributeValueService;
- }
-
// -------------------------------------------------------------------------
// Input/output
// -------------------------------------------------------------------------
- private Integer sortPatientAttributeId;
-
- public void setSortPatientAttributeId( Integer sortPatientAttributeId )
- {
- this.sortPatientAttributeId = sortPatientAttributeId;
- }
-
- public Integer getSortPatientAttributeId()
- {
- return sortPatientAttributeId;
- }
-
private Integer programId;
public void setProgramId( Integer programId )
@@ -130,9 +100,18 @@
this.programId = programId;
}
- public Integer getProgramId()
- {
- return programId;
+ private boolean listAll;
+
+ public void setListAll( boolean listAll )
+ {
+ this.listAll = listAll;
+ }
+
+ private List<String> searchTexts = new ArrayList<String>();
+
+ public void setSearchTexts( List<String> searchTexts )
+ {
+ this.searchTexts = searchTexts;
}
private Integer total;
@@ -170,32 +149,11 @@
return programInstanceMap;
}
- private Map<Integer, PatientAttributeValue> patientAttributeValueMap = new HashMap<Integer, PatientAttributeValue>();
-
- public Map<Integer, PatientAttributeValue> getPatientAttributeValueMap()
- {
- return patientAttributeValueMap;
- }
-
- Collection<Patient> patientListByOrgUnit;
-
- public Collection<Patient> getPatientListByOrgUnit()
- {
- return patientListByOrgUnit;
- }
-
- private PatientAttribute sortPatientAttribute;
-
- public PatientAttribute getSortPatientAttribute()
- {
- return sortPatientAttribute;
- }
-
- private Program program;
-
- public Program getProgram()
- {
- return program;
+ Collection<Patient> patients;
+
+ public Collection<Patient> getPatients()
+ {
+ return patients;
}
// -------------------------------------------------------------------------
@@ -205,32 +163,36 @@
public String execute()
throws Exception
{
- OrganisationUnit organisationUnit = selectedStateManager.getSelectedOrganisationUnit();
-
- program = programService.getProgram( programId );
-
- sortPatientAttribute = patientAttributeService.getPatientAttribute( sortPatientAttributeId );
+ OrganisationUnit orgunit = selectedStateManager.getSelectedOrganisationUnit();
+
+ Program program = programService.getProgram( programId );
// ---------------------------------------------------------------------
// Program instances for the selected program
// ---------------------------------------------------------------------
-
- total = patientService.countGetPatientsByOrgUnitProgram( organisationUnit, program );
-
- this.paging = createPaging( total );
-
- patientListByOrgUnit = new ArrayList<Patient>( patientService.getPatients( organisationUnit, program, paging
- .getStartPos(), paging.getPageSize() ) );
-
- if ( sortPatientAttribute != null )
- {
- patientAttributeValueMap = patientAttributeValueService.getPatientAttributeValueMapForPatients(
- patientListByOrgUnit, sortPatientAttribute );
- }
+ // List all patients
+ if ( listAll )
+ {
+ total = patientService.countGetPatientsByOrgUnit( orgunit );
+ this.paging = createPaging( total );
+
+ patients = new ArrayList<Patient>( patientService.getPatients( orgunit, program, paging.getStartPos(),
+ paging.getPageSize() ) );
+
+ }
+ // search patients
+ else if ( searchTexts.size() > 0 )
+ {
+ total = patientService.countSearchPatients( searchTexts, orgunit );
+ this.paging = createPaging( total );
+ patients = patientService.searchPatients( searchTexts, orgunit, paging.getStartPos(),
+ paging.getPageSize() );
+ }
+
Collection<ProgramStageInstance> programStageInstances = new ArrayList<ProgramStageInstance>();
- for ( Patient patient : patientListByOrgUnit )
+ for ( Patient patient : patients )
{
Collection<ProgramInstance> _programInstances = programInstanceService.getProgramInstances( patient,
program, false );
@@ -245,7 +207,7 @@
{
programInstanceMap.put( patient, programInstance );
programInstances.add( programInstance );
-
+
List<ProgramStageInstance> programStageInstanceList = new ArrayList<ProgramStageInstance>(
programInstance.getProgramStageInstances() );
Collections.sort( programStageInstanceList, new ProgramStageInstanceDueDateComparator() );
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/META-INF/dhis/beans.xml 2012-07-30 10:56:25 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/META-INF/dhis/beans.xml 2012-08-07 05:43:56 +0000
@@ -168,15 +168,11 @@
scope="prototype">
<property name="selectedStateManager"
ref="org.hisp.dhis.caseentry.state.SelectedStateManager" />
+ <property name="patientService" ref="org.hisp.dhis.patient.PatientService" />
<property name="programService" ref="org.hisp.dhis.program.ProgramService" />
<property name="programInstanceService" ref="org.hisp.dhis.program.ProgramInstanceService" />
<property name="programStageInstanceService"
ref="org.hisp.dhis.program.ProgramStageInstanceService" />
- <property name="patientService" ref="org.hisp.dhis.patient.PatientService" />
- <property name="patientAttributeService"
- ref="org.hisp.dhis.patient.PatientAttributeService" />
- <property name="patientAttributeValueService"
- ref="org.hisp.dhis.patientattributevalue.PatientAttributeValueService" />
</bean>
<bean
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties 2012-08-02 09:25:56 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties 2012-08-07 05:43:56 +0000
@@ -188,7 +188,7 @@
duplicated_patient_list=Duplicated patient list
specfiy_birth_date_or_age=Specify birth date or age
update_this_patient=Update this person
-search_patients_by_attributes=Search persons by attributes
+advanced_search_patients=Advanced search persons
patient=Person
confirm_delete_patient=Are you sure you want to delete this person?
please_enter_a_valid_birth_date=Please enter a valid date of birth
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/struts.xml'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/struts.xml 2012-07-21 14:59:13 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/struts.xml 2012-08-07 05:43:56 +0000
@@ -197,15 +197,13 @@
<param name="page">/dhis-web-caseentry/multiDataEntrySelect.vm</param>
<param name="menu">/dhis-web-caseentry/dataEntryMenu.vm</param>
<param name="stylesheets">style/style.css</param>
- <param name="javascripts">../dhis-web-commons/ouwt/ouwt.js,javascript/commons.js,
- javascript/form.js,javascript/multiDataEntry.js</param>
+ <param name="javascripts">../dhis-web-commons/ouwt/ouwt.js,javascript/commons.js,javascript/multiDataEntry.js</param>
<param name="requiredAuthorities">F_NAME_BASED_DATA_ENTRY</param>
</action>
<action name="getPrograms"
class="org.hisp.dhis.caseentry.action.caseentry.GetProgramsByOrgunitAction">
- <result name="success" type="velocity">/content.vm</result>
- <param name="page">/dhis-web-caseentry/multiDataEntryIndex.vm</param>
+ <result name="success" type="velocity-json">/dhis-web-commons/ajax/jsonPrograms.vm</result>
</action>
<action name="getDataRecords"
@@ -219,7 +217,7 @@
class="org.hisp.dhis.caseentry.action.caseentry.ProgramStageCustomDataEntryAction">
<result name="success" type="velocity">/content.vm</result>
<param name="page">/dhis-web-caseentry/programStageDataEntryForm.vm</param>
- <param name="javascripts">javascript/form.js,javascript/entry.js,../dhis-web-commons/javascripts/date.js</param>
+ <param name="javascripts">javascript/entry.js,../dhis-web-commons/javascripts/date.js</param>
<param name="stylesheets">style/style.css</param>
</action>
@@ -227,7 +225,7 @@
class="org.hisp.dhis.caseentry.action.caseentry.ProgramStageCustomDataEntryAction">
<result name="success" type="velocity">/content.vm</result>
<param name="page">/dhis-web-caseentry/dataEntryForm.vm</param>
- <param name="javascripts">javascript/form.js,../dhis-web-commons/javascripts/date.js</param>
+ <param name="javascripts">../dhis-web-commons/javascripts/date.js</param>
</action>
<action name="completeProgramStageDataEntry"
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/anonymousRegistration.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/anonymousRegistration.vm 2012-08-02 07:37:41 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/anonymousRegistration.vm 2012-08-07 05:43:56 +0000
@@ -21,7 +21,7 @@
<select multiple id='compulsoryDE' name='compulsoryDE' class='hidden'></select>
-<div id='criteriaDiv'>
+<div id='advanced-search'>
<div id='selectDiv'>
<table>
<tr>
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/dataentryRecords.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/dataentryRecords.vm 2012-08-06 09:34:34 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/dataentryRecords.vm 2012-08-07 05:43:56 +0000
@@ -1,57 +1,62 @@
-#if( $patientListByOrgUnit && $patientListByOrgUnit.size()>0 )
- <table class="mainPageTable">
- <tr>
- <td>
- <table class="listTable" id="patientList">
- <tbody id="list">
- #set( $mark = false )
- #foreach( $patient in $patientListByOrgUnit )
- #set( $programInstance = $programInstanceMap.get( $patient ) )
- <tr #alternate( $mark )>
- <td>
- <input type='button' class='patient-object' value='$patient.getFullName()' onclick='javascript:showPatientHistory( "$patient.id" );' title='$i18n.getString( "patient_details_and_history" )'>
- </td>
- #set($programStageInstances = $programStageInstanceMap.get($programInstance) )
- #foreach( $programStageInstance in $programStageInstances )
- <td>
- <img src='images/rightarrow.png'>
- </td>
-
- <td width='100px;'>
- <input type='button' id='ps_$programStageInstance.id' name='programStageBtn' class='stage-object' value='$programStageInstance.programStage.name $format.formatDate( $programStageInstance.dueDate )' onclick='javascript:viewPrgramStageRecords( $programStageInstance.id );'>
- <script>
- var status = $statusMap.get( $programStageInstance.id );
- setEventColorStatus( 'ps_' + $programStageInstance.id ,status);
- </script>
- </td>
- #end
- </tr>
- #if( $mark )
- #set( $mark = false )
- #else
- #set( $mark = true )
- #end
- #end
- </tbody>
- <tr>
- #set( $size=$program.programStages.size() + 2 )
- <td colspan="$size">
- <p></p>
- <div class="paging-container">
- #parse( "/dhis-web-commons/paging/paging.vm" )
- </div>
+<table>
+ <tr>
+ <td class='text-column' >$i18n.getString( "search_result_matching_the_search_criteria" ):</td>
+ <td> </td>
+ <td> </td>
+ <td>
+ #if($!listAll)
+ $i18n.getString( "list_all_patients" )
+ #else
+ $i18n.getString( "advanced_search_patients" )
+ #end
+ </td>
+ </tr>
+
+ <tr>
+ <td class='text-column' >$i18n.getString( "total_result" ):</td>
+ <td> </td>
+ <td> </td>
+ <td>$!total</td>
+ </tr>
+</table>
+
+#if( $patients && $patients.size()>0 )
+ <p>#parse( "/dhis-web-caseentry/colorHelp.vm" )</p>
+
+ <table class="listTable mainPageTable" id="patientList">
+ #set( $mark = false )
+ #foreach( $patient in $patients )
+ #set( $programInstance = $programInstanceMap.get( $patient ) )
+ <tr #alternate( $mark )>
+ <td>
+ <input type='button' class='patient-object' value='$patient.getFullName()' onclick='javascript:showPatientHistory( "$patient.id" );' title='$i18n.getString( "patient_details_and_history" )'>
</td>
- <td></td>
+ #set($programStageInstances = $programStageInstanceMap.get($programInstance) )
+ #foreach( $programStageInstance in $programStageInstances )
+ <td>
+ <img src='images/rightarrow.png'>
+ </td>
+ <td width='100px;'>
+ <input type='button' id='ps_$programStageInstance.id' name='programStageBtn' class='stage-object' value='$programStageInstance.programStage.name $format.formatDate( $programStageInstance.dueDate )' onclick='javascript:viewPrgramStageRecords( $programStageInstance.id );'>
+ <script>
+ var status = $statusMap.get( $programStageInstance.id );
+ setEventColorStatus( 'ps_' + $programStageInstance.id ,status);
+ </script>
+ </td>
+ #end
</tr>
- </table>
- </td>
- </tr>
+ #if( $mark )
+ #set( $mark = false )
+ #else
+ #set( $mark = true )
+ #end
+ #end
</table>
-
- <div id="detailsInfo">
+ <div class="paging-container">
+ #parse( "/dhis-web-commons/paging/paging.vm" )
</div>
-#else
- <h5>$i18n.getString('no_patient_enrolled_the_program')</h5>
+
+ <div id="detailsInfo"></div>
#end
<script>
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.js 2012-08-02 13:10:04 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.js 2012-08-07 05:43:56 +0000
@@ -416,7 +416,7 @@
enable('listPatientBtn');
enable('addPatientBtn');
enable('advancedSearchBtn');
- jQuery('#criteriaDiv :input').each( function( idx, item ){
+ jQuery('#advanced-search :input').each( function( idx, item ){
enable(this.id);
});
}
@@ -425,7 +425,7 @@
disable('listPatientBtn');
disable('addPatientBtn');
disable('advancedSearchBtn');
- jQuery('#criteriaDiv :input').each( function( idx, item ){
+ jQuery('#advanced-search :input').each( function( idx, item ){
disable(this.id);
});
}
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/multiDataEntry.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/multiDataEntry.js 2012-07-28 13:37:33 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/multiDataEntry.js 2012-08-07 05:43:56 +0000
@@ -1,54 +1,61 @@
function multiDataEntryOrgunitSelected( orgUnits, orgUnitNames )
{
- hideById("listPatient");
- jQuery('#programDiv').load("getPrograms.action",{},
- function()
+ hideById("listPatientDiv");
+ clearListById('programIdAddPatient');
+ $('#contentDataRecord').html('');
+ jQuery.get("getPrograms.action",{},
+ function(json)
{
- hideById('btnBack');
- hideById('programName');
- showById('programDiv');
- setFieldValue( 'orgunitName', orgUnitNames[0] );
- hideLoader();
+ jQuery( '#programIdAddPatient').append( '<option value="">' + i18n_please_select + '</option>' );
+ for ( i in json.programs ) {
+ if(json.programs[i].type==1){
+ jQuery( '#programIdAddPatient').append( '<option value="' + json.programs[i].id +'" type="' + json.programs[i].type + '">' + json.programs[i].name + '</option>' );
+ }
+ }
+ enableBtn();
});
}
selection.setListenerFunction( multiDataEntryOrgunitSelected );
-function selectProgram( programId, programName )
+function listAllPatient()
{
- setInnerHTML('listPatient', '');
- contentDiv = 'listPatient';
+ hideById('listPatientDiv');
+ contentDiv = 'listPatientDiv';
+ $('#contentDataRecord').html('');
showLoader();
- jQuery('#listPatient').load("getDataRecords.action",
+ jQuery('#listPatientDiv').load('getDataRecords.action',
{
- programId:programId,
- sortPatientAttributeId:0
+ programId:getFieldValue('programIdAddPatient'),
+ listAll:true
},
function()
{
- hideById('programDiv');
showById('colorHelpLink');
-
- setFieldValue('programId', programId);
- setInnerHTML('programName', programName);
- showById('programName');
-
- showById('btnBack');
- showById('programName');
- showById("listPatient");
+ showById('listPatientDiv');
hideLoader();
});
}
-function backButtonOnClick()
+function advancedSearch( params )
{
- hideById("listPatient");
- hideById('btnBack');
- hideById('programName');
- showById('programDiv');
- hideById('colorHelpLink');
+ $('#contentDataRecord').html('');
+ params += "&searchTexts=prg_" + getFieldValue('programIdAddPatient');
+ params += "&programId=" + getFieldValue('programIdAddPatient');
+ $.ajax({
+ url: 'getDataRecords.action',
+ type:"POST",
+ data: params,
+ success: function( html ){
+ jQuery('#listPatientDiv').html(html);
+ showById('colorHelpLink');
+ showById('listPatientDiv');
+ hideLoader();
+ }
+ });
}
+
function viewPrgramStageRecords( programStageInstanceId )
{
jQuery("#patientList input[name='programStageBtn']").each(function(i,item){
@@ -56,8 +63,7 @@
});
jQuery( '#' + prefixId + programStageInstanceId ).addClass('stage-object-selected');
- $('#contentDataRecord').dialog('destroy').remove();
- $('<div id="contentDataRecord">' ).load("viewProgramStageRecords.action",
+ $('#contentDataRecord' ).load("viewProgramStageRecords.action",
{
programStageInstanceId: programStageInstanceId
}).dialog(
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/listPatient.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/listPatient.vm 2012-08-02 13:10:04 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/listPatient.vm 2012-08-07 05:43:56 +0000
@@ -7,7 +7,7 @@
#if($!listAll)
$i18n.getString( "list_all_patients" )
#else
- $i18n.getString( "search_patients_by_attributes" )
+ $i18n.getString( "advanced_search_patients" )
#end
</td>
</tr>
=== removed file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/multiDataEntryIndex.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/multiDataEntryIndex.vm 2012-07-09 09:02:42 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/multiDataEntryIndex.vm 1970-01-01 00:00:00 +0000
@@ -1,10 +0,0 @@
-#foreach( $program in $programs )
- #if( $program.type=='1' )
- <ul class="introList" style='display: block;'>
- <li class="introItem" onclick="javascript:selectProgram('$program.id', '$program.name')">
- <span class="introItemHeader"><img src="../icons/program.png" style="float:left; margin-right:15px">$program.name</span><br>
- <span>$program.description</span>
- </li>
- </ul>
- #end
-#end
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/multiDataEntrySelect.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/multiDataEntrySelect.vm 2012-08-02 09:55:03 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/multiDataEntrySelect.vm 2012-08-07 05:43:56 +0000
@@ -1,21 +1,37 @@
+<script>
+ jQuery(document).ready( function(){
+ showById('programAddPatientTR');
+ jQuery("#programIdAddPatient option").each(function(){
+ var item = jQuery(this);
+ if( item.attr('type')!=1 && item.val()!='' ){
+ item.remove();
+ }
+ });
+
+ jQuery("#searchObjectId [value=prg]").remove();
+ hideById('addPatientBtn');
+ disable('advancedSearchBtn');
+ hideById('searchBySelectedUnitTD');
+ });
+</script>
+
<h3>$i18n.getString( "multiple_individual_records" ) #openHelp('multiple_individual_records')</h3>
-
-<h4 id='programName' name='programName'></h4>
-<input type="button" id='btnBack' name='btnBack' style='width: 150px;display:none;' value="$i18n.getString( 'back' )" onclick="backButtonOnClick();"/>
-
-<div id='programDiv'>
- #parse( "dhis-web-caseentry/multiDataEntryIndex.vm" )
-</div>
+<form>
+ <input type='hidden' id='isRegistration' name= 'isRegistration' value='false'>
+ <input type='hidden' id='listAll' name='listAll'>
+ <div id='searchDiv'>
+ #parse( "dhis-web-caseentry/searchPatientCriteria.vm" )
+ </div>
+</form>
#parse( "dhis-web-commons/loader/loader.vm" )
-<input type='hidden' id='orgunitId' value='$organisationUnit.id'>
-<p>#parse( "/dhis-web-caseentry/colorHelp.vm" )</p>
-<div id='listPatient'></div>
+<div id='listPatientDiv'></div>
+<div id='contentDataRecord'></div>
<script>
unSave = false;
- var i18n_select = '[' + '$encoder.jsEscape( $i18n.getString( "select" ) , "'")' + ']';
+ var i18n_please_select = '[' + '$encoder.jsEscape( $i18n.getString( "please_select" ) , "'")' + ']';
var i18n_value_must_integer = '$encoder.jsEscape( $i18n.getString( "value_must_integer" ) , "'")';
var i18n_value_must_number = '$encoder.jsEscape( $i18n.getString( "value_must_number" ) , "'")';
var i18n_value_must_positive_integer = '$encoder.jsEscape( $i18n.getString( "value_must_positive_integer" ) , "'")';
@@ -39,4 +55,8 @@
var i18n_show_all_items = '$encoder.jsEscape( $i18n.getString( "show_all_items" ) , "'")';
var i18n_program_stage = '$encoder.jsEscape( $i18n.getString( "program_stage" ) , "'")';
var i18n_color_quick_help = '$encoder.jsEscape( $i18n.getString( "color_quick_help" ) , "'")';
+ var i18n_male = '$encoder.jsEscape( $i18n.getString( "male" ) , "'")';
+ var i18n_female = '$encoder.jsEscape( $i18n.getString( "female" ) , "'")';
+
+ var searchTextBox = '<input type="text" id="searchText" name="searchText" onkeyup="searchPatientsOnKeyUp( event );">';
</script>
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientRegistrationList.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientRegistrationList.vm 2012-07-21 14:59:13 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientRegistrationList.vm 2012-08-07 05:43:56 +0000
@@ -7,7 +7,7 @@
#if($!listAll)
$i18n.getString( "list_all_patients" )
#else
- $i18n.getString( "search_patients_by_attributes" )
+ $i18n.getString( "advanced_search_patients" )
#end
</td>
</tr>
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/searchPatientCriteria.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/searchPatientCriteria.vm 2012-08-02 06:16:27 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/searchPatientCriteria.vm 2012-08-07 05:43:56 +0000
@@ -47,14 +47,15 @@
<input type="text" id="searchText" name="searchText" value="$!searchText" onkeyup='searchPatientsOnKeyUp( event );' style='margin-right:30px;'>
</td>
<td></td>
- <td><input type="button" class='small-button' value='+' onclick='addAttributeOption();'>
- <td>
- $i18n.getString('search_by_selected_unit')
- <input type='checkbox' id='searchBySelectedOrgunit' name='searchBySelectedOrgunit' />
- </td>
- <td>
- <input type="button" class='large-button' value='$i18n.getString( "search" )' onclick='validateAdvancedSearch();'>
- </td>
+ <td>
+ <input type="button" class='small-button' value='+' onclick='addAttributeOption();'>
+ </td>
+ <td id='searchBySelectedUnitTD'>
+ $i18n.getString('search_by_selected_unit')
+ <input type='checkbox' id='searchBySelectedOrgunit' name='searchBySelectedOrgunit' />
+ </td>
+ <td>
+ <input type="button" class='large-button' value='$i18n.getString( "search" )' onclick='validateAdvancedSearch();' id='searchPatientBtn'>
</td>
</tr>
</tbody>
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/singleEventPatient.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/singleEventPatient.vm 2012-08-02 13:10:04 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/singleEventPatient.vm 2012-08-07 05:43:56 +0000
@@ -7,7 +7,7 @@
#if($!listAll)
$i18n.getString( "list_all_patients" )
#else
- $i18n.getString( "search_patients_by_attributes" )
+ $i18n.getString( "advanced_search_patients" )
#end
</td>
</tr>