From 35b8b4f67bc229fe8fc67f098e92d101edbb56a2 Mon Sep 17 00:00:00 2001 From: Rene Krenn Date: Sun, 16 Jun 2024 16:03:47 +0200 Subject: [PATCH] filter proband list by department - web tier --- .../web/jersey/resource/trial/ProbandListEntryResource.java | 5 +++-- .../web/model/shared/EcrfFieldStatusEntryLogEagerModel.java | 2 +- .../ctsms/web/model/shared/ProbandListEntryModel.java | 4 ++-- .../web/model/trial/EcrfFieldStatusEntryLogLazyModel.java | 2 +- ...ProbandMoneyTransferNoParticipationSummaryLazyModel.java | 6 +++--- .../model/trial/ProbandMoneyTransferSummaryLazyModel.java | 6 +++--- .../main/java/org/phoenixctms/ctsms/web/util/WebUtil.java | 2 +- 7 files changed, 14 insertions(+), 13 deletions(-) diff --git a/web/src/main/java/org/phoenixctms/ctsms/web/jersey/resource/trial/ProbandListEntryResource.java b/web/src/main/java/org/phoenixctms/ctsms/web/jersey/resource/trial/ProbandListEntryResource.java index e79ef1ffe33c..a3ada09b6547 100644 --- a/web/src/main/java/org/phoenixctms/ctsms/web/jersey/resource/trial/ProbandListEntryResource.java +++ b/web/src/main/java/org/phoenixctms/ctsms/web/jersey/resource/trial/ProbandListEntryResource.java @@ -30,7 +30,7 @@ import io.swagger.annotations.Api; -@Api(value="trial") +@Api(value = "trial") @Path("/probandlistentry") public class ProbandListEntryResource { @@ -72,7 +72,8 @@ public ProbandListEntryOutVO getProbandListEntry(@PathParam("id") Long id) throw @Produces({ MediaType.APPLICATION_JSON }) public Page getProbandListEntryList(@Context UriInfo uriInfo) throws AuthenticationException, AuthorisationException, ServiceException { PSFUriPart psf; - return new Page(WebUtil.getServiceLocator().getTrialService().getProbandListEntryList(auth, null, null, null, true, psf = new PSFUriPart(uriInfo)), + return new Page( + WebUtil.getServiceLocator().getTrialService().getProbandListEntryList(auth, null, null, null, null, true, psf = new PSFUriPart(uriInfo)), psf); } diff --git a/web/src/main/java/org/phoenixctms/ctsms/web/model/shared/EcrfFieldStatusEntryLogEagerModel.java b/web/src/main/java/org/phoenixctms/ctsms/web/model/shared/EcrfFieldStatusEntryLogEagerModel.java index 680a91a54ae5..217346342e42 100644 --- a/web/src/main/java/org/phoenixctms/ctsms/web/model/shared/EcrfFieldStatusEntryLogEagerModel.java +++ b/web/src/main/java/org/phoenixctms/ctsms/web/model/shared/EcrfFieldStatusEntryLogEagerModel.java @@ -108,7 +108,7 @@ protected Collection getEagerResult(PSFVO psf) { if (listEntryId != null) { try { return WebUtil.getServiceLocator().getTrialService() - .getEcrfFieldStatusEntryLog(WebUtil.getAuthentication(), queue, null, listEntryId, ecrfId, visitId, true, false, new PSFVO(INITIAL_PSF)); + .getEcrfFieldStatusEntryLog(WebUtil.getAuthentication(), queue, null, null, listEntryId, ecrfId, visitId, true, false, new PSFVO(INITIAL_PSF)); } catch (ServiceException | AuthorisationException | IllegalArgumentException e) { } catch (AuthenticationException e) { WebUtil.publishException(e); diff --git a/web/src/main/java/org/phoenixctms/ctsms/web/model/shared/ProbandListEntryModel.java b/web/src/main/java/org/phoenixctms/ctsms/web/model/shared/ProbandListEntryModel.java index 9a9678f1d369..71251f5c74ed 100644 --- a/web/src/main/java/org/phoenixctms/ctsms/web/model/shared/ProbandListEntryModel.java +++ b/web/src/main/java/org/phoenixctms/ctsms/web/model/shared/ProbandListEntryModel.java @@ -349,9 +349,9 @@ protected Collection getLazyResult(PSFVO psf) { if (trialId != null || probandGroup != null || probandId != null) { try { if (probandGroup != null) { - return WebUtil.getServiceLocator().getTrialService().getProbandListEntryList(WebUtil.getAuthentication(), null, probandGroup.getId(), null, total, psf); + return WebUtil.getServiceLocator().getTrialService().getProbandListEntryList(WebUtil.getAuthentication(), null, null, probandGroup.getId(), null, total, psf); } else { - return WebUtil.getServiceLocator().getTrialService().getProbandListEntryList(WebUtil.getAuthentication(), trialId, null, probandId, total, psf); + return WebUtil.getServiceLocator().getTrialService().getProbandListEntryList(WebUtil.getAuthentication(), trialId, null, null, probandId, total, psf); } } catch (ServiceException | AuthorisationException | IllegalArgumentException e) { } catch (AuthenticationException e) { diff --git a/web/src/main/java/org/phoenixctms/ctsms/web/model/trial/EcrfFieldStatusEntryLogLazyModel.java b/web/src/main/java/org/phoenixctms/ctsms/web/model/trial/EcrfFieldStatusEntryLogLazyModel.java index 4c38098cf979..e14518690be7 100644 --- a/web/src/main/java/org/phoenixctms/ctsms/web/model/trial/EcrfFieldStatusEntryLogLazyModel.java +++ b/web/src/main/java/org/phoenixctms/ctsms/web/model/trial/EcrfFieldStatusEntryLogLazyModel.java @@ -29,7 +29,7 @@ protected Collection getLazyResult(PSFVO psf) { return WebUtil .getServiceLocator() .getTrialService() - .getEcrfFieldStatusEntryLog(WebUtil.getAuthentication(), queue, trialId, null, null, null, true, + .getEcrfFieldStatusEntryLog(WebUtil.getAuthentication(), queue, trialId, null, null, null, null, true, psf == null || CommonUtil.isEmptyString(psf.getSortField()), psf); } catch (ServiceException | AuthorisationException | IllegalArgumentException e) { diff --git a/web/src/main/java/org/phoenixctms/ctsms/web/model/trial/ProbandMoneyTransferNoParticipationSummaryLazyModel.java b/web/src/main/java/org/phoenixctms/ctsms/web/model/trial/ProbandMoneyTransferNoParticipationSummaryLazyModel.java index 02005ab4bd46..ec4da2f39999 100644 --- a/web/src/main/java/org/phoenixctms/ctsms/web/model/trial/ProbandMoneyTransferNoParticipationSummaryLazyModel.java +++ b/web/src/main/java/org/phoenixctms/ctsms/web/model/trial/ProbandMoneyTransferNoParticipationSummaryLazyModel.java @@ -24,8 +24,8 @@ protected Collection getLazyResult(PSFVO psf) { if (trialId != null) { try { return WebUtil.getServiceLocator().getTrialService() - .getProbandMoneyTransferNoParticipationSummaryList(WebUtil.getAuthentication(), trialId, null, null, paid, total, psf); - } catch (ServiceException|AuthorisationException|IllegalArgumentException e) { + .getProbandMoneyTransferNoParticipationSummaryList(WebUtil.getAuthentication(), trialId, null, null, null, paid, total, psf); + } catch (ServiceException | AuthorisationException | IllegalArgumentException e) { } catch (AuthenticationException e) { WebUtil.publishException(e); } @@ -37,7 +37,7 @@ protected Collection getLazyResult(PSFVO psf) { protected MoneyTransferSummaryVO getRowElement(Long id) { try { return WebUtil.getServiceLocator().getTrialService().getProbandMoneyTransferNoParticipationSummary(WebUtil.getAuthentication(), id, trialId, null, null, paid); - } catch (ServiceException|AuthorisationException|IllegalArgumentException e) { + } catch (ServiceException | AuthorisationException | IllegalArgumentException e) { } catch (AuthenticationException e) { WebUtil.publishException(e); } diff --git a/web/src/main/java/org/phoenixctms/ctsms/web/model/trial/ProbandMoneyTransferSummaryLazyModel.java b/web/src/main/java/org/phoenixctms/ctsms/web/model/trial/ProbandMoneyTransferSummaryLazyModel.java index 92e5c6f9b2c1..56d00e062acb 100644 --- a/web/src/main/java/org/phoenixctms/ctsms/web/model/trial/ProbandMoneyTransferSummaryLazyModel.java +++ b/web/src/main/java/org/phoenixctms/ctsms/web/model/trial/ProbandMoneyTransferSummaryLazyModel.java @@ -23,8 +23,8 @@ public ProbandMoneyTransferSummaryLazyModel(boolean total) { protected Collection getLazyResult(PSFVO psf) { if (trialId != null) { try { - return WebUtil.getServiceLocator().getTrialService().getProbandMoneyTransferSummaryList(WebUtil.getAuthentication(), trialId, null, null, paid, total, psf); - } catch (ServiceException|AuthorisationException|IllegalArgumentException e) { + return WebUtil.getServiceLocator().getTrialService().getProbandMoneyTransferSummaryList(WebUtil.getAuthentication(), trialId, null, null, null, paid, total, psf); + } catch (ServiceException | AuthorisationException | IllegalArgumentException e) { } catch (AuthenticationException e) { WebUtil.publishException(e); } @@ -36,7 +36,7 @@ protected Collection getLazyResult(PSFVO psf) { protected MoneyTransferSummaryVO getRowElement(Long id) { try { return WebUtil.getServiceLocator().getTrialService().getProbandMoneyTransferSummary(WebUtil.getAuthentication(), id, null, null, paid); - } catch (ServiceException|AuthorisationException|IllegalArgumentException e) { + } catch (ServiceException | AuthorisationException | IllegalArgumentException e) { } catch (AuthenticationException e) { WebUtil.publishException(e); } diff --git a/web/src/main/java/org/phoenixctms/ctsms/web/util/WebUtil.java b/web/src/main/java/org/phoenixctms/ctsms/web/util/WebUtil.java index 0d540ed67bee..57c8f7559546 100644 --- a/web/src/main/java/org/phoenixctms/ctsms/web/util/WebUtil.java +++ b/web/src/main/java/org/phoenixctms/ctsms/web/util/WebUtil.java @@ -3291,7 +3291,7 @@ public static ProbandListEntryOutVO getProbandListEntry(Long probandListEntryId) public static Long getProbandListEntryCount(Long trialId, Long probandId, boolean total) { if (trialId != null || probandId != null) { try { - return getServiceLocator().getTrialService().getProbandListEntryCount(getAuthentication(), trialId, null, probandId, total); + return getServiceLocator().getTrialService().getProbandListEntryCount(getAuthentication(), trialId, null, null, probandId, total); } catch (ServiceException | AuthorisationException | IllegalArgumentException e) { } catch (AuthenticationException e) { publishException(e);