Changeset 4170
- Timestamp:
- 05/12/08 10:17:10 (7 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
openmrs/branches/data_synchronization_bidirectional/src/api/org/openmrs/api/db/hibernate/HibernatePatientDAO.java
r4161 r4170 162 162 Query query; 163 163 164 String sql = "select patient from Patient patient, PersonName name join patient.identifiers ids where ids. identifier = :id and patient.patientId = name.person.personId";164 String sql = "select patient from Patient patient, PersonName name join patient.identifiers ids where ids.voided = false and ids.identifier = :id and patient.patientId = name.person.personId"; 165 165 String order = " order by name.givenName asc, name.middleName asc, name.familyName asc"; 166 166 … … 190 190 191 191 Criteria criteria = sessionFactory.getCurrentSession().createCriteria(PatientIdentifier.class); 192 criteria.add(Restrictions.eq("voided", false)); 192 193 criteria.setProjection(Projections.property("patient")); 193 194