@Override
  public List<org.ehealth_connector.common.Patient> getPatients(Patient elexisPatient) {
    MasterPatientIndexQuery mpiQuery =
        new MasterPatientIndexQuery(affinityDomain.getPdqDestination());

    Name name = new Name(elexisPatient.getVorname(), elexisPatient.getName());
    mpiQuery.addPatientName(true, name);

    String birthDate = elexisPatient.getGeburtsdatum();
    if (birthDate != null && !birthDate.isEmpty()) {
      mpiQuery.setPatientDateOfBirth(DateUtil.date(birthDate));
    }

    MasterPatientIndexQueryResponse ret =
        ConvenienceMasterPatientIndexV3.queryPatientDemographics(mpiQuery, affinityDomain);

    return ret.getPatients();
  }
 @Override
 public boolean isVaild() {
   return affinityDomain != null && affinityDomain.getPdqDestination() != null;
 }