dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #11090
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 3102: Codestyle fix
------------------------------------------------------------
revno: 3102
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Sun 2011-03-20 19:15:01 +0100
message:
Codestyle fix
modified:
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientimport/ImportPatientAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientimport/XMLItem.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/AddProgramAttributeAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/GetProgramListAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/UpdateProgramAttributeAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/ValidateProgramAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/ValidateProgramAttributeAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/programstage/AddProgramStageAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/programstage/GetProgramStageAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/programstage/SaveProgramStageSortOrderAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/programstage/ShowAddProgramStageFormAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/programstage/ShowSortProgramStageFormAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/programstage/ValidateProgramStageAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/relationship/AddRelationshipPatientAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/relationship/GetRelationshipListAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/relationship/SaveRelationshipAction.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/action/relationship/ShowAddRelationshipFormAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/relationship/ShowAddRelationshipPatientAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/relationship/ValidateRelationshipTypeAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/relationship/ValidateSearchAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/validation/AddValidationCriteriaAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/validation/GetProgramListForValidationCriteriaAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/validation/UpdateValidationCriteriaAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/idgen/PatientIdentifierGenerator.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/screen/DataEntryManager.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/screen/DefaultDataEntryManager.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/state/DefaultSelectedStateManager.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/patientimport/ImportPatientAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientimport/ImportPatientAction.java 2010-12-23 11:56:44 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientimport/ImportPatientAction.java 2011-03-20 18:15:01 +0000
@@ -350,11 +350,11 @@
// Validate data of patient is right, continue to get
// information into excel file
// -------------------------------------------------------------
-
+
ProgramInstance programInstance = null;
List<ProgramStageInstance> programStageInstances = null;
Collection<PatientDataValue> patientDataValues = null;
-
+
if ( validatePatient( patient, identifiers, row )
&& validatePatientAttribute( patient, attributes, attributeValues, row ) )
{
@@ -370,7 +370,6 @@
// Get programStageInstance for patient
programStageInstances = getProgramStageInstances( programInstance, row, wb );
-
}
catch ( Exception ex )
{
@@ -404,23 +403,12 @@
// Get PatientDataValue
// -------------------------------------------------------------
- patientDataValues = getPatientDataValue( orgunit, programInstance, programStageInstances, row,
- wb );
- // save dataValue
+ patientDataValues = getPatientDataValue( orgunit, programInstance, programStageInstances, row, wb );
+
for ( PatientDataValue patientDataValue : patientDataValues )
{
patientDataValueService.savePatientDataValue( patientDataValue );
}
-
- // else
- // {
- // dataValue.setTimestamp( new Date() );
- // dataValue.setValue( value );
- //
- // patientDataValueService.updatePatientDataValue( dataValue
- // );
- // }
-
}
}
@@ -504,8 +492,8 @@
// PatientIdentifierType will be null
// -------------------------------------------------------------
- String systemIdentifier = PatientIdentifierGenerator.getNewIdentifier( patient.getBirthDate(), patient
- .getGender() );
+ String systemIdentifier = PatientIdentifierGenerator.getNewIdentifier( patient.getBirthDate(),
+ patient.getGender() );
PatientIdentifier systemGenerateIdentifier = patientIdentifierService.get( null, systemIdentifier );
while ( systemGenerateIdentifier != null )
@@ -560,8 +548,8 @@
if ( PatientAttribute.TYPE_COMBO.equalsIgnoreCase( attribute.getValueType() ) )
{
// value is the id of the option
- PatientAttributeOption option = patientAttributeOptionService.get( Integer
- .parseInt( value.split( ":" )[1] ) );
+ PatientAttributeOption option = patientAttributeOptionService
+ .get( Integer.parseInt( value.split( ":" )[1] ) );
if ( option != null )
{
@@ -626,7 +614,6 @@
return programInstance;
}
-
private List<ProgramStageInstance> getProgramStageInstances( ProgramInstance programInstance, int row,
HSSFWorkbook wb )
@@ -643,8 +630,8 @@
programStageInstance.setProgramStage( programStage );
programStageInstance.setStageInProgram( programStage.getStageInProgram() );
- Date dueDate = DateUtils.getDateAfterAddition( programInstance.getDateOfIncident(), programStage
- .getMinDaysFromStart() );
+ Date dueDate = DateUtils.getDateAfterAddition( programInstance.getDateOfIncident(),
+ programStage.getMinDaysFromStart() );
programStageInstance.setDueDate( dueDate );
@@ -733,7 +720,7 @@
// {
// dataValue.setTimestamp( new Date() );
// dataValue.setValue( value );
- //
+ //
// patientDataValueService.updatePatientDataValue( dataValue );
// }
}
@@ -770,7 +757,7 @@
// Check duplication name, birthdate, gender
Collection<Patient> patients = patientService.getPatient( patient.getFirstName(), patient.getMiddleName(),
patient.getLastName(), patient.getBirthDate(), patient.getGender() );
-
+
if ( patients != null && patients.size() > 0 )
{
errPatients.put( row, patient );
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientimport/XMLItem.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientimport/XMLItem.java 2010-11-16 05:45:36 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientimport/XMLItem.java 2011-03-20 18:15:01 +0000
@@ -50,12 +50,10 @@
public static String BIRTH_DATE_FROM_VALUE = "birthDateFromAge";
-
public static String PROGRAM_TYPE = "program";
public static String PROGRAM_ATTRIBUTE_TYPE = "programAttr";
-
public static String PROGRAM_STAGE_TYPE = "programStage";
// -------------------------------------------------------------------------
@@ -152,5 +150,4 @@
{
this.sheet = sheet;
}
-
}
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/AddProgramAttributeAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/AddProgramAttributeAction.java 2011-02-27 21:18:07 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/AddProgramAttributeAction.java 2011-03-20 18:15:01 +0000
@@ -107,10 +107,10 @@
programAttribute.setDescription( description );
programAttribute.setValueType( valueType );
- if( ProgramAttribute.TYPE_COMBO.equalsIgnoreCase( valueType ) )
+ if ( ProgramAttribute.TYPE_COMBO.equalsIgnoreCase( valueType ) )
{
ProgramAttributeOption opt = null;
- for( String optionName : attrOptions )
+ for ( String optionName : attrOptions )
{
opt = new ProgramAttributeOption();
opt.setName( optionName );
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/GetProgramListAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/GetProgramListAction.java 2010-08-31 14:34:31 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/GetProgramListAction.java 2011-03-20 18:15:01 +0000
@@ -44,7 +44,7 @@
public class GetProgramListAction
implements Action
{
- // -------------------------------------------------------------------------
+ // -------------------------------------------------------------------------
// Dependencies
// -------------------------------------------------------------------------
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/UpdateProgramAttributeAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/UpdateProgramAttributeAction.java 2010-11-09 02:09:53 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/UpdateProgramAttributeAction.java 2011-03-20 18:15:01 +0000
@@ -166,7 +166,6 @@
programAttributeService.updateProgramAttribute( programAttribute );
-
return SUCCESS;
}
}
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/ValidateProgramAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/ValidateProgramAction.java 2010-09-25 10:03:31 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/ValidateProgramAction.java 2011-03-20 18:15:01 +0000
@@ -107,6 +107,5 @@
message = i18n.getString( "everything_is_ok" );
return SUCCESS;
-
}
}
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/ValidateProgramAttributeAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/ValidateProgramAttributeAction.java 2011-02-27 21:18:07 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/ValidateProgramAttributeAction.java 2011-03-20 18:15:01 +0000
@@ -107,6 +107,5 @@
message = i18n.getString( "everything_is_ok" );
return SUCCESS;
-
}
}
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/programstage/AddProgramStageAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/programstage/AddProgramStageAction.java 2011-02-21 04:00:27 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/programstage/AddProgramStageAction.java 2011-03-20 18:15:01 +0000
@@ -162,5 +162,4 @@
return SUCCESS;
}
-
}
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/programstage/GetProgramStageAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/programstage/GetProgramStageAction.java 2010-10-20 07:16:54 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/programstage/GetProgramStageAction.java 2011-03-20 18:15:01 +0000
@@ -108,7 +108,6 @@
public String execute()
throws Exception
{
-
programStage = programStageService.getProgramStage( id );
programStageDataElements = programStage.getProgramStageDataElements();
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/programstage/SaveProgramStageSortOrderAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/programstage/SaveProgramStageSortOrderAction.java 2010-11-09 07:12:10 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/programstage/SaveProgramStageSortOrderAction.java 2011-03-20 18:15:01 +0000
@@ -80,6 +80,7 @@
// -------------------------------------------------------------------------
// Action implementation
// -------------------------------------------------------------------------
+
public String execute()
{
int stageInProgram = 1;
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/programstage/ShowAddProgramStageFormAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/programstage/ShowAddProgramStageFormAction.java 2010-10-20 07:16:54 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/programstage/ShowAddProgramStageFormAction.java 2011-03-20 18:15:01 +0000
@@ -105,7 +105,6 @@
public String execute()
{
-
program = programService.getProgram( id.intValue() );
dataElements = new ArrayList<DataElement>( dataElementService
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/programstage/ShowSortProgramStageFormAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/programstage/ShowSortProgramStageFormAction.java 2010-10-20 07:16:54 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/programstage/ShowSortProgramStageFormAction.java 2011-03-20 18:15:01 +0000
@@ -96,7 +96,6 @@
public String execute()
{
-
program = programService.getProgram( id );
programStages = program.getProgramStages();
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/programstage/ValidateProgramStageAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/programstage/ValidateProgramStageAction.java 2010-10-20 07:16:54 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/programstage/ValidateProgramStageAction.java 2011-03-20 18:15:01 +0000
@@ -110,6 +110,5 @@
message = i18n.getString( "everything_is_ok" );
return SUCCESS;
-
}
}
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/relationship/AddRelationshipPatientAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/relationship/AddRelationshipPatientAction.java 2011-03-02 08:47:32 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/relationship/AddRelationshipPatientAction.java 2011-03-20 18:15:01 +0000
@@ -127,7 +127,7 @@
// Set FirstName, MiddleName, LastName by FullName
// ---------------------------------------------------------------------
- // ---------------------------------------------------------------------
+ // ---------------------------------------------------------------------
// Set FirstName, MiddleName, LastName by FullName
// ---------------------------------------------------------------------
@@ -183,11 +183,11 @@
patient.setRegistrationDate( new Date() );
- // --------------------------------------------------------------------------------
+ // ---------------------------------------------------------------------
// Generate system id with this format :
// (BirthDate)(Gender)(XXXXXX)(checkdigit)
// PatientIdentifierType will be null
- // --------------------------------------------------------------------------------
+ // ---------------------------------------------------------------------
String identifier = PatientIdentifierGenerator.getNewIdentifier( patient.getBirthDate(), patient.getGender() );
@@ -208,9 +208,9 @@
selectedStateManager.clearSearchingAttributeId();
selectedStateManager.setSearchText( systemGenerateIdentifier.getIdentifier() );
- // -----------------------------------------------------------------------------
+ // ---------------------------------------------------------------------
// Save Patient Identifiers
- // -----------------------------------------------------------------------------
+ // ---------------------------------------------------------------------
HttpServletRequest request = ServletActionContext.getRequest();
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/relationship/GetRelationshipListAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/relationship/GetRelationshipListAction.java 2009-11-12 11:27:02 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/relationship/GetRelationshipListAction.java 2011-03-20 18:15:01 +0000
@@ -103,7 +103,6 @@
public String execute()
throws Exception
{
-
patient = selectedStateManager.getSelectedPatient();
patientAttributeValues = patientAttributeValueService.getPatientAttributeValues( patient );
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/relationship/SaveRelationshipAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/relationship/SaveRelationshipAction.java 2009-11-11 01:11:32 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/relationship/SaveRelationshipAction.java 2011-03-20 18:15:01 +0000
@@ -135,7 +135,6 @@
public String execute()
throws Exception
{
-
patient = selectedStateManager.getSelectedPatient();
Patient partner = patientService.getPatient( partnerId );
@@ -149,7 +148,6 @@
message = i18n.getString( "the_relationship_already_exists" );
return INPUT;
-
}
// ---------------------------------------------------------------------
@@ -158,7 +156,7 @@
relationship = new Relationship();
- if( relationshipType.getaIsToB().equalsIgnoreCase( relationshipName ) )
+ if ( relationshipType.getaIsToB().equalsIgnoreCase( relationshipName ) )
{
relationship.setPatientA( partner );
relationship.setPatientB( patient );
@@ -167,7 +165,7 @@
relationshipService.saveRelationship( relationship );
}
- else if( relationshipType.getbIsToA().equalsIgnoreCase( relationshipName ) )
+ else if ( relationshipType.getbIsToA().equalsIgnoreCase( relationshipName ) )
{
relationship.setPatientA( patient );
relationship.setPatientB( partner );
@@ -176,7 +174,6 @@
relationshipService.saveRelationship( relationship );
}
-
return SUCCESS;
}
}
=== 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 2009-11-24 16:26:10 +0000
+++ 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
@@ -40,7 +40,6 @@
public class SaveRepresentativeAction
implements Action
{
-
// -------------------------------------------------------------------------
// Dependencies
// -------------------------------------------------------------------------
@@ -98,7 +97,6 @@
public String execute()
throws Exception
{
-
Patient representative = patientService.getPatient( representativeId );
patient = selectedStateManager.getSelectedPatient();
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/relationship/ShowAddRelationshipFormAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/relationship/ShowAddRelationshipFormAction.java 2009-11-24 15:39:07 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/relationship/ShowAddRelationshipFormAction.java 2011-03-20 18:15:01 +0000
@@ -232,6 +232,5 @@
}
return SUCCESS;
-
}
}
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/relationship/ShowAddRelationshipPatientAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/relationship/ShowAddRelationshipPatientAction.java 2010-06-23 19:59:35 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/relationship/ShowAddRelationshipPatientAction.java 2011-03-20 18:15:01 +0000
@@ -54,9 +54,9 @@
*
* @version $Id$
*/
-public class ShowAddRelationshipPatientAction implements Action
+public class ShowAddRelationshipPatientAction
+ implements Action
{
-
// -------------------------------------------------------------------------
// Dependencies
// -------------------------------------------------------------------------
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/relationship/ValidateRelationshipTypeAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/relationship/ValidateRelationshipTypeAction.java 2011-01-25 23:29:58 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/relationship/ValidateRelationshipTypeAction.java 2011-03-20 18:15:01 +0000
@@ -121,6 +121,5 @@
message = i18n.getString( "everything_is_ok" );
return SUCCESS;
-
}
}
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/relationship/ValidateSearchAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/relationship/ValidateSearchAction.java 2009-11-08 14:29:45 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/relationship/ValidateSearchAction.java 2011-03-20 18:15:01 +0000
@@ -78,7 +78,6 @@
public String execute()
throws Exception
{
-
if ( searchText == null )
{
message = i18n.getString( "specify_a_search_criteria" );
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/validation/AddValidationCriteriaAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/validation/AddValidationCriteriaAction.java 2010-10-28 09:17:13 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/validation/AddValidationCriteriaAction.java 2011-03-20 18:15:01 +0000
@@ -134,10 +134,8 @@
private Object getObject()
throws Exception
{
-
Type type = Patient.class.getMethod( "get" + StringUtils.capitalize( property ) ).getReturnType();
- // Get value
if ( type == Integer.class || type == Integer.TYPE )
{
return Integer.valueOf( value );
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/validation/GetProgramListForValidationCriteriaAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/validation/GetProgramListForValidationCriteriaAction.java 2010-05-18 03:42:26 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/validation/GetProgramListForValidationCriteriaAction.java 2011-03-20 18:15:01 +0000
@@ -43,7 +43,6 @@
public class GetProgramListForValidationCriteriaAction
implements Action
{
-
// -------------------------------------------------------------------------
// Dependency
// -------------------------------------------------------------------------
@@ -55,6 +54,7 @@
// -------------------------------------------------------------------------
// Input && Output
// -------------------------------------------------------------------------
+
private Integer criteriaId;
private Collection<Program> selectedPrograms;
@@ -114,5 +114,4 @@
return SUCCESS;
}
-
}
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/validation/UpdateValidationCriteriaAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/validation/UpdateValidationCriteriaAction.java 2010-10-28 09:17:13 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/validation/UpdateValidationCriteriaAction.java 2011-03-20 18:15:01 +0000
@@ -143,7 +143,6 @@
{
Type type = Patient.class.getMethod( "get" + StringUtils.capitalize( property ) ).getReturnType();
- // Get value
if ( type == Integer.class || type == Integer.TYPE )
{
return Integer.valueOf( value );
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/idgen/PatientIdentifierGenerator.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/idgen/PatientIdentifierGenerator.java 2010-05-17 02:59:28 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/idgen/PatientIdentifierGenerator.java 2011-03-20 18:15:01 +0000
@@ -33,8 +33,6 @@
/**
* @author Viet
- *
- * @version $Id$
*/
public class PatientIdentifierGenerator
{
@@ -48,7 +46,6 @@
* @param gender
* @return
*/
-
public static String getNewIdentifier( Date birthDate, String gender )
{
String noCheck = formatDate(birthDate) + formatGender(gender)
@@ -64,7 +61,6 @@
*/
private static int getCheckdigit( String idWithoutCheckdigit )
{
- String validChars = "0123456789";
idWithoutCheckdigit = idWithoutCheckdigit.trim().toUpperCase();
int sum = 0;
for ( int i = 0; i < idWithoutCheckdigit.length(); i++ )
@@ -89,7 +85,6 @@
public static boolean isValidCC( String num )
{
-
final int[][] sumTable = { { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }, { 0, 2, 4, 6, 8, 1, 3, 5, 7, 9 } };
int sum = 0, flip = 0;
@@ -124,5 +119,4 @@
{
return gender.equalsIgnoreCase( "f" ) ? "0" : "1";
}
-
}
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/screen/DataEntryManager.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/screen/DataEntryManager.java 2010-02-22 09:19:15 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/screen/DataEntryManager.java 2011-03-20 18:15:01 +0000
@@ -28,11 +28,9 @@
/**
* @author Viet Nguyen
- *
* @version $Id$
*/
public interface DataEntryManager
{
-
String prepareDataEntryFormCode( String dataEntryFormCode );
}
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/screen/DefaultDataEntryManager.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/screen/DefaultDataEntryManager.java 2010-05-17 02:59:28 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/screen/DefaultDataEntryManager.java 2011-03-20 18:15:01 +0000
@@ -40,39 +40,34 @@
/**
* @author Viet Nguyen
- *
+ *
* @version $Id$
*/
-public class DefaultDataEntryManager implements DataEntryManager
+public class DefaultDataEntryManager
+ implements DataEntryManager
{
// -------------------------------------------------------------------------
// Dependencies
// -------------------------------------------------------------------------
+
private DataElementService dataElementService;
public void setDataElementService( DataElementService dataElementService )
{
this.dataElementService = dataElementService;
}
-
+
private DataElementCategoryService categoryService;
-
- public synchronized void setCategoryService( DataElementCategoryService categoryService )
+
+ public void setCategoryService( DataElementCategoryService categoryService )
{
this.categoryService = categoryService;
}
- private DataElementCategoryService dataElementCategoryService;
+ // -------------------------------------------------------------------------
+ // Implement methods
+ // -------------------------------------------------------------------------
- public void setDataElementCategoryService( DataElementCategoryService dataElementCategoryService )
- {
- this.dataElementCategoryService = dataElementCategoryService;
- }
-
- // -------------------------------------------------------------------------
- // Implement methods
- // -------------------------------------------------------------------------
-
/**
* Prepares the data entry form code by injecting the dataElement name for
* each entry field
@@ -97,20 +92,20 @@
// ---------------------------------------------------------------------
// Buffer to contain the final result.
// ---------------------------------------------------------------------
-
+
StringBuffer sb = new StringBuffer();
-
+
// ---------------------------------------------------------------------
// Pattern to match data elements in the HTML code.
// ---------------------------------------------------------------------
-
+
Pattern patDataElement = Pattern.compile( "(<input.*?)[/]?>" );
Matcher matDataElement = patDataElement.matcher( preparedCode );
// ---------------------------------------------------------------------
// Iterate through all matching data element fields.
// ---------------------------------------------------------------------
-
+
boolean result = matDataElement.find();
while ( result )
{
@@ -119,12 +114,13 @@
// -----------------------------------------------------------------
String dataElementCode = matDataElement.group( 1 );
-
+
// -----------------------------------------------------------------
// Pattern to extract data element ID from data element field
// -----------------------------------------------------------------
- Pattern patDataElementId = Pattern.compile( "value\\[(.*)\\].value:value\\[(.*)\\].value:value\\[(.*)\\].value" );
+ Pattern patDataElementId = Pattern
+ .compile( "value\\[(.*)\\].value:value\\[(.*)\\].value:value\\[(.*)\\].value" );
Matcher matDataElementId = patDataElementId.matcher( dataElementCode );
Pattern patViewBy = Pattern.compile( "view=\"@@(.*)@@\"" );
@@ -135,38 +131,43 @@
// -------------------------------------------------------------
// Get data element id,name, optionCombo id,name of data element
// -------------------------------------------------------------
-
- int programStageId = Integer.parseInt( matDataElementId.group( 1 ) );
+
+ //int programStageId = Integer.parseInt( matDataElementId.group( 1 ) );
// do somthing with programStage
-
+
int dataElementId = Integer.parseInt( matDataElementId.group( 2 ) );
DataElement dataElement = dataElementService.getDataElement( dataElementId );
-// int optionComboId = Integer.parseInt( matDataElementId.group( 3 ) );
-// DataElementCategoryOptionCombo optionCombo = dataElementCategoryService
-// .getDataElementCategoryOptionCombo( optionComboId );
+ // int optionComboId = Integer.parseInt( matDataElementId.group(
+ // 3 ) );
+ // DataElementCategoryOptionCombo optionCombo =
+ // dataElementCategoryService
+ // .getDataElementCategoryOptionCombo( optionComboId );
String optionComboName = "";
-// if ( optionCombo != null )
-// {
-// List<DataElementCategoryOption> categoryOptions = new ArrayList<DataElementCategoryOption>(
-// optionCombo.getCategoryOptions() );
-// Iterator<DataElementCategoryOption> categoryOptionsIterator = categoryOptions.iterator();
-//
-// while ( categoryOptionsIterator.hasNext() )
-// {
-// DataElementCategoryOption categoryOption = categoryOptionsIterator.next();
-//
-// optionComboName += categoryOption.getName() + " ";
-// }
-// }
-
+ // if ( optionCombo != null )
+ // {
+ // List<DataElementCategoryOption> categoryOptions = new
+ // ArrayList<DataElementCategoryOption>(
+ // optionCombo.getCategoryOptions() );
+ // Iterator<DataElementCategoryOption> categoryOptionsIterator =
+ // categoryOptions.iterator();
+ //
+ // while ( categoryOptionsIterator.hasNext() )
+ // {
+ // DataElementCategoryOption categoryOption =
+ // categoryOptionsIterator.next();
+ //
+ // optionComboName += categoryOption.getName() + " ";
+ // }
+ // }
+
// -------------------------------------------------------------
// Insert name of data element in output code.
// -------------------------------------------------------------
-
+
String dispVal = "No Such DataElement Exists";
-
+
if ( dataElement != null )
{
dispVal = dataElement.getShortName();
@@ -183,7 +184,7 @@
dispVal = dataElement.getName();
}
}
-
+
dispVal += " - " + optionComboName;
if ( dataElementCode.contains( "value=\"\"" ) )
@@ -195,17 +196,21 @@
dataElementCode += " value=\"[ " + dispVal + " ]\"";
}
-// if ( dataElementCode.contains( "title=\"\"" ) )
-// {
-// dataElementCode = dataElementCode.replace( "title=\"\"", "title=\"-- " + dataElement.getId()
-// + ". " + dataElement.getName() + " " + optionComboId + ". " + optionComboName + " ("
-// + dataElement.getType() + ") --\"" );
-// }
-// else
-// {
-// dataElementCode += " title=\"-- " + dataElement.getId() + ". " + dataElement.getName() + " "
-// + optionComboId + ". " + optionComboName + " (" + dataElement.getType() + ") --\"";
-// }
+ // if ( dataElementCode.contains( "title=\"\"" ) )
+ // {
+ // dataElementCode = dataElementCode.replace( "title=\"\"",
+ // "title=\"-- " + dataElement.getId()
+ // + ". " + dataElement.getName() + " " + optionComboId +
+ // ". " + optionComboName + " ("
+ // + dataElement.getType() + ") --\"" );
+ // }
+ // else
+ // {
+ // dataElementCode += " title=\"-- " + dataElement.getId() +
+ // ". " + dataElement.getName() + " "
+ // + optionComboId + ". " + optionComboName + " (" +
+ // dataElement.getType() + ") --\"";
+ // }
}
else
{
@@ -231,7 +236,7 @@
// -------------------------------------------------------------
// Appends dataElementCode
// -------------------------------------------------------------
-
+
String appendCode = dataElementCode;
appendCode += "/>";
matDataElement.appendReplacement( sb, appendCode );
@@ -240,27 +245,27 @@
// -----------------------------------------------------------------
// Go to next data entry field
// -----------------------------------------------------------------
-
+
result = matDataElement.find();
}
// ---------------------------------------------------------------------
// Add remaining code (after the last match), and return formatted code
// ---------------------------------------------------------------------
-
+
matDataElement.appendTail( sb );
-
+
return sb.toString();
- }
-
+ }
+
private String prepareDataEntryFormCombos( String preparedCode )
{
// ---------------------------------------------------------------------
// Buffer to contain the final result.
// ---------------------------------------------------------------------
-
+
StringBuffer sb = new StringBuffer();
-
+
// ---------------------------------------------------------------------
// Pattern to match data elements in the HTML code.
// ---------------------------------------------------------------------
@@ -271,17 +276,17 @@
// ---------------------------------------------------------------------
// Iterate through all matching data element fields.
// ---------------------------------------------------------------------
-
+
boolean result = matDataElement.find();
-
+
while ( result )
{
// -----------------------------------------------------------------
// Get input HTML code (HTML input field code).
// -----------------------------------------------------------------
-
+
String dataElementCode = matDataElement.group( 1 );
-
+
// -----------------------------------------------------------------
// Pattern to extract data element ID from data element field
// -----------------------------------------------------------------
@@ -297,12 +302,12 @@
// -------------------------------------------------------------
// Get data element id,name, optionCombo id,name of data element
// -------------------------------------------------------------
-
+
int dataElementId = Integer.parseInt( matDataElementId.group( 1 ) );
DataElement dataElement = dataElementService.getDataElement( dataElementId );
int optionComboId = Integer.parseInt( matDataElementId.group( 2 ) );
- DataElementCategoryOptionCombo optionCombo = dataElementCategoryService
+ DataElementCategoryOptionCombo optionCombo = categoryService
.getDataElementCategoryOptionCombo( optionComboId );
String optionComboName = "";
@@ -311,20 +316,20 @@
List<DataElementCategoryOption> categoryOptions = new ArrayList<DataElementCategoryOption>(
optionCombo.getCategoryOptions() );
Iterator<DataElementCategoryOption> categoryOptionsIterator = categoryOptions.iterator();
-
+
while ( categoryOptionsIterator.hasNext() )
{
DataElementCategoryOption categoryOption = categoryOptionsIterator.next();
-
+
optionComboName += categoryOption.getName() + " ";
}
}
// -------------------------------------------------------------
// Insert name of data element in output code.
// -------------------------------------------------------------
-
+
String dispVal = "No Such DataElement Exists";
-
+
if ( dataElement != null )
{
dispVal = dataElement.getShortName();
@@ -332,7 +337,7 @@
if ( matViewBy.find() && matViewBy.groupCount() > 0 )
{
String viewByVal = matViewBy.group( 1 );
-
+
if ( viewByVal.equalsIgnoreCase( "deid" ) )
{
dispVal = String.valueOf( dataElement.getId() );
@@ -342,7 +347,7 @@
dispVal = dataElement.getName();
}
}
-
+
dispVal += " - " + optionComboName;
if ( dataElementCode.contains( "value=\"\"" ) )
@@ -390,7 +395,7 @@
// -------------------------------------------------------------
// Appends dataElementCode
// -------------------------------------------------------------
-
+
String appendCode = dataElementCode;
appendCode += "/>";
matDataElement.appendReplacement( sb, appendCode );
@@ -399,48 +404,49 @@
// -----------------------------------------------------------------
// Go to next data entry field
// -----------------------------------------------------------------
-
+
result = matDataElement.find();
}
// ---------------------------------------------------------------------
// Add remaining code (after the last match), and return formatted code.
// ---------------------------------------------------------------------
-
+
matDataElement.appendTail( sb );
-
+
return sb.toString();
}
-
+
+ @SuppressWarnings("unused")
private String prepareDataEntryFormComboString( String preparedCode )
{
// ---------------------------------------------------------------------
// Buffer to contain the final result.
// ---------------------------------------------------------------------
-
+
StringBuffer sb = new StringBuffer();
-
+
// ---------------------------------------------------------------------
// Pattern to match data elements in the HTML code.
// ---------------------------------------------------------------------
- Pattern patDataElement = Pattern.compile("(<select.*?)[/]?</select>", Pattern.DOTALL);
+ Pattern patDataElement = Pattern.compile( "(<select.*?)[/]?</select>", Pattern.DOTALL );
Matcher matDataElement = patDataElement.matcher( preparedCode );
// ---------------------------------------------------------------------
// Iterate through all matching data element fields.
// ---------------------------------------------------------------------
-
+
boolean result = matDataElement.find();
-
+
while ( result )
{
// -----------------------------------------------------------------
// Get input HTML code (HTML input field code).
// -----------------------------------------------------------------
-
+
String dataElementCode = matDataElement.group( 1 );
-
+
// -----------------------------------------------------------------
// Pattern to extract data element ID from data element field
// -----------------------------------------------------------------
@@ -458,109 +464,113 @@
// -------------------------------------------------------------
// Get data element id,name, optionCombo id,name of data element
// -------------------------------------------------------------
-
+
int dataElementId = Integer.parseInt( matDataElementId.group( 1 ) );
DataElement dataElement = dataElementService.getDataElement( dataElementId );
-
-
boolean resultCombo = matComboId.find();
String optionComboName = "";
-
+
while ( resultCombo )
{
int optionComboId = Integer.parseInt( matDataElementId.group( 1 ) );
- DataElementCategoryOptionCombo optionCombo = dataElementCategoryService
- .getDataElementCategoryOptionCombo( optionComboId );
-
-
+ DataElementCategoryOptionCombo optionCombo = categoryService
+ .getDataElementCategoryOptionCombo( optionComboId );
+
if ( optionCombo != null )
{
List<DataElementCategoryOption> categoryOptions = new ArrayList<DataElementCategoryOption>(
optionCombo.getCategoryOptions() );
Iterator<DataElementCategoryOption> categoryOptionsIterator = categoryOptions.iterator();
-
+
while ( categoryOptionsIterator.hasNext() )
{
DataElementCategoryOption categoryOption = categoryOptionsIterator.next();
-
+
optionComboName = categoryOption.getName() + " ";
}
}
-
+
}
// -------------------------------------------------------------
// Insert name of data element in output code.
// -------------------------------------------------------------
-
-// String dispVal = "No Such DataElement Exists";
-//
-// if ( dataElement != null )
-// {
-// dispVal = dataElement.getShortName();
-//
-// if ( matViewBy.find() && matViewBy.groupCount() > 0 )
-// {
-// String viewByVal = matViewBy.group( 1 );
-//
-// if ( viewByVal.equalsIgnoreCase( "deid" ) )
-// {
-// dispVal = String.valueOf( dataElement.getId() );
-// }
-// else if ( viewByVal.equalsIgnoreCase( "dename" ) )
-// {
-// dispVal = dataElement.getName();
-// }
-// }
-//
-// dispVal += " - " + optionComboName;
-//
-// if ( dataElementCode.contains( "value=\"\"" ) )
-// {
-// dataElementCode = dataElementCode.replace( "value=\"\"", "value=\"[ " + dispVal + " ]\"" );
-// }
-// else
-// {
-// dataElementCode += " value=\"[ " + dispVal + " ]\"";
-// }
-//
-// if ( dataElementCode.contains( "title=\"\"" ) )
-// {
-// dataElementCode = dataElementCode.replace( "title=\"\"", "title=\"-- " + dataElement.getId()
-// + ". " + dataElement.getName() + " " + optionComboId + ". " + optionComboName + " ("
-// + dataElement.getType() + ") --\"" );
-// }
-// else
-// {
-// dataElementCode += " title=\"-- " + dataElement.getId() + ". " + dataElement.getName() + " "
-// + optionComboId + ". " + optionComboName + " (" + dataElement.getType() + ") --\"";
-// }
-// }
-// else
-// {
-// if ( dataElementCode.contains( "value=\"\"" ) )
-// {
-// dataElementCode = dataElementCode.replace( "value=\"\"", "value=\"[ " + dispVal + " ]\"" );
-// }
-// else
-// {
-// dataElementCode += " value=\"[ " + dispVal + " ]\"";
-// }
-//
-// if ( dataElementCode.contains( "title=\"\"" ) )
-// {
-// dataElementCode = dataElementCode.replace( "title=\"\"", "title=\"-- " + dispVal + " --\"" );
-// }
-// else
-// {
-// dataElementCode += " title=\"-- " + dispVal + " --\"";
-// }
-// }
+
+ // String dispVal = "No Such DataElement Exists";
+ //
+ // if ( dataElement != null )
+ // {
+ // dispVal = dataElement.getShortName();
+ //
+ // if ( matViewBy.find() && matViewBy.groupCount() > 0 )
+ // {
+ // String viewByVal = matViewBy.group( 1 );
+ //
+ // if ( viewByVal.equalsIgnoreCase( "deid" ) )
+ // {
+ // dispVal = String.valueOf( dataElement.getId() );
+ // }
+ // else if ( viewByVal.equalsIgnoreCase( "dename" ) )
+ // {
+ // dispVal = dataElement.getName();
+ // }
+ // }
+ //
+ // dispVal += " - " + optionComboName;
+ //
+ // if ( dataElementCode.contains( "value=\"\"" ) )
+ // {
+ // dataElementCode = dataElementCode.replace( "value=\"\"",
+ // "value=\"[ " + dispVal + " ]\"" );
+ // }
+ // else
+ // {
+ // dataElementCode += " value=\"[ " + dispVal + " ]\"";
+ // }
+ //
+ // if ( dataElementCode.contains( "title=\"\"" ) )
+ // {
+ // dataElementCode = dataElementCode.replace( "title=\"\"",
+ // "title=\"-- " + dataElement.getId()
+ // + ". " + dataElement.getName() + " " + optionComboId + ". " +
+ // optionComboName + " ("
+ // + dataElement.getType() + ") --\"" );
+ // }
+ // else
+ // {
+ // dataElementCode += " title=\"-- " + dataElement.getId() +
+ // ". " + dataElement.getName() + " "
+ // + optionComboId + ". " + optionComboName + " (" +
+ // dataElement.getType() + ") --\"";
+ // }
+ // }
+ // else
+ // {
+ // if ( dataElementCode.contains( "value=\"\"" ) )
+ // {
+ // dataElementCode = dataElementCode.replace( "value=\"\"",
+ // "value=\"[ " + dispVal + " ]\"" );
+ // }
+ // else
+ // {
+ // dataElementCode += " value=\"[ " + dispVal + " ]\"";
+ // }
+ //
+ // if ( dataElementCode.contains( "title=\"\"" ) )
+ // {
+ // dataElementCode = dataElementCode.replace( "title=\"\"",
+ // "title=\"-- " + dispVal + " --\"" );
+ // }
+ // else
+ // {
+ // dataElementCode += " title=\"-- " + dispVal + " --\"";
+ // }
+ // }
// -------------------------------------------------------------
// Appends dataElementCode
// -------------------------------------------------------------
-
+
String appendCode = dataElementCode;
appendCode += "/>";
matDataElement.appendReplacement( sb, appendCode );
@@ -569,16 +579,16 @@
// -----------------------------------------------------------------
// Go to next data entry field
// -----------------------------------------------------------------
-
+
result = matDataElement.find();
}
// ---------------------------------------------------------------------
// Add remaining code (after the last match), and return formatted code.
// ---------------------------------------------------------------------
-
+
matDataElement.appendTail( sb );
-
+
return sb.toString();
}
}
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/state/DefaultSelectedStateManager.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/state/DefaultSelectedStateManager.java 2010-12-22 07:59:59 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/state/DefaultSelectedStateManager.java 2011-03-20 18:15:01 +0000
@@ -202,7 +202,6 @@
// Support methods
// -------------------------------------------------------------------------
- @SuppressWarnings( "unchecked" )
private static final Map getSession()
{
return ActionContext.getContext().getSession();