* закончил окно редактирования карты с назначением номера в архиве
* добавил окно для редактирования выдачи / возврата карты * раздробил логику хранения карты
This commit is contained in:
21
app/Http/Controllers/ArchiveHistoryController.php
Normal file
21
app/Http/Controllers/ArchiveHistoryController.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Models\ArchiveHistory;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class ArchiveHistoryController extends Controller
|
||||
{
|
||||
public function index()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public function show($id, Request $request)
|
||||
{
|
||||
$archiveHistory = ArchiveHistory::find($id);
|
||||
|
||||
return response()->json($archiveHistory);
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Http\Resources\ArchiveHistoryResource;
|
||||
use App\Models\SI\SttMedicalHistory;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
@@ -15,11 +16,13 @@ class MedicalHistoryController extends Controller
|
||||
$patientInfo = null;
|
||||
if ($viewType == 'si') {
|
||||
$patient = SttMedicalHistory::where('id', $id)->first();
|
||||
$archiveJournal = $patient->archiveHistory;
|
||||
$archiveJournal = ArchiveHistoryResource::collection($patient->archiveHistory);
|
||||
$archiveInfo = $patient->archiveInfo;
|
||||
|
||||
$patientInfo = [
|
||||
'info' => $patient,
|
||||
'journal' => $archiveJournal,
|
||||
'archiveInfo' => $archiveInfo,
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
16
app/Http/Controllers/OrgController.php
Normal file
16
app/Http/Controllers/OrgController.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Models\Org;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class OrgController extends Controller
|
||||
{
|
||||
public function index()
|
||||
{
|
||||
$orgs = Org::all(['id', 'name', 'code']);
|
||||
|
||||
return response()->json($orgs);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user