dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #11195
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 3164: Fix bug: Thrown exception when updating beneficiaries.
------------------------------------------------------------
revno: 3164
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2011-03-25 11:52:13 +0700
message:
Fix bug: Thrown exception when updating beneficiaries.
modified:
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/AddPatientAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/GetPatientAction.java
--
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/AddPatientAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/AddPatientAction.java 2011-03-20 17:57:30 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/AddPatientAction.java 2011-03-25 04:52:13 +0000
@@ -230,9 +230,8 @@
{
if ( identifierType.getFormat() != null && identifierType.getFormat().equals( "State Format" ) )
{
- value = request.getParameter( "progcode" ) + request.getParameter( "yearcode" )
+ value = organisationUnit.getCode() + request.getParameter( "progcode" ) + request.getParameter( "yearcode" )
+ request.getParameter( "benicode" );
- System.out.println( "value = " + value );
}
else
{
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/GetPatientAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/GetPatientAction.java 2011-03-20 17:57:30 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/GetPatientAction.java 2011-03-25 04:52:13 +0000
@@ -114,18 +114,22 @@
public String execute()
throws Exception
+ {
+ try
{
+
+
patient = patientService.getPatient( id );
-
+
patientIdentifier = patientIdentifierService.getPatientIdentifier( patient );
-
+
identifierTypes = patientIdentifierTypeService.getAllPatientIdentifierTypes();
-
+
identiferMap = new HashMap<Integer, String>();
PatientIdentifierType idType = null;
Patient representative = patient.getRepresentative();
-
+
if ( patient.isUnderAge() && representative != null )
{
for ( PatientIdentifier representativeIdentifier : representative.getIdentifiers() )
@@ -138,7 +142,7 @@
}
}
}
-
+
for ( PatientIdentifier identifier : patient.getIdentifiers() )
{
idType = identifier.getIdentifierType();
@@ -159,7 +163,7 @@
else
systemIdentifier = identifier.getIdentifier();
}
-
+
for ( PatientAttribute patientAttribute : patient.getAttributes() )
{
patientAttributeValueMap.put( patientAttribute.getId(), PatientAttributeValue.UNKNOWN );
@@ -167,7 +171,7 @@
Collection<PatientAttributeValue> patientAttributeValues = patientAttributeValueService
.getPatientAttributeValues( patient );
-
+
for ( PatientAttributeValue patientAttributeValue : patientAttributeValues )
{
if ( PatientAttribute.TYPE_COMBO.equalsIgnoreCase( patientAttributeValue.getPatientAttribute()
@@ -184,11 +188,15 @@
}
programs = programService.getAllPrograms();
-
+System.out.println("\n programs : " + programs);
noGroupAttributes = patientAttributeService.getPatientAttributesNotGroup();
-
+System.out.println("\n noGroupAttributes : " + noGroupAttributes);
attributeGroups = patientAttributeGroupService.getAllPatientAttributeGroups();
+System.out.println("\n attributeGroups : " + attributeGroups);
+ }catch(Exception ex){
+ ex.printStackTrace();
+ }
return SUCCESS;
}