wip
This commit is contained in:
parent
45b452fb0e
commit
eec63fdc3b
@ -8,21 +8,21 @@
|
||||
|
||||
interface IUserStudyLister
|
||||
{
|
||||
public function setRadiologist(int $radiologist_id): void;
|
||||
public function setRadiologist(int $radiologist_id): self;
|
||||
|
||||
public function setStudyStatus(StudyLevelStatus $status): void;
|
||||
public function setStudyStatus(StudyLevelStatus $status): self;
|
||||
|
||||
public function setReportStatus(ReportStatus $status): void;
|
||||
public function setReportStatus(ReportStatus $status): self;
|
||||
|
||||
public function setPerPage(int $size): void;
|
||||
public function setPerPage(int $size): self;
|
||||
|
||||
public function setSortOrder(string $order): void;
|
||||
public function setSortOrder(string $order): self;
|
||||
|
||||
public function setSearchTerm(string $search): void;
|
||||
public function setSearchTerm(string $search): self;
|
||||
|
||||
public function setArchived(bool $archived): void;
|
||||
public function setArchived(bool $archived): self;
|
||||
|
||||
public function setLocked(bool $locked): void;
|
||||
public function setLocked(bool $locked): self;
|
||||
|
||||
public function get(?int $user_id = null): LengthAwarePaginator;
|
||||
}
|
||||
|
@ -28,12 +28,12 @@ abstract class WorklistBase implements IUserStudyLister
|
||||
|
||||
private ?bool $archived = null;
|
||||
|
||||
public function setRadiologist(int $radiologist_id): void
|
||||
public function setRadiologist(int $radiologist_id): self
|
||||
{
|
||||
$this->radiologist_id = $radiologist_id;
|
||||
}
|
||||
|
||||
public function setStudyStatus(StudyLevelStatus $status): void
|
||||
public function setStudyStatus(StudyLevelStatus $status): self
|
||||
{
|
||||
$this->studyStatus = $status;
|
||||
}
|
||||
@ -78,7 +78,7 @@ private function applyReportStatus(Builder $query): Builder
|
||||
return $query;
|
||||
}
|
||||
|
||||
public function setReportStatus(ReportStatus $status): void
|
||||
public function setReportStatus(ReportStatus $status): self
|
||||
{
|
||||
$this->reportStatus = $status;
|
||||
}
|
||||
@ -120,22 +120,28 @@ public function get(?int $user_id = null): LengthAwarePaginator
|
||||
->paginate($this->getPageSize($user_id));
|
||||
}
|
||||
|
||||
public function setArchived(bool $archived): void
|
||||
public function setArchived(bool $archived): self
|
||||
{
|
||||
$this->archived = $archived;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setLocked(bool $locked): void
|
||||
public function setLocked(bool $locked): self
|
||||
{
|
||||
$this->locked = $locked;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setPerPage(int $size): void
|
||||
public function setPerPage(int $size): self
|
||||
{
|
||||
$this->perPage = $size;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setSortOrder(string $order): void
|
||||
public function setSortOrder(string $order): self
|
||||
{
|
||||
$this->sortColumns = [];
|
||||
if (filled($order)) {
|
||||
@ -146,11 +152,15 @@ public function setSortOrder(string $order): void
|
||||
$this->sortColumns[] = [$column => $dir];
|
||||
}
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setSearchTerm(string $search): void
|
||||
public function setSearchTerm(string $search): self
|
||||
{
|
||||
$this->searchTerm = trim(strtolower($search));
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
private function getPageSize(?int $user_id = null): int
|
||||
|
Loading…
Reference in New Issue
Block a user