=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/hibernate/HibernateProgramStageInstanceStore.java' --- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/hibernate/HibernateProgramStageInstanceStore.java 2012-11-14 07:23:08 +0000 +++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/hibernate/HibernateProgramStageInstanceStore.java 2012-11-26 03:11:12 +0000 @@ -222,7 +222,9 @@ deKeys.add( deKey ); } } - } + } + + grid.addHeader( new GridHeader( "Complete", true, true ) ); // --------------------------------------------------------------------- // Get SQL and build grid @@ -250,8 +252,8 @@ public void removeEmptyEvents( ProgramStage programStage, OrganisationUnit organisationUnit ) { String sql = "delete from programstageinstance where programstageid=" + programStage.getId() - + " and organisationunitid=" + organisationUnit.getId() - + " and programstageinstanceid not in " + "(select pdv.programstageinstanceid from patientdatavalue pdv )"; + + " and organisationunitid=" + organisationUnit.getId() + " and programstageinstanceid not in " + + "(select pdv.programstageinstanceid from patientdatavalue pdv )"; jdbcTemplate.execute( sql ); } @@ -381,7 +383,7 @@ sql += "(select identifier from patientidentifier where patientid=p.patientid and patientidentifiertypeid=" + column.getIdentifier() + ") as identifier_" + column.getIdentifier() + ","; } - + if ( column.hasQuery() ) { where += operator + "lower(identifier_" + column.getIdentifier() + ") " + column.getQuery() + " "; @@ -439,8 +441,7 @@ } } - sql = sql.substring( 0, sql.length() - 1 ) + " "; // Removing last comma - + sql += " psi.completed "; sql += "from programstageinstance psi "; sql += "left join programinstance pi on (psi.programinstanceid=pi.programinstanceid) "; sql += "left join patient p on (pi.patientid=p.patientid) "; @@ -462,11 +463,11 @@ { sql += "and ou.organisationunitid in (" + TextUtils.getCommaDelimitedString( orgUnits ) + ") "; } - if( completed!= null ) + if ( completed != null ) { - sql += "and psi.completed="+ completed + " "; + sql += "and psi.completed=" + completed + " "; } - + sql += "order by "; for ( int i = level; i <= maxLevel; i++ ) === modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programStageInstancesList.vm' --- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programStageInstancesList.vm 2012-11-15 02:37:17 +0000 +++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programStageInstancesList.vm 2012-11-26 03:11:12 +0000 @@ -28,12 +28,14 @@ #set($metaData = $noCols - $valueTypes.size() - 1) #set($index = 0) #foreach( $col in $grid.getHeaders() ) - #if( $index==1 || $index > $metaData ) - $col.name + #if($index < $noCols - 1 ) + #if( $index==1 || $index > $metaData ) + $col.name + #end #end #set($index = $index + 1) #end - $i18n.getString( "operations" ) + $i18n.getString( "operations" ) @@ -45,17 +47,20 @@ #set( $nr = ( ( $paging.getCurrentPage() - 1 ) * $paging.pageSize ) + $velocityCount ) $nr - + #set($completed = "") #foreach( $col in $row ) #if( $index == 0 ) #set($psid = $col) + #elseif($index == $noCols - 1) + #set($completed = $col) #elseif( $index==1 || $index > $metaData ) $!col #end #set($index = $index + 1) #end - + + #if($completed=='false') ! #end $i18n.getString( "data_entry" ) $i18n.getString( "remove" ) === modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/style/style.css' --- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/style/style.css 2012-11-15 04:44:29 +0000 +++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/style/style.css 2012-11-26 03:11:12 +0000 @@ -56,6 +56,13 @@ width:100%; } +.incomplete-record +{ + color:red; + font-weight: bold; + font-size:25px; +} + /*----------------------------------------------------------------------------*/ /* Table /*----------------------------------------------------------------------------*/