dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #12984
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 4079: Codestyle
------------------------------------------------------------
revno: 4079
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2011-07-06 10:04:17 +0200
message:
Codestyle
modified:
dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/caseaggregation/DefaultCaseAggregationConditionService.java
dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patientdatavalue/DefaultPatientDataValueService.java
dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/DefaultProgramAttributeService.java
dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/DefaultProgramDataEntryService.java
dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/DefaultProgramValidationService.java
dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/ProgramInstanceDeletionHandler.java
dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/ProgramStageDataElementDeletionHandler.java
dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/programattributevalue/DefaultProgramAttributeValueService.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-services/dhis-service-patient/src/main/java/org/hisp/dhis/caseaggregation/DefaultCaseAggregationConditionService.java'
--- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/caseaggregation/DefaultCaseAggregationConditionService.java 2011-07-01 07:26:42 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/caseaggregation/DefaultCaseAggregationConditionService.java 2011-07-06 08:04:17 +0000
@@ -473,7 +473,6 @@
}
return getSQL( conditions, operators );
-
}
private String getConditionForNotDataElement( int programStageId, int dataElementId, int optionComboId,
@@ -483,33 +482,17 @@
+ "INNER JOIN programstage as ps ON psi.programstageid = ps.programstageid "
+ "INNER JOIN programinstance as pi ON pi.programinstanceid = psi.programinstanceid "
+ "LEFT OUTER JOIN patientdatavalue as pd ON psi.programstageinstanceid = pd.programstageinstanceid "
- + "WHERE psi.executionDate >= '"
- + startDate
- + "' AND psi.executionDate <= '"
- + endDate
- + "' "
+ + "WHERE psi.executionDate >= '" + startDate
+ + "' AND psi.executionDate <= '" + endDate + "' "
+ "AND pd.value IS NULL AND pi.patientid NOT IN ( "
+ "SELECT distinct(pi.patientid) FROM programstageinstance as psi "
+ "INNER JOIN programstage as ps ON psi.programstageid = ps.programstageid "
+ "INNER JOIN programinstance as pi ON pi.programinstanceid = psi.programinstanceid "
+ "INNER JOIN patientdatavalue as pd ON psi.programstageinstanceid = pd.programstageinstanceid "
- + "WHERE pd.organisationunitid = "
- + orgunitId
- + " AND ps.programstageid = "
- + programStageId
- + " "
- + "AND psi.executionDate >= '"
- + startDate
- + "' AND psi.executionDate <= '"
- + endDate
- + "' "
- + "AND pd.dataelementid = "
- + dataElementId
- + " "
- + "AND pd.categoryoptioncomboid = "
- + optionComboId
- + " ) ";
-
+ + "WHERE pd.organisationunitid = " + orgunitId + " AND ps.programstageid = " + programStageId + " "
+ + "AND psi.executionDate >= '" + startDate + "' AND psi.executionDate <= '" + endDate + "' "
+ + "AND pd.dataelementid = " + dataElementId + " "
+ + "AND pd.categoryoptioncomboid = " + optionComboId + " ) ";
}
private String getConditionForDataElement( int programStageId, int dataElementId, int optionComboId, int orgunitId,
@@ -522,7 +505,6 @@
+ "WHERE pd.categoryoptioncomboid = " + optionComboId + " AND pd.dataelementid = " + dataElementId + " "
+ "AND pd.organisationunitid = " + orgunitId + " AND ps.programstageid = " + programStageId + " "
+ "AND psi.executionDate >= '" + startDate + "' AND psi.executionDate <= '" + endDate + "' ";
-
}
private String getConditionForPatientAttribute( int attributeId, int orgunitId, String startDate, String endDate )
@@ -577,12 +559,11 @@
sql += " UNION ( " + conditions.get( index + 1 ) + " ) ";
sqlAnd = "";
}
-
}
+
sql += sqlAnd;
return sql;
-
}
public double calValue( Collection<Integer> patientIds, String operator )
@@ -594,5 +575,4 @@
return patientIds.size();
}
-
}
=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patientdatavalue/DefaultPatientDataValueService.java'
--- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patientdatavalue/DefaultPatientDataValueService.java 2011-03-31 01:55:06 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patientdatavalue/DefaultPatientDataValueService.java 2011-07-06 08:04:17 +0000
@@ -192,5 +192,4 @@
{
return patientDataValueStore.get( patient, dataElements, startDate, endDate );
}
-
}
=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/DefaultProgramAttributeService.java'
--- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/DefaultProgramAttributeService.java 2010-11-09 02:09:53 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/DefaultProgramAttributeService.java 2011-07-06 08:04:17 +0000
@@ -89,6 +89,5 @@
public Collection<ProgramAttribute> getProgramAttributeByValueType( String valueType )
{
return programAttributeStore.getByValueType( valueType );
- }
-
+ }
}
=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/DefaultProgramDataEntryService.java'
--- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/DefaultProgramDataEntryService.java 2011-06-23 08:27:07 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/DefaultProgramDataEntryService.java 2011-07-06 08:04:17 +0000
@@ -475,7 +475,6 @@
ProgramStage otherProgramStage = programStageService.getProgramStage( programStageId );
programStageName = otherProgramStage != null ? otherProgramStage.getName() : "N/A";
-
}
else
{
@@ -494,11 +493,13 @@
{
continue;
}
+
if ( !DataElement.VALUE_TYPE_INT.equals( dataElement.getType() )
&& !DataElement.VALUE_TYPE_STRING.equals( dataElement.getType() ) )
{
continue;
}
+
// -------------------------------------------------------------
// Find type of data element
// -------------------------------------------------------------
@@ -1275,7 +1276,6 @@
// ---------------------------------------------------------
appendCode = addProvidedByOtherFacilityCheckbox( appendCode, patientDataValue );
-
}
// -------------------------------------------------------------
@@ -1296,23 +1296,14 @@
}
appendCode = appendCode.replace( "$DATAELEMENTID", String.valueOf( dataElementId ) );
-
appendCode = appendCode.replace( "$PROGRAMSTAGEID", String.valueOf( programStageId ) );
-
appendCode = appendCode.replace( "$PROGRAMSTAGENAME", programStageName );
-
appendCode = appendCode.replace( "$ORGUNITNAME", orgUnitName );
-
appendCode = appendCode.replace( "$DATAELEMENTNAME", dataElement.getName() );
-
appendCode = appendCode.replace( "$DATAELEMENTTYPE", dataElementType );
-
appendCode = appendCode.replace( "$DISABLED", disabled );
-
appendCode = appendCode.replace( "$COMPULSORY", compulsory );
-
appendCode = appendCode.replace( "$SAVEMODE", "false" );
-
appendCode = appendCode.replaceAll( "\\$", "\\\\\\$" );
dataElementMatcher.appendReplacement( sb, appendCode );
@@ -1447,5 +1438,4 @@
return result;
}
-
}
\ No newline at end of file
=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/DefaultProgramValidationService.java'
--- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/DefaultProgramValidationService.java 2011-04-29 07:41:04 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/DefaultProgramValidationService.java 2011-07-06 08:04:17 +0000
@@ -192,6 +192,5 @@
parser.parseExpression( description.toString() );
return ( parser.getValue() == 1.0 );
- }
-
+ }
}
=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/ProgramInstanceDeletionHandler.java'
--- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/ProgramInstanceDeletionHandler.java 2011-05-26 03:43:41 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/ProgramInstanceDeletionHandler.java 2011-07-06 08:04:17 +0000
@@ -159,7 +159,6 @@
programInstanceService.deleteProgramInstance( programInstance );
}
}
-
}
@Override
@@ -218,5 +217,4 @@
}
}
}
-
}
=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/ProgramStageDataElementDeletionHandler.java'
--- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/ProgramStageDataElementDeletionHandler.java 2011-06-24 07:55:22 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/ProgramStageDataElementDeletionHandler.java 2011-07-06 08:04:17 +0000
@@ -74,6 +74,7 @@
for ( ProgramStage programStage : programStages )
{
Collection<ProgramStageDataElement> dataElements = programStageDEService.get( programStage );
+
if ( dataElements != null && dataElements.size() > 0 )
{
for ( ProgramStageDataElement dataElement : dataElements )
@@ -100,7 +101,6 @@
programStageDEService.deleteProgramStageDataElement( dataElement );
}
}
-
}
@Override
@@ -119,5 +119,4 @@
return true;
}
-
}
=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/programattributevalue/DefaultProgramAttributeValueService.java'
--- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/programattributevalue/DefaultProgramAttributeValueService.java 2011-03-31 01:55:06 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/programattributevalue/DefaultProgramAttributeValueService.java 2011-07-06 08:04:17 +0000
@@ -111,5 +111,4 @@
{
return programAttributeValueStore.search( programAttribute, searchText );
}
-
}