Skip to content

Commit

Permalink
department chart - filter for intial proband list state entries
Browse files Browse the repository at this point in the history
  • Loading branch information
rkrenn committed Jun 22, 2024
1 parent ef3d198 commit 95692fd
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ protected Collection<ProbandListStatusEntry> getCollidingItems(
} else {
probandId = root.getId();
}
return probandListStatusEntryDao.findByTrialProband(null, probandId, true, null);
return probandListStatusEntryDao.findByTrialProband(null, probandId, true, null, null);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ protected Collection<ProbandListStatusEntry> handleFindByListEntry(

@Override
protected Collection<ProbandListStatusEntry> handleFindByTrialProband(
Long trialId, Long probandId, boolean last, PSFVO psf)
Long trialId, Long probandId, boolean last, Boolean initial, PSFVO psf)
throws Exception {
org.hibernate.Criteria statusEntryCriteria = createStatusEntryCriteria("probandListStatusEntry");
SubCriteriaMap criteriaMap = new SubCriteriaMap(ProbandListStatusEntry.class, statusEntryCriteria);
Expand All @@ -110,6 +110,9 @@ protected Collection<ProbandListStatusEntry> handleFindByTrialProband(
if (probandId != null) {
criteriaMap.createCriteria("listEntry").add(Restrictions.eq("proband.id", probandId.longValue()));
}
if (initial != null) {
criteriaMap.createCriteria("status").add(Restrictions.eq("initial", initial.booleanValue()));
}
if (last) {
criteriaMap.createCriteria("listEntry.lastStatus").add(Restrictions.eqProperty("id", "probandListStatusEntry.id")); // didn't work without explicit id compare
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6695,7 +6695,7 @@ protected ProbandListEntryTagValuesOutVO handleGetProbandListEntryTagValues(

@Override
protected Collection<ProbandListStatusEntryOutVO> handleGetProbandListStatus(
AuthenticationVO auth, Long trialId, Long probandId, boolean last, PSFVO psf)
AuthenticationVO auth, Long trialId, Long probandId, boolean last, Boolean initial, PSFVO psf)
throws Exception {
if (trialId != null) {
CheckIDUtil.checkTrialId(trialId, this.getTrialDao());
Expand All @@ -6704,7 +6704,7 @@ protected Collection<ProbandListStatusEntryOutVO> handleGetProbandListStatus(
CheckIDUtil.checkProbandId(probandId, this.getProbandDao());
}
ProbandListStatusEntryDao probandListStatusEntryDao = this.getProbandListStatusEntryDao();
Collection statusEntries = probandListStatusEntryDao.findByTrialProband(trialId, probandId, last, psf);
Collection statusEntries = probandListStatusEntryDao.findByTrialProband(trialId, probandId, last, initial, psf);
probandListStatusEntryDao.toProbandListStatusEntryOutVOCollection(statusEntries);
return statusEntries;
}
Expand Down

0 comments on commit 95692fd

Please sign in to comment.