Перевод на DDD
This commit is contained in:
22
app/Domain/ReportDuty/DTO/CreateReportDutyDto.php
Normal file
22
app/Domain/ReportDuty/DTO/CreateReportDutyDto.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace App\Domain\ReportDuty\DTO;
|
||||
|
||||
use Illuminate\Support\Carbon;
|
||||
|
||||
class CreateReportDutyDto
|
||||
{
|
||||
public function __construct(
|
||||
public Carbon $reportDate,
|
||||
public Carbon $sentAt,
|
||||
public string $periodType,
|
||||
public Carbon $periodStart,
|
||||
public Carbon $periodEnd,
|
||||
public int $reportMonth,
|
||||
public int $reportYear,
|
||||
public int $statusId,
|
||||
public int $rfLpuDoctorId,
|
||||
public int $rfDepartmentId,
|
||||
public int $rfUserId
|
||||
) {}
|
||||
}
|
||||
26
app/Domain/ReportDuty/DTO/MigrationSnapshotData.php
Normal file
26
app/Domain/ReportDuty/DTO/MigrationSnapshotData.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
namespace App\Domain\ReportDuty\DTO;
|
||||
|
||||
class MigrationSnapshotData
|
||||
{
|
||||
public function __construct(
|
||||
public readonly int $id,
|
||||
public readonly int $medicalHistoryId, // будет заполнено после сохранения пациента
|
||||
public readonly ?string $ingoingDate,
|
||||
public readonly ?string $outDate,
|
||||
public readonly ?int $diagnosisId,
|
||||
public readonly ?string $diagnosisCode,
|
||||
public readonly ?string $diagnosisName,
|
||||
public readonly ?int $interruptedEventId,
|
||||
public readonly ?int $stationarBranchId,
|
||||
public readonly ?int $departmentId,
|
||||
public readonly ?int $visitResultId,
|
||||
public readonly ?int $statCureResultId,
|
||||
public readonly ?int $userId,
|
||||
public readonly ?int $misUserId,
|
||||
public readonly ?string $comment,
|
||||
public readonly array $reanimations = [],
|
||||
) {
|
||||
}
|
||||
}
|
||||
33
app/Domain/ReportDuty/DTO/PatientSnapshotData.php
Normal file
33
app/Domain/ReportDuty/DTO/PatientSnapshotData.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
namespace App\Domain\ReportDuty\DTO;
|
||||
|
||||
class PatientSnapshotData
|
||||
{
|
||||
public function __construct(
|
||||
public readonly int $id,
|
||||
public readonly string $sourceType,
|
||||
public readonly string $medicalCardNumber,
|
||||
public readonly string $fullName,
|
||||
public readonly ?string $birthDate,
|
||||
public readonly ?string $recipientDate,
|
||||
public readonly ?string $extractDate,
|
||||
public readonly ?string $deathDate,
|
||||
public readonly ?int $male,
|
||||
public readonly ?int $urgencyId,
|
||||
public readonly ?int $visitResultId,
|
||||
public readonly ?int $hospitalResultId,
|
||||
public readonly ?string $comment,
|
||||
public readonly ?int $profitTypeId,
|
||||
public readonly array $migrations = [],
|
||||
public readonly array $operations = [],
|
||||
// Вычисляемые поля
|
||||
public readonly ?string $patientStatus = null,
|
||||
public readonly ?string $patientUrgency = null,
|
||||
public readonly array $periodFlags = [],
|
||||
public readonly ?bool $inReanimation = null,
|
||||
public readonly ?bool $admittedToday = null,
|
||||
public readonly ?bool $inObservable = null,
|
||||
) {
|
||||
}
|
||||
}
|
||||
23
app/Domain/ReportDuty/DTO/ReanimationSnapshotData.php
Normal file
23
app/Domain/ReportDuty/DTO/ReanimationSnapshotData.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace App\Domain\ReportDuty\DTO;
|
||||
|
||||
class ReanimationSnapshotData
|
||||
{
|
||||
public function __construct(
|
||||
public readonly int $id,
|
||||
public readonly int $migrationPatientId, // будет заполнено после сохранения миграции
|
||||
public readonly int $medicalHistoryId,
|
||||
public readonly ?string $inDate,
|
||||
public readonly ?string $outDate,
|
||||
public readonly ?string $description,
|
||||
public readonly ?int $stationarBranchId,
|
||||
public readonly ?int $migrationStationarBranchId,
|
||||
public readonly ?int $migrationDepartmentId,
|
||||
public readonly ?int $doctorId,
|
||||
public readonly ?int $userId,
|
||||
public readonly ?int $misUserId,
|
||||
public readonly ?string $comment,
|
||||
) {
|
||||
}
|
||||
}
|
||||
31
app/Domain/ReportDuty/DTO/SnapshotStatistics.php
Normal file
31
app/Domain/ReportDuty/DTO/SnapshotStatistics.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
namespace App\Domain\ReportDuty\DTO;
|
||||
|
||||
class SnapshotStatistics
|
||||
{
|
||||
public function __construct(
|
||||
public int $savedPatients = 0,
|
||||
public int $savedMigrations = 0,
|
||||
public int $savedReanimations = 0,
|
||||
public array $byStatus = [],
|
||||
public array $byUrgency = [],
|
||||
public array $admitted = ['today' => 0, 'planned' => 0, 'urgent' => 0],
|
||||
public int $inReanimation = 0,
|
||||
public int $admittedToday = 0,
|
||||
public int $inDepartment = 0,
|
||||
public int $planned = 0,
|
||||
public int $deceased = 0,
|
||||
public int $transferred = 0,
|
||||
public int $discharged = 0,
|
||||
public int $outcome = 0,
|
||||
public float $totalBedDays = 0,
|
||||
public float $totalPreopBedDays = 0,
|
||||
public int $patientsWithOperations = 0,
|
||||
public int $totalOperations = 0,
|
||||
public int $plannedOperations = 0,
|
||||
public int $urgentOperations = 0,
|
||||
public int $totalPatients = 0,
|
||||
) {
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user