Форматирование
This commit is contained in:
@@ -93,6 +93,7 @@ class UnifiedPatientService
|
||||
}
|
||||
|
||||
$specialCount = $this->getManualPatientsCount($department, $baseStatus, $dateRange, self::SPECIAL_SOURCE_TYPES);
|
||||
|
||||
return $misCount + $specialCount;
|
||||
}
|
||||
|
||||
@@ -214,8 +215,7 @@ class UnifiedPatientService
|
||||
Department $department,
|
||||
bool $onlyIds = false,
|
||||
string $sourceScope = 'all'
|
||||
): Collection
|
||||
{
|
||||
): Collection {
|
||||
$observationPatients = ObservationPatient::where('rf_department_id', $department->department_id)->get();
|
||||
|
||||
$misIds = $observationPatients->pluck('rf_medicalhistory_id')->filter()->unique()->values();
|
||||
@@ -276,12 +276,12 @@ class UnifiedPatientService
|
||||
bool $forSnapshots = false
|
||||
): Collection {
|
||||
$misPatients = $this->getMisPatients($user, $status, $dateRange, $branchId, $includeCurrent, $fillableAuto, $forSnapshots);
|
||||
$manualPatients = $this->getManualPatients($department, $status, $dateRange, self::SPECIAL_SOURCE_TYPES, !$forSnapshots);
|
||||
$manualPatients = $this->getManualPatients($department, $status, $dateRange, self::SPECIAL_SOURCE_TYPES, ! $forSnapshots);
|
||||
$reportIds = $this->getReportIdsForDepartmentPeriod($department, $dateRange);
|
||||
|
||||
$linkedManualPatients = DepartmentPatient::query()
|
||||
->where(function ($builder) use ($department, $reportIds) {
|
||||
if (!empty($reportIds)) {
|
||||
if (! empty($reportIds)) {
|
||||
$builder->whereIn('rf_report_id', $reportIds);
|
||||
}
|
||||
|
||||
@@ -338,7 +338,7 @@ class UnifiedPatientService
|
||||
bool $forSnapshots = false
|
||||
): Collection {
|
||||
return $this->mapManualPatients(
|
||||
$this->getManualPatients($department, $status, $dateRange, self::SPECIAL_SOURCE_TYPES, !$forSnapshots),
|
||||
$this->getManualPatients($department, $status, $dateRange, self::SPECIAL_SOURCE_TYPES, ! $forSnapshots),
|
||||
$dateRange
|
||||
);
|
||||
}
|
||||
@@ -450,8 +450,7 @@ class UnifiedPatientService
|
||||
DateRange $dateRange,
|
||||
?array $sourceTypes = self::SPECIAL_SOURCE_TYPES,
|
||||
bool $withOperations = true
|
||||
): Collection
|
||||
{
|
||||
): Collection {
|
||||
$query = $this->buildManualPatientsQuery($department, $dateRange, $sourceTypes, $withOperations);
|
||||
|
||||
return match ($status) {
|
||||
@@ -521,7 +520,7 @@ class UnifiedPatientService
|
||||
|
||||
$query = DepartmentPatient::query()
|
||||
->where(function ($builder) use ($department, $reportIds) {
|
||||
if (!empty($reportIds)) {
|
||||
if (! empty($reportIds)) {
|
||||
$builder->whereIn('rf_report_id', $reportIds);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user