dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #26265
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 13013: Fixed bug - Exception thrown when to update patient.
------------------------------------------------------------
revno: 13013
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2013-11-25 15:38:25 +0700
message:
Fixed bug - Exception thrown when to update patient.
modified:
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/patient.js
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/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-caseentry/src/main/webapp/dhis-web-caseentry/javascript/patient.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/patient.js 2013-10-25 05:00:41 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/patient.js 2013-11-25 08:38:25 +0000
@@ -227,7 +227,7 @@
url: 'updatePatient.action',
data: params,
success: function( json ) {
- showPatientDashboardForm( getFieldValue('id') );
+ showPatientDashboardForm( getFieldValue('uid') );
$("#patientForm :input").attr("disabled", false);
$("#patientForm").find("select").attr("disabled", false);
}
@@ -319,6 +319,14 @@
return false;
}
+function updatePatient()
+{
+ var patient = new Patient();
+ var params = getParamsForDiv('patientForm');
+ patient.update();
+ return false;
+}
+
function showAddPatientForm( patientId, programId, relatedProgramId, related )
{
hideById('listPatientDiv');
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/updatePatientForm.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/updatePatientForm.vm 2013-11-25 08:18:35 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/updatePatientForm.vm 2013-11-25 08:38:25 +0000
@@ -15,7 +15,7 @@
,errorElement:"span"
,submitHandler: function(form)
{
- validatePatient( true );
+ updatePatient();
}
,beforeValidateHandler: function(form)
{
@@ -71,7 +71,7 @@
<input type="hidden" id="representativeId" name="representativeId" value='$!patient.representative.id' />
<input type="hidden" id="relationshipTypeId" name='relationshipTypeId' value="$!relationship.relationshipType.id"/>
<input type="hidden" id="id" name="id" value="$patient.id">
-
+<input type="hidden" id="uid" name="uid" value="$patient.uid">
<table>
#if($!customRegistrationForm)