Changeset 1509


Ignore:
Timestamp:
Jan 18, 2012, 2:42:12 PM (12 years ago)
Author:
Nicklas Nordborg
Message:

Fixes #346: Create virtual patient for cases with consent=no or not asked

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/dao/Patient.java

    r1504 r1509  
    8989    ItemQuery<BioSource> patientQuery = BioSource.getQuery();
    9090    Subtype.PATIENT.addFilter(dc, patientQuery);
    91     patientQuery.restrict(Restrictions.like(Hql.property("name"), Expressions.string(prefix + "%")));
     91    patientQuery.restrict(Restrictions.rlike(Hql.property("name"), Expressions.string("^" + prefix + "[0-9]+$")));
    9292    patientQuery.order(Orders.desc(Hql.property("name")));
    9393    patientQuery.setMaxResults(1);
Note: See TracChangeset for help on using the changeset viewer.