dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #13156
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 4162: Fix bug: Error when adding a representative ; don't reload searching-patient when clicking Back b...
------------------------------------------------------------
revno: 4162
committer: Tran <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2011-07-19 10:48:05 +0700
message:
Fix bug: Error when adding a representative ; don't reload searching-patient when clicking Back button.
modified:
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/SearchPatientAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/relationship/RemoveRelationshipAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/relationship/RemoveRepresentativeAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/relationship/SaveRepresentativeAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/state/SelectedStateManager.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/META-INF/dhis/beans.xml
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/org/hisp/dhis/patient/i18n_module.properties
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/struts.xml
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addPatientForm.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addRelationshipForm.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addRelationshipPatientForm.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/patient.js
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/relationship.js
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/relationshipPatient.js
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/listPatient.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/programUnenrollmentSelectForm.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/relationshipList.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/responsePartner.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/responseProgramInstance.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/selectPatient.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updatePatientForm.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-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/SearchPatientAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/SearchPatientAction.java 2011-05-13 09:11:13 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/SearchPatientAction.java 2011-07-19 03:48:05 +0000
@@ -33,12 +33,12 @@
import java.util.Map;
import org.hisp.dhis.organisationunit.OrganisationUnit;
-import org.hisp.dhis.ouwt.manager.OrganisationUnitSelectionManager;
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.patient.state.SelectedStateManager;
import org.hisp.dhis.patientattributevalue.PatientAttributeValue;
import org.hisp.dhis.patientattributevalue.PatientAttributeValueService;
import org.hisp.dhis.program.Program;
@@ -60,7 +60,7 @@
// Dependencies
// -------------------------------------------------------------------------
- private OrganisationUnitSelectionManager selectionManager;
+ private SelectedStateManager selectedStateManager;
private PatientService patientService;
@@ -99,16 +99,16 @@
private PatientAttribute sortingPatientAttribute = null;
private PatientAttribute searchingPatientAttribute = null;
-
+
private Program program;
-
+
// -------------------------------------------------------------------------
// Getters/Setters
// -------------------------------------------------------------------------
- public void setSelectionManager( OrganisationUnitSelectionManager selectionManager )
+ public void setSelectedStateManager( SelectedStateManager selectedStateManager )
{
- this.selectionManager = selectionManager;
+ this.selectedStateManager = selectedStateManager;
}
public void setProgramService( ProgramService programService )
@@ -125,7 +125,7 @@
{
return mapPatientOrgunit;
}
-
+
public void setPatientAttributeService( PatientAttributeService patientAttributeService )
{
this.patientAttributeService = patientAttributeService;
@@ -156,6 +156,16 @@
this.searchingAttributeId = searchingAttributeId;
}
+ public String getSearchText()
+ {
+ return searchText;
+ }
+
+ public Program getProgram()
+ {
+ return program;
+ }
+
public Collection<Patient> getPatients()
{
return patients;
@@ -183,16 +193,22 @@
public String execute()
throws Exception
{
- OrganisationUnit organisationUnit = selectionManager.getSelectedOrganisationUnit();
-
- setParamsToSearch();
+ OrganisationUnit organisationUnit = selectedStateManager.getSelectedOrganisationUnit();
+
+ setParamsToSearch();
// ---------------------------------------------------------------------
// Get all of patient into the selected organisation unit
// ---------------------------------------------------------------------
-
+
if ( listAll != null && listAll )
{
+ selectedStateManager.clearSearchingAttributeId();
+ selectedStateManager.clearSortingAttributeId();
+ selectedStateManager.clearSearchText();
+ selectedStateManager.clearSelectedProgram();
+ selectedStateManager.setListAll( listAll );
+
listAllPatient( organisationUnit, sortingPatientAttribute );
return SUCCESS;
@@ -201,11 +217,22 @@
// ---------------------------------------------------------------------
// Get patients by the selected program
// ---------------------------------------------------------------------
-
+
if ( searchingAttributeId != null && searchingAttributeId == 0 && programId != null )
{
program = programService.getProgram( programId );
+ if ( sortPatientAttributeId != null )
+ {
+ selectedStateManager.setSortingAttributeId( sortPatientAttributeId );
+ }
+ else
+ {
+ selectedStateManager.clearSortingAttributeId();
+ }
+ selectedStateManager.setSelectedProgram( program );
+ selectedStateManager.setSearchingAttributeId( searchingAttributeId );
+
searchPatientByProgram( organisationUnit, program, sortingPatientAttribute );
return SUCCESS;
@@ -215,19 +242,97 @@
// Get patients by searchingAttributeId and searchText
// and sort result by sortingAttributeId
// ---------------------------------------------------------------------
-
+
if ( searchingPatientAttribute != null && searchText != null )
{
+
+ selectedStateManager.clearListAll();
+ selectedStateManager.setSearchingAttributeId( searchingAttributeId );
+ if ( sortPatientAttributeId != null )
+ {
+ selectedStateManager.setSortingAttributeId( sortPatientAttributeId );
+ }
+ else
+ {
+ selectedStateManager.clearSortingAttributeId();
+ }
+
+ if ( programId != null )
+ {
+ selectedStateManager.clearSortingAttributeId();
+ }
+ selectedStateManager.setSearchText( searchText );
+
searchPatientByAttribute( searchingPatientAttribute, searchText, sortingPatientAttribute );
return SUCCESS;
}
-
- // searchingPatientAttribute == null && searchText != null
-
- searchPatientByAttribute( searchText, sortingPatientAttribute );
-
+
+ if ( searchingPatientAttribute == null && searchText != null )
+ {
+ selectedStateManager.clearListAll();
+ selectedStateManager.clearSearchingAttributeId();
+
+ if ( sortPatientAttributeId != null )
+ {
+ selectedStateManager.setSortingAttributeId( sortPatientAttributeId );
+ }
+ else
+ {
+ selectedStateManager.clearSortingAttributeId();
+ }
+
+ if ( programId != null )
+ {
+ selectedStateManager.clearSortingAttributeId();
+ }
+ selectedStateManager.setSearchText( searchText );
+
+ searchPatientByAttribute( searchText, sortingPatientAttribute );
+
+ return SUCCESS;
+ }
+
+ // ---------------------------------------------------------------------
+ // Search patients by values into section
+ // ---------------------------------------------------------------------
+
+ listAll = selectedStateManager.getListAll();
+ searchingAttributeId = selectedStateManager.getSearchingAttributeId();
+ sortPatientAttributeId = selectedStateManager.getSortAttributeId();
+ searchText = selectedStateManager.getSearchText();
+ program = selectedStateManager.getSelectedProgram();
+
+ setParamsToSearch();
+
+ if ( listAll )
+ {
+ listAllPatient( organisationUnit, sortingPatientAttribute );
+
+ return SUCCESS;
+
+ }
+
+ if ( searchingAttributeId != null && searchingAttributeId == 0 && program != null )
+ {
+ searchPatientByProgram( organisationUnit, program, sortingPatientAttribute );
+ return SUCCESS;
+ }
+
+ if ( searchingAttributeId != null && searchText != null )
+ {
+ searchPatientByAttribute( searchText, sortingPatientAttribute );
+ return SUCCESS;
+ }
+
+ if ( searchingAttributeId == null && searchText != null )
+ {
+ searchPatientByAttribute( searchText, sortingPatientAttribute );
+ return SUCCESS;
+ }
+
return SUCCESS;
+
}
// -------------------------------------------------------------------------
@@ -239,7 +344,7 @@
// ---------------------------------------------------------------------
// Get sorting patient-attribute
// ---------------------------------------------------------------------
-
+
if ( sortPatientAttributeId != null )
{
sortingPatientAttribute = patientAttributeService.getPatientAttribute( sortPatientAttributeId );
@@ -259,7 +364,7 @@
{
total = patientService.countGetPatientsByOrgUnit( organisationUnit );
this.paging = createPaging( total );
-
+
patients = new ArrayList<Patient>( patientService.getPatients( organisationUnit, paging.getStartPos(), paging
.getPageSize() ) );
@@ -292,7 +397,8 @@
{
for ( Patient patient : patients )
{
- // mapRelationShip.put( patient.getId(), relationshipService.getRelationshipsForPatient( patient ) );
+ // mapRelationShip.put( patient.getId(),
+ // relationshipService.getRelationshipsForPatient( patient ) );
if ( sortingPatientAttribute != null )
{
@@ -349,9 +455,17 @@
private void searchPatientByAttribute( String searchText, PatientAttribute sortingPatientAttribute )
{
+ int index = searchText.indexOf( ' ' );
+
+ if ( index != -1 && index == searchText.lastIndexOf( ' ' ) )
+ {
+ String[] keys = searchText.split( " " );
+ searchText = keys[0] + " " + keys[1];
+ }
+
total = patientService.countGetPatients( searchText );
this.paging = createPaging( total );
-
+
patients = patientService.getPatients( searchText, paging.getStartPos(), paging.getPageSize() );
if ( patients != null && patients.size() > 0 )
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/relationship/RemoveRelationshipAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/relationship/RemoveRelationshipAction.java 2009-11-14 14:29:33 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/relationship/RemoveRelationshipAction.java 2011-07-19 03:48:05 +0000
@@ -54,11 +54,11 @@
// Input/Output
// -------------------------------------------------------------------------
- private int relationshipId;
+ private int id;
- public void setRelationshipId( int relationshipId )
+ public void setId( int id )
{
- this.relationshipId = relationshipId;
+ this.id = id;
}
// -------------------------------------------------------------------------
@@ -68,7 +68,7 @@
public String execute()
throws Exception
{
- Relationship relationship = relationshipService.getRelationship( relationshipId );
+ Relationship relationship = relationshipService.getRelationship( id );
relationshipService.deleteRelationship( relationship );
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/relationship/RemoveRepresentativeAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/relationship/RemoveRepresentativeAction.java 2011-03-31 01:42:05 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/relationship/RemoveRepresentativeAction.java 2011-07-19 03:48:05 +0000
@@ -28,7 +28,6 @@
import org.hisp.dhis.patient.Patient;
import org.hisp.dhis.patient.PatientService;
-import org.hisp.dhis.patient.state.SelectedStateManager;
import com.opensymphony.xwork2.Action;
@@ -43,13 +42,6 @@
// Dependencies
// -------------------------------------------------------------------------
- private SelectedStateManager selectedStateManager;
-
- public void setSelectedStateManager( SelectedStateManager selectedStateManager )
- {
- this.selectedStateManager = selectedStateManager;
- }
-
private PatientService patientService;
public void setPatientService( PatientService patientService )
@@ -61,11 +53,11 @@
// Input/Output
// -------------------------------------------------------------------------
- private Patient patient;
+ private Integer patientId;
- public Patient getPatient()
+ public void setPatientId( Integer patientId )
{
- return patient;
+ this.patientId = patientId;
}
// -------------------------------------------------------------------------
@@ -75,7 +67,7 @@
public String execute()
throws Exception
{
- patient = selectedStateManager.getSelectedPatient();
+ Patient patient = patientService.getPatient( patientId );
patient.setRepresentative( null );
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/relationship/SaveRepresentativeAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/relationship/SaveRepresentativeAction.java 2011-03-20 18:15:01 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/relationship/SaveRepresentativeAction.java 2011-07-19 03:48:05 +0000
@@ -28,7 +28,6 @@
import org.hisp.dhis.patient.Patient;
import org.hisp.dhis.patient.PatientService;
-import org.hisp.dhis.patient.state.SelectedStateManager;
import org.hisp.dhis.patientattributevalue.PatientAttributeValueService;
import com.opensymphony.xwork2.Action;
@@ -50,14 +49,7 @@
{
this.patientService = patientService;
}
-
- private SelectedStateManager selectedStateManager;
-
- public void setSelectedStateManager( SelectedStateManager selectedStateManager )
- {
- this.selectedStateManager = selectedStateManager;
- }
-
+
private PatientAttributeValueService patientAttributeValueService;
public void setPatientAttributeValueService( PatientAttributeValueService patientAttributeValueService )
@@ -69,11 +61,11 @@
// Input/Output
// -------------------------------------------------------------------------
- private Patient patient;
+ private Integer patientId;
- public Patient getPatient()
+ public void setPatientId( Integer patientId )
{
- return patient;
+ this.patientId = patientId;
}
private Integer representativeId;
@@ -90,6 +82,13 @@
this.copyAttribute = copyAttribute;
}
+ private Patient patient;
+
+ public Patient getPatient()
+ {
+ return patient;
+ }
+
// -------------------------------------------------------------------------
// Action implementation
// -------------------------------------------------------------------------
@@ -99,7 +98,7 @@
{
Patient representative = patientService.getPatient( representativeId );
- patient = selectedStateManager.getSelectedPatient();
+ patient = patientService.getPatient( patientId );
patient.setRepresentative( representative );
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/state/SelectedStateManager.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/state/SelectedStateManager.java 2011-03-31 01:42:05 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/state/SelectedStateManager.java 2011-07-19 03:48:05 +0000
@@ -89,7 +89,7 @@
boolean getListAll();
void clearListAll();
-
+
// -------------------------------------------------------------------------
// for Sorting patients - Sort by patient-attribute
// -------------------------------------------------------------------------
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/META-INF/dhis/beans.xml 2011-07-07 08:03:22 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/META-INF/dhis/beans.xml 2011-07-19 03:48:05 +0000
@@ -132,8 +132,6 @@
id="org.hisp.dhis.patient.action.relationship.SaveRepresentativeAction"
class="org.hisp.dhis.patient.action.relationship.SaveRepresentativeAction"
scope="prototype">
- <property name="selectedStateManager"
- ref="org.hisp.dhis.patient.state.SelectedStateManager" />
<property name="patientService" ref="org.hisp.dhis.patient.PatientService" />
<property name="patientAttributeValueService"
ref="org.hisp.dhis.patientattributevalue.PatientAttributeValueService" />
@@ -144,8 +142,6 @@
class="org.hisp.dhis.patient.action.relationship.RemoveRepresentativeAction"
scope="prototype">
<property name="patientService" ref="org.hisp.dhis.patient.PatientService" />
- <property name="selectedStateManager"
- ref="org.hisp.dhis.patient.state.SelectedStateManager" />
</bean>
<bean
@@ -378,8 +374,8 @@
<bean id="org.hisp.dhis.patient.action.patient.SearchPatientAction"
class="org.hisp.dhis.patient.action.patient.SearchPatientAction"
scope="prototype">
- <property name="selectionManager"
- ref="org.hisp.dhis.ouwt.manager.OrganisationUnitSelectionManager" />
+ <property name="selectedStateManager"
+ ref="org.hisp.dhis.patient.state.SelectedStateManager" />
<property name="patientService" ref="org.hisp.dhis.patient.PatientService" />
<property name="patientAttributeValueService"
ref="org.hisp.dhis.patientattributevalue.PatientAttributeValueService" />
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/org/hisp/dhis/patient/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/org/hisp/dhis/patient/i18n_module.properties 2011-07-08 05:52:59 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/org/hisp/dhis/patient/i18n_module.properties 2011-07-19 03:48:05 +0000
@@ -468,4 +468,5 @@
save_success = Save successfully
configuration_xml_file_null = Configuration of folder where contains xml file is null
there_is_no_defination_xml_file_in_user_home = There is no any definition related XML file in the user home
-patient_attribute_group_sort_order = Beneficiary Attribute Group Sort Order
\ No newline at end of file
+patient_attribute_group_sort_order = Beneficiary Attribute Group Sort Order
+enrol_success = Enrol successfully.
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/struts.xml'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/struts.xml 2011-07-08 05:52:59 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/struts.xml 2011-07-19 03:48:05 +0000
@@ -135,8 +135,8 @@
<action name="removeRelationship"
class="org.hisp.dhis.patient.action.relationship.RemoveRelationshipAction">
- <result name="success" type="redirect">getRelationshipList.action
- </result>
+ <result name="success" type="velocity-json">
+ /dhis-web-commons/ajax/jsonResponseSuccess.vm</result>
<param name="requiredAuthorities">F_RELATIONSHIP_DELETE</param>
</action>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addPatientForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addPatientForm.vm 2011-07-11 03:52:31 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addPatientForm.vm 2011-07-19 03:48:05 +0000
@@ -31,7 +31,7 @@
</script>
<h3>$i18n.getString( "add_new_patient" )</h3>
-<p><input type="button" value="$i18n.getString( 'back_to_search' )" onclick="onClickBackBtn();" style="width:10em"/></p>
+<p><input type="button" value="$i18n.getString( 'back_to_search' )" onclick="loadPatientList();" style="width:10em"/></p>
<form id="addPatientForm" name="addPatientForm" method="post" >
<input type="hidden" id="representativeId" name="representativeId"/>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addRelationshipForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addRelationshipForm.vm 2011-05-13 09:11:13 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addRelationshipForm.vm 2011-07-19 03:48:05 +0000
@@ -4,20 +4,19 @@
jQuery('name').focus();
validation( 'relationshipSelectForm', function(form){
- form.submit();
+ validateSearchPartner();
});
});
</script>
<div>
- <input type="button" value="$i18n.getString( 'back_to_search' )" onclick="onClickRelationshipBackBtn()" style="width:10em"/>
+ <input type="button" value="$i18n.getString( 'back_to_search' )" onclick="showRelationshipList($patient.id)" style="width:10em"/>
</div>
<h3>$i18n.getString( "adding_new_relationship_for" )</h3>
-<form id="relationshipSelectForm" name="relationshipSelectForm" method="post" action="showAddRelationshipForm.action" onsubmit="return validateSearchPartner()">
+<form id="relationshipSelectForm" name="relationshipSelectForm" method="post" action="showAddRelationshipForm.action">
<input type="hidden" id="patientId" name="patientId" value="$patient.id"/>
-
<table>
<tr>
<td style="vertical-align:top" bgcolor="#cccccc">
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addRelationshipPatientForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addRelationshipPatientForm.vm 2011-07-11 03:52:31 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addRelationshipPatientForm.vm 2011-07-19 03:48:05 +0000
@@ -24,7 +24,7 @@
});
</script>
<div>
- <input type="button" value="$i18n.getString( "back_to_search" )" onclick="onClickRelationshipBackBtn();" style="width:10em">
+ <input type="button" value="$i18n.getString( "back_to_search" )" onclick="showRelationshipList($patient.id);" style="width:10em">
</div>
<h3>$i18n.getString("add_new_relationship_for"): $patient.getFullName()</h3>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/patient.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/patient.js 2011-06-23 03:10:28 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/patient.js 2011-07-19 03:48:05 +0000
@@ -337,7 +337,7 @@
}
else if ( type == 'input' )
{
- setMessage( message );
+ showErrorMessage( message );
}
else if( type == 'duplicate' )
{
@@ -384,7 +384,7 @@
}
else if ( type == 'input' )
{
- setMessage( message );
+ showErrorMessage( message );
}
else if( type == 'duplicate' )
{
@@ -692,10 +692,9 @@
jQuery('#loaderDiv').show();
contentDiv = 'listPatientDiv';
- jQuery('#listPatientDiv').load('searchPatient.action?listAll=true',
+ jQuery('#listPatientDiv').load('searchPatient.action?listAll=true',{},
function(){
showById('listPatientDiv');
- setInnerHTML( 'searchTextInfo', i18n_list_all_patient );
jQuery('#loaderDiv').hide();
});
hideLoader();
@@ -835,11 +834,11 @@
}
else if ( type == 'error' )
{
- window.alert( i18n_program_enrollment_failed + ':' + '\n' + message );
+ showErrorMessage( i18n_program_enrollment_failed + ':' + '\n' + message );
}
else if ( type == 'input' )
{
- setMessage( json.message );
+ showWarningMessage( json.message );
}
}
});
@@ -855,7 +854,7 @@
success: function( html ) {
setInnerHTML('programEnrollmentDiv', html );
jQuery('#enrollBtn').attr('value',i18n_update);
- setMessage( i18n_save_success );
+ showSuccessMessage( i18n_enrol_success );
}
});
return false;
@@ -901,6 +900,8 @@
{
setFieldValue( 'enrollmentDate', json.dateOfIncident );
setFieldValue( 'dateOfIncident', json.enrollmentDate );
+ setFieldValue( 'dateOfEnrollmentDescription', json.dateOfEnrollmentDescription );
+ setFieldValue( 'dateOfIncidentDescription', json.dateOfIncidentDescription );
showById( 'unenrollmentFormDiv' );
$( "#loaderDiv" ).hide();
});
@@ -964,19 +965,30 @@
function showRelationshipList( patientId )
{
- hideById('selectDiv');
- hideById('searchPatientDiv');
- hideById('listPatientDiv');
+ hideById('addRelationshipDiv');
- jQuery('#loaderDiv').show();
- jQuery('#listRelationshipDiv').load('showRelationshipList.action',
- {
- id:patientId
- }, function()
- {
- showById('listRelationshipDiv');
- jQuery('#loaderDiv').hide();
- });
+ if ( getFieldValue('isShowPatientList') == 'false' )
+ {
+ hideById('selectDiv');
+ hideById('searchPatientDiv');
+ hideById('listPatientDiv');
+
+ jQuery('#loaderDiv').show();
+ jQuery('#listRelationshipDiv').load('showRelationshipList.action',
+ {
+ id:patientId
+ }, function()
+ {
+ showById('listRelationshipDiv');
+ jQuery('#loaderDiv').hide();
+ });
+ }
+ else
+ {
+ showById('selectDiv');
+ showById('searchPatientDiv');
+ showById('listPatientDiv');
+ }
}
// ----------------------------------------------------------------
@@ -996,23 +1008,21 @@
hideById('addRelationshipDiv');
}
-
-function onClickRelationshipBackBtn()
+function loadPatientList()
{
- if ( byId('listRelationshipDiv').innerHTML == '' )
- {
- onClickBackBtn();
- return;
- }
-
- showById('listRelationshipDiv');
-
- hideById('selectDiv');
- hideById('searchPatientDiv');
- hideById('listPatientDiv');
+ showById('selectDiv');
+ showById('searchPatientDiv');
+ showById('listPatientDiv');
+
hideById('addPatientDiv');
hideById('updatePatientDiv');
hideById('enrollmentDiv');
+ hideById('listRelationshipDiv');
hideById('addRelationshipDiv');
+
+ $('#listPatientDiv').load("searchPatient.action", {}
+ , function(){
+ showById('listPatientDiv');
+ $( "#loaderDiv" ).hide();
+ });
}
-
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/relationship.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/relationship.js 2011-05-26 03:19:50 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/relationship.js 2011-07-19 03:48:05 +0000
@@ -219,15 +219,15 @@
if( type == 'success' )
{
- setMessage( i18n_save_success );
+ showSuccessMessage( i18n_save_success );
}
else if( type == 'error' )
{
- window.alert( i18n_adding_relationship_failed + ':' + '\n' + message );
+ showErrorMessage( i18n_adding_relationship_failed + ':' + '\n' + message );
}
else if( type == 'input' )
{
- setMessage( message );
+ showWarningMessage( message );
}
jQuery('#loaderDiv').hide();
}
@@ -238,46 +238,8 @@
function removeRelationship( relationshipId, patientA, aIsToB, patientB )
{
-
- var result = window.confirm( i18n_confirm_delete_relationship + '\n\n' + patientA + ' is ' + aIsToB + ' to ' + patientB );
-
- if( result )
- {
- window.location = 'removeRelationship.action?relationshipId=' + relationshipId;
- }
-}
-
-
-/*function removeRelationship( relationshipId, patientA, aIsToB, patientB )
-{
-
- var result = window.confirm( i18n_confirm_delete_relationship + '\n\n' + patientA + ' is ' + aIsToB + ' to ' + patientB );
-
- if( result )
- {
- var request = new Request();
- request.setResponseTypeXML( 'message' );
- request.setCallbackSuccess( removeRelationshipCompleted );
- request.send( 'removeRelationship.action?relationshipId=' + relationshipId );
- }
-}
-
-function removeRelationshipCompleted( messageElement )
-{
- var type = messageElement.getAttribute( 'type' );
- var message = messageElement.firstChild.nodeValue;
-
- if( type == 'success' )
- {
- window.location = "getRelationshipList.action";
- }
- else if( type = 'error' )
- {
- setInnerHTML( 'warningField', message );
-
- showWarning();
- }
-}*/
+ removeItem( relationshipId, patientA + ' is ' + aIsToB + ' to ' + patientB, i18n_confirm_delete_relationship, 'removeRelationship.action' );
+}
//------------------------------------------------------------------------------
// Relationship partner
@@ -295,7 +257,8 @@
{
var partnerIsRepresentative = getElementValue( patientElement, 'partnerIsRepresentative' );
- var partnerId = '<div><input type="hidden" id="partnerId" name="partnerId" value="' + getElementValue( patientElement, 'id' ) + '"></div>';
+ var patientId = getFieldValue('id' );
+ var partnerId = getElementValue( patientElement, 'id' );
var labelField;
var buttonFirstField;
var buttonSecondField;
@@ -304,21 +267,20 @@
{
labelField = i18n_do_you_want_to_remove_this_one_from_being_representative;
- buttonFirstField = '<input type="button" value="' + i18n_yes + '" onclick="javascript:removeRepresentative()">';
+ buttonFirstField = '<input type="button" value="' + i18n_yes + '" onclick="javascript:removeRepresentative( ' + patientId + ',' + partnerId + ')">';
buttonSecondField = ' ';
}
else if( partnerIsRepresentative == 'false' )
{
labelField = i18n_do_you_want_to_make_this_one_a_representative;
- buttonFirstField = '<input type="button" value="' + i18n_yes + '" onclick="javascript:saveRepresentative( false )">';
- buttonSecondField= '<input type="button" value="' + i18n_yes_and_attribute + '" onclick="javascript:saveRepresentative( true )">';
+ buttonFirstField = '<input type="button" value="' + i18n_yes + '" onclick="javascript:saveRepresentative( ' + patientId + ',' + partnerId + ', false )">';
+ buttonSecondField= '<input type="button" value="' + i18n_yes_and_attribute + '" onclick="javascript:saveRepresentative( ' + patientId + ',' + partnerId + ', true )">';
}
setInnerHTML( 'labelField', labelField );
setInnerHTML( 'buttonFirstField', buttonFirstField );
setInnerHTML( 'buttonSecondField', buttonSecondField );
- setInnerHTML( 'partnerIdField', partnerId );
setInnerHTML( 'fullNameField', getElementValue( patientElement, 'fullName' ) );
setInnerHTML( 'genderField', getElementValue( patientElement, 'gender' ) );
setInnerHTML( 'dateOfBirthField', getElementValue( patientElement, 'dateOfBirth' ) );
@@ -353,15 +315,18 @@
node.style.display = 'none';
}
-function saveRepresentative( copyAttribute )
-{
- var representativeId = document.getElementById( 'partnerId' );
+function saveRepresentative( patientId, representativeId, copyAttribute )
+{
+ var url = 'saveRepresentative.action'
+ var params = 'patientId=' + patientId
+ params += '&representativeId=' + representativeId;
+ params += '©Attribute=' + copyAttribute;
- var url = 'saveRepresentative.action?representativeId=' + representativeId.value + '©Attribute=' + copyAttribute;
var request = new Request();
request.setResponseTypeXML( 'message' );
- request.setCallbackSuccess( saveRepresentativeCompleted );
+ request.setCallbackSuccess( saveRepresentativeCompleted );
+ request.sendAsPost( params );
request.send( url );
return false;
@@ -374,27 +339,28 @@
if( type == 'success' )
{
- window.location = "getRelationshipList.action";
+ hideById('relationshipPartnerContainer');
}
else if( type == 'error' )
{
- window.alert( i18n_saving_representative_failed + ':' + '\n' + message );
+ showErrorMessage( i18n_saving_representative_failed + ':' + '\n' + message );
}
else if( type == 'input' )
{
- setHeaderMessage( message );
+ showWarningMessage( message );
}
}
-function removeRepresentative()
+function removeRepresentative( patientId, representativeId )
{
- var representativeId = document.getElementById( 'partnerId' );
-
- var url = 'removeRepresentative.action?representativeId=' + representativeId.value;
+ var url = 'removeRepresentative.action';
+ var params = 'patientId=' + patientId;
+ params +='&representativeId=' + representativeId;
var request = new Request();
request.setResponseTypeXML( 'message' );
- request.setCallbackSuccess( removeRepresentativeCompleted );
+ request.setCallbackSuccess( removeRepresentativeCompleted );
+ request.sendAsPost( params );
request.send( url );
return false;
@@ -408,7 +374,7 @@
if( type == 'success' )
{
- window.location = "getRelationshipList.action";
+ showRelationshipList( getFieldValue('id') );
}
else if( type == 'error' )
{
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/relationshipPatient.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/relationshipPatient.js 2011-07-11 03:52:31 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/relationshipPatient.js 2011-07-19 03:48:05 +0000
@@ -3,7 +3,7 @@
// Add Relationship Patient
// -----------------------------------------------------------------------------
-function showAddRelationshipPatient( patientId )
+function showAddRelationshipPatient( patientId, isShowPatientList )
{
hideById( 'selectDiv' );
hideById( 'searchPatientDiv' );
@@ -17,6 +17,7 @@
}, function()
{
showById('addRelationshipDiv');
+ setFieldValue( 'isShowPatientList', isShowPatientList );
jQuery('#loaderDiv').hide();
});
}
@@ -44,11 +45,11 @@
}
else if ( type == 'error' )
{
- window.alert( i18n_adding_patient_failed + ':' + '\n' + message );
+ showErrorMessage( i18n_adding_patient_failed + ':' + '\n' + message );
}
else if ( type == 'input' )
{
- setHeaderMessage( message );
+ showWarningMessage( message );
}
else if( type == 'duplicate' )
{
@@ -72,6 +73,12 @@
showById('searchPatientDiv');
showById('listPatientDiv');
jQuery('#loaderDiv').hide();
+
+ var isShowPatientList = setFieldValue( 'isShowPatientList', isShowPatientList );
+ if( !isShowPatientList )
+ {
+ showRelationshipList( getFieldValue('id') );
+ }
}
});
return false;
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/listPatient.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/listPatient.vm 2011-06-14 07:44:43 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/listPatient.vm 2011-07-19 03:48:05 +0000
@@ -3,8 +3,14 @@
<td>$i18n.getString( "search_result_matching_the_search_criteria" )</td>
<td> </td>
<td> </td>
- <td>
- <span id='searchTextInfo'></span>
+ <td id='searchTextInfo'>
+ #if($!program)
+ $i18n.getString( "list_patients_by_program") '$program.name'
+ #elseif($!searchText)
+ $searchText
+ #else
+ $i18n.getString( "list_all_patients" )
+ #end
</td>
</tr>
<tr>
@@ -101,8 +107,8 @@
<a href="javascript:showProgramEnrollmentSelectForm( '$patient.id' )" title='$i18n.getString( "manage_program_enrollment" )'><img src="../images/enroll.png" alt='$i18n.getString( "manage_program_enrollment" )'></a>
<a href="javascript:showUnenrollmentSelectForm('$patient.id')" title='$i18n.getString( "manage_program_unenrollment" )'><img src="../images/unenroll.png" alt='$i18n.getString( "manage_program_unenrollment" )'></a>
<a href="javascript:showUpdatePatientForm( '$patient.id' )" title='$i18n.getString( "edit_profile" )'><img src="../images/edit.png" alt='$i18n.getString( "edit_profile" )'></a>
- <a href="javascript:showRelationshipList('$patient.id')" title='$i18n.getString( "manage_relationship" )'><img src="../images/relationship.png" alt='$i18n.getString( "manage_relationship" )'></a>
- <a href="javascript:showAddRelationshipPatient('$patient.id')" title='$i18n.getString( "add_dependent" )'><img src="../images/add.png" alt='$i18n.getString( "add_dependent" )'></a>
+ <a href="javascript:setFieldValue( 'isShowPatientList', false ); showRelationshipList('$patient.id')" title='$i18n.getString( "manage_relationship" )'><img src="../images/relationship.png" alt='$i18n.getString( "manage_relationship" )'></a>
+ <a href="javascript:showAddRelationshipPatient( '$patient.id', true )" title='$i18n.getString( "add_dependent" )'><img src="../images/add.png" alt='$i18n.getString( "add_dependent" )'></a>
<a href="javascript:removePatient( '$patient.id', '$encoder.jsEncode( $patient.getFullName() )' )" title='$i18n.getString( "remove" )'><img src="../images/delete.png" alt='$i18n.getString( "remove" )'></a>
<a href="javascript:showPatientDetails( '$patient.id' )" title='$i18n.getString( "show_details" )'><img src="../images/information.png" alt='$i18n.getString( "show_details" )'></a>
</td>
@@ -128,12 +134,12 @@
<div id="detailsArea" style="display:none;overflow:auto;height:250px;width:250px">
<div style="float:right">
- <a href="javascript:hideDetails()" title="$i18n.getString( "hide_details" )"><img src="../images/close.png" alt="$i18n.getString( "hide_details" )"></a>
+ <a href="javascript:hideDetails()" title="$i18n.getString( 'hide_details' )"><img src="../images/close.png" alt="$i18n.getString( 'hide_details' )"></a>
</div>
- <p><label>$i18n.getString( "common_info" ):</label><br><span id="commonInfoField"></span></p>
- <p><label>$i18n.getString( "identifier" ):</label><br><span id="identifierField"></span></p>
- <p><label>$i18n.getString( "attributes" ):</label><br><span id="attributeField"></span></p>
- <p><label>$i18n.getString( "enrolled_in_program" ):</label><br><span id="programField"></span></p>
+ <p><label><strong>$i18n.getString( "common_info" ):</strong></label><br><span id="commonInfoField"></span></p>
+ <p><label><strong>$i18n.getString( "identifier" ):</strong></label><br><span id="identifierField"></span></p>
+ <p><label><strong>$i18n.getString( "attributes" ):</strong></label><br><span id="attributeField"></span></p>
+ <p><label><strong>$i18n.getString( "enrolled_in_program" ):</strong></label><br><span id="programField"></span></p>
</div>
<script type="text/javascript">
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/programUnenrollmentSelectForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/programUnenrollmentSelectForm.vm 2011-05-13 09:11:13 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/programUnenrollmentSelectForm.vm 2011-07-19 03:48:05 +0000
@@ -60,10 +60,10 @@
<tr>
<td style="width:180px"><label for="programId">$i18n.getString( "program" )</label></td>
<td>
- <select id="programInstanceId" name="programInstanceId" onchange="showUnenrollmentForm('$patient.id', jQuery('#programInstanceId :selected').attr('programId') )" style="min-width:200px" >
+ <select id="programInstanceId" name="programInstanceId" onchange="showUnenrollmentForm( this.value )" style="min-width:200px" >
<option value="0">[$i18n.getString( "select" )]</option>
#foreach( $instance in $programInstances )
- <option value="$instance.id" programId="$instance.program.id" >$encoder.htmlEncode( $instance.program.name )</option>
+ <option value="$instance.id" >$encoder.htmlEncode( $instance.program.name )</option>
#end
</select>
</td>
@@ -76,12 +76,12 @@
<table width="100%">
<tr>
<td style="width:20px"><label for="enrollmentDate">$i18n.getString( "date_of_enrollment" ) <em title="$i18n.getString( "required" )" class="required">*</em></label></td>
- <td><input type="text" style="width:180px" id="enrollmentDate" name="enrollmentDate" value="$!format.formatDate( $programInstance.enrollmentDate )"> <i>( $!programInstance.program.dateOfEnrollmentDescription )</i></td>
+ <td><input type="text" style="width:180px" id="enrollmentDate" name="enrollmentDate" value="$!format.formatDate( $programInstance.enrollmentDate )"> <i id='dateOfEnrollmentDescription'></i></td>
</tr>
<tr>
<td style="width:180px"><label for="dateOfIncident">$i18n.getString( "date_of_incident" ) <em title="$i18n.getString( "required" )" class="required">*</em></label></td>
- <td><input type="text" style="width:180px" id="dateOfIncident" name="dateOfIncident" value="$!format.formatDate( $programInstance.dateOfIncident )"><i>( $!programInstance.program.dateOfIncidentDescription )</i></td>
+ <td><input type="text" style="width:180px" id="dateOfIncident" name="dateOfIncident" value="$!format.formatDate( $programInstance.dateOfIncident )"><i id='dateOfIncidentDescription'></i></td>
</tr>
<tr>
<td></td>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/relationshipList.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/relationshipList.vm 2011-05-13 09:11:13 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/relationshipList.vm 2011-07-19 03:48:05 +0000
@@ -42,7 +42,7 @@
<input type="button" value="$i18n.getString( "add_new" )" onclick="javascript:showAddRelationship('$patient.id')">
</td>
<td style="text-align:right">
- <input type="button" value="$i18n.getString( "add_new_patient" )" onclick="javascript:showAddRelationshipPatient('$patient.id')">
+ <input type="button" value="$i18n.getString( "add_new_patient" )" onclick="javascript:showAddRelationshipPatient( '$patient.id',false )">
</td>
</tr>
@@ -104,7 +104,6 @@
</tr>
<tr>
<td>
- <span id="partnerIdField"></span>
<strong>$i18n.getString( "full_name" ):</strong><span id="fullNameField"></span><br>
<strong>$i18n.getString( "gender" ):</strong><span id="genderField"></span><br>
<strong>$i18n.getString( "date_of_birth" ):</strong><span id="dateOfBirthField"></span><br>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/responsePartner.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/responsePartner.vm 2009-11-12 11:27:02 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/responsePartner.vm 2011-07-19 03:48:05 +0000
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<partner>
+<partner>
<partnerIsRepresentative>$partnerIsRepresentative</partnerIsRepresentative>
<id>$partner.id</id>
<fullName>$encoder.xmlEncode( $partner.getFullName() )</fullName>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/responseProgramInstance.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/responseProgramInstance.vm 2011-05-13 09:11:13 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/responseProgramInstance.vm 2011-07-19 03:48:05 +0000
@@ -1,5 +1,7 @@
{
"programInstanceId":"$programInstance.id",
"dateOfIncident":"$!format.formatDate( $programInstance.dateOfIncident )",
- "enrollmentDate":"$!format.formatDate( $programInstance.enrollmentDate )"
+ "enrollmentDate":"$!format.formatDate( $programInstance.enrollmentDate )",
+ "dateOfIncidentDescription":"($!programInstance.program.dateOfIncidentDescription)",
+ "dateOfEnrollmentDescription":"($!programInstance.program.dateOfIncidentDescription)"
}
\ 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/selectPatient.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/selectPatient.vm 2011-06-23 03:10:28 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/selectPatient.vm 2011-07-19 03:48:05 +0000
@@ -1,5 +1,6 @@
<div id='selectDiv'>
-
+ <input type="hidden" id="isShowPatientList" name="isShowPatientList" />
+
<h3>$i18n.getString( "patient_management" )</h3>
<table>
@@ -66,8 +67,6 @@
<div id='listRelationshipDiv'></div> <!-- List relationship -->
<div id='addRelationshipDiv'></div> <!-- Add relationship -->
-<span id='message' onclick="hideById('message');"></span>
-
#parse( "/dhis-web-commons/loader/loader.vm" )
<script>
@@ -78,6 +77,7 @@
var i18n_select_program = '[' + '$encoder.jsEscape( $i18n.getString( "select_program" ), "'")' + ']';
var i18n_save_success = '$encoder.jsEscape( $i18n.getString( "save_success" ) , "'")';
var i18n_list_all_patient = '$encoder.jsEscape( $i18n.getString( "list_all_patient" ) , "'")';
+ var i18n_enrol_success = '$encoder.jsEscape( $i18n.getString( "enrol_success" ) , "'")';
var i18n_program_enrollment_failed = '$encoder.jsEscape( $i18n.getString( "program_enrollment_failed" ) , "'")';
var i18n_saving_value_failed_status_code = '$encoder.jsEscape( $i18n.getString( "saving_value_failed_status_code" ) , "'")';
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updatePatientForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updatePatientForm.vm 2011-05-26 08:02:38 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updatePatientForm.vm 2011-07-19 03:48:05 +0000
@@ -50,7 +50,7 @@
</script>
<h3>$i18n.getString( "update_patient" )</h3>
-<p><input type="button" value="$i18n.getString( 'back_to_search' )" onclick="onClickBackBtn();" style="width:10em"/></p>
+<p><input type="button" value="$i18n.getString( 'back_to_search' )" onclick="loadPatientList();" style="width:10em"/></p>
<form id="updatePatientForm" name="updatePatientForm" action="updatePatient.action" method="post" >
<input type="hidden" id="representativeId" name="representativeId"/>