Commit 8ff376b2 authored by Franck Desaize's avatar Franck Desaize
Browse files

Add retrieve patientDB PIX_Manager

parent dfb4c3e3
Pipeline #275040 failed with stages
in 1 minute and 19 seconds
......@@ -29,6 +29,7 @@ import java.util.List;
public class PatientDAOImpl implements PatientDAO {
private static final GazelleLogger log = GazelleLoggerFactory.getInstance().getLogger(PatientDAOImpl.class);
public static final String PAT_IDENTITY_X_REF_MGR = "PAT_IDENTITY_X_REF_MGR";
private EntityManager entityManager;
private DomainDAO domainDAO;
private IdentifierDAO identifierDAO;
......@@ -225,4 +226,14 @@ public class PatientDAOImpl implements PatientDAO {
throw new PatientDeleteException("Unexpected Exception deleting Patient !", e);
}
}
public List<PatientDB> retrieveListOfPatientDBOfPIX_Manager() throws PatientNotFoundException {
try {
TypedQuery<PatientDB> query = entityManager.createNamedQuery("PatientDB.findForSimulatedActor", PatientDB.class);
query.setParameter("actorKeyword", PAT_IDENTITY_X_REF_MGR);
return query.getResultList();
} catch (NoResultException e) {
throw new PatientNotFoundException(String.format("No result found for Actor : %s", PAT_IDENTITY_X_REF_MGR), e);
}
}
}
......@@ -79,5 +79,6 @@ public interface PatientDAO {
*/
void deletePatient(String patientUuid) throws PatientDeleteException;
List<PatientDB> retrieveListOfPatientDBOfPIX_Manager() throws PatientNotFoundException;
}
......@@ -120,6 +120,11 @@ public class PatientDAOMock implements PatientDAO {
}
@Override
public List<PatientDB> retrieveListOfPatientDBOfPIX_Manager() throws PatientNotFoundException {
return null;
}
/**
* Enumeration of retrieve result that can be returned by this class.
*/
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment