/** * Retrieve the participant for given PatientId * * @param participantId - PatientId for which participant has to be fetched * @param shortTitle - ShortTitle of the CollectionProtocol * @return Participant * @throws ApplicationException - ApplicationException */ public Participant getParticipantForPatientId(String participantId, String shortTitle) throws ApplicationException { final List<Participant> prtcpntLst = caTissueAPIClient .getApplicationService() .query(CqlUtility.getParticipantForPatientId(participantId, shortTitle)); if (prtcpntLst == null || prtcpntLst.isEmpty()) { return null; } return prtcpntLst.get(0); }
/** * retrieve participants registered to a collection protocol * * @param cpTitle - collection protocol title * @return list of participant for that collection protocol * @throws ApplicationException - ApplicationException */ public List<Participant> getParticipantsForCollectionProtocol(String cpTitle) throws ApplicationException { return caTissueAPIClient .getApplicationService() .query(CqlUtility.getParticipantsForCP(cpTitle)); }