Skip to content

Commit

Permalink
filter inventory calendar visits by proband - web
Browse files Browse the repository at this point in the history
  • Loading branch information
rkrenn committed Jul 17, 2024
1 parent 9a054c4 commit 61bdaf6
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,10 @@ public VisitScheduleItemOutVO getVisitScheduleItem(@PathParam("id") Long id) thr
@GET
@Produces({ MediaType.APPLICATION_JSON })
@Path("interval")
public Collection<VisitScheduleAppointmentVO> getVisitScheduleItemInterval(@QueryParam("trial_id") Long trialId, @QueryParam("from") String from,
public Collection<VisitScheduleAppointmentVO> getVisitScheduleItemInterval(@QueryParam("trial_id") Long trialId, @QueryParam("proband_id") Long probandId,
@QueryParam("from") String from,
@QueryParam("to") String to, @QueryParam("sort") Boolean sort) throws Exception {
return WebUtil.getServiceLocator().getTrialService().getVisitScheduleItemInterval(auth, trialId, null, null, null,
return WebUtil.getServiceLocator().getTrialService().getVisitScheduleItemInterval(auth, trialId, null, probandId, null, null,
(Date) (CommonUtil.isEmptyString(from) ? null : StringConverter.getConverter(Date.class).convert(from)),
(Date) (CommonUtil.isEmptyString(to) ? null : StringConverter.getConverter(Date.class).convert(to)), sort);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ protected void getLazyResult(Date start, Date stop) {
Collection<VisitScheduleAppointmentVO> visitScheduleAppointments = null;
try {
visitScheduleAppointments = WebUtil.getServiceLocator().getTrialService()
.getVisitScheduleItemInterval(auth, trialId, departmentId, null, visitTypeId, from, to, false);
.getVisitScheduleItemInterval(auth, trialId, departmentId, probandId, null, visitTypeId, from, to, false);
} catch (ServiceException | AuthorisationException | IllegalArgumentException e) {
} catch (AuthenticationException e) {
WebUtil.publishException(e);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public class DutyRosterLazyScheduleModel extends LazyScheduleModelBase {
private boolean showProbandStatus;
private Long showCollisionsThresholdDays;
private Long staffNaCountLimit;
private boolean showStaffNaCount;
//private boolean showStaffNaCount;
private Long departmentId;
private Long staffCategoryId;
private Long trialId;
Expand Down Expand Up @@ -291,7 +291,7 @@ protected void getLazyResult(Date start, Date end) {
Collection<VisitScheduleAppointmentVO> visitScheduleAppointments = null;
try {
visitScheduleAppointments = WebUtil.getServiceLocator().getTrialService()
.getVisitScheduleItemInterval(auth, trialId, departmentId, statusId, visitTypeId, from, to, false);
.getVisitScheduleItemInterval(auth, trialId, departmentId, null, statusId, visitTypeId, from, to, false);
} catch (ServiceException | AuthorisationException | IllegalArgumentException e) {
} catch (AuthenticationException e) {
WebUtil.publishException(e);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ public void updateTimelineModel() {
visitScheduleAppointments = WebUtil
.getServiceLocator()
.getTrialService()
.getVisitScheduleItemInterval(WebUtil.getAuthentication(), filterTrialId, filterDepartmentId, filterStatusId, filterVisitTypeId, rangeStart, rangeEnd,
.getVisitScheduleItemInterval(WebUtil.getAuthentication(), filterTrialId, filterDepartmentId, null, filterStatusId, filterVisitTypeId, rangeStart, rangeEnd,
false);
} catch (ServiceException | AuthorisationException | IllegalArgumentException e) {
} catch (AuthenticationException e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ public String getTitle() {
sb.append(in.getToken());
appended = true;
}
appended = sb.length() > 0;
ProbandOutVO proband = null;
proband = (out != null ? out.getProband() : null);
if (proband != null) {
Expand Down

0 comments on commit 61bdaf6

Please sign in to comment.