@@ -985,14 +985,14 @@ private void customzieSamplesTable(AbstractTableInfo ti)
985985 SQLFragment containerSql = ContainerFilter .current (c ).getSQLFragment (LaboratorySchema .getInstance ().getSchema (), new SQLFragment (ti .getContainerFieldKey ().toString ()));
986986
987987 SQLFragment sql = new SQLFragment ("(SELECT count(*) as _expr FROM laboratory.samples s WHERE " +
988- " (s." ).append (containerSql ).append (")" +
989- " AND " + getNullSafeEqual ("s.subjectid" , ExprColumn .STR_TABLE_ALIAS + ".subjectid" ) +
990- " AND " + getNullSafeEqual ("CAST(s.sampledate as DATE)" , "CAST(" + ExprColumn .STR_TABLE_ALIAS + ".sampledate as DATE)" ) +
991- " AND " + getNullSafeEqual ("s.sampletype" , ExprColumn .STR_TABLE_ALIAS + ".sampletype" ) +
992- " AND " + getNullSafeEqual ("s.samplesubtype" , ExprColumn .STR_TABLE_ALIAS + ".samplesubtype" ) +
993- " AND " + ExprColumn .STR_TABLE_ALIAS + ".dateremoved IS NULL" +
994- " AND s.rowid != " + ExprColumn .STR_TABLE_ALIAS + ".rowid" +
995- ")" );
988+ " (s." ).append (containerSql ).append (")" + " AND " ).
989+ append ( getNullSafeEqual ("s.subjectid" , ExprColumn .STR_TABLE_ALIAS + ".subjectid" )).
990+ append ( " AND " ). append ( getNullSafeEqual ("CAST(s.sampledate as DATE)" , "CAST(" + ExprColumn .STR_TABLE_ALIAS + ".sampledate as DATE)" )).
991+ append ( " AND " ). append ( getNullSafeEqual ("s.sampletype" , ExprColumn .STR_TABLE_ALIAS + ".sampletype" )).
992+ append ( " AND " ). append ( getNullSafeEqual ("s.samplesubtype" , ExprColumn .STR_TABLE_ALIAS + ".samplesubtype" )).
993+ append ( " AND " ). append ( ExprColumn .STR_TABLE_ALIAS ). append ( ".dateremoved IS NULL" ).
994+ append ( " AND s.rowid != " ). append ( ExprColumn .STR_TABLE_ALIAS ). append ( ".rowid" ).
995+ append ( ")" );
996996
997997 ExprColumn col = new ExprColumn (ti , name , sql , JdbcType .INTEGER , ti .getColumn ("subjectid" ), ti .getColumn ("sampledate" ), ti .getColumn ("sampletype" ), ti .getColumn ("samplesubtype" ));
998998 col .setLabel ("Matching Samples" );
0 commit comments