diff --git a/app/Services/DutyReportService.php b/app/Services/DutyReportService.php index 1138f6b..bf24b29 100644 --- a/app/Services/DutyReportService.php +++ b/app/Services/DutyReportService.php @@ -1023,12 +1023,13 @@ class DutyReportService public function saveObservables(array $observables, ReportDuty $reportDuty) { foreach ($observables as $observable) { + // TODO: source_type возможно нужно прокидывать с фронта ObservableMedicalHistory::updateOrCreate([ 'original_id' => $observable['original_id'] ?? $observable['id'], - 'source_type' => $observable['source_type'], + 'source_type' => $observable['source_type'] ?? 'mis', 'observable_in' => $observable['observable_in'] ?? $reportDuty->period_start, ], [ - 'source_type' => $observable['source_type'], + 'source_type' => $observable['source_type'] ?? 'mis', 'original_id' => $observable['original_id'], 'observable_in' => $observable['observable_in'] ?? $reportDuty->period_start, 'observable_out' => $observable['observable_out'] ?? null,