openmrs-android-sdk/src/main/java/com/openmrs/android_sdk/library/dao/EncounterDAO.java
/**
     * Find encounters by visit id list.
     *
     * @param visitID the visit id
     * @return the list
     */
Find encounters by visit id list.
@param visitID the visit id
@return the list
Find encounters by visit id list . @param visitID the visit id @return the list
public List<Encounter> findEncountersByVisitID(Long visitID) {
        List<Encounter> encounters = new ArrayList<>();
        try {
            List<EncounterEntity> encounterEntities = encounterRoomDAO.findEncountersByVisitID(visitID.toString()).blockingGet();
            for (EncounterEntity entity : encounterEntities) {
                encounters.add(AppDatabaseHelper.convert(entity));
            }
            return encounters;
        } catch (Exception e) {
            return encounters;
        }
    }
public List < Encounter > findEncountersByVisitID ( Long visitID ) { List < Encounter > encounters = new ArrayList < > ( ) ; try { List < EncounterEntity > encounterEntities = encounterRoomDAO . findEncountersByVisitID ( visitID . toString ( ) ) . blockingGet ( ) ; for ( EncounterEntity entity : encounterEntities ) { encounters . add ( AppDatabaseHelper . convert ( entity ) ) ; } return encounters ; } catch ( Exception e ) { return encounters ; } }
Find encounters by visit id list.
Find encounters by visit id list .