I have this sql which is returning an empty list:
List<Provider> providerList = where
.and(where.in(Provider.COL_ID, selectedOrg.getProviders()), where.eq(Provider.COL_ALLOWS_APPTS_FOR_NEW_PATIENTS, true))
.or()
.and(where.in(Provider.COL_ID, selectedOrg.getProviders()), where.in(Provider.COL_ID, PatientDataStore.getAccessHelper().anyDrAvailableForAppt()))
.query();
The 2nd and seems to be the main culprit, in my test cases the anyDrAvailableForAppt will return 4 drs and the provider list has 10 which 3 of the 4 will be in that list. But the query returns 0, so it seems I am not building my query right.
I want all the drs in the available list and that are part in the list of providers for an org to be returned. How should that look in ormlite/
0 comments:
Post a Comment